@@ -18,10 +18,12 @@ import (
18
18
"github.com/nspcc-dev/neo-go/pkg/core/native/nativenames"
19
19
"github.com/nspcc-dev/neo-go/pkg/core/state"
20
20
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
21
+ "github.com/nspcc-dev/neo-go/pkg/crypto/hash"
21
22
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
22
23
"github.com/nspcc-dev/neo-go/pkg/io"
23
24
"github.com/nspcc-dev/neo-go/pkg/neotest"
24
25
"github.com/nspcc-dev/neo-go/pkg/neotest/chain"
26
+ "github.com/nspcc-dev/neo-go/pkg/smartcontract"
25
27
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
26
28
"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
27
29
"github.com/nspcc-dev/neo-go/pkg/util"
@@ -396,6 +398,19 @@ func TestNEO_RecursiveGASMint(t *testing.T) {
396
398
neoValidatorInvoker .Invoke (t , true , "transfer" , e .Validator .ScriptHash (), c .Hash , int64 (1 ), nil )
397
399
}
398
400
401
+ func TestNEO_GetCommitteeAddress (t * testing.T ) {
402
+ neoValidatorInvoker := newNeoValidatorsClient (t )
403
+ e := neoValidatorInvoker .Executor
404
+ standByCommitteePublicKeys , err := keys .NewPublicKeysFromStrings (e .Chain .GetConfig ().StandbyCommittee )
405
+ require .NoError (t , err )
406
+ sort .Sort (standByCommitteePublicKeys )
407
+ expectedCommitteeAddress , err := smartcontract .CreateMajorityMultiSigRedeemScript (standByCommitteePublicKeys )
408
+ require .NoError (t , err )
409
+ stack , err := neoValidatorInvoker .TestInvoke (t , "getCommitteeAddress" )
410
+ require .NoError (t , err )
411
+ require .Equal (t , hash .Hash160 (expectedCommitteeAddress ).BytesBE (), stack .Pop ().Item ().Value ().([]byte ))
412
+ }
413
+
399
414
func TestNEO_GetAccountState (t * testing.T ) {
400
415
neoValidatorInvoker := newNeoValidatorsClient (t )
401
416
e := neoValidatorInvoker .Executor
0 commit comments