oc.leader.Store(false)// upon start, it should not be the leader unless specified otherwise by raft bootstrap, in that case, it'll receive a leadership update from consensus.
oc.leaderOverride.Store(false)// default to no override.
oc.healthy.Store(true)// default to healthy unless reported otherwise by health monitor.
oc.seqActive.Store(false)// explicitly set to false by default, the real value will be reported after sequencer control initialization.
@@ -15,10 +15,14 @@ var ErrNotLeader = errors.New("refusing to proxy request to non-leader sequencer
// API defines the interface for the op-conductor API.
typeAPIinterface{
// OverrideLeader is used to override the leader status, this is only used to return true for Leader() & LeaderWithID() calls.
// OverrideLeader is used to override or clear override for the leader status.
// It does not impact the actual raft consensus leadership status. It is supposed to be used when the cluster is unhealthy
// and the node is the only one up, to allow batcher to be able to connect to the node, so that it could download blocks from the manually started sequencer.
OverrideLeader(ctxcontext.Context)error
// override: true => force current conductor to be treated as leader regardless of the actual leadership status in raft.
// override: false => clear the override, return the actual leadership status in raft.