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 test to verify encoding/decoding each field works #422

Open
jasonpaulos opened this issue Aug 20, 2021 · 0 comments
Open

Add test to verify encoding/decoding each field works #422

jasonpaulos opened this issue Aug 20, 2021 · 0 comments

Comments

@jasonpaulos
Copy link
Contributor

Summary

Recently this SDK had a bug where the transaction extra pages field, apep, was being ignored when decoding a transaction. In order to prevent bugs like this from happening again, we can create a test that automatically verifies each field persists during a roundtrip of encoding + decoding.

Scope

In order to do this, we'll need a list of each encoded transaction field key name. This must be updated with every new txn field.

Then, there are two options:

  1. Make an object with every single field from that list present, then run it through a roundtrip of Transaction.get_obj_for_encoding and Transaction. from_obj_for_encoding and verify all fields are still present.
  2. For each field from the list, make an object with ONLY that field present, then run it through a roundtrip of Transaction.get_obj_for_encoding and Transaction. from_obj_for_encoding and verify that field is still present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@jasonpaulos @algoanne and others