rpc: getblocktemplate getTipHash() via Miner interface

This commit is contained in:
Sjors Provoost committed 2024-06-18 18:47:51 +02:00
1 parent d8a3496b5a
commit 404b01c436
3 files changed
+18 -7

No files matched your search

+8
View File
@@ -845,6 +845,14 @@ public:
return chainman().GetParams().IsTestChain();
}
uint256 getTipHash() override
{
LOCK(::cs_main);
CBlockIndex* tip{chainman().ActiveChain().Tip()};
if (!tip) return uint256{0};
return tip->GetBlockHash();
}
bool testBlockValidity(BlockValidationState& state, const CBlock& block, bool check_merkle_root) override
{
LOCK(::cs_main);