|
|
@@ -534,7 +534,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
|
|
|
}
|
|
|
// Drop non-local transactions under our own minimal accepted gas price
|
|
|
local = local || pool.locals.contains(from) // account may be local even if the transaction arrived from the network
|
|
|
- if !local && pool.gasPrice.Cmp(tx.GasPrice()) > 0 {
|
|
|
+ if !local && tx.GasPriceIntCmp(pool.gasPrice) < 0 {
|
|
|
return ErrUnderpriced
|
|
|
}
|
|
|
// Ensure the transaction adheres to nonce ordering
|
|
|
@@ -1187,15 +1187,15 @@ func (pool *TxPool) promoteExecutables(accounts []common.Address) []*types.Trans
|
|
|
for _, tx := range forwards {
|
|
|
hash := tx.Hash()
|
|
|
pool.all.Remove(hash)
|
|
|
- log.Trace("Removed old queued transaction", "hash", hash)
|
|
|
}
|
|
|
+ log.Trace("Removed old queued transactions", "count", len(forwards))
|
|
|
// Drop all transactions that are too costly (low balance or out of gas)
|
|
|
drops, _ := list.Filter(pool.currentState.GetBalance(addr), pool.currentMaxGas)
|
|
|
for _, tx := range drops {
|
|
|
hash := tx.Hash()
|
|
|
pool.all.Remove(hash)
|
|
|
- log.Trace("Removed unpayable queued transaction", "hash", hash)
|
|
|
}
|
|
|
+ log.Trace("Removed unpayable queued transactions", "count", len(drops))
|
|
|
queuedNofundsMeter.Mark(int64(len(drops)))
|
|
|
|
|
|
// Gather all executable transactions and promote them
|
|
|
@@ -1203,10 +1203,10 @@ func (pool *TxPool) promoteExecutables(accounts []common.Address) []*types.Trans
|
|
|
for _, tx := range readies {
|
|
|
hash := tx.Hash()
|
|
|
if pool.promoteTx(addr, hash, tx) {
|
|
|
- log.Trace("Promoting queued transaction", "hash", hash)
|
|
|
promoted = append(promoted, tx)
|
|
|
}
|
|
|
}
|
|
|
+ log.Trace("Promoted queued transactions", "count", len(promoted))
|
|
|
queuedGauge.Dec(int64(len(readies)))
|
|
|
|
|
|
// Drop all transactions over the allowed limit
|