lite/dbprovider: return ok instead of true

This commit is contained in:
Anton Kaliaev 2019-03-07 10:06:21 +04:00
parent 9d9d22205e
commit 77379e0cda
No known key found for this signature in database
GPG Key ID: 7B6881D965918214

View File

@ -258,14 +258,15 @@ func parseKey(key []byte) (chainID string, height int64, part string, ok bool) {
}
func parseSignedHeaderKey(key []byte) (chainID string, height int64, ok bool) {
chainID, height, part, _ := parseKey(key)
var part string
chainID, height, part, ok = parseKey(key)
if part != "sh" {
return "", 0, false
}
return chainID, height, true
return
}
func parseChainKeyPrefix(key []byte) (chainID string, height int64, ok bool) {
chainID, height, _, _ = parseKey(key)
return chainID, height, true
chainID, height, _, ok = parseKey(key)
return
}