Skip to content

Conversation

@PastaPastaPasta
Copy link
Member

This adds a test for CPrivateSend::IsCollateralAmount

Most of the other PrivateSend features are difficult to do since they are wallet based, but I am looking into that.

Also, the indentation of test_dash.cpp has been adjusted since I had to adjust the file to get the test to work. (This is in line with how bitcoin does formatting fixes, but I guess I could revert that if need be)

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.

  1. The choice for "bad" values looks kind of arbitrary.. why not 0.00009999 (1 duff too small) and 0.00040001 (1 duff too large)? Could also add 0.00100000 (10x min collateral) and 0.00100001 (the smallest denom), that would be ok-ish/kind of reasonable.
  2. I don't think touching whitespaces in completely unrelated parts of code is a good idea just because btc (presumably) does it this way tbh. Would rather see this part removed.

Signed-off-by: Pasta <pasta@dashboost.org>
@PastaPastaPasta
Copy link
Member Author

split indentation into a separate commit adjusted the bad collateral values based on your feedback

@nmarley
Copy link

nmarley commented Jan 30, 2020

@PastaPastaPasta I think the point is that whitespace is not related to this change, not necessarily the commits.

https://github.com/dashpay/dash/blob/master/CONTRIBUTING.md#pull-request-philosophy

Patchsets should always be focused. For example, a pull request could add a feature, fix a bug, or refactor code; but not a mixture. Please also avoid super pull requests which attempt to do too much, are overly large, or overly complex as this makes review difficult.

@PastaPastaPasta
Copy link
Member Author

Well, I figured I could either put it in a separate commit and leave it in this PR (and we merge without squashing), or I could put it in a separate branch and open a new PR 😂

I don't care which one I do, this route just seemed easier

@nmarley
Copy link

nmarley commented Jan 30, 2020

Well personally I prefer to review only related changesets so when I get to here it gets confusing and unrelated to the PR purpose: https://github.com/dashpay/dash/pull/3310/files#diff-9b2cfef005c1c5be84e5895e91be56dbL52

@PastaPastaPasta
Copy link
Member Author

dropped that commit

Copy link

@nmarley nmarley left a comment

Choose a reason for hiding this comment

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

dropped that commit

Thanks, looks much cleaner now. Just one more nit on order of filenames in the list.

Signed-off-by: Pasta <pasta@dashboost.org>
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

Copy link

@nmarley nmarley left a comment

Choose a reason for hiding this comment

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

utACK

Copy link

@codablock codablock left a comment

Choose a reason for hiding this comment

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

utACK

@UdjinM6 UdjinM6 changed the title add ps collatoral test Add unit tests for CPrivateSend::IsCollateralAmount Jan 31, 2020
@UdjinM6 UdjinM6 merged commit 4af4432 into dashpay:develop Jan 31, 2020
@PastaPastaPasta PastaPastaPasta deleted the privatesend-unit-tests branch January 31, 2020 13:39
@PastaPastaPasta
Copy link
Member Author

Can we add 16 milestone?

@UdjinM6 UdjinM6 added this to the 16 milestone Apr 13, 2020
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Feb 11, 2022
* add privatesend collateral tests

Signed-off-by: Pasta <pasta@dashboost.org>

* move privatesend_tests.cpp in Makefile.test.include

Signed-off-by: Pasta <pasta@dashboost.org>
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