How can I test whether my Bitcoin Core node is working correctly?
How can I test whether my Bitcoin Core node is working correctly?
Loading saved threads...
Zhen · External communityPost link
External question — Bitcoin Stack Exchange
Author: Zhen
Original post: https://bitcoin.stackexchange.com/questions/130802
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I want to make sure my Bitcoin Core node is working correctly.
Are there any tools to test it — such as querying node status or sending test transactions?
Quote
Report
Coin Gabbar · External communityPost link
External answer — Bitcoin Stack Exchange
Author: Coin Gabbar
Original post: https://bitcoin.stackexchange.com/a/130855
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
The easiest way is to check three things separately: whether Bitcoin Core is running, whether it is connected to peers, and whether it is synced to the best chain.
From the machine running Bitcoin Core, start with:
bitcoin-cli getblockchaininfo
The important fields are:
blocks
headers
verificationprogress
initialblockdownload
chain
warnings
A healthy fully synced mainnet node should normally show:
chain: "main"
blocks: close to headers
verificationprogress: very close to 1
initialblockdownload: false
warnings: empty or not serious
If
blocks
is much lower than
headers
, the node is still downloading or validating blocks. If
initialblockdownload
is
true
, the node is still in initial sync. That does not mean the node is broken; it usually means it has not finished syncing yet.
Next, check networking:
bitcoin-cli getnetworkinfo
Look at:
networkactive
connections
connections_in
connections_out
A working node should have
networkactive: true
and at least some outbound connections. Inbound connections are nice to have, but not required for your node to work. If you have no inbound peers, it may simply mean your router/firewall is not forwarding port 8333.
You can also inspect peers directly:
bitcoin-cli getpeerinfo
This should return a list of connected peers. If it returns an empty list, the node is not connected to the Bitcoin P2P network yet.
A quick practical checklist:
bitcoin-cli getblockchaininfo
chain is "main" if you intend to run mainnet
blocks and headers are close
verificationprogress is near 1
initialblockdownload is false
bitcoin-cli getnetworkinfo
networkactive is true
connections_out is greater than 0
bitcoin-cli getpeerinfo
returns connected peers
debug.log
no repeated connection, disk, database, or validation errors
You can check the log file with:
tail -f ~/.bitcoin/debug.log
On Linux, the default data directory is usually
~/.bitcoin/
. On Windows and macOS the location is different, but the same idea applies: check
debug.log
for repeated errors.
If you want to test whether your node is usable by other wallets or applications, try a simple RPC call:
bitcoin-cli getblockcount
If this returns a block height without error, the RPC interface is responding.
For a more complete test, compare your node’s block height and best block hash with a few independent block explorers or another trusted node:
bitcoin-cli getblockcount
bitcoin-cli getbestblockhash
Do not worry if your block height is a little behind while syncing. That is normal. The node is only “ready” for reliable wallet, explorer, or payment use after it is fully synced and no longer in initial block download.
So the short answer is: your Bitcoin Core node is working correctly if it is running, has peers, is on the expected network, is close to the current block height, has
initialblockdownload: false
, and its log is not showing repeated errors.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Bitcoin Stack Exchange Author: Coin Gabbar Source score (net votes, not local likes): -3 Original post: https://bitcoin.stackexchange.com/a/130855 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. The easiest way is to check three things separately: whether Bitcoin Core is running, whether it is connected to peers, and whether it is synced to the best chain. From the machine running Bitcoin Core, start with: bitcoin-cli getblockchaininfo The important fields are: blocks headers verificationprogress initialblockdownload chain warnings A healthy fully synced mainnet node should normally show: chain: "main" blocks: close to headers verificationprogress: very close to 1 initialblockdownload: false warnings: empty or not serious If blocks is much lower than headers , the node is still downloading or validating blocks. If initialblockdownload is true , the node is still in initial sync. That does not mean the node is broken; it usually means it has not finished syncing yet. Next, check networking: bitcoin-cli getnetworkinfo Look at: networkactive connections connections_in connections_out A working node should have networkactive: true and at least some outbound connections. Inbound connections are nice to have, but not required for your node to work. If you have no inbound peers, it may simply mean your router/firewall is not forwarding port 8333. You can also inspect peers directly: bitcoin-cli getpeerinfo This should return a list of connected peers. If it returns an empty list, the node is not connected to the Bitcoin P2P network yet. A quick practical checklist: bitcoin-cli getblockchaininfo chain is "main" if you intend to run mainnet blocks and headers are close verificationprogress is near 1 initialblockdownload is false bitcoin-cli getnetworkinfo networkactive is true connections_out is greater than 0 bitcoin-cli getpeerinfo returns connected peers debug.log no repeated connection, disk, database, or validation errors You can check the log file with: tail -f ~/.bitcoin/debug.log On Linux, the default data directory is usually ~/.bitcoin/ . On Windows and macOS the location is different, but the same idea applies: check debug.log for repeated errors. If you want to test whether your node is usable by other wallets or applications, try a simple RPC call: bitcoin-cli getblockcount If this returns a block height without error, the RPC interface is responding. For a more complete test, compare your node’s block height and best block hash with a few independent block explorers or another trusted node: bitcoin-cli getblockcount bitcoin-cli getbestblockhash Do not worry if your block height is a little behind while syncing. That is normal. The node is only “ready” for reliable wallet, explorer, or payment use after it is fully synced and no longer in initial block download. So the short answer is: your Bitcoin Core node is working correctly if it is running, has peers, is on the expected network, is close to the current block height, has initialblockdownload: false , and its log is not showing repeated errors.
Checking account access…