Page MenuHomePhabricator

Merge #17568: wallet: fix when sufficient preset inputs and subtractFeeFromOutputs
ClosedPublic

Authored by jasonbcox on Sep 30 2020, 22:07.

Details

Summary

eadd1304c81e0b89178e4cc7630bd31650850c85 tests: Add a test for funding with sufficient preset inputs and subtractFeeFromOutputs (Andrew Chow)
ff330badd45067cb520b1cfa1844f60a4c9f2031 Default to bnb_used = false as there are many cases where BnB is not used (Andrew Chow)

Pull request description:

#17290 introduced a bug where, when we had preset inputs that covered the amount being sent and subtractFeeFrromOutputs was being used, transaction funding would result in a `Fee exceeds maximum configured by -maxtxfee` error. This was happening because we weren't setting `bnb_used = false` when the preset inputs were used as it should have been. This resulted in a too high fee because the change would go to fees accidentally.

Apparently this particular case doesn't have a test, so I've added one as well.

Backport of Core PR17568

Depends on D7688

Test Plan
ninja check
test_runner.py rpc_fundrawtransaction

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Sep 30 2020, 22:13