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

Function main

gossipd/test/run-next_block_range.c:94–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94int main(int argc, char *argv[])
95{
96 struct seeker *seeker = tal(NULL, struct seeker);
97
98 common_setup(argv[0]);
99
100 seeker->daemon = tal(seeker, struct daemon);
101
102 /* Case where we start at beginning */
103 test_block_range(seeker, 100,
104 0, 0,
105 1, 2,
106 3, 6,
107 7, 14,
108 15, 30,
109 31, 62,
110 63, 100,
111 -1);
112
113 /* Case where we start at end */
114 test_block_range(seeker, 100,
115 100, 100,
116 98, 99,
117 94, 97,
118 86, 93,
119 70, 85,
120 38, 69,
121 0, 37,
122 -1);
123
124 /* Start in the middle. */
125 test_block_range(seeker, 100,
126 50, 59,
127 30, 49,
128 0, 29,
129 60, 100,
130 -1);
131
132 tal_free(seeker);
133 common_shutdown();
134}

Callers

nothing calls this directly

Calls 4

common_setupFunction · 0.85
test_block_rangeFunction · 0.85
tal_freeFunction · 0.85
common_shutdownFunction · 0.85

Tested by

no test coverage detected