Author

Topic: Network Monitor -- different blockcount for peers (Read 1737 times)

member
Activity: 84
Merit: 14
: "I want to fix this"

We should make this your middle name Mike. Busy guy.
legendary
Activity: 1526
Merit: 1134
Actually, height tracking of peers is buggy. It can't really be completely accurate because there's no way to query a node for its height other than by reconnecting to it and getting a new ver handshake. So bitcoinj just counts announced blocks. Because of where this code is in the system, if a peer has announced a side chain block then its count will still be increased even though height didn't.

I want to fix this, but it's going to be a little awkward.
hero member
Activity: 483
Merit: 551
Afaik the block count is just an advertised number. It can be wrong. If the node cannot prove that he actually knows the block in question then the others will not take that for granted, so they stay at the lower number.

Much less likely: The node has actually found a block but did not broadcast it.
member
Activity: 84
Merit: 14
Not sure if this belongs in this forum but when I check in Bitcoin Wallet 3.14's Network Monitor, I find all peers are showing block 249844. Bitcoind's getblockcount on my desktop computer is showing the same block number. But this peer:

pool-96-241-72-174.washdc.fios.verizon.net

... has been showing 249845 for several minutes now. What's that about then? No fork I trust :-O
Jump to: