block_generator_test.go 324 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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")
				}
			}
		}
	}
}