random: make use or random package in tests
Also implement Bytes/Fill routines for generating byte slices.
This commit is contained in:
parent
9abda40171
commit
0036b3e52b
8 changed files with 49 additions and 68 deletions
|
@ -3,12 +3,13 @@ package consensus
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/internal/random"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestCommit_Setters(t *testing.T) {
|
||||
var sign [signatureSize]byte
|
||||
fillRandom(t, sign[:])
|
||||
random.Fill(sign[:])
|
||||
|
||||
var c commit
|
||||
c.SetSignature(sign[:])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue