Page MenuHomePhabricator

rpc/blockchain: Use existing NodeContext
ClosedPublic

Authored by PiRK on May 20 2022, 14:49.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC053eb6c9cd7f: rpc/blockchain: Use existing NodeContext
Summary

Also pass in appropriate object to: BIP9SoftForkDescPushBack

PR context: De-globalize ChainstateManager

This is a backport of core#21391
https://github.com/bitcoin/bitcoin/pull/21391/commits/d485e815e2b62dc74a485569d08130dc3ef9ff63

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.May 20 2022, 14:49
PiRK planned changes to this revision.May 20 2022, 15:17

There are more simplifications:

  • chainman.ActiveChain().Tip -> chainman.ActiveTip()
  • chainman.ActiveChain().Height() -> chainman.ActiveHeight()

use chainman.ActiveTip() and chainman.ActiveHeight() as suggested by John Newberry in his late review of the source commit.

This revision is now accepted and ready to land.May 23 2022, 12:45
This revision was automatically updated to reflect the committed changes.