From 0ca42a9761055d30cad7ec83ad996109fd90671d Mon Sep 17 00:00:00 2001 From: gjgd Date: Thu, 5 Dec 2019 14:49:29 +0100 Subject: [PATCH] fix: bug where operations could be overriden --- packages/element-lib/src/sidetree-v2/func.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/element-lib/src/sidetree-v2/func.js b/packages/element-lib/src/sidetree-v2/func.js index 53751dda..41bb8ac1 100644 --- a/packages/element-lib/src/sidetree-v2/func.js +++ b/packages/element-lib/src/sidetree-v2/func.js @@ -97,7 +97,7 @@ const syncTransaction = async (sidetree, transaction) => { operation, }; }); - const writeOperationToCache = op => sidetree.db.write(`operation:${op.operation.operationHash}`, op); + const writeOperationToCache = op => sidetree.db.write(`operation:${op.operation.operationHash}${Date.now()}`, op); return executeSequentially( writeOperationToCache, operationsByDidUniqueSuffixes,