Example #1
0
 public RootProtocol(RootProtocolId id, IPublicConsensusKeySet wallet, ECDSAPrivateKey privateKey,
                     IConsensusBroadcaster broadcaster, IValidatorAttendanceRepository validatorAttendanceRepository,
                     ulong cycleDuration, bool useNewChainId) : base(wallet, id, broadcaster)
 {
     _keyPair = new EcdsaKeyPair(privateKey);
     _rootId  = id;
     _validatorAttendanceRepository = validatorAttendanceRepository;
     _cycleDuration = cycleDuration;
     _useNewChainId = useNewChainId;
 }
Example #2
0
 public EraBroadcaster(
     long era, IConsensusMessageDeliverer consensusMessageDeliverer,
     IPrivateWallet wallet, IValidatorAttendanceRepository validatorAttendanceRepository
     )
 {
     _consensusMessageDeliverer = consensusMessageDeliverer;
     _messageFactory            = new MessageFactory(wallet.EcdsaKeyPair);
     _wallet     = wallet;
     _terminated = false;
     _era        = era;
     _myIdx      = -1;
     _validatorAttendanceRepository = validatorAttendanceRepository;
 }
 public ValidatorStatusManager(
     ITransactionPool transactionPool,
     ITransactionSigner transactionSigner,
     ITransactionBuilder transactionBuilder,
     IPrivateWallet privateWallet,
     IStateManager stateManager,
     IValidatorAttendanceRepository validatorAttendanceRepository,
     ISystemContractReader systemContractReader
     )
 {
     _transactionPool               = transactionPool;
     _transactionSigner             = transactionSigner;
     _transactionBuilder            = transactionBuilder;
     _privateWallet                 = privateWallet;
     _stateManager                  = stateManager;
     _validatorAttendanceRepository = validatorAttendanceRepository;
     _systemContractReader          = systemContractReader;
     _withdrawTriggered             = false;
     _started       = false;
     _thread        = null;
     _stopRequested = false;
 }