@ -195,10 +197,10 @@ class TestLNBaseHTLCStateMachine(unittest.TestCase):
aliceSent=0
bobSent=0
self.assertEqual(alice_channel.total_msat_sent,aliceSent,"alice has incorrect milli-satoshis sent")
self.assertEqual(alice_channel.total_msat_received,bobSent,"alice has incorrect milli-satoshis received")
self.assertEqual(bob_channel.total_msat_sent,bobSent,"bob has incorrect milli-satoshis sent")
self.assertEqual(bob_channel.total_msat_received,aliceSent,"bob has incorrect milli-satoshis received")
self.assertEqual(alice_channel.total_msat[SENT],aliceSent,"alice has incorrect milli-satoshis sent")
self.assertEqual(alice_channel.total_msat[RECEIVED],bobSent,"alice has incorrect milli-satoshis received")
self.assertEqual(bob_channel.total_msat[SENT],bobSent,"bob has incorrect milli-satoshis sent")
self.assertEqual(bob_channel.total_msat[RECEIVED],aliceSent,"bob has incorrect milli-satoshis received")
self.assertEqual(bob_channel.local_state.ctn,1,"bob has incorrect commitment height")
self.assertEqual(alice_channel.local_state.ctn,1,"alice has incorrect commitment height")
@ -236,18 +238,18 @@ class TestLNBaseHTLCStateMachine(unittest.TestCase):
# should show 1 BTC received. They should also be at commitment height
# two, with the revocation window extended by 1 (5).
mSatTransferred=one_bitcoin_in_msat
self.assertEqual(alice_channel.total_msat_sent,mSatTransferred,"alice satoshis sent incorrect %s vs %s expected"%(alice_channel.total_msat_sent,mSatTransferred))
self.assertEqual(alice_channel.total_msat_received,0,"alice satoshis received incorrect %s vs %s expected"%(alice_channel.total_msat_received,0))
self.assertEqual(bob_channel.total_msat_received,mSatTransferred,"bob satoshis received incorrect %s vs %s expected"%(bob_channel.total_msat_received,mSatTransferred))
self.assertEqual(bob_channel.total_msat_sent,0,"bob satoshis sent incorrect %s vs %s expected"%(bob_channel.total_msat_sent,0))
self.assertEqual(bob_channel.l_current_height,2,"bob has incorrect commitment height, %s vs %s"%(bob_channel.l_current_height,2))
self.assertEqual(alice_channel.l_current_height,2,"alice has incorrect commitment height, %s vs %s"%(alice_channel.l_current_height,2))
self.assertEqual(alice_channel.total_msat[SENT],mSatTransferred,"alice satoshis sent incorrect")
self.assertEqual(alice_channel.total_msat[RECEIVED],0,"alice satoshis received incorrect")
self.assertEqual(bob_channel.total_msat[RECEIVED],mSatTransferred,"bob satoshis received incorrect")
self.assertEqual(bob_channel.total_msat[SENT],0,"bob satoshis sent incorrect")
self.assertEqual(bob_channel.current_height[LOCAL],2,"bob has incorrect commitment height")
self.assertEqual(alice_channel.current_height[LOCAL],2,"alice has incorrect commitment height")
# The logs of both sides should now be cleared since the entry adding
# the HTLC should have been removed once both sides receive the
# revocation.
self.assertEqual(alice_channel.local_update_log,[],"alice's local not updated, should be empty, has %s entries instead"%len(alice_channel.local_update_log))
self.assertEqual(alice_channel.remote_update_log,[],"alice's remote not updated, should be empty, has %s entries instead"%len(alice_channel.remote_update_log))
#self.assertEqual(alice_channel.local_update_log, [], "alice's local not updated, should be empty, has %s entries instead"% len(alice_channel.local_update_log))
#self.assertEqual(alice_channel.remote_update_log, [], "alice's remote not updated, should be empty, has %s entries instead"% len(alice_channel.remote_update_log))
defalice_to_bob_fee_update(self):
fee=111
@ -340,7 +342,7 @@ class TestLNHTLCDust(unittest.TestCase):