Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
6006b693
Commit
6006b693
authored
Nov 17, 2020
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
fixed bloom filter generation
parent
dac807f2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
network/follow.go
+7
-1
7 additions, 1 deletion
network/follow.go
with
7 additions
and
1 deletion
network/follow.go
+
7
−
1
View file @
6006b693
...
...
@@ -34,6 +34,9 @@ import (
"time"
)
const
bloomFilterSize
=
71888
// In Bits
const
bloomFilterHashes
=
8
//comms interface makes testing easier
type
followNetworkComms
interface
{
GetHost
(
hostId
*
id
.
ID
)
(
*
connect
.
Host
,
bool
)
...
...
@@ -98,7 +101,10 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
}
var
filterList
[]
*
bloom
.
Ring
for
_
,
f
:=
range
pollResp
.
BloomFilters
{
filter
:=
&
bloom
.
Ring
{}
filter
,
err
:=
bloom
.
InitByParameters
(
bloomFilterSize
,
bloomFilterHashes
)
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"Unable to create a bloom filter: %v"
,
err
)
}
if
err
:=
filter
.
UnmarshalBinary
(
f
);
err
!=
nil
{
jww
.
WARN
.
Printf
(
"Failed to unmarshal filter: %+v"
,
err
)
continue
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment