From 77379e0cda71616da5cf32b25d44c1eceb80c869 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Thu, 7 Mar 2019 10:06:21 +0400 Subject: [PATCH] lite/dbprovider: return ok instead of true --- lite/dbprovider.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lite/dbprovider.go b/lite/dbprovider.go index df9cc199..5582a963 100644 --- a/lite/dbprovider.go +++ b/lite/dbprovider.go @@ -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 }