cli: fix contract deploy&invoke

We should add cosigners to deplyment and invocation transactions.
This commit is contained in:
Anna Shaleva 2020-07-06 10:01:14 +03:00
parent 02bc0bdc1e
commit 1880e96844
2 changed files with 4 additions and 3 deletions

View file

@ -429,12 +429,13 @@ func (c *Client) SubmitBlock(b block.Block) error {
// SignAndPushInvocationTx signs and pushes given script as an invocation
// transaction using given wif to sign it and spending the amount of gas
// specified. It returns a hash of the invocation transaction and an error.
func (c *Client) SignAndPushInvocationTx(script []byte, acc *wallet.Account, sysfee int64, netfee util.Fixed8) (util.Uint256, error) {
func (c *Client) SignAndPushInvocationTx(script []byte, acc *wallet.Account, sysfee int64, netfee util.Fixed8, cosigners []transaction.Cosigner) (util.Uint256, error) {
var txHash util.Uint256
var err error
tx := transaction.New(c.opts.Network, script, sysfee)
tx.SystemFee = sysfee
tx.Cosigners = cosigners
validUntilBlock, err := c.CalculateValidUntilBlock()
if err != nil {