mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
rpc: getblocktemplate getTipHash() via Miner interface
This commit is contained in:
parent
d8a3496b5a
commit
404b01c436
3 changed files with 18 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue