routing/chainview: check GetCFilter error

Since the filter will never be nil in non-error cases now, remove the
nil-check.
This commit is contained in:
Johan T. Halseth 2019-10-11 10:15:41 +02:00
parent 5cbef663e4
commit 610a93e2ff
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

View File

@ -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