mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-27 09:44:28 +01:00
lightningd: treat JSON ids as direct tokens.
This avoids any confusion between primitive and string ids, and in particular stops an issue with commando once it starts chaining ids, that weird ids can be double-escaped and commando will not recognize the response, leaving the client hanging. It's the client's fault for using a weird id, but it's still rude (and triggered by our tests!). It also makes substituting the id in passthrough simpler, FTW. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -874,7 +874,7 @@ def test_cli(node_factory):
|
||||
assert 'help [command]\n List available commands, or give verbose help on one {command}' in out
|
||||
|
||||
# Check JSON id is as expected
|
||||
l1.daemon.wait_for_log(r"jsonrpc#[0-9]*: cli:help#[0-9]*\[IN\]")
|
||||
l1.daemon.wait_for_log(r'jsonrpc#[0-9]*: "cli:help#[0-9]*"\[IN\]')
|
||||
|
||||
# Test JSON output.
|
||||
out = subprocess.check_output(['cli/lightning-cli',
|
||||
|
||||
Reference in New Issue
Block a user