aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorGregory Maxwell <[email protected]>2015-11-16 16:54:11 -0800
committerGregory Maxwell <[email protected]>2015-11-16 17:00:11 -0800
commit87ee0e2dbc1201a5104d524ace32c0134ead019f (patch)
tree963d972d2e698da6860862612a5dbebd7f7a23d9 /src/rpcmining.cpp
parentMerge pull request #6999 (diff)
parentChainparams: Explicit CChainParams arg for miner: (diff)
downloaddiscoin-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/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index f42b31627..3fd07fc37 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -157,7 +157,7 @@ UniValue generate(const UniValue& params, bool fHelp)
UniValue blockHashes(UniValue::VARR);
while (nHeight < nHeightEnd)
{
- auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlock(coinbaseScript->reserveScript));
+ auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlock(Params(), coinbaseScript->reserveScript));
if (!pblocktemplate.get())
throw JSONRPCError(RPC_INTERNAL_ERROR, "Couldn't create new block");
CBlock *pblock = &pblocktemplate->block;
@@ -171,7 +171,7 @@ UniValue generate(const UniValue& params, bool fHelp)
++pblock->nNonce;
}
CValidationState state;
- if (!ProcessNewBlock(state, NULL, pblock, true, NULL))
+ if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL))
throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted");
++nHeight;
blockHashes.push_back(pblock->GetHash().GetHex());
@@ -426,7 +426,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
if (block.hashPrevBlock != pindexPrev->GetBlockHash())
return "inconclusive-not-best-prevblk";
CValidationState state;
- TestBlockValidity(state, block, pindexPrev, false, true);
+ TestBlockValidity(state, Params(), block, pindexPrev, false, true);
return BIP22ValidationResult(state);
}
}
@@ -510,7 +510,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
pblocktemplate = NULL;
}
CScript scriptDummy = CScript() << OP_TRUE;
- pblocktemplate = CreateNewBlock(scriptDummy);
+ pblocktemplate = CreateNewBlock(Params(), scriptDummy);
if (!pblocktemplate)
throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory");
@@ -652,7 +652,7 @@ UniValue submitblock(const UniValue& params, bool fHelp)
CValidationState state;
submitblock_StateCatcher sc(block.GetHash());
RegisterValidationInterface(&sc);
- bool fAccepted = ProcessNewBlock(state, NULL, &block, true, NULL);
+ bool fAccepted = ProcessNewBlock(state, Params(), NULL, &block, true, NULL);
UnregisterValidationInterface(&sc);
if (fBlockPresent)
{