rpcserver: Return 0-length headers via RPC as they're now valid.
This commit is contained in:
parent
ec228f9ff9
commit
7647f884a9
1 changed files with 2 additions and 3 deletions
|
@ -2157,9 +2157,7 @@ func handleGetCFilter(s *rpcServer, cmd interface{}, closeChan <-chan struct{})
|
||||||
}
|
}
|
||||||
|
|
||||||
filterBytes, err := s.server.cfIndex.FilterByBlockHash(hash, c.Extended)
|
filterBytes, err := s.server.cfIndex.FilterByBlockHash(hash, c.Extended)
|
||||||
if len(filterBytes) > 0 {
|
if err != nil {
|
||||||
rpcsLog.Debugf("Found committed filter for %v", hash)
|
|
||||||
} else {
|
|
||||||
rpcsLog.Debugf("Could not find committed filter for %v: %v",
|
rpcsLog.Debugf("Could not find committed filter for %v: %v",
|
||||||
hash, err)
|
hash, err)
|
||||||
return nil, &btcjson.RPCError{
|
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
|
return hex.EncodeToString(filterBytes), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue