Commit graph

4 commits

Author SHA1 Message Date
Andrew Chow 73b5bf2cb4 Add a test to make sure that negative effective values are filtered 2018-03-13 12:39:35 -04:00
Andrew Chow 6a34ff5335 Have SelectCoinsMinConf and SelectCoins use BnB or Knapsack and use it
Allows SelectCoinsMinConf and SelectCoins be able to switch between
using BnB or Knapsack for choosing coins.

Has SelectCoinsMinConf do the preprocessing necessary to support either
BnB or Knapsack. This includes calculating the filtering the effective
values for each input.

Uses BnB in CreateTransaction to find an exact match for the output.
If BnB fails, it will fallback to the Knapsack solver.
2018-03-13 12:39:27 -04:00
Andrew Chow cd927ff328 Move original knapsack solver tests to coinselector_tests.cpp 2018-03-13 12:39:26 -04:00
Andrew Chow 4566ab75f2 Add tests for the Branch and Bound algorithm 2018-03-13 12:39:26 -04:00