Skip to content

Commit

Permalink
chore2
Browse files Browse the repository at this point in the history
  • Loading branch information
wnjoon committed Jan 13, 2025
1 parent 2acf131 commit 71ac341
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions test/e2e/configurer/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"log"
"os"
"path/filepath"
"sync"
Expand All @@ -23,9 +22,6 @@ import (
"github.com/babylonlabs-io/babylon/test/e2e/configurer/config"
"github.com/babylonlabs-io/babylon/test/e2e/containers"
"github.com/babylonlabs-io/babylon/test/e2e/initialization"
"github.com/babylonlabs-io/babylon/testutil/signer"
cmtCfg "github.com/cometbft/cometbft/config"
cmtos "github.com/cometbft/cometbft/libs/os"
)

type UpgradeSettings struct {
Expand Down Expand Up @@ -262,11 +258,11 @@ func (uc *UpgradeConfigurer) upgradeContainers(chainConfig *chain.Config, propHe

for _, node := range chainConfig.NodeConfigs {

Check failure on line 259 in test/e2e/configurer/upgrade.go

View workflow job for this annotation

GitHub Actions / lint_test / lint

unnecessary leading newline (whitespace)

log.Print("consensus key: ", node.ConsensusKey)
// log.Print("consensus key: ", node.ConsensusKey)

if err := saveIfNotExists(node); err != nil {
return err
}
// if err := saveIfNotExists(node); err != nil {
// return err
// }
if err := node.Run(); err != nil {
return err
}
Expand All @@ -278,14 +274,14 @@ func (uc *UpgradeConfigurer) upgradeContainers(chainConfig *chain.Config, propHe
return nil
}

func saveIfNotExists(cfg *chain.NodeConfig) error {
nodeDir := cfg.Node.ConfigDir
if !cmtos.FileExists(filepath.Join(nodeDir, cmtCfg.DefaultConfig().PrivValidatorKeyFile())) {
return signer.GeneratePrivSigner(nodeDir)
}
log.Print("file is exists: ", filepath.Join(nodeDir, cmtCfg.DefaultConfig().PrivValidatorKeyFile()))
return nil
}
// func saveIfNotExists(cfg *chain.NodeConfig) error {
// nodeDir := cfg.Node.ConfigDir
// if !cmtos.FileExists(filepath.Join(nodeDir, cmtCfg.DefaultConfig().PrivValidatorKeyFile())) {
// return signer.GeneratePrivSigner(nodeDir)
// }
// log.Print("file is exists: ", filepath.Join(nodeDir, cmtCfg.DefaultConfig().PrivValidatorKeyFile()))
// return nil
// }

// ParseGovPropFromFile loads the proposal from the UpgradeSignetLaunchFilePath
func (uc *UpgradeConfigurer) ParseGovPropFromFile() (*upgradetypes.MsgSoftwareUpgrade, error) {
Expand Down

0 comments on commit 71ac341

Please sign in to comment.