|
|
@ -109,8 +109,6 @@ type Computed struct { |
|
|
|
BlocksLeftInEpoch uint64 `json:"-"` |
|
|
|
BlocksLeftInEpoch uint64 `json:"-"` |
|
|
|
Percentage numeric.Dec `json:"current-epoch-signing-percentage"` |
|
|
|
Percentage numeric.Dec `json:"current-epoch-signing-percentage"` |
|
|
|
IsBelowThreshold bool `json:"-"` |
|
|
|
IsBelowThreshold bool `json:"-"` |
|
|
|
Epoch uint64 `json:"epoch"` |
|
|
|
|
|
|
|
Block uint64 `json:"block"` |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (c Computed) String() string { |
|
|
|
func (c Computed) String() string { |
|
|
@ -123,10 +121,8 @@ func NewComputed( |
|
|
|
signed, toSign *big.Int, |
|
|
|
signed, toSign *big.Int, |
|
|
|
blocksLeft uint64, |
|
|
|
blocksLeft uint64, |
|
|
|
percent numeric.Dec, |
|
|
|
percent numeric.Dec, |
|
|
|
isBelowNow bool, |
|
|
|
isBelowNow bool) *Computed { |
|
|
|
epoch uint64, |
|
|
|
return &Computed{signed, toSign, blocksLeft, percent, isBelowNow} |
|
|
|
block uint64) *Computed { |
|
|
|
|
|
|
|
return &Computed{signed, toSign, blocksLeft, percent, isBelowNow, epoch, block} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// NewEmptyStats ..
|
|
|
|
// NewEmptyStats ..
|
|
|
@ -143,6 +139,8 @@ func NewEmptyStats() *ValidatorStats { |
|
|
|
// whatever current epoch is
|
|
|
|
// whatever current epoch is
|
|
|
|
type CurrentEpochPerformance struct { |
|
|
|
type CurrentEpochPerformance struct { |
|
|
|
CurrentSigningPercentage Computed `json:"current-epoch-signing-percent"` |
|
|
|
CurrentSigningPercentage Computed `json:"current-epoch-signing-percent"` |
|
|
|
|
|
|
|
Epoch uint64 `json:"epoch"` |
|
|
|
|
|
|
|
Block uint64 `json:"block"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ValidatorRPCEnhanced contains extra information for RPC consumer
|
|
|
|
// ValidatorRPCEnhanced contains extra information for RPC consumer
|
|
|
|