aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 754a6fc48..7f24da8ac 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...)
*/