Skip to content

Commit

Permalink
update interval
Browse files Browse the repository at this point in the history
  • Loading branch information
yingdianRao committed Jun 19, 2024
1 parent ec0b4b5 commit fc42ce2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dataavailability/nubit/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ func (a *NubitDABackend) PostSequence(ctx context.Context, batchesData [][]byte)

BatchsDataCache = append(BatchsDataCache, encodedData)
BatchsSize += len(encodedData)

if BatchsSize < 500*1024 {
if time.Since(a.commitTime) < 36*time.Second {
log.Infof("🏆 Nubit BatchsDataCache:%+v", len(encodedData))
return nil, nil, nil
}
if BatchsSize < 100*1024 {
log.Infof("🏆 Nubit BatchsDataCache:%+v", len(encodedData))
return nil, nil, nil
}
if time.Since(a.commitTime) < 12*time.Second {
time.Sleep(time.Since(a.commitTime))
}

BatchsData, err := MarshalBatchData(BatchsDataCache)
Expand Down

0 comments on commit fc42ce2

Please sign in to comment.