File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -246,13 +246,6 @@ func (m *implementation) CleanupOldTxs(olderThan time.Duration) int {
246246 return true
247247 })
248248
249- if removed > 0 {
250- m .logger .Debug ().
251- Int ("removed" , removed ).
252- Dur ("older_than" , olderThan ).
253- Msg ("cleaned up old transaction hashes from cache" )
254- }
255-
256249 return removed
257250}
258251
Original file line number Diff line number Diff line change @@ -163,6 +163,9 @@ func (e *Executor) SetBlockProducer(bp BlockProducer) {
163163
164164// Start begins the execution component
165165func (e * Executor ) Start (ctx context.Context ) error {
166+ if e .cancel != nil {
167+ return errors .New ("executor already started" )
168+ }
166169 e .ctx , e .cancel = context .WithCancel (ctx )
167170
168171 // Initialize state
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ func New(
5252
5353// Start begins the pruning loop.
5454func (p * Pruner ) Start (ctx context.Context ) error {
55+ if p .cancel != nil {
56+ return errors .New ("pruner already started" )
57+ }
5558 if ! p .cfg .IsPruningEnabled () {
5659 p .logger .Info ().Msg ("pruning is disabled, not starting pruner" )
5760 return nil
Original file line number Diff line number Diff line change @@ -69,9 +69,11 @@ func NewReaper(
6969
7070// Start begins the execution component
7171func (r * Reaper ) Start (ctx context.Context ) error {
72+ if r .cancel != nil {
73+ return errors .New ("reaper already started" )
74+ }
7275 r .ctx , r .cancel = context .WithCancel (ctx )
7376
74- // Start reaper loop
7577 r .wg .Go (r .reaperLoop )
7678
7779 r .logger .Info ().Dur ("idle_interval" , r .interval ).Msg ("reaper started" )
Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ func NewSubmitter(
119119
120120// Start begins the submitting component
121121func (s * Submitter ) Start (ctx context.Context ) error {
122+ if s .cancel != nil {
123+ return errors .New ("submitter already started" )
124+ }
122125 s .ctx , s .cancel = context .WithCancel (ctx )
123126
124127 // Initialize DA included height
Original file line number Diff line number Diff line change @@ -163,6 +163,9 @@ func (s *Syncer) SetBlockSyncer(bs BlockSyncer) {
163163
164164// Start begins the syncing component
165165func (s * Syncer ) Start (ctx context.Context ) (err error ) {
166+ if s .cancel != nil {
167+ return errors .New ("syncer already started" )
168+ }
166169 ctx , cancel := context .WithCancel (ctx )
167170 s .ctx , s .cancel = ctx , cancel
168171
You can’t perform that action at this time.
0 commit comments