diff --git a/rskj-core/src/main/java/org/ethereum/vm/program/invoke/ProgramInvokeFactoryImpl.java b/rskj-core/src/main/java/org/ethereum/vm/program/invoke/ProgramInvokeFactoryImpl.java index 8dc4370cdb0..286c2662b19 100644 --- a/rskj-core/src/main/java/org/ethereum/vm/program/invoke/ProgramInvokeFactoryImpl.java +++ b/rskj-core/src/main/java/org/ethereum/vm/program/invoke/ProgramInvokeFactoryImpl.java @@ -66,9 +66,6 @@ public ProgramInvoke createProgramInvoke(Transaction tx, int txindex, Block bloc /*** GASPRICE op ***/ Coin txGasPrice = tx.getGasPrice(); - /*** BASEFEE op ***/ - Coin minimumGasPrice = block.getMinimumGasPrice(); - /*** GAS op ***/ byte[] gas = tx.getGasLimit(); @@ -98,6 +95,9 @@ public ProgramInvoke createProgramInvoke(Transaction tx, int txindex, Block bloc /*** GASLIMIT op ***/ byte[] gaslimit = block.getGasLimit(); + /*** BASEFEE op ***/ + Coin minimumGasPrice = block.getMinimumGasPrice(); + if (logger.isInfoEnabled()) { logger.info("Top level call: \n" + "address={}\n" + @@ -135,8 +135,10 @@ public ProgramInvoke createProgramInvoke(Transaction tx, int txindex, Block bloc minimumGasPrice); } + byte[] minGasPrice = minimumGasPrice != null ? minimumGasPrice.getBytes() : ByteUtil.EMPTY_BYTE_ARRAY; + return new ProgramInvokeImpl(addr.getBytes(), origin, caller, balance.getBytes(), txGasPrice.getBytes(), gas, callValue.getBytes(), data, - lastHash, coinbase, timestamp, number, txindex,difficulty, gaslimit, minimumGasPrice.getBytes(), + lastHash, coinbase, timestamp, number, txindex,difficulty, gaslimit, minGasPrice, repository, blockStore); }