Skip to content

Commit

Permalink
test: update 7002 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Oct 19, 2024
1 parent 4845fa6 commit 6063dfb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions crates/ethereum/evm/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ mod tests {
database::StateProviderDatabase, test_utils::StateProviderTest, TransitionState,
};
use reth_testing_utils::generators::{self, sign_tx_with_key_pair};
use revm_primitives::{bytes, BLOCKHASH_SERVE_WINDOW};
use revm_primitives::BLOCKHASH_SERVE_WINDOW;
use secp256k1::{Keypair, Secp256k1};
use std::collections::HashMap;

Expand Down Expand Up @@ -1297,9 +1297,11 @@ mod tests {
let receipt = receipts.first().unwrap();
assert!(receipt.success);

let request = requests.first().unwrap();
// TODO: must be empty? @onbjerg
assert_eq!(request, &bytes!("00")); // todo: placeholder
// sha2(sha2(<empty>) + sha2(withdrawal) + sha2(<empy>))

Check failure on line 1300 in crates/ethereum/evm/src/execute.rs

View workflow job for this annotation

GitHub Actions / codespell

empy ==> empty
assert_eq!(
requests.requests_hash(),
b256!("79c24ee3148b0bb6b42f8bb20267efa81d4d7c1c902ab9234bbe0559caf049e5")
);
}

#[test]
Expand Down
10 changes: 6 additions & 4 deletions crates/ethereum/evm/src/strategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ mod tests {
eip7002::{WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, WITHDRAWAL_REQUEST_PREDEPLOY_CODE},
eip7685::EMPTY_REQUESTS_HASH,
};
use alloy_primitives::{b256, bytes, fixed_bytes, keccak256, Bytes, TxKind, B256};
use alloy_primitives::{b256, fixed_bytes, keccak256, Bytes, TxKind, B256};
use reth_chainspec::{ChainSpecBuilder, ForkCondition};
use reth_evm::execute::{
BasicBlockExecutorProvider, BatchExecutor, BlockExecutorProvider, Executor,
Expand Down Expand Up @@ -1085,9 +1085,11 @@ mod tests {
let receipt = receipts.first().unwrap();
assert!(receipt.success);

let request = requests.first().unwrap();
// TODO: must be empty? @onbjerg
assert_eq!(request, &bytes!("00")); // todo: placeholder
// sha2(sha2(<empty>) + sha2(withdrawal) + sha2(<empy>))

Check failure on line 1088 in crates/ethereum/evm/src/strategy.rs

View workflow job for this annotation

GitHub Actions / codespell

empy ==> empty
assert_eq!(
requests.requests_hash(),
b256!("2ace487fc5214e01a812b93b7151f2f118e3236db9343aea2bdc44f9c25a0da8")
);
}

#[test]
Expand Down

0 comments on commit 6063dfb

Please sign in to comment.