Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng762 committed Nov 2, 2023
1 parent 193a889 commit 0f6d6fc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions consensus/cbft/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,13 @@ func (vp *ValidatorPool) Update(blockNumber uint64, epoch uint64, eventMux *even

isValidatorAfter := vp.isValidator(epoch, vp.nodeID)

nodes := make(map[enode.ID]struct{})
for _, validator := range vp.currentValidators.Nodes {
nodes[validator.NodeID] = struct{}{}
if isValidatorBefore || isValidatorAfter {
nodes := make(map[enode.ID]struct{})
for _, validator := range vp.currentValidators.Nodes {
nodes[validator.NodeID] = struct{}{}
}
eventMux.Post(cbfttypes.UpdateValidatorEvent{Nodes: nodes})
}
eventMux.Post(cbfttypes.UpdateValidatorEvent{Nodes: nodes})

removes := make([]*enode.Node, 0)
adds := make([]*enode.Node, 0)
Expand Down

0 comments on commit 0f6d6fc

Please sign in to comment.