Skip to content

Commit b530410

Browse files
committed
Duplicate transactions are not permitted within a changeset
1 parent b447416 commit b530410

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/txmempool.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,7 @@ util::Result<std::pair<std::vector<FeeFrac>, std::vector<FeeFrac>>> CTxMemPool::
14111411

14121412
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)
14131413
{
1414+
Assume(m_to_add.find(tx->GetHash()) == m_to_add.end());
14141415
auto newit = m_to_add.emplace(tx, fee, time, entry_height, entry_sequence, spends_coinbase, sigops_cost, lp).first;
14151416
m_entry_vec.push_back(newit);
14161417
return newit;

0 commit comments

Comments
 (0)