Skip to content

[TECHDEBT] Change the PersistenceRWContext interface to pass paramName when getting a parameter #286

@andrewnguyen22

Description

@andrewnguyen22

Objective

Deprecate

  • GetBlocksPerSession(height int64) (int, error)
    and
  • GetServiceNodesPerSessionAt(height int64) (int, error)

for

  • GetParameter(paramName string, height int64) (interface, error)

Origin Document

We genericized the param setters like:

SetParam(paramName string, value interface{}) error

We need a similar pattern for getters

Goals

  • Lower code footprint,
  • Remove placeholder constants
  • Maintain a strict pattern

Deliverable

  • Code complete implementation
  • Updated documentation

General issue deliverables

  • Update the appropriate CHANGELOG
  • Update any relevant READMEs (local and/or global)
  • Update any relevant global documentation & references
  • If applicable, update the source code tree explanation
  • If applicable, add or update a state, sequence or flowchart diagram using mermaid

Creator: @andrewnguyen22

Metadata

Metadata

Assignees

Labels

code healthNice to have code improvementcore starter taskGood for newcomers, but aimed at core team members though still open for everyonepersistencePersistence specific changes

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions