Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 85f6c63

Browse files
authored
:Incorrect algorithm used in fifo.rs test cases (#103)
Signed-off-by: neoz666 <neoz.blockchain@gmail.com>
1 parent 83c608d commit 85f6c63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/algorithms/fifo.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub fn select_coin_fifo(
6969
mod test {
7070

7171
use crate::{
72-
algorithms::{fifo::select_coin_fifo, srd::select_coin_srd},
72+
algorithms::fifo::select_coin_fifo,
7373
types::{CoinSelectionOpt, ExcessStrategy, OutputGroup, SelectionError},
7474
};
7575

@@ -143,7 +143,7 @@ mod test {
143143
fn test_successful_selection() {
144144
let mut inputs = setup_basic_output_groups();
145145
let mut options = setup_options(2500);
146-
let mut result = select_coin_srd(&inputs, &options);
146+
let mut result = select_coin_fifo(&inputs, &options);
147147
assert!(result.is_ok());
148148
let mut selection_output = result.unwrap();
149149
assert!(!selection_output.selected_inputs.is_empty());
@@ -159,7 +159,7 @@ mod test {
159159
fn test_insufficient_funds() {
160160
let inputs = setup_basic_output_groups();
161161
let options = setup_options(7000); // Set a target value higher than the sum of all inputs
162-
let result = select_coin_srd(&inputs, &options);
162+
let result = select_coin_fifo(&inputs, &options);
163163
assert!(matches!(result, Err(SelectionError::InsufficientFunds)));
164164
}
165165

0 commit comments

Comments
 (0)