@@ -68,7 +68,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
68
68
// Iterate over and process the individual transactions
69
69
for i , tx := range block .Transactions () {
70
70
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 )
72
72
if err != nil {
73
73
return nil , nil , 0 , err
74
74
}
@@ -85,10 +85,10 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
85
85
// and uses the input parameters for its environment. It returns the receipt
86
86
// for the transaction, gas used and an error if the transaction failed,
87
87
// 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 ) {
89
89
msg , err := tx .AsMessage (types .MakeSigner (config , header .Number ))
90
90
if err != nil {
91
- return nil , 0 , err
91
+ return nil , err
92
92
}
93
93
// Create a new context to be used in the EVM environment
94
94
context := NewEVMContext (msg , header , bc , author )
@@ -98,7 +98,7 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo
98
98
// Apply the transaction to the current state (included in the env)
99
99
_ , gas , failed , err := ApplyMessage (vmenv , msg , gp )
100
100
if err != nil {
101
- return nil , 0 , err
101
+ return nil , err
102
102
}
103
103
// Update the state with pending changes
104
104
var root []byte
@@ -125,5 +125,5 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo
125
125
receipt .BlockNumber = header .Number
126
126
receipt .TransactionIndex = uint (statedb .TxIndex ())
127
127
128
- return receipt , gas , err
128
+ return receipt , err
129
129
}
0 commit comments