Skip to content

Commit

Permalink
Update tx_pool.go
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak authored Jul 25, 2024
1 parent 5fbff58 commit 0bc92c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/tx_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1682,14 +1682,16 @@ func (pool *TxPool) demoteUnexecutables() {
}

// PauseReorgs stops any new reorg jobs to be started but doesn't interrupt any existing ones that are in flight
// Keep in mind this function might block, although it is not expected to block for any significant amount of time
func (pool *TxPool) PauseReorgs() {
select {
case pool.reorgPauseCh <- true:
case <-pool.reorgShutdownCh:
}
}

// ResumeReorgs allows new reorg jobs to be started
// ResumeReorgs allows new reorg jobs to be started.
// Keep in mind this function might block, although it is not expected to block for any significant amount of time
func (pool *TxPool) ResumeReorgs() {
select {
case pool.reorgPauseCh <- false:
Expand Down

0 comments on commit 0bc92c9

Please sign in to comment.