Skip to content

Commit

Permalink
remove pre-fork code
Browse files Browse the repository at this point in the history
  • Loading branch information
nkryuchkov committed Oct 16, 2024
1 parent 62b6950 commit 0ae7821
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions operator/validator/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,6 @@ func (c *controller) StartValidators() {
if bytes.Contains(c.network.ActiveSubnets(), []byte{committeeSubnet}) {
pubKeysToFetch = append(pubKeysToFetch, share.ValidatorPubKey[:])
}

if !c.networkConfig.PastAlanFork() {
validatorSubnet := byte(commons.ValidatorSubnet(hex.EncodeToString(share.ValidatorPubKey[:])))
if bytes.Contains(c.network.ActiveSubnets(), []byte{validatorSubnet}) {
pubKeysToFetch = append(pubKeysToFetch, share.ValidatorPubKey[:])
}
}
}

if c.validatorOptions.Exporter {
Expand Down Expand Up @@ -1154,22 +1147,8 @@ func (c *controller) UpdateValidatorMetaDataLoop() {
return true
}

belongsToOwnSubnet := false

committeeSubnet := byte(commons.CommitteeSubnet(share.CommitteeID()))
if bytes.Contains(c.network.ActiveSubnets(), []byte{committeeSubnet}) {
belongsToOwnSubnet = true
}

if !c.networkConfig.PastAlanFork() {
validatorSubnet := byte(commons.ValidatorSubnet(hex.EncodeToString(share.ValidatorPubKey[:])))
if bytes.Contains(c.network.ActiveSubnets(), []byte{validatorSubnet}) {
belongsToOwnSubnet = true
}
}

if !belongsToOwnSubnet {
// skip validators out of own subnets
if !bytes.Contains(c.network.ActiveSubnets(), []byte{committeeSubnet}) {
return true
}

Expand Down

0 comments on commit 0ae7821

Please sign in to comment.