Commit 7677277
authored
feat(peer-store): Remove addresses from peer store on dial failure
When the `MemoryStore` receives a `FromSwarm::DialFailure` event, it will now modify the store appropriately:
- `LocalPeerId`: Remove the peer from the store.
- `WrongPeerId`: Remove the address for the dialed peer ID and readd it for the received peer ID.
- `Transport`: Remove the failed addresses from the store.
- other: no action.
Furthermore, we group some repeated event logic in a new function `push_event_and_wake` for internal use.
Follow-up to #5724
Pull-Request: #5926.1 parent 12acde3 commit 7677277
1 file changed
+639
-505
lines changed
0 commit comments