commando: track incoming and outgoing JSON IDs. Get upset if they don't match!

They currently don't, so we get some BROKEN messages.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-01-03 14:53:28 +10:30
parent 0201e6977f
commit b75ada7017
2 changed files with 30 additions and 5 deletions

View File

@@ -2609,7 +2609,9 @@ def test_plugin_shutdown(node_factory):
def test_commando(node_factory, executor):
l1, l2 = node_factory.line_graph(2, fundchannel=False,
opts={'log-level': 'io'})
opts={'log-level': 'io',
# FIXME: Currently, our JSON ids in replies are wrong, hence BROKEN!
'allow_broken_log': True})
# Nothing works until we've issued a rune.
fut = executor.submit(l2.rpc.call, method='commando',
@@ -2704,7 +2706,8 @@ def test_commando(node_factory, executor):
def test_commando_rune(node_factory):
l1, l2 = node_factory.get_nodes(2)
# FIXME: Currently, our JSON ids in replies are wrong, hence BROKEN!
l1, l2 = node_factory.get_nodes(2, opts={'allow_broken_log': True})
# Force l1's commando secret
l1.rpc.datastore(key=['commando', 'secret'], hex='1241faef85297127c2ac9bde95421b2c51e5218498ae4901dc670c974af4284b')
@@ -2939,7 +2942,8 @@ def test_commando_rune(node_factory):
def test_commando_stress(node_factory, executor):
"""Stress test to slam commando with many large queries"""
nodes = node_factory.get_nodes(5)
# FIXME: Currently, our JSON ids in replies are wrong, hence BROKEN!
nodes = node_factory.get_nodes(5, opts={'allow_broken_log': True})
rune = nodes[0].rpc.commando_rune()['rune']
for n in nodes[1:]: