Replace deprecated toBytes with toBytesBE in bn256ecPairing precompile (#2944)

This commit is contained in:
andri lim 2024-12-17 18:17:47 +07:00 committed by GitHub
parent f74813520a
commit f8a6ed4f5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -347,7 +347,7 @@ func bn256ecPairing(c: Computation, fork: EVMFork = FkByzantium): EvmResultVoid
c.output.setLen(32) c.output.setLen(32)
if msglen == 0: if msglen == 0:
# we can discard here because we supply buffer of proper size # we can discard here because we supply buffer of proper size
discard BNU256.one().toBytes(c.output) discard BNU256.one().toBytesBE(c.output)
else: else:
# Calculate number of pairing pairs # Calculate number of pairing pairs
let count = msglen div 192 let count = msglen div 192
@ -365,7 +365,7 @@ func bn256ecPairing(c: Computation, fork: EVMFork = FkByzantium): EvmResultVoid
if acc == FQ12.one(): if acc == FQ12.one():
# we can discard here because we supply buffer of proper size # we can discard here because we supply buffer of proper size
discard BNU256.one().toBytes(c.output) discard BNU256.one().toBytesBE(c.output)
ok() ok()