Skip to content

Commit

Permalink
update option
Browse files Browse the repository at this point in the history
  • Loading branch information
printfcoder committed Oct 12, 2020
1 parent f0c2f6e commit f71ebcf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Node interface {
}

type node struct {
options Options
options *Options
ctx context.Context
ipfs iface.CoreAPI
broker pubsub.Broker
Expand All @@ -57,7 +57,7 @@ func (n *node) Broker() pubsub.Broker {
}

func (n *node) Options() Options {
return n.options
return *n.options
}

func (n *node) Connect(peerInfo peer.PeerAddrInfo) error {
Expand Down Expand Up @@ -129,9 +129,9 @@ func NewNode(ctx context.Context, options ...Option) (n Node, err error) {

func newNode(ctx context.Context, options *Options) (*node, error) {
n := &node{
ipfs: options.IPFS,
broker: options.Broker,
id: options.PeerID,
ipfs: options.IPFS,
broker: options.Broker,
options: options,
}

// init
Expand Down

0 comments on commit f71ebcf

Please sign in to comment.