De-panic output_amounts(): fallible make-outputs parsing

OutputSelectionArgs::output_amounts() unwrap()'d the float parse of each
make-outputs value, panicking on bad input via the API path (the CLI now
validates earlier). Return Result instead; sum_output_amounts() propagates.
num_custom_outputs() now counts CSV entries without parsing, so it stays
infallible and the debug! macros that use it are unaffected.
This commit is contained in:
jwinterm
2026-06-03 13:56:32 -04:00
parent 2e3b04498c
commit 3fcf3b7816
3 changed files with 24 additions and 16 deletions
@@ -137,7 +137,7 @@ fn contract_self_spend_custom_tx_impl(test_dir: &'static str) -> Result<(), libw
assert_eq!(
commits[15].output.value,
3 * consensus::REWARD
- selection_args.sum_output_amounts()
- selection_args.sum_output_amounts()?
- my_fee_contribution(3, 6, 1, 1)?.fee()
);
Ok(())