From e26ab522836ac36c0a17b4fb580a23a67fae3cb5 Mon Sep 17 00:00:00 2001 From: swrup Date: Sat, 28 Feb 2026 03:32:55 +0100 Subject: [PATCH] wip debogue --- src/amount.ml | 2 +- test/validate_response.ml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/amount.ml b/src/amount.ml index 3d8f6508..9b8b34ff 100644 --- a/src/amount.ml +++ b/src/amount.ml @@ -113,6 +113,6 @@ let bin = let open Bin in record make_exn |+ field beint64 (fun t -> t.value) - |+ field beint32 (fun t -> t.fraction) + |+ field beint32 (fun t -> Int32.mul t.fraction 1_000_000_l) |+ field (bytes currency_len) (fun t -> pad_currency_string t.currency) |> sealr diff --git a/test/validate_response.ml b/test/validate_response.ml index 5b10b4fe..970a803f 100644 --- a/test/validate_response.ml +++ b/test/validate_response.ml @@ -75,6 +75,11 @@ let keys content = let* () = denom_l |> list_iter (fun dn -> + let open Denomination in + (*let to_int64 ts = ts |> Timestamp.to_s |> Option.get in*) + Fmt.pr "rsa_pub: %s@." (Crypto.RsaPublicKey.to_b32 dn.pub); + Fmt.pr "master_sig: %s@." (B32.encode @@ Obj.magic dn.master_sig); + (* amount bin fraction bad? *) let* () = Denomination.verify_denomination_key_validity ~key:v.master_public_key dn