Test paying 0 amount
(node_factory)
| 207 | |
| 208 | |
| 209 | def test_pay0(node_factory): |
| 210 | """Test paying 0 amount |
| 211 | """ |
| 212 | l1, l2 = node_factory.line_graph(2) |
| 213 | chanid = l1.get_channel_scid(l2) |
| 214 | |
| 215 | # Get any-amount invoice |
| 216 | inv = l2.rpc.invoice("any", "any", 'description') |
| 217 | rhash = inv['payment_hash'] |
| 218 | |
| 219 | routestep = { |
| 220 | 'amount_msat': 0, |
| 221 | 'id': l2.info['id'], |
| 222 | 'delay': 10, |
| 223 | 'channel': chanid |
| 224 | } |
| 225 | |
| 226 | # Amount must be nonzero! |
| 227 | l1.rpc.sendpay([routestep], rhash, payment_secret=inv['payment_secret']) |
| 228 | with pytest.raises(RpcError, match=r'WIRE_AMOUNT_BELOW_MINIMUM'): |
| 229 | l1.rpc.waitsendpay(rhash) |
| 230 | |
| 231 | |
| 232 | def test_pay_disconnect(node_factory, bitcoind): |
nothing calls this directly
no test coverage detected