Skip to content

Commit

Permalink
Fix object mapping offset calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Sep 16, 2024
1 parent 7df5cd8 commit fd369cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/subspace-runtime/src/object_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,16 @@ pub(crate) fn extract_call_block_object_mapping<I: Iterator<Item = Hash>>(
recursion_depth_left: u16,
successful_calls: &mut Peekable<I>,
) {
// Add enum variant to the base offset.
// Add RuntimeCall enum variant to the base offset.
base_offset += 1;

match call {
// Extract the actual object mappings.
RuntimeCall::System(frame_system::Call::remark { remark }) => {
objects.push(BlockObject::V0 {
hash: crypto::blake3_hash(remark),
offset: base_offset,
// Add frame_system::Call enum variant to the base offset.
offset: base_offset + 1,
});
}
// Recursively extract object mappings for the call.
Expand Down

0 comments on commit fd369cb

Please sign in to comment.