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

Recover funds test #29

Merged
merged 11 commits into from
Aug 10, 2022
Merged

Conversation

matthiasgeihs
Copy link
Contributor

@matthiasgeihs matthiasgeihs commented Aug 9, 2022

We integrate the tests for fund recovery.

Depends on hyperledger-labs/go-perun#370.

Signed-off-by: Matthias Geihs <matthias@perun.network>
Signed-off-by: Matthias Geihs <matthias@perun.network>
Signed-off-by: Matthias Geihs <matthias@perun.network>
Signed-off-by: Matthias Geihs <matthias@perun.network>
Signed-off-by: Matthias Geihs <matthias@perun.network>
Signed-off-by: Matthias Geihs <matthias@perun.network>
Before, we filtered assets based on their ledger ID. However, this made
the funder silently discard fundings if not configured correctly. Now
we require to include placeholder depositors to be registered.

Signed-off-by: Matthias Geihs <matthias@perun.network>
Signed-off-by: Matthias Geihs <matthias@perun.network>
Signed-off-by: Matthias Geihs <matthias@perun.network>
Signed-off-by: Matthias Geihs <matthias@perun.network>
@matthiasgeihs matthiasgeihs marked this pull request as ready for review August 9, 2022 14:02
Comment on lines +353 to +354
// Count how often we don't expect an event because we have a zero balance or
// the asset is on a different ledger.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Count how often we don't expect an event because we have a zero balance or
// the asset is on a different ledger.
// Count how often we don't expect an event because the asset is on a different ledger or we have a zero
// balance for this asset.

Copy link
Contributor Author

@matthiasgeihs matthiasgeihs Aug 9, 2022

Choose a reason for hiding this comment

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

I think it's debatable which order is better :D

Honestly, I would just leave it as it is.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but I just meant that the comment is consistent with the code because you're first checking the chains and then the zero balances. (I was first a little confused because I thought the method countDifferentLedger does both).

channel/funder.go Outdated Show resolved Hide resolved
channel/test/simulated.go Outdated Show resolved Hide resolved
client/fund_test.go Outdated Show resolved Hide resolved
client/fund_test.go Outdated Show resolved Hide resolved
Signed-off-by: Matthias Geihs <matthias@perun.network>
@cryptphil cryptphil merged commit 72c18ba into hyperledger-labs:main Aug 10, 2022
@matthiasgeihs matthiasgeihs deleted the recover-funds-test branch August 10, 2022 09:36
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.

2 participants