mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
rpc: skip input/outputs mangling if no gas is attached to invocation
This commit is contained in:
parent
8a5ac12df8
commit
dccf440dca
1 changed files with 4 additions and 2 deletions
|
@ -167,8 +167,10 @@ func (c *Client) SignAndPushInvocationTx(script []byte, wif *keys.WIF, gas util.
|
|||
|
||||
fromAddress := wif.PrivateKey.Address()
|
||||
|
||||
if err = AddInputsAndUnspentsToTx(tx, fromAddress, gasID, gas, c); err != nil {
|
||||
return txHash, errors.Wrap(err, "failed to add inputs and unspents to transaction")
|
||||
if gas > 0 {
|
||||
if err = AddInputsAndUnspentsToTx(tx, fromAddress, gasID, gas, c); err != nil {
|
||||
return txHash, errors.Wrap(err, "failed to add inputs and unspents to transaction")
|
||||
}
|
||||
}
|
||||
|
||||
if err = SignTx(tx, wif); err != nil {
|
||||
|
|
Loading…
Reference in a new issue