Skip to content

Commit

Permalink
handle missing staged contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed Apr 26, 2024
1 parent e5febd5 commit e46d9a2
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 e46d9a2

Please sign in to comment.