From 5d5dccf16a98e89ffdc5f8752fdbbdddf99c956a Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Sat, 28 Oct 2023 11:37:35 +0200 Subject: [PATCH] Fix: fixed storage layout --- pkg/storage/prunable/epochstore/epoch_kv.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/storage/prunable/epochstore/epoch_kv.go b/pkg/storage/prunable/epochstore/epoch_kv.go index 014bcacc4..85d85b2f7 100644 --- a/pkg/storage/prunable/epochstore/epoch_kv.go +++ b/pkg/storage/prunable/epochstore/epoch_kv.go @@ -22,10 +22,10 @@ func NewEpochKVStore(storeRealm kvstore.Realm, kv kvstore.KVStore, pruningDelay return &EpochKVStore{ realm: storeRealm, - kv: lo.PanicOnErr(kv.WithExtendedRealm(storeRealm)), + kv: lo.PanicOnErr(kv.WithExtendedRealm(append(storeRealm, entriesKey))), pruningDelay: pruningDelay, - lastAccessedEpoch: kvstore.NewTypedValue(kv, kvstore.Realm{lastAccessedEpochKey}, iotago.EpochIndex.Bytes, iotago.EpochIndexFromBytes), - lastPrunedEpoch: model.NewPruningIndex(lo.PanicOnErr(kv.WithExtendedRealm(kvstore.Realm{lastPrunedEpochKey})), storeRealm), + lastAccessedEpoch: kvstore.NewTypedValue(kv, append(storeRealm, lastAccessedEpochKey), iotago.EpochIndex.Bytes, iotago.EpochIndexFromBytes), + lastPrunedEpoch: model.NewPruningIndex(lo.PanicOnErr(kv.WithExtendedRealm(storeRealm)), kvstore.Realm{lastPrunedEpochKey}), } }