Skip to content

Use wallet balance before opening the channel for test assertions #51

@luckysori

Description

@luckysori
        "Balance after closing channel should equal balance after opening plus PTLC amount, plus fund amount, minus transaction fees"

I found this assertion unintuitive. I think it is safer (in the regards of not loosing money) to that the diff of balance before opening the channel and after closing the channel matches the payments done over the channel.

For example. if twice the fund_amount is taken from the balance to open the channel, then this assert would not catch the bug and ultimately the user would lose money.

Originally posted by @D4nte in #50 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions