Skip to content

Commit fd0a5b4

Browse files
authored
Fix build (#191)
* Add missing dependency * Use renamed variable, fix typo
1 parent 60ade09 commit fd0a5b4

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

execution/gethexec/switch_sequencer.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type SwitchSequencer struct {
2525
espresso *EspressoSequencer
2626

2727
switchPollInterval time.Duration
28-
swtichDelayThreshold uint64
28+
switchDelayThreshold uint64
2929
lightClient lightClient.LightClientReaderInterface
3030

3131
mode int
@@ -52,7 +52,7 @@ func NewSwitchSequencer(centralized *Sequencer, espresso *EspressoSequencer, l1c
5252
lightClient: lightclient,
5353
mode: SequencingMode_Espresso,
5454
switchPollInterval: config.SwitchPollInterval,
55-
swtichDelayThreshold: config.SwitchDelayThreshold,
55+
switchDelayThreshold: config.SwitchDelayThreshold,
5656
}, nil
5757
}
5858

@@ -64,7 +64,7 @@ func (s *SwitchSequencer) SwitchToEspresso(ctx context.Context) error {
6464
if s.IsRunningEspressoMode() {
6565
return nil
6666
}
67-
log.Info("Switching to espresso sequencer", "max hotshot drift time", s.maxHotShotDriftTime)
67+
log.Info("Switching to espresso sequencer", "switchDelayThreshold", s.switchDelayThreshold)
6868

6969
s.mode = SequencingMode_Espresso
7070

@@ -77,7 +77,7 @@ func (s *SwitchSequencer) SwitchToCentralized(ctx context.Context) error {
7777
return nil
7878
}
7979
s.mode = SequencingMode_Centralized
80-
log.Warn("Switching to centrialized sequencer", "max hotshot drift time", s.maxHotShotDriftTime)
80+
log.Warn("Switching to centrialized sequencer", "switchDelayThreshold", s.switchDelayThreshold)
8181

8282
s.espresso.StopAndWait()
8383
return s.centralized.Start(ctx)
@@ -116,7 +116,7 @@ func (s *SwitchSequencer) Start(ctx context.Context) error {
116116

117117
if s.lightClient != nil {
118118
s.CallIteratively(func(ctx context.Context) time.Duration {
119-
isLive, err := s.lightClient.IsHotShotLive(s.swtichDelayThreshold)
119+
isLive, err := s.lightClient.IsHotShotLive(s.switchDelayThreshold)
120120
if err != nil {
121121
return s.switchPollInterval
122122
}
@@ -128,7 +128,7 @@ func (s *SwitchSequencer) Start(ctx context.Context) error {
128128
}
129129

130130
if err != nil {
131-
log.Error("Error swithcing mode", "err", err)
131+
log.Error("Error switching mode", "err", err)
132132
return 0
133133
}
134134
return s.switchPollInterval

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ require (
171171
)
172172

173173
require (
174+
github.com/benbjohnson/clock v1.3.5 // indirect
174175
github.com/olekukonko/tablewriter v0.0.5 // indirect
175176
github.com/rs/cors v1.7.0 // indirect
176177
github.com/shirou/gopsutil v3.21.11+incompatible // indirect

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ github.com/aws/smithy-go v1.11.2/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnw
9292
github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8=
9393
github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
9494
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
95+
github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o=
96+
github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
9597
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
9698
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
9799
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=

0 commit comments

Comments
 (0)