anchorMs
fun anchorMs(dustSyncTimeMs: Long, tipMs: Long, safetyWindowMs: Long = SAFETY_WINDOW_MS, tipBackoffMs: Long = TIP_BACKOFF_MS): Long
The ctime to anchor a dust spend to.
Parameters
dustSyncTimeMs
the dust state's sync_time in ms — the block time of its last replayed dust event; <= 0 means the state reported no sync time.
tipMs
the indexer's current block (tip) time in ms.
safetyWindowMs
how recent sync_time may be and still be kept verbatim; beyond this it's treated as idle/drifted and clamped toward the tip. Defaults to SAFETY_WINDOW_MS; injectable so a caller with the real dust_grace_period can pass a window derived from it.
tipBackoffMs
headroom below the tip when clamping (see TIP_BACKOFF_MS).