aboutsummaryrefslogtreecommitdiffstats
path: root/ethminer
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-14 17:46:09 +0800
committerobscuren <geffobscura@gmail.com>2014-06-14 17:46:09 +0800
commit63883bf27d8b87f601e1603e9024a279b91bffb7 (patch)
treebe430bdebb7c73f761e9cded3f3600820dd8763c /ethminer
parent81245473486dd680b7121d4b227ca8a57d07b4b1 (diff)
downloadgo-tangerine-63883bf27d8b87f601e1603e9024a279b91bffb7.tar
go-tangerine-63883bf27d8b87f601e1603e9024a279b91bffb7.tar.gz
go-tangerine-63883bf27d8b87f601e1603e9024a279b91bffb7.tar.bz2
go-tangerine-63883bf27d8b87f601e1603e9024a279b91bffb7.tar.lz
go-tangerine-63883bf27d8b87f601e1603e9024a279b91bffb7.tar.xz
go-tangerine-63883bf27d8b87f601e1603e9024a279b91bffb7.tar.zst
go-tangerine-63883bf27d8b87f601e1603e9024a279b91bffb7.zip
Moving closer to interop
Diffstat (limited to 'ethminer')
-rw-r--r--ethminer/miner.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/ethminer/miner.go b/ethminer/miner.go
index d05405391..30b7ef35d 100644
--- a/ethminer/miner.go
+++ b/ethminer/miner.go
@@ -136,11 +136,18 @@ func (self *Miner) mineNewBlock() {
// 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.Coinbase, self.block.State(), self.block, self.txs)
- self.txs = txs
+ // Error may be ignored. It's not important during mining
+ receipts, txs, unhandledTxs, err := stateManager.ProcessTransactions(self.block.Coinbase, self.block.State(), self.block, self.block, self.txs)
+ if err != nil {
+ ethutil.Config.Log.Debugln("[MINER]", err)
+ }
+ self.txs = append(txs, unhandledTxs...)
+
// Set the transactions to the block so the new SHA3 can be calculated
self.block.SetReceipts(receipts, txs)
+
// Accumulate the rewards included for this block
stateManager.AccumelateRewards(self.block.State(), self.block)