diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-05-09 08:31:14 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-05-09 08:52:31 +0200 |
commit | f17032f703288d43a76cffe8fa89b87ade9e3074 (patch) | |
tree | c6b574f4b1adc85bfae534c46bbe9a3e4e740613 /src/test | |
parent | fbd84788e676c9cbd126f6236ec46bb2f342bd00 (diff) | |
parent | 1953c40aa9589a03035fd294f3ba3549374a4826 (diff) |
Merge #7934: Improve rolling bloom filter performance and benchmark
1953c40 More efficient bitsliced rolling Bloom filter (Pieter Wuille)
aa62b68 Benchmark rolling bloom filter (Pieter Wuille)
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/bloom_tests.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp index 9557000ddc..042fad42da 100644 --- a/src/test/bloom_tests.cpp +++ b/src/test/bloom_tests.cpp @@ -514,11 +514,14 @@ BOOST_AUTO_TEST_CASE(rolling_bloom) if (i >= 100) BOOST_CHECK(rb1.contains(data[i-100])); rb1.insert(data[i]); + BOOST_CHECK(rb1.contains(data[i])); } // Insert 999 more random entries: for (int i = 0; i < 999; i++) { - rb1.insert(RandomData()); + std::vector<unsigned char> d = RandomData(); + rb1.insert(d); + BOOST_CHECK(rb1.contains(d)); } // Sanity check to make sure the filter isn't just filling up: nHits = 0; |