rpcserver: Return 0-length headers via RPC as they're now valid.

This commit is contained in:
Alex 2017-05-11 21:34:05 -06:00 committed by Olaoluwa Osuntokun
parent ec228f9ff9
commit 7647f884a9

View file

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