forked from TrueCloudLab/neoneo-go
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()
|
fromAddress := wif.PrivateKey.Address()
|
||||||
|
|
||||||
if err = AddInputsAndUnspentsToTx(tx, fromAddress, gasID, gas, c); err != nil {
|
if gas > 0 {
|
||||||
return txHash, errors.Wrap(err, "failed to add inputs and unspents to transaction")
|
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 {
|
if err = SignTx(tx, wif); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue