Bitshala-Incubator / rust-coinselect

A blockchain-agnostic coinselection library built in rust.
MIT License
9 stars 17 forks source link

added tests for calculate_fee(), calculate_waste() and effective_value() #25

Open chippsmith opened 4 months ago

chippsmith commented 4 months ago

I added tests: test_calculate_fee(), test_effective_value_when_less_than_zero(), test_effective_value_when_greater_than_zero(), test_effective_value when_less_than_zero(), test_calculate_waste_to_drain(), and test_calculate_waste_to_miner() per issue number 24.

chippsmith commented 2 months ago

fmt failed because of an error in line 707. It reads result: Ok(999_99_999_990), instead of result: Ok(99_999_999_990). Im not sure if I should fix that or not since this is pending review from @delcin-raj.

rajarshimaitra commented 2 months ago

Should fix, unless the number itself is wrong..