From 6229dcdb79cc8016d152b201169d1d83e780341e Mon Sep 17 00:00:00 2001 From: Erick Cestari Date: Tue, 15 Sep 2026 14:52:36 -0300 Subject: [PATCH] smite-scenarios: give the wallet more than one spendable UTXO Funding a transaction locks the coins it selects, so with a single mature coinbase output a program can fund only one transaction. --- smite-scenarios/src/targets/bitcoind.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/smite-scenarios/src/targets/bitcoind.rs b/smite-scenarios/src/targets/bitcoind.rs index 0cff647c..55834180 100644 --- a/smite-scenarios/src/targets/bitcoind.rs +++ b/smite-scenarios/src/targets/bitcoind.rs @@ -10,8 +10,19 @@ use smite::process::ManagedProcess; use super::TargetError; -/// Number of blocks to generate at startup for coinbase maturity. -pub const INITIAL_BLOCKS: u64 = 101; +/// Blocks a coinbase output must be buried under before the wallet spends it. +const COINBASE_MATURITY: u64 = 100; + +/// Mature coinbase outputs the wallet holds after startup. +/// +/// Funding a transaction locks the coins it selects, so a program that funds +/// several transactions needs several coins, and mining them here means it +/// never has to mine blocks during execution to get them. +const SPENDABLE_UTXOS: u64 = 16; + +/// Number of blocks to generate at startup, each paying its coinbase to the +/// wallet. +pub const INITIAL_BLOCKS: u64 = COINBASE_MATURITY + SPENDABLE_UTXOS; /// Bitcoind configuration. pub struct BitcoindConfig {