Bitcoin Forum
November 03, 2024, 02:23:00 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: JSON and bitcoin-Qt vs. bitcoind  (Read 1257 times)
a.miner (OP)
Newbie
*
Offline Offline

Activity: 43
Merit: 0


View Profile
April 27, 2014, 08:45:40 PM
 #1

In the example bitcoin.conf file from https://en.bitcoin.it/wiki/Running_Bitcoin it says

# server=1 tells Bitcoin-QT to accept JSON-RPC commands.

Does this also apply to bitcoind?
jonald_fyookball
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
April 28, 2014, 04:05:36 AM
 #2

I would guess so since they both appear to use the same conf file

mcaizgk2
Member
**
Offline Offline

Activity: 66
Merit: 10


View Profile
April 28, 2014, 12:50:07 PM
 #3

In the example bitcoin.conf file from https://en.bitcoin.it/wiki/Running_Bitcoin it says

# server=1 tells Bitcoin-QT to accept JSON-RPC commands.

Does this also apply to bitcoind?


"server = 1" enables the server mode in Bitcoin Core, in other words you can run the GUI client and also send JSON-RPC commands to it. If you don't use "server = 1" and you still want to execute JSON-RPC commands then have to choose between the GUI client (Bitcoin Core) and bitcoind, as they cannot run concurrently for the same configuration. It makes no difference if applied as-is to bitcoind.
a.miner (OP)
Newbie
*
Offline Offline

Activity: 43
Merit: 0


View Profile
April 28, 2014, 04:51:07 PM
 #4

"server = 1" enables the server mode in Bitcoin Core, in other words you can run the GUI client and also send JSON-RPC commands to it. If you don't use "server = 1" and you still want to execute JSON-RPC commands then have to choose between the GUI client (Bitcoin Core) and bitcoind, as they cannot run concurrently for the same configuration. It makes no difference if applied as-is to bitcoind.

Do I understand correctly that I only need to set server=1 if I want to run bitcoin-Qt?

I will not be running bitcoin-Qt.

I want to run bitcoind and I want it to accept JSON-RPC commands from p2pool.

Do I set server=1 or server=0 or leave it commented out?
mcaizgk2
Member
**
Offline Offline

Activity: 66
Merit: 10


View Profile
April 28, 2014, 07:50:31 PM
 #5

Yes, you need server=1 only if you want the Bitcoin-Qt to also act as a server for JSON-RPC commands.

If you will be executing your JSON-RPC commands straight to bitcoind you don't need to set server=1.

Call bicoind with the -debug -printtoconsole command line arguments to get a responsive representation of what is going on in your terminal screen.

You can always test bitcoind's status by running bitcoin-cli getinfo and see if it responds.

You will have to add rpcuser and rpcpassword in your bitcoin.conf to access it from an external client.
a.miner (OP)
Newbie
*
Offline Offline

Activity: 43
Merit: 0


View Profile
April 29, 2014, 12:39:37 AM
 #6

Yes, you need server=1 only if you want the Bitcoin-Qt to also act as a server for JSON-RPC commands.

If you will be executing your JSON-RPC commands straight to bitcoind you don't need to set server=1.

Call bicoind with the -debug -printtoconsole command line arguments to get a responsive representation of what is going on in your terminal screen.

You can always test bitcoind's status by running bitcoin-cli getinfo and see if it responds.

You will have to add rpcuser and rpcpassword in your bitcoin.conf to access it from an external client.

This is exactly what I needed to know.  Thank you very much.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!