From 300f1e2abfeaaa2efed96d522e99ffd11729fc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 22 Jan 2016 12:05:17 +0200 Subject: [release/1.3.4] core, core/types, miner: fix transaction nonce-price combo sort --- miner/worker.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'miner') 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...) */ -- cgit v1.2.3 From 587bafaa9faba2d5b0b19c1a0e3e709218e25912 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Tue, 19 Jan 2016 23:50:00 +0100 Subject: [release/1.3.4] core, core/vm, crypto: fixes for homestead * Removed some strange code that didn't apply state reverting properly * Refactored code setting from vm & state transition to the executioner * Updated tests Conflicts: common/registrar/ethreg/api.go core/tx_pool.go core/vm/jit_test.go --- miner/worker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'miner') diff --git a/miner/worker.go b/miner/worker.go index 7f24da8ac..30f4ff434 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -590,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. -- cgit v1.2.3