File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ type RemoteAgent struct {
1717
1818func NewRemoteAgent () * RemoteAgent {
1919 agent := & RemoteAgent {}
20- go agent .run ()
2120
2221 return agent
2322}
@@ -33,6 +32,7 @@ func (a *RemoteAgent) SetWorkCh(returnCh chan<- Work) {
3332func (a * RemoteAgent ) Start () {
3433 a .quit = make (chan struct {})
3534 a .workCh = make (chan * types.Block , 1 )
35+ go a .run ()
3636}
3737
3838func (a * RemoteAgent ) Stop () {
Original file line number Diff line number Diff line change @@ -213,9 +213,11 @@ func (self *worker) commitNewWork() {
213213 transactions := self .eth .TxPool ().GetTransactions ()
214214 sort .Sort (types.TxByNonce {transactions })
215215
216- minerlogger .Infof ("committing new work with %d txs\n " , len (transactions ))
217216 // Keep track of transactions which return errors so they can be removed
218- var remove types.Transactions
217+ var (
218+ remove types.Transactions
219+ tcount = 0
220+ )
219221gasLimit:
220222 for i , tx := range transactions {
221223 err := self .commitTransaction (tx )
@@ -233,6 +235,8 @@ gasLimit:
233235 minerlogger .Infof ("Gas limit reached for block. %d TXs included in this block\n " , i )
234236 // Break on gas limit
235237 break gasLimit
238+ default :
239+ tcount ++
236240 }
237241 }
238242 self .eth .TxPool ().RemoveSet (remove )
@@ -251,7 +255,8 @@ gasLimit:
251255 uncles = append (uncles , uncle .Header ())
252256 }
253257 }
254- minerlogger .Infoln ("Included" , len (uncles ), "uncle(s)" )
258+ minerlogger .Infof ("commit new work with %d txs & %d uncles\n " , tcount , len (uncles ))
259+
255260 self .current .block .SetUncles (uncles )
256261
257262 self .current .state .AddBalance (self .coinbase , core .BlockReward )
You can’t perform that action at this time.
0 commit comments