Mercurial > hg > bitcoin
changeset 2855:19387f8154a8 draft
Merge branch '0.5.0.x' into 0.5.x
author | Luke Dashjr <luke-jr+git@utopios.org> |
---|---|
date | Mon, 26 Mar 2012 20:07:28 -0400 |
parents | d308826d3540 (current diff) 90cea2c85289 (diff) |
children | 89639789e5b9 |
files | bitcoin-qt.pro share/setup.nsi src/net.cpp |
diffstat | 6 files changed, 42 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -204,7 +204,7 @@ TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts) isEmpty(QMAKE_LRELEASE) { - win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe + win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease } isEmpty(TS_DIR):TS_DIR = src/qt/locale @@ -251,10 +251,20 @@ macx:BOOST_INCLUDE_PATH = /opt/local/include } -windows:LIBS += -lmingwthrd -lws2_32 -windows:DEFINES += _MT WIN32 +windows:LIBS += -lws2_32 +windows:DEFINES += WIN32 windows:RC_FILE = src/qt/res/bitcoin-qt.rc -windows:QMAKE_LIBS_QT_ENTRY -= -lmingw32 + +windows:!contains(MINGW_THREAD_BUGFIX, 0) { + # At least qmake's win32-g++-cross profile is missing the -lmingwthrd + # thread-safety flag. GCC has -mthreads to enable this, but it doesn't + # work with static linking. -lmingwthrd must come BEFORE -lmingw, so + # it is prepended to QMAKE_LIBS_QT_ENTRY. + # It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes + # any problems on some untested qmake profile now or in the future. + DEFINES += _MT + QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY +} macx:HEADERS += src/qt/macdockiconhandler.h macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm
--- a/doc/translation_process.md +++ b/doc/translation_process.md @@ -1,7 +1,7 @@ Translations ============ -The QT GUI can be easily be translated into other languages. Here's how we +The Qt GUI can be easily translated into other languages. Here's how we handle those translations. Files and Folders @@ -30,10 +30,10 @@ #### Source file -`src/qt/locale/bitcoin_en.ts` is a treated in a special way. It is used as the -source for all other translations. Whenever a string in the code is change +`src/qt/locale/bitcoin_en.ts` is treated in a special way. It is used as the +source for all other translations. Whenever a string in the code is changed this file must be updated to reflect those changes. Usually, this can be -accomplished by running `lupdate` +accomplished by running `lupdate`. Syncing with transifex ---------------------- @@ -42,9 +42,9 @@ https://www.transifex.net/projects/p/bitcoin/resource/tx/ -The "transifex client":http://help.transifex.net/features/client/index.html -will help with fetching new translations from transifex. - +The "transifex client" (see: http://help.transifex.net/features/client/) +will help with fetching new translations from transifex. Use the following +config to be able to connect with the client. ### .tx/config
--- a/share/setup.nsi +++ b/share/setup.nsi @@ -75,6 +75,10 @@ File /r /x *.exe /x *.o ../src\*.* SetOutPath $INSTDIR WriteRegStr HKCU "${REGKEY}\Components" Main 1 + + # Remove old wxwidgets-based-bitcoin executable and locales: + Delete /REBOOTOK $INSTDIR\bitcoin.exe + RMDir /r /REBOOTOK $INSTDIR\locale SectionEnd Section -post SEC0001
--- a/src/db.cpp +++ b/src/db.cpp @@ -777,6 +777,13 @@ //// todo: shouldn't we catch exceptions and try to recover and continue? CRITICAL_BLOCK(pwallet->cs_wallet) { + int nMinVersion = 0; + if (Read((string)"minversion", nMinVersion)) + { + if (nMinVersion > VERSION) + return DB_TOO_NEW; + } + // Get cursor Dbc* pcursor = GetCursor(); if (!pcursor) @@ -962,13 +969,6 @@ if (strKey == "addrProxy") ssValue >> addrProxy; if (fHaveUPnP && strKey == "fUseUPnP") ssValue >> fUseUPnP; } - else if (strType == "minversion") - { - int nMinVersion = 0; - ssValue >> nMinVersion; - if (nMinVersion > VERSION) - return DB_TOO_NEW; - } } pcursor->close(); }
--- a/src/main.cpp +++ b/src/main.cpp @@ -1279,6 +1279,9 @@ vConnect.push_back(pindex); reverse(vConnect.begin(), vConnect.end()); + printf("REORGANIZE: Disconnect %i blocks; %s..%s\n", vDisconnect.size(), pfork->GetBlockHash().ToString().substr(0,20).c_str(), pindexBest->GetBlockHash().ToString().substr(0,20).c_str()); + printf("REORGANIZE: Connect %i blocks; %s..%s\n", vConnect.size(), pfork->GetBlockHash().ToString().substr(0,20).c_str(), pindexNew->GetBlockHash().ToString().substr(0,20).c_str()); + // Disconnect shorter branch vector<CTransaction> vResurrect; BOOST_FOREACH(CBlockIndex* pindex, vDisconnect) @@ -1287,7 +1290,7 @@ if (!block.ReadFromDisk(pindex)) return error("Reorganize() : ReadFromDisk for disconnect failed"); if (!block.DisconnectBlock(txdb, pindex)) - return error("Reorganize() : DisconnectBlock failed"); + return error("Reorganize() : DisconnectBlock %s failed", pindex->GetBlockHash().ToString().substr(0,20).c_str()); // Queue memory transactions to resurrect BOOST_FOREACH(const CTransaction& tx, block.vtx) @@ -1307,7 +1310,7 @@ { // Invalid block txdb.TxnAbort(); - return error("Reorganize() : ConnectBlock failed"); + return error("Reorganize() : ConnectBlock %s failed", pindex->GetBlockHash().ToString().substr(0,20).c_str()); } // Queue memory transactions to delete @@ -1339,6 +1342,8 @@ BOOST_FOREACH(CTransaction& tx, vDelete) tx.RemoveFromMemoryPool(); + printf("REORGANIZE: done\n"); + return true; } @@ -1536,10 +1541,11 @@ return error("AcceptBlock() : AddToBlockIndex failed"); // Relay inventory, but don't relay old inventory during initial block download + int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(); if (hashBestChain == hash) CRITICAL_BLOCK(cs_vNodes) BOOST_FOREACH(CNode* pnode, vNodes) - if (nBestHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 140700)) + if (nBestHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) pnode->PushInventory(CInv(MSG_BLOCK, hash)); return true;