What's the difference between synced_blocks and synced_headers?
Bitcoin clients can have headers without having blocks. (However, Bitcoin Core never has a block without a header.)



A synced_blocks of -1 means that the best block for the other node is unknown.

synced_blocks is set here:

https://github.com/bitcoin/bitcoin/blob/b3e42b6d02e8d19658a9135e427ebceab5367779/src/main.cpp#L557

stats.nCommonHeight = state-&gt;pindexLastCommonBlock ? state-&gt;pindexLastCommonBlock-&gt;nHeight : -1;




A synced_headers of -1 means that the best header for the other node is unknown.

synced_headers is set here:

https://github.com/bitcoin/bitcoin/blob/b3e42b6d02e8d19658a9135e427ebceab5367779/src/main.cpp#L556

stats.nSyncHeight = state-&gt;pindexBestKnownBlock ? state-&gt;pindexBestKnownBlock-&gt;nHeight : -1;