mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: convert hash field to OnceLock<TxHash> on TransactionSigned (#12596)
Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com>
This commit is contained in:
@ -991,9 +991,9 @@ fn import_transactions(&mut self, peer_id: PeerId, transactions: Vec<Transaction
|
||||
};
|
||||
|
||||
// track that the peer knows this transaction
|
||||
peer.transactions.insert(tx.hash);
|
||||
peer.transactions.insert(tx.hash());
|
||||
|
||||
match self.transactions_by_peers.entry(tx.hash) {
|
||||
match self.transactions_by_peers.entry(tx.hash()) {
|
||||
Entry::Occupied(mut entry) => {
|
||||
// transaction was already inserted
|
||||
entry.get_mut().push(peer_id);
|
||||
|
||||
Reference in New Issue
Block a user