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