@@ -10,8 +10,9 @@ include Heartbeat.Make ()
1010let main () =
1111 let logger = Logger. create () in
1212 let num_block_producers = 3 in
13+ let accounts = Lazy. force Test_genesis_ledger. accounts in
1314 let snark_work_public_keys ndx =
14- List. nth_exn Test_genesis_ledger. accounts ndx
15+ List. nth_exn accounts ndx
1516 |> fun (_ , acct ) -> Some (Account. public_key acct)
1617 in
1718 let % bind testnet =
@@ -23,7 +24,7 @@ let main () =
2324 (* keep CI alive *)
2425 Deferred. don't_wait_for (print_heartbeat logger) ;
2526 (* dump account info to log *)
26- List. iteri Test_genesis_ledger. accounts ~f: (fun ndx ((_ , acct ) as record ) ->
27+ List. iteri accounts ~f: (fun ndx ((_ , acct ) as record ) ->
2728 let keypair = Test_genesis_ledger. keypair_of_account_record_exn record in
2829 Logger. info logger ~module_: __MODULE__ ~location: __LOC__
2930 " Account: $account_number"
@@ -38,15 +39,13 @@ let main () =
3839 @@ Account. public_key acct ) )
3940 ; (" balance" , `Int (Currency.Balance. to_int acct.balance)) ] ) ;
4041 (* second account is delegator; see genesis_ledger/test_delegation_ledger.ml *)
41- let ((_, delegator_account) as delegator ) =
42- List. nth_exn Test_genesis_ledger. accounts 2
43- in
42+ let ((_, delegator_account) as delegator ) = List. nth_exn accounts 2 in
4443 let delegator_pubkey = Account. public_key delegator_account in
4544 let delegator_keypair =
4645 Test_genesis_ledger. keypair_of_account_record_exn delegator
4746 in
4847 (* zeroth account is delegatee *)
49- let _, delegatee_account = List. nth_exn Test_genesis_ledger. accounts 0 in
48+ let _, delegatee_account = List. nth_exn accounts 0 in
5049 let delegatee_pubkey = Account. public_key delegatee_account in
5150 let worker = testnet.workers.(0 ) in
5251 (* setup readers for produced blocks by delegator, delegatee *)
0 commit comments