/// <summary> /// Initializes a new instance of the object. /// </summary> /// <param name="powMining">PoW miner.</param> /// <param name="loggerFactory">Factory to be used to create logger for the node.</param> /// <param name="walletManager">The wallet manager.</param> public MiningController(IPowMining powMining, ILoggerFactory loggerFactory, IWalletManager walletManager) { Guard.NotNull(powMining, nameof(powMining)); Guard.NotNull(loggerFactory, nameof(loggerFactory)); Guard.NotNull(walletManager, nameof(walletManager)); this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.walletManager = walletManager; this.powMining = powMining; }
/// <summary> /// Initializes a new instance of the object. /// </summary> /// <param name="powMining">PoW miner.</param> /// <param name="fullNode">Full node to offer mining RPC.</param> /// <param name="loggerFactory">Factory to be used to create logger for the node.</param> /// <param name="walletManager">The wallet manager.</param> public MiningRpcController(IPowMining powMining, IFullNode fullNode, ILoggerFactory loggerFactory, IWalletManager walletManager) : base(fullNode: fullNode) { Guard.NotNull(powMining, nameof(powMining)); Guard.NotNull(fullNode, nameof(fullNode)); Guard.NotNull(loggerFactory, nameof(loggerFactory)); Guard.NotNull(walletManager, nameof(walletManager)); this.fullNode = fullNode; this.logger = loggerFactory.CreateLogger("Impleum.Bitcoin.Fullnode"); this.walletManager = walletManager; this.powMining = powMining; }
/// <summary> /// Initializes a new instance of the object. /// </summary> /// <param name="powMining">PoW miner.</param> /// <param name="fullNode">Full node to offer mining RPC.</param> /// <param name="loggerFactory">Factory to be used to create logger for the node.</param> /// <param name="walletManager">The wallet manager.</param> /// <param name="posMinting">PoS staker or null if PoS staking is not enabled.</param> public MiningRPCController(IPowMining powMining, IFullNode fullNode, ILoggerFactory loggerFactory, IWalletManager walletManager, IPosMinting posMinting = null) : base(fullNode: fullNode) { Guard.NotNull(powMining, nameof(powMining)); Guard.NotNull(fullNode, nameof(fullNode)); Guard.NotNull(loggerFactory, nameof(loggerFactory)); Guard.NotNull(walletManager, nameof(walletManager)); this.fullNode = fullNode; this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.walletManager = walletManager; this.powMining = powMining; this.posMinting = posMinting; }
public MiningController(IConsensusManager consensusManager, IFullNode fullNode, ILoggerFactory loggerFactory, Network network, IPowMining powMining, IWalletManager walletManager) { Guard.NotNull(consensusManager, nameof(consensusManager)); Guard.NotNull(fullNode, nameof(fullNode)); Guard.NotNull(loggerFactory, nameof(loggerFactory)); Guard.NotNull(network, nameof(network)); Guard.NotNull(powMining, nameof(powMining)); Guard.NotNull(walletManager, nameof(walletManager)); this.consensusManager = consensusManager; this.logger = loggerFactory.CreateLogger("Impleum.Bitcoin.Fullnode"); this.miningFeature = fullNode.NodeFeature <MiningFeature>(); this.network = network; this.powMining = powMining; this.walletManager = walletManager; }
/// <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="timeSyncBehaviorState">State of time synchronization feature that stores collected data samples.</param> /// <param name="powMining">POW miner.</param> /// <param name="posMinting">POS staker.</param> public MiningFeature( Network network, MinerSettings minerSettings, NodeSettings nodeSettings, ILoggerFactory loggerFactory, ITimeSyncBehaviorState timeSyncBehaviorState, IPowMining powMining, IPosMinting posMinting = null) { this.network = network; this.minerSettings = minerSettings; this.nodeSettings = nodeSettings; this.powMining = powMining; this.timeSyncBehaviorState = timeSyncBehaviorState; this.posMinting = posMinting; this.logger = loggerFactory.CreateLogger(this.GetType().FullName); }
/// <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 MiningFeature( ConnectionManagerSettings connectionManagerSettings, Network network, MinerSettings minerSettings, NodeSettings nodeSettings, ILoggerFactory loggerFactory, ITimeSyncBehaviorState timeSyncBehaviorState, IPowMining powMining, IPosMinting posMinting = null) { this.connectionManagerSettings = connectionManagerSettings; this.network = network; this.minerSettings = minerSettings; this.nodeSettings = nodeSettings; this.powMining = powMining; this.timeSyncBehaviorState = timeSyncBehaviorState; this.posMinting = posMinting; this.logger = loggerFactory.CreateLogger("Impleum.Bitcoin.Fullnode"); }