Advertisement
joric

Bitcoin (0.3.24rc1) patch showing total number of blocks

Jul 4th, 2011
650
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.42 KB | None | 0 0
  1. diff -x obj -x *.exe -r -u 0.3.24rc1\src\main.cpp bitcoin-master\src\main.cpp
  2. --- 0.3.24rc1\src\main.cpp  Mon Jul 04 11:24:44 2011
  3. +++ bitcoin-master\src\main.cpp Mon Jul 04 11:40:35 2011
  4. @@ -36,6 +36,7 @@
  5.  const int nInitialBlockThreshold = 120; // Regard blocks up until N-threshold as "initial download"
  6.  CBlockIndex* pindexGenesisBlock = NULL;
  7.  int nBestHeight = -1;
  8. +int nMaxHeight = 0;
  9.  CBigNum bnBestChainWork = 0;
  10.  CBigNum bnBestInvalidWork = 0;
  11.  uint256 hashBestChain = 0;
  12. @@ -1870,6 +1871,7 @@
  13.          pfrom->fSuccessfullyConnected = true;
  14.  
  15.          printf("version message: version %d, blocks=%d\n", pfrom->nVersion, pfrom->nStartingHeight);
  16. +        nMaxHeight = max(nBestHeight, pfrom->nStartingHeight);
  17.      }
  18.  
  19.  
  20. diff -x obj -x *.exe -r -u 0.3.24rc1\src\ui.cpp bitcoin-master\src\ui.cpp
  21. --- 0.3.24rc1\src\ui.cpp    Mon Jul 04 11:24:44 2011
  22. +++ bitcoin-master\src\ui.cpp   Mon Jul 04 11:40:44 2011
  23. @@ -1070,7 +1070,8 @@
  24.          strGen = _("(not connected)");
  25.      m_statusBar->SetStatusText(strGen, 1);
  26.  
  27. -    string strStatus = strprintf(_("     %d connections     %d blocks     %d transactions"), vNodes.size(), nBestHeight, nTransactionCount);
  28. +    extern int nMaxHeight;
  29. +    string strStatus = strprintf(_("   %d connections   %d / %d blocks   %d transactions"), vNodes.size(), nBestHeight, nMaxHeight, nTransactionCount);
  30.      m_statusBar->SetStatusText(strStatus, 2);
  31.  
  32.      // Update receiving address
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement