Skip to content

Conversation

@jamesob
Copy link
Contributor

@jamesob jamesob commented Aug 28, 2019

This is part of the assumeutxo project:

Parent PR: #15606
Issue: #15605
Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal


Move more chainstate-related functionality to methods on CChainState. Nothing too interesting here, but needed to work with multiple chainstates. And brief to review. :)

Also fixes doc on ActivateBestChain.

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 28, 2019

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16224 (gui: Bilingual GUI error messages by hebasto)

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
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

utACK 70e969495191a89070a1308393a5749b37b11e8d

Copy link
Contributor

Choose a reason for hiding this comment

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

70e969495191a89070a1308393a5749b37b11e8d

this-> 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hah yeah, I guess we have yet to formalize anything around this but I prefer prefixing method calls with this-> for clarity. See the related IRC discussion.

Copy link
Contributor

Choose a reason for hiding this comment

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

re: #16743 (comment)

At some point I tried to allow lowerCase() for object methods as way to distinguish calls that use the current object from calls that don't (#14635), but agree that this-> helps without that option.

@jamesob
Copy link
Contributor Author

jamesob commented Sep 9, 2019

Thanks for the reviews so far. Have addressed feedback from @ryanofsky, @promag.

@Sjors
Copy link
Member

Sjors commented Sep 16, 2019

Code review ACK d5ec57c, modulo (documentation) rebase.

@jamesob jamesob force-pushed the 2019-08-au-chainstate-moves branch from d5ec57c to 3cf3673 Compare September 17, 2019 13:46
Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Nothing too interesting here

Can confirm. utACK 3cf3673. Removes wrapper functions and removes more ::ChainActive() and ::ChainstateActive() calls than it adds, so seems good.

Copy link
Contributor

Choose a reason for hiding this comment

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

re: #16743 (comment)

At some point I tried to allow lowerCase() for object methods as way to distinguish calls that use the current object from calls that don't (#14635), but agree that this-> helps without that option.

@maflcko
Copy link
Member

maflcko commented Sep 19, 2019

ACK 3cf3673

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

ACK 3cf36736e540cf06250701f0934a7946836d000d
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUgWggwAk5LJRQCCsph2Kzd8DOd0PsGc1rbpdt/XaoH4u+PbxXElKrFQMTKN86iD
dGeChxEFLVb6k/p9VXBm7ZL6fAw6WpINbJV4yMys7ZakJ9w3taZiH96SkKp5wPm4
83oH9jtSgIM3TV+0Y6mSDtBsEpHZz0RT+MjLdUTaUq/1Lh1ZESsokYX61rX9guth
l6ca5P7KVlb4iOrQSeEnUHXwkmOUQKFWORra1ZDkwgBxCv8PjNXnYUF7d8WIJzIl
sdDtEaJsONcdHbguz8Jh11U/hdzqV07v/scJYIFxCoTx7poAIiUvLG4tX0MM8yZW
a8qYnmY1Jbq+XKRc6+T9tDL6LLXDwQiW0Y2fG2Oz2y2eVccp+16HG5CmDCTIpw/H
POD9NkR/YIxSA6eWzP2ee1hKJJu63Bae7HCWE57jCLaC0Hla3FHYrdTbpIo70yIZ
rHigWoZCLVmgmCRomB9IMbDpsROvG/MXH0b/0hgeRVWIuCj1tRBSetYCm1RiQGCL
DTb1hvTS
=7wt1
-----END PGP SIGNATURE-----

Timestamp of file with hash e56693f3040a22575c73812bb2cbe85f4068287b758fc92f82ffa57153a7f872 -

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Sep 19, 2019
…hainState

3cf3673 refactoring: move ReplayBlocks under CChainState (James O'Beirne)
bcf73d3 refactoring: move LoadChainTip to CChainState method (James O'Beirne)
f5809d5 doc: fix CChainState::ActivateBestChain doc (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11):

  Parent PR: bitcoin#15606
  Issue: bitcoin#15605
  Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal

  ---

  Move more chainstate-related functionality to methods on CChainState. Nothing too interesting here, but needed to work with multiple chainstates. And brief to review. :)

  Also fixes doc on ActivateBestChain.

ACKs for top commit:
  MarcoFalke:
    ACK 3cf3673
  ryanofsky:
    Can confirm. utACK 3cf3673. Removes wrapper functions and removes more  ::ChainActive() and ::ChainstateActive() calls than it adds, so seems good.

Tree-SHA512: 4bf8a1dd454ca9d61c85f6736910fa7354c57acc0002e3a8e5ce494035d8280e4c20e066f03478eeff7d44195e7912c282a486526da9be53854b478b961affaa
@maflcko maflcko merged commit 3cf3673 into bitcoin:master Sep 19, 2019
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Sep 23, 2019
…hainState

3cf3673 refactoring: move ReplayBlocks under CChainState (James O'Beirne)
bcf73d3 refactoring: move LoadChainTip to CChainState method (James O'Beirne)
f5809d5 doc: fix CChainState::ActivateBestChain doc (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11):

  Parent PR: bitcoin#15606
  Issue: bitcoin#15605
  Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal

  ---

  Move more chainstate-related functionality to methods on CChainState. Nothing too interesting here, but needed to work with multiple chainstates. And brief to review. :)

  Also fixes doc on ActivateBestChain.

ACKs for top commit:
  MarcoFalke:
    ACK 3cf3673
  ryanofsky:
    Can confirm. utACK 3cf3673. Removes wrapper functions and removes more  ::ChainActive() and ::ChainstateActive() calls than it adds, so seems good.

Tree-SHA512: 4bf8a1dd454ca9d61c85f6736910fa7354c57acc0002e3a8e5ce494035d8280e4c20e066f03478eeff7d44195e7912c282a486526da9be53854b478b961affaa
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 16, 2020
…State

Summary:
3cf36736e540cf06250701f0934a7946836d000d refactoring: move ReplayBlocks under CChainState (James O'Beirne)
bcf73d3b84649c8786f0cccc6862dd1bbdb9950b refactoring: move LoadChainTip to CChainState method (James O'Beirne)
f5809d5b135c7f9de5217d3cda76638fe7eed58a doc: fix CChainState::ActivateBestChain doc (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11):

  Parent PR: #15606
  Issue: #15605
  Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal

  ---

  Move more chainstate-related functionality to methods on CChainState. Nothing too interesting here, but needed to work with multiple chainstates. And brief to review. :)

  Also fixes doc on ActivateBestChain.

ACKs for top commit:
  MarcoFalke:
    ACK 3cf36736e540cf06250701f0934a7946836d000d
  ryanofsky:
    Can confirm. utACK 3cf36736e540cf06250701f0934a7946836d000d. Removes wrapper functions and removes more  ::ChainActive() and ::ChainstateActive() calls than it adds, so seems good.

---

Backport of Core [[bitcoin/bitcoin#16743 | PR16743]]

Test Plan:
  ninja all check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7960
kwvg added a commit to kwvg/dash that referenced this pull request Oct 22, 2021
pravblockc pushed a commit to pravblockc/dash that referenced this pull request Nov 18, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants