2019-11-15 13:32:40 +03:00
|
|
|
package consensus
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2020-11-23 14:09:00 +03:00
|
|
|
"github.com/nspcc-dev/neo-go/internal/random"
|
2019-11-15 13:32:40 +03:00
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestCommit_Setters(t *testing.T) {
|
|
|
|
var sign [signatureSize]byte
|
2020-03-27 10:14:40 +03:00
|
|
|
random.Fill(sign[:])
|
2019-11-15 13:32:40 +03:00
|
|
|
|
|
|
|
var c commit
|
|
|
|
c.SetSignature(sign[:])
|
|
|
|
require.Equal(t, sign[:], c.Signature())
|
|
|
|
}
|