From b42d19498f087835c573c451210de842e441fec8 Mon Sep 17 00:00:00 2001 From: ClaytonNorthey92 Date: Fri, 31 Jan 2025 13:28:18 -0500 Subject: [PATCH] move processing bitcoin check --- op-conductor/conductor/service.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/op-conductor/conductor/service.go b/op-conductor/conductor/service.go index 80e445d7ee45..c1dda83903a3 100644 --- a/op-conductor/conductor/service.go +++ b/op-conductor/conductor/service.go @@ -546,7 +546,7 @@ func (oc *OpConductor) action() { // if follower is not healthy and not sequencing, just log an error oc.log.Error("server (follower) is not healthy", "server", oc.cons.ServerID()) case !status.leader && !status.healthy && status.active: - // sequencer is not leader, not healthy, not processing bitcoin in the hvm, but it is sequencing, stop it + // sequencer is not leader, not healthy, but it is sequencing, stop it err = oc.stopSequencer() case !status.leader && status.healthy && !status.active: // normal follower, do nothing @@ -570,7 +570,7 @@ func (oc *OpConductor) action() { // 2. for other cases, we should try to transfer leader to another node. // for example, if follower became a leader and unhealthy at the same time (just unhealthy itself), then we should transfer leadership. err = oc.transferLeader() - case status.leader && !status.healthy && status.active && !processingBitcoin: + case status.leader && !status.healthy && status.active: // There are two scenarios we need to handle here: // 1. we're transitioned from case status.leader && !status.healthy && !status.active, see description above // then we should continue to sequence blocks and try to bring ourselves back to healthy state. @@ -581,6 +581,11 @@ func (oc *OpConductor) action() { break } + if processingBitcoin { + err = errors.New("we're processing a large number of bitcoin attributes, refusing to stop sequencer at this time") + break + } + // 2. we're here becasuse an healthy leader became unhealthy itself // then we should try to stop sequencing locally and transfer leadership. var result *multierror.Error