mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Add Sync stats, and report them in DebugAPI
This commit is contained in:
@@ -43,3 +43,12 @@ type AuctionVariables struct {
|
||||
// Number of blocks at the end of a slot in which any coordinator can forge if the winner has not forged one before
|
||||
SlotDeadline uint8 `json:"slotDeadline" meddler:"slot_deadline" validate:"required"`
|
||||
}
|
||||
|
||||
// Copy returns a deep copy of the Variables
|
||||
func (v *AuctionVariables) Copy() *AuctionVariables {
|
||||
vCpy := *v
|
||||
for i := range v.DefaultSlotSetBid {
|
||||
vCpy.DefaultSlotSetBid[i] = new(big.Int).SetBytes(v.DefaultSlotSetBid[i].Bytes())
|
||||
}
|
||||
return &vCpy
|
||||
}
|
||||
|
||||
@@ -163,3 +163,9 @@ type RollupVariables struct {
|
||||
WithdrawalDelay uint64 `json:"withdrawalDelay" meddler:"withdrawal_delay" validate:"required"`
|
||||
Buckets [RollupConstNumBuckets]Bucket `json:"buckets" meddler:"buckets,json"`
|
||||
}
|
||||
|
||||
// Copy returns a deep copy of the Variables
|
||||
func (v *RollupVariables) Copy() *RollupVariables {
|
||||
vCpy := *v
|
||||
return &vCpy
|
||||
}
|
||||
|
||||
@@ -23,3 +23,9 @@ type WDelayerVariables struct {
|
||||
EmergencyModeStartingTime uint64 `json:"emergencyModeStartingTime" meddler:"emergency_start_time"`
|
||||
EmergencyMode bool `json:"emergencyMode" meddler:"emergency_mode"`
|
||||
}
|
||||
|
||||
// Copy returns a deep copy of the Variables
|
||||
func (v *WDelayerVariables) Copy() *WDelayerVariables {
|
||||
vCpy := *v
|
||||
return &vCpy
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user