Skip to content

Commit 03f4f2c

Browse files
committed
fix typo MaxObverserNodes > MaxObserverNodes
1 parent 42c4af1 commit 03f4f2c

8 files changed

Lines changed: 13 additions & 13 deletions

core/chainconfig_equal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func (d *chainConfigDigest) writeV2Config(cfg *params.V2Config) {
215215
}
216216
d.writeInt(cfg.MaxMasternodes)
217217
d.writeInt(cfg.MaxProtectorNodes)
218-
d.writeInt(cfg.MaxObverserNodes)
218+
d.writeInt(cfg.MaxObserverNodes)
219219
d.writeUint64(cfg.SwitchRound)
220220
d.writeInt(cfg.MinePeriod)
221221
d.writeInt(cfg.TimeoutSyncThreshold)

core/chainconfig_equal_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ func newChainConfigWithV2ConfigsForTest() *params.ChainConfig {
424424
defaultConfig := &params.V2Config{
425425
MaxMasternodes: 18,
426426
MaxProtectorNodes: 3,
427-
MaxObverserNodes: 2,
427+
MaxObserverNodes: 2,
428428
SwitchRound: 0,
429429
MinePeriod: 2,
430430
TimeoutSyncThreshold: 3,

eth/hooks/engine_v2_hooks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ func GetSigningTxCount(c *XDPoS.XDPoS, chain consensus.ChainReader, header *type
508508
}
509509
if len(protector) < currentConfig.MaxProtectorNodes {
510510
protector = append(protector, node.Address)
511-
} else if len(observer) < currentConfig.MaxObverserNodes {
511+
} else if len(observer) < currentConfig.MaxObserverNodes {
512512
observer = append(observer, node.Address)
513513
}
514514
}

params/config_backfill.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ func (c *V2Config) backfillMissingScalarFieldsFrom(src *V2Config) {
753753
}{
754754
{"maxMasternodes", &c.MaxMasternodes, src.MaxMasternodes},
755755
{"maxProtectorNodes", &c.MaxProtectorNodes, src.MaxProtectorNodes},
756-
{"maxObserverNodes", &c.MaxObverserNodes, src.MaxObverserNodes},
756+
{"maxObserverNodes", &c.MaxObserverNodes, src.MaxObserverNodes},
757757
{"minePeriod", &c.MinePeriod, src.MinePeriod},
758758
{"timeoutSyncThreshold", &c.TimeoutSyncThreshold, src.TimeoutSyncThreshold},
759759
{"timeoutPeriod", &c.TimeoutPeriod, src.TimeoutPeriod},

params/config_compat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func v2ConsensusConfigEqual(a, b *V2Config) bool {
252252
if a.MaxProtectorNodes != b.MaxProtectorNodes {
253253
return false
254254
}
255-
if a.MaxObverserNodes != b.MaxObverserNodes {
255+
if a.MaxObserverNodes != b.MaxObserverNodes {
256256
return false
257257
}
258258
if a.SwitchRound != b.SwitchRound {

params/config_compat_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ func TestV2ConsensusConfigEqualCoversConsensusFields(t *testing.T) {
628628
{
629629
name: "max observer nodes",
630630
mutate: func(cfg *V2Config) {
631-
cfg.MaxObverserNodes++
631+
cfg.MaxObserverNodes++
632632
},
633633
},
634634
{

params/config_networks.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ var (
148148
SwitchRound: 0,
149149
MaxMasternodes: 108,
150150
MaxProtectorNodes: 0,
151-
MaxObverserNodes: 0,
151+
MaxObserverNodes: 0,
152152
CertThreshold: 0.667,
153153
TimeoutSyncThreshold: 3,
154154
TimeoutPeriod: 10,
@@ -165,7 +165,7 @@ var (
165165
SwitchRound: 50000,
166166
MaxMasternodes: 108,
167167
MaxProtectorNodes: 324,
168-
MaxObverserNodes: 2000,
168+
MaxObserverNodes: 2000,
169169
CertThreshold: 0.667,
170170
TimeoutSyncThreshold: 3,
171171
TimeoutPeriod: 10,
@@ -214,7 +214,7 @@ var (
214214
900: {
215215
MaxMasternodes: 20,
216216
MaxProtectorNodes: 17,
217-
MaxObverserNodes: 1,
217+
MaxObserverNodes: 1,
218218
SwitchRound: 900,
219219
CertThreshold: 0.667,
220220
TimeoutSyncThreshold: 4,

params/config_xdpos.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ type V2 struct {
127127
type V2Config struct {
128128
MaxMasternodes int `json:"maxMasternodes"` // v2 max masternodes
129129
MaxProtectorNodes int `json:"maxProtectorNodes"` // v2 max ProtectorNodes
130-
MaxObverserNodes int `json:"maxObserverNodes"` // v2 max ObserverNodes
130+
MaxObserverNodes int `json:"maxObserverNodes"` // v2 max ObserverNodes
131131
SwitchRound uint64 `json:"switchRound"` // v1 to v2 switch block number
132132
MinePeriod int `json:"minePeriod"` // Miner mine period to mine a block
133133
TimeoutSyncThreshold int `json:"timeoutSyncThreshold"` // send syncInfo after number of timeout
@@ -262,7 +262,7 @@ func (c *V2Config) cloneWithInferredFieldPresence() *V2Config {
262262
}{
263263
{"maxMasternodes", clone.MaxMasternodes},
264264
{"maxProtectorNodes", clone.MaxProtectorNodes},
265-
{"maxObserverNodes", clone.MaxObverserNodes},
265+
{"maxObserverNodes", clone.MaxObserverNodes},
266266
{"minePeriod", clone.MinePeriod},
267267
{"timeoutSyncThreshold", clone.TimeoutSyncThreshold},
268268
{"timeoutPeriod", clone.TimeoutPeriod},
@@ -468,7 +468,7 @@ func sameV2RuntimeConfig(a, b *V2Config) bool {
468468
}
469469
return a.MaxMasternodes == b.MaxMasternodes &&
470470
a.MaxProtectorNodes == b.MaxProtectorNodes &&
471-
a.MaxObverserNodes == b.MaxObverserNodes &&
471+
a.MaxObserverNodes == b.MaxObserverNodes &&
472472
a.SwitchRound == b.SwitchRound &&
473473
a.MinePeriod == b.MinePeriod &&
474474
a.TimeoutSyncThreshold == b.TimeoutSyncThreshold &&
@@ -542,7 +542,7 @@ func (c *V2Config) String() string {
542542
return "V2Config: <nil>"
543543
}
544544

545-
return fmt.Sprintf("V2{MaxMasternodes: %v, MaxProtectorNodes: %v, MaxObverserNodes: %v, SwitchRound: %v, MinePeriod: %v, TimeoutSyncThreshold: %v, TimeoutPeriod: %v, CertThreshold: %v, MasternodeReward: %v, ProtectorReward: %v, ObserverReward: %v, MinimumMinerBlockPerEpoch: %v, LimitPenaltyEpoch: %v, MinimumSigningTx: %v, %s}", c.MaxMasternodes, c.MaxProtectorNodes, c.MaxObverserNodes, c.SwitchRound, c.MinePeriod, c.TimeoutSyncThreshold, c.TimeoutPeriod, c.CertThreshold, c.MasternodeReward, c.ProtectorReward, c.ObserverReward, c.MinimumMinerBlockPerEpoch, c.LimitPenaltyEpoch, c.MinimumSigningTx, c.ExpTimeoutConfig.String())
545+
return fmt.Sprintf("V2{MaxMasternodes: %v, MaxProtectorNodes: %v, MaxObserverNodes: %v, SwitchRound: %v, MinePeriod: %v, TimeoutSyncThreshold: %v, TimeoutPeriod: %v, CertThreshold: %v, MasternodeReward: %v, ProtectorReward: %v, ObserverReward: %v, MinimumMinerBlockPerEpoch: %v, LimitPenaltyEpoch: %v, MinimumSigningTx: %v, %s}", c.MaxMasternodes, c.MaxProtectorNodes, c.MaxObserverNodes, c.SwitchRound, c.MinePeriod, c.TimeoutSyncThreshold, c.TimeoutPeriod, c.CertThreshold, c.MasternodeReward, c.ProtectorReward, c.ObserverReward, c.MinimumMinerBlockPerEpoch, c.LimitPenaltyEpoch, c.MinimumSigningTx, c.ExpTimeoutConfig.String())
546546
}
547547

548548
// Description returns a human-readable description of V2Config

0 commit comments

Comments
 (0)