From a1542e3e76faf4af16b8a79bf06e34ebd12a7e3e Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 30 Jun 2017 15:00:16 +0200 Subject: [PATCH] core/vm: Fix gas calulation for pairing --- core/vm/contracts.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/vm/contracts.go b/core/vm/contracts.go index a0459ac203..68891c2f78 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -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