mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
updated rollup buckets to the current state
This commit is contained in:
@@ -502,9 +502,11 @@ func TestMain(m *testing.M) {
|
||||
var buckets [common.RollupConstNumBuckets]common.BucketParams
|
||||
for i := range buckets {
|
||||
buckets[i].CeilUSD = big.NewInt(int64(i) * 10)
|
||||
buckets[i].Withdrawals = big.NewInt(int64(i) * 100)
|
||||
buckets[i].BlockWithdrawalRate = big.NewInt(int64(i) * 1000)
|
||||
buckets[i].MaxWithdrawals = big.NewInt(int64(i) * 10000)
|
||||
buckets[i].BlockStamp = big.NewInt(int64(i) * 100)
|
||||
buckets[i].Withdrawals = big.NewInt(int64(i) * 1000)
|
||||
buckets[i].RateBlocks = big.NewInt(int64(i) * 10000)
|
||||
buckets[i].RateWithdrawals = big.NewInt(int64(i) * 100000)
|
||||
buckets[i].MaxWithdrawals = big.NewInt(int64(i) * 1000000)
|
||||
}
|
||||
|
||||
// Generate SC vars and add them to HistoryDB (if needed)
|
||||
|
||||
@@ -43,7 +43,9 @@ func assertEqualRollupVariables(t *testing.T, rollupVariables common.RollupVaria
|
||||
assert.Equal(t, rollupVariables.SafeMode, apiVariables.SafeMode)
|
||||
if checkBuckets {
|
||||
for i, bucket := range rollupVariables.Buckets {
|
||||
assert.Equal(t, apitypes.NewBigIntStr(bucket.BlockWithdrawalRate), apiVariables.Buckets[i].BlockWithdrawalRate)
|
||||
assert.Equal(t, apitypes.NewBigIntStr(bucket.BlockStamp), apiVariables.Buckets[i].BlockStamp)
|
||||
assert.Equal(t, apitypes.NewBigIntStr(bucket.RateBlocks), apiVariables.Buckets[i].RateBlocks)
|
||||
assert.Equal(t, apitypes.NewBigIntStr(bucket.RateWithdrawals), apiVariables.Buckets[i].RateWithdrawals)
|
||||
assert.Equal(t, apitypes.NewBigIntStr(bucket.CeilUSD), apiVariables.Buckets[i].CeilUSD)
|
||||
assert.Equal(t, apitypes.NewBigIntStr(bucket.MaxWithdrawals), apiVariables.Buckets[i].MaxWithdrawals)
|
||||
assert.Equal(t, apitypes.NewBigIntStr(bucket.Withdrawals), apiVariables.Buckets[i].Withdrawals)
|
||||
|
||||
@@ -2731,14 +2731,22 @@ components:
|
||||
type: string
|
||||
description: Max USD value
|
||||
example: "1000"
|
||||
blockStamp:
|
||||
type: string
|
||||
description: Block stamp
|
||||
example: "1"
|
||||
withdrawals:
|
||||
type: string
|
||||
description: Available withdrawals of the bucket
|
||||
example: "4"
|
||||
blockWithdrawalRate:
|
||||
rateBlocks:
|
||||
type: string
|
||||
description: Every `blockWithdrawalRate` blocks add 1 withdrawal
|
||||
example: "8"
|
||||
description: Rate of blocks
|
||||
example: "2"
|
||||
rateWithdrawals:
|
||||
type: string
|
||||
description: Rate of withdrawals
|
||||
example: "3"
|
||||
maxWithdrawals:
|
||||
type: string
|
||||
description: Max withdrawals the bucket can hold
|
||||
@@ -2746,8 +2754,10 @@ components:
|
||||
additionalProperties: false
|
||||
required:
|
||||
- ceilUSD
|
||||
- blockStamp
|
||||
- withdrawals
|
||||
- blockWithdrawalRate
|
||||
- rateBlocks
|
||||
- rateWithdrawals
|
||||
- maxWithdrawals
|
||||
additionalProperties: false
|
||||
required:
|
||||
|
||||
Reference in New Issue
Block a user