From 96d7a48d686aa658f6c5cd7c9a8044f649052cc9 Mon Sep 17 00:00:00 2001
From: David Stainton <dstainton@elixxir.io>
Date: Thu, 25 Aug 2022 14:26:19 -0400
Subject: [PATCH] Fix kv API, add Exists method

---
 storage/versioned/kv.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/storage/versioned/kv.go b/storage/versioned/kv.go
index 2b8b7ae21..cf0530d5f 100644
--- a/storage/versioned/kv.go
+++ b/storage/versioned/kv.go
@@ -164,3 +164,9 @@ func (v *KV) GetFullKey(key string, version uint64) string {
 func (v *KV) makeKey(key string, version uint64) string {
 	return fmt.Sprintf("%s%s_%d", v.prefix, key, version)
 }
+
+// Exists returns false if the error indicates the element doesn't
+// exist.
+func (v *KV) Exists(err Error) bool {
+	return ekv.Exists(err)
+}
-- 
GitLab