mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Add ChainstateManagerOpts, using as ::Options
[META] Although it seems like we don't need it for just one option,
we're going to introduce another member to this struct *in the
next commit*. In future patchsets for libbitcoinkernel decoupling
it from ArgsManager, even more members will be added here.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <attributes.h>
|
||||
#include <chain.h>
|
||||
#include <chainparams.h>
|
||||
#include <kernel/chainstatemanager_opts.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <deploymentstatus.h>
|
||||
#include <fs.h>
|
||||
@@ -853,7 +854,10 @@ private:
|
||||
friend CChainState;
|
||||
|
||||
public:
|
||||
explicit ChainstateManager(const CChainParams& chainparams) : m_chainparams{chainparams} { }
|
||||
using Options = ChainstateManagerOpts;
|
||||
|
||||
explicit ChainstateManager(const Options& opts)
|
||||
: m_chainparams(opts.chainparams) {};
|
||||
|
||||
const CChainParams& GetParams() const { return m_chainparams; }
|
||||
const Consensus::Params& GetConsensus() const { return m_chainparams.GetConsensus(); }
|
||||
|
||||
Reference in New Issue
Block a user