graceBlocks
int64graceBlocks is the max block gap between two check-ins that still counts as consecutive. A gap larger than this lapses the streak.
Value
100
record
typerecord is the persisted streak state for one address.
Value
v1.record
streaks
v0.Tree// owner address string -> \*record
- OID
- 0a3229…b6b7:4
streaks details
get
func(owner .uverse.address) (*v1.record, bool)- OID
- 0a3229…b6b7:5
get details
project
func(r *v1.record, height int64) (current int64, alive bool)project reports the record's current streak as of height without mutating it: once the gap since lastHeight exceeds graceBlocks the streak reads as lapsed, even though the stored value only resets on the next actual check-in.
- OID
- 0a3229…b6b7:7
project details
checkin
func(owner .uverse.address, height int64) stringcheckin is the non-crossing core of CheckIn, kept separate so unit tests can drive it directly by address and height.
- OID
- 0a3229…b6b7:8
checkin details
CheckIn
func() stringCheckIn records a check-in for the caller at the current block height.
- OID
- 0a3229…b6b7:9
CheckIn details
CurrentStreak
func(addr string) int64CurrentStreak returns addr's live current streak, 0 if it has lapsed or addr has never checked in.
- OID
- 0a3229…b6b7:10
CurrentStreak details
LongestStreak
func(addr string) int64LongestStreak returns addr's best streak ever, 0 if it has never checked in.
- OID
- 0a3229…b6b7:11
LongestStreak details
byRank
typebyRank orders the leaderboard by longest streak, then current streak, then owner address — fully deterministic regardless of avl iteration order.
Value
v1.byRank
renderDetail
func(r *v1.record, height int64) string- OID
- 0a3229…b6b7:12
renderDetail details
Render
func(path string) stringRender shows either the full leaderboard (path == "") or a single address's detail card when path is a bech32 address.
- OID
- 0a3229…b6b7:13