RPCs for mode change (#3002)
* Allow warnings. * Add RPCs to allow ad-hoc mode changes. * Add the JSAPI interfaces * Add missing file.
This commit is contained in:
@@ -91,6 +91,11 @@ export default class Ethcore {
|
||||
.then(outNumber);
|
||||
}
|
||||
|
||||
mode () {
|
||||
return this._transport
|
||||
.execute('ethcore_mode');
|
||||
}
|
||||
|
||||
netChain () {
|
||||
return this._transport
|
||||
.execute('ethcore_netChain');
|
||||
@@ -161,6 +166,11 @@ export default class Ethcore {
|
||||
.execute('ethcore_setMinGasPrice', inNumber16(quantity));
|
||||
}
|
||||
|
||||
setMode (mode) {
|
||||
return this._transport
|
||||
.execute('ethcore_setMode', mode);
|
||||
}
|
||||
|
||||
setTransactionsLimit (quantity) {
|
||||
return this._transport
|
||||
.execute('ethcore_setTransactionsLimit', inNumber16(quantity));
|
||||
|
||||
@@ -156,6 +156,15 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
mode: {
|
||||
desc: 'Get the mode. Results one of: "active", "passive", "dark", "off".',
|
||||
params: [],
|
||||
returns: {
|
||||
type: String,
|
||||
desc: 'The mode'
|
||||
}
|
||||
},
|
||||
|
||||
netChain: {
|
||||
desc: 'Returns the name of the connected chain.',
|
||||
params: [],
|
||||
@@ -307,6 +316,20 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
setMode: {
|
||||
desc: 'Changes the mode',
|
||||
params: [
|
||||
{
|
||||
type: String,
|
||||
desc: 'The mode to set, one of "active", "passive", "dark", "off"'
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
type: Boolean,
|
||||
desc: 'True if the call succeeded'
|
||||
}
|
||||
},
|
||||
|
||||
setTransactionsLimit: {
|
||||
desc: 'Changes limit for transactions in queue.',
|
||||
params: [
|
||||
|
||||
Reference in New Issue
Block a user