mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
FIX: Account for txs already added to block in addPriorityTxs
This commit is contained in:
parent
4dc94d1036
commit
a278764748
1 changed files with 6 additions and 1 deletions
|
@ -74,7 +74,7 @@ int64_t UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParam
|
|||
BlockAssembler::BlockAssembler(const CChainParams& _chainparams)
|
||||
: chainparams(_chainparams)
|
||||
{
|
||||
// Largest block you're willing to create:
|
||||
// Largest block you're willing to create:
|
||||
nBlockMaxSize = GetArg("-blockmaxsize", DEFAULT_BLOCK_MAX_SIZE);
|
||||
// Limit to between 1K and MAX_BLOCK_SIZE-1K for sanity:
|
||||
nBlockMaxSize = std::max((unsigned int)1000, std::min((unsigned int)(MAX_BLOCK_SIZE-1000), nBlockMaxSize));
|
||||
|
@ -262,6 +262,11 @@ void BlockAssembler::addScoreTxs()
|
|||
clearedTxs.pop();
|
||||
}
|
||||
|
||||
// If tx already in block, skip (added by addPriorityTxs)
|
||||
if (inBlock.count(iter)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// If tx is dependent on other mempool txs which haven't yet been included
|
||||
// then put it in the waitSet
|
||||
if (isStillDependent(iter)) {
|
||||
|
|
Loading…
Reference in a new issue