-
Notifications
You must be signed in to change notification settings - Fork 338
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
feat: swip 20 staking changes #4728
Conversation
transactionMock.WithWaitForReceiptFunc(func(ctx context.Context, txHash common.Hash) (receipt *types.Receipt, err error) { | ||
if txHash == txHashApprove { | ||
return &types.Receipt{ | ||
Status: 1, | ||
}, nil | ||
} | ||
if txHash == txHashWithdrawn { | ||
return &types.Receipt{ | ||
Status: 1, | ||
}, nil | ||
} | ||
return nil, errors.New("unknown tx hash") | ||
}), |
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.
it will not reach the receipt part
} | ||
|
||
if len(prevStakedAmount.Bits()) == 0 { | ||
if stakedAmount.Cmp(MinimumStakeAmount) == -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.
why == -1 and not <= -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.
-1 means that the staked amount is less than the minimum,
0 would mean equal
1 would mean staked amount is greater than the minimum
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.
the Cmp
func strictly returns the values above
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.
my mistake
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.
LGTM!
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.
don't forget to move beekeeper_branch
back to master :)
Checklist
Description
Changes on the bee side in correspondence to ethersphere/storage-incentives#264 and ethersphere/SWIPs#49
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):