Use NamedTuple notation for TxOutput in test_lnchannel
This makes the code more resilient in case additional members are added to TxOutput later.
This commit is contained in:
@@ -173,8 +173,8 @@ class TestChannel(unittest.TestCase):
|
|||||||
maxDiff = 999
|
maxDiff = 999
|
||||||
|
|
||||||
def assertOutputExistsByValue(self, tx, amt_sat):
|
def assertOutputExistsByValue(self, tx, amt_sat):
|
||||||
for typ, scr, val in tx.outputs():
|
for o in tx.outputs():
|
||||||
if val == amt_sat:
|
if o.value == amt_sat:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
self.assertFalse()
|
self.assertFalse()
|
||||||
|
|||||||
Reference in New Issue
Block a user