Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pending in getTransactionCount #3415

Merged
merged 3 commits into from
May 10, 2024

Conversation

acolytec3
Copy link
Contributor

@acolytec3 acolytec3 commented May 10, 2024

This updates the response handler for eth_getTransactionCount to support the pending block option. This includes pending transactions currently in the local transaction pool in the transaction count.

This is needed to allow our client to work with the tx fuzzer

@@ -784,7 +786,16 @@ export class Eth {
if (account === undefined) {
return '0x0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was about to say that this should include pending txpool msgs from this account, but this is impossible since accounts do need to exist because otherwise they cannot pay the min basefee of 7 wei.

const rpc = getRpcClient(startRPC(manager.getMethods()))

const res = await rpc.request(method, ['0xccfd725760a68823ff1e062f4cc97e1360e8d997', 'pending'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, maybe we want to keep this test in it but now instead of using pending we use some invalid tag like unsupported or something.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh I guess this is tested in the getBlock anyways

Copy link
Member

@jochem-brouwer jochem-brouwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jochem-brouwer jochem-brouwer merged commit c6aae92 into master May 10, 2024
33 of 34 checks passed
@holgerd77 holgerd77 deleted the support-pending-in-getTxCount branch May 12, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants