mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 10:57:42 +08:00
20 lines
324 B
Go
20 lines
324 B
Go
package blocksutil
|
|
|
|
import "testing"
|
|
|
|
func TestBlocksAreDifferent(t *testing.T) {
|
|
gen := NewBlockGenerator()
|
|
|
|
blocks := gen.Blocks(100)
|
|
|
|
for i, block1 := range blocks {
|
|
for j, block2 := range blocks {
|
|
if i != j {
|
|
if block1.String() == block2.String() {
|
|
t.Error("Found duplicate blocks")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|