Skip to content

Commit

Permalink
fix(core): fix flaky generateNonEmptyBlocks (#3740)
Browse files Browse the repository at this point in the history
Skip empty blocks in generateNonEmptyBlocks
  • Loading branch information
walldiss authored Sep 17, 2024
1 parent 1cf355d commit 1279c2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/exchange_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package core

import (
"bytes"
"context"
"testing"
"time"
Expand Down Expand Up @@ -167,6 +168,9 @@ func generateNonEmptyBlocks(
case b, ok := <-sub:
require.True(t, ok)

if bytes.Equal(share.EmptyEDSDataHash(), b.Data.Hash()) {
continue
}
hashes = append(hashes, share.DataHash(b.Data.Hash()))
i++
case <-ctx.Done():
Expand Down

0 comments on commit 1279c2e

Please sign in to comment.