Skip to content

Commit

Permalink
Merge pull request #5796 from onflow/bastian/handle-missing-staged-co…
Browse files Browse the repository at this point in the history
…ntracts
  • Loading branch information
turbolent authored Apr 29, 2024
2 parents e5febd5 + e46d9a2 commit 74694ff
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cmd/util/ledger/migrations/staged_contracts_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,17 @@ func (m *StagedContractsMigration) collectAndRegisterStagedContractsFromPayloads
inter := mr.Interpreter
locationRange := interpreter.EmptyLocationRange

storageMap := mr.Storage.GetStorageMap(stagingAccountAddress, common.PathDomainStorage.Identifier(), false)
storageMap := mr.Storage.GetStorageMap(
stagingAccountAddress,
common.PathDomainStorage.Identifier(),
false,
)
if storageMap == nil {
m.log.Error().
Msgf("failed to get staged contracts from account %s", stagingAccount)
return nil
}

iterator := storageMap.Iterator(inter)

stagedContractCapsuleStaticType := interpreter.NewCompositeStaticTypeComputeTypeID(
Expand Down

0 comments on commit 74694ff

Please sign in to comment.