Skip to content

Commit 183f66e

Browse files
authored
Merge pull request #2995 from IntersectMBO/specified_amount
refactor(common): improve funding logic for addresses
2 parents 18f50d4 + e4559cf commit 183f66e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cardano_node_tests/tests/common.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,14 @@ def _get_funded_addresses(
349349
If `amount` is provided, fund once and never re-fund.
350350
If `amount` is not provided, re-fund when balance drops below `min_amount`.
351351
"""
352-
fund_amount = amount or 150_000_000
353-
# Re-fund the addresses if the amount is lower than this
354-
min_amount = 50_000_000
352+
if amount is None:
353+
fund_amount = 150_000_000
354+
# Re-fund the addresses if the amount is lower than this
355+
min_amount = 50_000_000
356+
else:
357+
# Use the exact specified amount
358+
fund_amount = amount
359+
min_amount = amount
355360

356361
if caching_key:
357362
fixture_cache: cluster_management.FixtureCache[list | None]

0 commit comments

Comments
 (0)