aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-04 04:22:20 +0800
committerobscuren <geffobscura@gmail.com>2015-06-04 04:43:23 +0800
commitd09a6e54215bef8b1ac16a99f0b1d75a8a92a6a8 (patch)
treeec8f89f562417a379c45c25d58b5de9b45bc0b04 /miner
parent5197aed7dbba2ac19d99221efe33fede82007f5d (diff)
downloadgo-tangerine-d09a6e54215bef8b1ac16a99f0b1d75a8a92a6a8.tar.gz
go-tangerine-d09a6e54215bef8b1ac16a99f0b1d75a8a92a6a8.tar.zst
go-tangerine-d09a6e54215bef8b1ac16a99f0b1d75a8a92a6a8.zip
core, eth, miner: moved nonce management to tx pool.
Removed the managed tx state from the chain manager to the transaction pool where it's much easier to keep track of nonces (and manage them). The transaction pool now also uses the queue and pending txs differently where queued txs are now moved over to the pending queue (i.e. txs ready for processing and propagation).
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 58efd61db..1580d4d42 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -494,10 +494,6 @@ func (self *worker) commitTransactions(transactions types.Transactions) {
err := self.commitTransaction(tx)
switch {
case core.IsNonceErr(err) || core.IsInvalidTxErr(err):
- // Remove invalid transactions
- from, _ := tx.From()
-
- self.chain.TxState().RemoveNonce(from, tx.Nonce())
current.remove.Add(tx.Hash())
if glog.V(logger.Detail) {