(node_factory)
| 2929 | |
| 2930 | |
| 2931 | def test_hook_dep_stable(node_factory): |
| 2932 | # Load in order A, D, E, B. |
| 2933 | # A says it has to be before B, D says it has to be before E. |
| 2934 | # It should load in the order specified. |
| 2935 | |
| 2936 | dep_a = os.path.join(os.path.dirname(__file__), 'plugins/dep_a.py') |
| 2937 | dep_b = os.path.join(os.path.dirname(__file__), 'plugins/dep_b.py') |
| 2938 | dep_d = os.path.join(os.path.dirname(__file__), 'plugins/dep_d.py') |
| 2939 | dep_e = os.path.join(os.path.dirname(__file__), 'plugins/dep_e.py') |
| 2940 | l1, l2 = node_factory.line_graph(2, opts=[{}, |
| 2941 | {'plugin': [dep_a, dep_d, dep_e, dep_b]}]) |
| 2942 | |
| 2943 | # dep_a mentions deb_c, but nothing else should be unknown. |
| 2944 | # (Could be already past) |
| 2945 | l2.daemon.logsearch_start = 0 |
| 2946 | l2.daemon.wait_for_log("unknown plugin dep_c.py") |
| 2947 | assert not l2.daemon.is_in_log("unknown plugin (?!|dep_c.py)") |
| 2948 | |
| 2949 | l1.pay(l2, 100000) |
| 2950 | # They must be called in this order! |
| 2951 | l2.daemon.wait_for_log(r"dep_a.py: htlc_accepted called") |
| 2952 | l2.daemon.wait_for_log(r"dep_d.py: htlc_accepted called") |
| 2953 | l2.daemon.wait_for_log(r"dep_e.py: htlc_accepted called") |
| 2954 | l2.daemon.wait_for_log(r"dep_b.py: htlc_accepted called") |
| 2955 | |
| 2956 | |
| 2957 | def test_htlc_accepted_hook_failonion(node_factory): |
nothing calls this directly
no test coverage detected