We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comment from #30
fn select_coins_bnb_given_target(target_str, expected_inputs) { let target = Amount::from_str(target_str).unwrap(); let mut weighted_utxos = create_weighted_utxos(Amount::ZERO); let inputs: Vec<_> = select_coins_bnb( target, Amount::ZERO, FeeRate::ZERO, FeeRate::ZERO, &mut weighted_utxos, ) .unwrap() .collect(); assert_eq!(inputs.len(), expected_inputs.len()); inputs.sort(); expected_inputs.sort() for i in 0..inputs.len() -1 { assert_eq!(inputs[i].utxo.value, Amount::from_str(expected_inputs[i]).unwrap()); } } # one select_coins_bnb_given_target("1 cBTC", ["1 cBTC"]); # two … # five select_coins_bnb_given_target("5 cBTC", ["3 cBTC", "2 cBTC"]); # six select_coins_bnb_given_target("6 cBTC", ["3 cBTC", "2 cBTC", "1 cBTC"]); # seven … select_coins_bnb_given_target("10 cBTC", ["4 cBTC", "3 cBTC", "2 cBTC", "1 cBTC"]);
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Comment from #30
The text was updated successfully, but these errors were encountered: