public OSTestHelper(IOsBlockchainNodeContextService osBlockchainNodeContextService, IAccountService accountService, IMinerService minerService, IBlockchainService blockchainService, ITxHub txHub, ISmartContractAddressService smartContractAddressService, IBlockAttachService blockAttachService, IStaticChainInformationProvider staticChainInformationProvider, ITransactionResultService transactionResultService, IOptionsSnapshot <ChainOptions> chainOptions) { _chainOptions = chainOptions.Value; _osBlockchainNodeContextService = osBlockchainNodeContextService; _accountService = accountService; _minerService = minerService; _blockchainService = blockchainService; _smartContractAddressService = smartContractAddressService; _blockAttachService = blockAttachService; _txHub = txHub; _staticChainInformationProvider = staticChainInformationProvider; _transactionResultService = transactionResultService; BestBranchBlockList = new List <Block>(); ForkBranchBlockList = new List <Block>(); UnlinkedBranchBlockList = new List <Block>(); }
public void Init() { _transactionVerifier = Services.GetService <ITransactionVerifier>(); _difficultyService = Services.GetService <IDifficultyService>(); _blockChainService = Services.GetService <IBlockChainService>(); _minerService = Services.GetService <IMinerService>(); }
public DataSynchronizerWorker(ISettingsService settingsService, IMinerService minerService, ISnapshotService snapshotService, IServerService serverService, ILogger <DataSynchronizerWorker> logger) { _settingsService = settingsService; _minerService = minerService; _snapshotService = snapshotService; _serverService = serverService; _logger = logger; }
public BlockMiningEventHandler(IMinerService minerService, IBlockAttachService blockAttachService, ITaskQueueManager taskQueueManager) { _minerService = minerService; _blockAttachService = blockAttachService; _taskQueueManager = taskQueueManager; Logger = NullLogger <BlockMiningEventHandler> .Instance; }
public MinerServiceTests() { _transactionPoolService = GetRequiredService <ITransactionPoolService>(); _blockTransactionLimitProvider = GetRequiredService <IBlockTransactionLimitProvider>(); _transactionPackingOptionProvider = GetRequiredService <ITransactionPackingOptionProvider>(); _minerService = GetRequiredService <IMinerService>(); _blockStateSetManger = GetRequiredService <IBlockStateSetManger>(); _blockchainService = GetRequiredService <IBlockchainService>(); _kernelTestHelper = GetRequiredService <KernelTestHelper>(); }
public ConsensusRequestMiningEventHandler(IMinerService minerService, IBlockAttachService blockAttachService, ITaskQueueManager taskQueueManager, IBlockchainService blockchainService) { _minerService = minerService; _blockAttachService = blockAttachService; _taskQueueManager = taskQueueManager; _blockchainService = blockchainService; Logger = NullLogger <ConsensusRequestMiningEventHandler> .Instance; LocalEventBus = NullLocalEventBus.Instance; }
public DataCollectorWorker( IMinerService minerService, ISnapshotService snapshotService, IRemoteManagementClientFactory clientFactory, ILogger <DataCollectorWorker> logger) { _minerService = minerService; _snapshotService = snapshotService; _clientFactory = clientFactory; _logger = logger; }
public ConsensusRequestMiningEventHandler(IServiceProvider serviceProvider) { _minerService = serviceProvider.GetService <IMinerService>(); _blockAttachService = serviceProvider.GetService <IBlockAttachService>(); _taskQueueManager = serviceProvider.GetService <ITaskQueueManager>(); _blockchainService = serviceProvider.GetService <IBlockchainService>(); _consensusService = serviceProvider.GetService <IConsensusService>(); Logger = NullLogger <ConsensusRequestMiningEventHandler> .Instance; LocalEventBus = NullLocalEventBus.Instance; }
public async Task GlobalSetup() { _blockchainService = GetRequiredService <IBlockchainService>(); _osTestHelper = GetRequiredService <OSTestHelper>(); _minerService = GetRequiredService <IMinerService>(); _blockStateSets = GetRequiredService <INotModifiedCachedStateStore <BlockStateSet> >(); _transactionManager = GetRequiredService <ITransactionManager>(); _transactionPoolService = GetRequiredService <ITransactionPoolService>(); _transactions = new List <Transaction>(); _chain = await _blockchainService.GetChainAsync(); }
public ParallelTests() { _blockchainService = GetRequiredService <IBlockchainService>(); _blockExecutingService = GetRequiredService <IBlockExecutingService>(); _minerService = GetRequiredService <IMinerService>(); _transactionResultManager = GetRequiredService <ITransactionResultManager>(); _grouper = GetRequiredService <ITransactionGrouper>(); _codeRemarksManager = GetRequiredService <ICodeRemarksManager>(); _txHub = GetRequiredService <ITxHub>(); _blockAttachService = GetRequiredService <IBlockAttachService>(); _accountService = GetRequiredService <IAccountService>(); _parallelTestHelper = GetRequiredService <ParallelTestHelper>(); }
public void GlobalSetup() { _blockchainService = GetRequiredService <IBlockchainService>(); _blockExecutingService = GetRequiredService <IBlockExecutingService>(); _minerService = GetRequiredService <IMinerService>(); _blockStateSets = GetRequiredService <INotModifiedCachedStateStore <BlockStateSet> >(); _osTestHelper = GetRequiredService <OSTestHelper>(); _prepareTransactions = new List <Transaction>(); _systemTransactions = new List <Transaction>(); _cancellableTransactions = new List <Transaction>(); _keyPairs = new List <ECKeyPair>(); }
public AlertScanWorker( IAlertDefinitionService alertDefinitionService, IAlertService alertService, ISnapshotService snapshotService, IMinerService minerService, IScanFactory scanFactory, ILogger <AlertScanWorker> logger) { _alertDefinitionService = alertDefinitionService; _alertService = alertService; _snapshotService = snapshotService; _minerService = minerService; _scanFactory = scanFactory; _logger = logger; }
public ParallelTestHelper(IOsBlockchainNodeContextService osBlockchainNodeContextService, IAccountService accountService, IMinerService minerService, IBlockchainService blockchainService, ITxHub txHub, ISmartContractAddressService smartContractAddressService, IBlockAttachService blockAttachService, IStaticChainInformationProvider staticChainInformationProvider, ITransactionResultService transactionResultService, IOptionsSnapshot <ChainOptions> chainOptions) : base(osBlockchainNodeContextService, accountService, minerService, blockchainService, txHub, smartContractAddressService, blockAttachService, staticChainInformationProvider, transactionResultService, chainOptions) { _accountService = accountService; _staticChainInformationProvider = staticChainInformationProvider; }
public CollectorService( UserManager <MiningMonitorUser> userManager, ILoginService loginService, IMinerService minerService, ISnapshotService snapshotService, IMapper <MiningMonitorUser, Collector> collectorMapper, IUpdateMapper <Collector, MiningMonitorUser> userMapper, IMapper <IdentityResult, ModelStateDictionary> resultMapper) { _userManager = userManager; _loginService = loginService; _minerService = minerService; _snapshotService = snapshotService; _collectorMapper = collectorMapper; _userMapper = userMapper; _resultMapper = resultMapper; }
public void Setup(BenchmarkContext context) { _blockchainService = GetRequiredService <IBlockchainService>(); _osTestHelper = GetRequiredService <OSTestHelper>(); _minerService = GetRequiredService <IMinerService>(); _txHub = GetRequiredService <ITxHub>(); _blockAttachService = GetRequiredService <IBlockAttachService>(); _counter = context.GetCounter("TestCounter"); AsyncHelper.RunSync(async() => { var transactions = await _osTestHelper.GenerateTransferTransactions(1000); await _osTestHelper.BroadcastTransactions(transactions); }); }
public void Init() { _blockChainPath = Configurations.CurrentPath + "\\BlockChain\\"; _blockChainFullPath = $"{_blockChainPath}\\Chain\\"; _blockInfoDbFullPath = _blockChainPath + "\\Data\\BlockInfo.sqlite"; _logger = Services.GetService <ILogger>(); _transactionVerifier = Services.GetService <ITransactionVerifier>(); _blockVerifier = Services.GetService <IBlockVerifier>(); _server = Services.GetService <IP2PServer>(); _eventManager = Services.GetService <IEventManager>(); _eventManager.RegisterEventListener(OnNewBlock, EventTypes.EventType.NewBlock); _mappingService = Services.GetService <IMappingService>(); _minerService = Services.GetService <IMinerService>(); _walletService = Services.GetService <IWalletService>(); TryConnectToBlockInfoDb(); TryLoadSavedInfo(); _askedForRequests = new List <InvitationRequest>(); }
public void Init() { _logger = Services.GetService <ILogger>(); _unspentDbFullPath = $"{Configurations.CurrentPath}\\BlockChain\\Data\\Unspent.sqlite"; var ev = Services.GetService <IEventManager>(); ev.RegisterEventListener(OnNewBlock, EventTypes.EventType.NewVerifiedBlock); ev.RegisterEventListener(OnNewTransaction, EventTypes.EventType.NewTransaction); _blockChainService = Services.GetService <IBlockChainService>(); _minerService = Services.GetService <IMinerService>(); _mappingService = Services.GetService <IMappingService>(); TryConnectToUnspentDB(); if (!IsLoadedIn(_blockChainService.Info.EndOfLongestChain)) { _logger.Log("Need to backload the Unspent db for some reasons"); LoadEveryNewBlock(); } }
public void Init() { _logger = Services.GetService <ILogger>(); _mappingService = Services.GetService <IMappingService>(); _server = Services.GetService <IP2PServer>(); _minerService = Services.GetService <IMinerService>(); _eventManager = Services.GetService <IEventManager>(); _blockChainService = Services.GetService <IBlockChainService>(); _catchDataFullPath = $"{Configurations.CurrentPath}\\BlockChain\\Catchup"; _logger.Log("Ketchup started to flow ....", 1); CaughtUp = false; bufferedTransactions = new List <Transaction>(); bufferedBlockInfos = new List <BlockInfo>(); supposedLongestBlockId = ""; shouldTryEnd = false; LastGotResponse = DateTime.UtcNow; if (!Directory.Exists(_catchDataFullPath)) { Directory.CreateDirectory(_catchDataFullPath); } }
public HomeController(IMinerService minerServ, IUserService userService) { this.minerService = minerServ; this.userService = userService; }
public MiningRequestService(IMinerService minerService) { _minerService = minerService; }
public MinersController(IMinerService minerService, ICollectorService collectorService) { _minerService = minerService; _collectorService = collectorService; }
public MinerServiceTests() { _chainService = GetRequiredService <IBlockchainService>(); _minerService = GetRequiredService <IMinerService>(); }
public MiningTxHubBenchmark() { _minerService = GetRequiredService <IMinerService>(); _transactionManager = GetRequiredService <ITransactionManager>(); }
public BlockTemplateMinerService(IMinerService minerService, IAccountService accountService) { _minerService = minerService; _accountService = accountService; }