diff --git a/src/txorphanage.h b/src/txorphanage.h --- a/src/txorphanage.h +++ b/src/txorphanage.h @@ -23,7 +23,7 @@ size_t list_pos; }; -int EraseOrphanTx(TxId id) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); +int EraseOrphanTx(const TxId &txid) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); void EraseOrphansFor(NodeId peer); unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans); diff --git a/src/txorphanage.cpp b/src/txorphanage.cpp --- a/src/txorphanage.cpp +++ b/src/txorphanage.cpp @@ -24,8 +24,8 @@ std::vector::iterator> g_orphan_list GUARDED_BY(g_cs_orphans); -int EraseOrphanTx(TxId id) { - std::map::iterator it = mapOrphanTransactions.find(id); +int EraseOrphanTx(const TxId &txid) { + std::map::iterator it = mapOrphanTransactions.find(txid); if (it == mapOrphanTransactions.end()) { return 0; }