better relative time

This commit is contained in:
swrup 2025-12-11 07:23:51 +01:00
parent 0e46ea162a
commit 262aeaec66
8 changed files with 115 additions and 89 deletions

View file

@ -5,11 +5,7 @@ open Bin_type
(* TODO keep this?
some of those are actuall ecdhe, or union of eddsa|ecdhe *)
module Aliases = struct
module TimestampNBO : Time_S = struct
type t = Timestamp.t
let bin = Timestamp.bin_nbo
end
module TimestampNBO = TimeAbsoluteNBO
module AmountNBO = struct
type t = Amount.t
@ -397,7 +393,7 @@ module GlobalFees = struct
})
|+ Purpose.field purpose
|+ field TimeAbsoluteNBO.bin (fun t -> t.start_date)
|+ field TimeRelativeNBO.bin (fun t -> t.end_date)
|+ field TimeAbsoluteNBO.bin (fun t -> t.end_date)
|+ field TimeRelativeNBO.bin (fun t -> t.purse_timeout)
|+ field TimeRelativeNBO.bin (fun t -> t.kyc_timeout)
|+ field TimeRelativeNBO.bin (fun t -> t.history_expiration)