Ejemplo n.º 1
0
 /// <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="posMinting">PoS staker or null if PoS staking is not enabled.</param>
 public MiningRPCController(PowMining powMining, IFullNode fullNode, ILoggerFactory loggerFactory, PosMinting posMinting = null) : base(fullNode: fullNode)
 {
     this.fullNode   = fullNode;
     this.logger     = loggerFactory.CreateLogger(this.GetType().FullName);
     this.powMining  = powMining;
     this.posMinting = posMinting;
 }
Ejemplo n.º 2
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="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,
     PowMining powMining,
     PosMinting posMinting       = null,
     WalletManager 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);
 }
Ejemplo n.º 3
0
 public MiningRPCController(PowMining mining, IFullNode fullNode) : base(fullNode: fullNode)
 {
     this.Mining = mining;
 }