Skip to content

Commit a47a668

Browse files
Adrian Nagysebastiencs
authored andcommitted
fix: look for vk in the command when not found in the cache
1 parent 28c31d9 commit a47a668

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ledger/src/scan_state/transaction_logic.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4181,6 +4181,12 @@ pub mod zkapp_command {
41814181
cache
41824182
.find(account_id, &vk_hash)
41834183
.cloned()
4184+
.or_else(|| {
4185+
cmd.extract_vks()
4186+
.iter()
4187+
.find(|(id, _)| account_id == id)
4188+
.map(|(_, key)| key.clone())
4189+
})
41844190
.ok_or_else(|| "verification key not found in cache".to_string())
41854191
})?;
41864192
if !is_failed {

0 commit comments

Comments
 (0)