ethermint icon indicating copy to clipboard operation
ethermint copied to clipboard

RPC eth_pendingTransactions does not work as expected

Open banishee opened this issue 4 years ago • 1 comments

System info: [Include Ethermint commit, operating system name, and other relevant details]

  • branch dev

Steps to reproduce:

  1. If developers use this api to query the number of pending transactions, only eth type tx will be counted, while cosmos type tx will not be counted.
func (b *EthermintBackend) PendingTransactions() ([]*rpctypes.Transaction, error) {
	pendingTxs, err := b.clientCtx.Client.UnconfirmedTxs(1000)
	if err != nil {
		return nil, err
	}

	transactions := make([]*rpctypes.Transaction, 0)
	for _, tx := range pendingTxs.Txs {
                 
		ethTx, err := rpctypes.RawTxToEthTx(b.clientCtx, tx)
		if err != nil {
			continue
		}
         ...
        }
        ....
}

Expected behavior: [What you expected to happen]

  • the eth_pendingTransactions api should return number of all types of transactions

Actual behavior: [What actually happened]

Additional info: [Include gist of relevant config, logs, etc.]

banishee avatar Feb 17 '21 08:02 banishee

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Apr 04 '21 00:04 github-actions[bot]