From daac7f298862272c3f7ac6ad9fd5d1021c9a882b Mon Sep 17 00:00:00 2001 From: Aarsh Shah Date: Fri, 4 Feb 2022 13:55:26 +0400 Subject: [PATCH] fix lint --- markets/idxprov/mesh.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/markets/idxprov/mesh.go b/markets/idxprov/mesh.go index 3df990e1b..75f075742 100644 --- a/markets/idxprov/mesh.go +++ b/markets/idxprov/mesh.go @@ -40,7 +40,9 @@ func (mc Libp2pMeshCreator) Connect(ctx context.Context) error { return fmt.Errorf("failed to connect index provider host with the full node: %w", err) } mc.idxProvHost.ConnManager().Protect(faddrs.ID, "markets") - mc.fullnodeApi.NetProtectAdd(ctx, []peer.ID{mc.idxProvHost.ID()}) + if err := mc.fullnodeApi.NetProtectAdd(ctx, []peer.ID{mc.idxProvHost.ID()}); err != nil { + return fmt.Errorf("failed to call NetProtectAdd on the full node, err: %w", err) + } log.Debugw("successfully connected to full node and asked it protect indexer provider peer conn", "fullNodeInfo", faddrs.String(), "idxProviderPeerId", mc.idxProvHost.ID())