/// <summary> /// Initializes the instance of the object. /// </summary> /// <param name="network">Specification of the network the node runs on - regtest/testnet/mainnet.</param> /// <param name="minerSettings">Settings relevant to mining or staking.</param> /// <param name="nodeSettings">The node's configuration settings.</param> /// <param name="loggerFactory">Factory to be used to create logger for the node.</param> /// <param name="powMining">POW miner.</param> /// <param name="posMinting">POS staker.</param> /// <param name="walletManager">Manager providing operations on wallets.</param> public MiningFeature( Network network, MinerSettings minerSettings, NodeSettings nodeSettings, ILoggerFactory loggerFactory, IPowMining powMining, IPosMinting posMinting = null, IWalletManager walletManager = null) { this.network = network; this.minerSettings = minerSettings; this.minerSettings.Load(nodeSettings); this.powMining = powMining; this.posMinting = posMinting; this.walletManager = walletManager; this.logger = loggerFactory.CreateLogger(this.GetType().FullName); }
public PowMining( ConsensusLoop consensusLoop, ConcurrentChain chain, Network network, MinerSettings minerSettings, AssemblerFactory blockAssemblerFactory, INodeLifetime nodeLifetime, IAsyncLoopFactory asyncLoopFactory, ILoggerFactory loggerFactory) { this.consensusLoop = consensusLoop; this.minerSettings = minerSettings; this.chain = chain; this.network = network; this.blockAssemblerFactory = blockAssemblerFactory; this.nodeLifetime = nodeLifetime; this.asyncLoopFactory = asyncLoopFactory; this.logger = loggerFactory.CreateLogger(this.GetType().FullName); }