Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[staking] enable CandidateTransferOwnership at CandidateIdentifiedByOwner feature #4275

Merged

Conversation

envestcc
Copy link
Member

Description

Make up missing parts for CandidateTransferOwnership

Related PR:
#4236
#4239
#4245
#4250

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

Copy link
Collaborator

@CoderZhi CoderZhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stamp 498aa48..0ef74d0

@envestcc envestcc force-pushed the delegate_transfer_ownership_3.5_cc branch from 0ef74d0 to 155ee80 Compare May 31, 2024 00:40
@envestcc envestcc force-pushed the delegate_transfer_ownership_3.5_cc branch from 155ee80 to 90fd66d Compare May 31, 2024 02:49
@@ -98,3 +98,10 @@ func (p *Protocol) validateCandidateActivate(ctx context.Context, act *action.Ca
}
return nil
}

func (p *Protocol) validateCandidateTransferOwnershipAction(ctx context.Context, act *action.CandidateTransferOwnership) error {
if protocol.MustGetFeatureCtx(ctx).CandidateIdentifiedByOwner {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add TODO: can be removed after hard-fork

@@ -491,6 +545,7 @@ func TestNativeStaking(t *testing.T) {
cfg.Genesis.FbkMigrationBlockHeight = 1
cfg.Genesis.TsunamiBlockHeight = 0
cfg.Genesis.EndorsementWithdrawWaitingBlocks = 10
cfg.Genesis.ToBeEnabledBlockHeight = 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be a larger number to enable the feature?

@@ -491,6 +545,7 @@ func TestNativeStaking(t *testing.T) {
cfg.Genesis.FbkMigrationBlockHeight = 1
cfg.Genesis.TsunamiBlockHeight = 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each hard-fork height needs to be > previous ones

Copy link

sonarcloud bot commented Jun 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
4.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@envestcc envestcc merged commit b11e562 into iotexproject:master Jun 4, 2024
2 of 3 checks passed
@envestcc envestcc deleted the delegate_transfer_ownership_3.5_cc branch June 4, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants