mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
test_lightningd.py: Modify test_payment_duplicate_uncommitted.
`pay` command will now wait for payment to succeed if the payment has been initiated.
This commit is contained in:
parent
a0c2686ebd
commit
ed3984f444
@ -3332,14 +3332,15 @@ class LightningDTests(BaseLightningDTests):
|
||||
assert l1.rpc.listpayments()['payments'][0]['status'] == 'pending'
|
||||
assert l1.rpc.listpayments()['payments'][0]['payment_hash'] == inv1['payment_hash']
|
||||
|
||||
# Second one should fail.
|
||||
self.assertRaises(ValueError, l1.rpc.pay, inv1['bolt11'])
|
||||
# Second one will succeed eventually.
|
||||
fut2 = self.executor.submit(l1.rpc.pay, inv1['bolt11'])
|
||||
|
||||
# Now, let it commit.
|
||||
l1.rpc.dev_reenable_commit(l2.info['id'])
|
||||
|
||||
# This should succeed.
|
||||
# These should succeed.
|
||||
fut.result(10)
|
||||
fut2.result(10)
|
||||
|
||||
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1 for --dev-broadcast-interval")
|
||||
def test_gossip_badsig(self):
|
||||
|
Loading…
Reference in New Issue
Block a user