Skip to content

Commit

Permalink
increase maximum spending transactions per block to 5 since block 58500
Browse files Browse the repository at this point in the history
  • Loading branch information
insomp committed Oct 16, 2017
1 parent 89f9179 commit 2a9d2a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn)
if(fTestNet || nHeight > 22000){
MAX_SPEND_ZC_TX_PER_BLOCK = 1;
}
if(fTestNet || nHeight > 58500){
MAX_SPEND_ZC_TX_PER_BLOCK = 5;
}

// Collect memory pool transactions into the block
CTxMemPool::setEntries inBlock;
Expand Down Expand Up @@ -943,6 +946,9 @@ void BlockAssembler::addPriorityTxs()
if (nHeight + 1 > 22000) {
MAX_SPEND_ZC_TX_PER_BLOCK = 1;
}
if (nHeight + 1 > 58500) {
MAX_SPEND_ZC_TX_PER_BLOCK = 5;
}

vecPriority.reserve(mempool.mapTx.size());
for (CTxMemPool::indexed_transaction_set::iterator mi = mempool.mapTx.begin();
Expand Down
4 changes: 4 additions & 0 deletions src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,10 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
if(chainActive.Height() + 1 > 22000){
MAX_SPEND_ZC_TX_PER_BLOCK = 1;
}

if(chainActive.Height() + 1 > 58500){
MAX_SPEND_ZC_TX_PER_BLOCK = 5;
}
BOOST_FOREACH (CTransaction& tx, pblock->vtx) {
uint256 txHash = tx.GetHash();
setTxIndex[txHash] = i++;
Expand Down

0 comments on commit 2a9d2a2

Please sign in to comment.