From 628f86c6892d6f448721637d033974dcc0d40fc2 Mon Sep 17 00:00:00 2001 From: Cory Schwartz Date: Wed, 14 Apr 2021 12:27:40 -0700 Subject: [PATCH] fix go vet --- p2p/host/basic/basic_host.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/p2p/host/basic/basic_host.go b/p2p/host/basic/basic_host.go index 69baafc8c9..89d84771f7 100644 --- a/p2p/host/basic/basic_host.go +++ b/p2p/host/basic/basic_host.go @@ -193,7 +193,10 @@ func NewHost(ctx context.Context, n network.Network, opts *HostOpts) (*BasicHost } // persist a signed peer record for self to the peerstore. - rec := peer.PeerRecordFromAddrInfo(peer.AddrInfo{h.ID(), h.Addrs()}) + rec := peer.PeerRecordFromAddrInfo(peer.AddrInfo{ + ID: h.ID(), + Addrs: h.Addrs(), + }) ev, err := record.Seal(rec, h.signKey) if err != nil { return nil, fmt.Errorf("failed to create signed record for self: %w", err) @@ -464,7 +467,10 @@ func (h *BasicHost) makeSignedPeerRecord(evt *event.EvtLocalAddressesUpdated) (* current = append(current, a.Address) } - rec := peer.PeerRecordFromAddrInfo(peer.AddrInfo{h.ID(), current}) + rec := peer.PeerRecordFromAddrInfo(peer.AddrInfo{ + ID: h.ID(), + Addrs: current, + }) return record.Seal(rec, h.signKey) }