mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
rpc: call TestBlockValidity via miner interface
This commit is contained in:
parent
8ecb681678
commit
d8a3496b5a
4 changed files with 31 additions and 7 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include <chain.h>
|
||||
#include <chainparams.h>
|
||||
#include <common/args.h>
|
||||
#include <consensus/validation.h>
|
||||
#include <deploymentstatus.h>
|
||||
#include <external_signer.h>
|
||||
#include <index/blockfilterindex.h>
|
||||
|
|
@ -844,6 +845,12 @@ public:
|
|||
return chainman().GetParams().IsTestChain();
|
||||
}
|
||||
|
||||
bool testBlockValidity(BlockValidationState& state, const CBlock& block, bool check_merkle_root) override
|
||||
{
|
||||
LOCK(::cs_main);
|
||||
return TestBlockValidity(state, chainman().GetParams(), chainman().ActiveChainstate(), block, chainman().ActiveChain().Tip(), /*fCheckPOW=*/false, check_merkle_root);
|
||||
}
|
||||
|
||||
NodeContext* context() override { return &m_node; }
|
||||
ChainstateManager& chainman() { return *Assert(m_node.chainman); }
|
||||
NodeContext& m_node;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue