Skip to content

Commit a038d3d

Browse files
committed
reverted b81b486dc1a7d1cb21d30d04d9cec78f64d0b951
1 parent 59bb27f commit a038d3d

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

miner/worker.go

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,31 +1278,24 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64)
12781278
w.updateSnapshot()
12791279
return
12801280
}
1281-
if !metaminer.IsPoW() { // Metadium
1282-
txs := types.NewTransactionsByPriceAndNonce(w.current.signer, pending)
1281+
// Split the pending transactions into locals and remotes
1282+
localTxs, remoteTxs := make(map[common.Address]types.Transactions), pending
1283+
for _, account := range w.eth.TxPool().Locals() {
1284+
if txs := remoteTxs[account]; len(txs) > 0 {
1285+
delete(remoteTxs, account)
1286+
localTxs[account] = txs
1287+
}
1288+
}
1289+
if len(localTxs) > 0 {
1290+
txs := types.NewTransactionsByPriceAndNonce(w.current.signer, localTxs)
12831291
if w.commitTransactions(txs, w.coinbase, interrupt, nil, nil) {
12841292
return
12851293
}
1286-
} else {
1287-
// Split the pending transactions into locals and remotes
1288-
localTxs, remoteTxs := make(map[common.Address]types.Transactions), pending
1289-
for _, account := range w.eth.TxPool().Locals() {
1290-
if txs := remoteTxs[account]; len(txs) > 0 {
1291-
delete(remoteTxs, account)
1292-
localTxs[account] = txs
1293-
}
1294-
}
1295-
if len(localTxs) > 0 {
1296-
txs := types.NewTransactionsByPriceAndNonce(w.current.signer, localTxs)
1297-
if w.commitTransactions(txs, w.coinbase, interrupt, nil, nil) {
1298-
return
1299-
}
1300-
}
1301-
if len(remoteTxs) > 0 {
1302-
txs := types.NewTransactionsByPriceAndNonce(w.current.signer, remoteTxs)
1303-
if w.commitTransactions(txs, w.coinbase, interrupt, nil, nil) {
1304-
return
1305-
}
1294+
}
1295+
if len(remoteTxs) > 0 {
1296+
txs := types.NewTransactionsByPriceAndNonce(w.current.signer, remoteTxs)
1297+
if w.commitTransactions(txs, w.coinbase, interrupt, nil, nil) {
1298+
return
13061299
}
13071300
}
13081301
w.commit(uncles, w.fullTaskHook, true, tstart)

0 commit comments

Comments
 (0)