Merge b2a6b02161 into merged_master (Bitcoin PR #15948)

This commit is contained in:
Andrew Poelstra 2020-10-29 02:34:48 +00:00
commit c91184f6c2
28 changed files with 312 additions and 309 deletions

View file

@ -178,13 +178,13 @@ public:
int getNumBlocks() override
{
LOCK(::cs_main);
return ::chainActive.Height();
return ::ChainActive().Height();
}
int64_t getLastBlockTime() override
{
LOCK(::cs_main);
if (::chainActive.Tip()) {
return ::chainActive.Tip()->GetBlockTime();
if (::ChainActive().Tip()) {
return ::ChainActive().Tip()->GetBlockTime();
}
return Params().GenesisBlock().GetBlockTime(); // Genesis block's time of current network
}
@ -193,7 +193,7 @@ public:
const CBlockIndex* tip;
{
LOCK(::cs_main);
tip = ::chainActive.Tip();
tip = ::ChainActive().Tip();
}
return GuessVerificationProgress(tip, Params().GetConsensus().nPowTargetSpacing);
}