diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-05-10 12:43:19 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-05-10 12:43:22 +0200 |
| commit | f7a21dae5dbf71d5bc00485215e84e6f2b309d0a (patch) | |
| tree | 680a7f6957c4e38ac154cebda6e41c7f0fc4dd55 /src/rpc/blockchain.cpp | |
| parent | Merge #8016: Fix multithread CScheduler and reenable test (diff) | |
| parent | Rename ReconsiderBlock func to reflect real behavior (diff) | |
| download | discoin-f7a21dae5dbf71d5bc00485215e84e6f2b309d0a.tar.xz discoin-f7a21dae5dbf71d5bc00485215e84e6f2b309d0a.zip | |
Merge #8019: Remove state arg from ReconsiderBlock, rename to ResetBlockFailureFlags
657e07e Rename ReconsiderBlock func to reflect real behavior (instagibbs)
addb9d2 Remove state arg from ReconsiderBlock (instagibbs)
Diffstat (limited to 'src/rpc/blockchain.cpp')
| -rw-r--r-- | src/rpc/blockchain.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 6960415e2..cf3c73c4d 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -973,7 +973,6 @@ UniValue reconsiderblock(const UniValue& params, bool fHelp) std::string strHash = params[0].get_str(); uint256 hash(uint256S(strHash)); - CValidationState state; { LOCK(cs_main); @@ -981,12 +980,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); + ResetBlockFailureFlags(pblockindex); } - if (state.IsValid()) { - ActivateBestChain(state, Params()); - } + CValidationState state; + ActivateBestChain(state, Params()); if (!state.IsValid()) { throw JSONRPCError(RPC_DATABASE_ERROR, state.GetRejectReason()); |