Skip to content

Commit

Permalink
Merge pull request #5284 from onflow/janez/atree-migration-fixes
Browse files Browse the repository at this point in the history
Atree Migration cleanup
  • Loading branch information
janezpodhostnik authored Jan 24, 2024
2 parents 098ff23 + fae4a0f commit 7f0980e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 341 deletions.
12 changes: 7 additions & 5 deletions cmd/util/ledger/migrations/atree_register_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,14 +420,16 @@ var domains = []string{
common.PathDomainPublic.Identifier(),
runtime.StorageDomainContract,
stdlib.InboxStorageDomain,
stdlib.CapabilityControllerStorageDomain,
}

var domainsLookupMap = map[string]struct{}{
common.PathDomainStorage.Identifier(): {},
common.PathDomainPrivate.Identifier(): {},
common.PathDomainPublic.Identifier(): {},
runtime.StorageDomainContract: {},
stdlib.InboxStorageDomain: {},
common.PathDomainStorage.Identifier(): {},
common.PathDomainPrivate.Identifier(): {},
common.PathDomainPublic.Identifier(): {},
runtime.StorageDomainContract: {},
stdlib.InboxStorageDomain: {},
stdlib.CapabilityControllerStorageDomain: {},
}

// migrationProblem is a struct for reporting errors
Expand Down
7 changes: 0 additions & 7 deletions cmd/util/ledger/migrations/atree_register_migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ func TestAtreeRegisterMigration(t *testing.T) {
log := zerolog.New(zerolog.NewTestWriter(t))
dir := t.TempDir()

validation := migrations.NewCadenceDataValidationMigrations(
reporters.NewReportFileWriterFactory(dir, log),
2,
)

// Localnet v0.31 was used to produce an execution state that can be used for the tests.
t.Run(
"test v0.31 state",
Expand All @@ -35,9 +30,7 @@ func TestAtreeRegisterMigration(t *testing.T) {
"test-data/bootstrapped_v0.31",
migrations.CreateAccountBasedMigration(log, 2,
[]migrations.AccountBasedMigration{
validation.PreMigration(),
migrations.NewAtreeRegisterMigrator(reporters.NewReportFileWriterFactory(dir, log), true, false),
validation.PostMigration(),
},
),
func(t *testing.T, oldPayloads []*ledger.Payload, newPayloads []*ledger.Payload) {
Expand Down
329 changes: 0 additions & 329 deletions cmd/util/ledger/migrations/cadence_data_validation.go

This file was deleted.

0 comments on commit 7f0980e

Please sign in to comment.