aboutsummaryrefslogtreecommitdiffstats
path: root/core/state_processor.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2016-02-04 06:46:27 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-03-24 06:02:42 +0800
commit14013372aeca2d7f1d8c3a87b7df7c27868314be (patch)
treed4951dbe1d7f1b25b4bbde786b14b5b0b6107bcc /core/state_processor.go
parent342ae7ce7dfd7a0eab2dd06bfa65199825279f05 (diff)
downloaddexon-14013372aeca2d7f1d8c3a87b7df7c27868314be.tar
dexon-14013372aeca2d7f1d8c3a87b7df7c27868314be.tar.gz
dexon-14013372aeca2d7f1d8c3a87b7df7c27868314be.tar.bz2
dexon-14013372aeca2d7f1d8c3a87b7df7c27868314be.tar.lz
dexon-14013372aeca2d7f1d8c3a87b7df7c27868314be.tar.xz
dexon-14013372aeca2d7f1d8c3a87b7df7c27868314be.tar.zst
dexon-14013372aeca2d7f1d8c3a87b7df7c27868314be.zip
core: Added EVM configuration options
The EVM is now initialised with an additional configured object that allows you to turn on debugging options.
Diffstat (limited to 'core/state_processor.go')
-rw-r--r--core/state_processor.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/state_processor.go b/core/state_processor.go
index 3ca36a43a..38cd0e675 100644
--- a/core/state_processor.go
+++ b/core/state_processor.go
@@ -31,7 +31,7 @@ func NewStateProcessor(bc *BlockChain) *StateProcessor {
// Process returns the receipts and logs accumulated during the process and
// returns the amount of gas that was used in the process. If any of the
// transactions failed to execute due to insufficient gas it will return an error.
-func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB) (types.Receipts, vm.Logs, *big.Int, error) {
+func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg *vm.Config) (types.Receipts, vm.Logs, *big.Int, error) {
var (
receipts types.Receipts
totalUsedGas = big.NewInt(0)
@@ -43,7 +43,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB) (ty
for i, tx := range block.Transactions() {
statedb.StartRecord(tx.Hash(), block.Hash(), i)
- receipt, logs, _, err := ApplyTransaction(p.bc, gp, statedb, header, tx, totalUsedGas)
+ receipt, logs, _, err := ApplyTransaction(p.bc, gp, statedb, header, tx, totalUsedGas, cfg)
if err != nil {
return nil, nil, totalUsedGas, err
}
@@ -60,8 +60,8 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB) (ty
//
// ApplyTransactions returns the generated receipts and vm logs during the
// execution of the state transition phase.
-func ApplyTransaction(bc *BlockChain, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *big.Int) (*types.Receipt, vm.Logs, *big.Int, error) {
- _, gas, err := ApplyMessage(NewEnv(statedb, bc, tx, header), tx, gp)
+func ApplyTransaction(bc *BlockChain, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *big.Int, cfg *vm.Config) (*types.Receipt, vm.Logs, *big.Int, error) {
+ _, gas, err := ApplyMessage(NewEnv(statedb, bc, tx, header, cfg), tx, gp)
if err != nil {
return nil, nil, nil, err
}