lnhtlc: test that sent amount is received

This commit is contained in:
Janus 2018-09-12 21:01:00 +02:00 committed by SomberNight
parent d3a1c8ce42
commit 211de74f47
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9
2 changed files with 3 additions and 1 deletions

View file

@ -439,6 +439,7 @@ class HTLCStateMachine(PrintError):
self.local_commitment = self.pending_local_commitment
self.remote_commitment = self.pending_remote_commitment
self.remote_commitment_to_be_revoked = prev_remote_commitment
return received_this_batch, sent_this_batch
@staticmethod
def htlcsum(htlcs):

View file

@ -223,7 +223,8 @@ class TestLNBaseHTLCStateMachine(unittest.TestCase):
aliceSig2, aliceHtlcSigs2 = alice_channel.sign_next_commitment()
self.assertEqual(aliceHtlcSigs2, [], "alice should generate no htlc signatures")
bob_channel.receive_revocation(aliceRevocation2)
received, sent = bob_channel.receive_revocation(aliceRevocation2)
self.assertEqual(received, one_bitcoin_in_msat)
bob_channel.receive_new_commitment(aliceSig2, aliceHtlcSigs2)