fix: add fullnodeExit()

This commit is contained in:
Michael Vines
2019-04-24 15:22:50 -07:00
parent 2292b5910e
commit 456f34e95b
3 changed files with 36 additions and 0 deletions

View File

@ -521,6 +521,19 @@ export class Connection {
return await this.sendRawTransaction(wireTransaction);
}
/**
* @private
*/
async fullnodeExit(): Promise<boolean> {
const unsafeRes = await this._rpcRequest('fullnodeExit', []);
const res = jsonRpcResult('boolean')(unsafeRes);
if (res.error) {
throw new Error(res.error.message);
}
assert(typeof res.result !== 'undefined');
return res.result;
}
/**
* Send a transaction that has already been signed and serialized into the
* wire format