From ae670f76bc3a7c7a8b9454502e74064dc3e8f534 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Tue, 2 Jul 2024 17:11:36 +0200 Subject: [PATCH] min amount fix for foundries --- .../src/stardust/test_outputs/alias_ownership.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/iota-genesis-builder/src/stardust/test_outputs/alias_ownership.rs b/crates/iota-genesis-builder/src/stardust/test_outputs/alias_ownership.rs index ef98204f182..00bf2213725 100644 --- a/crates/iota-genesis-builder/src/stardust/test_outputs/alias_ownership.rs +++ b/crates/iota-genesis-builder/src/stardust/test_outputs/alias_ownership.rs @@ -166,8 +166,8 @@ fn random_foundry_output( ) -> (OutputHeader, FoundryOutput) { let foundry_output_header = random_output_header(rng); - let amount = rng.gen_range(1_000_000..10_000_000); let supply = rng.gen_range(1_000_000..100_000_000); + let amount = rng.gen_range(1_000_000..10_000_000).min(supply); let token_scheme = SimpleTokenScheme::new(supply, 0, supply).unwrap(); let foundry_output = FoundryOutputBuilder::new_with_amount(amount, *serial_number, token_scheme.into())