This commit is contained in:
swrup 2026-02-16 17:55:21 +01:00 committed by Swrup
parent 0b6f5e3db5
commit 53debfd866
11 changed files with 40 additions and 165 deletions

View file

@ -97,19 +97,14 @@ let () =
()
(*
let () =
let open Binary_formats.WithdrawConfirmationPS in
let str64 = String.init 64 (fun i -> Char.unsafe_chr (i + 1)) in
let dummy_t = { h_planchets= { hash= str64 }; noreveal_index= 0_l } in
let size = Bin.size_of_value bin dummy_t |> Option.get in
assert (size = 76);
let round_trip s =
let s' = s |> B32.encode |> B32.decode |> Result.get_ok in
assert (s = s')
in
let s = String.init 0xff Char.chr in
round_trip s;
let s_l = List.init 0x0f (fun i -> String.init i Char.chr) in
List.iter round_trip s_l;
(* for cmp test with signatures.c output *)
(*
let raw_str = Bin.to_string bin dummy_t in
Printf.printf "%s" raw_str;
*)
()
*)