Finish removing getConfirmationTime
This commit is contained in:
@ -24,7 +24,6 @@ Methods
|
|||||||
* [confirmTransaction](#confirmtransaction)
|
* [confirmTransaction](#confirmtransaction)
|
||||||
* [getAccountInfo](#getaccountinfo)
|
* [getAccountInfo](#getaccountinfo)
|
||||||
* [getBalance](#getbalance)
|
* [getBalance](#getbalance)
|
||||||
* [getConfirmationTime](#getconfirmationTime)
|
|
||||||
* [getLastId](#getlastid)
|
* [getLastId](#getlastid)
|
||||||
* [getSignatureStatus](#getsignaturestatus)
|
* [getSignatureStatus](#getsignaturestatus)
|
||||||
* [getTransactionCount](#gettransactioncount)
|
* [getTransactionCount](#gettransactioncount)
|
||||||
@ -202,25 +201,6 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "m
|
|||||||
{"jsonrpc":"2.0","result":268,"id":1}
|
{"jsonrpc":"2.0","result":268,"id":1}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
|
||||||
### getConfirmationTime
|
|
||||||
Returns the current cluster confirmation time in milliseconds
|
|
||||||
|
|
||||||
##### Parameters:
|
|
||||||
None
|
|
||||||
|
|
||||||
##### Results:
|
|
||||||
* `integer` - confirmation time in milliseconds, as unsigned 64-bit integer
|
|
||||||
|
|
||||||
##### Example:
|
|
||||||
```bash
|
|
||||||
// Request
|
|
||||||
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getConfirmationTime"}' http://localhost:8899
|
|
||||||
|
|
||||||
// Result
|
|
||||||
{"jsonrpc":"2.0","result":500,"id":1}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### requestAirdrop
|
### requestAirdrop
|
||||||
|
@ -351,15 +351,6 @@ while [[ $iteration -le $iterations ]]; do
|
|||||||
timeout 60s scripts/wallet-sanity.sh $walletRpcEndpoint
|
timeout 60s scripts/wallet-sanity.sh $walletRpcEndpoint
|
||||||
) || flag_error_if_no_leader_rotation
|
) || flag_error_if_no_leader_rotation
|
||||||
|
|
||||||
echo "--- RPC API: bootstrap-leader getConfirmationTime ($iteration)"
|
|
||||||
(
|
|
||||||
set -x
|
|
||||||
curl --retry 5 --retry-delay 2 --retry-connrefused \
|
|
||||||
-X POST -H 'Content-Type: application/json' \
|
|
||||||
-d '{"jsonrpc":"2.0","id":1, "method":"getConfirmationTime"}' \
|
|
||||||
http://localhost:8899
|
|
||||||
) || flag_error
|
|
||||||
|
|
||||||
iteration=$((iteration + 1))
|
iteration=$((iteration + 1))
|
||||||
|
|
||||||
if [[ $restartInterval != never && $((iteration % restartInterval)) -eq 0 ]]; then
|
if [[ $restartInterval != never && $((iteration % restartInterval)) -eq 0 ]]; then
|
||||||
|
@ -125,7 +125,6 @@ pub enum RpcRequest {
|
|||||||
ConfirmTransaction,
|
ConfirmTransaction,
|
||||||
GetAccountInfo,
|
GetAccountInfo,
|
||||||
GetBalance,
|
GetBalance,
|
||||||
GetConfirmationTime,
|
|
||||||
GetLastId,
|
GetLastId,
|
||||||
GetSignatureStatus,
|
GetSignatureStatus,
|
||||||
GetTransactionCount,
|
GetTransactionCount,
|
||||||
@ -146,7 +145,6 @@ impl RpcRequest {
|
|||||||
RpcRequest::ConfirmTransaction => "confirmTransaction",
|
RpcRequest::ConfirmTransaction => "confirmTransaction",
|
||||||
RpcRequest::GetAccountInfo => "getAccountInfo",
|
RpcRequest::GetAccountInfo => "getAccountInfo",
|
||||||
RpcRequest::GetBalance => "getBalance",
|
RpcRequest::GetBalance => "getBalance",
|
||||||
RpcRequest::GetConfirmationTime => "getConfirmationTime",
|
|
||||||
RpcRequest::GetLastId => "getLastId",
|
RpcRequest::GetLastId => "getLastId",
|
||||||
RpcRequest::GetSignatureStatus => "getSignatureStatus",
|
RpcRequest::GetSignatureStatus => "getSignatureStatus",
|
||||||
RpcRequest::GetTransactionCount => "getTransactionCount",
|
RpcRequest::GetTransactionCount => "getTransactionCount",
|
||||||
@ -215,11 +213,6 @@ mod tests {
|
|||||||
let request = test_request.build_request_json(1, Some(addr));
|
let request = test_request.build_request_json(1, Some(addr));
|
||||||
assert_eq!(request["method"], "getBalance");
|
assert_eq!(request["method"], "getBalance");
|
||||||
|
|
||||||
let test_request = RpcRequest::GetConfirmationTime;
|
|
||||||
let request = test_request.build_request_json(1, None);
|
|
||||||
assert_eq!(request["method"], "getConfirmationTime");
|
|
||||||
assert_eq!(request["params"], json!(null));
|
|
||||||
|
|
||||||
let test_request = RpcRequest::GetLastId;
|
let test_request = RpcRequest::GetLastId;
|
||||||
let request = test_request.build_request_json(1, None);
|
let request = test_request.build_request_json(1, None);
|
||||||
assert_eq!(request["method"], "getLastId");
|
assert_eq!(request["method"], "getLastId");
|
||||||
|
Reference in New Issue
Block a user