fix: makes testutils ln.pay assert status complete

`waitsendpay` in `lightningd/pay.c` can also return 'pending' and 'failed',
we should check that.
This commit is contained in:
Michael Schmoock 2020-02-13 12:41:22 +01:00 committed by Rusty Russell
parent ba36dfeba3
commit dd334df80d

View File

@ -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!