Remove state arg from ReconsiderBlock

This commit is contained in:
instagibbs
2016-05-06 12:53:23 -04:00
committed by lateminer
parent 4a2d793f2a
commit 46038d59ea
3 changed files with 5 additions and 7 deletions

View File

@@ -1048,7 +1048,6 @@ UniValue reconsiderblock(const UniValue& params, bool fHelp)
std::string strHash = params[0].get_str();
uint256 hash(uint256S(strHash));
CValidationState state;
{
LOCK(cs_main);
@@ -1056,12 +1055,11 @@ UniValue reconsiderblock(const UniValue& params, bool fHelp)
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
CBlockIndex* pblockindex = mapBlockIndex[hash];
ReconsiderBlock(state, pblockindex);
ReconsiderBlock(pblockindex);
}
if (state.IsValid()) {
ActivateBestChain(state, Params());
}
CValidationState state;
ActivateBestChain(state, Params());
if (!state.IsValid()) {
throw JSONRPCError(RPC_DATABASE_ERROR, state.GetRejectReason());