diff options
| author | Gregory Maxwell <[email protected]> | 2015-11-16 16:54:11 -0800 |
|---|---|---|
| committer | Gregory Maxwell <[email protected]> | 2015-11-16 17:00:11 -0800 |
| commit | 87ee0e2dbc1201a5104d524ace32c0134ead019f (patch) | |
| tree | 963d972d2e698da6860862612a5dbebd7f7a23d9 /src/test/test_bitcoin.cpp | |
| parent | Merge pull request #6999 (diff) | |
| parent | Chainparams: Explicit CChainParams arg for miner: (diff) | |
| download | discoin-87ee0e2dbc1201a5104d524ace32c0134ead019f.tar.xz discoin-87ee0e2dbc1201a5104d524ace32c0134ead019f.zip | |
Merge pull request #6986
6bc9e40 Chainparams: Explicit CChainParams arg for miner: (Jorge Timón)
598e494 Chainparams: Explicit CChainParams arg for main (pre miner): (Jorge Timón)
Diffstat (limited to 'src/test/test_bitcoin.cpp')
| -rw-r--r-- | src/test/test_bitcoin.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 23e5e66d8..319e63ba5 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -114,7 +114,8 @@ TestChain100Setup::TestChain100Setup() : TestingSetup(CBaseChainParams::REGTEST) CBlock TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>& txns, const CScript& scriptPubKey) { - CBlockTemplate *pblocktemplate = CreateNewBlock(scriptPubKey); + const CChainParams& chainparams = Params(); + CBlockTemplate *pblocktemplate = CreateNewBlock(chainparams, scriptPubKey); CBlock& block = pblocktemplate->block; // Replace mempool-selected txns with just coinbase plus passed-in txns: @@ -125,10 +126,10 @@ TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>& unsigned int extraNonce = 0; IncrementExtraNonce(&block, chainActive.Tip(), extraNonce); - while (!CheckProofOfWork(block.GetHash(), block.nBits, Params(CBaseChainParams::REGTEST).GetConsensus())) ++block.nNonce; + while (!CheckProofOfWork(block.GetHash(), block.nBits, chainparams.GetConsensus())) ++block.nNonce; CValidationState state; - ProcessNewBlock(state, NULL, &block, true, NULL); + ProcessNewBlock(state, chainparams, NULL, &block, true, NULL); CBlock result = block; delete pblocktemplate; |