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

Error "Chain RPC is inactive" but btcd is running... #704

Open
msafi opened this issue Jun 4, 2020 · 1 comment
Open

Error "Chain RPC is inactive" but btcd is running... #704

msafi opened this issue Jun 4, 2020 · 1 comment

Comments

@msafi
Copy link

msafi commented Jun 4, 2020

I'm running both btcwallet and btcd, and I think I have the right configurations for them to talk to each other. But when I run the following curl command:

curl -u 1:1 --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:18332

I get

{"result":null,"error":{"code":-1,"message":"Chain RPC is inactive"},"id":"curltest"}

btcd is still going through initial block download. Is that why I'm getting the error? Or is it something else?

@msafi
Copy link
Author

msafi commented Jun 4, 2020

I looked through the code, and I'm not sure if I'm reading it correctly, but here's what I found out...

I'm starting btcwallet with the --noinitialload flag, which disables the rpcClientConnectLoop function. chainClient gets set inside rpcClientConnectLoop, which never runs because of --noinitialload.

I tried using the RPC command createwallet, but it still returned "Chain RPC is inactive", which makes sense given the way the code is written.

Now I'm not sure how to create a wallet programmatically without using --noinitialload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@msafi and others