mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add transactions_iter helper (#13910)
This commit is contained in:
@ -226,7 +226,7 @@ where
|
||||
let parent_hash = block.parent_hash();
|
||||
|
||||
// sort the functions by ascending effective tip first
|
||||
let sorted_transactions = block.body().transactions().iter().sorted_by_cached_key(|tx| {
|
||||
let sorted_transactions = block.body().transactions_iter().sorted_by_cached_key(|tx| {
|
||||
if let Some(base_fee) = base_fee_per_gas {
|
||||
(*tx).effective_tip_per_gas(base_fee)
|
||||
} else {
|
||||
|
||||
@ -108,7 +108,7 @@ pub fn convert_block_to_payload_field_v2<T: SignedTransaction>(
|
||||
pub fn convert_to_payload_body_v1(
|
||||
value: impl reth_primitives_traits::Block,
|
||||
) -> ExecutionPayloadBodyV1 {
|
||||
let transactions = value.body().transactions().iter().map(|tx| tx.encoded_2718().into());
|
||||
let transactions = value.body().transactions_iter().map(|tx| tx.encoded_2718().into());
|
||||
ExecutionPayloadBodyV1 {
|
||||
transactions: transactions.collect(),
|
||||
withdrawals: value.body().withdrawals().cloned().map(Withdrawals::into_inner),
|
||||
|
||||
Reference in New Issue
Block a user