Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Apr 24, 2022

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.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 25, 2022

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24595 (deploymentstatus: move g_versionbitscache global to ChainstateManager by ajtowns)

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.

Copy link

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

ACK fa3ef70

@maflcko maflcko force-pushed the 2204-once-check-tip- branch from fa3ef70 to fab34d3 Compare April 27, 2022 11:36
@maflcko
Copy link
Member Author

maflcko commented Apr 27, 2022

Rebased

Copy link
Member

@jonatack jonatack left a 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});
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
obj.pushKV("time", int64_t{tip.nTime});
obj.pushKV("time", tip.GetBlockTime());

Copy link
Member Author

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.

Copy link
Member

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.

@maflcko maflcko merged commit dabec99 into bitcoin:master Apr 28, 2022
@maflcko maflcko deleted the 2204-once-check-tip-🦅 branch April 28, 2022 18:26
fanquake added a commit that referenced this pull request Apr 29, 2022
…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
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 29, 2022
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
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 29, 2022
…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
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Feb 14, 2023
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
@bitcoin bitcoin locked and limited conversation to collaborators Apr 28, 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