dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

test: fix test of withdrawal for more than 1000 dash #6141

Closed knst closed 1 month ago

knst commented 1 month ago

Issue being fixed or feature implemented

DIP for Credit Pool says:

The withdrawal should not be mined if:
* It requests more DASH than the credit pool contains
* It requests more than 1000 DASH
* The credit pool contains more than 1000 DASH, and the withdrawal would result in more than a 10% reduction in the credit pool over the 576-block window
* The credit pool contains less than 1000 DASH, and the withdrawal would result in more than 100 DASH being removed from the pool over the 576-block window

Though, current functional test for asset locks improperly test this case, because threshold for big withdrawal happens by 10%, not 1000 dash.

What was done?

Improvements for functional asset lock test to actually test a limit 1000 dash, not just 10%

How Has This Been Tested?

See changes

Breaking Changes

N/A, changes only for tests

Checklist:

UdjinM6 commented 1 month ago

rebased via GH GUI to fix "Check Merge Fast-Forward Only"

PastaPastaPasta commented 1 month ago

It's now not signed so I can't merge it ;)

UdjinM6 commented 1 month ago

well, that's better than merging a broken one anyway :D