mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
[validation] Add CValidationState subclasses
Split CValidationState into TxValidationState and BlockValidationState to store validation results for transactions and blocks respectively.
This commit is contained in:
@@ -1470,7 +1470,7 @@ static UniValue preciousblock(const JSONRPCRequest& request)
|
||||
}
|
||||
}
|
||||
|
||||
CValidationState state;
|
||||
BlockValidationState state;
|
||||
PreciousBlock(state, Params(), pblockindex);
|
||||
|
||||
if (!state.IsValid()) {
|
||||
@@ -1495,7 +1495,7 @@ static UniValue invalidateblock(const JSONRPCRequest& request)
|
||||
}.Check(request);
|
||||
|
||||
uint256 hash(ParseHashV(request.params[0], "blockhash"));
|
||||
CValidationState state;
|
||||
BlockValidationState state;
|
||||
|
||||
CBlockIndex* pblockindex;
|
||||
{
|
||||
@@ -1545,7 +1545,7 @@ static UniValue reconsiderblock(const JSONRPCRequest& request)
|
||||
ResetBlockFailureFlags(pblockindex);
|
||||
}
|
||||
|
||||
CValidationState state;
|
||||
BlockValidationState state;
|
||||
ActivateBestChain(state, Params());
|
||||
|
||||
if (!state.IsValid()) {
|
||||
|
||||
Reference in New Issue
Block a user