forked from TrueCloudLab/neoneo-go
rpc/client: no longer add UTXO GAS for fees
It's already being paid with NEP5 GAS.
This commit is contained in:
parent
670396b908
commit
9a4e53b58e
2 changed files with 0 additions and 14 deletions
|
@ -5,11 +5,9 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/core"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/encoding/address"
|
"github.com/nspcc-dev/neo-go/pkg/encoding/address"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/io"
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/rpc/request"
|
|
||||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||||
|
@ -137,10 +135,6 @@ func (c *Client) TransferNEP5(acc *wallet.Account, to util.Uint160, token util.U
|
||||||
return util.Uint256{}, fmt.Errorf("can't calculate validUntilBlock: %v", err)
|
return util.Uint256{}, fmt.Errorf("can't calculate validUntilBlock: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := request.AddInputsAndUnspentsToTx(tx, acc.Address, core.UtilityTokenID(), gas, c); err != nil {
|
|
||||||
return util.Uint256{}, fmt.Errorf("can't add GAS to transaction: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = c.AddNetworkFee(tx, acc)
|
err = c.AddNetworkFee(tx, acc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return util.Uint256{}, fmt.Errorf("can't add network fee to transaction: %v", err)
|
return util.Uint256{}, fmt.Errorf("can't add network fee to transaction: %v", err)
|
||||||
|
|
|
@ -515,14 +515,6 @@ func (c *Client) SignAndPushInvocationTx(script []byte, acc *wallet.Account, sys
|
||||||
}
|
}
|
||||||
tx.Sender = addr
|
tx.Sender = addr
|
||||||
|
|
||||||
gas := sysfee + netfee
|
|
||||||
|
|
||||||
if gas > 0 {
|
|
||||||
if err = request.AddInputsAndUnspentsToTx(tx, acc.Address, core.UtilityTokenID(), gas, c); err != nil {
|
|
||||||
return txHash, errors.Wrap(err, "failed to add inputs and unspents to transaction")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
err = c.AddNetworkFee(tx, acc)
|
err = c.AddNetworkFee(tx, acc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return txHash, errors.Wrapf(err, "failed to add network fee")
|
return txHash, errors.Wrapf(err, "failed to add network fee")
|
||||||
|
|
Loading…
Reference in a new issue