lightningd: make sure rpc_command replacement is well-formed.

In particular:
1. It must redirect to an existing command.
2. It must contain method, params and id.

And update the docs to show the id, which is vital.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-12-07 10:39:12 +10:30
committed by Christian Decker
parent e572b487d3
commit 30c8db148d
2 changed files with 48 additions and 14 deletions

View File

@@ -761,7 +761,6 @@ def test_sendpay_notifications(node_factory, bitcoind):
assert results['sendpay_failure'][0] == err.value.error
@pytest.mark.xfail(strict=True)
def test_rpc_command_hook(node_factory):
"""Test the `sensitive_command` hook"""
plugin = os.path.join(os.getcwd(), "tests/plugins/rpc_command.py")