refactor: Remove nMyStartingHeight from CNode/Connman#20649
refactor: Remove nMyStartingHeight from CNode/Connman#20649maflcko merged 1 commit intobitcoin:masterfrom
Conversation
|
Concept ACK. I have a branch that does almost exactly the same as this. I don't think we even need to store |
I was thinking that it would be nice (in the future) if most message handling could be done without |
This would definitely be nice! At the moment, both places we send a I have a preference for not caching the block height in PeerManager since I think it makes isolating and testing behaviour more difficult, but either way, this is clearly a big improvement over the current code. |
|
🕵️ @sipa has been requested to review this pull request as specified in the REVIEWERS file. |
|
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. |
|
Code review ACK fa7afc076328ef3fbc56b51f62f7afae24701dae |
fa7afc0 to
faf54d4
Compare
|
rebased |
|
code review ACK faf54d4af483a5e107d47b16cfa47cdeb815e723 |
faf54d4 to
fa8a96a
Compare
|
Concept ACK |
|
Code review ACK fa8a96a |
fa8a96a to
faaa4f2
Compare
|
Rebased due to trivial conflict in adjacent line |
|
utACK faaa4f2 |
Summary: ``` CNode and CConnman keep track of the active chain height when CNodes have been created, but apart from serializing the int once (when sending a version message), it is unused. So it can simply be removed in favor of a single int in PeerMan that can do the same. ``` Backport of [[bitcoin/bitcoin#20649 | core#20649]]. Depends on D10884. Ref T1696. Test Plan: ninja all check-all ninja bitcoin-fuzzers Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Subscribers: PiRK Maniphest Tasks: T1696 Differential Revision: https://reviews.bitcoinabc.org/D10885
CNode and CConnman keep track of the active chain height when CNodes have been created, but apart from serializing the int once (when sending a version message), it is unused. So it can simply be removed in favor of a single int in PeerMan that can do the same.