diff --git a/src/txorphanage.cpp b/src/txorphanage.cpp index fb0391468..d418ed932 100644 --- a/src/txorphanage.cpp +++ b/src/txorphanage.cpp @@ -22,9 +22,9 @@ std::map::iterator> g_orphans_by_wtxid GUA std::vector::iterator> g_orphan_list GUARDED_BY(g_cs_orphans); -int EraseOrphanTx(uint256 hash) +int EraseOrphanTx(const uint256& txid) { - std::map::iterator it = mapOrphanTransactions.find(hash); + std::map::iterator it = mapOrphanTransactions.find(txid); if (it == mapOrphanTransactions.end()) return 0; for (const CTxIn& txin : it->second.tx->vin) diff --git a/src/txorphanage.h b/src/txorphanage.h index d97b4b1f4..343f12c9c 100644 --- a/src/txorphanage.h +++ b/src/txorphanage.h @@ -23,7 +23,7 @@ struct COrphanTx { size_t list_pos; }; -int EraseOrphanTx(uint256 hash) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); +int EraseOrphanTx(const uint256& txid) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); void EraseOrphansFor(NodeId peer); unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans);