aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-02-29 22:05:37 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-02-29 22:05:37 +0800
commit4044a8cea44cd4cee3a8ddaf51a76b71c9d22042 (patch)
tree1aa3776381e8e117b66e4a8ed1bf83e29d966ff1 /miner
parentc541b38fb36587d23c60f5e2f2b9b3c8700ec489 (diff)
parent61be63bb9b8527bb3e2357ad35a0f4ef29304da1 (diff)
downloadgo-tangerine-1.3.4.tar
go-tangerine-1.3.4.tar.gz
go-tangerine-1.3.4.tar.bz2
go-tangerine-1.3.4.tar.lz
go-tangerine-1.3.4.tar.xz
go-tangerine-1.3.4.tar.zst
go-tangerine-1.3.4.zip
Merge pull request #2258 from obscuren/release/1.3.4v1.3.4
Homestead Release Candidate
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 754a6fc48..30f4ff434 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -19,7 +19,6 @@ package miner
import (
"fmt"
"math/big"
- "sort"
"sync"
"sync/atomic"
"time"
@@ -495,12 +494,12 @@ func (self *worker) commitNewWork() {
/* //approach 1
transactions := self.eth.TxPool().GetTransactions()
- sort.Sort(types.TxByNonce{transactions})
+ sort.Sort(types.TxByNonce(transactions))
*/
//approach 2
transactions := self.eth.TxPool().GetTransactions()
- sort.Sort(types.TxByPriceAndNonce{transactions})
+ types.SortByPriceAndNonce(transactions)
/* // approach 3
// commit transactions for this run.
@@ -524,8 +523,8 @@ func (self *worker) commitNewWork() {
multiTxOwner = append(multiTxOwner, txs...)
}
}
- sort.Sort(types.TxByPrice{singleTxOwner})
- sort.Sort(types.TxByNonce{multiTxOwner})
+ sort.Sort(types.TxByPrice(singleTxOwner))
+ sort.Sort(types.TxByNonce(multiTxOwner))
transactions := append(singleTxOwner, multiTxOwner...)
*/
@@ -591,7 +590,8 @@ func (self *worker) commitUncle(work *Work, uncle *types.Header) error {
func (env *Work) commitTransactions(transactions types.Transactions, gasPrice *big.Int, bc *core.BlockChain) {
gp := new(core.GasPool).AddGas(env.header.GasLimit)
for _, tx := range transactions {
- // We can skip err. It has already been validated in the tx pool
+ // Error may be ignored here. The error has already been checked
+ // during transaction acceptance is the transaction pool.
from, _ := tx.From()
// Check if it falls within margin. Txs from owned accounts are always processed.