self.assertEqual(len(fwdPkg.adds),1,"bob forwards %s add htlcs, should only forward one"%len(fwdPkg.adds))
self.assertEqual(len(fwdPkg.settle_fails),0,"bob forwards %s settle/fail htlcs, should forward none"%len(fwdPkg.settle_fails))
self.assertEqual(fwdPkg.settle_fails,[],"bob forwards %s settle/fail htlcs, should forward none"%len(fwdPkg.settle_fails))
# At this point, both sides should have the proper number of satoshis
# sent, and commitment height updated within their local channel
@ -182,8 +184,8 @@ class TestLNBaseHTLCStateMachine(unittest.TestCase):
self.assertEqual(alice_channel.total_msat_received,bobSent,"alice has incorrect milli-satoshis received %s vs %s"%(alice_channel.total_msat_received,bobSent))
self.assertEqual(bob_channel.total_msat_sent,bobSent,"bob has incorrect milli-satoshis sent %s vs %s"%(bob_channel.total_msat_sent,bobSent))
self.assertEqual(bob_channel.total_msat_received,aliceSent,"bob has incorrect milli-satoshis received %s vs %s"%(bob_channel.total_msat_received,aliceSent))
self.assertEqual(bob_channel.current_height,1,"bob has incorrect commitment height, %s vs %s"%(bob_channel.current_height,1))
self.assertEqual(alice_channel.current_height,1,"alice has incorrect commitment height, %s vs %s"%(alice_channel.current_height,1))
self.assertEqual(bob_channel.l_current_height,1,"bob has incorrect commitment height, %s vs %s"%(bob_channel.l_current_height,1))
self.assertEqual(alice_channel.l_current_height,1,"alice has incorrect commitment height, %s vs %s"%(alice_channel.l_current_height,1))
# Both commitment transactions should have three outputs, and one of
# them should be exactly the amount of the HTLC.
@ -227,8 +229,8 @@ class TestLNBaseHTLCStateMachine(unittest.TestCase):
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.current_height,2,"bob has incorrect commitment height, %s vs %s"%(bob_channel.current_height,2))
self.assertEqual(alice_channel.current_height,2,"alice has incorrect commitment height, %s vs %s"%(alice_channel.current_height,2))
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))
# The logs of both sides should now be cleared since the entry adding
# the HTLC should have been removed once both sides receive the