From b53041021abc4f9ee7203341413e8676e2d5a7ca Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Mon, 14 Oct 2024 10:27:27 -0400 Subject: [PATCH] Duplicate transactions are not permitted within a changeset --- src/txmempool.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/txmempool.cpp b/src/txmempool.cpp index ecba5ca3e2c..6d2920ece51 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -1411,6 +1411,7 @@ util::Result, std::vector>> CTxMemPool:: CTxMemPool::ChangeSet::TxHandle CTxMemPool::ChangeSet::StageAddition(const CTransactionRef& tx, const CAmount fee, int64_t time, unsigned int entry_height, uint64_t entry_sequence, bool spends_coinbase, int64_t sigops_cost, LockPoints lp) { + Assume(m_to_add.find(tx->GetHash()) == m_to_add.end()); auto newit = m_to_add.emplace(tx, fee, time, entry_height, entry_sequence, spends_coinbase, sigops_cost, lp).first; m_entry_vec.push_back(newit); return newit;