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 BlockMiningEventHandler(IMinerService minerService, IBlockAttachService blockAttachService, ITaskQueueManager taskQueueManager) { _minerService = minerService; _blockAttachService = blockAttachService; _taskQueueManager = taskQueueManager; Logger = NullLogger <BlockMiningEventHandler> .Instance; }
public ContractBasicTests() { _blockchainService = GetRequiredService <IBlockchainService>(); _miningService = GetRequiredService <IMiningService>(); _blockAttachService = GetRequiredService <IBlockAttachService>(); _transactionResultManager = GetRequiredService <ITransactionResultManager>(); InitializeTestContracts(); }
public ContractTestService(IContractTesterFactory contractTesterFactory, IBlockchainService blockchainService, IMiningService miningService, IBlockAttachService blockAttachService) { _contractTesterFactory = contractTesterFactory; _blockchainService = blockchainService; _miningService = miningService; _blockAttachService = blockAttachService; }
public BlockAttachServiceTests() { _blockAttachService = GetRequiredService <IBlockAttachService>(); _smartContractExecutionHelper = GetRequiredService <SmartContractExecutionHelper>(); _kernelTestHelper = GetRequiredService <KernelTestHelper>(); _blockchainService = GetRequiredService <IBlockchainService>(); _blockExecutingService = GetRequiredService <IBlockExecutingService>(); _smartContractAddressService = GetRequiredService <ISmartContractAddressService>(); }
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 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 BlockSyncAttachService(IBlockchainService blockchainService, IBlockAttachService blockAttachService, IBlockValidationService validationService, IBlockSyncQueueService blockSyncQueueService) { Logger = NullLogger <BlockSyncAttachService> .Instance; _blockchainService = blockchainService; _blockAttachService = blockAttachService; _validationService = validationService; _blockSyncQueueService = blockSyncQueueService; }
public async Task GlobalSetup() { _chains = GetRequiredService <IBlockchainStore <Chain> >(); _blockStateSets = GetRequiredService <INotModifiedCachedStateStore <BlockStateSet> >(); _chainManager = GetRequiredService <IChainManager>(); _blockManager = GetRequiredService <IBlockManager>(); _blockchainService = GetRequiredService <IBlockchainService>(); _blockAttachService = GetRequiredService <IBlockAttachService>(); _transactionManager = GetRequiredService <ITransactionManager>(); _osTestHelper = GetRequiredService <OSTestHelper>(); _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 BlockSyncAttachService(IBlockchainService blockchainService, IBlockAttachService blockAttachService, IBlockSyncValidationService blockSyncValidationService, IBlockSyncQueueService blockSyncQueueService) { Logger = NullLogger <BlockSyncAttachService> .Instance; LocalEventBus = NullLocalEventBus.Instance; _blockchainService = blockchainService; _blockAttachService = blockAttachService; _blockSyncValidationService = blockSyncValidationService; _blockSyncQueueService = blockSyncQueueService; }
public ParallelTests() { _blockchainService = GetRequiredService <IBlockchainService>(); _blockExecutingService = GetRequiredService <IBlockExecutingService>(); _transactionResultManager = GetRequiredService <ITransactionResultManager>(); _grouper = GetRequiredService <ITransactionGrouper>(); _contractRemarksService = GetRequiredService <IContractRemarksService>(); _txHub = GetRequiredService <ITxHub>(); _blockAttachService = GetRequiredService <IBlockAttachService>(); _accountService = GetRequiredService <IAccountService>(); _parallelTestHelper = GetRequiredService <ParallelTestHelper>(); _smartContractAddressService = GetRequiredService <ISmartContractAddressService>(); }
public BlockSyncJob(IBlockAttachService blockAttachService, IOptionsSnapshot <NetworkOptions> networkOptions, IBlockchainService blockchainService, INetworkService networkService, ITaskQueueManager taskQueueManager) { Logger = NullLogger <BlockSyncJob> .Instance; _networkOptions = networkOptions.Value; _blockchainService = blockchainService; _networkService = networkService; _blockAttachService = blockAttachService; _taskQueueManager = taskQueueManager; }
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 ParallelTests() { _blockchainService = GetRequiredService <IBlockchainService>(); _blockExecutingService = GetRequiredService <IBlockExecutingService>(); _transactionResultManager = GetRequiredService <ITransactionResultManager>(); _grouper = GetRequiredService <ITransactionGrouper>(); _blockchainStateService = GetRequiredService <IBlockchainStateService>(); _txHub = GetRequiredService <ITxHub>(); _blockAttachService = GetRequiredService <IBlockAttachService>(); _accountService = GetRequiredService <IAccountService>(); _parallelTestHelper = GetRequiredService <ParallelTestHelper>(); _smartContractAddressService = GetRequiredService <ISmartContractAddressService>(); _blockchainStateManager = GetRequiredService <IBlockchainStateManager>(); _versionedStates = GetRequiredService <IStateStore <VersionedState> >(); _nonparallelContractCodeProvider = GetRequiredService <INonparallelContractCodeProvider>(); _blockStateSetManger = GetRequiredService <IBlockStateSetManger>(); }
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 Setup(BenchmarkContext context) { _blockchainService = GetRequiredService <IBlockchainService>(); _blockAttachService = GetRequiredService <IBlockAttachService>(); _osTestHelper = GetRequiredService <OSTestHelper>(); _counter = context.GetCounter("TestCounter"); AsyncHelper.RunSync(async() => { var chain = await _blockchainService.GetChainAsync(); var transactions = await _osTestHelper.GenerateTransferTransactions(1000); _block = _osTestHelper.GenerateBlock(chain.BestChainHash, chain.BestChainHeight, transactions); }); }