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:
Steven
2024-11-21 16:40:29 -06:00
committed by GitHub
parent 6f6fb005ab
commit 4442b5d6fa
29 changed files with 127 additions and 87 deletions

View File

@ -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);