Skip to content

Commit

Permalink
chore: NewUpgradeConfigurer returns UpgradeConfigurer
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Aug 20, 2024
1 parent aaf1495 commit 746b583
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/e2e/configurer/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func NewBTCStakingConfigurer(t *testing.T, isDebugLogEnabled bool) (Configurer,
}

// NewSoftwareUpgradeConfigurer returns a new Configurer for Software Upgrade testing
func NewSoftwareUpgradeConfigurer(t *testing.T, isDebugLogEnabled bool, upgradePath string, btcHeaders []*btclighttypes.BTCHeaderInfo) (Configurer, error) {
func NewSoftwareUpgradeConfigurer(t *testing.T, isDebugLogEnabled bool, upgradePath string, btcHeaders []*btclighttypes.BTCHeaderInfo) (*UpgradeConfigurer, error) {
identifier := identifierName(t)
containerManager, err := containers.NewManager(identifier, isDebugLogEnabled, false, true)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/configurer/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var _ Configurer = (*UpgradeConfigurer)(nil)
// NewUpgradeConfigurer returns a upgrade configurer, if forkHeight is bigger
// than 0 it implies that it is a fork upgrade that does not pass by a gov prop
// if it is set to zero it runs the upgrade by the gov prop.
func NewUpgradeConfigurer(t *testing.T, chainConfigs []*chain.Config, setupTests setupFn, containerManager *containers.Manager, upgradePlanFilePath string, forkHeight int64) Configurer {
func NewUpgradeConfigurer(t *testing.T, chainConfigs []*chain.Config, setupTests setupFn, containerManager *containers.Manager, upgradePlanFilePath string, forkHeight int64) *UpgradeConfigurer {
t.Helper()
return &UpgradeConfigurer{
baseConfigurer: baseConfigurer{
Expand Down Expand Up @@ -301,7 +301,7 @@ func (uc *UpgradeConfigurer) UpgradeFilePath() (string, error) {
return filepath.Join(pwd, uc.upgradeJsonFilePath), nil
}

// parseGovPropFromFile loads from the file the Upgrade msg.
// parseGovPropFromFile loads from the file and parse it to the upgrade msg.
func parseGovPropFromFile(cdc codec.Codec, propFilePath string) (*proposal, *upgradetypes.MsgSoftwareUpgrade, error) {
prop, msgs, _, err := parseSubmitProposal(cdc, propFilePath)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/software_upgrade_e2e_signet_launch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (s *SoftwareUpgradeSignetLaunchTestSuite) SetupSuite() {

cfg, err := configurer.NewSoftwareUpgradeConfigurer(s.T(), true, config.UpgradeSignetLaunchFilePath, []*btclighttypes.BTCHeaderInfo{btcHeaderGenesis})
s.NoError(err)
s.configurer = cfg.(*configurer.UpgradeConfigurer)
s.configurer = cfg

err = s.configurer.ConfigureChains()
s.NoError(err)
Expand Down

0 comments on commit 746b583

Please sign in to comment.