MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_downgrade_bias

Function test_downgrade_bias

tests/test_downgrade.py:101–113  ·  view source on GitHub ↗

If we have created as node bias, we *can* downgrade this version.

(node_factory, executor)

Source from the content-addressed store, hash-verified

99
100
101def test_downgrade_bias(node_factory, executor):
102 """If we have created as node bias, we *can* downgrade this version."""
103 l1, l2 = node_factory.line_graph(2, opts={'may_reconnect': True, 'old_hsmsecret': True}, wait_for_announce=True)
104
105 l1.rpc.askrene_bias_node('xpay', l2.info['id'], 'in', 1)
106 cmd_line = downgrade_cmdline(l1)
107
108 l1.stop()
109
110 p = subprocess.Popen(cmd_line, stdout=subprocess.DEVNULL,
111 stderr=subprocess.PIPE)
112 _, err = p.communicate(timeout=TIMEOUT)
113 assert p.returncode == 0

Callers

nothing calls this directly

Calls 4

downgrade_cmdlineFunction · 0.85
line_graphMethod · 0.80
askrene_bias_nodeMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected