Skip to content

Commit

Permalink
Replace deprecated toBytes with toBytesBE in bn256ecPairing precompile
Browse files Browse the repository at this point in the history
  • Loading branch information
jangko committed Dec 17, 2024
1 parent 0b70404 commit 5e1abfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nimbus/evm/precompiles.nim
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func bn256ecPairing(c: Computation, fork: EVMFork = FkByzantium): EvmResultVoid
c.output.setLen(32)
if msglen == 0:
# we can discard here because we supply buffer of proper size
discard BNU256.one().toBytes(c.output)
discard BNU256.one().toBytesBE(c.output)
else:
# Calculate number of pairing pairs
let count = msglen div 192
Expand All @@ -365,7 +365,7 @@ func bn256ecPairing(c: Computation, fork: EVMFork = FkByzantium): EvmResultVoid

if acc == FQ12.one():
# we can discard here because we supply buffer of proper size
discard BNU256.one().toBytes(c.output)
discard BNU256.one().toBytesBE(c.output)

ok()

Expand Down

0 comments on commit 5e1abfb

Please sign in to comment.