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-core
Commits
b5892760
Commit
b5892760
authored
Jul 14, 2021
by
tavit ohanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use p2p istead of libp2p
parent
8d961aa9
Pipeline
#776
passed with stages
in 8 seconds
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
record/envelope_test.go
record/envelope_test.go
+4
-4
record/record_test.go
record/record_test.go
+1
-1
No files found.
record/envelope_test.go
View file @
b5892760
...
...
@@ -23,14 +23,14 @@ func (r *simpleRecord) Domain() string {
if
r
.
testDomain
!=
nil
{
return
*
r
.
testDomain
}
return
"
lib
p2p-testing"
return
"p2p-testing"
}
func
(
r
*
simpleRecord
)
Codec
()
[]
byte
{
if
r
.
testCodec
!=
nil
{
return
r
.
testCodec
}
return
[]
byte
(
"/
lib
p2p/testdata"
)
return
[]
byte
(
"/p2p/testdata"
)
}
func
(
r
*
simpleRecord
)
MarshalRecord
()
([]
byte
,
error
)
{
...
...
@@ -252,7 +252,7 @@ func TestEnvelopeValidateFailsForDifferentDomain(t *testing.T) {
func
TestEnvelopeValidateFailsIfPayloadTypeIsAltered
(
t
*
testing
.
T
)
{
var
(
rec
=
&
simpleRecord
{
message
:
"hello world!"
}
domain
=
"
lib
p2p-testing"
domain
=
"p2p-testing"
priv
,
_
,
err
=
test
.
RandTestKeyPair
(
crypto
.
Ed25519
,
256
)
)
...
...
@@ -273,7 +273,7 @@ func TestEnvelopeValidateFailsIfPayloadTypeIsAltered(t *testing.T) {
func
TestEnvelopeValidateFailsIfContentsAreAltered
(
t
*
testing
.
T
)
{
var
(
rec
=
&
simpleRecord
{
message
:
"hello world!"
}
domain
=
"
lib
p2p-testing"
domain
=
"p2p-testing"
priv
,
_
,
err
=
test
.
RandTestKeyPair
(
crypto
.
Ed25519
,
256
)
)
...
...
record/record_test.go
View file @
b5892760
...
...
@@ -2,7 +2,7 @@ package record
import
"testing"
var
testPayloadType
=
[]
byte
(
"/
lib
p2p/test/record/payload-type"
)
var
testPayloadType
=
[]
byte
(
"/p2p/test/record/payload-type"
)
type
testPayload
struct
{
unmarshalPayloadCalled
bool
...
...
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