Skip to main content

record_tip_block_delay

Function record_tip_block_delay 

Source
pub async fn record_tip_block_delay(chain_tip_change: ChainTipChange)
Expand description

Records how long after its header time each new best chain tip block was committed, with the block’s network upgrade once the network this node runs on is known, and sends each value to Sentry with the block’s height.

A block is only recorded if it was mined at most TIP_BLOCK_DELAY_BACKLOG_MARGIN before its parent became this node’s tip, so a node catching up after a restart or a stall doesn’t record most of its backlog. The block before a network upgrade activation isn’t recorded either, because ChainTipChange reports it as a reset so that the mempool is cleared, and a reset doesn’t include the block’s time.