Commit a800e96
client/beefy: fix voter initialization (paritytech#12274)
Fix corner case where voter gets a single burst of finality
notifications just when it starts.
The notification stream was consumed by "wait_for_pallet" logic,
then main loop would subscribe to finality notifications, but by that
time some notifications might've been lost.
Fix this by subscribing the main loop to notifications before waiting
for pallet to become available. Share the same stream with the main loop
so that notifications for blocks before pallet available are ignored,
while _all_ notifications after pallet available are processed.
Add regression test for this.
Signed-off-by: acatangiu <[email protected]>1 parent aad46ec commit a800e96
2 files changed
+42
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
726 | | - | |
| 726 | + | |
727 | 727 | | |
728 | | - | |
729 | 728 | | |
730 | 729 | | |
731 | | - | |
| 730 | + | |
732 | 731 | | |
733 | 732 | | |
734 | 733 | | |
| |||
762 | 761 | | |
763 | 762 | | |
764 | 763 | | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
765 | 767 | | |
766 | | - | |
| 768 | + | |
767 | 769 | | |
768 | 770 | | |
769 | | - | |
770 | 771 | | |
771 | 772 | | |
772 | 773 | | |
| |||
0 commit comments