aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-01-06 21:42:03 +0800
committerGitHub <noreply@github.com>2017-01-06 21:42:03 +0800
commit8f9daaa3ba71c3b6bdcc24adfdc987e6f3a2e184 (patch)
tree92a336065bddcd620798e8f552432e3ed62ee14a /miner
parente0ee0cc66a4416edd47232649f4d4bca4a5e3c07 (diff)
parentd3b751e4d94f95f6cc89544852f2d5811e075665 (diff)
downloaddexon-8f9daaa3ba71c3b6bdcc24adfdc987e6f3a2e184.tar
dexon-8f9daaa3ba71c3b6bdcc24adfdc987e6f3a2e184.tar.gz
dexon-8f9daaa3ba71c3b6bdcc24adfdc987e6f3a2e184.tar.bz2
dexon-8f9daaa3ba71c3b6bdcc24adfdc987e6f3a2e184.tar.lz
dexon-8f9daaa3ba71c3b6bdcc24adfdc987e6f3a2e184.tar.xz
dexon-8f9daaa3ba71c3b6bdcc24adfdc987e6f3a2e184.tar.zst
dexon-8f9daaa3ba71c3b6bdcc24adfdc987e6f3a2e184.zip
Merge pull request #3518 from fjl/ethclient-dependency-cleanup
core/types: dependency cleanup
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 3ae51d120..adb224c47 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -327,7 +327,7 @@ func (self *worker) wait() {
}
// broadcast before waiting for validation
- go func(block *types.Block, logs vm.Logs, receipts []*types.Receipt) {
+ go func(block *types.Block, logs []*types.Log, receipts []*types.Receipt) {
self.mux.Post(core.NewMinedBlockEvent{Block: block})
self.mux.Post(core.ChainEvent{Block: block, Hash: block.Hash(), Logs: logs})
@@ -537,7 +537,7 @@ func (self *worker) commitUncle(work *Work, uncle *types.Header) error {
func (env *Work) commitTransactions(mux *event.TypeMux, txs *types.TransactionsByPriceAndNonce, gasPrice *big.Int, bc *core.BlockChain) {
gp := new(core.GasPool).AddGas(env.header.GasLimit)
- var coalescedLogs vm.Logs
+ var coalescedLogs []*types.Log
for {
// Retrieve the next transaction and abort if all done
@@ -597,12 +597,12 @@ func (env *Work) commitTransactions(mux *event.TypeMux, txs *types.TransactionsB
// make a copy, the state caches the logs and these logs get "upgraded" from pending to mined
// logs by filling in the block hash when the block was mined by the local miner. This can
// cause a race condition if a log was "upgraded" before the PendingLogsEvent is processed.
- cpy := make(vm.Logs, len(coalescedLogs))
+ cpy := make([]*types.Log, len(coalescedLogs))
for i, l := range coalescedLogs {
- cpy[i] = new(vm.Log)
+ cpy[i] = new(types.Log)
*cpy[i] = *l
}
- go func(logs vm.Logs, tcount int) {
+ go func(logs []*types.Log, tcount int) {
if len(logs) > 0 {
mux.Post(core.PendingLogsEvent{Logs: logs})
}
@@ -613,7 +613,7 @@ func (env *Work) commitTransactions(mux *event.TypeMux, txs *types.TransactionsB
}
}
-func (env *Work) commitTransaction(tx *types.Transaction, bc *core.BlockChain, gp *core.GasPool) (error, vm.Logs) {
+func (env *Work) commitTransaction(tx *types.Transaction, bc *core.BlockChain, gp *core.GasPool) (error, []*types.Log) {
snap := env.state.Snapshot()
receipt, _, err := core.ApplyTransaction(env.config, bc, gp, env.state, env.header, tx, env.header.GasUsed, vm.Config{})