Skip to content

Commit

Permalink
Fix blake2f precompile for rounds > 0x4000000
Browse files Browse the repository at this point in the history
  • Loading branch information
s1na committed Nov 11, 2019
1 parent 29f14fb commit 1b5538e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/evm/precompiles/09-blake2f.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ export default function(opts: PrecompileInput): ExecResult {
const f = lastByte === 1

const gasUsed = new BN(opts._common.param('gasPrices', 'blake2Round'))
gasUsed.imuln(rounds)
gasUsed.imul(new BN(rounds))
if (opts.gasLimit.lt(gasUsed)) {
return OOGResult(opts.gasLimit)
}
Expand Down

0 comments on commit 1b5538e

Please sign in to comment.