feat: use alloy Signature type (#10758)

Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This commit is contained in:
Aurélien
2024-09-23 15:29:48 +02:00
committed by GitHub
parent fba837468c
commit 15aee9b144
30 changed files with 537 additions and 709 deletions

View File

@ -13,7 +13,7 @@ use reth_primitives::{
constants::{EIP1559_INITIAL_BASE_FEE, EMPTY_ROOT_HASH},
proofs::{calculate_receipt_root, calculate_transaction_root, calculate_withdrawals_root},
Header, Receipt, Receipts, Requests, SealedBlock, SealedBlockWithSenders, SealedHeader,
Signature, Transaction, TransactionSigned, TransactionSignedEcRecovered, TxEip1559,
Transaction, TransactionSigned, TransactionSignedEcRecovered, TxEip1559,
};
use reth_trie::{root::state_root_unhashed, updates::TrieUpdates, HashedPostState};
use revm::{db::BundleState, primitives::AccountInfo};
@ -98,15 +98,8 @@ impl TestBlockBuilder {
let signature_hash = tx.signature_hash();
let signature = self.signer_pk.sign_hash_sync(&signature_hash).unwrap();
TransactionSigned::from_transaction_and_signature(
tx,
Signature {
r: signature.r(),
s: signature.s(),
odd_y_parity: signature.v().y_parity(),
},
)
.with_signer(self.signer)
TransactionSigned::from_transaction_and_signature(tx, signature)
.with_signer(self.signer)
};
let num_txs = rng.gen_range(0..5);