Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ercecan committed Oct 2, 2024
1 parent 89404fc commit 881333d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 6 additions & 6 deletions bin/citrea/tests/evm/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ async fn tracing_tests() -> Result<(), Box<dyn std::error::Error>> {
// It was replaced with the gas limit in our trace.
let reth_json = serde_json::from_value::<CallFrame>(json![{
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"gas": "0x679c",
"gas": "0x6a7d",
"gasUsed": "0xba65",
"to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
"input": "0xb7d5b6580000000000000000000000005fbdb2315678afecb367f032d93f642f64180aa30000000000000000000000000000000000000000000000000000000000000003",
"calls": [
{
"from": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
"gas": "0x5833",
"gas": "0x5b09",
"gasUsed": "0x57f2",
"to": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
"input": "0x60fe47b10000000000000000000000000000000000000000000000000000000000000003",
Expand Down Expand Up @@ -178,7 +178,7 @@ async fn tracing_tests() -> Result<(), Box<dyn std::error::Error>> {
.await;

let expected_send_eth_trace = serde_json::from_value::<CallFrame>(
json![{"from":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","gas":"0x1","gasUsed":"0x5208",
json![{"from":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","gas":"0x1d1","gasUsed":"0x5208",
"to":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92255","input":"0x","value":"0x4563918244f40000","type":"CALL"}],
).unwrap();
assert_eq!(send_eth_trace, CallTracer(expected_send_eth_trace.clone()));
Expand Down Expand Up @@ -207,11 +207,11 @@ async fn tracing_tests() -> Result<(), Box<dyn std::error::Error>> {
);

let expected_call_get_trace = serde_json::from_value::<CallFrame>(
json![{"from":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","gas":"0x1886","gasUsed":"0x6b64","to":"0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
json![{"from":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","gas":"0x19c7","gasUsed":"0x6b64","to":"0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
"input":"0x35c152bd0000000000000000000000005fbdb2315678afecb367f032d93f642f64180aa3",
"output":"0x0000000000000000000000000000000000000000000000000000000000000000",
"calls":[{"from":"0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
"gas":"0xc3e","gasUsed":"0x996","to":"0x5fbdb2315678afecb367f032d93f642f64180aa3",
"gas":"0xd7a","gasUsed":"0x996","to":"0x5fbdb2315678afecb367f032d93f642f64180aa3",
"input":"0x6d4ce63c","output":"0x0000000000000000000000000000000000000000000000000000000000000003","type":"STATICCALL"}],
"value":"0x0","type":"CALL"}],
).unwrap();
Expand Down Expand Up @@ -291,7 +291,7 @@ async fn tracing_tests() -> Result<(), Box<dyn std::error::Error>> {
.await;

let expected_top_call_only_call_get_trace = serde_json::from_value::<CallFrame>(
json![{"from":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","gas":"0x1886","gasUsed":"0x6b64","to":"0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
json![{"from":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","gas":"0x19c7","gasUsed":"0x6b64","to":"0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
"input":"0x35c152bd0000000000000000000000005fbdb2315678afecb367f032d93f642f64180aa3",
"output":"0x0000000000000000000000000000000000000000000000000000000000000000",
"calls":[],
Expand Down
4 changes: 1 addition & 3 deletions crates/evm/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use alloy_eips::eip2930::AccessListWithGasUsed;
use alloy_primitives::Uint;
use alloy_rlp::Encodable;
use jsonrpsee::core::RpcResult;
use reth_primitives::constants::GWEI_TO_WEI;
use reth_primitives::TxKind::{Call, Create};
use reth_primitives::{
Block, BlockId, BlockNumberOrTag, SealedHeader, TransactionSignedEcRecovered, U256, U64,
Expand Down Expand Up @@ -38,9 +37,8 @@ use crate::evm::call::prepare_call_env;
use crate::evm::db::EvmDb;
use crate::evm::primitive_types::{BlockEnv, Receipt, SealedBlock, TransactionSignedAndRecovered};
use crate::evm::DbAccount;
use crate::handler::TxInfo;
use crate::handler::{
ACCOUNT_DISCOUNTED_PERCENTAGE, DB_ACCOUNT_KEY_SIZE, DB_ACCOUNT_SIZE_EOA,
TxInfo, ACCOUNT_DISCOUNTED_PERCENTAGE, DB_ACCOUNT_KEY_SIZE, DB_ACCOUNT_SIZE_EOA,
NONCE_DISCOUNTED_PERCENTAGE,
};
use crate::rpc_helpers::*;
Expand Down

0 comments on commit 881333d

Please sign in to comment.