Some checks are pending
docker-build-cometbft / vars (push) Waiting to run
docker-build-cometbft / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-cometbft / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-cometbft / merge-images (push) Blocked by required conditions
docker-build-e2e-node / vars (push) Waiting to run
docker-build-e2e-node / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-e2e-node / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-e2e-node / merge-images (push) Blocked by required conditions
23 lines
544 B
Go
23 lines
544 B
Go
package crypto_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"git.cw.tr/mukan-network/mukan-consensus/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)
|
|
}
|