@@ -84,9 +84,9 @@ type ValidatorWrapper struct {
84
84
Validator
85
85
Delegations Delegations
86
86
//
87
- Counters counters
87
+ Counters counters `json:"-"`
88
88
// All the rewarded accumulated so far
89
- BlockReward * big.Int
89
+ BlockReward * big.Int `json:"-"`
90
90
}
91
91
92
92
// Computed represents current epoch
@@ -136,11 +136,14 @@ type ValidatorRPCEnchanced struct {
136
136
TotalDelegated * big.Int `json:"total-delegation"`
137
137
CurrentlyInCommittee bool `json:"currently-in-committee"`
138
138
EPoSStatus string `json:"epos-status"`
139
+ Lifetime * AccumulatedOverLifetime `json:"lifetime"`
139
140
}
140
141
141
- type accumulatedOverLifetime struct {
142
- BlockReward * big.Int `json:"reward-accumulated"`
143
- Signing counters `json:"blocks"`
142
+ // AccumulatedOverLifetime ..
143
+ type AccumulatedOverLifetime struct {
144
+ BlockReward * big.Int `json:"reward-accumulated"`
145
+ Signing counters `json:"blocks"`
146
+ APR numeric.Dec `json:"apr"`
144
147
}
145
148
146
149
func (w ValidatorWrapper ) String () string {
@@ -152,21 +155,19 @@ func (w ValidatorWrapper) String() string {
152
155
func (w ValidatorWrapper ) MarshalJSON () ([]byte , error ) {
153
156
return json .Marshal (struct {
154
157
Validator
155
- Address string `json:"address"`
156
- Delegations Delegations `json:"delegations"`
157
- Lifetime accumulatedOverLifetime `json:"lifetime"`
158
+ Address string `json:"address"`
159
+ Delegations Delegations `json:"delegations"`
158
160
}{
159
161
w .Validator ,
160
162
common2 .MustAddressToBech32 (w .Address ),
161
163
w .Delegations ,
162
- accumulatedOverLifetime {w .BlockReward , w .Counters },
163
164
})
164
165
}
165
166
166
167
// ValidatorStats to record validator's performance and history records
167
168
type ValidatorStats struct {
168
169
// APR ..
169
- APR numeric.Dec `json:"current-apr "`
170
+ APR numeric.Dec `json:"- "`
170
171
// TotalEffectiveStake is the total effective stake this validator has
171
172
TotalEffectiveStake numeric.Dec `json:"total-effective-stake"`
172
173
// MetricsPerShard ..
0 commit comments