Skip to content

Commit

Permalink
Merge pull request #2478 from eqlabs/t00ts/fix-trace-block-txs
Browse files Browse the repository at this point in the history
chore(rpc): fix `test_multiple_transactions` for rpc `v08`
  • Loading branch information
t00ts authored Jan 10, 2025
2 parents f2c2f84 + 8f82ab8 commit 7cbefab
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/rpc/src/method/simulate_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ pub(crate) mod tests {
l1_gas: 0,
l1_data_gas: 192,
},
l1_gas: 0,
l1_gas: 878,
l1_data_gas: 192,
l2_gas: 0,
},
Expand Down Expand Up @@ -1006,7 +1006,7 @@ pub(crate) mod tests {
l1_gas: 0,
l1_data_gas: 224,
},
l1_gas: 0,
l1_gas: 16,
l1_data_gas: 224,
l2_gas: 0,
},
Expand Down Expand Up @@ -1417,7 +1417,7 @@ pub(crate) mod tests {
l1_gas: 0,
l1_data_gas: 128,
},
l1_gas: 0,
l1_gas: 12,
l1_data_gas: 128,
l2_gas: 0,
},
Expand Down Expand Up @@ -1647,7 +1647,10 @@ pub(crate) mod tests {
..Default::default()
},
execution_resources:
pathfinder_executor::types::InnerCallExecutionResources::default(),
pathfinder_executor::types::InnerCallExecutionResources {
l1_gas: 12840,
..Default::default()
},
}],
class_hash: Some(DUMMY_ACCOUNT_CLASS_HASH.0),
entry_point_type: pathfinder_executor::types::EntryPointType::External,
Expand Down
15 changes: 15 additions & 0 deletions crates/rpc/src/method/trace_block_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ pub(crate) mod tests {
include_state_diffs: true,
};

// V07
pretty_assertions_sorted::assert_eq!(
output
.serialize(Serializer {
Expand All @@ -798,6 +799,20 @@ pub(crate) mod tests {
})
.unwrap(),
);

// V08
pretty_assertions_sorted::assert_eq!(
output
.serialize(Serializer {
version: RpcVersion::V08,
})
.unwrap(),
expected
.serialize(Serializer {
version: RpcVersion::V08,
})
.unwrap(),
);
Ok(())
}

Expand Down

0 comments on commit 7cbefab

Please sign in to comment.