From f461346a75ea8bb0ab16ed938b59212b46d0d4b0 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Thu, 16 May 2024 15:03:25 -0500 Subject: [PATCH] Use SaturatingUSub for hoursSinceArbitrum --- arbos/programs/programs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arbos/programs/programs.go b/arbos/programs/programs.go index ba974f9503..320a48ebcf 100644 --- a/arbos/programs/programs.go +++ b/arbos/programs/programs.go @@ -517,7 +517,7 @@ func (status userStatus) toResult(data []byte, debug bool) ([]byte, string, erro // Hours since Arbitrum began, rounded down. func hoursSinceArbitrum(time uint64) uint24 { - return uint24((time - ArbitrumStartTime) / 3600) + return am.SaturatingUUCast[uint24]((am.SaturatingUSub(time, ArbitrumStartTime)) / 3600) } // Computes program age in seconds from the hours passed since Arbitrum began.