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

Add a test for routing after channel close. #21

Merged
merged 1 commit into from
Aug 12, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,19 @@ def test_payment(self):
self.assertEqual(self.alice.lit.getbalance(self.carol.lurl), 55000000 - fee)
self.assertEqual(self.carol.lit.getbalance(self.bob.lurl), 55000000 + fee2)

@unittest.expectedFailure
def test_route_close(self):
"""Test routing around closed channels."""
# Create a new channel between Alice and Bob
# so all 3 are connected to each other.
self.alice.lit.create(self.bob.lurl, 25000000, 25000000)
# Close the connection between Alice and Carol
self.alice.lit.close(self.carol.lurl)
self.propagate()
# Alice sends 0.10 BTC to Carol
self.alice.lit.send(self.carol.lurl, 10000000)
# Carol should have recieved money from Bob
self.assertEqual(self.carol.lit.getbalance(self.bob.lurl), 60000000)

if __name__ == '__main__':
unittest.main()