Revision 4f8769175ed938a031c329de7da80821edbf7880 authored by Ethan Buchman on 19 January 2019, 21:08:57 UTC, committed by GitHub on 19 January 2019, 21:08:57 UTC
* types: dont hash entire ConsensusParams

* update encoding spec

* update blockchain spec

* spec: consensus params hash

* changelog
1 parent 40c887b
Raw File
random_test.go
package crypto_test

import (
	"testing"

	"github.com/stretchr/testify/require"

	"github.com/tendermint/tendermint/crypto"
)

// the purpose of this test is primarily to ensure that the randomness
// generation won't error.
func TestRandomConsistency(t *testing.T) {
	x1 := crypto.CRandBytes(256)
	x2 := crypto.CRandBytes(256)
	x3 := crypto.CRandBytes(256)
	x4 := crypto.CRandBytes(256)
	x5 := crypto.CRandBytes(256)
	require.NotEqual(t, x1, x2)
	require.NotEqual(t, x3, x4)
	require.NotEqual(t, x4, x5)
	require.NotEqual(t, x1, x5)
}
back to top