public void Can_collect_stats() { StateProvider provider = new StateProvider(new StateDb(new MemDb()), Substitute.For <IDb>(), Logger); provider.CreateAccount(TestItem.AddressA, 1.Ether()); provider.Commit(MuirGlacier.Instance); provider.CommitTree(); var stats = provider.CollectStats(); stats.AccountCount.Should().Be(1); }
public void Can_collect_stats() { StateProvider provider = new StateProvider(new TrieStore(new MemDb(), Logger), _codeDb, Logger); provider.CreateAccount(TestItem.AddressA, 1.Ether()); provider.Commit(MuirGlacier.Instance); provider.CommitTree(0); var stats = provider.CollectStats(_codeDb, Logger); stats.AccountCount.Should().Be(1); }