Merge pull request #2983 from bas-vk/txindex

miner: set tx index logs
This commit is contained in:
Felix Lange 2016-09-14 21:05:17 +02:00 committed by GitHub
commit 0f6f83a709
1 changed files with 2 additions and 1 deletions

View File

@ -561,6 +561,7 @@ func (env *Work) commitTransactions(mux *event.TypeMux, txs *types.TransactionsB
gp := new(core.GasPool).AddGas(env.header.GasLimit)
var coalescedLogs vm.Logs
for {
// Retrieve the next transaction and abort if all done
tx := txs.Peek()
@ -582,7 +583,7 @@ func (env *Work) commitTransactions(mux *event.TypeMux, txs *types.TransactionsB
continue
}
// Start executing the transaction
env.state.StartRecord(tx.Hash(), common.Hash{}, 0)
env.state.StartRecord(tx.Hash(), common.Hash{}, env.tcount)
err, logs := env.commitTransaction(tx, bc, gp)
switch {