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

itest: fix wrong node queried for balance #5348

Merged

Conversation

yyforyongyu
Copy link
Collaborator

Was looking at the channel force close test and found the wrong node was used to query the balance. (weird as it should have been caught by the test?)

testChannelForceClosure has only two relevant participants, Alice(not net.Alice) and Carol, seems like net.Bob doesn't belong here.

@yyforyongyu yyforyongyu requested a review from halseth June 1, 2021 11:26
@yyforyongyu
Copy link
Collaborator Author

The itest fails, with the following line,
carol's balance is incorrect: expected 1.05 BTC got 1.0498683 BTC
There's 13170 sats mismatched, still digging...

@yyforyongyu
Copy link
Collaborator Author

The itest fails, with the following line,
carol's balance is incorrect: expected 1.05 BTC got 1.0498683 BTC
There's 13170 sats mismatched, still digging...

Turns out that was the miner fee.

@yyforyongyu yyforyongyu requested review from bhandras and guggero and removed request for halseth June 3, 2021 10:59
Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Nice find and fix! LGTM 💯

Very weird this ever worked. I assume because Bob just always had a high balance that was larger than craolExpectedBalance?

lntest/itest/lnd_test.go Outdated Show resolved Hide resolved
@yyforyongyu
Copy link
Collaborator Author

Very weird this ever worked. I assume because Bob just always had a high balance that was larger than craolExpectedBalance?

Yep I think so. When we set up the test we net.Bob will always have some coins.

Copy link
Collaborator

@bhandras bhandras left a comment

Choose a reason for hiding this comment

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

LGTM, very nice! 🥇

@Roasbeef Roasbeef added this to the 0.13.1 milestone Jun 15, 2021
@Roasbeef Roasbeef merged commit 16bce31 into lightningnetwork:master Jun 18, 2021
@yyforyongyu yyforyongyu deleted the fix-itest-channel-close branch December 12, 2021 23:17
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.

None yet

4 participants