コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <summary>
 /// Prints command-line help.
 /// </summary>
 /// <param name="network">The network to extract values from.</param>
 public static void PrintHelp(Network network)
 {
     MinerSettings.PrintHelp(network);
 }