mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-03 01:15:53 +00:00
JS: Add ledger_accept to remote.js
This commit is contained in:
14
js/remote.js
14
js/remote.js
@@ -309,6 +309,20 @@ Remote.prototype.server_subscribe = function (onDone, onFailure) {
|
||||
);
|
||||
};
|
||||
|
||||
Remote.prototype.ledger_accept = function (onDone, onFailure) {
|
||||
if (this.stand_alone)
|
||||
{
|
||||
this.request(
|
||||
{ 'command' : 'ledger_accept' },
|
||||
onDone,
|
||||
onFailure
|
||||
);
|
||||
}
|
||||
else {
|
||||
onFailure({ 'error' : 'notStandAlone' });
|
||||
}
|
||||
};
|
||||
|
||||
// Refresh accounts[account].seq
|
||||
// done(result);
|
||||
Remote.prototype.account_seq = function (account, advance, onDone, onFailure) {
|
||||
|
||||
@@ -551,7 +551,7 @@ void WSConnection::doLedgerAccept(Json::Value& jvResult, const Json::Value& jvRe
|
||||
}
|
||||
else
|
||||
{
|
||||
theApp->getOPs().acceptLedger();
|
||||
mNetwork.acceptLedger();
|
||||
|
||||
jvResult["ledger_current_index"] = mNetwork.getCurrentLedgerID();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user