def live_claim
import cswap-bend-cli@0.1.0.0/pollrow.bend as Pollrowimport Base
101# A fetch lease is live: claimUntil when present, else the legacy 10 s after
102# lastAttemptAt.
103def live_claim(claim_until: Maybe<&2, U32>, last_attempt: Maybe<&2, U32>, +now: U32) -> Bool:
104 match claim_until:
105 case Some{c}:
106 U32.is_lt(now, c)
107 case None{}:
108 legacy_claim(last_attempt, now)