This repository was archived by the owner on Jul 4, 2022. It is now read-only.
Commit 5afc777
client/finality-grandpa: Make round_communication use bounded channel (#4691)
* clinet/finality-grandpa: Make round_communication use bounded channel
`round_communication` returns a `Sink` and a `Stream` for outgoing and
incoming messages. The messages send into the `Sink` are forwarded down
to the network as well as send back into the `Stream` to ensure the node
processes its own messages.
So far, to send messages into the `Sink` back into the `Stream`, an
unbounded channel was used. This patch updates `round_communication` and
`OutgoingMessages` to use a bounded channel.
This is part of a greater effort to reduce the number of owners of
components within `finality-grandpa` and `network` as well as to reduce
the amount of unbounded channels. For details see d4fbb89 and
f0c1852.
* client/finality-grandpa: Import futures03::future::ready at the top
* client/finality-grandpa: Make tests use compat of future 03
* client/finality-grandpa: Do not import ready into scope
Instead of importing futures03::future::ready into the scope, only
import futures::future03 into scope and call ready as furure03::ready.1 parent 7bd0dbf commit 5afc777
File tree
3 files changed
+76
-47
lines changed- client/finality-grandpa/src
- communication
3 files changed
+76
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
279 | | - | |
280 | | - | |
| 280 | + | |
| 281 | + | |
281 | 282 | | |
282 | 283 | | |
283 | 284 | | |
| |||
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
298 | | - | |
299 | | - | |
300 | | - | |
| 299 | + | |
| 300 | + | |
301 | 301 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
310 | 309 | | |
311 | 310 | | |
312 | 311 | | |
313 | | - | |
| 312 | + | |
314 | 313 | | |
315 | 314 | | |
316 | 315 | | |
| |||
339 | 338 | | |
340 | 339 | | |
341 | 340 | | |
342 | | - | |
| 341 | + | |
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
346 | | - | |
| 345 | + | |
347 | 346 | | |
348 | 347 | | |
349 | | - | |
350 | | - | |
351 | | - | |
| 348 | + | |
352 | 349 | | |
353 | | - | |
| 350 | + | |
354 | 351 | | |
355 | 352 | | |
356 | 353 | | |
| |||
360 | 357 | | |
361 | 358 | | |
362 | 359 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | 360 | | |
368 | 361 | | |
369 | 362 | | |
370 | | - | |
| 363 | + | |
371 | 364 | | |
372 | 365 | | |
373 | 366 | | |
| |||
690 | 683 | | |
691 | 684 | | |
692 | 685 | | |
693 | | - | |
| 686 | + | |
694 | 687 | | |
695 | 688 | | |
696 | 689 | | |
697 | | - | |
| 690 | + | |
698 | 691 | | |
699 | 692 | | |
700 | 693 | | |
701 | 694 | | |
702 | | - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
703 | 698 | | |
704 | | - | |
705 | | - | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
706 | 707 | | |
707 | | - | |
| 708 | + | |
708 | 709 | | |
709 | 710 | | |
710 | 711 | | |
| |||
760 | 761 | | |
761 | 762 | | |
762 | 763 | | |
763 | | - | |
764 | | - | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
765 | 768 | | |
766 | | - | |
| 769 | + | |
767 | 770 | | |
768 | 771 | | |
769 | | - | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
770 | 775 | | |
771 | | - | |
772 | | - | |
773 | | - | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
774 | 781 | | |
775 | 782 | | |
776 | 783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
608 | 612 | | |
609 | 613 | | |
610 | 614 | | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
611 | 618 | | |
612 | 619 | | |
613 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | | - | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | | - | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
1282 | 1284 | | |
1283 | 1285 | | |
1284 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
1285 | 1290 | | |
1286 | 1291 | | |
1287 | 1292 | | |
| |||
1332 | 1337 | | |
1333 | 1338 | | |
1334 | 1339 | | |
1335 | | - | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
1336 | 1351 | | |
1337 | 1352 | | |
1338 | 1353 | | |
| |||
0 commit comments