Very small set of changes to support PSBT-based fee bumping on watchonly wallets in QT.
quasi-companion to #16373
Very small set of changes to support PSBT-based fee bumping on watchonly wallets in QT.
quasi-companion to #16373
Need to change the "Send" button text to whatever the parent PR is doing
Concept ACK
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
No conflicts as of last run.
Concept ACK. Linter complains about circular dependency.
@Sjors appears to be due to the forward declaration of SendCoinsRecipient in qt/guiutil.h, and is already somewhat covered in an exception:
"qt/guiutil -> qt/walletmodel -> qt/optionsmodel -> qt/guiutil"
If my reading is correct I propose to add this particular path to the exception list in lieu of a larger refactor which should get rid of both the exceptions:
"qt/guiutil -> qt/walletmodel -> qt/guiutil
Removed the circular dependency(and removed a whitelisted one).
I'll rebase onto master once #17513 (comment) is merged
rebased onto master, split up into two commits for less conflict with https://github.com/bitcoin/bitcoin/pull/16373
rebased and ready for review now that RPC-version of this is merged
526 | + if (create_psbt) { 527 | + PartiallySignedTransaction psbtx(mtx); 528 | + bool complete = false; 529 | + const TransactionError err = wallet().fillPSBT(psbtx, complete, SIGHASH_ALL, false /* sign */, true /* bip32derivs */); 530 | + assert(!complete); 531 | + assert(err == TransactionError::OK);
Nit: check this first
for the future or in case I touch this again: why?
The value of complete isn't necessarily meaningful if err is set, I would say, so in that case it's probably less misleading to show a failure message referencing err, where one referencing complete seems potentially very misleading.
... actually, for the record, assert()s here kind of scare me -- is that a practice we generally use? Would it be better to do as we do above, and put up a critical messagebox and return failure? Blowing up the process is drastic here; the failure seems well-contained even if surprising.
pushed a commit to address the assert concern
Also because you changed that in the earlier PR too :-)
Code review ACK e3b19d869612b637f8bb702add0c363afe8adb8f
Code review ACK e3b19d8, nits/nice-to-haves:
At the risk of invalidating 3 ACKs, I pushed a commit that converts the asserts to error message box alert instead.
Thanks, code review ACK 267c77f.
Concept ACK on using QMessageBox::critical instead of assert. Are you sure it's always safe to continue putting the PSBT on the clipboard after a failure?
Concept ACK on using
QMessageBox::criticalinstead ofassert. Are you sure it's always safe to continue putting the PSBT on the clipboard after a failure?
Oh, indeed, there should be a "return false;" after the messagebox. This is what you get for making reasonable changes in response to review, Greg. :-(
fixed :)
utACK 3c30d71
code review ACK 3c30d71
ACK 3c30d7118a5d5cb40c3686e0da884d3928caaeba
nit: squash, but 3 ACKs, so meh.
We now have essentially the same code in the bumpfee RPC, in the GUI when drafting a transaction, and now here when bumping in the GUI too. It would be nice to consolidate it a bit. If you want to leave it to a follow-up though I am happy to merge this with the current ACKs.
Correct me if I'm wrong but I see 3 things that should be addressed later:
bumpFee should not be in the wallet model - could follow same approach as WalletControllerActivity - because IMO it's wrong to open message boxes (any GUI change) or copy to clipboard from a model class;bumpFee should be asynchronous - 1. above would help here - if from the GUI thread we hit cs_main or cs_wallet then that's bad;@meshcollider I'm going to claim ignorance on how to best structure QT code and ask you merge this as-is. Sorry!
Code review ACK 3c30d7118a5d5cb40c3686e0da884d3928caaeba.
I'll address my concerns in a follow up.
Given the 4 ACKs and self-confessed Qt ignorance, I'm going to merge this. Will open an issue to capture all the items that need addressing as followup.