Skip to content

Commit

Permalink
Merge branch 'develop' into upgrade-cometbft-v0.37.12
Browse files Browse the repository at this point in the history
  • Loading branch information
swift1337 authored Oct 29, 2024
2 parents 45b3215 + d9ee4f3 commit 0e8f2c0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 33 deletions.
2 changes: 0 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,6 @@ func New(
authAddr,
)

logger.Info("bank keeper blocklist addresses", "addresses", app.BlockedAddrs())

app.BankKeeper = bankkeeper.NewBaseKeeper(
appCodec,
keys[banktypes.StoreKey],
Expand Down
1 change: 0 additions & 1 deletion app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
func (app *App) ExportAppStateAndValidators(
forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string,
) (servertypes.ExportedApp, error) {
// as if they could withdraw from the start of the next block
ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()})

// We export at last height + 1, because that's the height at which
Expand Down
53 changes: 24 additions & 29 deletions cmd/zetacored/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,48 +268,43 @@ func (ac appCreator) newApp(
)
}

// appExport creates a new simapp (optionally at a given height)
// appExport is used to export the state of the application for a genesis file.
func (ac appCreator) appExport(
logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string,
appOpts servertypes.AppOptions,
modulesToExport []string,
) (servertypes.ExportedApp, error) {
var anApp *app.App
var zetaApp *app.App

homePath, ok := appOpts.Get(flags.FlagHome).(string)
if !ok || homePath == "" {
return servertypes.ExportedApp{}, errors.New("application home not set")
}

if height != -1 {
anApp = app.New(
logger,
db,
traceStore,
false,
map[int64]bool{},
homePath,
uint(1),
ac.encCfg,
appOpts,
)

if err := anApp.LoadHeight(height); err != nil {
loadLatest := false
if height == -1 {
loadLatest = true
}

zetaApp = app.New(
logger,
db,
traceStore,
loadLatest,
map[int64]bool{},
homePath,
uint(1),
ac.encCfg,
appOpts,
)

// If height is -1, it means we are using the latest height.
// For all other cases, we load the specified height from the Store
if !loadLatest {
if err := zetaApp.LoadHeight(height); err != nil {
return servertypes.ExportedApp{}, err
}
} else {
anApp = app.New(
logger,
db,
traceStore,
true,
map[int64]bool{},
homePath,
uint(1),
ac.encCfg,
appOpts,
)
}

return anApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport)
return zetaApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport)
}
2 changes: 1 addition & 1 deletion cmd/zetae2e/config/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func setContractsFromConfig(r *runner.E2ERunner, conf config.Config) error {
if err != nil {
return fmt.Errorf("invalid TestDAppV2Addr: %w", err)
}
r.TestDAppV2ZEVM, err = testdappv2.NewTestDAppV2(r.TestDAppV2ZEVMAddr, r.EVMClient)
r.TestDAppV2ZEVM, err = testdappv2.NewTestDAppV2(r.TestDAppV2ZEVMAddr, r.ZEVMClient)
if err != nil {
return err
}
Expand Down

0 comments on commit 0e8f2c0

Please sign in to comment.