lbrycrd/src/util
Wladimir J. van der Laan 1212808762
Merge #16257: [wallet] abort when attempting to fund a transaction above -maxtxfee
806b0052c3 [wallet] abort when attempting to fund a transaction above maxtxfee (Sjors Provoost)

Pull request description:

  `FundTransaction` calls `GetMinimumFee` which, when the fee rate is absurdly high, quietly reduces the fee to `-maxtxfee`.

  Becaue an absurdly high fee rate is usually the result of a fat finger, aborting seems safer behavior.

  Before:
  ```
  bitcoin-cli walletcreatefundedpsbt '[]' '[{"tb1q...": 0.01}]' 0 '{"feeRate": 10}' true
  {
    "psbt": "cHNidP8...gAA=",
    "fee": 0.10000000,
    "changepos": 1
  }

  ```

  After:
  ```
  bitcoin-cli walletcreatefundedpsbt '[]' '[{"tb1q...": 0.01}]' 0 '{"feeRate": 10}' true
  error code: -25
  error message:
  Fee exceeds maximum configured by -maxtxfee
  ```

  QT still checks the max fee rate as expected:
  <img width="566" alt="Schermafbeelding 2019-06-20 om 19 52 00" src="https://user-images.githubusercontent.com/10217/59888424-a2aa7100-9395-11e9-8ae6-8a3c1f7de585.png">

ACKs for top commit:
  laanwj:
    Code review ACK 806b0052c3

Tree-SHA512: bee95811711cdab100b614d2347921407af3b400aea613ca156953ed3f60b924ad29a1d335bd0e240c0b7c0fbb360226bab03294d226a5560cdf2a3f21e6d406
2019-07-01 16:03:37 +02:00
..
bip32.cpp Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp} 2019-02-14 14:00:28 -05:00
bip32.h Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp} 2019-02-14 14:00:28 -05:00
bytevectorhash.cpp blockfilter: Use unordered_set instead of set in blockfilter. 2018-11-05 09:30:56 -08:00
bytevectorhash.h blockfilter: Use unordered_set instead of set in blockfilter. 2018-11-05 09:30:56 -08:00
error.cpp [wallet] abort when attempting to fund a transaction above maxtxfee 2019-06-28 22:44:38 -04:00
error.h [wallet] abort when attempting to fund a transaction above maxtxfee 2019-06-28 22:44:38 -04:00
fees.cpp [wallet] abort when attempting to fund a transaction above maxtxfee 2019-06-28 22:44:38 -04:00
fees.h [build] Add several util units 2019-04-09 17:53:08 -04:00
memory.h scripted-diff: Move util files to separate directory. 2018-11-04 22:46:07 -08:00
moneystr.cpp Use IsDigit(...) instead of std::isdigit 2018-11-06 17:32:08 +01:00
moneystr.h Add NODISCARD to all {Decode,Parse}[...](...) functions returning bool. Sort includes. 2018-11-05 17:03:11 +01:00
rbf.cpp [build] Add several util units 2019-04-09 17:53:08 -04:00
rbf.h [build] Add several util units 2019-04-09 17:53:08 -04:00
strencodings.cpp Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp} 2019-02-14 14:00:28 -05:00
strencodings.h dead code: Remove dead option in HexStr conversion 2019-03-10 21:45:31 -06:00
system.cpp util: Explain why the path is cached 2019-06-27 14:42:06 -04:00
system.h util: Explain why the path is cached 2019-06-27 14:42:06 -04:00
threadnames.cpp Fix portability issue with pthreads 2019-05-07 00:17:33 +00:00
threadnames.h threads: introduce util/threadnames, refactor thread naming 2019-04-29 13:42:25 -04:00
time.cpp util: Add type safe GetTime 2019-05-23 14:12:32 -04:00
time.h util: Add type safe GetTime 2019-05-23 14:12:32 -04:00
url.cpp [build] Add several util units 2019-04-09 17:53:08 -04:00
url.h [build] Add several util units 2019-04-09 17:53:08 -04:00
validation.cpp [build] Add several util units 2019-04-09 17:53:08 -04:00
validation.h [build] Add several util units 2019-04-09 17:53:08 -04:00