public ConsensusService(IConsensusInformationGenerationService consensusInformationGenerationService, IConsensusScheduler consensusScheduler, ConsensusControlInformation consensusControlInformation) { _consensusInformationGenerationService = consensusInformationGenerationService; _consensusControlInformation = consensusControlInformation; _consensusScheduler = consensusScheduler; Logger = NullLogger <ConsensusService> .Instance; }
public DPoSInformationGenerationService(IAccountService accountService, ConsensusControlInformation controlInformation, ISmartContractAddressService smartContractAddressService, ITransactionReadOnlyExecutionService transactionReadOnlyExecutionService) { _accountService = accountService; _controlInformation = controlInformation; _smartContractAddressService = smartContractAddressService; _transactionReadOnlyExecutionService = transactionReadOnlyExecutionService; Logger = NullLogger <DPoSInformationGenerationService> .Instance; }
private IConsensusInformationGenerationService GetConsensusInformationGenerationService( DPoSBehaviour behavior) { var information = new ConsensusControlInformation() { ConsensusCommand = new ConsensusCommand { Hint = ByteString.CopyFrom(new DPoSHint { Behaviour = behavior }.ToByteArray()) } }; return(new DPoSInformationGenerationService(_accountService, information, _smartContractAddressService, _transactionReadOnlyExecutionService)); }
public ConsensusServiceTests() { _consensusService = GetRequiredService <IConsensusService>(); _consensusControlInformation = GetRequiredService <ConsensusControlInformation>(); }