From 359b58f41a3992a56bdc1e72d364fab0b251ff1b Mon Sep 17 00:00:00 2001 From: halibobo1205 Date: Wed, 13 Sep 2023 18:23:28 +0800 Subject: [PATCH] fix(db):avoid dumping a wrong cached data --- chainbase/src/main/java/org/tron/core/db2/common/TxCacheDB.java | 1 + 1 file changed, 1 insertion(+) diff --git a/chainbase/src/main/java/org/tron/core/db2/common/TxCacheDB.java b/chainbase/src/main/java/org/tron/core/db2/common/TxCacheDB.java index 34f6720a3a1..cefe014959e 100644 --- a/chainbase/src/main/java/org/tron/core/db2/common/TxCacheDB.java +++ b/chainbase/src/main/java/org/tron/core/db2/common/TxCacheDB.java @@ -318,6 +318,7 @@ private boolean handleException(Throwable e) { private void dump() { if (!isValid.get()) { logger.info("bloomFilters is not valid."); + return; } FileUtil.createDirIfNotExists(this.cacheDir.toString()); logger.info("dump bloomFilters start.");