Пример #1
0
        public ValidatorClient(ILogger <ValidatorClient> logger,
                               IOptionsMonitor <InitialValues> initialValueOptions,
                               IOptionsMonitor <TimeParameters> timeParameterOptions,
                               IOptionsMonitor <SignatureDomains> signatureDomainOptions,
                               ICryptographyService cryptographyService,
                               IBeaconNodeApi beaconNodeApi,
                               IValidatorKeyProvider validatorKeyProvider,
                               BeaconChainInformation beaconChainInformation)
        {
            _logger = logger;
            _initialValueOptions    = initialValueOptions;
            _timeParameterOptions   = timeParameterOptions;
            _signatureDomainOptions = signatureDomainOptions;
            _cryptographyService    = cryptographyService;
            _beaconNodeApi          = beaconNodeApi;
            _validatorKeyProvider   = validatorKeyProvider;
            _beaconChainInformation = beaconChainInformation;

            _validatorState = new ValidatorState();
            _cache          = new MemoryCache(new MemoryCacheOptions());
        }
Пример #2
0
        public ValidatorClient(ILogger <ValidatorClient> logger,
                               IOptionsMonitor <MiscellaneousParameters> miscellaneousParameterOptions,
                               IOptionsMonitor <TimeParameters> timeParameterOptions,
                               IOptionsMonitor <MaxOperationsPerBlock> maxOperationsPerBlockOptions,
                               IOptionsMonitor <SignatureDomains> signatureDomainOptions,
                               ICryptographyService cryptographyService,
                               IBeaconNodeApi beaconNodeApi,
                               IValidatorKeyProvider validatorKeyProvider,
                               BeaconChain beaconChain)
        {
            _logger = logger;
            _miscellaneousParameterOptions = miscellaneousParameterOptions;
            _timeParameterOptions          = timeParameterOptions;
            _maxOperationsPerBlockOptions  = maxOperationsPerBlockOptions;
            _signatureDomainOptions        = signatureDomainOptions;
            _cryptographyService           = cryptographyService;
            _beaconNodeApi        = beaconNodeApi;
            _validatorKeyProvider = validatorKeyProvider;
            _beaconChain          = beaconChain;

            _validatorState = new ValidatorState();
        }