Skip to content

Commit

Permalink
fix(submit loop): correctly load commit on startup (#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
danwt authored Aug 12, 2024
1 parent 603c160 commit f3e69a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func SubmitLoopInner(

eg.Go(func() error {
// 'trigger': we need one thread to continuously consume the bytes produced channel, and to monitor timer
ticker := time.NewTicker(maxBatchTime)
ticker := time.NewTicker(maxBatchTime / 10) // interval does not need to match max batch time since the other thread keeps track of the actual time
defer ticker.Stop()
for {
if maxBatchSkew*maxBatchBytes < pendingBytes.Load() {
Expand Down Expand Up @@ -240,7 +240,7 @@ func (m *Manager) GetUnsubmittedBytes() int {
}
break
}
commit, err := m.Store.LoadBlock(h)
commit, err := m.Store.LoadCommit(h)
if err != nil {
if !errors.Is(err, gerrc.ErrNotFound) {
m.logger.Error("Get unsubmitted bytes load commit.", "err", err)
Expand Down

0 comments on commit f3e69a3

Please sign in to comment.