Skip to content

Commit 3c756f1

Browse files
committed
feat(executor): add missing libraries to compute phase result
1 parent d8ca333 commit 3c756f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/models/transaction/phases.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ impl Store for ComputePhase {
6868
ok!(builder.store_u32(phase.vm_steps));
6969
ok!(builder.store_u256(&phase.vm_init_state_hash));
7070
ok!(builder.store_u256(&phase.vm_final_state_hash));
71+
ok!(phase.missing_library.store_into(&mut builder, context));
7172
ok!(builder.build_ext(context))
7273
};
7374

@@ -107,6 +108,7 @@ impl<'a> Load<'a> for ComputePhase {
107108
vm_steps: ok!(slice.load_u32()),
108109
vm_init_state_hash: ok!(slice.load_u256()),
109110
vm_final_state_hash: ok!(slice.load_u256()),
111+
missing_library: ok!(Option::<HashBytes>::load_from(slice)),
110112
}))
111113
}
112114
}
@@ -141,6 +143,8 @@ pub struct ExecutedComputePhase {
141143
pub vm_init_state_hash: HashBytes,
142144
/// Hash of the VM state after executing this phase.
143145
pub vm_final_state_hash: HashBytes,
146+
/// Hash of the library which was missing during execution.
147+
pub missing_library: Option<HashBytes>,
144148
}
145149

146150
/// Skipped compute phase info.

0 commit comments

Comments
 (0)