pub fn list_of_cmds() -> Vec<UserCommand>
Expand description
882 signed commands (non-zkapps) generated this way in src/staged_ledger/staged_ledger.ml
:
let cmds_per_iter = [ 126; 126; 126; 126; 126; 126; 126; ] in let total_cmds = List.fold cmds_per_iter ~init:0 ~f:( + ) in let%bind cmds = User_command.Valid.Gen.sequence ~length:total_cmds ~sign_type:`Real ledger_init_state in assert (List.length cmds = total_cmds) ;
(* let buf = Bigstring.create (List.bin_size_t User_command.Valid.Stable.V2.bin_size_t cmds) in ) ( ignore (List.bin_write_t User_command.Valid.Stable.V2.bin_write_t buf ~pos:0 cmds : int) ; ) ( let bytes = Bigstring.to_bytes buf in ) ( let explode s = List.init (String.length s) ~f:(fun i -> String.get s i) in ) ( let s = (String.concat ~sep:“,” (List.map (explode (Bytes.to_string bytes)) ~f:(fun b -> string_of_int (Char.to_int b)))) in ) ( Core.Printf.eprintf !“cmds_binprot=[%s]\n%!” s; *)
(* return (ledger_init_state, cmds, a) *)
let cmds_per_iter = [126; 126; 126; 1] in (* let cmds_per_iter = [126; 126; 126; 126] in *) let total_cmds = List.fold cmds_per_iter ~init:0 ~f:( + ) in let cmds = List.take cmds total_cmds in Core.Printf.eprintf !“cmds=%{sexp: User_command.Valid.t list}\n%!” cmds;