From 610a93e2fff012bd2b7d68c0cd604d765b784563 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Fri, 11 Oct 2019 10:15:41 +0200 Subject: [PATCH] routing/chainview: check GetCFilter error Since the filter will never be nil in non-error cases now, remove the nil-check. --- routing/chainview/neutrino.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/routing/chainview/neutrino.go b/routing/chainview/neutrino.go index 19933736d..792e2dba8 100644 --- a/routing/chainview/neutrino.go +++ b/routing/chainview/neutrino.go @@ -239,11 +239,7 @@ func (c *CfFilteredChainView) FilterBlock(blockHash *chainhash.Hash) (*FilteredB // outpoint that have been spent. filter, err := c.p2pNode.GetCFilter(*blockHash, wire.GCSFilterRegular) if err != nil { - return nil, err - } - - if filter == nil { - return nil, fmt.Errorf("Unable to fetch filter") + return nil, fmt.Errorf("unable to fetch filter: %v", err) } // Before we can match the filter, we'll need to map each item in our