Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

RPC eth_pendingTransactions does not work as expected #803

Open
banishee opened this issue Feb 17, 2021 · 1 comment
Open

RPC eth_pendingTransactions does not work as expected #803

banishee opened this issue Feb 17, 2021 · 1 comment
Labels
rpc Ethereum JSON-RPC related issues and PRs Status: On Ice Type: User Reported

Comments

@banishee
Copy link

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.]

@github-actions
Copy link

github-actions bot commented Apr 4, 2021

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 github-actions bot added the stale stale PRs that will be closed if no further action occurs label Apr 4, 2021
@araskachoi araskachoi reopened this Apr 12, 2021
@araskachoi araskachoi reopened this May 10, 2021
@araskachoi araskachoi added Status: On Ice rpc Ethereum JSON-RPC related issues and PRs Type: User Reported labels May 10, 2021
@github-actions github-actions bot removed the stale stale PRs that will be closed if no further action occurs label May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
rpc Ethereum JSON-RPC related issues and PRs Status: On Ice Type: User Reported
Projects
None yet
Development

No branches or pull requests

2 participants