From b1a678b2dba3624f1c577fd5c6c9e15e15bec5cb Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Wed, 10 Jul 2019 10:05:11 -0700 Subject: [PATCH] Document getSlotsPerSegment in rpc api doc (#5005) * Document getSlotsPerSegment in rpc api doc --- book/src/jsonrpc-api.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/book/src/jsonrpc-api.md b/book/src/jsonrpc-api.md index 9ee575e596..90d9681c8f 100644 --- a/book/src/jsonrpc-api.md +++ b/book/src/jsonrpc-api.md @@ -29,6 +29,7 @@ Methods * [getRecentBlockhash](#getrecentblockhash) * [getSignatureStatus](#getsignaturestatus) * [getSlotLeader](#getslotleader) +* [getSlotsPerSegment](#getslotspersegment) * [getNumBlocksSinceSignatureConfirmation](#getnumblockssincesignatureconfirmation) * [getTransactionCount](#gettransactioncount) * [getTotalSupply](#gettotalsupply) @@ -262,7 +263,27 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "m {"jsonrpc":"2.0","result":"ENvAW7JScgYq6o4zKZwewtkzzJgDzuJAFxYasvmEQdpS","id":1} ``` ------ +---- + +### getSlotsPerSegment +Returns the current storage segment size in terms of slots + +##### Parameters: +None + +##### Results: +* `u64` - Number of slots in a storage segment + +##### Example: +```bash +// Request +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getSlotsPerSegment"}' http://localhost:8899 + +// Result +{"jsonrpc":"2.0","result":"1024","id":1} +``` + +---- ### getNumBlocksSinceSignatureConfirmation Returns the current number of blocks since signature has been confirmed.