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

Create 2 transaction tests that consume and output notes #446

Closed
Tracked by #700
phklive opened this issue Jan 29, 2024 · 2 comments
Closed
Tracked by #700

Create 2 transaction tests that consume and output notes #446

phklive opened this issue Jan 29, 2024 · 2 comments
Labels
tests Improvements to testing

Comments

@phklive
Copy link
Contributor

phklive commented Jan 29, 2024

For now we have tests that verify the correct functionality of txs when:

  • A test of a transaction which consumes a single note.
  • A test of a transaction which produces a single note.

To be able to have a more thorough coverage we would need to implement the following tests:

  • A test of a transaction which consumes a note and produces a note.
  • A test of a transaction which consumes more than 1 note and produces more than 1 note.

This was also discussed in the following PR: #438

Goal of this issue:

Create 2 tests:

  • Test consuming 1 and producing 1 note
  • Test consuming 2 and producing 2 notes
@bobbinth bobbinth added the tests Improvements to testing label Jan 29, 2024
@bobbinth
Copy link
Contributor

bobbinth commented Feb 6, 2024

I think we can consolidate these with some of the current tests we have. Specifically, we can have the following tests:

  1. Create a SWAP note from basic wallet. This could replace the current prove_send_asset_via_wallet and prove_swap_script.
  2. Consume a SWAP note into the basic wallet. This would be the test for a transaction consuming and producing a note.
  3. Consume the P2ID note generated in step 2. This could replace prove_p2id_script and prove_receive_asset_via_wallet.

So, this would fulfill the "consuming 1 and producing 1 note" test and reduce the total number of "prove" tests by 3.

For "consuming 2 and producing 2 notes" test we could do something similar to the above, but would only test execution (not proving).

@igamigo
Copy link
Collaborator

igamigo commented Nov 15, 2024

Closed by #871

@igamigo igamigo closed this as completed Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Improvements to testing
Projects
None yet
Development

No branches or pull requests

3 participants