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

Function main

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

Source from the content-addressed store, hash-verified

116}
117
118int main(int argc, char *argv[])
119{
120 struct seeker *seeker = tal(NULL, struct seeker);
121
122 common_setup(argv[0]);
123
124 seeker->daemon = tal(seeker, struct daemon);
125
126 /* Case where we start at beginning */
127 test_block_range(seeker, 100,
128 0, 0,
129 1, 2,
130 3, 6,
131 7, 14,
132 15, 30,
133 31, 62,
134 63, 100,
135 -1);
136
137 /* Case where we start at end */
138 test_block_range(seeker, 100,
139 100, 100,
140 98, 99,
141 94, 97,
142 86, 93,
143 70, 85,
144 38, 69,
145 0, 37,
146 -1);
147
148 /* Start in the middle. */
149 test_block_range(seeker, 100,
150 50, 59,
151 30, 49,
152 0, 29,
153 60, 100,
154 -1);
155
156 tal_free(seeker);
157 common_shutdown();
158}

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