Skip to content

PTC code style #9049

@michaelsproul

Description

@michaelsproul

Description

Couple of things I've noticed about the current PTC code:

  • We use usize and u64 inconsistently. The cached PTCs in the state use u64 because that's what the spec uses, but our internal PTC<E> type uses usize. This is similar to how we usually treat validator indices, but IMO it's fairly unnecessary and we could just use one or the other everywhere (I prefer u64).
  • The capitalisation of PTC is irregular per Rust conventions (and most of the rest of the codebase). We could switch to Ptc, although this is a bunch of churn for minimal gain.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions