mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-30 09:33:36 +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,9 +167,11 @@ func (c *Client) SignAndPushInvocationTx(script []byte, wif *keys.WIF, gas util.
|
||||||
|
|
||||||
fromAddress := wif.PrivateKey.Address()
|
fromAddress := wif.PrivateKey.Address()
|
||||||
|
|
||||||
|
if gas > 0 {
|
||||||
if err = AddInputsAndUnspentsToTx(tx, fromAddress, gasID, gas, c); err != nil {
|
if err = AddInputsAndUnspentsToTx(tx, fromAddress, gasID, gas, c); err != nil {
|
||||||
return txHash, errors.Wrap(err, "failed to add inputs and unspents to transaction")
|
return txHash, errors.Wrap(err, "failed to add inputs and unspents to transaction")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if err = SignTx(tx, wif); err != nil {
|
if err = SignTx(tx, wif); err != nil {
|
||||||
return txHash, errors.Wrap(err, "failed to sign tx")
|
return txHash, errors.Wrap(err, "failed to sign tx")
|
||||||
|
|
Loading…
Reference in a new issue