doc: CChainState return values #16757

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:1909-docValABCS changing 2 files +22 −12
  1. MarcoFalke commented at 4:05 pm on August 29, 2019: member
    It will always return true, unless a system error such as #15305 occurred
  2. MarcoFalke force-pushed on Aug 29, 2019
  3. DrahtBot commented at 4:23 pm on August 29, 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:

    • #16743 (refactor: move LoadChainTip/RelayBlocks under CChainState by jamesob)
    • #16324 (Get cs_main out of the critical path in ProcessMessages by TheBlueMatt)
    • #16323 (Call ProcessNewBlock() asynchronously by TheBlueMatt)

    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.

  4. MarcoFalke force-pushed on Aug 29, 2019
  5. MarcoFalke renamed this:
    doc: ActivateBestChainStep return value
    doc: CChainState return values
    on Aug 29, 2019
  6. DrahtBot added the label Docs on Aug 29, 2019
  7. DrahtBot added the label Validation on Aug 29, 2019
  8. in src/validation.h:214 in fa79e17e6b outdated
    210@@ -211,7 +211,7 @@ static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024;
    211  * @param[in]   pblock  The block we want to process.
    212  * @param[in]   fForceProcessing Process this block even if unrequested; used for non-network block sources and whitelisted peers.
    213  * @param[out]  fNewBlock A boolean which is set to indicate if the block was first received via this call
    214- * @return True if state.IsValid()
    215+ * @returns If the block was processed. (Might return true for invalid blocks or false for valid blocks)
    


    promag commented at 10:05 am on August 30, 2019:
    2nd part is strange, maybe @returns If the block was processed, independently of block validity.

    MarcoFalke commented at 12:21 pm on September 3, 2019:
    Fixed
  9. doc: ActivateBestChainStep return value fa99efd054
  10. MarcoFalke force-pushed on Sep 3, 2019
  11. doc: move-only ActivateBestChain doxygen comment to header fa912a8ad5
  12. in src/validation.cpp:2478 in fa99efd054 outdated
    2471@@ -2472,6 +2472,8 @@ void CChainState::PruneBlockIndexCandidates() {
    2472 /**
    2473  * Try to make some progress towards making pindexMostWork the active block.
    2474  * pblock is either nullptr or a pointer to a CBlock corresponding to pindexMostWork.
    2475+ *
    2476+ * @returns true unless a system error occurred
    2477  */
    2478 bool CChainState::ActivateBestChainStep(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexMostWork, const std::shared_ptr<const CBlock>& pblock, bool& fInvalidFound, ConnectTrace& connectTrace)
    


    laanwj commented at 12:02 pm on September 10, 2019:
    As the method is defined there, shouldn’t this documentation be in the .h file? (same for CChainState::ActivateBestChain below)

    MarcoFalke commented at 12:38 pm on September 10, 2019:
    ActivateBestChainStep is marked private and was never meant to be exposed in the header. I think it makes sense to keep the documentation close to the function implementation

    MarcoFalke commented at 12:50 pm on September 10, 2019:
    Good point for the public method, though. So I fixed this for ABC only
  13. MarcoFalke commented at 12:50 pm on September 10, 2019: member
    Added a commit that can be reviewed with the git diff options --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space.
  14. MarcoFalke added this to the milestone 0.19.0 on Sep 10, 2019
  15. laanwj commented at 10:57 am on September 16, 2019: member
    ACK fa912a8ad5a94cd2bdc149400b1befb346621f03
  16. laanwj referenced this in commit 871d3ae45b on Sep 16, 2019
  17. laanwj merged this on Sep 16, 2019
  18. laanwj closed this on Sep 16, 2019

  19. MarcoFalke deleted the branch on Sep 16, 2019
  20. sidhujag referenced this in commit f0d2d15e05 on Sep 16, 2019
  21. jasonbcox referenced this in commit 3ee09fbcd8 on Oct 16, 2020
  22. kittywhiskers referenced this in commit df2f9b7dc5 on Oct 10, 2021
  23. kittywhiskers referenced this in commit 3134166fa9 on Oct 10, 2021
  24. kittywhiskers referenced this in commit 892bdcff8f on Oct 16, 2021
  25. kittywhiskers referenced this in commit 311d6519eb on Oct 16, 2021
  26. kittywhiskers referenced this in commit cf63794e05 on Oct 16, 2021
  27. kittywhiskers referenced this in commit 3e932b845e on Oct 21, 2021
  28. kittywhiskers referenced this in commit 80d08bb487 on Oct 22, 2021
  29. pravblockc referenced this in commit 6e991c00ac on Nov 18, 2021
  30. 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-24 15:12 UTC

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