Skip to content

Conversation

@knst
Copy link
Collaborator

@knst knst commented Jul 28, 2023

Issue being fixed or feature implemented

It partially resolves issue #5471

Better unit tests are needed to validate changes in ProTx implementation such as this PR: #5463

What was done?

  • Invalid ProTx transactions are checked more strictly. The flag "tx is failed" is not enough now for test to succeed, but error code should matched with expected error.
  • Duplicated implementations of tests for "valid" and "invalid transaction" are changed to more general code.
  • Added extra log output with tx ID for easier debug - to see which exactly tx is failed in test
  • Supported more by 256 txes in one json file

How Has This Been Tested?

Run unit tests

Breaking Changes

N/A

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 made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

@knst knst added this to the 20 milestone Jul 28, 2023
@knst knst requested a review from ogabrielides July 28, 2023 13:26
UdjinM6
UdjinM6 previously approved these changes Jul 28, 2023
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

@knst knst requested a review from PastaPastaPasta July 29, 2023 20:25
@PastaPastaPasta PastaPastaPasta requested a review from kwvg July 31, 2023 15:40
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are these test vectors removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bcs it tests nothing useful. It initialized by binary presentation since now instead proupregtx string - so, it doesn't actually test anything important. So, if transaction successfully deserialized -> it means that type determined correctly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems good to me

@knst knst force-pushed the refactor-trivial-tests branch from bec4c52 to c6f8fac Compare July 31, 2023 16:02
@knst knst requested a review from kwvg July 31, 2023 16:04
Copy link
Collaborator

@kwvg kwvg left a comment

Choose a reason for hiding this comment

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

LGTM, utACK

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

re-utACK

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK for squash merge

@PastaPastaPasta PastaPastaPasta merged commit 359de5a into dashpay:develop Jul 31, 2023
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.

4 participants