diff options
author | Pieter Wuille <pieter@wuille.net> | 2020-07-22 19:11:42 -0700 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2020-07-30 13:45:03 -0700 |
commit | 10b7a6d532148f880568c529e61a6d7edc7c91a9 (patch) | |
tree | 92594d393f9231d738fdf8c0e1c98071eb6a3831 /src/txmempool.cpp | |
parent | 5c124e17407a5b5824fec062b73a03a1030fa28c (diff) |
refactor: make txmempool interface use GenTxid
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r-- | src/txmempool.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 1d9f6a4a46..de1a3ec68f 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -811,15 +811,17 @@ CTransactionRef CTxMemPool::get(const uint256& hash) const return i->GetSharedTx(); } -TxMempoolInfo CTxMemPool::info(const uint256& hash, bool wtxid) const +TxMempoolInfo CTxMemPool::info(const GenTxid& gtxid) const { LOCK(cs); - indexed_transaction_set::const_iterator i = (wtxid ? get_iter_from_wtxid(hash) : mapTx.find(hash)); + indexed_transaction_set::const_iterator i = (gtxid.IsWtxid() ? get_iter_from_wtxid(gtxid.GetHash()) : mapTx.find(gtxid.GetHash())); if (i == mapTx.end()) return TxMempoolInfo(); return GetInfo(i); } +TxMempoolInfo CTxMemPool::info(const uint256& txid) const { return info(GenTxid{false, txid}); } + void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeDelta) { { |