FeeRate::try_from(1.0).unwrap(), Target::Value(Amount::from_sat(1)) ) .build_transaction(), Err(Error::Dust { output_value: Amount::from_sat(1), dust_value: Amount::from_sat(294) }) ) } #[test] fn do_not_select_outputs_which_do_not_pay_for_their_own_fee_at_default_fee_rate() { let utxos = vec![ (outpoint(1), Amount::from_sat(1_000)), (outpoint(2), Amount::from_sat(100)), ]; pretty_assert_eq!( TransactionBuilder::new( satpoint(1, 0), BTreeMap::new(), utxos.into_iter().collect(), BTreeSet::new(), recipient(), [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Value(Amount::from_sat(1000)) ) .build_transaction(), Err(Error::NotEnoughCardinalUtxos), ) } #[test] fn do_not_select_outputs_which_do_not_pay_for_their_own_fee_at_higher_fee_rate() { let utxos = vec![ (outpoint(1), Amount::from_sat(1_000)), (outpoint(2), Amount::from_sat(500)),