Page MenuHomePhabricator

Add BlockManagerOpts::chainparams reference
ClosedPublic

Authored by PiRK on Thu, Apr 18, 14:32.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCd893f446d0af: Add BlockManagerOpts::chainparams reference
Summary

and use it in blockstorage.cpp

PR rationale:

Seems confusing to pass chainparams to each method individually, when the params can't change anyway for the whole lifetime of the block manager, and also must be equal to the ones used by the chainstate manager.

Fix this issue by removing them from the methods and instead storing a reference once in a member field.

This is a partial backport of core#27570
https://github.com/bitcoin/bitcoin/pull/27570/commits/facdb8b331da17c10b122deb28f6d71d5797f063
(partial) https://github.com/bitcoin/bitcoin/pull/27570/commits/fa5d7c39eb992467e43b12db213b27913374fb83

Depends on D16010

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable