the result is ok. At first, i send 110 txs, the result of txpool.status
{
pending: 110,
queued: 0
}
and then start mined,all of transactions were mined. As follows
so the tx_pool doesn't drop any transactions. In go-ethereum source files,tx_pool.go file deal with transaction logic , some transactions will be removed if tx_pool is full that pool size over 4096+1024,the source as follows:
// If the transaction pool is full, discard underpriced transactions
if uint64(len(pool.all)) >= pool.config.GlobalSlots+pool.config.GlobalQueue {
// If the new transaction is underpriced, don't accept it
if pool.priced.Underpriced(tx, pool.locals) {
log.Trace("Discarding underpriced transaction", "hash", hash, "price", tx.GasPrice())
underpricedTxCounter.Inc(1)
return false, ErrUnderpriced
}
// New transaction is better than our worse ones, make room for it
drop := pool.priced.Discard(len(pool.all)-int(pool.config.GlobalSlots+pool.config.GlobalQueue-1), pool.locals)
for _, tx := range drop {
log.Trace("Discarding freshly underpriced transaction", "hash", tx.Hash(), "price", tx.GasPrice())
underpricedTxCounter.Inc(1)
pool.removeTx(tx.Hash())
}
}
so there is no overflow.
Péter Szilágyi's answer on (https://github.com/ethereum/go-ethereum/issues/16284) help me to solve the problem.
Every account and transaction in Ethereum has a nonce. At any given
time, only the transaction with the correct nonce can be executed. If
you submit a transaction with a low gas price, that will block all
subsequent transactions since they are not executable nonce wise, only
the next nonce is executable.
You don't need to clear your chain data folder, pending transactions
are not stored there. There's a transactions.rlp file which saves the
local transactions.
I was using eth.resend()
with two parameters.
=> Adding gasLimit
as third parameter solved it, example:
eth.resend(eth.pendingTransactions[0], web3.toWei(20, 'gwei'), 2000000)
=> Or stop the node, remove transactions.rlp
file (rm ~/examplePOA/private/geth/transactions.rlp
) and restart.
Best Answer
The transaction pool is something internal to the node. In geth, there is a web3 extension to query it remotely via JSON RPC. See https://github.com/ethereum/go-ethereum/blob/master/internal/web3ext/web3ext.go (TxPool_JS).
You'll have to directly use JSON RPC (enable with
-rpcapi txpool
):E.g.:
Complete method list is: