mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: make optypedtx fields private (#14065)
This commit is contained in:
@ -136,7 +136,7 @@ impl PoolTransaction for OpPooledTransaction {
|
||||
}
|
||||
|
||||
fn max_fee_per_gas(&self) -> u128 {
|
||||
self.inner.transaction.transaction.max_fee_per_gas()
|
||||
self.inner.transaction.max_fee_per_gas()
|
||||
}
|
||||
|
||||
fn access_list(&self) -> Option<&AccessList> {
|
||||
@ -144,7 +144,7 @@ impl PoolTransaction for OpPooledTransaction {
|
||||
}
|
||||
|
||||
fn max_priority_fee_per_gas(&self) -> Option<u128> {
|
||||
self.inner.transaction.transaction.max_priority_fee_per_gas()
|
||||
self.inner.transaction.max_priority_fee_per_gas()
|
||||
}
|
||||
|
||||
fn max_fee_per_blob_gas(&self) -> Option<u128> {
|
||||
@ -172,7 +172,7 @@ impl PoolTransaction for OpPooledTransaction {
|
||||
}
|
||||
|
||||
fn size(&self) -> usize {
|
||||
self.inner.transaction.transaction.input().len()
|
||||
self.inner.transaction.input().len()
|
||||
}
|
||||
|
||||
fn tx_type(&self) -> u8 {
|
||||
@ -220,7 +220,7 @@ impl EthPoolTransaction for OpPooledTransaction {
|
||||
}
|
||||
|
||||
fn authorization_count(&self) -> usize {
|
||||
match &self.inner.transaction.transaction {
|
||||
match self.inner.transaction.transaction() {
|
||||
OpTypedTransaction::Eip7702(tx) => tx.authorization_list.len(),
|
||||
_ => 0,
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ async fn test_custom_block_priority_config() {
|
||||
|
||||
// Check that last transaction in the block looks like a transfer to a random address.
|
||||
let end_of_block_tx = block_payload.body().transactions.last().unwrap();
|
||||
let OpTypedTransaction::Eip1559(end_of_block_tx) = &end_of_block_tx.transaction else {
|
||||
let OpTypedTransaction::Eip1559(end_of_block_tx) = end_of_block_tx.transaction() else {
|
||||
panic!("expected EIP-1559 transaction");
|
||||
};
|
||||
assert_eq!(end_of_block_tx.nonce, 1);
|
||||
|
||||
Reference in New Issue
Block a user