Skip to content

refactor: Pass reference to LookUpStats - #25222

Merged
maflcko merged 1 commit into
bitcoin:masterfrom
maflcko:2205-ref-stat-😶
Sep 13, 2022

Hidden character warning

The head ref may contain hidden characters: "2205-ref-stat-\ud83d\ude36"
Merged

maflcko merged 1 commit into
bitcoin:masterfrom
maflcko:2205-ref-stat-😶

Conversation

@maflcko

@maflcko maflcko commented May 26, 2022

Copy link
Copy Markdown
Member

I find it confusing to have an interface that accepts nullptr, but immediately crashes the program when someone does pass nullptr.

Fix that.

Also some include fixups.

@jonatack

Copy link
Copy Markdown
Member

Concept ACK

CHECK_NONFATAL(condition) or NONFATAL_UNREACHABLE should be used instead of assert for RPC code.
src/rpc/blockchain.cpp:827:            CBlockIndex& block_index = *Assert(WITH_LOCK(::cs_main, return blockman.LookupBlockIndex(view->GetBestBlock())));

^---- failure generated from lint-assertions.py

@maflcko

maflcko commented May 27, 2022

Copy link
Copy Markdown
Member Author

Thx, fixed

@DrahtBot

DrahtBot commented Jun 2, 2022 •

Copy link
Copy Markdown
Contributor

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24230 (indexes: Stop using node internal types and locking cs_main, improve sync logic by ryanofsky)

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.

@jonatack

Copy link
Copy Markdown
Member

Approach ACK, changes LGTM on first read over GitHub, checked that a lifetimebound annotation isn't needed.

@aureleoules aureleoules left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK faa3d38

@maflcko
maflcko merged commit 141540a into bitcoin:master Sep 13, 2022
@maflcko
maflcko deleted the 2205-ref-stat-😶 branch September 13, 2022 12:25
@bitcoin bitcoin locked and limited conversation to collaborators Sep 13, 2023
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.

4 participants