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-swarm
Commits
1755039d
Commit
1755039d
authored
Sep 07, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gx: update go-libp2p-peerstore
parent
6a4fe011
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
package.json
package.json
+14
-14
testing/testing.go
testing/testing.go
+2
-1
No files found.
package.json
View file @
1755039d
...
...
@@ -9,9 +9,9 @@
"gxDependencies"
:
[
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
QSbtGXCyNrj34LWL8EgXyNNYDZ8r3SwQcpW5pPxVhLnM
"
,
"hash"
:
"Qm
ZNJyx9GGCX4GeuHnLB8fxaxMLs4MjTjHokxfQcCd6Nve
"
,
"name"
:
"go-libp2p-net"
,
"version"
:
"3.0.
8
"
"version"
:
"3.0.
9
"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -21,9 +21,9 @@
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
eKD8YT7887Xu6Z86iZmpYNxrLogJexqxEugSmaf14k64
"
,
"hash"
:
"Qm
da4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6
"
,
"name"
:
"go-libp2p-peerstore"
,
"version"
:
"
1.4.24
"
"version"
:
"
2.0.0
"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -33,9 +33,9 @@
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
cDUyb52N62J8ZamGgUWUyWc1MtuCBce7WFA4D9xA6cwF
"
,
"hash"
:
"Qm
U129xU8dM79BgR97hu4fsiUDkTQrNHbzkiYfyrkNci8o
"
,
"name"
:
"go-libp2p-transport"
,
"version"
:
"3.0.
8
"
"version"
:
"3.0.
9
"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -63,9 +63,9 @@
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
cw9fndogcYwyGs4a5TPDbnZPBLxvtrBZzpvyyVDzxDWT
"
,
"hash"
:
"Qm
V8KW6eBanaxCxGNrXx8Q3fZUqvumCz2Hwd2FGpb3vzYC
"
,
"name"
:
"go-tcp-transport"
,
"version"
:
"2.0.
8
"
"version"
:
"2.0.
9
"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -134,21 +134,21 @@
},
{
"author"
:
"stebalien"
,
"hash"
:
"Qm
d4VzS3T7ckhHcLCpWwgVMYe6RcKhYjNKfy1g7LJ5myjv
"
,
"hash"
:
"Qm
PGWMxTWBJwfH1dJo4J7eV4Fgpzb9gukPRkeEN1ycAkNu
"
,
"name"
:
"go-conn-security-multistream"
,
"version"
:
"0.1.
8
"
"version"
:
"0.1.
9
"
},
{
"author"
:
"steb"
,
"hash"
:
"Qm
efQrpDSYX6jQRtUyhcASFVBDkoAsDTPXemyxGMzA3phK
"
,
"hash"
:
"Qm
WRcKvbFVND1vSTJZv5imdBxmkj9FFJ5Jku1qWxasAAMo
"
,
"name"
:
"go-libp2p-transport-upgrader"
,
"version"
:
"0.1.
8
"
"version"
:
"0.1.
9
"
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
Wri2HWdxHjWBUermhWy7QWJqN1cV8Gd1QbDiB5m86f1H
"
,
"hash"
:
"Qm
ReYSQGHjf28pKf93FwyD72mLXoZo94MB2Cq6VBSUHvFB
"
,
"name"
:
"go-libp2p-secio"
,
"version"
:
"2.0.
8
"
"version"
:
"2.0.
9
"
}
],
"gxVersion"
:
"0.9.1"
,
...
...
testing/testing.go
View file @
1755039d
...
...
@@ -8,6 +8,7 @@ import (
metrics
"github.com/libp2p/go-libp2p-metrics"
inet
"github.com/libp2p/go-libp2p-net"
pstore
"github.com/libp2p/go-libp2p-peerstore"
pstoremem
"github.com/libp2p/go-libp2p-peerstore/pstoremem"
secio
"github.com/libp2p/go-libp2p-secio"
tptu
"github.com/libp2p/go-libp2p-transport-upgrader"
tcp
"github.com/libp2p/go-tcp-transport"
...
...
@@ -66,7 +67,7 @@ func GenSwarm(t *testing.T, ctx context.Context, opts ...Option) *swarm.Swarm {
p
:=
tu
.
RandPeerNetParamsOrFatal
(
t
)
ps
:=
pstore
.
NewPeerstore
()
ps
:=
pstore
mem
.
NewPeerstore
()
ps
.
AddPubKey
(
p
.
ID
,
p
.
PubKey
)
ps
.
AddPrivKey
(
p
.
ID
,
p
.
PrivKey
)
s
:=
swarm
.
NewSwarm
(
ctx
,
p
.
ID
,
ps
,
metrics
.
NewBandwidthCounter
())
...
...
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