Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

practicalswift
Copy link
Contributor

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

@promag
Copy link
Member

promag commented Apr 5, 2018

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 practicalswift deleted the LookupBlockIndex-assumptions branch April 10, 2021 19:34
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants