public void SetUp() { _rlpxPeer = new RlpxMock(_sessions); _discoveryApp = Substitute.For <IDiscoveryApp>(); _stats = new NodeStatsManager(new StatsConfig(), LimboLogs.Instance); _storage = new InMemoryStorage(); _peerLoader = new PeerLoader(new NetworkConfig(), _stats, _storage, LimboLogs.Instance); _networkConfig = new NetworkConfig(); _networkConfig.PeersPersistenceInterval = 50; _peerManager = new PeerManager(_rlpxPeer, _discoveryApp, _stats, _storage, _peerLoader, _networkConfig, LimboLogs.Instance); }
public Context() { RlpxPeer = new RlpxMock(Sessions); DiscoveryApp = Substitute.For <IDiscoveryApp>(); Stats = new NodeStatsManager(LimboLogs.Instance); Storage = new InMemoryStorage(); PeerLoader = new PeerLoader(new NetworkConfig(), new DiscoveryConfig(), Stats, Storage, LimboLogs.Instance); NetworkConfig = new NetworkConfig(); NetworkConfig.ActivePeersMaxCount = 25; NetworkConfig.PeersPersistenceInterval = 50; StaticNodesManager = Substitute.For <IStaticNodesManager>(); PeerManager = new PeerManager(RlpxPeer, DiscoveryApp, Stats, Storage, PeerLoader, NetworkConfig, LimboLogs.Instance, StaticNodesManager); }