mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-08-26 03:41:13 +00:00
perf(lee): extend the caller set for the child authorization scope
This commit is contained in:
@@ -492,11 +492,9 @@ impl ExecutionState {
|
||||
post_states_entry.insert_entry(post.into_account());
|
||||
}
|
||||
|
||||
caller
|
||||
.authorized_accounts
|
||||
.into_iter()
|
||||
.chain(authorized_output_accounts)
|
||||
.collect()
|
||||
let mut authorized_accounts = caller.authorized_accounts;
|
||||
authorized_accounts.extend(authorized_output_accounts);
|
||||
authorized_accounts
|
||||
}
|
||||
|
||||
/// Consume self and yield the validity windows, the per-position PDA seed/program map
|
||||
|
||||
@@ -264,17 +264,14 @@ impl ValidatedStateDiff {
|
||||
// Union with the caller's authorized set so that authorization is monotonically
|
||||
// growing: once an account is authorized at any point in the chain it remains
|
||||
// authorized for all subsequent calls.
|
||||
let authorized_accounts: HashSet<_> = caller_data
|
||||
.authorized_accounts
|
||||
.into_iter()
|
||||
.chain(
|
||||
program_output
|
||||
.pre_states
|
||||
.iter()
|
||||
.filter(|pre| pre.is_authorized)
|
||||
.map(|pre| pre.account_id),
|
||||
)
|
||||
.collect();
|
||||
let mut authorized_accounts = caller_data.authorized_accounts;
|
||||
authorized_accounts.extend(
|
||||
program_output
|
||||
.pre_states
|
||||
.iter()
|
||||
.filter(|pre| pre.is_authorized)
|
||||
.map(|pre| pre.account_id),
|
||||
);
|
||||
for new_call in program_output.chained_calls.into_iter().rev() {
|
||||
chained_calls.push_front((
|
||||
new_call,
|
||||
|
||||
Reference in New Issue
Block a user