Remove unused TransactionError constants #15408

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1902-TransactionErrorConst changing 9 files +45 −70
  1. MarcoFalke commented at 2:55 pm on February 14, 2019: member

    Fixup to #14978, which introduced a bunch of unused enum values, such as UNKNOWN_ERROR, ERROR_COUNT and TRANSACTION_ERR_LAST. None of those have a meaning in the context of an enum class, where the compiler can infer if all cases have been covered in a switch-case.

    Also, move the global ::maxTxFee back to the rpc caller, so it can be set on a per call basis (in the future).

  2. MarcoFalke added the label Refactoring on Feb 14, 2019
  3. MarcoFalke added the label Wallet on Feb 14, 2019
  4. MarcoFalke added the label RPC/REST/ZMQ on Feb 14, 2019
  5. in src/node/transaction.h:34 in fadc1b2197 outdated
    38- * return true on success, false on error (and fills in `error`)
    39+ * @param[in]  highfee Reject txs with fees higher than this (if 0, accept any fee)
    40+ * return error
    41  */
    42-bool BroadcastTransaction(CTransactionRef tx, uint256& txid, TransactionError& error, std::string& err_string, bool allowhighfees = false);
    43+TransactionError BroadcastTransaction(CTransactionRef tx, uint256& txid, std::string& err_string, const CAmount& highfee);
    


    practicalswift commented at 3:14 pm on February 14, 2019:
    NODISCARD?
  6. in src/wallet/psbtwallet.h:27 in fadc1b2197 outdated
    25  * @param[in]  bip32derivs whether to fill in bip32 derivation information if available
    26- * return true on success, false on error (and fills in `error`)
    27+ * return error
    28  */
    29-bool FillPSBT(const CWallet* pwallet,
    30+TransactionError FillPSBT(const CWallet* pwallet,
    


    practicalswift commented at 3:15 pm on February 14, 2019:
    NODISCARD?
  7. practicalswift commented at 3:15 pm on February 14, 2019: contributor

    Concept ACK

    Nice cleanup!

  8. MarcoFalke force-pushed on Feb 14, 2019
  9. Remove unused TransactionError constants fa9b60c842
  10. MarcoFalke force-pushed on Feb 14, 2019
  11. DrahtBot commented at 4:11 pm on February 14, 2019: 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:

    • #13541 (wallet/rpc: sendrawtransaction maxfeerate 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.

  12. gwillen commented at 1:30 am on February 15, 2019: contributor

    utACK

    The only thing I feel weird about here is the caller of BroadcastTransaction needing to know that there is a maxTxFee they are supposed to be using. Would it be possible to default that parameter to maxTxFee? (So that calls to BroadcastTransaction automatically obey the -maxtxfee command line flag if not overridden deliberately?)

  13. MarcoFalke commented at 12:27 pm on February 15, 2019: member
    The goal in the future is to have it as a per-call default that can be overwritten by each individual rpc call. So the default should really live in the scope of the rpc method.
  14. MarcoFalke merged this on Feb 22, 2019
  15. MarcoFalke closed this on Feb 22, 2019

  16. MarcoFalke referenced this in commit 169dced9a4 on Feb 22, 2019
  17. MarcoFalke deleted the branch on Feb 22, 2019
  18. deadalnix referenced this in commit d3946619fa on May 11, 2020
  19. Munkybooty referenced this in commit 010f5e8a47 on Sep 7, 2021
  20. dzutto referenced this in commit 4a317e2a93 on Sep 24, 2021
  21. dzutto referenced this in commit 5c8485e1bf on Sep 24, 2021
  22. dzutto referenced this in commit 9d84be1dd4 on Sep 24, 2021
  23. dzutto referenced this in commit 46b7464d15 on Sep 27, 2021
  24. dzutto referenced this in commit a9ce72a8bb on Sep 30, 2021
  25. UdjinM6 referenced this in commit 4c72a1a975 on Oct 1, 2021
  26. kittywhiskers referenced this in commit 963ceb0d92 on Oct 12, 2021
  27. DrahtBot locked this on Dec 16, 2021

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-11-17 09:12 UTC

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