This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split block announce processing into two parts #6958
Split block announce processing into two parts #6958
Changes from 118 commits
b336104
95c1420
0416a0b
f974fe7
7afdc67
67d811b
e714641
508dfcd
43cd1d0
0de5451
20d4ca4
4b3197c
9f590df
761ec7c
f7791d0
127673f
144192c
1f33b6e
ebd6d5c
ce89cc9
117bb45
4c0a477
3bddf6c
e4178cc
8f28655
6b2f7ea
7d53c94
539f4d2
8182870
b622015
dbbaef1
7972673
9231166
9007d28
8502300
f723458
0f302b9
3541fa8
f8189fc
658c389
b309241
130b7d4
29c993a
4dee242
68bdfec
8c92258
6deea30
8f4db26
2bc6943
52ae515
27aaf0a
49191fd
79cc67d
a22edf0
b4fbdda
67c778b
39d8f4d
5fa219d
0a850ae
29b42c3
384f29f
d123792
d35044c
de59f04
f96646a
89e6d66
bd44423
0f61352
0fd0d95
006f3f0
cc3040d
6db5fe3
bb7052d
a9a3be3
4b471dd
6c89d07
8b82790
a5977f5
caab538
5f6987a
c071d06
72ea91f
f5e0c63
b2b0db5
9d9cf8a
c2ef92d
b805faf
c867bc2
111a110
f406f49
d2c7c1f
0ddcd66
4e4c321
9167fe0
59b4668
2c65036
86026fc
da02c0b
f1380be
585629a
9bf2f2f
fa2fbe7
fbf617e
5a2c400
b7a3b2b
f8ee0e1
ecaf240
6b1d600
7cc397f
98a6a8c
f75c540
3a0cb2a
a837031
a0f3789
20c00ea
3f977ab
e352e41
f7f0873
4f252be
e08cbcf
41aa638
2b18234
047f80c
9cbfc19
8ea6c88
8e5a00a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this nested within
if let CustomMessageOutcome
? Why not move this towards the beginning of the method doingself.pending_messages.push_back(NetworkBehaviourAction::GenerateEvent(outcome))
instead of returning.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because you could have added a block announce above, which in most of the times will directly be finished when
poll
being called here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should lead to a wake-up of the underlying task, which then results in this poll function being called again which then calls
self.sync.poll_block_announce_validation
. Depending on the ordering of these calls seems error prone to me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To wake up the underlying task, I need to poll a future at least once.
And honestly, the same structure already exists above with these
if let Some() { return Poll::Ready() }
.I'm also not 100% happy with the solution, but I don't see the advantage of moving this above. What would change?