aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorJorge Timón <jtimon@jtimon.cc>2015-04-20 00:17:11 +0200
committerJorge Timón <jtimon@jtimon.cc>2015-11-11 13:21:17 +0100
commit598e4945872349ead03ff0cddc87c14b925157ec (patch)
tree24895389627372eadbb9a47e559f596d88cc09c4 /src/rpcmining.cpp
parent3ac70609345a249a74fad61b70f93e8a19245011 (diff)
downloadbitcoin-598e4945872349ead03ff0cddc87c14b925157ec.tar.xz
Chainparams: Explicit CChainParams arg for main (pre miner):
-ProcessNewBlock -TestBlockValidity
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index f42b31627c..2d18792f9e 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -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);
}
}
@@ -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)
{