diff --git a/action/protocol/context.go b/action/protocol/context.go index 191939c5bc..d6757bcd8b 100644 --- a/action/protocol/context.go +++ b/action/protocol/context.go @@ -270,13 +270,13 @@ func WithFeatureCtx(ctx context.Context) context.Context { CandidateRegisterMustWithStake: !g.IsTsunami(height), DisableDelegateEndorsement: !g.IsTsunami(height), RefactorFreshAccountConversion: g.IsTsunami(height), - SuicideTxLogMismatchPanic: g.IsToBeEnabled(height), - PanicUnrecoverableError: g.IsToBeEnabled(height), - CandidateIdentifiedByOwner: !g.IsToBeEnabled(height), - UseTxContainer: g.IsToBeEnabled(height), - LimitedStakingContract: !g.IsToBeEnabled(height), - MigrateNativeStake: g.IsToBeEnabled(height), - AddClaimRewardAddress: g.IsToBeEnabled(height), + SuicideTxLogMismatchPanic: g.IsUpernavik(height), + PanicUnrecoverableError: g.IsUpernavik(height), + CandidateIdentifiedByOwner: !g.IsUpernavik(height), + UseTxContainer: g.IsUpernavik(height), + LimitedStakingContract: !g.IsUpernavik(height), + MigrateNativeStake: g.IsUpernavik(height), + AddClaimRewardAddress: g.IsUpernavik(height), }, ) } diff --git a/action/protocol/staking/handler_candidate_transfer_ownership_test.go b/action/protocol/staking/handler_candidate_transfer_ownership_test.go index 090379e7dc..bdd2cb94f1 100644 --- a/action/protocol/staking/handler_candidate_transfer_ownership_test.go +++ b/action/protocol/staking/handler_candidate_transfer_ownership_test.go @@ -213,7 +213,7 @@ func TestProtocol_HandleCandidateTransferOwnership(t *testing.T) { }) cfg := deepcopy.Copy(genesis.Default).(genesis.Genesis) cfg.TsunamiBlockHeight = 1 - cfg.ToBeEnabledBlockHeight = 1 // enable candidate owner transfer feature + cfg.UpernavikBlockHeight = 1 // enable candidate owner transfer feature ctx = genesis.WithGenesisContext(ctx, cfg) ctx = protocol.WithFeatureCtx(protocol.WithFeatureWithHeightCtx(ctx)) require.NoError(p.Validate(ctx, act, sm)) diff --git a/action/protocol/staking/handler_stake_migrate_test.go b/action/protocol/staking/handler_stake_migrate_test.go index 28fdfe2528..0f61f56714 100644 --- a/action/protocol/staking/handler_stake_migrate_test.go +++ b/action/protocol/staking/handler_stake_migrate_test.go @@ -66,8 +66,7 @@ func TestHandleStakeMigrate(t *testing.T) { cfg.RedseaBlockHeight = 1 cfg.SumatraBlockHeight = 1 cfg.TsunamiBlockHeight = 1 - cfg.UpernavikBlockHeight = 1000000 // not enabled - cfg.ToBeEnabledBlockHeight = 1 // enable CandidateIdentifiedByOwner feature + cfg.UpernavikBlockHeight = 2 // enable CandidateIdentifiedByOwner feature } initCfg(&cfg) diff --git a/blockchain/integrity/integrity_test.go b/blockchain/integrity/integrity_test.go index 799aa75535..cf21cb4dc3 100644 --- a/blockchain/integrity/integrity_test.go +++ b/blockchain/integrity/integrity_test.go @@ -993,7 +993,7 @@ func TestBlockchainHardForkFeatures(t *testing.T) { cfg.Genesis.RedseaBlockHeight = 2 cfg.Genesis.SumatraBlockHeight = 2 cfg.Genesis.TsunamiBlockHeight = 3 - cfg.Genesis.ToBeEnabledBlockHeight = 3 + cfg.Genesis.UpernavikBlockHeight = 4 cfg.Genesis.InitBalanceMap[identityset.Address(27).String()] = unit.ConvertIotxToRau(10000000000).String() ctx := context.Background() diff --git a/e2etest/native_staking_test.go b/e2etest/native_staking_test.go index 501c6ae502..da8463b180 100644 --- a/e2etest/native_staking_test.go +++ b/e2etest/native_staking_test.go @@ -530,7 +530,7 @@ func TestNativeStaking(t *testing.T) { cfg.Genesis.FbkMigrationBlockHeight = 1 cfg.Genesis.TsunamiBlockHeight = 2 cfg.Genesis.EndorsementWithdrawWaitingBlocks = 10 - cfg.Genesis.ToBeEnabledBlockHeight = 3 // enable CandidateIdentifiedByOwner feature + cfg.Genesis.UpernavikBlockHeight = 3 // enable CandidateIdentifiedByOwner feature t.Run("test native staking", func(t *testing.T) { testNativeStaking(cfg, t) @@ -629,8 +629,7 @@ func TestCandidateTransferOwnership(t *testing.T) { cfg.Genesis.RedseaBlockHeight = 1 cfg.Genesis.SumatraBlockHeight = 1 cfg.Genesis.TsunamiBlockHeight = 1 - cfg.Genesis.UpernavikBlockHeight = 1000000 // not enabled - cfg.Genesis.ToBeEnabledBlockHeight = 1 // enable CandidateIdentifiedByOwner feature + cfg.Genesis.UpernavikBlockHeight = 2 // enable CandidateIdentifiedByOwner feature return cfg } registerAmount, _ := big.NewInt(0).SetString("1200000000000000000000000", 10)