chore!: make senders fields private (#13752)

This commit is contained in:
Matthias Seitz
2025-01-09 14:58:09 +01:00
committed by GitHub
parent 66f934b8d0
commit bf65ed45c5
15 changed files with 117 additions and 56 deletions

View File

@@ -426,6 +426,6 @@ pub trait LoadPendingBlock:
results,
);
Ok((SealedBlockWithSenders { block: block.seal_slow(), senders }, receipts))
Ok((SealedBlockWithSenders::new_unchecked(block.seal_slow(), senders), receipts))
}
}

View File

@@ -80,7 +80,7 @@ where
// `from_block_with_transactions`, however we need to compute the length before
let block_length = block.block.length();
let transactions = block.block.body().transactions().to_vec();
let transactions_with_senders = transactions.into_iter().zip(block.senders);
let transactions_with_senders = transactions.into_iter().zip(block.senders_iter().copied());
let transactions = transactions_with_senders
.enumerate()
.map(|(idx, (tx, sender))| {

View File

@@ -115,7 +115,7 @@ where
if self.disallow.contains(&message.proposer_fee_recipient) {
return Err(ValidationApiError::Blacklist(message.proposer_fee_recipient))
}
for (sender, tx) in block.senders.iter().zip(block.transactions()) {
for (sender, tx) in block.senders_iter().zip(block.transactions()) {
if self.disallow.contains(sender) {
return Err(ValidationApiError::Blacklist(*sender))
}