rpc: small refactor in TransactionSource impl (#10704)

This commit is contained in:
Thomas Coratger
2024-09-04 14:31:15 -07:00
committed by GitHub
parent 9e3edcc7e9
commit f82719ff23

View File

@ -40,16 +40,7 @@ impl TransactionSource {
match self {
Self::Pool(tx) => {
let hash = tx.hash();
(
tx,
TransactionInfo {
hash: Some(hash),
index: None,
block_hash: None,
block_number: None,
base_fee: None,
},
)
(tx, TransactionInfo { hash: Some(hash), ..Default::default() })
}
Self::Block { transaction, index, block_hash, block_number, base_fee } => {
let hash = transaction.hash();