Advertisement
joric

Bitcoin (0.3.23) patch showing total number of blocks

Jul 2nd, 2011
680
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.54 KB | None | 0 0
  1. Screenshot: http://i52.tinypic.com/b997oj.jpg
  2.  
  3. diff -u -p1 coderrr-bitcoin-9376bcb/src\main.cpp bitcoin-mod/src\main.cpp
  4. --- coderrr-bitcoin-9376bcb/src\main.cpp    Mon Jun 27 11:46:58 2011
  5. +++ bitcoin-mod/src\main.cpp    Sun Jul 03 00:11:37 2011
  6. @@ -25,2 +25,3 @@ CBlockIndex* pindexGenesisBlock = NULL;
  7.  int nBestHeight = -1;
  8. +int nMaxHeight = 0;
  9.  CBigNum bnBestChainWork = 0;
  10. @@ -2439,2 +2440,4 @@ bool ProcessMessage(CNode* pfrom, string
  11.          printf("version message: version %d, blocks=%d\n", pfrom->nVersion, pfrom->nStartingHeight);
  12. +
  13. +       nMaxHeight = max(nBestHeight, pfrom->nStartingHeight);
  14.      }
  15.  
  16. diff -u -p1 coderrr-bitcoin-9376bcb/src\net.h bitcoin-mod/src\net.h
  17. --- coderrr-bitcoin-9376bcb/src\net.h   Mon Jun 27 11:46:58 2011
  18. +++ bitcoin-mod/src\net.h   Sat Jul 02 17:42:54 2011
  19. @@ -21,2 +21,3 @@ class CBlockIndex;
  20.  extern int nBestHeight;
  21. +extern int nMaxHeight;
  22.  extern int nConnectTimeout;
  23.  
  24. diff -u -p1 coderrr-bitcoin-9376bcb/src\ui.cpp bitcoin-mod/src\ui.cpp
  25. --- coderrr-bitcoin-9376bcb/src\ui.cpp  Mon Jun 27 11:46:58 2011
  26. +++ bitcoin-mod/src\ui.cpp  Sun Jul 03 00:12:27 2011
  27. @@ -1235,3 +1236,4 @@ void CMainFrame::OnPaintListCtrl(wxPaint
  28.  
  29. -    string strStatus = strprintf(_("     %d connections     %d blocks     %d transactions"), vNodes.size(), nBestHeight, nTransactionCount);
  30. +   nMaxHeight = max(nMaxHeight, nBestHeight);
  31. +    string strStatus = strprintf(_("   %d connections    %d / %d blocks    %d transactions"), vNodes.size(), nBestHeight, nMaxHeight, nTransactionCount);
  32.      m_statusBar->SetStatusText(strStatus, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement