mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 04:05:49 +00:00
Re-level non-docs content to top of repo and rename content→docs
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
---
|
||||
html: server-control-methods.html
|
||||
parent: admin-api-methods.html
|
||||
metadata:
|
||||
indexPage: true
|
||||
---
|
||||
# Server Control Methods
|
||||
|
||||
Use these methods to manage the rippled server.
|
||||
|
||||
|
||||
{% child-pages /%}
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
html: ledger_accept.html
|
||||
parent: server-control-methods.html
|
||||
seo:
|
||||
description: Close and advance the ledger in stand-alone mode.
|
||||
labels:
|
||||
- Core Server
|
||||
---
|
||||
# ledger_accept
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/a61ffab3f9010d8accfaa98aa3cacc7d38e74121/src/ripple/rpc/handlers/LedgerAccept.cpp "Source")
|
||||
|
||||
The `ledger_accept` method forces the server to close the current-working ledger and move to the next ledger number. This method is intended for testing purposes only, and is only available when the `rippled` server is running stand-alone mode.
|
||||
|
||||
*The `ledger_accept` method is an [admin method](../index.md) that cannot be run by unprivileged users!*
|
||||
|
||||
### Request Format
|
||||
|
||||
An example of the request format:
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% tab label="WebSocket" %}
|
||||
```json
|
||||
{
|
||||
"id": "Accept my ledger!",
|
||||
"command": "ledger_accept"
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
{% tab label="Commandline" %}
|
||||
```sh
|
||||
#Syntax: ledger_accept
|
||||
rippled ledger_accept
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
The request accepts no parameters.
|
||||
|
||||
### Response Format
|
||||
|
||||
An example of a successful response:
|
||||
```js
|
||||
{
|
||||
"id": "Accept my ledger!",
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"ledger_current_index": 6643240
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following field:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:-----------------|:---------------------------------|
|
||||
| `ledger_current_index` | Unsigned Integer - [Ledger Index][] | Ledger index of the newly created 'current' ledger |
|
||||
|
||||
**Note:** When you close a ledger, `rippled` determines the canonical order of transactions in that ledger and replays them. This can change the outcome of transactions that were provisionally applied to the current ledger.
|
||||
|
||||
### Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `notStandAlone` - If the `rippled` server is not currently running in stand-alone mode.
|
||||
|
||||
{% raw-partial file="/_snippets/common-links.md" /%}
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
html: stop.html
|
||||
parent: server-control-methods.html
|
||||
seo:
|
||||
description: Shut down the rippled server.
|
||||
labels:
|
||||
- Core Server
|
||||
---
|
||||
# stop
|
||||
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/Stop.cpp "Source")
|
||||
|
||||
Gracefully shuts down the server.
|
||||
|
||||
*The `stop` method is an [admin method](../index.md) that cannot be run by unprivileged users!*
|
||||
|
||||
### Request Format
|
||||
An example of the request format:
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% tab label="WebSocket" %}
|
||||
```json
|
||||
{
|
||||
"id": 0,
|
||||
"command": "stop"
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
{% tab label="JSON-RPC" %}
|
||||
```json
|
||||
{
|
||||
"method": "stop",
|
||||
"params": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
{% tab label="Commandline" %}
|
||||
```sh
|
||||
#Syntax: stop
|
||||
rippled stop
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
The request includes no parameters.
|
||||
|
||||
### Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
{% tabs %}
|
||||
|
||||
{% tab label="JSON-RPC" %}
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"message" : "ripple server stopping",
|
||||
"status" : "success"
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
{% tab label="Commandline" %}
|
||||
```json
|
||||
Loading: "/etc/rippled.cfg"
|
||||
Connecting to 127.0.0.1:5005
|
||||
|
||||
{
|
||||
"result" : {
|
||||
"message" : "ripple server stopping",
|
||||
"status" : "success"
|
||||
}
|
||||
}
|
||||
```
|
||||
{% /tab %}
|
||||
|
||||
{% /tabs %}
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:----------|:-------|:-------------------------------------|
|
||||
| `message` | String | `ripple server stopping` on success. |
|
||||
|
||||
### Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
|
||||
{% raw-partial file="/_snippets/common-links.md" /%}
|
||||
Reference in New Issue
Block a user