Skip to content

chain_index::ChainIndex is a repetitive name that doesn't hint at the item's kind #719

@zancas

Description

@zancas

"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: pub

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions