mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
core/vm: Fix gas calulation for pairing
This commit is contained in:
parent
aaae37ce8b
commit
a1542e3e76
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue