Skip to content

Commit

Permalink
Update storage.go
Browse files Browse the repository at this point in the history
Co-authored-by: Bastian Müller <[email protected]>
  • Loading branch information
fxamacker and turbolent authored Apr 15, 2024
1 parent a887780 commit 3b05bb1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -1168,15 +1168,17 @@ func (s *PersistentSlabStorage) FixLoadedBrokenReferences() ([]StorageID, error)
func (s *PersistentSlabStorage) fixBrokenReferencesInMap(old MapSlab) error {
id := old.ID()

oldExtraData := old.ExtraData()

// Create an empty map with the same StorgeID, type, and seed as the old map.
new := &MapDataSlab{
header: MapSlabHeader{
id: id,
size: mapRootDataSlabPrefixSize + hkeyElementsPrefixSize,
},
extraData: &MapExtraData{
TypeInfo: old.ExtraData().TypeInfo,
Seed: old.ExtraData().Seed,
TypeInfo: oldExtraData.TypeInfo,
Seed: oldExtraData.Seed,
},
elements: newHkeyElements(0),
}
Expand Down

0 comments on commit 3b05bb1

Please sign in to comment.