diff --git a/types/priv_validator.go b/types/priv_validator.go index 9b01c8a6..69f7527e 100644 --- a/types/priv_validator.go +++ b/types/priv_validator.go @@ -80,7 +80,7 @@ func (privVal *PrivValidator) SetSigner(s Signer) { // Generates a new validator with private key. func GenPrivValidator() *PrivValidator { privKeyBytes := new([64]byte) - copy(privKeyBytes[:32], CRandBytes(32)) + copy(privKeyBytes[:32], crypto.CRandBytes(32)) pubKeyBytes := ed25519.MakePublicKey(privKeyBytes) pubKey := crypto.PubKeyEd25519(*pubKeyBytes) privKey := crypto.PrivKeyEd25519(*privKeyBytes) diff --git a/types/vote_set_test.go b/types/vote_set_test.go index 828ca98a..d84169a0 100644 --- a/types/vote_set_test.go +++ b/types/vote_set_test.go @@ -133,9 +133,9 @@ func Test2_3MajorityRedux(t *testing.T) { height, round := 1, 0 voteSet, _, privValidators := randVoteSet(height, round, VoteTypePrevote, 100, 1) - blockHash := CRandBytes(32) + blockHash := crypto.CRandBytes(32) blockPartsTotal := 123 - blockPartsHeader := PartSetHeader{blockPartsTotal, CRandBytes(32)} + blockPartsHeader := PartSetHeader{blockPartsTotal, crypto.CRandBytes(32)} vote := &Vote{Height: height, Round: round, Type: VoteTypePrevote, BlockHash: blockHash, BlockPartsHeader: blockPartsHeader} @@ -159,7 +159,7 @@ func Test2_3MajorityRedux(t *testing.T) { // 68th validator voted for a different BlockParts PartSetHeader { - blockPartsHeader := PartSetHeader{blockPartsTotal, CRandBytes(32)} + blockPartsHeader := PartSetHeader{blockPartsTotal, crypto.CRandBytes(32)} signAddVote(privValidators[67], withBlockPartsHeader(vote, blockPartsHeader), voteSet) hash, header, ok = voteSet.TwoThirdsMajority() if hash != nil || !header.IsZero() || ok { @@ -235,7 +235,7 @@ func TestBadVotes(t *testing.T) { func TestMakeValidation(t *testing.T) { height, round := 1, 0 voteSet, _, privValidators := randVoteSet(height, round, VoteTypePrecommit, 10, 1) - blockHash, blockPartsHeader := CRandBytes(32), PartSetHeader{123, CRandBytes(32)} + blockHash, blockPartsHeader := crypto.CRandBytes(32), PartSetHeader{123, crypto.CRandBytes(32)} vote := &Vote{Height: height, Round: round, Type: VoteTypePrecommit, BlockHash: blockHash, BlockPartsHeader: blockPartsHeader}