Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions crates/flashblocks-rpc/src/pending_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,10 @@ impl PendingBlocks {
let block_transactions: Vec<Transaction> = self.get_transactions_for_block(block_number);

let transactions = if full {
BlockTransactions::Full(block_transactions.clone())
BlockTransactions::Full(block_transactions)
} else {
let tx_hashes: Vec<B256> = block_transactions
.clone()
.iter()
.map(|tx| tx.tx_hash())
.collect();
BlockTransactions::Hashes(tx_hashes.clone())
let tx_hashes: Vec<B256> = block_transactions.iter().map(|tx| tx.tx_hash()).collect();
BlockTransactions::Hashes(tx_hashes)
};

RpcBlock::<Optimism> {
Expand Down
2 changes: 1 addition & 1 deletion crates/flashblocks-rpc/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ where
// If we had a reorg, we need to reset all flashblocks state
let tracked_txns = pending_blocks.get_transactions_for_block(block.number);
let tracked_txn_hashes: HashSet<_> =
tracked_txns.clone().iter().map(|tx| tx.tx_hash()).collect();
tracked_txns.iter().map(|tx| tx.tx_hash()).collect();
let block_txn_hashes: HashSet<_> =
block.body().transactions().map(|tx| tx.tx_hash()).collect();

Expand Down