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

feat: Add better coverage for tx pool API tests #1391

Open
tcoratger opened this issue Sep 20, 2024 · 0 comments
Open

feat: Add better coverage for tx pool API tests #1391

tcoratger opened this issue Sep 20, 2024 · 0 comments
Labels
new-feature New features or options.

Comments

@tcoratger
Copy link
Collaborator

At the moment in #1390 we are currently only able to insert one transaction at a time into the mempool for mocking (due to limitations pointed out in #1383).

When this is resolved, it would be nice to improve the coverage in these tests by inserting for example 10 transactions into the mempool and checking that all of them are integrated into the endpoints related to the pool content transactions.

We should do something like

  // Create 10 samples transactions
  let transactions = create_sample_transactions(&katana_empty, 10)
      .await
      .expect("Failed to create sample transaction")
      .pop()
      .expect("Expected at least one transaction");

    for transaction in transactions {
      // Insert the transaction into the mempool
          let _tx_hash = katana_empty
              .eth_client
              .mempool()
              .add_transaction(TransactionOrigin::Local, transaction)
              .await
              .expect("Failed to insert transaction into the mempool");
      }
@tcoratger tcoratger added the new-feature New features or options. label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New features or options.
Projects
Status: 🆕 Backlog
Development

No branches or pull requests

1 participant