-
Notifications
You must be signed in to change notification settings - Fork 328
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
[ioctl] Add stake2 transferownership command #4250
[ioctl] Add stake2 transferownership command #4250
Conversation
e2etest/native_staking_test.go
Outdated
require.EqualValues(iotextypes.ReceiptStatus_Success, ccto.Status) | ||
require.NoError(checkCandidateState(sf, candidate1Name, newOwner1.String(), selfStake, cand1Votes, newOwner1)) | ||
}) | ||
t.Run("candidate transfer ownership to a exist candidate", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an existing candidate
e2etest/native_staking_test.go
Outdated
require.EqualValues(iotextypes.ReceiptStatus_ErrUnauthorizedOperator, ccto.Status) | ||
require.NoError(checkCandidateState(sf, candidate1Name, cand1Addr.String(), selfStake, cand1Votes, cand1Addr)) | ||
}) | ||
t.Run("candidate transfer ownership to a invalid address", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an invalid address
action/protocol/staking/candidate.go
Outdated
@@ -101,7 +104,7 @@ func (d *Candidate) isSelfStakeBucketSettled() bool { | |||
|
|||
// Collision checks collsion of 2 candidates | |||
func (d *Candidate) Collision(c *Candidate) error { | |||
if address.Equal(d.Owner, c.Owner) { | |||
if address.Equal(d.Owner, c.Owner) || address.Equal(d.GetIdentifier(), c.GetIdentifier()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this part has been merged, can you rebase?
e2etest/native_staking_test.go
Outdated
@@ -491,6 +545,7 @@ func TestNativeStaking(t *testing.T) { | |||
cfg.Genesis.FbkMigrationBlockHeight = 1 | |||
cfg.Genesis.TsunamiBlockHeight = 0 |
There was a problem hiding this comment.
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 one
} | ||
_stake2TransferOwnershipCmdShorts = map[config.Language]string{ | ||
config.English: "Transfer Ownership on IoTeX blockchain", | ||
config.Chinese: "在IoTeX区块链上转移候选人", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
转让
Quality Gate passedIssues Measures |
Description
ioctl Add stake2 transferownership command, allow delegate to transfer the ownership to a new address
Related PR:
#4236
#4239
#4245
Type of change
Please delete options that are not relevant.
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
Test Configuration:
Checklist: