rpc: gui: Don’t change behavior based on private keys disabled, instead add new buttons/rpcs/menu items #18627

pull achow101 wants to merge 11 commits into bitcoin:master from achow101:split-watchonly changing 22 files +543 −177
  1. achow101 commented at 8:40 pm on April 13, 2020: member

    Instead of changing some actions’ behavior based on IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS), make separate things that work with no private keys. In particular, instead of having bumpfee give out a psbt when there are no private keys, add a psbtbumpfee RPC that always gives out a psbt and just have bumpfee be disabled when there are no private keys. This is mirrored in the GUI bumpfee menu items. Additionally, instead of changing the Send button to Create Unsigned when there are no private keys, just always have a Create Unsigned button and disable Send when there are no private keys. To deal with bumpfee already doing the mutated behavior thing, that behavior is hidden behind a -deprecatedrpc=bumpfee option.

    To make the GUI stuff easier to follow, test, and review, this is being based on #17509

  2. [gui] send dialog: split on_sendButton_clicked
    This commit does not change behavior.
    db6d79ddee
  3. [util] GetFileSize 681180bf45
  4. Move DEFAULT_MAX_RAW_TX_FEE_RATE to node/transaction.h
    So it can be used in the GUI.
    338fc48802
  5. [gui] save PSBT to file
    co-authored-by: Glenn Willen <gwillen@nerdnet.org>
    ca5f205a98
  6. [gui] load PSBT
    co-authored-by: Glenn Willen <gwillen@nerdnet.org>
    4bb1d6cf5d
  7. [psbt] add file size limit d6ddc56383
  8. Refactor bumpfee to have bulk of it in separate function cb1cc08bab
  9. Add psbtbumpfee RPC 9ed98a4b49
  10. Add Make Unsigned Tx button instead of changing Send's behavior
    Instead of changing Send to make an unsigned tx for wallets with
    private keys disabled, have a separate button for that functionality
    and disable Send for such wallets.
    27d6ada6eb
  11. Add bumpFeePSBT action instead of changing normal bumpfee behavior
    Instead of changing GUI bumpfee behavior based on private keys,
    make a separate menu action to do that.
    b916e088ae
  12. DrahtBot added the label GUI on Apr 13, 2020
  13. DrahtBot added the label RPC/REST/ZMQ on Apr 13, 2020
  14. DrahtBot added the label Tests on Apr 13, 2020
  15. DrahtBot added the label Utils/log/libs on Apr 13, 2020
  16. DrahtBot added the label Wallet on Apr 13, 2020
  17. DrahtBot commented at 10:18 pm on April 13, 2020: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #18647 (rpc: remove g_rpc_node by brakmic)
    • #18618 (gui: Drop RecentRequestsTableModel dependency to WalletModel by promag)
    • #18608 (refactor: Remove CAddressBookData::destdata by ryanofsky)
    • #18592 (rpc: replace raw pointers with shared_ptrs by brakmic)
    • #18246 (wip: gui: Drop connectSlotsByName usage by promag)
    • #18027 (“PSBT Operations” dialog by gwillen)
    • #17956 (gui: Disable unavailable context menu items in transactions tab by kristapsk)
    • #17509 (gui: save and load PSBT by Sjors)
    • #17463 (Bugfix: GUI: Restore SendConfirmationDialog button default to “Yes” by luke-jr)
    • #17457 (gui: Fix manual coin control with multiple wallets loaded by promag)
    • #17034 (Bip174 extensions by achow101)
    • #16528 (Native Descriptor Wallets using DescriptorScriptPubKeyMan by achow101)
    • #16463 ([BIP 174] Implement serialization support for GLOBAL_XPUB field. by achow101)
    • #14485 (Try to use posix_fadvise with CBufferedFile by luke-jr)
    • #11413 ([wallet] [rpc] sendtoaddress/sendmany: Add explicit feerate option by kallewoof)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  18. instagibbs commented at 5:43 pm on April 14, 2020: member

    concept and light GUI tACK https://github.com/bitcoin/bitcoin/pull/18627/commits/11f2521fcec83a194bcbb39521d8f8015fead361

    1. Still means that if someone imports a privkey in the future to a multisig descriptor wallet, the “send” button will be clickable. Not sure how to avoid this aside from explicitly explicitly knowing that it has all pieces of data to complete any transaction it creates.
    2. There’s no offer to write the PSBT to disk in the GUI for bump fee, just clipboard
    3. Maybe the PSBT options should be gated behind an Expert option in Options for the GUI?
  19. jb55 commented at 6:16 pm on April 14, 2020: member
    Concept ACK
  20. Hide bumpfee's psbt creation behavior behind -deprecatedrpc
    With psbtbumpfee, we can deprecate bumpfee's psbt creation behavior.
    So put that behind a -deprecatedrpc
    55436f3cc2
  21. achow101 force-pushed on Apr 14, 2020
  22. jonasschnelli commented at 8:11 am on April 15, 2020: contributor
    Concept ACK Would it be possible to split this into n smaller PRs?
  23. achow101 commented at 7:00 pm on April 15, 2020: member
    This has been split into #18654 (psbtbumpfee RPC), #18655 (bumpFeePSBT action), and #18656 (make unsigned button).
  24. achow101 closed this on Apr 15, 2020

  25. meshcollider referenced this in commit 8a85377cd0 on Aug 13, 2020
  26. sidhujag referenced this in commit 7f858cac62 on Aug 14, 2020
  27. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me