Follow up to #16257, this PR makes bumpfee aware of -maxtxfee.
It also prevents dangling locked unspents when calling fundrawtransaction - because the previous check was after LockCoin.
tACK a2f23b8
This also makes the QT message the same as RPC.
Afaik there's no way to reach the A fee higher than %1 is considered an absurdly high fee message anymore, so should we get rid of that string and Reject absurdly high fee in walletmodel.cpp?
3129 | @@ -3135,6 +3130,11 @@ bool CWallet::CreateTransaction(interfaces::Chain::Lock& locked_chain, const std 3130 | } 3131 | } 3132 | 3133 | + if (nFeeRet > this->m_default_max_tx_fee) {
style-nit:
if (nFeeRet > m_default_max_tx_fee) {
m_ already means this->, no need for duplicate.
3129 | @@ -3135,6 +3130,11 @@ bool CWallet::CreateTransaction(interfaces::Chain::Lock& locked_chain, const std 3130 | } 3131 | } 3132 | 3133 | + if (nFeeRet > this->m_default_max_tx_fee) { 3134 | + strFailReason = TransactionErrorString(TransactionError::MAX_FEE_EXCEEDED);
style-nit: Maybe for the purpose of a backport, this could be inlined as a string literal?
Don't you prefer an unclean-but-easy-cherry-pick backport?
Concept ACK.
Maybe revert the docstring in the gui to say "belt-and-suspenders" again?
See https://github.com/bitcoin/bitcoin/pull/16257/files#diff-2e3836af182cfb375329c3463ffd91f8
Looks good, I'll write some tests and send them over in a bit.
ACK, tested by writing a test: https://github.com/MarcoFalke/bitcoin/commit/9ff66a1b2157bcce8ccd4cea0610eae79d0be6d8
Thanks for the sendmany and fundrawtransaction RPC tests @MarcoFalke.
Maybe revert the docstring in the gui to say "belt-and-suspenders" again?
Maybe that is indeed slightly safer than dropping it completely.
@MarcoFalke great stuff, pulled both commits.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
No conflicts as of last run.
ACK 9ff66a1b2157bcce8ccd4cea0610eae79d0be6d8 (read code, wrote test case)
<details><summary>Show signature and timestamp</summary>
Signature:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
ACK 9ff66a1b2157bcce8ccd4cea0610eae79d0be6d8 (read code, wrote test case)
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUhCrQv8C829o7ZZs8hUWaldWPLHQdivLOKMhyEC24GVjlOb2CPwh+YDSs4bZUNj
qVpgveclR55eb9j4tj7Wt+4AqNiNeHyKMgNfXCXeWKj4CYDSGRfwd1zpSnL8Z/Lk
cXyp2AV5GcSX3hjG/1tbFphxDYLoiihfSLMVTGybC4aNupxqIiAFRPBVS9ovwHBA
Ml3r9H0CueguuZMR1m2B/hxA+fOWe19VxCck93dydfL7v+N56tvatm/+5ihwaXAf
v3wwrHHdA2j0i3yXOSCdDezC0arwA3CMVJWZNt5rJt2ydLG46YSp7S4XwjpJD36V
G04nwXgfIRv9HPPeYLESOQHf/RiGQaaC4TRLuxPo3P/abhzXq2ucSTdsm0mtqeuj
pTdasa8y6fAWs4Y//y84ce28bbLpWwM1QHCbf1GwemqNhXpxOwZnk6uAqwM+2D6v
SJ0hV5HqocIfbUM1WKqBnKpLnvHicvPeMOjTtQw3g1KHvhY9DCK9tAX1vYom2qDd
Y5xHfFCm
=I+BI
-----END PGP SIGNATURE-----
Timestamp of file with hash e8c4afba47440f5e82e36c70bed731c61cc784c18d70774903ee95050752dbfa -
</details>
Concept ACK
@meshcollider ping.
The previous pull was reviewed by @kallewoof @jonasschnelli @laanwj @achow101. Would be helpful to get your eyes on this as well.
utACK 9ff66a1b2157bcce8ccd4cea0610eae79d0be6d8
Looks good. Was wondering about the two test commits, until I realized author was different.
60 | + -4, 61 | + "Fee exceeds maximum configured by -maxtxfee", 62 | + lambda: self.nodes[0].fundrawtransaction(hexstring=raw_tx), 63 | + ) 64 | + 65 | + self.log.info('Check maxtxfee in combination with settxfee'.format(fee_setting))
.format(fee_setting) part is a mistake? :-)
Yap, @MarcoFalke I'll amend.
re-ACK 0d101a340c44841cbbc5982d55354b1787bc39e2, only change is small test fixup
<details><summary>Show signature and timestamp</summary>
Signature:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
re-ACK 0d101a340c44841cbbc5982d55354b1787bc39e2, only change is small test fixup
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUgQbwwAtg+GMzWeDLh1+NCCGz5Bs6tmgzthA2R28KiIaoQsgivJMdd2FoOMl7/C
dlKZ7gKbttnEtr/Rl4pFALzy9L8oMiFmoXC+qy3APx4Z3Xd+MS4aLM1WqxHggkPN
u6679W5/OtN4UE6oksKGM84EOAfKqSCHG/cZqGJ8a4UCIZWku2EhHiqo16gaNJvi
5MNuaIQjpGqQf5egbqV+lWIvJmnHXzoIKN09Eo7PS7PwtCJy6A1x8uy12CxsU6G3
Dl8M27a52PNvoXHeWX+xyKlbDIFSOf9vuc4/bP/ylMtC7vIGdO/W0SIyvsaNMLHq
+cOAJZxLoxZKgK2VUQqxH1L/VafPtm/a2v23LzkUFoK7Vk0fENekpuiQTZsDRQV8
OOXhf7TFukNGVCS60tBJa1Mf0LrSfT3DgV/NNVni1YYDg97H6tX0lpXQyJ8LSZg5
o8dWBno9MWsoFAyAfsPxWtS9FI7xLb1XuYMiMNBdF2FGikHIebt9R5CJqfGVIgoc
9IJFNrPA
=Cuz4
-----END PGP SIGNATURE-----
Timestamp of file with hash a2d0938771647864e65f9d3c8939d69334e4a3be00ac928e24814e25e15140d2 -
</details>
ACK 0d101a340c44841cbbc5982d55354b1787bc39e2