mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-06 18:53:21 +01:00
rpc: getblocktemplate getTipHash() via Miner interface
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user