From c03a94faec00675c3dfed6a2d56f1dc80060b7bc Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Wed, 20 Dec 2023 20:14:02 +0400 Subject: [PATCH] fixed snapshot offset --- node/src/main/scala/com/wavesplatform/Importer.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/src/main/scala/com/wavesplatform/Importer.scala b/node/src/main/scala/com/wavesplatform/Importer.scala index 26d6bd92b5..f254c24ccd 100644 --- a/node/src/main/scala/com/wavesplatform/Importer.scala +++ b/node/src/main/scala/com/wavesplatform/Importer.scala @@ -372,12 +372,12 @@ object Importer extends ScorexLogging { var totalSize = 0L rdb.db.iterateOver(KeyTags.NthTransactionStateSnapshotAtHeight) { e => - totalSize += e.getValue.length + totalSize += (e.getValue.length + 4) } val snapshotsOffset = totalSize - blocksOffset -> snapshotsOffset.toLong + blocksOffset -> snapshotsOffset case _ => 0L -> 0L } val blocksInputStream = new BufferedInputStream(initFileStream(importOptions.blockchainFile, blocksFileOffset), 2 * 1024 * 1024)