mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: ensure peer exists b4 marking txs as received (#7998)
This commit is contained in:
@ -945,14 +945,13 @@ where
|
||||
return
|
||||
}
|
||||
|
||||
let Some(peer) = self.peers.get_mut(&peer_id) else { return };
|
||||
let mut transactions = transactions.0;
|
||||
|
||||
// mark the transactions as received
|
||||
self.transaction_fetcher
|
||||
.remove_hashes_from_transaction_fetcher(transactions.iter().map(|tx| *tx.hash()));
|
||||
|
||||
let Some(peer) = self.peers.get_mut(&peer_id) else { return };
|
||||
|
||||
// track that the peer knows these transaction, but only if this is a new broadcast.
|
||||
// If we received the transactions as the response to our `GetPooledTransactions``
|
||||
// requests (based on received `NewPooledTransactionHashes`) then we already
|
||||
|
||||
Reference in New Issue
Block a user