commando: support commands larger than 64k.

This is needed for invoice, which can be asked to commit to giant descriptions
(though that's antisocial!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-07-16 22:48:27 +09:30
parent 3fe246c2e7
commit 49df89556b
2 changed files with 116 additions and 26 deletions

View File

@@ -2587,3 +2587,14 @@ def test_commando(node_factory):
'params': {'level': 'io'}})
assert len(json.dumps(ret)) > 65535
# Command will go over multiple messages.
ret = l2.rpc.call(method='commando',
payload={'peer_id': l1.info['id'],
'method': 'invoice',
'params': {'amount_msat': 'any',
'label': 'label',
'description': 'A' * 200000,
'deschashonly': True}})
assert 'bolt11' in ret