Bitcoin Forum
October 22, 2018, 08:06:18 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How to determine how far block download has progressed?  (Read 1032 times)
wumpus
Hero Member
*****
qt
Offline Offline

Activity: 812
Merit: 1000

No Maps for These Territories


View Profile
June 15, 2011, 08:29:35 PM
 #1

I'd like to show a progress bar on initial download on the block chain, or when the client was disconnected for a while and needs to catch up.

This would give the user a more useful indication than just a raw count.

There is nBestHeight (which can be queried with getblockcount/getblocknumber), and the IsInitialBlockDownload function, but those only take into account the downloaded blocks. Is there a way to find out how many blocks there are in total? (without querying a third party)


Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
1540238778
Hero Member
*
Offline Offline

Posts: 1540238778

View Profile Personal Message (Offline)

Ignore
1540238778
Reply with quote  #2

1540238778
Report to moderator
1540238778
Hero Member
*
Offline Offline

Posts: 1540238778

View Profile Personal Message (Offline)

Ignore
1540238778
Reply with quote  #2

1540238778
Report to moderator
1540238778
Hero Member
*
Offline Offline

Posts: 1540238778

View Profile Personal Message (Offline)

Ignore
1540238778
Reply with quote  #2

1540238778
Report to moderator
"I'm sure that in 20 years there will either be very large transaction volume or no volume." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1540238778
Hero Member
*
Offline Offline

Posts: 1540238778

View Profile Personal Message (Offline)

Ignore
1540238778
Reply with quote  #2

1540238778
Report to moderator
1540238778
Hero Member
*
Offline Offline

Posts: 1540238778

View Profile Personal Message (Offline)

Ignore
1540238778
Reply with quote  #2

1540238778
Report to moderator
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1001



View Profile
June 15, 2011, 11:24:55 PM
 #2

No.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 3178
Merit: 3855


View Profile
June 16, 2011, 02:30:08 AM
 #3

The version messages exchanged between peers right after connecting contains the current block height. You could take the median of your peers' heights as a low-reliability number.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
wumpus
Hero Member
*****
qt
Offline Offline

Activity: 812
Merit: 1000

No Maps for These Territories


View Profile
June 16, 2011, 05:07:32 AM
 #4

The version messages exchanged between peers right after connecting contains the current block height. You could take the median of your peers' heights as a low-reliability number.
Thanks. Low-reliability is not an issue, as it is an indication for visual purposes.

Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!