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: implement mempool document counter in strategy tests #1848

Merged
merged 2 commits into from
May 21, 2024

Conversation

pauldelucia
Copy link
Member

Issue being fixed or feature implemented

Identities would broadcast documents into the mempool successfully but the transitions would potentially fail while in the mempool if the identity put more than 24 documents for a contract in, due to nonce errors.

What was done?

Pass a BTreeMap of (IdentityID, ContractID) to u64 which acts as a counter for how many documents an identity has put into the mempool for a contract. If the number is 24 or greater, we don't use that identity.

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@pauldelucia pauldelucia marked this pull request as ready for review May 19, 2024 12:22
packages/strategy-tests/src/lib.rs Show resolved Hide resolved
packages/strategy-tests/src/lib.rs Show resolved Hide resolved
packages/strategy-tests/src/lib.rs Show resolved Hide resolved
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

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

👍

@pauldelucia pauldelucia merged commit 74f552f into v1.0-dev May 21, 2024
63 checks passed
@pauldelucia pauldelucia deleted the feat/strategies-mempool-document-counter branch May 21, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants