package blocks import ( . "github.com/tendermint/tendermint/binary" "testing" "fmt" "math/rand" ) // Distributed pseudo-exponentially to test for various cases func randVar() UInt64 { bits := rand.Uint32() % 64 if bits == 0 { return 0 } n := uint64(1 << (bits-1)) n += uint64(rand.Int63()) & ((1 << (bits-1)) - 1) return UInt64(n) } func randBytes(n int) ByteSlice { bs := make([]byte, n) for i:=0; i