aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-05-10 12:43:19 +0200
committerWladimir J. van der Laan <[email protected]>2016-05-10 12:43:22 +0200
commitf7a21dae5dbf71d5bc00485215e84e6f2b309d0a (patch)
tree680a7f6957c4e38ac154cebda6e41c7f0fc4dd55 /src/rpc/blockchain.cpp
parentMerge #8016: Fix multithread CScheduler and reenable test (diff)
parentRename ReconsiderBlock func to reflect real behavior (diff)
downloaddiscoin-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.cpp8
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());