Skip to content

Commit

Permalink
fix: calcFeeContract wasn't paying attention to the base gas multiplier
Browse files Browse the repository at this point in the history
  • Loading branch information
randomshinichi committed May 27, 2019
1 parent 2174b08 commit 934ef00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aeternity/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ func calcFeeStd(tx Tx, txLen int) *utils.BigInt {
return fee
}

func calcFeeContract(gas *utils.BigInt, baseGasMultiplier int, length int) *utils.BigInt {
func calcFeeContract(gas *utils.BigInt, baseGasMultiplier int64, length int) *utils.BigInt {
// (Config.Client.BaseGas * 5) + gaslimit + (len(txRLP) * Config.Client.GasPerByte) * Config.Client.GasPrice
// baseGas5 txLenGasPerByte
baseGas5 := utils.NewBigInt()
txLenBig := utils.NewBigInt()
answer := utils.NewBigInt()

baseGas5.Mul(Config.Client.BaseGas.Int, new(big.Int).SetInt64(5))
baseGas5.Mul(Config.Client.BaseGas.Int, new(big.Int).SetInt64(baseGasMultiplier))
txLenBig.SetUint64(uint64(length))
txLenGasPerByte := utils.NewBigInt()
txLenGasPerByte.Mul(txLenBig.Int, Config.Client.GasPerByte.Int)
Expand Down

0 comments on commit 934ef00

Please sign in to comment.