*: switch from fixed8 to int64

Follow C# implementation, we have to marshall JSON Fixed8 fields without
taking into account decimals.
This commit is contained in:
Anna Shaleva 2020-06-23 17:15:35 +03:00
parent 8ad355b444
commit 73b630db9b
35 changed files with 146 additions and 155 deletions

View file

@ -427,7 +427,7 @@ func (c *Client) SubmitBlock(b block.Block) error {
// SignAndPushInvocationTx signs and pushes given script as an invocation
// transaction using given wif to sign it and spending the amount of gas
// specified. It returns a hash of the invocation transaction and an error.
func (c *Client) SignAndPushInvocationTx(script []byte, acc *wallet.Account, sysfee util.Fixed8, netfee util.Fixed8) (util.Uint256, error) {
func (c *Client) SignAndPushInvocationTx(script []byte, acc *wallet.Account, sysfee int64, netfee util.Fixed8) (util.Uint256, error) {
var txHash util.Uint256
var err error
@ -537,6 +537,6 @@ func (c *Client) AddNetworkFee(tx *transaction.Transaction, acc *wallet.Account)
if err != nil {
return err
}
tx.NetworkFee += util.Fixed8(int64(size) * fee)
tx.NetworkFee += int64(size) * fee
return nil
}