diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-20 17:19:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-20 17:19:47 +0100 |
commit | f6f7fbbe98c110867febbcca647da8308be123c7 (patch) | |
tree | af69447cf4f08c417197685855c097c132aea8a1 /src/include/gnunet_block_group_lib.h | |
parent | a3882b58f1c5976677aa65b0af8a48e8e946b06e (diff) | |
download | gnunet-f6f7fbbe98c110867febbcca647da8308be123c7.tar.gz gnunet-f6f7fbbe98c110867febbcca647da8308be123c7.zip |
completed big block refactoring in preparation for SET-BLOCK integration
Diffstat (limited to 'src/include/gnunet_block_group_lib.h')
-rw-r--r-- | src/include/gnunet_block_group_lib.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/gnunet_block_group_lib.h b/src/include/gnunet_block_group_lib.h index 5fa14ce00..a1ea807f6 100644 --- a/src/include/gnunet_block_group_lib.h +++ b/src/include/gnunet_block_group_lib.h | |||
@@ -66,6 +66,20 @@ GNUNET_BLOCK_GROUP_bf_create (void *cls, | |||
66 | size_t raw_data_size); | 66 | size_t raw_data_size); |
67 | 67 | ||
68 | 68 | ||
69 | /** | ||
70 | * Test if @a hc is contained in the Bloom filter of @a bg. If so, | ||
71 | * return #GNUNET_YES. If not, add @a hc to the Bloom filter and | ||
72 | * return #GNUNET_NO. | ||
73 | * | ||
74 | * @param bg block group to use for testing | ||
75 | * @param hc hash of element to evaluate | ||
76 | * @return #GNUNET_YES if @a hc is (likely) a duplicate | ||
77 | * #GNUNET_NO if @a hc was definitively not in @bg (but now is) | ||
78 | */ | ||
79 | int | ||
80 | GNUNET_BLOCK_GROUP_bf_test_and_set (struct GNUNET_BLOCK_Group *bg, | ||
81 | const struct GNUNET_HashCode *hc); | ||
82 | |||
69 | 83 | ||
70 | #if 0 /* keep Emacsens' auto-indent happy */ | 84 | #if 0 /* keep Emacsens' auto-indent happy */ |
71 | { | 85 | { |