Skip to content

Commit

Permalink
simplify logic
Browse files Browse the repository at this point in the history
Co-authored-by: Faye Amacker <[email protected]>
  • Loading branch information
turbolent and fxamacker authored Nov 16, 2024
1 parent 0dae060 commit 3fa8ad1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtime/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,9 @@ func (s *Storage) ScheduleV2Migration(address common.Address) {

func (s *Storage) ScheduleV2MigrationForModifiedAccounts() {
for address, isV1 := range s.cachedV1Accounts { //nolint:maprange
if !isV1 || !s.PersistentSlabStorage.HasUnsavedChanges(atree.Address(address)) {
continue
if isV1 && s.PersistentSlabStorage.HasUnsavedChanges(atree.Address(address)) {
s.ScheduleV2Migration(address)
}
}

s.ScheduleV2Migration(address)
Expand Down

0 comments on commit 3fa8ad1

Please sign in to comment.