chainTime

var chainTime: () -> Long

The chain time a timestamp vault's maturity is judged against, in epoch seconds; non-positive when the wallet cannot prove any chain time.

Defaults to chainMedianTime — the BIP-113 median-time-past of the wallet's synced block — because that is the clock the node itself holds a timestamp nLockTime against, NOT the block header's own time: mempool admission calls CheckFinalTx with LOCKTIME_MEDIAN_TIME_PAST (nexa src/txadmission.cpp, src/policy/policy.h), and block-level consensus uses the previous block's median-time-past (ContextualCheckBlock). Median-time-past trails the tip header's time by roughly half the MTP_BLOCK_SPAN window — ~10 minutes at Nexa's 2-minute target — so gating on the header time would let send build, sign, and reserve inputs for a claim the network still rejects as non-final for several blocks after the countdown hits zero.

Replaceable so tests can pin a deterministic clock and embedders with a better chain view (e.g. a full node's getblockchaininfo.mediantime) can supply it directly.