Skip to content

Commit

Permalink
Merge pull request #81 from libp2p/fix/interned-nil-panic
Browse files Browse the repository at this point in the history
set map in constructor
  • Loading branch information
Stebalien authored Jun 1, 2019
2 parents 73b10b9 + 74ed339 commit bb7e91a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion p2p/host/peerstore/pstoremem/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ var _ pstore.PeerMetadata = (*memoryPeerMetadata)(nil)

func NewPeerMetadata() pstore.PeerMetadata {
return &memoryPeerMetadata{
ds: make(map[metakey]interface{}),
ds: make(map[metakey]interface{}),
interned: make(map[string]interface{}),
}
}

Expand Down

0 comments on commit bb7e91a

Please sign in to comment.