neoneo-go/pkg/neotest/chain/chain_test.go
Evgeniy Stratonikov 79a48a7800 neotest: allow to use 6-node committee
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-11-11 11:15:15 +03:00

21 lines
585 B
Go

package chain
import (
"testing"
"github.com/nspcc-dev/neo-go/pkg/neotest"
"github.com/stretchr/testify/require"
)
// TestNewMulti checks that transaction and block is signed correctly for multi-node setup.
func TestNewMulti(t *testing.T) {
bc, vAcc, cAcc := NewMulti(t)
e := neotest.NewExecutor(t, bc, vAcc, cAcc)
require.NotEqual(t, vAcc.ScriptHash(), cAcc.ScriptHash())
const amount = int64(10_0000_0000)
c := e.CommitteeInvoker(bc.UtilityTokenHash()).WithSigners(vAcc)
c.Invoke(t, true, "transfer", e.Validator.ScriptHash(), e.Committee.ScriptHash(), amount, nil)
}