From dd334df80d1fd5072abb48d5547cae91200a0f2d Mon Sep 17 00:00:00 2001 From: Michael Schmoock Date: Thu, 13 Feb 2020 12:41:22 +0100 Subject: [PATCH] fix: makes testutils ln.pay assert status complete `waitsendpay` in `lightningd/pay.c` can also return 'pending' and 'failed', we should check that. --- contrib/pyln-testing/pyln/testing/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/pyln-testing/pyln/testing/utils.py b/contrib/pyln-testing/pyln/testing/utils.py index a88e3af9f..a452d1f6b 100644 --- a/contrib/pyln-testing/pyln/testing/utils.py +++ b/contrib/pyln-testing/pyln/testing/utils.py @@ -824,7 +824,8 @@ class LightningNode(object): # sendpay is async now self.rpc.sendpay([routestep], rhash) # wait for sendpay to comply - self.rpc.waitsendpay(rhash) + result = self.rpc.waitsendpay(rhash) + assert(result.get('status') == 'complete') # Note: this feeds through the smoother in update_feerate, so changing # it on a running daemon may not give expected result!