Commit 69f262a
committed
fix(consensus,sharding,libp2p): address PR #48 review feedback
- nodesCoordinator: guard EpochStartPrepare display block against a nil
nodesConfig[newEpoch] when SetNodes returns an error, and acquire
mutNodesMaps.RLock() for consistency with other readers.
- slotConsensus: rewrite the SetConsensusGroup doc comment so it matches
the body — the two writes are intentionally non-atomic to keep the
JobDone hot path off the ConsensusGroup lock; the brief inconsistency
self-heals on the next poll.
- consensusState: add SetWaitingAllSignaturesTimeOutIfSlot to perform
the slot-equality check and the flag write under a single mutSlotState
write lock.
- subslotSignature: use the new helper in waitAllSignatures so a stale
goroutine cannot set WaitingAllSignaturesTimeOut after BeginNewSlot
has cleared state.
- libp2p netMessenger: replace per-iteration time.After with a reusable
time.Ticker so the connection-monitor sweep loop no longer allocates
a fresh timer on every iteration.1 parent 15f04c5 commit 69f262a
5 files changed
Lines changed: 36 additions & 23 deletions
File tree
- core/consensus/slot
- bls
- network/p2p/libp2p
- sharding
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | 330 | | |
340 | 331 | | |
341 | 332 | | |
342 | 333 | | |
343 | 334 | | |
344 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
345 | 338 | | |
346 | 339 | | |
347 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
78 | 92 | | |
79 | 93 | | |
80 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
| 442 | + | |
| 443 | + | |
442 | 444 | | |
443 | 445 | | |
444 | 446 | | |
445 | 447 | | |
446 | 448 | | |
447 | | - | |
| 449 | + | |
448 | 450 | | |
449 | 451 | | |
450 | 452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | 789 | | |
794 | 790 | | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
| |||
0 commit comments