diff options
author | Egon Elbre <egonelbre@gmail.com> | 2017-08-07 00:40:34 +0800 |
---|---|---|
committer | Egon Elbre <egonelbre@gmail.com> | 2017-08-07 18:41:22 +0800 |
commit | faafeef79e1a7af462c5031a91936aae0c9cebf2 (patch) | |
tree | afab7228764ca0718402d838ad906fe9c7178266 /miner/worker.go | |
parent | b159cdd8dd33ba030e7af5aa144de43441e4f543 (diff) | |
download | go-tangerine-faafeef79e1a7af462c5031a91936aae0c9cebf2.tar go-tangerine-faafeef79e1a7af462c5031a91936aae0c9cebf2.tar.gz go-tangerine-faafeef79e1a7af462c5031a91936aae0c9cebf2.tar.bz2 go-tangerine-faafeef79e1a7af462c5031a91936aae0c9cebf2.tar.lz go-tangerine-faafeef79e1a7af462c5031a91936aae0c9cebf2.tar.xz go-tangerine-faafeef79e1a7af462c5031a91936aae0c9cebf2.tar.zst go-tangerine-faafeef79e1a7af462c5031a91936aae0c9cebf2.zip |
miner: fix megacheck warnings
Diffstat (limited to 'miner/worker.go')
-rw-r--r-- | miner/worker.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/miner/worker.go b/miner/worker.go index 411bc4e1b..dab192c24 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -24,7 +24,6 @@ import ( "sync/atomic" "time" - "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus" "github.com/ethereum/go-ethereum/consensus/misc" @@ -109,9 +108,6 @@ type worker struct { uncleMu sync.Mutex possibleUncles map[common.Hash]*types.Block - txQueueMu sync.Mutex - txQueue map[common.Hash]*types.Transaction - unconfirmed *unconfirmedBlocks // set of locally mined blocks pending canonicalness confirmations // atomic status counters @@ -133,9 +129,8 @@ func newWorker(config *params.ChainConfig, engine consensus.Engine, coinbase com proc: eth.BlockChain().Validator(), possibleUncles: make(map[common.Hash]*types.Block), coinbase: coinbase, - txQueue: make(map[common.Hash]*types.Transaction), agents: make(map[Agent]struct{}), - unconfirmed: newUnconfirmedBlocks(eth.BlockChain(), 5), + unconfirmed: newUnconfirmedBlocks(eth.BlockChain(), miningLogAtDepth), fullValidation: false, } worker.events = worker.mux.Subscribe(core.ChainHeadEvent{}, core.ChainSideEvent{}, core.TxPreEvent{}) @@ -362,11 +357,7 @@ func (self *worker) makeCurrent(parent *types.Block, header *types.Header) error work.family.Add(ancestor.Hash()) work.ancestors.Add(ancestor.Hash()) } - wallets := self.eth.AccountManager().Wallets() - accounts := make([]accounts.Account, 0, len(wallets)) - for _, wallet := range wallets { - accounts = append(accounts, wallet.Accounts()...) - } + // Keep track of transactions which return errors so they can be removed work.tcount = 0 self.current = work |