-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
api-designAPI design improvementsAPI design improvementsarchitectureArchitectural improvementsArchitectural improvementsgood first issueGood for newcomersGood for newcomerstype-safetyType safety improvementsType safety improvements
Description
"ChainIndex" as a name doesn't hint what kind of thing it is. In fact it is a trait, and as such should have a name that hints at the behavior implementors must have.
Additionally the context of the definition is inside a module of the same name. This means that the module and the item it contains repeat the same information decreasing readability.
Here's a snapshot of the module structure on dev:
cargo modules structure -p zaino-state --focus-on zaino_state::chain_index --no-fns --max-depth 1
crate zaino_state
└── mod chain_index: pub
├── trait ChainIndex: pub
├── struct NodeBackedChainIndex: pub
├── struct NodeBackedChainIndexSubscriber: pub
├── trait NonFinalizedSnapshot: pub
├── mod encoding: pub
├── mod finalised_state: pub
├── mod mempool: pub
├── mod non_finalised_state: pub
├── mod source: pub
└── mod types: pubMetadata
Metadata
Assignees
Labels
api-designAPI design improvementsAPI design improvementsarchitectureArchitectural improvementsArchitectural improvementsgood first issueGood for newcomersGood for newcomerstype-safetyType safety improvementsType safety improvements
Type
Projects
Status
In progress