Skip to content

Immutable configuration #4282

@mversic

Description

@mversic

I would prefer config to have private fields with constructors and getters for the following reasons:

  1. consistency - access to some fields has to be done through getters because the value has to be converted
  2. maintaining invariants - sometimes config params are interdependent,
  3. future proofing - we can change the underlying type without affecting the API

setters we can but don't even have to have. I wouldn't mind if the config structs were completely immutable. If we do decide to have setters we can put validation logic into them. But I would prefer to not have setters at least atm

Metadata

Metadata

Labels

iroha2-devThe re-implementation of a BFT hyperledger in RUST

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions