diff options
author | glozow <gloriajzhao@gmail.com> | 2024-05-10 10:55:39 +0100 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2024-05-14 10:32:27 +0100 |
commit | efcc5930175f31b685adb4627a038d9f0848eb1f (patch) | |
tree | 2437c1e04f26b3475591148c14b0635c2e7b1159 /src/txorphanage.cpp | |
parent | 7e475b9648bbee04f5825b922ba0399373eaa5a9 (diff) |
[refactor] TxOrphanage::HaveTx only by wtxid
Diffstat (limited to 'src/txorphanage.cpp')
-rw-r--r-- | src/txorphanage.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/txorphanage.cpp b/src/txorphanage.cpp index 82206e56c3..e10f01c693 100644 --- a/src/txorphanage.cpp +++ b/src/txorphanage.cpp @@ -169,14 +169,10 @@ void TxOrphanage::AddChildrenToWorkSet(const CTransaction& tx) } } -bool TxOrphanage::HaveTx(const GenTxid& gtxid) const +bool TxOrphanage::HaveTx(const Wtxid& wtxid) const { LOCK(m_mutex); - if (gtxid.IsWtxid()) { - return m_wtxid_to_orphan_it.count(Wtxid::FromUint256(gtxid.GetHash())); - } else { - return m_orphans.count(Txid::FromUint256(gtxid.GetHash())); - } + return m_wtxid_to_orphan_it.count(wtxid); } CTransactionRef TxOrphanage::GetTxToReconsider(NodeId peer) |