diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-28 22:19:31 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-28 22:19:31 +0800 |
commit | 95adac7522d6041a2d6bf7b2c6b1fd311c4e6e2a (patch) | |
tree | e1a297edd5d71d5b0dca94f828467c585ca511e1 /ethminer/miner.go | |
parent | 818cbcbdd41854eff7b4943039e10c1e609b240d (diff) | |
parent | 76a59274bfce73ec988131804c643be743d2b4d2 (diff) | |
download | dexon-95adac7522d6041a2d6bf7b2c6b1fd311c4e6e2a.tar dexon-95adac7522d6041a2d6bf7b2c6b1fd311c4e6e2a.tar.gz dexon-95adac7522d6041a2d6bf7b2c6b1fd311c4e6e2a.tar.bz2 dexon-95adac7522d6041a2d6bf7b2c6b1fd311c4e6e2a.tar.lz dexon-95adac7522d6041a2d6bf7b2c6b1fd311c4e6e2a.tar.xz dexon-95adac7522d6041a2d6bf7b2c6b1fd311c4e6e2a.tar.zst dexon-95adac7522d6041a2d6bf7b2c6b1fd311c4e6e2a.zip |
Merge branch 'release/poc5-rc11'
Diffstat (limited to 'ethminer/miner.go')
-rw-r--r-- | ethminer/miner.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ethminer/miner.go b/ethminer/miner.go index 00e04cde2..9396d33f9 100644 --- a/ethminer/miner.go +++ b/ethminer/miner.go @@ -5,6 +5,7 @@ import ( "github.com/ethereum/eth-go/ethchain" "github.com/ethereum/eth-go/ethutil" "github.com/ethereum/eth-go/ethwire" + "sort" ) type Miner struct { @@ -12,7 +13,7 @@ type Miner struct { ethereum ethchain.EthManager coinbase []byte reactChan chan ethutil.React - txs []*ethchain.Transaction + txs ethchain.Transactions uncles []*ethchain.Block block *ethchain.Block powChan chan []byte @@ -132,6 +133,8 @@ func (self *Miner) mineNewBlock() { self.block.SetUncles(self.uncles) } + // Sort the transactions by nonce in case of odd network propagation + sort.Sort(ethchain.TxByNonce{self.txs}) // Accumulate all valid transaction and apply them to the new state receipts, txs := stateManager.ApplyTransactions(self.block.State(), self.block, self.txs) self.txs = txs |