Skip to content

Commit 7fba2a6

Browse files
committed
block reward test: read coinbase from constraint constant instead of hard-coding
1 parent 239439e commit 7fba2a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/app/test_executive/block_reward_test.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct
3636
(Wait_condition.nodes_to_initialize
3737
(Core.String.Map.data all_mina_nodes) )
3838
in
39+
let constraint_constants = Network.constraint_constants network in
3940
let node = Network.block_producer_exn network "node" in
4041
let bp_keypair = (Network.genesis_keypair_exn network "node-key").keypair in
4142
let bp_pk = bp_keypair.public_key |> Signature_lib.Public_key.compress in
4243
let bp_pk_account_id = Account_id.create bp_pk Token_id.default in
4344
let bp_original_balance = Currency.Amount.of_mina_string_exn "1000" in
44-
let coinbase_reward = Currency.Amount.of_mina_string_exn "720" in
4545
let%bind () =
4646
section_hard "wait for 1 block to be produced"
4747
(wait_for t (Wait_condition.blocks_to_be_produced 1))
@@ -58,7 +58,8 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct
5858
test_constants.coinbase_amount for whatever reason, so hardcoding this
5959
until that is fixed *)
6060
let bp_expected =
61-
Currency.Amount.add bp_original_balance coinbase_reward
61+
Currency.Amount.add bp_original_balance
62+
constraint_constants.coinbase_amount
6263
|> Option.value_exn
6364
in
6465
[%log info] "bp_expected: %s"

0 commit comments

Comments
 (0)