Fix parameter naming inconsistencies between .h and .cpp files #10029

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:fix-header-parameter-naming-inconsistencies changing 5 files +9 −9
  1. practicalswift commented at 8:27 PM on March 18, 2017: contributor

    Inconsistencies prior to this commit:

    * serializeFlags vs serialFlags
    src/core_io.h:std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
    src/core_write.cpp:std::string EncodeHexTx(const CTransaction& tx, const int serialFlags)
    
    * statusOut vs outStatus
    src/rpc/server.h:bool RPCIsInWarmup(std::string *statusOut);
    src/rpc/server.cpp:bool RPCIsInWarmup(std::string *outStatus)
    
    * hashesToUpdate vs vHashesToUpdate
    src/txmempool.h:    void UpdateTransactionsFromBlock(const std::vector<uint256> &hashesToUpdate);
    src/txmempool.cpp:void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256> &vHashesToUpdate)
    
    * nPruneUpToHeight vs nManualPruneHeight
    src/validation.h:void PruneBlockFilesManual(int nPruneUpToHeight);
    src/validation.cpp:void PruneBlockFilesManual(int nManualPruneHeight)
    
  2. paveljanik commented at 8:30 PM on March 18, 2017: contributor

    Report univalue upstream.

  3. practicalswift force-pushed on Mar 18, 2017
  4. practicalswift force-pushed on Mar 18, 2017
  5. practicalswift force-pushed on Mar 18, 2017
  6. practicalswift commented at 8:35 PM on March 18, 2017: contributor

    @paveljanik Thanks for noticing! Removed univalue inconsistency from this PR.

  7. paveljanik commented at 8:40 PM on March 18, 2017: contributor
    bitcoin-10029 pavel$ git grep hashesToUpdate
    src/txmempool.cpp:// for each entry, look for descendants that are outside hashesToUpdate, and
    bitcoin-10029 pavel$ 
    
  8. practicalswift force-pushed on Mar 18, 2017
  9. practicalswift commented at 8:50 PM on March 18, 2017: contributor

    @paveljanik Thanks! Fixed, squashed and pushed! :-)

  10. fanquake added the label Refactoring on Mar 19, 2017
  11. in src/core_io.h:29 in 5206d866fe outdated
      25 | @@ -26,7 +26,7 @@ std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strN
      26 |  
      27 |  // core_write.cpp
      28 |  std::string FormatScript(const CScript& script);
      29 | -std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
      30 | +std::string EncodeHexTx(const CTransaction& tx, const int serialFlags = 0);
    


    paveljanik commented at 12:43 PM on March 19, 2017:

    Here, I prefer the longer name. Flags are about the serialization not about the "serial" number or so. But kets wait for other opinions before changing it right away ;-)


    laanwj commented at 12:53 PM on March 19, 2017:

    Yes definitely use serializeFlags.


    practicalswift commented at 3:15 PM on March 19, 2017:

    @paveljanik @laanwj Good point! Fixed, squashed and pushed! :-)

  12. laanwj commented at 12:55 PM on March 19, 2017: member

    Why would we care about divergences of internal and external parameter name? I think this unnecessarily opens the window for naming bikeshedding discussions.

  13. MarcoFalke commented at 1:31 PM on March 19, 2017: member

    I think the downside is that it looks kinda odd in the doxygen auto-suggest search bar:

    PruneBlockFilesManual

    PruneBlockFilesManual(int nManualPruneHeight): validation.cpp PruneBlockFilesManual(int nPruneUpToHeight): validation.cpp

  14. Fix parameter naming inconsistencies between .h and .cpp files
    Inconsistencies prior to this commit:
    
    * serializeFlags vs serialFlags
    src/core_io.h:std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
    src/core_write.cpp:std::string EncodeHexTx(const CTransaction& tx, const int serialFlags)
    
    * statusOut vs outStatus
    src/rpc/server.h:bool RPCIsInWarmup(std::string *statusOut);
    src/rpc/server.cpp:bool RPCIsInWarmup(std::string *outStatus)
    
    * hashesToUpdate vs vHashesToUpdate
    src/txmempool.h:    void UpdateTransactionsFromBlock(const std::vector<uint256> &hashesToUpdate);
    src/txmempool.cpp:void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256> &vHashesToUpdate)
    
    * nPruneUpToHeight vs nManualPruneHeight
    src/validation.h:void PruneBlockFilesManual(int nPruneUpToHeight);
    src/validation.cpp:void PruneBlockFilesManual(int nManualPruneHeight);
    97b8213674
  15. practicalswift force-pushed on Mar 19, 2017
  16. MarcoFalke commented at 10:10 AM on March 20, 2017: member

    utACK 97b8213

  17. fanquake commented at 10:56 PM on March 22, 2017: member

    utACK 97b8213

  18. jonasschnelli commented at 7:15 AM on March 23, 2017: contributor

    utACK #97b82136740fc625acd2251fe722fd4f0872c244

  19. jonasschnelli merged this on Mar 23, 2017
  20. jonasschnelli closed this on Mar 23, 2017

  21. jonasschnelli referenced this in commit 86f7d5b69b on Mar 23, 2017
  22. PastaPastaPasta referenced this in commit d2308ca167 on Mar 14, 2019
  23. PastaPastaPasta referenced this in commit eec497961c on May 20, 2019
  24. PastaPastaPasta referenced this in commit 2aa3f890d1 on May 21, 2019
  25. PastaPastaPasta referenced this in commit f4c3117f65 on May 21, 2019
  26. barrystyle referenced this in commit b3d6c4b01d on Jan 22, 2020
  27. practicalswift deleted the branch on Apr 10, 2021
  28. DrahtBot locked this on Aug 16, 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-16 15:15 UTC

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