Explicitly state our assumptions about LookupBlockIndex(...) return values.
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-
practicalswift commented at 5:05 AM on March 26, 2018: contributor
-
Explicitly state our assumptions about LookupBlockIndex(...) return values 3c7642f92b
- fanquake added the label Refactoring on Mar 26, 2018
-
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; } - practicalswift closed this on Apr 5, 2018
- practicalswift deleted the branch on Apr 10, 2021
- DrahtBot locked this on Aug 16, 2022