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.
Description
Couple of things I've noticed about the current PTC code:
usizeandu64inconsistently. The cached PTCs in the state useu64because that's what the spec uses, but our internalPTC<E>type usesusize. 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 preferu64).PTCis irregular per Rust conventions (and most of the rest of the codebase). We could switch toPtc, although this is a bunch of churn for minimal gain.