Open
Conversation
Size reduce3
* Implicitly setting btcAmount below eligible amount makes difficult to calculate griefing amount and making the code significant more complex than necessary. * Test case_requestReplace passed
✓ Register OLD Vault with 10 Wei Collateral (94ms)
✓ Issue 0.5 OneBtc (836ms)
✓ Request Replace (116ms)
✓ Register NEW Vault with 10 Wei Collateral (78ms)
✓ Accept Replace (602ms)
✓ Execute Replace (95ms)
* ensure we request above dust amount (non-zero)
Author
|
The vault state didn't look right to me after replace. So will add more tests & fix around it. |
…rylib; all tests passed
* Decrease toBeRedeem on old vault on execute * Decrease CollateralUsed oldVault after replace * validate collateral sent amount * increase CollateralUsed on newvault * reduce TobeIssued after replace * test remove collateral from old vault * fixed tests, all passed
Author
Example test caseOLD VAULT: State of OLD VAULT (After Issued and RequestReplace)State of Old vault after deposited 10 ONE collateral, and issued 0.5 BTC (at 1BTC to 10 ONE) NEW VAULT (After executeReplace)Collateral properly reflect:
OLD VAULT (After Execute)OLD VAULT (After WithdrawCollateral)Vault owner withdraws all of 10 ONE Collateral. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP