Skip to content

Commit

Permalink
fix possible nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Sep 16, 2022
1 parent 20cceb1 commit 58862bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ func NewNode(
rootstore,
libp2pOpts...,
)
if err != nil {
return nil, fin.Cleanup(err)
}
log.Info(
ctx,
"Created LibP2P host",
logging.NewKV("PeerId", h.ID()),
logging.NewKV("Address", options.ListenAddrs),
)
if err != nil {
return nil, fin.Cleanup(err)
}

bstore := db.Blockstore()
lite, err := ipfslite.New(ctx, rootstore, bstore, h, d, nil)
Expand Down

0 comments on commit 58862bf

Please sign in to comment.