RPC server with bitcoin-qt and bitcoind has a different set of commands?

1

0

When running bitcoin-qt -server, I am able to run the getbalance command, and the help command shows many items:

~ > bitcoin-qt -regtest -server  # Running in another shell

~ > bitcoin-cli -regtest getbalance
2797.99990000
~ > bitcoin-cli -regtest help | wc -l
69

Trying the same thing with bitcoind gives me fewer commands and no access to getbalance:

~ > bitcoind -regtest -server  # Running in another shell

~ > bitcoin-cli -regtest getbalance
error: {"code":-32601,"message":"Method not found"}
~ > bitcoin-cli -regtest help | wc -l
31

Is this a limitation of bitcoind or have I incorrectly configured it?

I'm using 0.9.1:

~ > bitcoin-cli --help | head -1
Bitcoin RPC client version v0.9.1.0-g026a939-beta

~ > bitcoind --help | head -1
Bitcoin Core Daemon version v0.9.1.0-g026a939-beta

~ > bitcoin-qt --help | head -1
Bitcoin Core version v0.9.1.0-g026a939-beta

gak

Posted 2014-04-13T02:31:15.573

Reputation: 331

Answers

2

Just discovered the problem. It has to do with the "wallet" being disabled in the code via the default configuration with my package management.

I investigated the source initially and saw that there is a bunch of commands that are only enabled if the wallet #define is enabled: https://github.com/bitcoin/bitcoin/blob/e18bc583d41d97cdab93b7ffd111402628cfba19/src/rpcserver.cpp#L268

From there I was able to work out that the build options has disabled the wallet. I'm on Arch Linux, which the user-contributed package (on the AUR) has been configured to disable the wallet by default.

In other words, PKGBUILD configuration has added --disable-wallet to the ./configure arguments as you can see here: https://aur.archlinux.org/packages/bi/bitcoin-core/PKGBUILD

As if the time of posting, the ./configure command is:

./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --libexecdir=/usr/lib/bitcoin \
    --sysconfdir=/etc \
    --sharedstatedir=/usr/share/bitcoin \
    --localstatedir=/var/lib/bitcoin \
    --enable-hardening \
    --with-gui=no \
    --disable-wallet

Modifying PKGBUILD by hand to remove the --disable-wallet argument fixes the problem.

gak

Posted 2014-04-13T02:31:15.573

Reputation: 331