diff options
author | Pieter Wuille <pieter@wuille.net> | 2021-05-04 18:13:33 -0700 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-10-21 09:39:16 +0800 |
commit | 54b5e1aeab73953c1f12ec2c041572038f6f59da (patch) | |
tree | 51eaed3c1a086b5d0cc866fb140652308b09199f /src/test/minisketch_tests.cpp | |
parent | ee9dc71c1bc16205494f2a0aebe575a3c062ff52 (diff) | |
download | bitcoin-54b5e1aeab73953c1f12ec2c041572038f6f59da.tar.xz |
Add thin Minisketch wrapper to pick best implementation
Diffstat (limited to 'src/test/minisketch_tests.cpp')
-rw-r--r-- | src/test/minisketch_tests.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/minisketch_tests.cpp b/src/test/minisketch_tests.cpp index 7211ddfaad..6798331936 100644 --- a/src/test/minisketch_tests.cpp +++ b/src/test/minisketch_tests.cpp @@ -3,6 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <minisketch.h> +#include <minisketchwrapper.h> #include <random.h> #include <test/util/setup_common.h> @@ -24,13 +25,13 @@ BOOST_AUTO_TEST_CASE(minisketch_test) uint32_t start_b = start_a + a_not_b; uint32_t end_b = start_b + both + b_not_a; - Minisketch sketch_a(32, 0, 10); + Minisketch sketch_a = MakeMinisketch32(10); for (uint32_t a = start_a; a < end_a; ++a) sketch_a.Add(a); - Minisketch sketch_b(32, 0, 10); + Minisketch sketch_b = MakeMinisketch32(10); for (uint32_t b = start_b; b < end_b; ++b) sketch_b.Add(b); - Minisketch sketch_ar(32, 0, 10); - Minisketch sketch_br(32, 0, 10); + Minisketch sketch_ar = MakeMinisketch32(10); + Minisketch sketch_br = MakeMinisketch32(10); sketch_ar.Deserialize(sketch_a.Serialize()); sketch_br.Deserialize(sketch_b.Serialize()); |