Skip to content

Commit 1b5538e

Browse files
committed
Fix blake2f precompile for rounds > 0x4000000
1 parent 29f14fb commit 1b5538e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/evm/precompiles/09-blake2f.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ export default function(opts: PrecompileInput): ExecResult {
404404
const f = lastByte === 1
405405

406406
const gasUsed = new BN(opts._common.param('gasPrices', 'blake2Round'))
407-
gasUsed.imuln(rounds)
407+
gasUsed.imul(new BN(rounds))
408408
if (opts.gasLimit.lt(gasUsed)) {
409409
return OOGResult(opts.gasLimit)
410410
}

0 commit comments

Comments
 (0)