コード例 #1
0
ファイル: MockSetup.cs プロジェクト: wyk125/AElf
        internal IMiner GetMiner(IMinerConfig config, ITxHub hub, ClientManager clientManager = null)
        {
            var miner = new AElf.Miner.Miner.Miner(config, hub, _chainService, _concurrencyExecutingService,
                                                   _transactionResultManager, _logger, clientManager, _binaryMerkleTreeManager, null,
                                                   MockBlockValidationService().Object, _chainContextService, _chainManagerBasic, _stateStore);

            return(miner);
        }
コード例 #2
0
        public MinerManager(IPoolConfig poolConfig, IDaemonClient daemonClient)
        {
            _minerConfig         = poolConfig.Miner;
            _metaConfig          = poolConfig.Meta;
            _daemonClient        = daemonClient;
            _stratumServerConfig = poolConfig.Stratum;

            _miners = new Dictionary <int, IMiner>();
            _logger = Log.ForContext <MinerManager>().ForContext("Component", poolConfig.Coin.Name);
        }
コード例 #3
0
ファイル: Miner.cs プロジェクト: wyk125/AElf
        public Miner(IMinerConfig config, ITxHub txHub, IChainService chainService,
                     IExecutingService executingService, ITransactionResultManager transactionResultManager,
                     ILogger logger, ClientManager clientManager,
                     IBinaryMerkleTreeManager binaryMerkleTreeManager, ServerManager serverManager,
                     IBlockValidationService blockValidationService, IChainContextService chainContextService, IChainManagerBasic chainManagerBasic, IStateStore stateStore)
        {
            Config                    = config;
            _txHub                    = txHub;
            _chainService             = chainService;
            _executingService         = executingService;
            _transactionResultManager = transactionResultManager;
            _logger                   = logger;
            _clientManager            = clientManager;
            _binaryMerkleTreeManager  = binaryMerkleTreeManager;
            _serverManager            = serverManager;
            _blockValidationService   = blockValidationService;
            _chainContextService      = chainContextService;
            _chainManagerBasic        = chainManagerBasic;
            _txFilter                 = new TransactionFilter();
            _dpoSInfoProvider         = new DPoSInfoProvider(stateStore);

            _maxMineTime = ConsensusConfig.Instance.DPoSMiningInterval * NodeConfig.Instance.RatioMine;
        }
コード例 #4
0
ファイル: MinerAutofacModule.cs プロジェクト: wyk125/AElf
 public MinerAutofacModule(IMinerConfig minerConfig)
 {
     MinerConf = minerConfig;
 }