TransactionExecutor backward compatibility constructor added.
This commit is contained in:
parent
b823521882
commit
732ba7d8b3
|
@ -3,6 +3,7 @@ package org.ethereum.core;
|
||||||
import org.ethereum.db.BlockStore;
|
import org.ethereum.db.BlockStore;
|
||||||
import org.ethereum.facade.Repository;
|
import org.ethereum.facade.Repository;
|
||||||
import org.ethereum.listener.EthereumListener;
|
import org.ethereum.listener.EthereumListener;
|
||||||
|
import org.ethereum.listener.EthereumListenerAdapter;
|
||||||
import org.ethereum.vm.DataWord;
|
import org.ethereum.vm.DataWord;
|
||||||
import org.ethereum.vm.GasCost;
|
import org.ethereum.vm.GasCost;
|
||||||
import org.ethereum.vm.LogInfo;
|
import org.ethereum.vm.LogInfo;
|
||||||
|
@ -48,6 +49,12 @@ public class TransactionExecutor {
|
||||||
|
|
||||||
private final EthereumListener listener;
|
private final EthereumListener listener;
|
||||||
|
|
||||||
|
public TransactionExecutor(Transaction tx, byte[] coinbase, Repository track, BlockStore blockStore,
|
||||||
|
ProgramInvokeFactory programInvokeFactory, Block currentBlock) {
|
||||||
|
|
||||||
|
this(tx, coinbase, track, blockStore, programInvokeFactory, currentBlock, new EthereumListenerAdapter());
|
||||||
|
}
|
||||||
|
|
||||||
public TransactionExecutor(Transaction tx, byte[] coinbase, Repository track, BlockStore blockStore,
|
public TransactionExecutor(Transaction tx, byte[] coinbase, Repository track, BlockStore blockStore,
|
||||||
ProgramInvokeFactory programInvokeFactory, Block currentBlock, EthereumListener listener) {
|
ProgramInvokeFactory programInvokeFactory, Block currentBlock, EthereumListener listener) {
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import org.ethereum.core.Block;
|
||||||
import org.ethereum.core.TransactionExecutor;
|
import org.ethereum.core.TransactionExecutor;
|
||||||
import org.ethereum.db.*;
|
import org.ethereum.db.*;
|
||||||
import org.ethereum.facade.Repository;
|
import org.ethereum.facade.Repository;
|
||||||
import org.ethereum.listener.EthereumListenerAdapter;
|
|
||||||
import org.ethereum.util.ByteUtil;
|
import org.ethereum.util.ByteUtil;
|
||||||
import org.ethereum.vm.DataWord;
|
import org.ethereum.vm.DataWord;
|
||||||
import org.ethereum.vm.LogInfo;
|
import org.ethereum.vm.LogInfo;
|
||||||
|
@ -105,7 +104,7 @@ public class TestRunner {
|
||||||
Repository track = repository.startTracking();
|
Repository track = repository.startTracking();
|
||||||
TransactionExecutor executor =
|
TransactionExecutor executor =
|
||||||
new TransactionExecutor(tx, coinbase, track, new BlockStoreDummy(),
|
new TransactionExecutor(tx, coinbase, track, new BlockStoreDummy(),
|
||||||
invokeFactory, blockchain.getBestBlock(), new EthereumListenerAdapter());
|
invokeFactory, blockchain.getBestBlock());
|
||||||
executor.execute();
|
executor.execute();
|
||||||
track.commit();
|
track.commit();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue