Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC: force help if no method #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions bin/bcoin-cli
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,12 @@ class CLI {
}

async rpc() {
const method = this.argv.shift();
let method = this.argv.shift();
const params = [];

if (!method)
method = 'help';

for (const arg of this.argv) {
let param;
try {
Expand Down Expand Up @@ -204,7 +207,7 @@ class CLI {
this.log(' $ coin [hash+index/address]: View coins.');
this.log(' $ block [hash/height]: View block.');
this.log(' $ reset [height/hash]: Reset chain to desired block.');
this.log(' $ rpc [command] [args]: Execute RPC command.' +
this.log(' $ rpc [command] [args]: Execute RPC command.' +
' (`bcoin-cli rpc help` for more)');
break;
}
Expand Down
5 changes: 4 additions & 1 deletion bin/bwallet-cli
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,12 @@ class CLI {
}

async rpc() {
const method = this.argv.shift();
let method = this.argv.shift();
const params = [];

if (!method)
method = 'help';

for (const arg of this.argv) {
let param;
try {
Expand Down