Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Refactor state JsonRPC endpoint #225

Description

@lazovicff

Since all the LT and Seed entries are sorted inside BTreeMap, we should simply loop over its entries until we reach a specified PAGE_SIZE.

Steps for 2 level LT BTreeMap:

  • Open an iterator over BTreeMap outer entries (from keys)
  • Open an iterator over inner entries (OutboundLocalTrust.outbound_trust_scores keys)
  • Take entries until we reach PAGE_SIZE.
  • Create a token indicating where we left of, a touple of (from, to)
  • Repeat

For Seed BTreeMap, it is much simpler since it is 1 level:

  • Iterate over entries and take PAGE_SIZE
  • Create a token indicating where we left of, a singular value

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

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