diff --git a/rpcserver.go b/rpcserver.go index bbc58061..7c0ee344 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -2157,9 +2157,7 @@ func handleGetCFilter(s *rpcServer, cmd interface{}, closeChan <-chan struct{}) } filterBytes, err := s.server.cfIndex.FilterByBlockHash(hash, c.Extended) - if len(filterBytes) > 0 { - rpcsLog.Debugf("Found committed filter for %v", hash) - } else { + if err != nil { rpcsLog.Debugf("Could not find committed filter for %v: %v", hash, err) return nil, &btcjson.RPCError{ @@ -2168,6 +2166,7 @@ func handleGetCFilter(s *rpcServer, cmd interface{}, closeChan <-chan struct{}) } } + rpcsLog.Debugf("Found committed filter for %v", hash) return hex.EncodeToString(filterBytes), nil }