fanquake 19698ac6bc
Merge #17568: wallet: fix when sufficient preset inputs and subtractFeeFromOutputs
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.

ACKs for top commit:
  Sjors:
    ACK eadd130. I can't get this new test to fail on macOS (without this PR). It passes whether or not I compile with `--enable-debug`. It does fail on Ubuntu. Yay undefined behavior... Anyway, it's a useful test.
  fanquake:
    ACK eadd1304c81e0b89178e4cc7630bd31650850c85
  instagibbs:
    utACK eadd1304c8

Tree-SHA512: 7286c321f78666eea558cc591174630d210263594df41cab1065417510591ee514ade0e1d0cec8af09a785757da68de82592b013e8fe8d4966cec3254368706e
2019-12-01 12:23:44 -05:00
..
2019-10-15 22:56:43 +00:00
2019-01-26 12:45:48 -05:00
2019-10-15 22:56:43 +00:00
2019-10-30 16:24:02 -04:00
2018-12-29 10:15:01 +01:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2018-07-27 07:15:02 -04:00
2019-09-25 20:56:38 +02:00
2019-10-15 22:56:43 +00:00
2018-07-27 07:15:02 -04:00
2019-10-15 22:56:43 +00:00
2019-02-22 17:38:45 -08:00
2019-02-22 17:38:45 -08:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2019-10-15 22:56:43 +00:00
2019-11-04 04:22:53 -05:00
2018-07-27 07:15:02 -04:00
2018-07-27 07:15:02 -04:00
2019-10-15 22:56:43 +00:00
2019-10-02 10:39:14 -04:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2018-07-27 11:52:18 -07:00
2019-10-15 22:56:43 +00:00
2019-09-25 10:56:00 -04:00
2019-10-15 22:56:43 +00:00
2018-07-27 07:15:02 -04:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2019-10-15 22:56:43 +00:00
2018-07-27 07:15:02 -04:00
2019-10-15 22:56:43 +00:00