From 048772076962cdca99a6ca29b497aa6de854e594 Mon Sep 17 00:00:00 2001 From: andri lim Date: Thu, 27 Dec 2018 09:47:34 +0700 Subject: [PATCH] fix capturedb bug --- nimbus/db/capturedb.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nimbus/db/capturedb.nim b/nimbus/db/capturedb.nim index dfa9e23cf..e13d0dc3d 100644 --- a/nimbus/db/capturedb.nim +++ b/nimbus/db/capturedb.nim @@ -17,7 +17,8 @@ proc get*(db: CaptureDB, key: openArray[byte]): seq[byte] = result = db.dstDb.get(key) if result.len != 0: return result = db.srcDb.get(key) - db.dstDb.put(key, result) + if result.len == 0: + db.dstDb.put(key, result) proc put*(db: CaptureDB, key, value: openArray[byte]) = db.dstDb.put(key, value)