-
Notifications
You must be signed in to change notification settings - Fork 6
feat(anvil-polkadot): add transaction pool RPCs 1/2 #356
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
Conversation
iulianbarbu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments for the tests, will try out the RPCs soon, thanks!
AlexandruCihodaru
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM
alindima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
iulianbarbu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work! Thanks
First part of issue #47
Summary
Adds the first set of transaction pool management RPC endpoints. This is part 1 of the txpool RPC implementation.
Changes
anvil_dropTransaction(eth_hash)- Removes a specific transaction from the pool by its Ethereum hashanvil_dropAllTransactions()- Clears all transactions from the pool (ready and future)txpool_status()- Returns transaction pool status with pending and queued transaction countsImplementation Details
transaction_matches_eth_hashhelper function to decode extrinsics and match ETH transaction hashesTxpoolStatusresponse type withpendingandqueuedfieldsTransactionPoolHandleusingreport_invalidfor transaction removalTesting
Added basic integration tests:
test_txpool_status- Verifies pool status trackingtest_drop_transaction- Tests selective transaction removaltest_drop_all_transactions- Tests clearing the entire poolNext Steps
Part 2 will add the remaining rest of txpool RPCs(inspect, content, remove).