(node_factory, bitcoind)
| 4044 | |
| 4045 | |
| 4046 | def test_bolt11_null_after_pay(node_factory, bitcoind): |
| 4047 | l1, l2 = node_factory.get_nodes(2) |
| 4048 | |
| 4049 | amount_sat = 10 ** 6 |
| 4050 | # pay a generic bolt11 and test if the label bol11 is null |
| 4051 | # inside the command listpays |
| 4052 | |
| 4053 | # create l2->l1 channel. |
| 4054 | l2.fundwallet(amount_sat * 5) |
| 4055 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 4056 | # Make sure l2 considers it fully connected too! |
| 4057 | wait_for(lambda: l2.rpc.listpeers(l1.info['id']) != {'peers': []}) |
| 4058 | l2.rpc.fundchannel(l1.info['id'], amount_sat * 3) |
| 4059 | |
| 4060 | # Let the channel confirm. |
| 4061 | bitcoind.generate_block(6) |
| 4062 | sync_blockheight(bitcoind, [l1, l2]) |
| 4063 | wait_for(lambda: only_one(l1.rpc.listpeerchannels()['channels'])['state'] == 'CHANNELD_NORMAL') |
| 4064 | |
| 4065 | amt = Millisatoshi(amount_sat * 2 * 1000) |
| 4066 | invl1 = l1.rpc.invoice(amt, 'j', 'j')['bolt11'] |
| 4067 | l2.rpc.pay(invl1) |
| 4068 | |
| 4069 | pays = l2.rpc.listpays()["pays"] |
| 4070 | assert(pays[0]["bolt11"] == invl1) |
| 4071 | assert('amount_msat' in pays[0] and pays[0]['amount_msat'] == amt) |
| 4072 | assert('created_at' in pays[0]) |
| 4073 | assert('completed_at' in pays[0]) |
| 4074 | |
| 4075 | |
| 4076 | def test_delpay_argument_invalid(node_factory, bitcoind): |
nothing calls this directly
no test coverage detected