diff --git a/tezt/lib_tezos/client.ml b/tezt/lib_tezos/client.ml index 15383371aa8cf83a6a0722a568f8500cc4dde275..905ad6f5dcc009993c5f91127f16f65bf6638a16 100644 --- a/tezt/lib_tezos/client.ml +++ b/tezt/lib_tezos/client.ml @@ -900,7 +900,8 @@ let bake_for_and_wait_level ?env ?endpoint ?protocol ?keys ?minimal_fees ?state_recorder client in - Node.wait_for_level node (actual_level_before + 1) + let levels_to_bake = Option.value ~default:1 count in + Node.wait_for_level node (actual_level_before + levels_to_bake) let bake_for_and_wait ?env ?endpoint ?protocol ?keys ?minimal_fees ?minimal_nanotez_per_gas_unit ?minimal_nanotez_per_byte ?minimal_timestamp diff --git a/tezt/lib_tezos/client.mli b/tezt/lib_tezos/client.mli index 237157612f4597c757b11f720c6ff6f78b2028ea..7d26480cd1c4fae9697bebadb659b8ef39856747 100644 --- a/tezt/lib_tezos/client.mli +++ b/tezt/lib_tezos/client.mli @@ -591,7 +591,7 @@ val bake_for : t -> unit Lwt.t -(** Same as {!bake_for}, but wait until level increases by 1. +(** Same as {!bake_for}, but wait for your node to reach the expected level. Waiting ensures that the baked block has been well processed by the node. This makes your test more deterministic.