[validation] look up transaction by txid

GetIter takes a txid, not wtxid.
This commit is contained in:
glozow
2022-01-21 12:40:59 +00:00
parent bd482b3ffe
commit 5ae187f876
2 changed files with 12 additions and 1 deletions

View File

@@ -1306,7 +1306,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptPackage(const Package& package,
// we know is that the inputs aren't available.
if (m_pool.exists(GenTxid::Wtxid(wtxid))) {
// Exact transaction already exists in the mempool.
auto iter = m_pool.GetIter(wtxid);
auto iter = m_pool.GetIter(txid);
assert(iter != std::nullopt);
results.emplace(wtxid, MempoolAcceptResult::MempoolTx(iter.value()->GetTxSize(), iter.value()->GetFee()));
} else if (m_pool.exists(GenTxid::Txid(txid))) {