This commit is contained in:
jl777
2016-11-08 14:38:38 -03:00
parent 359151495a
commit 0be151df27

View File

@@ -207,7 +207,7 @@ Value generate(const Array& params, bool fHelp)
} }
endloop: endloop:
CValidationState state; CValidationState state;
if (!ProcessNewBlock(chainActive->Tip()->nHeight+1,state, NULL, pblock, true, NULL)) if (!ProcessNewBlock(chainActive.Tip()->nHeight+1,state, NULL, pblock, true, NULL))
throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted"); throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted");
minedBlocks.increment(); minedBlocks.increment();
++nHeight; ++nHeight;
@@ -716,7 +716,7 @@ Value submitblock(const Array& params, bool fHelp)
CValidationState state; CValidationState state;
submitblock_StateCatcher sc(block.GetHash()); submitblock_StateCatcher sc(block.GetHash());
RegisterValidationInterface(&sc); RegisterValidationInterface(&sc);
bool fAccepted = ProcessNewBlock(chainActive->Tip()->nHeight+1,state, NULL, &block, true, NULL); bool fAccepted = ProcessNewBlock(chainActive.Tip()->nHeight+1,state, NULL, &block, true, NULL);
UnregisterValidationInterface(&sc); UnregisterValidationInterface(&sc);
if (fBlockPresent) if (fBlockPresent)
{ {