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

En 8137 delegation bughunt #2451

Merged

Conversation

BeniaminDrasovean
Copy link
Contributor

@BeniaminDrasovean BeniaminDrasovean commented Nov 9, 2020

Added extra checks and test for adding and removing nodes from delegation.

@sasurobert sasurobert self-requested a review November 9, 2020 10:36
@@ -464,6 +470,12 @@ func (d *delegation) addNodes(args *vmcommon.ContractCallInput) vmcommon.ReturnC
if returnCode != vmcommon.Ok {
return returnCode
}

if len(args.Arguments) <= 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

< 2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, done.

@@ -541,6 +553,11 @@ func (d *delegation) removeNodes(args *vmcommon.ContractCallInput) vmcommon.Retu
return returnCode
}

if len(args.Arguments) <= 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

< 1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

SebastianMarian
SebastianMarian previously approved these changes Nov 9, 2020
sasurobert
sasurobert previously approved these changes Nov 11, 2020
@BeniaminDrasovean BeniaminDrasovean merged commit 48739f1 into feat/staking-delegation-v2 Nov 11, 2020
@BeniaminDrasovean BeniaminDrasovean deleted the EN-8137-delegation-bughunt branch November 11, 2020 14:21
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.

None yet

3 participants