Skip to content

Use an enum to represent the different intervals in BlockChainServer::on_tick #469

Description

@MegaRedHand

We currently use an integer, which can only take values from 0..5. We should instead have the interval be represented with an enum, having the integer slot -> enum interval conversion be a constructor for it.

There are multiple places where we already match on the interval, and we should replace those with the new enum. Having the enum let's us type check these so any change to the intervals fails at compile time. It also documents the code better.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions