LSPS2: Isolate `PeerState` types via a `sealed` sub-module
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 22/100
- Type d'issue
- Refactorisation
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- rust
- Domaine
- backend, blockchain
Piste de recherche
This is an architectural refactor of the LSPS2 service handler: move PeerState and related types into a sealed sub-module so they are only reachable through dedicated internal pub methods, shrinking the places that set needs_persist. Start from the existing LSPS2 handler and any work already sketched in #4008. Done means state changes that must be persisted go only through that API and the rest of the handler no longer mutates PeerState directly.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
The LSPS2 service handler has a lot going on. In particular, it might currently is hard to follow when we actually make a state change that needs to be persisted.
We should isolate the PeerState and related types to a sealed sub-module to ensure we can only access/modify it via dedicated internal pub API methods. This would reduce the number of places where we need to set needs_persist, making it much less error prone.
FWIW, I started down this road as part of #4008, but this would be huge refactor on its own right so decided not to continue for the time being.
- Langage dominant
- Rust
- Étoiles
- 1.4k
- Forks
- 482
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de lightningdevkit/rust-lightning
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
lightningdevkit/rust-lightning#4767 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 65/100
lightningdevkit/rust-lightning#1849 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
lightningdevkit/rust-lightning#4764 · 3 commentaires ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 22/100
lightningdevkit/rust-lightning#4757 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 28/100
lightningdevkit/rust-lightning#4739 ·
Toutes les issues de lightningdevkit/rust-lightning
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 2 jours
-
autofixer: follow-up
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
tursodatabase/turso#12531 ·
Les mainteneurs répondent en général sous 1 jour
-
bug help wanted ui
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
userFRM/egui-charts#4292 ·
Les mainteneurs répondent en général sous 1 jour
-
CHANGELOG.md out of dateOuverteIssue-Bug Need-Review
Difficulté 1/5 1-3 heures Accessibilité débutants 85/100
PowerShell/DSC#1832 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour