commando: unmangle JSON.

JSON needs to escape \, since it can't be in front of anything unexpected,
so no \|.  So we need to return \\ to \, and in theory handle \n etc.

Changelog-Fixed: JSON-RPC: `commando-rune` now handles \\ escapes properly.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-09-14 14:59:59 +09:30
committed by Christian Decker
parent 1f9730748c
commit d57d87ea3a
2 changed files with 19 additions and 8 deletions

View File

@@ -2636,7 +2636,6 @@ def test_commando(node_factory, executor):
assert exc_info.value.error['data']['erring_index'] == 0
@pytest.mark.xfail(reason="Escapes in restrictions are broken", strict=True)
def test_commando_rune(node_factory):
l1, l2 = node_factory.get_nodes(2)