From 29ed761111bd137796e6953681195aaaa8380738 Mon Sep 17 00:00:00 2001 From: bhartnett <51288821+bhartnett@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:16:17 +0800 Subject: [PATCH] Remove getSszDecoded from ContentDb. --- fluffy/database/content_db.nim | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/fluffy/database/content_db.nim b/fluffy/database/content_db.nim index 7a80e3f5c..1987cc935 100644 --- a/fluffy/database/content_db.nim +++ b/fluffy/database/content_db.nim @@ -296,16 +296,6 @@ proc get(kv: KvStoreRef, key: openArray[byte]): Opt[seq[byte]] = return res -proc getSszDecoded(kv: KvStoreRef, key: openArray[byte], T: type auto): Opt[T] = - let res = kv.get(key) - if res.isSome(): - try: - Opt.some(SSZ.decode(res.get(), T)) - except SerializationError: - raiseAssert("Stored data should always be serialized correctly") - else: - Opt.none(T) - ## Private ContentDB calls proc get(db: ContentDB, key: openArray[byte]): Opt[seq[byte]] = @@ -321,9 +311,6 @@ proc del(db: ContentDB, key: openArray[byte]) = # TODO: Do we want to return the bool here too? discard db.kv.del(key).expectDb() -proc getSszDecoded(db: ContentDB, key: openArray[byte], T: type auto): Opt[T] = - db.kv.getSszDecoded(key, T) - ## Public ContentId based ContentDB calls # TODO: Could also decide to use the ContentKey SSZ bytestring, as this is what @@ -347,9 +334,6 @@ proc contains*(db: ContentDB, key: ContentId): bool = proc del*(db: ContentDB, key: ContentId) = db.del(key.toBytesBE()) -proc getSszDecoded*(db: ContentDB, key: ContentId, T: type auto): Opt[T] = - db.getSszDecoded(key.toBytesBE(), T) - ## Pruning related calls proc deleteContentFraction*(