-
Notifications
You must be signed in to change notification settings - Fork 204
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
Liquid staking unit and integration tests #3385
Conversation
…n-tests Liquid staking integration tests
@@ -2275,7 +2343,7 @@ func (tpn *TestProcessorNode) LoadTxSignSkBytes(skBytes []byte) { | |||
// ProposeBlock proposes a new block | |||
func (tpn *TestProcessorNode) ProposeBlock(round uint64, nonce uint64) (data.BodyHandler, data.HeaderHandler, [][]byte) { | |||
startTime := time.Now() | |||
maxTime := time.Second * 2 | |||
maxTime := time.Second * 200000 |
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.
please revert this
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
idxProposers[numOfShards] = numOfShards * nodesPerShard | ||
|
||
var tokenID []byte | ||
for _, node := range nodes { |
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.
this can be extracted in a function for reusability purposes
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.
would leave as it is.
output := d.Execute(vmInput) | ||
assert.Equal(t, vmcommon.UserError, output) | ||
assert.True(t, strings.Contains(eei.returnMessage, "error getting minimum delegation amount")) | ||
assert.True(t, strings.Contains(eei.returnMessage, "invalid value to undelegate - need to undelegate all - do not leave dust behind")) |
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.
is this backwards compatible?
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.
yes. it is. Error getting minimum amount does not happen at all. Only if delegation management was not instantiated.
remainedFund := big.NewInt(0).Sub(activeFund.Value, valueToUnDelegate) | ||
if remainedFund.Cmp(zero) > 0 && remainedFund.Cmp(minDelegationAmount) < 0 { | ||
err = d.checkRemainingFundValue(remainedFund) | ||
if err != nil { | ||
d.eei.AddReturnMessage("invalid value to undelegate - need to undelegate all - do not leave dust behind") |
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.
d.eei.AddReturnMessage(err.Error()) ?
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.
no, this has to be left as it is for backward compatibility purposes.
…liquid-staking-unit-tests
Liquid staking unit tests
Liquid staking integration tests