mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-08-04 12:03:16 +00:00
refactor(circuit): remove optimistic pda id derivation
This commit is contained in:
parent
327f44fce3
commit
9a4e539f55
@ -527,11 +527,11 @@ fn resolve_authorization_and_record_bindings(
|
|||||||
caller_pda_seeds: &[PdaSeed],
|
caller_pda_seeds: &[PdaSeed],
|
||||||
previous_is_authorized: bool,
|
previous_is_authorized: bool,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
let pda_address = account_identities
|
|
||||||
.get(pre_state_position)
|
|
||||||
.and_then(InputAccountIdentity::private_pda_address);
|
|
||||||
let matched_caller_seed: Option<(PdaSeed, bool, ProgramId)> =
|
let matched_caller_seed: Option<(PdaSeed, bool, ProgramId)> =
|
||||||
caller_program_id.and_then(|caller| {
|
caller_program_id.and_then(|caller| {
|
||||||
|
let pda_address = account_identities
|
||||||
|
.get(pre_state_position)
|
||||||
|
.and_then(InputAccountIdentity::private_pda_address);
|
||||||
caller_pda_seeds.iter().find_map(|seed| {
|
caller_pda_seeds.iter().find_map(|seed| {
|
||||||
if AccountId::for_public_pda(&caller, seed) == pre_account_id {
|
if AccountId::for_public_pda(&caller, seed) == pre_account_id {
|
||||||
return Some((*seed, false, caller));
|
return Some((*seed, false, caller));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user