diff --git a/blocks/blocksutil/block_generator_test.go b/blocks/blocksutil/block_generator_test.go new file mode 100644 index 000000000..014beee4b --- /dev/null +++ b/blocks/blocksutil/block_generator_test.go @@ -0,0 +1,19 @@ +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") + } + } + } + } +}