Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-kad-dht
Commits
ed147fe8
Commit
ed147fe8
authored
Jan 11, 2018
by
Dirk McCormick
Committed by
Steven Allen
Jan 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use record ValidationRecord in tests
parent
ce278c10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
dht_test.go
dht_test.go
+2
-3
No files found.
dht_test.go
View file @
ed147fe8
...
...
@@ -20,7 +20,6 @@ import (
peer
"github.com/libp2p/go-libp2p-peer"
pstore
"github.com/libp2p/go-libp2p-peerstore"
record
"github.com/libp2p/go-libp2p-record"
recpb "github.com/libp2p/go-libp2p-record/pb"
bhost
"github.com/libp2p/go-libp2p/p2p/host/basic"
ci
"github.com/libp2p/go-testutil/ci"
travisci
"github.com/libp2p/go-testutil/ci/travis"
...
...
@@ -51,7 +50,7 @@ func setupDHT(ctx context.Context, t *testing.T, client bool) *IpfsDHT {
}
d
.
Validator
[
"v"
]
=
&
record
.
ValidChecker
{
Func: func(*rec
pb.
Record) error {
Func
:
func
(
*
rec
ord
.
Validation
Record
)
error
{
return
nil
},
Sign
:
false
,
...
...
@@ -151,7 +150,7 @@ func TestValueGetSet(t *testing.T) {
defer
dhtB
.
host
.
Close
()
vf
:=
&
record
.
ValidChecker
{
Func: func(*rec
pb.
Record) error { return nil },
Func
:
func
(
*
rec
ord
.
Validation
Record
)
error
{
return
nil
},
Sign
:
false
,
}
nulsel
:=
func
(
_
string
,
bs
[][]
byte
)
(
int
,
error
)
{
return
0
,
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment