core/vm: Fix gas calulation for pairing

This commit is contained in:
Martin Holst Swende 2017-06-30 15:00:16 +02:00
parent aaae37ce8b
commit a1542e3e76

View file

@ -279,7 +279,8 @@ type pairing struct{}
// required for anything significant is so high it's impossible to pay for.
func (c *pairing) RequiredGas(input []byte) uint64 {
//return 0 // TODO
return uint64(60000*len(input) + 40000)
k := (len(input) + 191) / pairSize
return uint64(60000*k + 40000)
}
const pairSize = 192