) .select_outgoing() .unwrap() .align_outgoing() .add_value() .unwrap() .strip_value() .deduct_fee() .build() .unwrap(); } #[test] #[should_panic(expected = "invariant: sat is at first position in recipient output")] fn invariant_sat_is_aligned() { let utxos = vec![(outpoint(1), Amount::from_sat(10_000))]; TransactionBuilder::new( satpoint(1, 3_333), BTreeMap::new(), utxos.into_iter().collect(), BTreeSet::new(), recipient(), [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, ) .select_outgoing() .unwrap() .strip_value() .deduct_fee() .build() .unwrap(); } #[test] #[should_panic(expected = "invariant: fee estimation is correct")] fn invariant_fee_is_at_least_target_fee_rate() { let utxos = vec![(outpoint(1), Amount::from_sat(10_000))]; TransactionBuilder::new( satpoint(1, 0), BTreeMap::new(), utxos.into_iter().collect(),