Skip to content

Commit

Permalink
add log when broadcaster is waiting for tx timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-cha committed Aug 15, 2024
1 parent bb384cb commit 0e2e4b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node/broadcaster/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ func (b *Broadcaster) prepareBroadcaster(_ /*lastBlockHeight*/ uint64, lastBlock

// if we have pending txs, wait until timeout
if timeoutTime := pendingTxTime.Add(b.cfg.TxTimeout); lastBlockTime.Before(timeoutTime) {
timer := time.NewTimer(timeoutTime.Sub(lastBlockTime))
waitingTime := timeoutTime.Sub(lastBlockTime)
timer := time.NewTimer(waitingTime)
b.logger.Info("waiting for pending txs to be processed", zap.Duration("waiting_time", waitingTime))
<-timer.C
}

Expand Down

0 comments on commit 0e2e4b7

Please sign in to comment.