Page MenuHomePhabricator

Have SelectCoinsMinConf and SelectCoins use BnB or Knapsack and use it
ClosedPublic

Authored by deadalnix on Jun 12 2019, 12:48.

Details

Summary

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.

This is a parital backport of Core PR10637 : https://github.com/bitcoin/bitcoin/pull/10637/commits/6a34ff5335786615771ca423134a484b04831c4e

Depends on D3297, D3296, D3291, D3251, D3243 and D3290

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
selectcoinminconf
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6305
Build 10657: Bitcoin ABC Buildbot (legacy)
Build 10656: arc lint + arc unit

Event Timeline

Fabien requested changes to this revision.Jun 17 2019, 09:35
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/wallet/wallet.cpp
3023

The witness overhead should not be accounted

This revision now requires changes to proceed.Jun 17 2019, 09:35
This revision is now accepted and ready to land.Jun 18 2019, 06:05