@ -176,8 +176,12 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
vmConfig . Tracer = tracer
vmConfig . Tracer = tracer
vmConfig . Debug = ( tracer != nil )
vmConfig . Debug = ( tracer != nil )
statedb . SetTxContext ( tx . Hash ( ) , txIndex )
statedb . SetTxContext ( tx . Hash ( ) , txIndex )
txContext := core . NewEVMTxContext ( msg )
snapshot := statedb . Snapshot ( )
var (
txContext = core . NewEVMTxContext ( msg )
snapshot = statedb . Snapshot ( )
prevGas = gaspool . Gas ( )
)
evm := vm . NewEVM ( vmContext , txContext , statedb , chainConfig , vmConfig )
evm := vm . NewEVM ( vmContext , txContext , statedb , chainConfig , vmConfig )
// (ret []byte, usedGas uint64, failed bool, err error)
// (ret []byte, usedGas uint64, failed bool, err error)
@ -186,6 +190,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
statedb . RevertToSnapshot ( snapshot )
statedb . RevertToSnapshot ( snapshot )
log . Info ( "rejected tx" , "index" , i , "hash" , tx . Hash ( ) , "from" , msg . From ( ) , "error" , err )
log . Info ( "rejected tx" , "index" , i , "hash" , tx . Hash ( ) , "from" , msg . From ( ) , "error" , err )
rejectedTxs = append ( rejectedTxs , & rejectedTx { i , err . Error ( ) } )
rejectedTxs = append ( rejectedTxs , & rejectedTx { i , err . Error ( ) } )
gaspool . SetGas ( prevGas )
continue
continue
}
}
includedTxs = append ( includedTxs , tx )
includedTxs = append ( includedTxs , tx )