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
Branch
pr12694
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6422
Build 10891: Bitcoin ABC Buildbot (legacy)
Build 10890: arc lint + arc unit

Event Timeline

markblundeberg added inline comments.
src/wallet/test/coinselector_tests.cpp
34

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

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

No but unnecessary globals sucks.

src/wallet/wallet.h
789

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