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
892d5285
Commit
892d5285
authored
Nov 17, 2020
by
Richard T. Carback III
Browse files
Options
Downloads
Plain Diff
Merge branch 'XX-2828/authchan' of gitlab.com:elixxir/client into XX-2828/authchan
parents
e770a0b1
6006b693
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 @
892d5285
...
@@ -34,6 +34,9 @@ import (
...
@@ -34,6 +34,9 @@ import (
"time"
"time"
)
)
const
bloomFilterSize
=
71888
// In Bits
const
bloomFilterHashes
=
8
//comms interface makes testing easier
//comms interface makes testing easier
type
followNetworkComms
interface
{
type
followNetworkComms
interface
{
GetHost
(
hostId
*
id
.
ID
)
(
*
connect
.
Host
,
bool
)
GetHost
(
hostId
*
id
.
ID
)
(
*
connect
.
Host
,
bool
)
...
@@ -99,7 +102,10 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
...
@@ -99,7 +102,10 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
var
filterList
[]
*
bloom
.
Ring
var
filterList
[]
*
bloom
.
Ring
for
_
,
f
:=
range
pollResp
.
BloomFilters
{
for
_
,
f
:=
range
pollResp
.
BloomFilters
{
jww
.
INFO
.
Printf
(
"Bloom Filter received: %v"
,
f
)
jww
.
INFO
.
Printf
(
"Bloom Filter received: %v"
,
f
)
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
{
if
err
:=
filter
.
UnmarshalBinary
(
f
);
err
!=
nil
{
jww
.
WARN
.
Printf
(
"Failed to unmarshal filter: %+v"
,
err
)
jww
.
WARN
.
Printf
(
"Failed to unmarshal filter: %+v"
,
err
)
continue
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