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
dms3
go-unixfs
Commits
70ea4f54
Commit
70ea4f54
authored
10 years ago
by
Juan Batiz-Benet
Committed by
Brian Tiger Chow
10 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added peerstore to core
parent
9c6a3b20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
core/core.go
core/core.go
+5
-3
No files found.
core/core.go
View file @
70ea4f54
...
...
@@ -34,8 +34,8 @@ type IpfsNode struct {
// the local node's identity
Identity
*
peer
.
Peer
//
the map of other nodes (
Peer instances
)
Peer
Map
*
peer
.
Map
//
storage for other
Peer instances
Peer
store
*
peer
.
Peerstore
// the local datastore
Datastore
ds
.
Datastore
...
...
@@ -78,6 +78,8 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
return
nil
,
err
}
peerstore
:=
peer
.
NewPeerstore
()
var
(
net
*
inet
.
Network
// TODO: refactor so we can use IpfsRouting interface instead of being DHT-specific
...
...
@@ -125,7 +127,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) {
return
&
IpfsNode
{
Config
:
cfg
,
Peer
Map
:
&
peer
.
Map
{}
,
Peer
store
:
peerstore
,
Datastore
:
d
,
Blocks
:
bs
,
DAG
:
dag
,
...
...
This diff is collapsed.
Click to expand it.
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