@@ -68,7 +68,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
6868 // Iterate over and process the individual transactions
6969 for i , tx := range block .Transactions () {
7070 statedb .Prepare (tx .Hash (), block .Hash (), i )
71- receipt , _ , err := ApplyTransaction (p .config , p .bc , nil , gp , statedb , header , tx , usedGas , cfg )
71+ receipt , err := ApplyTransaction (p .config , p .bc , nil , gp , statedb , header , tx , usedGas , cfg )
7272 if err != nil {
7373 return nil , nil , 0 , err
7474 }
@@ -85,10 +85,10 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
8585// and uses the input parameters for its environment. It returns the receipt
8686// for the transaction, gas used and an error if the transaction failed,
8787// indicating the block was invalid.
88- func ApplyTransaction (config * params.ChainConfig , bc ChainContext , author * common.Address , gp * GasPool , statedb * state.StateDB , header * types.Header , tx * types.Transaction , usedGas * uint64 , cfg vm.Config ) (* types.Receipt , uint64 , error ) {
88+ func ApplyTransaction (config * params.ChainConfig , bc ChainContext , author * common.Address , gp * GasPool , statedb * state.StateDB , header * types.Header , tx * types.Transaction , usedGas * uint64 , cfg vm.Config ) (* types.Receipt , error ) {
8989 msg , err := tx .AsMessage (types .MakeSigner (config , header .Number ))
9090 if err != nil {
91- return nil , 0 , err
91+ return nil , err
9292 }
9393 // Create a new context to be used in the EVM environment
9494 context := NewEVMContext (msg , header , bc , author )
@@ -98,7 +98,7 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo
9898 // Apply the transaction to the current state (included in the env)
9999 _ , gas , failed , err := ApplyMessage (vmenv , msg , gp )
100100 if err != nil {
101- return nil , 0 , err
101+ return nil , err
102102 }
103103 // Update the state with pending changes
104104 var root []byte
@@ -125,5 +125,5 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo
125125 receipt .BlockNumber = header .Number
126126 receipt .TransactionIndex = uint (statedb .TxIndex ())
127127
128- return receipt , gas , err
128+ return receipt , err
129129}
0 commit comments