|
|
|
@ -63,6 +63,7 @@ func (w *Worker) CommitSortedTransactions( |
|
|
|
|
txs *types.TransactionsByPriceAndNonce, |
|
|
|
|
coinbase common.Address, |
|
|
|
|
) { |
|
|
|
|
counter := 0 |
|
|
|
|
for { |
|
|
|
|
// If we don't have enough gas for any further transactions then we're done
|
|
|
|
|
if w.current.gasPool.Gas() < params.TxGas { |
|
|
|
@ -126,6 +127,11 @@ func (w *Worker) CommitSortedTransactions( |
|
|
|
|
utils.Logger().Info().Str("hash", tx.Hash().Hex()).AnErr("err", err).Msg("Transaction failed, account skipped") |
|
|
|
|
txs.Shift() |
|
|
|
|
} |
|
|
|
|
counter++ |
|
|
|
|
if counter >= 50 { |
|
|
|
|
// Limit the number of txn per block as a temporary solution to spams.
|
|
|
|
|
break |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|