Explicitly state our assumptions about LookupBlockIndex(...) return values #12782

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:LookupBlockIndex-assumptions changing 3 files +8 −2
  1. practicalswift commented at 5:05 AM on March 26, 2018: contributor

    Explicitly state our assumptions about LookupBlockIndex(...) return values.

  2. Explicitly state our assumptions about LookupBlockIndex(...) return values 3c7642f92b
  3. fanquake added the label Refactoring on Mar 26, 2018
  4. promag commented at 10:17 PM on April 5, 2018: member

    Concept ACK, but current change makes the code kind of ugly.

    I wonder if adding the following is preferable:

    // The caller knows the block index exists for the given block hash
    inline CBlockIndex* GetBlockIndex(const uint256& hash)
    {
        CBlockIndex* index = LookupBlockIndex(hash);
        assert(index);
        return index;
    }
    
  5. practicalswift closed this on Apr 5, 2018

  6. practicalswift deleted the branch on Apr 10, 2021
  7. 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