rpc: provide cosigners accounts to CreateTxFromScript

We need to define network fee for each of cosigners, and the only way to
do it is to access the cosigner's script.
This commit is contained in:
Anna Shaleva 2021-03-02 15:43:09 +03:00
parent b1b9a8cf66
commit 6c0faa4ea3
11 changed files with 193 additions and 56 deletions

View file

@ -203,10 +203,15 @@ func TestSignAndPushInvocationTx(t *testing.T) {
priv := testchain.PrivateKey(0)
acc := wallet.NewAccountFromPrivateKey(priv)
h, err := c.SignAndPushInvocationTx([]byte{byte(opcode.PUSH1)}, acc, 30, 0, []transaction.Signer{{
Account: priv.GetScriptHash(),
Scopes: transaction.CalledByEntry,
}})
h, err := c.SignAndPushInvocationTx([]byte{byte(opcode.PUSH1)}, acc, 30, 0, []client.SignerAccount{
{
Signer: transaction.Signer{
Account: priv.GetScriptHash(),
Scopes: transaction.CalledByEntry,
},
Account: acc,
},
})
require.NoError(t, err)
mp := chain.GetMemPool()