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: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    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. jamesob cross-referenced this on Sep 9, 2019 from issue refactor: move LoadChainTip/RelayBlocks under CChainState by jamesob
  12. doc: move-only ActivateBestChain doxygen comment to header fa912a8ad5
  13. 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

  14. 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.

  15. MarcoFalke added this to the milestone 0.19.0 on Sep 10, 2019
  16. laanwj commented at 10:57 AM on September 16, 2019: member

    ACK fa912a8ad5a94cd2bdc149400b1befb346621f03

  17. laanwj referenced this in commit 871d3ae45b on Sep 16, 2019
  18. laanwj merged this on Sep 16, 2019
  19. laanwj closed this on Sep 16, 2019

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