mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Update API with new buckets synchronization
This commit is contained in:
@@ -374,11 +374,21 @@ func TestMain(m *testing.M) {
|
|||||||
OpenAuctionSlots: uint16(5),
|
OpenAuctionSlots: uint16(5),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
rollupVars := common.RollupVariables{
|
rollupVars := common.RollupVariables{
|
||||||
EthBlockNum: int64(3),
|
EthBlockNum: int64(3),
|
||||||
FeeAddToken: big.NewInt(100),
|
FeeAddToken: big.NewInt(100),
|
||||||
ForgeL1L2BatchTimeout: int64(44),
|
ForgeL1L2BatchTimeout: int64(44),
|
||||||
WithdrawalDelay: uint64(3000),
|
WithdrawalDelay: uint64(3000),
|
||||||
|
Buckets: buckets,
|
||||||
|
SafeMode: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
wdelayerVars := common.WDelayerVariables{
|
wdelayerVars := common.WDelayerVariables{
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ func TestNextForgers(t *testing.T) {
|
|||||||
func TestUpdateNetworkInfo(t *testing.T) {
|
func TestUpdateNetworkInfo(t *testing.T) {
|
||||||
status := &Network{}
|
status := &Network{}
|
||||||
assert.Equal(t, status.LastSyncBlock, api.status.Network.LastSyncBlock)
|
assert.Equal(t, status.LastSyncBlock, api.status.Network.LastSyncBlock)
|
||||||
assert.Equal(t, status.LastBatch.BatchNum, api.status.Network.LastBatch.BatchNum)
|
assert.Equal(t, status.LastBatch, api.status.Network.LastBatch)
|
||||||
assert.Equal(t, status.CurrentSlot, api.status.Network.CurrentSlot)
|
assert.Equal(t, status.CurrentSlot, api.status.Network.CurrentSlot)
|
||||||
assert.Equal(t, status.NextForgers, api.status.Network.NextForgers)
|
assert.Equal(t, status.NextForgers, api.status.Network.NextForgers)
|
||||||
lastBlock := tc.blocks[3]
|
lastBlock := tc.blocks[3]
|
||||||
|
|||||||
@@ -2791,10 +2791,6 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
description: Max USD value
|
description: Max USD value
|
||||||
example: 1000
|
example: 1000
|
||||||
blockStamp:
|
|
||||||
type: integer
|
|
||||||
description: Last time a withdrawal was added ( or removed if the bucket was full)
|
|
||||||
example: 4475934
|
|
||||||
withdrawals:
|
withdrawals:
|
||||||
type: integer
|
type: integer
|
||||||
description: Available withdrawals of the bucket
|
description: Available withdrawals of the bucket
|
||||||
@@ -2810,7 +2806,6 @@ components:
|
|||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
required:
|
required:
|
||||||
- ceilUSD
|
- ceilUSD
|
||||||
- blockStamp
|
|
||||||
- withdrawals
|
- withdrawals
|
||||||
- blockWithdrawalRate
|
- blockWithdrawalRate
|
||||||
- maxWithdrawals
|
- maxWithdrawals
|
||||||
|
|||||||
Reference in New Issue
Block a user