Page MenuHomePhabricator

Actually disable BnB when there are preset inputs
ClosedPublic

Authored by deadalnix on Jun 21 2019, 02:03.

Details

Summary

We don't want to use BnB when there are preset inputs because there
is some weirdness with making that work with using the KnapsackSolver
as the fallback. Currently we say that we haven't used bnb when
there are preset inputs, but we don't actually disable BnB. This fixes
that.

Test that BnB is not used when there are preset inputs

This is a backport of Core PR12694

Depends on D3364

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markblundeberg added inline comments.
src/wallet/test/coinselector_tests.cpp
34 ↗(On Diff #9560)

Hmm the original PR has a global static CWallet testWallet here... did we out-of-order backport something, and if so, could there be something missing?

src/wallet/wallet.h
789 ↗(On Diff #9560)

note -- Core code uses pass-by-reference for nTargetValue, for some odd reason. Doesn't really matter here I guess.

src/wallet/test/coinselector_tests.cpp
34 ↗(On Diff #9560)

No but unnecessary globals sucks.

src/wallet/wallet.h
789 ↗(On Diff #9560)

They pass amount by ref which makes no sense as the copy is trivial and the damn thing is pointer sized.

This revision is now accepted and ready to land.Jun 24 2019, 09:57