Skip to content

Commit

Permalink
Improve delegators rpc by adding count, start, and threshold parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyatt committed Nov 24, 2021
1 parent 8fc0500 commit 320c37c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/commands/rpc-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ Returns a list of open database transactions which are equal or greater than the

### delegators
_version 8.0+_
Returns a list of pairs of delegator names given **account** a representative and its balance
Returns a list of pairs of delegator accounts and balances given a representative **account**

**Request:**
```json
Expand All @@ -1435,6 +1435,13 @@ Returns a list of pairs of delegator names given **account** a representative an
}
```

**Optional parameters:**
_since V23.0_

* `threshold`: minimum required balance for a delegating account to be included in the response
* `count`: number of delegators to return
* `start`: account in the list you would like to start after, to allow for paging responses

---

### delegators_count
Expand Down
1 change: 1 addition & 0 deletions docs/releases/release-v23-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ description: Details of the V23.0 nano node release including upgrade notices, m
* [`account_history`](../commands/rpc-protocol.md#account_history) RPC now includes whether the block was `confirmed` in the response, allowing more efficient confirmation validation in some cases.
* **NEW** [`accounts_representatives`](../commands/rpc-protocol.md#accounts_representatives) RPC allows requesting representatives from multiple accounts in a single call.
* [`block_info`](../commands/rpc-protocol.md#block_info) and [`blocks_info`](../commands/rpc-protocol.md#blocks_info) RPCs now include the `successor` block hash in responses for easier ledger walking.
* [`delegators`](../commands/rpc-protocol.md#delegators) now allows for optional parameters `count` (to limit number of returned accounts), `threshold` (to require a minimum balance for returned delegators) and `start` (to allow paging by providing account to start after).

---

Expand Down

0 comments on commit 320c37c

Please sign in to comment.