Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/node.cpp
Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | class NodeImpl : public Node { | ||||
LOCK(::cs_main); | LOCK(::cs_main); | ||||
if (::chainActive.Tip()) { | if (::chainActive.Tip()) { | ||||
return ::chainActive.Tip()->GetBlockTime(); | return ::chainActive.Tip()->GetBlockTime(); | ||||
} | } | ||||
// Genesis block's time of current network | // Genesis block's time of current network | ||||
return Params().GenesisBlock().GetBlockTime(); | return Params().GenesisBlock().GetBlockTime(); | ||||
} | } | ||||
double getVerificationProgress() override { | double getVerificationProgress() override { | ||||
const CBlockIndex *tip; | |||||
{ | |||||
LOCK(::cs_main); | LOCK(::cs_main); | ||||
tip = ::chainActive.Tip(); | const CBlockIndex *tip = ::chainActive.Tip(); | ||||
} | |||||
return GuessVerificationProgress(Params().TxData(), tip); | return GuessVerificationProgress(Params().TxData(), tip); | ||||
} | } | ||||
bool isInitialBlockDownload() override { | bool isInitialBlockDownload() override { | ||||
return IsInitialBlockDownload(); | return IsInitialBlockDownload(); | ||||
} | } | ||||
bool getReindex() override { return ::fReindex; } | bool getReindex() override { return ::fReindex; } | ||||
bool getImporting() override { return ::fImporting; } | bool getImporting() override { return ::fImporting; } | ||||
void setNetworkActive(bool active) override { | void setNetworkActive(bool active) override { | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |