public void TestSetup() { // protect against external changes on TimeProvider TimeProvider.ResetToDefault(); TestBlockchain.InitializeMockNeoSystem(); // Create a MemoryPool with capacity of 100 _unit = new MemoryPool(TestBlockchain.TheNeoSystem, 100); // Verify capacity equals the amount specified _unit.Capacity.Should().Be(100); _unit.VerifiedCount.Should().Be(0); _unit.UnVerifiedCount.Should().Be(0); _unit.Count.Should().Be(0); _unit2 = new MemoryPool(TestBlockchain.TheNeoSystem, 0); plugin = new TestIMemoryPoolTxObserverPlugin(); }
public void TestSetup() { // protect against external changes on TimeProvider TimeProvider.ResetToDefault(); // Create a MemoryPool with capacity of 100 _unit = new MemoryPool(new NeoSystem(ProtocolSettings.Default with { MemoryPoolMaxTransactions = 100 })); // Verify capacity equals the amount specified _unit.Capacity.Should().Be(100); _unit.VerifiedCount.Should().Be(0); _unit.UnVerifiedCount.Should().Be(0); _unit.Count.Should().Be(0); _unit2 = new MemoryPool(new NeoSystem(ProtocolSettings.Default with { MemoryPoolMaxTransactions = 0 })); plugin = new TestIMemoryPoolTxObserverPlugin(); }