doc: Replace remaining literal BTC with CURRENCY_UNIT. #18341

pull domob1812 wants to merge 1 commits into bitcoin:master from domob1812:currency-unit changing 2 files +2 −2
  1. domob1812 commented at 10:42 AM on March 13, 2020: contributor

    This replaces one remaining instance of the literal "BTC" string with the CURRENCY_UNIT constant, as is done in most of the codebase already.

    After this change, no instance of literal "BTC" remains anywhere in the RPC help texts.

  2. in src/wallet/rpcwallet.cpp:3364 in e8e20e843f outdated
    3360 | @@ -3361,7 +3361,7 @@ static UniValue bumpfee(const JSONRPCRequest& request)
    3361 |              "                         the dust threshold."},
    3362 |                              {"fee_rate", RPCArg::Type::NUM, /* default */ "fallback to 'confTarget'", "FeeRate (NOT total fee) to pay, in " + CURRENCY_UNIT + " per kB\n"
    3363 |              "                         Specify a fee rate instead of relying on the built-in fee estimator.\n"
    3364 | -            "                         Must be at least 0.0001 BTC per kB higher than the current transaction fee rate.\n"},
    3365 | +            "                         Must be at least 0.0001 " + CURRENCY_UNIT + " per kB higher than the current transaction fee rate.\n"},
    


    MarcoFalke commented at 11:49 AM on March 13, 2020:
                                         "Must be at least 0.0001 " + CURRENCY_UNIT + " per kB higher than the current transaction fee rate.\n"},
    

    Can shorten the string now that it is touched for other reasons


    domob1812 commented at 12:07 PM on March 13, 2020:

    Makes sense, I've applied the change. I'll squash everything into a single commit when review is otherwise done.

  3. MarcoFalke renamed this:
    Replace remaining literal BTC with CURRENCY_UNIT.
    doc: Replace remaining literal BTC with CURRENCY_UNIT.
    on Mar 13, 2020
  4. MarcoFalke commented at 12:12 PM on March 13, 2020: member

    I think this is ready to merge if it compiles

  5. DrahtBot added the label Docs on Mar 13, 2020
  6. DrahtBot added the label RPC/REST/ZMQ on Mar 13, 2020
  7. DrahtBot added the label Wallet on Mar 13, 2020
  8. practicalswift commented at 12:47 PM on March 13, 2020: contributor

    Concept ACK

    FWIW:

    $ git grep BTC -- "*.cpp" "*.h" ":(exclude)src/qt/" ":(exclude)src/wallet/test/" ":(exclude)src/test/" | grep -vE ': *(//|\*)'
    src/policy/feerate.cpp:const std::string CURRENCY_UNIT = "BTC";
    src/validation.cpp:        LogPrint(BCLog::MEMPOOL, "replacing tx %s with %s for %s BTC additional fees, %d delta bytes\n",
    src/wallet/rpcwallet.cpp:            "                         Must be at least 0.0001 BTC per kB higher than the current transaction fee rate.\n"},
    
  9. domob1812 force-pushed on Mar 13, 2020
  10. domob1812 commented at 12:53 PM on March 13, 2020: contributor

    Concept ACK

    FWIW:

    $ git grep BTC -- "*.cpp" "*.h" ":(exclude)src/qt/" ":(exclude)src/wallet/test/" ":(exclude)src/test/" | grep -vE ': *(//|\*) .*'
    src/policy/feerate.cpp:const std::string CURRENCY_UNIT = "BTC";
    src/validation.cpp:        LogPrint(BCLog::MEMPOOL, "replacing tx %s with %s for %s BTC additional fees, %d delta bytes\n",
    src/wallet/rpcwallet.cpp:            "                         Must be at least 0.0001 BTC per kB higher than the current transaction fee rate.\n"},
    

    Good catch (I was only targeting the RPC help texts so far, as that is what I worked on when I noticed this). I've updated the PR, replacing also the validation.cpp instance (and squashed the commits).

  11. in src/validation.cpp:977 in e8a301a8d4 outdated
     973 | @@ -974,7 +974,7 @@ bool MemPoolAccept::Finalize(ATMPArgs& args, Workspace& ws)
     974 |      // Remove conflicting transactions from the mempool
     975 |      for (CTxMemPool::txiter it : allConflicting)
     976 |      {
     977 | -        LogPrint(BCLog::MEMPOOL, "replacing tx %s with %s for %s BTC additional fees, %d delta bytes\n",
     978 | +        LogPrint(BCLog::MEMPOOL, "replacing tx %s with %s for %s " + CURRENCY_UNIT + " additional fees, %d delta bytes\n",
    


    MarcoFalke commented at 2:49 PM on March 13, 2020:
            LogPrint(BCLog::MEMPOOL, "replacing tx %s with %s for %s additional fees, %d delta bytes\n",
    

    I think we can just remove the unit here


    domob1812 commented at 8:25 AM on March 14, 2020:

    Good point, I agree as this is just a log message and not really user visible. I've removed it here.

  12. domob1812 force-pushed on Mar 13, 2020
  13. hebasto commented at 4:37 PM on March 13, 2020: member

    Concept ACK.

  14. Replace remaining literals BTC with CURRENCY_UNIT
    This replaces one remaining instance of the literal "BTC" string with
    the CURRENCY_UNIT constant, as is done in most of the codebase already.
    
    The other remaining instance (which is just part of a log message and thus
    not really user-visible) is just removed.
    
    After this change, no instance of literal "BTC" remains anywhere in the
    non-Qt and non-test codebase.
    7df0cf719f
  15. domob1812 force-pushed on Mar 14, 2020
  16. MarcoFalke commented at 3:07 PM on March 14, 2020: member

    ACK 7df0cf719fecf1b8d09801295db8bd2137bfe033

  17. laanwj commented at 12:12 PM on March 16, 2020: member

    ACK 7df0cf719fecf1b8d09801295db8bd2137bfe033 Doesn't change any translation strings so can go into 0.20.0.

  18. laanwj merged this on Mar 16, 2020
  19. laanwj closed this on Mar 16, 2020

  20. domob1812 deleted the branch on Mar 16, 2020
  21. sidhujag referenced this in commit a937b5b74f on Mar 16, 2020
  22. MarkLTZ referenced this in commit 1a3a8bdd1b on Apr 19, 2020
  23. MarkLTZ referenced this in commit 86e5d3c44a on Apr 19, 2020
  24. sidhujag referenced this in commit 1e3631b361 on Nov 10, 2020
  25. 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: 2026-04-13 15:14 UTC

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