Add getSnapshotSlot RPC method

This commit is contained in:
Michael Vines
2021-01-14 21:45:11 -08:00
committed by mergify[bot]
parent dacb95083d
commit 4003f86f04
7 changed files with 89 additions and 12 deletions

View File

@ -1968,6 +1968,38 @@ Result:
}
```
### getSnapshotSlot
Returns the highest slot that the node has a snapshot for
#### Parameters:
None
#### Results:
- `<u64>` - Snapshot slot
#### Example:
Request:
```bash
curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d '
{"jsonrpc":"2.0","id":1, "method":"getSnapshotSlot"}
'
```
Result:
```json
{"jsonrpc":"2.0","result":100,"id":1}
```
Result when the node has no snapshot:
```json
{"jsonrpc":"2.0","error":{"code":-32008,"message":"No snapshot"},"id":1}
```
### getSignatureStatuses
Returns the statuses of a list of signatures. Unless the