Commit e7725b51 authored by Huulu's avatar Huulu Committed by GitHub

chore(op-conductor): fixing comments errors (#8970)

* iface

* raft

* service

* api

---------
Co-authored-by: default avatarrefcell.eth <abigger87@gmail.com>
parent c350d628
...@@ -415,7 +415,7 @@ func (oc *OpConductor) TransferLeaderToServer(_ context.Context, id string, addr ...@@ -415,7 +415,7 @@ func (oc *OpConductor) TransferLeaderToServer(_ context.Context, id string, addr
return oc.cons.TransferLeaderTo(id, addr) return oc.cons.TransferLeaderTo(id, addr)
} }
// CommitUnsafePayload commits a unsafe payload (lastest head) to the cluster FSM. // CommitUnsafePayload commits a unsafe payload (latest head) to the cluster FSM.
func (oc *OpConductor) CommitUnsafePayload(_ context.Context, payload *eth.ExecutionPayloadEnvelope) error { func (oc *OpConductor) CommitUnsafePayload(_ context.Context, payload *eth.ExecutionPayloadEnvelope) error {
return oc.cons.CommitUnsafePayload(payload) return oc.cons.CommitUnsafePayload(payload)
} }
......
...@@ -8,9 +8,9 @@ import ( ...@@ -8,9 +8,9 @@ import (
// //
//go:generate mockery --name Consensus --output mocks/ --with-expecter=true //go:generate mockery --name Consensus --output mocks/ --with-expecter=true
type Consensus interface { type Consensus interface {
// AddVoter adds a voting member into the cluster, voter is elegible to become leader. // AddVoter adds a voting member into the cluster, voter is eligible to become leader.
AddVoter(id, addr string) error AddVoter(id, addr string) error
// AddNonVoter adds a non-voting member into the cluster, non-voter is not elegible to become leader. // AddNonVoter adds a non-voting member into the cluster, non-voter is not eligible to become leader.
AddNonVoter(id, addr string) error AddNonVoter(id, addr string) error
// DemoteVoter demotes a voting member into a non-voting member, if leader is being demoted, it will cause a new leader election. // DemoteVoter demotes a voting member into a non-voting member, if leader is being demoted, it will cause a new leader election.
DemoteVoter(id string) error DemoteVoter(id string) error
......
...@@ -83,7 +83,7 @@ func NewRaftConsensus(log log.Logger, serverID, serverAddr, storageDir string, b ...@@ -83,7 +83,7 @@ func NewRaftConsensus(log log.Logger, serverID, serverAddr, storageDir string, b
return nil, errors.Wrap(err, "failed to create raft") return nil, errors.Wrap(err, "failed to create raft")
} }
// If boostrap = true, start raft in bootstrap mode, this will allow the current node to elect itself as leader when there's no other participants // If bootstrap = true, start raft in bootstrap mode, this will allow the current node to elect itself as leader when there's no other participants
// and allow other nodes to join the cluster. // and allow other nodes to join the cluster.
if bootstrap { if bootstrap {
cfg := raft.Configuration{ cfg := raft.Configuration{
......
...@@ -45,7 +45,7 @@ type API interface { ...@@ -45,7 +45,7 @@ type API interface {
// APIs called by op-node // APIs called by op-node
// Active returns true if op-conductor is active. // Active returns true if op-conductor is active.
Active(ctx context.Context) (bool, error) Active(ctx context.Context) (bool, error)
// CommitUnsafePayload commits a unsafe payload (lastest head) to the consensus layer. // CommitUnsafePayload commits a unsafe payload (latest head) to the consensus layer.
CommitUnsafePayload(ctx context.Context, payload *eth.ExecutionPayloadEnvelope) error CommitUnsafePayload(ctx context.Context, payload *eth.ExecutionPayloadEnvelope) error
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment