Exactly how to add bitcoind params (e.g. "verbose") on command line?

2

Some bitcoind commands have optional params. For example, when doing "bitcoind help", it says the getrawmempool has a "verbose" param.

But no matter what I try, I can't seem to set this param on the command line. I've tried this:

bitcoind -verbose getrawmempool
bitcoind getrawmempool verbose
bitcoind getrawmempool -verbose
bitcoind getrawmempool verbose=1
bitcoind getrawmempool -verbose=1
bitcoind getrawmempool {"verbose":"1"}
bitcoind getrawmempool {"verbose":"true"}
bitcoind getrawmempool {\"verbose\":\"1\"}
bitcoind getrawmempool {\"verbose\":\"true\"}

Especially notice how the last few result in "error: value type is obj, expected bool" whereas the others give "error parsing JSON".

What should I type on the command line exactly in order to execute the 'getrawmempool' with the 'verbose' parameter?

Monty Carlo

Posted 2014-05-17T21:43:25.960

Reputation: 303

Answers

2

Usually it's fairly descriptive if you know what's going on, for example it looks for a boolean on the end of that command, so this will do as you wish.

bitcoin-cli getrawmempool true

bitcoin-cli has replaced bitcoind for RPC commands, you'll need to get used to it as the RPC client is being removed from the bitcoind binary fairly soon.

user13413

Posted 2014-05-17T21:43:25.960

Reputation: 890

0

to answer the original question:

$ bitcoind getrawmempool true

will pass "true" to the verbose parameter (and will give you the verbose output)

Vincent de Lagabbe

Posted 2014-05-17T21:43:25.960

Reputation: 121