CChain::IsTipRecent

Check whether this chain's tip exists, has enough work, and is recent.

Synopsis

Declared in <chain.h>

[[requires_capability(0x7ff36cc46028), requires_capability(0x7ff3792580b8), requires_capability(0x7ff39288d848), requires_capability(0x7ff37c9513a8), requires_capability(0x7ff38bd66858), requires_capability(0x7ff392c65e78), requires_capability(0x7ff38be30018), requires_capability(0x7ff382dde238), requires_capability(0x7ff37b3047b8), requires_capability(0x7ff3914a3458), requires_capability(0x7ff390ed1268)]]
bool
IsTipRecent(
    arith_uint256 const& min_chain_work,
    std::chrono::seconds max_tip_age) const;

Return Value

True if the tip exists, meets the work threshold, and is recent enough.

Parameters

NameDescription
min_chain_workThe minimum cumulative chain work the tip must have.
max_tip_ageThe maximum age the tip is allowed to have.