getEpochInfo RPC endpoint now includes the current block height
This commit is contained in:
@ -466,6 +466,7 @@ Returns information about the current epoch
|
||||
The result field will be an object with the following fields:
|
||||
|
||||
- `absoluteSlot: <u64>`, the current slot
|
||||
- `blockHeight: <u64>`, the current block height
|
||||
- `epoch: <u64>`, the current epoch
|
||||
- `slotIndex: <u64>`, the current slot relative to the start of the current epoch
|
||||
- `slotsInEpoch: <u64>`, the number of slots in this epoch
|
||||
@ -477,7 +478,7 @@ The result field will be an object with the following fields:
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://localhost:8899
|
||||
|
||||
// Result
|
||||
{"jsonrpc":"2.0","result":{"absoluteSlot":166598,"epoch":27,"slotIndex":2790,"slotsInEpoch":8192},"id":1}
|
||||
{"jsonrpc":"2.0","result":{"absoluteSlot":166598,"blockHeight": 166500, "epoch":27,"slotIndex":2790,"slotsInEpoch":8192},"id":1}
|
||||
```
|
||||
|
||||
### getEpochSchedule
|
||||
|
Reference in New Issue
Block a user