Skip to content
New issue

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

[improvement] minor redundancy removed from SRD and test cases #60

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,6 @@ pub fn select_coin_srd(
inputs: &[OutputGroup],
options: CoinSelectionOpt,
) -> Result<SelectionOutput, SelectionError> {
// Randomize the inputs order to simulate the random draw
let mut rng = thread_rng();

// In out put we need to specify the indexes of the inputs in the given order
// So keep track of the indexes when randomiz ing the vec
let mut randomized_inputs: Vec<_> = inputs.iter().enumerate().collect();
Expand Down Expand Up @@ -1542,8 +1539,8 @@ mod test {

#[test]
fn test_lowestlarger_successful() {
let mut inputs = setup_lowestlarger_output_groups();
let mut options = setup_options(20000);
let inputs = setup_lowestlarger_output_groups();
let options = setup_options(20000);
let result = select_coin_lowestlarger(&inputs, options);
assert!(result.is_ok());
let selection_output = result.unwrap();
Expand Down
Loading