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
En 8137 delegation bughunt #2451
Conversation
@@ -464,6 +470,12 @@ func (d *delegation) addNodes(args *vmcommon.ContractCallInput) vmcommon.ReturnC | |||
if returnCode != vmcommon.Ok { | |||
return returnCode | |||
} | |||
|
|||
if len(args.Arguments) <= 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.
< 2.
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.
Right, done.
@@ -541,6 +553,11 @@ func (d *delegation) removeNodes(args *vmcommon.ContractCallInput) vmcommon.Retu | |||
return returnCode | |||
} | |||
|
|||
if len(args.Arguments) <= 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.
< 1
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.
Done.
3f22906
Added extra checks and test for adding and removing nodes from delegation.