Skip to main content

acc_id_visible_to_caller

Function acc_id_visible_to_caller 

Source
pub fn acc_id_visible_to_caller(
    acc_id: u64,
    caller_allowed_acc_ids: Option<&HashSet<u64>>,
) -> bool
Expand description

判断单个 acc_id 是否对 caller 可见。

caller_allowed_acc_ids=None / Some(empty) 表示 full key,不过滤; Some(non_empty_set) 表示仅在 caller 可见账户内匹配,防止通过 0/1/N match 枚举其它账户。Deny-all 用 sentinel {0} 表达,不能用空集。