コード例 #1
0
 public HandshakeProcessor(ILogger <HandshakeProcessor> logger,
                           IEventBus eventBus,
                           IDateTimeProvider dateTimeProvider,
                           IRandomNumberGenerator randomNumberGenerator,
                           NodeImplementation nodeImplementation,
                           IPeerBehaviorManager peerBehaviorManager,
                           IInitialBlockDownloadTracker initialBlockDownloadState,
                           IUserAgentBuilder userAgentBuilder,
                           ILocalServiceProvider localServiceProvider,
                           IHeadersTree headersTree,
                           SelfConnectionTracker selfConnectionTracker) : base(logger,
                                                                               eventBus,
                                                                               peerBehaviorManager,
                                                                               isHandshakeAware: true,
                                                                               // we are performing handshake so we want to receive messages before handshake status
                                                                               receiveMessagesOnlyIfHandshaked: false)
 {
     _dateTimeProvider          = dateTimeProvider;
     _randomNumberGenerator     = randomNumberGenerator;
     _nodeImplementation        = nodeImplementation;
     _initialBlockDownloadState = initialBlockDownloadState;
     _userAgentBuilder          = userAgentBuilder;
     _localServiceProvider      = localServiceProvider;
     _headersTree           = headersTree;
     _selfConnectionTracker = selfConnectionTracker;
     _status = new HandshakeProcessorStatus(this);
 }
コード例 #2
0
 public HandshakeProcessor(ILogger <HandshakeProcessor> logger,
                           IEventBus eventBus,
                           IDateTimeProvider dateTimeProvider,
                           IRandomNumberGenerator randomNumberGenerator,
                           NodeImplementation nodeImplementation,
                           IPeerBehaviorManager peerBehaviorManager,
                           IUserAgentBuilder userAgentBuilder
                           ) : base(logger,
                                    eventBus,
                                    peerBehaviorManager,
                                    isHandshakeAware: true,
                                    // we are performing handshake so we want to receive messages before handshake status
                                    receiveMessagesOnlyIfHandshaked: false)
 {
     _dateTimeProvider      = dateTimeProvider;
     _randomNumberGenerator = randomNumberGenerator;
     _nodeImplementation    = nodeImplementation;
     _userAgentBuilder      = userAgentBuilder;
     _status = new HandshakeProcessorStatus(this);
 }