diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-04-12 21:38:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 21:38:31 +0800 |
commit | a7b9e484d05ceb0afce4ba5dbc62b8f262c2e354 (patch) | |
tree | 35ab50c0e276beb15e6beac2eaa846f6b737f64c /core/state_processor.go | |
parent | 6b7ae4e751dbaee0f31032f045fd35b0c1079388 (diff) | |
download | go-tangerine-a7b9e484d05ceb0afce4ba5dbc62b8f262c2e354.tar.gz go-tangerine-a7b9e484d05ceb0afce4ba5dbc62b8f262c2e354.tar.zst go-tangerine-a7b9e484d05ceb0afce4ba5dbc62b8f262c2e354.zip |
consensus, core, ethstats: use engine specific block beneficiary (#14318)
* consensus, core, ethstats: use engine specific block beneficiary
* core, eth, les, miner: use explicit beneficiary during mining
Diffstat (limited to 'core/state_processor.go')
-rw-r--r-- | core/state_processor.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/state_processor.go b/core/state_processor.go index aca2929eb..4fc2f1eae 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -19,6 +19,7 @@ package core import ( "math/big" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus" "github.com/ethereum/go-ethereum/consensus/misc" "github.com/ethereum/go-ethereum/core/state" @@ -69,7 +70,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg // Iterate over and process the individual transactions for i, tx := range block.Transactions() { statedb.StartRecord(tx.Hash(), block.Hash(), i) - receipt, _, err := ApplyTransaction(p.config, p.bc, gp, statedb, header, tx, totalUsedGas, cfg) + receipt, _, err := ApplyTransaction(p.config, p.bc, nil, gp, statedb, header, tx, totalUsedGas, cfg) if err != nil { return nil, nil, nil, err } @@ -86,13 +87,13 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg // and uses the input parameters for its environment. It returns the receipt // for the transaction, gas used and an error if the transaction failed, // indicating the block was invalid. -func ApplyTransaction(config *params.ChainConfig, bc *BlockChain, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *big.Int, cfg vm.Config) (*types.Receipt, *big.Int, error) { +func ApplyTransaction(config *params.ChainConfig, bc *BlockChain, author *common.Address, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *big.Int, cfg vm.Config) (*types.Receipt, *big.Int, error) { msg, err := tx.AsMessage(types.MakeSigner(config, header.Number)) if err != nil { return nil, nil, err } // Create a new context to be used in the EVM environment - context := NewEVMContext(msg, header, bc) + context := NewEVMContext(msg, header, bc, author) // Create a new environment which holds all relevant information // about the transaction and calling mechanisms. vmenv := vm.NewEVM(context, statedb, config, cfg) |