pub fn voting_power(
    db_client_stakes: Client,
    db_client_registrations: Client,
    _: VotingPowerArgs
) -> Result<(Vec<SnapshotEntry>, Vec<InvalidRegistration>, Unregistered)>
Expand description

Calculate voting power info by querying a db-sync instance

Returns a tuple containing the successful snapshot entries, as well as any registrations which failed verification in some way (along with some reason why they failed).

If provided, min_slot and max_slot can be used to constrain the time period to query. If None they default to:

  • min_slot: 0
  • max_slot: i64::MAX

Together they form an inclusive range (i.e. blocks with values equal to min_slot or max_slot are included)

Errors

Returns an error if either of lower or upper doesn’t fit in an i64