Why doesn't bitcoind verify blocks like bitcoin qt?

1

I have downloaded the full bitcoin blockchain using bitcoin-qt. When I run bitcoin-qt, it verifies the blocks for about a minute, then it runs without any issues.

The issue is when I try to run bitcoind, it gets unresponsive for hours if I don't kill it and tries to download the whole blockchain again. (for some reason it doesn't trust it's valid).

The path is H:\btcBlockchain , so I run bitcoind like this:

bitcoind.exe -datadir=H:\btcBlockchain

I know the directory is right because it starts to change the blocks size as it downloads. Why is this happening, isn't bitcoin-qt the same program as bitcoind but with UI built on top?

mikepenter

Posted 2016-09-14T09:28:31.690

Reputation: 11

Make sure you don't run bitcoind and bitcoin-qt at the same time. You start them with the same argument? How do you determine unresponsiveness, are you using bitcoin-cli or RPC calls? Bitcoind is not supposed to give any output, so it might only appear to be stuck. What happens when you have bitcoind running and you do "bitcoin-cli.exe -datadir=H:\btcBlockchain getinfo" in another window?Jannes 2016-09-14T12:01:23.983

@Jannes, I start bitcoin-qt without an argument, because I set the datadir from the UI when I first downloaded the blockchain. If I run bitcoind without an argument, it considers %appdata%\Bitcoin as the default datadir, so I have to provide the same datadir, hence the argument. Yes, I am aware of the need to run a client (bitcoin-cli), but running that proves that it does not verify blocks: { ... "blocks": 0, ... } If I let the daemon run for a while and run bitcoin-cli again, I can see the number of blocks increase, but only a little bit, indicating it redownloads blocks.mikepenter 2016-09-14T14:27:25.977

@Jannes, I now see that running bitcoin-qt -server will work as bitcoind, when I run bitcoin-cli.exe in another window I get the current number of blocks, it works fine. Are there any drawbacks to this approach? (using bitcoin-qt as server, not the daemon)mikepenter 2016-09-14T14:35:16.543

I have no idea. I run bitcoind on Linux and that works as described above. I do add -daemon as option to bitcoind, but I don't expect that to make a difference tbh. Sounds like your method is fine too for now. The Core devs are working on splitting the application into parts: the full node and the wallet (user interface), so maybe in a future version -qt might only be the wallet without node. Not sure how exactly they're planning on doing that.Jannes 2016-09-14T19:30:15.353

No answers