From fdcc4c078de422b61f352ac26dfdb2f2261b5552 Mon Sep 17 00:00:00 2001 From: Jonas Bostoen Date: Mon, 5 May 2025 19:28:50 +0200 Subject: [PATCH] feat(txpool): add authorization list setter to mock transaction (#16068) --- crates/transaction-pool/src/test_utils/mock.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/transaction-pool/src/test_utils/mock.rs b/crates/transaction-pool/src/test_utils/mock.rs index d0f4c4af1b..e45c04a414 100644 --- a/crates/transaction-pool/src/test_utils/mock.rs +++ b/crates/transaction-pool/src/test_utils/mock.rs @@ -482,6 +482,15 @@ impl MockTransaction { self } + /// Sets the authorization list for EIP-7702 transactions. + pub fn set_authorization_list(&mut self, list: Vec) -> &mut Self { + if let Self::Eip7702 { authorization_list, .. } = self { + *authorization_list = list; + } + + self + } + /// Sets the gas price for the transaction. pub const fn set_gas_price(&mut self, val: u128) -> &mut Self { match self {