mempool: Remove duplicate consensusBranchId from AcceptToMemoryPool
This commit is contained in:
parent
6bec5685b6
commit
4441b7bcb4
10
src/main.cpp
10
src/main.cpp
|
@ -1327,6 +1327,8 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
|||
*pfMissingInputs = false;
|
||||
|
||||
int nextBlockHeight = chainActive.Height() + 1;
|
||||
|
||||
// Grab the branch ID we expect this transaction to commit to.
|
||||
auto consensusBranchId = CurrentEpochBranchId(nextBlockHeight, Params().GetConsensus());
|
||||
|
||||
if (pool.IsRecentlyEvicted(tx.GetHash())) {
|
||||
|
@ -1475,11 +1477,9 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
|||
}
|
||||
}
|
||||
|
||||
// Grab the branch ID we expect this transaction to commit to. We don't
|
||||
// yet know if it does, but if the entry gets added to the mempool, then
|
||||
// it has passed ContextualCheckInputs and therefore this is correct.
|
||||
auto consensusBranchId = CurrentEpochBranchId(chainActive.Height() + 1, Params().GetConsensus());
|
||||
|
||||
// We don't yet know if the transaction commits to consensusBranchId,
|
||||
// but if the entry gets added to the mempool, then it has passed
|
||||
// ContextualCheckInputs and therefore this is correct.
|
||||
CTxMemPoolEntry entry(tx, nFees, GetTime(), dPriority, chainActive.Height(), mempool.HasNoInputsOf(tx), fSpendsCoinbase, consensusBranchId);
|
||||
unsigned int nSize = entry.GetTxSize();
|
||||
|
||||
|
|
Loading…
Reference in New Issue