Skip to content

Commit

Permalink
Fix namespace for system contracts migration report
Browse files Browse the repository at this point in the history
  • Loading branch information
SupunS committed Apr 4, 2024
1 parent d1fe9fc commit 2ef8863
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
14 changes: 9 additions & 5 deletions cmd/util/ledger/migrations/change_contract_code_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package migrations

import (
"fmt"
"github.com/onflow/flow-go/cmd/util/ledger/reporters"

"github.com/onflow/cadence/runtime/common"
coreContracts "github.com/onflow/flow-core-contracts/lib/go/contracts"
"github.com/rs/zerolog"

"github.com/onflow/flow-go/cmd/util/ledger/reporters"
evm "github.com/onflow/flow-go/fvm/evm/stdlib"
"github.com/onflow/flow-go/fvm/systemcontracts"
"github.com/onflow/flow-go/model/flow"
Expand All @@ -25,10 +25,14 @@ func NewChangeContractCodeMigration(
rwf reporters.ReportWriterFactory,
) *ChangeContractCodeMigration {
return &ChangeContractCodeMigration{
StagedContractsMigration: NewStagedContractsMigration(chainID, log, rwf).
// TODO:
//WithContractUpdateValidation().
WithName("ChangeContractCodeMigration"),
StagedContractsMigration: &StagedContractsMigration{
name: "ChangeContractCodeMigration",
log: log,
chainID: chainID,
stagedContracts: map[common.Address]map[flow.RegisterID]Contract{},
contractsByLocation: map[common.Location][]byte{},
reporter: rwf.ReportWriter("system-contracts-migrator"),
},
}
}

Expand Down
5 changes: 0 additions & 5 deletions cmd/util/ledger/migrations/staged_contracts_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ func (m *StagedContractsMigration) WithContractUpdateValidation() *StagedContrac
return m
}

func (m *StagedContractsMigration) WithName(name string) *StagedContractsMigration {
m.name = name
return m
}

func (m *StagedContractsMigration) Close() error {
m.mutex.RLock()
defer m.mutex.RUnlock()
Expand Down

0 comments on commit 2ef8863

Please sign in to comment.