mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
validation: Have ChainstateManager own m_chainparams
We want m_chainparams to be alive for the duration of ChainstateManager's lifetime since ChainstateManager's behaviour depends on m_chainparams. We could allow for a std::shared_ptr to be passed in as m_chainparams, but that complicates things further. Given that CChainParams is not an entity class or struct, we can just copy it and have ChainstateManager own it.
This commit is contained in:
parent
04c31c1295
commit
53494bc739
1 changed files with 1 additions and 1 deletions
|
@ -836,7 +836,7 @@ private:
|
|||
|
||||
CBlockIndex* m_best_invalid GUARDED_BY(::cs_main){nullptr};
|
||||
|
||||
const CChainParams& m_chainparams;
|
||||
const CChainParams m_chainparams;
|
||||
|
||||
const std::function<int64_t()> m_adjusted_time_callback;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue