-
Notifications
You must be signed in to change notification settings - Fork 198
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
bugFix/stake-stake-claim-auction-sc #1833
bugFix/stake-stake-claim-auction-sc #1833
Conversation
vm/systemSmartContracts/auction.go
Outdated
@@ -630,6 +630,7 @@ func (s *stakingAuctionSC) stake(args *vmcommon.ContractCallInput) vmcommon.Retu | |||
for i := maxNodesToRun*2 + 1; i < uint64(lenArgs); i++ { | |||
if len(args.Arguments[i]) == len(args.CallerAddr) { | |||
if !isAlreadyRegistered { | |||
s.eei.AddReturnMessage("reward address after being registered can be changed only through changeRewardAddress") |
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 that this message should be placed on else branch. If isAlreadyRegistered
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.
thanks. pushed.
@@ -631,6 +631,8 @@ func (s *stakingAuctionSC) stake(args *vmcommon.ContractCallInput) vmcommon.Retu | |||
if len(args.Arguments[i]) == len(args.CallerAddr) { | |||
if !isAlreadyRegistered { | |||
registrationData.RewardAddress = args.Arguments[i] |
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.
there is only one registrationData.RewardAddress, but you are iterating through "i" rewardAddresses. Only the last one will be saved, is this the intended behaviour?
It's not from the current changes, can be fixed in a future PR
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.
System tests passed.
fixing case of stake-stake-claim with nodePrice or greater then nodePrice