aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.cpp
diff options
context:
space:
mode:
authorinstagibbs <gsanders87@gmail.com>2016-05-06 12:53:23 -0400
committerinstagibbs <gsanders87@gmail.com>2016-05-06 12:53:23 -0400
commitaddb9d2a092b4fd0384d4ff82e9607e5411eab97 (patch)
tree97082670482b54c5c5bad2c85e952b787cf5c2f3 /src/rpc/blockchain.cpp
parentfbd84788e676c9cbd126f6236ec46bb2f342bd00 (diff)
downloadbitcoin-addb9d2a092b4fd0384d4ff82e9607e5411eab97.tar.xz
Remove state arg from ReconsiderBlock
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 6960415e2e..d221012afa 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);
+ ReconsiderBlock(pblockindex);
}
- if (state.IsValid()) {
- ActivateBestChain(state, Params());
- }
+ CValidationState state;
+ ActivateBestChain(state, Params());
if (!state.IsValid()) {
throw JSONRPCError(RPC_DATABASE_ERROR, state.GetRejectReason());