Commit 899104b
committed
Fix validator stuck after falling behind due to N-04 block payload rejection
HandleBlockAnnounce sent a BlockRequestMessage to fetch missing blocks,
but the BlockPayloadMessage response was always rejected by the N-04
anti-injection guard (which requires _isSyncing flag). This caused
validators that fell behind to get permanently stuck.
Replace the BlockRequest approach with TrySyncFromPeers, which uses the
proper SyncRequest/SyncResponse path, correctly sets the sync guard,
and restarts consensus after catching up.1 parent 3f66fea commit 899104b
1 file changed
+7
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
938 | | - | |
939 | | - | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
940 | 944 | | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
| 945 | + | |
949 | 946 | | |
950 | | - | |
951 | | - | |
952 | 947 | | |
953 | 948 | | |
954 | 949 | | |
| |||
0 commit comments