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