Remove calls to invalid()
Gas estimation seems to work just fine without them?
This commit is contained in:
parent
c3d7db3456
commit
80dfa41e32
|
@ -45,11 +45,6 @@ library Pairing {
|
|||
// solhint-disable-next-line no-inline-assembly
|
||||
assembly {
|
||||
success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)
|
||||
// Use "invalid" to make gas estimation work
|
||||
switch success
|
||||
case 0 {
|
||||
invalid()
|
||||
}
|
||||
}
|
||||
require(success, "pairing-add-failed");
|
||||
}
|
||||
|
@ -68,11 +63,6 @@ library Pairing {
|
|||
// solhint-disable-next-line no-inline-assembly
|
||||
assembly {
|
||||
success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)
|
||||
// Use "invalid" to make gas estimation work
|
||||
switch success
|
||||
case 0 {
|
||||
invalid()
|
||||
}
|
||||
}
|
||||
require(success, "pairing-mul-failed");
|
||||
}
|
||||
|
@ -109,11 +99,6 @@ library Pairing {
|
|||
out,
|
||||
0x20
|
||||
)
|
||||
// Use "invalid" to make gas estimation work
|
||||
switch success
|
||||
case 0 {
|
||||
invalid()
|
||||
}
|
||||
}
|
||||
require(success, "pairing-opcode-failed");
|
||||
return out[0] != 0;
|
||||
|
|
Loading…
Reference in New Issue