diff options
Diffstat (limited to 'src/miner.cpp')
-rw-r--r-- | src/miner.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index c40b12cd8e..856e9edc14 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -13,7 +13,7 @@ #include "consensus/merkle.h" #include "consensus/validation.h" #include "hash.h" -#include "main.h" +#include "validation.h" #include "net.h" #include "policy/policy.h" #include "pow.h" @@ -84,12 +84,12 @@ BlockAssembler::BlockAssembler(const CChainParams& _chainparams) nBlockMaxWeight = DEFAULT_BLOCK_MAX_WEIGHT; nBlockMaxSize = DEFAULT_BLOCK_MAX_SIZE; bool fWeightSet = false; - if (mapArgs.count("-blockmaxweight")) { + if (IsArgSet("-blockmaxweight")) { nBlockMaxWeight = GetArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT); nBlockMaxSize = MAX_BLOCK_SERIALIZED_SIZE; fWeightSet = true; } - if (mapArgs.count("-blockmaxsize")) { + if (IsArgSet("-blockmaxsize")) { nBlockMaxSize = GetArg("-blockmaxsize", DEFAULT_BLOCK_MAX_SIZE); if (!fWeightSet) { nBlockMaxWeight = nBlockMaxSize * WITNESS_SCALE_FACTOR; @@ -245,7 +245,7 @@ bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& packa BOOST_FOREACH (const CTxMemPool::txiter it, package) { if (!IsFinalTx(it->GetTx(), nHeight, nLockTimeCutoff)) return false; - if (!fIncludeWitness && !it->GetTx().wit.IsNull()) + if (!fIncludeWitness && it->GetTx().HasWitness()) return false; if (fNeedSizeAccounting) { uint64_t nTxSize = ::GetSerializeSize(it->GetTx(), SER_NETWORK, PROTOCOL_VERSION); @@ -554,7 +554,7 @@ void BlockAssembler::addPriorityTxs() } // cannot accept witness transactions into a non-witness block - if (!fIncludeWitness && !iter->GetTx().wit.IsNull()) + if (!fIncludeWitness && iter->GetTx().HasWitness()) continue; // If tx is dependent on other mempool txs which haven't yet been included |