コード例 #1
0
        public void Setup()
        {
            _session = Substitute.For <ISession>();
            _handler = new Eth62ProtocolHandler(
                _session,
                Substitute.For <IMessageSerializationService>(),
                Substitute.For <INodeStatsManager>(),
                Substitute.For <ISyncServer>(),
                Substitute.For <ITxPool>(),
                LimboLogs.Instance);

            _controller = new TxFloodController(_handler, LimboNoErrorLogger.Instance);
        }
コード例 #2
0
        public void Setup()
        {
            _session = Substitute.For <ISession>();
            _handler = new Eth62ProtocolHandler(
                _session,
                Substitute.For <IMessageSerializationService>(),
                Substitute.For <INodeStatsManager>(),
                Substitute.For <ISyncServer>(),
                Substitute.For <ITxPool>(),
                Substitute.For <IGossipPolicy>(),
                LimboLogs.Instance);

            _timestamper = Substitute.For <ITimestamper>();
            _timestamper.UtcNow.Returns(c => DateTime.UtcNow);
            _controller = new TxFloodController(_handler, _timestamper, LimboNoErrorLogger.Instance);
        }