-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Call CHECK_NONFATAL only once where needed #24956
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
The head ref may contain hidden characters: "2204-once-check-tip-\u{1F985}"
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
vincenzopalazzo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa3ef70
fa3ef70 to
fab34d3
Compare
|
Rebased |
jonatack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review ACK fab34d3
| obj.pushKV("verificationprogress", GuessVerificationProgress(Params().TxData(), tip)); | ||
| obj.pushKV("bestblockhash", tip.GetBlockHash().GetHex()); | ||
| obj.pushKV("difficulty", GetDifficulty(&tip)); | ||
| obj.pushKV("time", int64_t{tip.nTime}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| obj.pushKV("time", int64_t{tip.nTime}); | |
| obj.pushKV("time", tip.GetBlockTime()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx. I'll leave this for the next force push, if there is one, or a follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll update #25016 based on this and add it there.
…ollow-ups e2b954e rpc: use GetBlockTime() for getblockchaininfo#time (Jon Atack) 86ce844 blockstorage, refactor: pass GetFirstStoredBlock() start_block by reference (Jon Atack) ed12c0a blockstorage, refactor: make GetFirstStoredBlock() a member of BlockManager (Jon Atack) Pull request description: Picks up the remaining review feedback in #21726 and #24956. - make the global function `GetFirstStoredBlock()` a member of the `BlockManager` class - pass the `start_block` param of `GetFirstStoredBlock()` by reference instead of a pointer - use `GetBlockTime()` for RPC getblockchaininfo#time ACKs for top commit: MarcoFalke: ACK e2b954e Tree-SHA512: 546e3c2e18245996b5b286829a605ae919eff3510963ec71b7c9ede521b1f501697e5b2f9d35d7a0606a74cbc8907201c58acf1e2cf7daaa86eefe2e3a8e296b
fab34d3 Call CHECK_NONFATAL only once where needed (MarcoFalke) Pull request description: Now that `CHECK_NONFATAL` is the identity function starting with commit b1c5991, it can be called less often in places where it was called more than once on the same value. ACKs for top commit: jonatack: Review ACK fab34d3 Tree-SHA512: ae221d7ee81f8d0be7ab21ce54d5d209e691df8a5c7f4a6f6db282453391904f87f533a2b7f85d6259827de8b85dacd9e0d9dbeecc4245a338247e0893ff3459
…ninfo follow-ups e2b954e rpc: use GetBlockTime() for getblockchaininfo#time (Jon Atack) 86ce844 blockstorage, refactor: pass GetFirstStoredBlock() start_block by reference (Jon Atack) ed12c0a blockstorage, refactor: make GetFirstStoredBlock() a member of BlockManager (Jon Atack) Pull request description: Picks up the remaining review feedback in bitcoin#21726 and bitcoin#24956. - make the global function `GetFirstStoredBlock()` a member of the `BlockManager` class - pass the `start_block` param of `GetFirstStoredBlock()` by reference instead of a pointer - use `GetBlockTime()` for RPC getblockchaininfo#time ACKs for top commit: MarcoFalke: ACK e2b954e Tree-SHA512: 546e3c2e18245996b5b286829a605ae919eff3510963ec71b7c9ede521b1f501697e5b2f9d35d7a0606a74cbc8907201c58acf1e2cf7daaa86eefe2e3a8e296b
Summary: This is a backport of [[bitcoin/bitcoin#24956 | core#24956]] Depends on D13097 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, sdulfari, Fabien Reviewed By: #bitcoin_abc, sdulfari, Fabien Subscribers: sdulfari Differential Revision: https://reviews.bitcoinabc.org/D13098
Now that
CHECK_NONFATALis the identity function starting with commit b1c5991, it can be called less often in places where it was called more than once on the same value.