Skip to content

Commit

Permalink
Use refactored getCachedAccountFormat()
Browse files Browse the repository at this point in the history
  • Loading branch information
fxamacker committed Nov 25, 2024
1 parent c7cf012 commit 426a548
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions runtime/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,9 @@ func (s *Storage) getAccountStorageFormat(

// Return cached account format (no register reading).

isCachedV1, isCachedV2 := s.getCachedAccountFormat(address)

if isCachedV1 {
return storageFormatV1
}

if isCachedV2 {
return StorageFormatV2
cachedFormat, known := s.getCachedAccountFormat(address)
if known {
return cachedFormat
}

// Check if account is v2 (by reading "stored" register).
Expand Down

0 comments on commit 426a548

Please sign in to comment.