diff options
117 files changed, 2031 insertions, 1270 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index ed6ce85aa8..f432d0e4d3 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -81,7 +81,7 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) { } # regenerate src/build.h -!windows || contains(USE_BUILD_INFO, 1) { +!windows|contains(USE_BUILD_INFO, 1) { genbuild.depends = FORCE genbuild.commands = cd $$PWD; /bin/sh share/genbuild.sh $$OUT_PWD/build/build.h genbuild.target = $$OUT_PWD/build/build.h @@ -279,7 +279,7 @@ OTHER_FILES += \ # platform specific defaults, if not overridden on command line isEmpty(BOOST_LIB_SUFFIX) { macx:BOOST_LIB_SUFFIX = -mt - windows:BOOST_LIB_SUFFIX = -mgw44-mt-1_43 + windows:BOOST_LIB_SUFFIX = -mgw44-mt-s-1_49 } isEmpty(BOOST_THREAD_LIB_SUFFIX) { diff --git a/contrib/debian/control b/contrib/debian/control index 4425e716d8..c8266f686b 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -44,7 +44,7 @@ Description: peer-to-peer network based digital currency - daemon Package: bitcoin-qt Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: peer-to-peer network based digital currency - QT GUI +Description: peer-to-peer network based digital currency - Qt GUI Bitcoin is a free open source peer-to-peer electronic cash system that is completely decentralized, without the need for a central server or trusted parties. Users hold the crypto keys to their own money and @@ -56,4 +56,4 @@ Description: peer-to-peer network based digital currency - QT GUI Full transaction history is stored locally at each client. This requires 2+ GB of space, slowly growing. . - This package provides bitcoin-qt, a GUI for Bitcoin based on QT. + This package provides Bitcoin-Qt, a GUI for Bitcoin based on Qt. diff --git a/contrib/debian/copyright b/contrib/debian/copyright index 71fa77cf6c..71913c5a3a 100644 --- a/contrib/debian/copyright +++ b/contrib/debian/copyright @@ -6,7 +6,7 @@ Source: http://sourceforge.net/projects/bitcoin/files/ https://github.com/bitcoin/bitcoin Files: * -Copyright: 2009-2011, Bitcoin Developers +Copyright: 2009-2012, Bitcoin Developers License: Expat Comment: The Bitcoin Developers encompasses the current developers listed on bitcoin.org, as well as the numerous contributors to the project. @@ -57,7 +57,7 @@ Files: src/qt/res/icons/transaction*.png Copyright: md2k7 License: You are free to do with these icons as you wish, including selling, copying, modifying etc. -Comment: Site: https://forum.bitcoin.org/index.php?topic=15276.0 +Comment: Site: https://bitcointalk.org/index.php?topic=15276.0 Files: src/qt/res/icons/configure.png, src/qt/res/icons/quit.png, src/qt/res/icons/editcopy.png, src/qt/res/icons/editpaste.png, @@ -70,7 +70,7 @@ Comment: Icon Pack: Crystal SVG Files: src/qt/res/icons/bitcoin.png, src/qt/res/icons/toolbar.png Copyright: Bitboy (optimized for 16x16 by Wladimir van der Laan) License: PUB-DOM -Comment: Site: http://forum.bitcoin.org/?topic=1756.0 +Comment: Site: https://bitcointalk.org/?topic=1756.0 Files: scripts/img/reload.xcf, src/qt/res/movies/update_spinner.mng Copyright: Everaldo (Everaldo Coelho) diff --git a/contrib/gitian-descriptors/gitian-win32.yml b/contrib/gitian-descriptors/gitian-win32.yml index 6e2eff15f3..6f0e4e2318 100644 --- a/contrib/gitian-descriptors/gitian-win32.yml +++ b/contrib/gitian-descriptors/gitian-win32.yml @@ -47,7 +47,7 @@ script: | mkdir -p $OUTDIR/src git archive HEAD | tar -x -C $OUTDIR/src cp $OUTDIR/src/doc/README_windows.txt $OUTDIR/readme.txt - cp $OUTDIR/src/COPYING $OUTDIR/license.txt + cp $OUTDIR/src/COPYING $OUTDIR/COPYING.txt export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 export FAKETIME=$REFERENCE_DATETIME export TZ=UTC diff --git a/contrib/pyminer/pyminer.py b/contrib/pyminer/pyminer.py index 2887aba591..0a2932d66e 100755 --- a/contrib/pyminer/pyminer.py +++ b/contrib/pyminer/pyminer.py @@ -2,7 +2,7 @@ # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying -# file license.txt or http://www.opensource.org/licenses/mit-license.php. +# file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time diff --git a/doc/Doxyfile b/doc/Doxyfile index 08d4f8c37f..c32d0f8959 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -203,7 +203,7 @@ TAB_SIZE = 8 # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. +# You can put \n in the value part of an alias to insert newlines. ALIASES = diff --git a/doc/README b/doc/README index 4eda8bcd76..ee6478d59e 100644 --- a/doc/README +++ b/doc/README @@ -2,7 +2,7 @@ Bitcoin 0.6.99 BETA Copyright (c) 2009-2012 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying -file license.txt or http://www.opensource.org/licenses/mit-license.php. +file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). @@ -18,7 +18,7 @@ with each other, with the help of a P2P network to check for double-spending. Setup ----- -You need the Qt4 run-time libraries to run bitcoin-qt. On Debian or Ubuntu: +You need the Qt4 run-time libraries to run Bitcoin-Qt. On Debian or Ubuntu: sudo apt-get install libqtgui4 Unpack the files into a directory and run: diff --git a/doc/README_windows.txt b/doc/README_windows.txt index eec252931d..dd8a62a448 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -2,7 +2,7 @@ Bitcoin 0.6.99 BETA Copyright (c) 2009-2012 Bitcoin Developers
Distributed under the MIT/X11 software license, see the accompanying
-file license.txt or http://www.opensource.org/licenses/mit-license.php.
+file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
cryptographic software written by Eric Young (eay@cryptsoft.com).
diff --git a/doc/Tor.txt b/doc/Tor.txt index f44b016f22..e088d87105 100644 --- a/doc/Tor.txt +++ b/doc/Tor.txt @@ -36,7 +36,7 @@ outgoing connections be anonimized, but more is possible. to run a hidden service (see next section), you'll need to enable it explicitly. --connect=X When behing a Tor proxy, you can specify .onion addresses instead +-connect=X When behind a Tor proxy, you can specify .onion addresses instead -addnode=X of IP addresses or hostnames in these parameters. It requires -seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with other P2P nodes. @@ -56,10 +56,10 @@ config file): HiddenServiceDir /var/lib/tor/bitcoin-service/ HiddenServicePort 8333 127.0.0.1:8333 -The directory can be different of course, but (both) 8333's should be equal to your -bitcoind's P2P listen port (8333 by default). +The directory can be different of course, but (both) port numbers should be equal to +your bitcoind's P2P listen port (8333 by default). --externalip=X You can tell bitcoin about its publically reachable address using +-externalip=X You can tell bitcoin about its publicly reachable address using this option, and this can be a .onion address. Given the above configuration, you can find your onion address in /var/lib/tor/bitcoin-service/hostname. Onion addresses are given diff --git a/doc/assets-attribution.txt b/doc/assets-attribution.txt index 75062f7fef..4a4ab08685 100644 --- a/doc/assets-attribution.txt +++ b/doc/assets-attribution.txt @@ -26,7 +26,7 @@ Site: http://findicons.com/icon/93743/blocks_gnome_netstatus_0 Icon: src/qt/res/icons/transaction*.png Designer: md2k7 -Site: https://forum.bitcoin.org/index.php?topic=15276.0 +Site: https://bitcointalk.org/index.php?topic=15276.0 License: You are free to do with these icons as you wish, including selling, copying, modifying etc. @@ -41,7 +41,7 @@ License: LGPL Icon: src/qt/res/icons/bitcoin.png, src/qt/res/icons/toolbar.png Designer: Bitboy (optimized for 16x16 by Wladimir van der Laan) License: Public Domain -Site: http://forum.bitcoin.org/?topic=1756.0 +Site: https://bitcointalk.org/?topic=1756.0 Icon: scripts/img/reload.xcf (modified),src/qt/res/movies/update_spinner.mng Icon Pack: Kids diff --git a/doc/build-msw.txt b/doc/build-msw.txt index ad23e68675..c887a7be8c 100644 --- a/doc/build-msw.txt +++ b/doc/build-msw.txt @@ -1,6 +1,6 @@ Copyright (c) 2009-2012 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying -file license.txt or http://www.opensource.org/licenses/mit-license.php. +file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP @@ -24,7 +24,7 @@ Dependencies Libraries you need to download separately and build: default path download -OpenSSL \openssl-1.0.1d-mgw http://www.openssl.org/source/ +OpenSSL \openssl-1.0.1b-mgw http://www.openssl.org/source/ Berkeley DB \db-4.8.30.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html Boost \boost-1.47.0-mgw http://www.boost.org/users/download/ miniupnpc \miniupnpc-1.6-mgw http://miniupnp.tuxfamily.org/files/ @@ -36,7 +36,7 @@ Boost MIT-like license miniupnpc New (3-clause) BSD license Versions used in this release: -OpenSSL 1.0.1d +OpenSSL 1.0.1b Berkeley DB 4.8.30.NC Boost 1.47.0 miniupnpc 1.6 @@ -48,7 +48,7 @@ MSYS shell: un-tar sources with MSYS 'tar xfz' to avoid issue with symlinks (OpenSSL ticket 2377) change 'MAKE' env. variable from 'C:\MinGW32\bin\mingw32-make.exe' to '/c/MinGW32/bin/mingw32-make.exe' -cd /c/openssl-1.0.1d-mgw +cd /c/openssl-1.0.1b-mgw ./config make diff --git a/doc/build-osx.txt b/doc/build-osx.txt index 24e825ca8c..af16162a59 100644 --- a/doc/build-osx.txt +++ b/doc/build-osx.txt @@ -1,6 +1,6 @@ Copyright (c) 2009-2012 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying -file license.txt or http://www.opensource.org/licenses/mit-license.php. +file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP diff --git a/doc/build-unix.txt b/doc/build-unix.txt index 825491bba3..784d86e63d 100644 --- a/doc/build-unix.txt +++ b/doc/build-unix.txt @@ -1,6 +1,6 @@ Copyright (c) 2009-2012 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying -file license.txt or http://www.opensource.org/licenses/mit-license.php. +file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP diff --git a/doc/readme-qt.rst b/doc/readme-qt.rst index 294f31ac24..951e86f9cb 100644 --- a/doc/readme-qt.rst +++ b/doc/readme-qt.rst @@ -1,4 +1,4 @@ -Bitcoin-qt: Qt4 GUI for Bitcoin +Bitcoin-Qt: Qt4 GUI for Bitcoin =============================== Build instructions @@ -23,25 +23,26 @@ then execute the following: qmake make -Alternatively, install Qt Creator and open the `bitcoin-qt.pro` file. +Alternatively, install `Qt Creator`_ and open the `bitcoin-qt.pro` file. An executable named `bitcoin-qt` will be built. +.. _`Qt Creator`: http://qt.nokia.com/downloads/ Windows -------- Windows build instructions: -- Download the `QT Windows SDK`_ and install it. You don't need the Symbian stuff, just the desktop Qt. +- Download the `Qt Windows SDK`_ and install it. You don't need the Symbian stuff, just the desktop Qt. - Download and extract the `dependencies archive`_ [#]_, or compile openssl, boost and dbcxx yourself. - Copy the contents of the folder "deps" to "X:\\QtSDK\\mingw", replace X:\\ with the location where you installed the Qt SDK. Make sure that the contents of "deps\\include" end up in the current "include" directory. -- Open the .pro file in QT creator and build as normal (ctrl-B) +- Open the bitcoin-qt.pro file in Qt Creator and build as normal (ctrl-B) -.. _`QT Windows SDK`: http://qt.nokia.com/downloads/sdk-windows-cpp +.. _`Qt Windows SDK`: http://qt.nokia.com/downloads/sdk-windows-cpp .. _`dependencies archive`: https://download.visucore.com/bitcoin/qtgui_deps_1.zip .. [#] PGP signature: https://download.visucore.com/bitcoin/qtgui_deps_1.zip.sig (signed with RSA key ID `610945D0`_) .. _`610945D0`: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x610945D0 @@ -61,7 +62,7 @@ Mac OS X sudo port selfupdate sudo port install boost db48 miniupnpc -- Open the .pro file in Qt Creator and build as normal (cmd-B) +- Open the bitcoin-qt.pro file in Qt Creator and build as normal (cmd-B) .. _`Qt Mac OS X SDK`: http://qt.nokia.com/downloads/sdk-mac-os-cpp .. _`MacPorts`: http://www.macports.org/install.php @@ -70,7 +71,7 @@ Mac OS X Build configuration options ============================ -UPNnP port forwarding +UPnP port forwarding --------------------- To use UPnP for port forwarding behind a NAT router (recommended, as more connections overall allow for a faster and more stable bitcoin experience), pass the following argument to qmake: diff --git a/doc/release-notes.txt b/doc/release-notes.txt new file mode 100644 index 0000000000..99ba67690b --- /dev/null +++ b/doc/release-notes.txt @@ -0,0 +1,71 @@ + +(note: this is a temporary file, to be added-to by anybody, and deleted at +release time) + +Building this from + + $ git shortlog --no-merges v0.6.3.. + + + +Core bitcoin handling and blockchain database +--------------------------------------------- +* Reduced CPU usage, by eliminating some redundant hash calculations +* Cache signature verifications, to eliminate redundant signature checks +* Mining: when creating new blocks, sort 'paid' area by fee-per-kb +* Database: better validation of on-disk stored data +* Database: minor optimizations and reliability improvements +* -loadblock=FILE will import an external block file + + +JSON-RPC API +------------ +* Internal HTTP server is now thread-per-connection, rather than + a single-threaded queue that would stall on network I/O. +* Internal HTTP server supports HTTP/1.1, pipelined requests and + connection keep-alive. +* Support JSON-RPC 2.0 batches, to encapsulate multiple JSON-RPC requests + within a single HTTP request. +* IPv6 support +* Added raw transaction API. See https://gist.github.com/2839617 +* Added 'getrawmempool', to list contents of TX memory pool +* Added 'getpeerinfo', to list data about each connected network peer +* Rework gettransaction, getblock calls. 'gettransaction' responds for + non-wallet TXs now. +* Remove deprecated RPC 'getblocknumber' + + +P2P networking +-------------- +* IPv6 support +* Tor/I2P hidden service support +* Attempts to fix "stuck blockchain download" problems +* Replace BDB database "addr.dat" with internally-managed "peers.dat" + file containing peer address data. +* Lower default send buffer from 10MB to 1MB +* proxy: SOCKS5 by default +* Support connecting by hostnames passed to proxy (-proxydns) +* Add -seednode connections, and use this for -dnsseed + -proxydns +* Added -externalip and -discover +* Add -onlynet to prevent connections to a given network +* Separate listening sockets, -bind=<addr> + + +Qt GUI +--------------------- +????? + + +Internal codebase +----------------- +* Additional unit tests +* Compile warning fixes + + +Miscellaneous +------------- +* Reopen debug.log upon SIGHUP +* Bash programmable completion for bitcoind(1) +* On supported OS's, each thread is given a useful name + + diff --git a/doc/translation_process.md b/doc/translation_process.md index 3ddfc0cbf4..7ef22d83b0 100644 --- a/doc/translation_process.md +++ b/doc/translation_process.md @@ -28,32 +28,55 @@ This directory contains all translations. Filenames must adhere to this format: bitcoin_xx_YY.ts or bitcoin_xx.ts -#### Source file +#### bitcoin_en.ts (Source file) `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` (included in the Qt SDK). +this file must be updated to reflect those changes. This can be accomplished +by running `lupdate` (included in the Qt SDK). Also, a custom script is used +to extract strings from the non-Qt parts: -An updated source file should be merged to github and transifex will pick it -up from there. Afterwards the new strings show up as "Remaining" in transifex -and can be translated. + python share/qt/extract_strings_qt.py + lupdate bitcoin-qt.pro -no-obsolete -locations relative -ts src/qt/locale/bitcoin_en.ts + +##### Handling of plurals in the source file + +When new plurals are added to the source file, it's important to do the following steps: + +1. Open bitcoin_en.ts in Qt Linguist (also included in the Qt SDK) +2. Search for `%n`, which will take you to the parts in the translation that use plurals +3. Look for empty `English Translation (Singular)` and `English Translation (Plural)` fields +4. Add the appropriate strings for the singular and plural form of the base string +5. Mark the item as done (via the green arrow symbol in the toolbar) +6. Repeat from step 2. until all singular and plural forms are in the source file +7. Save the source file + +##### Creating the pull-request + +An updated source file should be merged to github and Transifex will pick it +up from there (can take some hours). Afterwards the new strings show up as "Remaining" +in Transifex and can be translated. + +To create the pull-request you have to do: + + git add src/qt/bitcoinstrings.cpp src/qt/locale/bitcoin_en.ts + git commit -Syncing with transifex +Syncing with Transifex ---------------------- -We are using http://transifex.net as a frontend for translating the client. +We are using https://transifex.com as a frontend for translating the client. -https://www.transifex.net/projects/p/bitcoin/resource/tx/ +https://www.transifex.com/projects/p/bitcoin/resource/tx/ -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. +The "Transifex client" (see: http://help.transifex.com/features/client/) +will help with fetching new translations from Transifex. Use the following +config to be able to connect with the client: ### .tx/config [main] - host = https://www.transifex.net + host = https://www.transifex.com [bitcoin.tx] file_filter = src/qt/locale/bitcoin_<lang>.ts @@ -63,14 +86,14 @@ config to be able to connect with the client. ### .tx/config (for Windows) [main] - host = https://www.transifex.net + host = https://www.transifex.com [bitcoin.tx] file_filter = src\qt\locale\bitcoin_<lang>.ts source_file = src\qt\locale\bitcoin_en.ts source_lang = en -It is also possible to directly download new translations one by one from transifex. +It is also possible to directly download new translations one by one from the Transifex website. ### Fetching new translations diff --git a/doc/unit-tests.txt b/doc/unit-tests.txt index e7f215188e..a12786512d 100644 --- a/doc/unit-tests.txt +++ b/doc/unit-tests.txt @@ -1,4 +1,4 @@ -Compiling/runing bitcoind unit tests +Compiling/running bitcoind unit tests ------------------------------------ bitcoind unit tests are in the src/test/ directory; they @@ -12,9 +12,9 @@ make -f makefile.unix test_bitcoin # Replace makefile.unix if you're not on uni If all tests succeed the last line of output will be: *** No errors detected -To add more tests, add BOOST_AUTO_TEST_CASE's to the existing +To add more tests, add BOOST_AUTO_TEST_CASE functions to the existing .cpp files in the test/ directory or add new .cpp files that -implement new BOOST_AUTO_TEST_SUITE's (the makefiles are +implement new BOOST_AUTO_TEST_SUITE sections (the makefiles are set up to add test/*.cpp to test_bitcoin automatically). diff --git a/share/setup.nsi b/share/setup.nsi index c0bc880a56..87cd58a855 100644 --- a/share/setup.nsi +++ b/share/setup.nsi @@ -67,7 +67,7 @@ Section -Main SEC0000 SetOutPath $INSTDIR
SetOverwrite on
File ../release/bitcoin-qt.exe
- File /oname=license.txt ../COPYING
+ File /oname=COPYING.txt ../COPYING
File /oname=readme.txt ../doc/README_windows.txt
SetOutPath $INSTDIR\daemon
File ../src/bitcoind.exe
@@ -120,7 +120,7 @@ done${UNSECTION_ID}: # Uninstaller sections
Section /o -un.Main UNSEC0000
Delete /REBOOTOK $INSTDIR\bitcoin-qt.exe
- Delete /REBOOTOK $INSTDIR\license.txt
+ Delete /REBOOTOK $INSTDIR\COPYING.txt
Delete /REBOOTOK $INSTDIR\readme.txt
RMDir /r /REBOOTOK $INSTDIR\daemon
RMDir /r /REBOOTOK $INSTDIR\src
diff --git a/src/addrman.h b/src/addrman.h index 0392654366..7c141c427b 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -117,7 +117,7 @@ public: // * Bucket selection is based on cryptographic hashing, using a randomly-generated 256-bit key, which should not // be observable by adversaries. // * Several indexes are kept for high performance. Defining DEBUG_ADDRMAN will introduce frequent (and expensive) -// consistency checks for the entire datastructure. +// consistency checks for the entire data structure. // total number of buckets for tried addresses #define ADDRMAN_TRIED_BUCKET_COUNT 64 @@ -174,13 +174,13 @@ private: // last used nId int nIdCount; - // table with information about all nId's + // table with information about all nIds std::map<int, CAddrInfo> mapInfo; // find an nId based on its network address std::map<CNetAddr, int> mapAddr; - // randomly-ordered vector of all nId's + // randomly-ordered vector of all nIds std::vector<int> vRandom; // number of "tried" entries @@ -253,8 +253,8 @@ public: // * nNew // * nTried // * number of "new" buckets - // * all nNew addrinfo's in vvNew - // * all nTried addrinfo's in vvTried + // * all nNew addrinfos in vvNew + // * all nTried addrinfos in vvTried // * for each bucket: // * number of elements // * for each element: index diff --git a/src/base58.h b/src/base58.h index 215fd33324..fc8c8aa5de 100644 --- a/src/base58.h +++ b/src/base58.h @@ -10,7 +10,7 @@ // could be used to create visually identical looking account numbers. // - A string with non-alphanumeric characters is not as easily accepted as an account number. // - E-mail usually won't line-break if there's no punctuation to break at. -// - Doubleclicking selects the whole number as one word if it's all alphanumeric. +// - Double-clicking selects the whole number as one word if it's all alphanumeric. // #ifndef BITCOIN_BASE58_H #define BITCOIN_BASE58_H diff --git a/src/bignum.h b/src/bignum.h index 9af934051a..9fea3f70fb 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -131,15 +131,9 @@ public: if (sn < (int64)0) { - // We negate in 2 steps to avoid signed subtraction overflow, - // i.e. -(-2^63), which is an undefined operation and causes SIGILL - // when compiled with -ftrapv. - // - // Note that uint64_t n = sn, when sn is an int64_t, is a - // well-defined operation and n will be equal to sn + 2^64 when sn - // is negative. - n = sn; - n = -n; + // Since the minimum signed integer cannot be represented as positive so long as its type is signed, and it's not well-defined what happens if you make it unsigned before negating it, we instead increment the negative integer by 1, convert it, then increment the (now positive) unsigned integer by 1 to compensate + n = -(sn + 1); + ++n; fNegative = true; } else { n = sn; @@ -422,7 +416,7 @@ public: CBigNum& operator>>=(unsigned int shift) { // Note: BN_rshift segfaults on 64-bit if 2^shift is greater than the number - // if built on ubuntu 9.04 or 9.10, probably depends on version of openssl + // if built on ubuntu 9.04 or 9.10, probably depends on version of OpenSSL CBigNum a = 1; a <<= shift; if (BN_cmp(&a, this) > 0) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 474207bdce..2e3f8a8e5b 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -1569,11 +1569,17 @@ Value keypoolrefill(const Array& params, bool fHelp) void ThreadTopUpKeyPool(void* parg) { + // Make this thread recognisable as the key-topping-up thread + RenameThread("bitcoin-key-top"); + pwalletMain->TopUpKeyPool(); } void ThreadCleanWalletPassphrase(void* parg) { + // Make this thread recognisable as the wallet relocking thread + RenameThread("bitcoin-lock-wa"); + int64 nMyWakeTime = GetTimeMillis() + *((int64*)parg) * 1000; ENTER_CRITICAL_SECTION(cs_nWalletUnlockTime); @@ -1845,8 +1851,13 @@ Value getwork(const Array& params, bool fHelp) delete pblock; vNewBlock.clear(); } + + // Clear pindexPrev so future getworks make a new block, despite any failures from here on + pindexPrev = NULL; + + // Store the pindexBest used before CreateNewBlock, to avoid races nTransactionsUpdatedLast = nTransactionsUpdated; - pindexPrev = pindexBest; + CBlockIndex* pindexPrevNew = pindexBest; nStart = GetTime(); // Create new block @@ -1854,6 +1865,9 @@ Value getwork(const Array& params, bool fHelp) if (!pblock) throw JSONRPCError(-7, "Out of memory"); vNewBlock.push_back(pblock); + + // Need to update only after we know CreateNewBlock succeeded + pindexPrev = pindexPrevNew; } // Update nTime @@ -1867,7 +1881,7 @@ Value getwork(const Array& params, bool fHelp) // Save mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig); - // Prebuild hash buffers + // Pre-build hash buffers char pmidstate[32]; char pdata[128]; char phash1[64]; @@ -1944,16 +1958,26 @@ Value getmemorypool(const Array& params, bool fHelp) if (pindexPrev != pindexBest || (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 5)) { + // Clear pindexPrev so future calls make a new block, despite any failures from here on + pindexPrev = NULL; + + // Store the pindexBest used before CreateNewBlock, to avoid races nTransactionsUpdatedLast = nTransactionsUpdated; - pindexPrev = pindexBest; + CBlockIndex* pindexPrevNew = pindexBest; nStart = GetTime(); // Create new block if(pblock) + { delete pblock; + pblock = NULL; + } pblock = CreateNewBlock(reservekey); if (!pblock) throw JSONRPCError(-7, "Out of memory"); + + // Need to update only after we know CreateNewBlock succeeded + pindexPrev = pindexPrevNew; } // Update nTime @@ -2167,7 +2191,7 @@ string rfc1123Time() time(&now); struct tm* now_gmt = gmtime(&now); string locale(setlocale(LC_TIME, NULL)); - setlocale(LC_TIME, "C"); // we want posix (aka "C") weekday/month strings + setlocale(LC_TIME, "C"); // we want POSIX (aka "C") weekday/month strings strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S +0000", now_gmt); setlocale(LC_TIME, locale.c_str()); return string(buffer); @@ -2361,7 +2385,7 @@ bool ClientAllowed(const boost::asio::ip::address& address) if (address == asio::ip::address_v4::loopback() || address == asio::ip::address_v6::loopback() || (address.is_v4() - // Chech whether IPv4 addresses match 127.0.0.0/8 (loopback subnet) + // Check whether IPv4 addresses match 127.0.0.0/8 (loopback subnet) && (address.to_v4().to_ulong() & 0xff000000) == 0x7f000000)) return true; @@ -2476,6 +2500,10 @@ private: void ThreadRPCServer(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadRPCServer(parg)); + + // Make this thread recognisable as the RPC listener + RenameThread("bitcoin-rpclist"); + try { vnThreadsRunning[THREAD_RPCLISTENER]++; @@ -2534,7 +2562,7 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, { vnThreadsRunning[THREAD_RPCLISTENER]++; - // Immediately start accepting new connections, except when we're canceled or our socket is closed. + // Immediately start accepting new connections, except when we're cancelled or our socket is closed. if (error != asio::error::operation_aborted && acceptor->is_open()) RPCListen(acceptor, context, fUseSSL); @@ -2667,7 +2695,7 @@ void ThreadRPCServer2(void* parg) } catch(boost::system::system_error &e) { - uiInterface.ThreadSafeMessageBox(strprintf(_("An error occured while setting up the RPC port %i for listening: %s"), endpoint.port(), e.what()), + uiInterface.ThreadSafeMessageBox(strprintf(_("An error occurred while setting up the RPC port %i for listening: %s"), endpoint.port(), e.what()), _("Error"), CClientUIInterface::OK | CClientUIInterface::MODAL); StartShutdown(); return; @@ -2759,6 +2787,10 @@ static CCriticalSection cs_THREAD_RPCHANDLER; void ThreadRPCServer3(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadRPCServer3(parg)); + + // Make this thread recognisable as the RPC handler + RenameThread("bitcoin-rpchand"); + { LOCK(cs_THREAD_RPCHANDLER); vnThreadsRunning[THREAD_RPCHANDLER]++; @@ -2940,8 +2972,9 @@ void ConvertTo(Value& value) { // reinterpret string as unquoted json value Value value2; - if (!read_string(value.get_str(), value2)) - throw runtime_error("type mismatch"); + string strJSON = value.get_str(); + if (!read_string(strJSON, value2)) + throw runtime_error(string("Error parsing JSON:")+strJSON); value = value2.get_value<T>(); } else @@ -3069,7 +3102,7 @@ int CommandLineRPC(int argc, char *argv[]) int main(int argc, char *argv[]) { #ifdef _MSC_VER - // Turn off microsoft heap dump noise + // Turn off Microsoft heap dump noise _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_WARN, CreateFile("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0)); #endif diff --git a/src/crypter.cpp b/src/crypter.cpp index 4f37575a6a..411a1ee4c1 100644 --- a/src/crypter.cpp +++ b/src/crypter.cpp @@ -17,7 +17,7 @@ bool CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::v if (nRounds < 1 || chSalt.size() != WALLET_CRYPTO_SALT_SIZE) return false; - // Try to keep the keydata out of swap (and be a bit over-careful to keep the IV that we don't even use out of swap) + // Try to keep the key data out of swap (and be a bit over-careful to keep the IV that we don't even use out of swap) // Note that this does nothing about suspend-to-disk (which will put all our key data on disk) // Note as well that at no point in this program is any attempt made to prevent stealing of keys by reading the memory of the running process. mlock(&chKey[0], sizeof chKey); @@ -44,7 +44,7 @@ bool CCrypter::SetKey(const CKeyingMaterial& chNewKey, const std::vector<unsigne if (chNewKey.size() != WALLET_CRYPTO_KEY_SIZE || chNewIV.size() != WALLET_CRYPTO_KEY_SIZE) return false; - // Try to keep the keydata out of swap + // Try to keep the key data out of swap // Note that this does nothing about suspend-to-disk (which will put all our key data on disk) // Note as well that at no point in this program is any attempt made to prevent stealing of keys by reading the memory of the running process. mlock(&chKey[0], sizeof chKey); diff --git a/src/db.cpp b/src/db.cpp index e494d28e3c..5671993d37 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -42,7 +42,8 @@ void CDBEnv::EnvShutdown() { printf("EnvShutdown exception: %s (%d)\n", e.what(), e.get_errno()); } - DbEnv(0).remove(GetDataDir().string().c_str(), 0); + if (!fMockDb) + DbEnv(0).remove(GetDataDir().string().c_str(), 0); } CDBEnv::CDBEnv() : dbenv(0) @@ -103,12 +104,48 @@ bool CDBEnv::Open(boost::filesystem::path pathEnv_) return error("CDB() : error %d opening database environment", ret); fDbEnvInit = true; + fMockDb = false; return true; } +void CDBEnv::MakeMock() +{ + if (fDbEnvInit) + throw runtime_error("CDBEnv::MakeMock(): already initialized"); + + if (fShutdown) + throw runtime_error("CDBEnv::MakeMock(): during shutdown"); + + printf("CDBEnv::MakeMock()\n"); + + dbenv.set_cachesize(1, 0, 1); + dbenv.set_lg_bsize(10485760*4); + dbenv.set_lg_max(10485760); + dbenv.set_lk_max_locks(10000); + dbenv.set_lk_max_objects(10000); + dbenv.set_flags(DB_AUTO_COMMIT, 1); + dbenv.log_set_config(DB_LOG_IN_MEMORY, 1); + int ret = dbenv.open(NULL, + DB_CREATE | + DB_INIT_LOCK | + DB_INIT_LOG | + DB_INIT_MPOOL | + DB_INIT_TXN | + DB_THREAD | + DB_PRIVATE, + S_IRUSR | S_IWUSR); + if (ret > 0) + throw runtime_error(strprintf("CDBEnv::MakeMock(): error %d opening database environment", ret)); + + fDbEnvInit = true; + fMockDb = true; +} + void CDBEnv::CheckpointLSN(std::string strFile) { dbenv.txn_checkpoint(0, 0, 0); + if (fMockDb) + return; dbenv.lsn_reset(strFile.c_str(), 0); } @@ -138,8 +175,17 @@ CDB::CDB(const char *pszFile, const char* pszMode) : { pdb = new Db(&bitdb.dbenv, 0); + bool fMockDb = bitdb.IsMock(); + if (fMockDb) + { + DbMpoolFile*mpf = pdb->get_mpf(); + ret = mpf->set_flags(DB_MPOOL_NOFILE, 1); + if (ret != 0) + throw runtime_error(strprintf("CDB() : failed to configure for no temp file backing for database %s", pszFile)); + } + ret = pdb->open(NULL, // Txn pointer - pszFile, // Filename + fMockDb ? NULL : pszFile, // Filename "main", // Logical db name DB_BTREE, // Database type nFlags, // Flags @@ -337,7 +383,8 @@ void CDBEnv::Flush(bool fShutdown) dbenv.txn_checkpoint(0, 0, 0); if (!IsChainFile(strFile) || fDetachDB) { printf("%s detach\n", strFile.c_str()); - dbenv.lsn_reset(strFile.c_str(), 0); + if (!fMockDb) + dbenv.lsn_reset(strFile.c_str(), 0); } printf("%s closed\n", strFile.c_str()); mapFileUseCount.erase(mi++); @@ -35,6 +35,7 @@ class CDBEnv private: bool fDetachDB; bool fDbEnvInit; + bool fMockDb; boost::filesystem::path pathEnv; void EnvShutdown(); @@ -47,6 +48,8 @@ public: CDBEnv(); ~CDBEnv(); + void MakeMock(); + bool IsMock() { return fMockDb; }; bool Open(boost::filesystem::path pathEnv_); void Close(); void Flush(bool fShutdown); diff --git a/src/init.cpp b/src/init.cpp index 5c87af9112..3235bf5833 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -14,6 +14,7 @@ #include <boost/filesystem/convenience.hpp> #include <boost/interprocess/sync/file_lock.hpp> #include <boost/algorithm/string/predicate.hpp> +#include <openssl/crypto.h> #ifndef WIN32 #include <signal.h> @@ -53,6 +54,10 @@ void Shutdown(void* parg) { static CCriticalSection cs_Shutdown; static bool fTaken; + + // Make this thread recognisable as the shutdown thread + RenameThread("bitcoin-shutoff"); + bool fFirstThread = false; { TRY_LOCK(cs_Shutdown, lockShutdown); @@ -78,7 +83,7 @@ void Shutdown(void* parg) printf("Bitcoin exited\n\n"); fExit = true; #ifndef QT_GUI - // ensure non UI client get's exited here, but let Bitcoin-Qt reach return 0; in bitcoin.cpp + // ensure non-UI client gets exited here, but let Bitcoin-Qt reach 'return 0;' in bitcoin.cpp exit(0); #endif } @@ -212,6 +217,7 @@ bool static Bind(const CService &addr, bool fError = true) { std::string HelpMessage() { string strUsage = _("Options:") + "\n" + + " -? " + _("This help message") + "\n" + " -conf=<file> " + _("Specify configuration file (default: bitcoin.conf)") + "\n" + " -pid=<file> " + _("Specify pid file (default: bitcoind.pid)") + "\n" + " -gen " + _("Generate coins") + "\n" + @@ -259,6 +265,7 @@ std::string HelpMessage() " -debug " + _("Output extra debugging information. Implies all other -debug* options") + "\n" + " -debugnet " + _("Output extra network debugging information") + "\n" + " -logtimestamps " + _("Prepend debug output with timestamp") + "\n" + + " -shrinkdebugfile " + _("Shrink debug.log file on client startup (default: 1 when no -debug)") + "\n" + " -printtoconsole " + _("Send trace/debug info to console instead of debug.log file") + "\n" + #ifdef WIN32 " -printtodebugger " + _("Send trace/debug info to debugger") + "\n" + @@ -275,10 +282,13 @@ std::string HelpMessage() " -checkblocks=<n> " + _("How many blocks to check at startup (default: 2500, 0 = all)") + "\n" + " -checklevel=<n> " + _("How thorough the block verification is (0-6, default: 1)") + "\n" + " -loadblock=<file> " + _("Imports blocks from external blk000?.dat file") + "\n" + - " -? " + _("This help message") + "\n"; - strUsage += string() + - _("\nSSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n" + + "\n" + _("Block creation options:") + "\n" + + " -blockminsize=<n> " + _("Set minimum block size in bytes (default: 0)") + "\n" + + " -blockmaxsize=<n> " + _("Set maximum block size in bytes (default: 250000)") + "\n" + + " -blockprioritysize=<n> " + _("Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)") + "\n" + + + "\n" + _("SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n" + " -rpcssl " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n" + " -rpcsslcertificatechainfile=<file.cert> " + _("Server certificate file (default: server.cert)") + "\n" + " -rpcsslprivatekeyfile=<file.pem> " + _("Server private key (default: server.pem)") + "\n" + @@ -294,12 +304,12 @@ bool AppInit2() { // ********************************************************* Step 1: setup #ifdef _MSC_VER - // Turn off microsoft heap dump noise + // Turn off Microsoft heap dump noise _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_WARN, CreateFileA("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0)); #endif #if _MSC_VER >= 1400 - // Disable confusing "helpful" text message on abort, ctrl-c + // Disable confusing "helpful" text message on abort, Ctrl-C _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); #endif #ifndef WIN32 @@ -407,7 +417,7 @@ bool AppInit2() if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee)) return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s'"), mapArgs["-paytxfee"].c_str())); if (nTransactionFee > 0.25 * COIN) - InitWarning(_("Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction.")); + InitWarning(_("Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.")); } // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log @@ -442,10 +452,11 @@ bool AppInit2() } #endif - if (!fDebug) + if (GetBoolArg("-shrinkdebugfile", !fDebug)) ShrinkDebugFile(); printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); printf("Bitcoin version %s (%s)\n", FormatFullVersion().c_str(), CLIENT_DATE.c_str()); + printf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION)); printf("Startup time: %s\n", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str()); printf("Default data directory %s\n", GetDefaultDataDir().string().c_str()); printf("Used data directory %s\n", GetDataDir().string().c_str()); diff --git a/src/irc.cpp b/src/irc.cpp index 185be02f29..50c6a5b4db 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -189,6 +189,10 @@ bool GetIPFromIRC(SOCKET hSocket, string strMyName, CNetAddr& ipRet) void ThreadIRCSeed(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadIRCSeed(parg)); + + // Make this thread recognisable as the IRC seeding thread + RenameThread("bitcoin-ircseed"); + try { ThreadIRCSeed2(parg); @@ -203,7 +207,7 @@ void ThreadIRCSeed(void* parg) void ThreadIRCSeed2(void* parg) { - /* Dont advertise on IRC if we don't allow incoming connections */ + /* Don't advertise on IRC if we don't allow incoming connections */ if (mapArgs.count("-connect") || fNoListen) return; diff --git a/src/key.cpp b/src/key.cpp index c943a38ea6..76c45d0635 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -48,7 +48,7 @@ err: // Perform ECDSA key recovery (see SEC1 4.1.6) for curves over (mod p)-fields // recid selects which key is recovered -// if check is nonzero, additional checks are performed +// if check is non-zero, additional checks are performed int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned char *msg, int msglen, int recid, int check) { if (!eckey) return 0; diff --git a/src/main.cpp b/src/main.cpp index e56a163199..23c6d988aa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -564,7 +564,7 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, // Continuously rate-limit free transactions // This mitigates 'penny-flooding' -- sending thousands of free transactions just to - // be annoying or make other's transactions take longer to confirm. + // be annoying or make others' transactions take longer to confirm. if (nFees < MIN_RELAY_TX_FEE) { static CCriticalSection cs; @@ -653,6 +653,15 @@ bool CTxMemPool::remove(CTransaction &tx) return true; } +void +CTxMemPool::clear() +{ + LOCK(cs); + mapTx.clear(); + mapNextTx.clear(); + ++nTransactionsUpdated; +} + void CTxMemPool::queryHashes(std::vector<uint256>& vtxid) { vtxid.clear(); @@ -846,7 +855,7 @@ int64 static GetBlockValue(int nHeight, int64 nFees) { int64 nSubsidy = 50 * COIN; - // Subsidy is cut in half every 4 years + // Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years nSubsidy >>= (nHeight / 210000); return nSubsidy + nFees; @@ -997,7 +1006,7 @@ void static InvalidChainFound(CBlockIndex* pindexNew) hashBestChain.ToString().substr(0,20).c_str(), nBestHeight, bnBestChainWork.ToString().c_str(), DateTimeStrFormat("%x %H:%M:%S", pindexBest->GetBlockTime()).c_str()); if (pindexBest && bnBestInvalidWork > bnBestChainWork + pindexBest->GetBlockWork() * 6) - printf("InvalidChainFound: WARNING: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.\n"); + printf("InvalidChainFound: Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.\n"); } void CBlock::UpdateTime(const CBlockIndex* pindexPrev) @@ -1048,7 +1057,7 @@ bool CTransaction::DisconnectInputs(CTxDB& txdb) // Remove transaction from index // This can fail if a duplicate of this transaction was in a chain that got // reorganized away. This is only possible if this transaction was completely - // spent, so erasing it would be a no-op anway. + // spent, so erasing it would be a no-op anyway. txdb.EraseTxIndex(*this); return true; @@ -1111,7 +1120,7 @@ bool CTransaction::FetchInputs(CTxDB& txdb, const map<uint256, CTxIndex>& mapTes } } - // Make sure all prevout.n's are valid: + // Make sure all prevout.n indexes are valid: for (unsigned int i = 0; i < vin.size(); i++) { const COutPoint prevout = vin[i].prevout; @@ -1334,10 +1343,10 @@ bool CBlock::DisconnectBlock(CTxDB& txdb, CBlockIndex* pindex) return true; } -bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) +bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck) { // Check it again in case a previous version let a bad block in - if (!CheckBlock()) + if (!CheckBlock(!fJustCheck, !fJustCheck)) return false; // Do not allow blocks that contain transactions which 'overwrite' older transactions, @@ -1347,7 +1356,7 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) // being sent to another address. // See BIP30 and http://r6.ca/blog/20120206T005236Z.html for more information. // This logic is not necessary for memory pool transactions, as AcceptToMemoryPool - // already refuses previously-known transaction id's entirely. + // already refuses previously-known transaction ids entirely. // This rule applies to all blocks whose timestamp is after March 15, 2012, 0:00 UTC. int64 nBIP30SwitchTime = 1331769600; bool fEnforceBIP30 = (pindex->nTime > nBIP30SwitchTime); @@ -1357,7 +1366,13 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) bool fStrictPayToScriptHash = (pindex->nTime >= nBIP16SwitchTime); //// issue here: it doesn't know the version - unsigned int nTxPos = pindex->nBlockPos + ::GetSerializeSize(CBlock(), SER_DISK, CLIENT_VERSION) - 1 + GetSizeOfCompactSize(vtx.size()); + unsigned int nTxPos; + if (fJustCheck) + // FetchInputs treats CDiskTxPos(1,1,1) as a special "refer to memorypool" indicator + // Since we're just checking the block and not actually connecting it, it might not (and probably shouldn't) be on the disk to get the transaction from + nTxPos = 1; + else + nTxPos = pindex->nBlockPos + ::GetSerializeSize(CBlock(), SER_DISK, CLIENT_VERSION) - 1 + GetSizeOfCompactSize(vtx.size()); map<uint256, CTxIndex> mapQueuedChanges; int64 nFees = 0; @@ -1380,7 +1395,8 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) return DoS(100, error("ConnectBlock() : too many sigops")); CDiskTxPos posThisTx(pindex->nFile, pindex->nBlockPos, nTxPos); - nTxPos += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION); + if (!fJustCheck) + nTxPos += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION); MapPrevTx mapInputs; if (!tx.IsCoinBase()) @@ -1408,6 +1424,12 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) mapQueuedChanges[hashTx] = CTxIndex(posThisTx, tx.vout.size()); } + if (vtx[0].GetValueOut() > GetBlockValue(pindex->nHeight, nFees)) + return false; + + if (fJustCheck) + return true; + // Write queued txindex changes for (map<uint256, CTxIndex>::iterator mi = mapQueuedChanges.begin(); mi != mapQueuedChanges.end(); ++mi) { @@ -1415,9 +1437,6 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) return error("ConnectBlock() : UpdateTxIndex failed"); } - if (vtx[0].GetValueOut() > GetBlockValue(pindex->nHeight, nFees)) - return false; - // Update block index on disk without changing it in memory. // The memory index structure will be changed after the db commits. if (pindex->pprev) @@ -1603,7 +1622,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) return error("SetBestChain() : Reorganize failed"); } - // Connect futher blocks + // Connect further blocks BOOST_REVERSE_FOREACH(CBlockIndex *pindex, vpindexSecondary) { CBlock block; @@ -1657,7 +1676,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) printf("SetBestChain: %d of last 100 blocks above version %d\n", nUpgraded, CBlock::CURRENT_VERSION); if (nUpgraded > 100/2) // strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user: - strMiscWarning = _("Warning: this version is obsolete, upgrade required"); + strMiscWarning = _("Warning: This version is obsolete, upgrade required!"); } std::string strCmd = GetArg("-blocknotify", ""); @@ -1722,7 +1741,7 @@ bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos) -bool CBlock::CheckBlock() const +bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot) const { // These are checks that are independent of context // that can be verified before saving an orphan block. @@ -1732,7 +1751,7 @@ bool CBlock::CheckBlock() const return DoS(100, error("CheckBlock() : size limits failed")); // Check proof of work matches claimed amount - if (!CheckProofOfWork(GetHash(), nBits)) + if (fCheckPOW && !CheckProofOfWork(GetHash(), nBits)) return DoS(50, error("CheckBlock() : proof of work failed")); // Check timestamp @@ -1769,8 +1788,8 @@ bool CBlock::CheckBlock() const if (nSigOps > MAX_BLOCK_SIGOPS) return DoS(100, error("CheckBlock() : out-of-bounds SigOpCount")); - // Check merkleroot - if (hashMerkleRoot != BuildMerkleTree()) + // Check merkle root + if (fCheckMerkleRoot && hashMerkleRoot != BuildMerkleTree()) return DoS(100, error("CheckBlock() : hashMerkleRoot mismatch")); return true; @@ -1805,7 +1824,7 @@ bool CBlock::AcceptBlock() // Check that the block chain matches the known block chain up to a checkpoint if (!Checkpoints::CheckBlock(nHeight, hash)) - return DoS(100, error("AcceptBlock() : rejected by checkpoint lockin at %d", nHeight)); + return DoS(100, error("AcceptBlock() : rejected by checkpoint lock-in at %d", nHeight)); // Write block to history file if (!CheckDiskSpace(::GetSerializeSize(*this, SER_DISK, CLIENT_VERSION))) @@ -1923,7 +1942,7 @@ bool CheckDiskSpace(uint64 nAdditionalBytes) if (nFreeBytesAvailable < nMinDiskSpace + nAdditionalBytes) { fShutdown = true; - string strMessage = _("Warning: Disk space is low"); + string strMessage = _("Warning: Disk space is low!"); strMiscWarning = strMessage; printf("*** %s\n", strMessage.c_str()); uiInterface.ThreadSafeMessageBox(strMessage, "Bitcoin", CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); @@ -1963,7 +1982,7 @@ FILE* AppendBlockFile(unsigned int& nFileRet) return NULL; if (fseek(file, 0, SEEK_END) != 0) return NULL; - // FAT32 filesize max 4GB, fseek and ftell max 2GB, so we must stay under 2GB + // FAT32 file size max 4GB, fseek and ftell max 2GB, so we must stay under 2GB if (ftell(file) < 0x7F000000 - MAX_SIZE) { nFileRet = nCurrentBlockFile; @@ -1978,10 +1997,10 @@ bool LoadBlockIndex(bool fAllowNew) { if (fTestNet) { - pchMessageStart[0] = 0xfa; - pchMessageStart[1] = 0xbf; - pchMessageStart[2] = 0xb5; - pchMessageStart[3] = 0xda; + pchMessageStart[0] = 0x0b; + pchMessageStart[1] = 0x11; + pchMessageStart[2] = 0x09; + pchMessageStart[3] = 0x07; hashGenesisBlock = uint256("000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"); } @@ -2055,7 +2074,7 @@ bool LoadBlockIndex(bool fAllowNew) void PrintBlockTree() { - // precompute tree structure + // pre-compute tree structure map<CBlockIndex*, vector<CBlockIndex*> > mapNext; for (map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi) { @@ -2108,7 +2127,7 @@ void PrintBlockTree() PrintWallets(block); - // put the main timechain first + // put the main time-chain first vector<CBlockIndex*>& vNext = mapNext[pindex]; for (unsigned int i = 0; i < vNext.size(); i++) { @@ -2218,7 +2237,7 @@ string GetWarnings(string strFor) if (pindexBest && bnBestInvalidWork > bnBestChainWork + pindexBest->GetBlockWork() * 6) { nPriority = 2000; - strStatusBar = strRPC = "WARNING: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade."; + strStatusBar = strRPC = _("Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade."); } // Alerts @@ -2347,7 +2366,7 @@ bool static AlreadyHave(CTxDB& txdb, const CInv& inv) // The message start string is designed to be unlikely to occur in normal data. -// The characters are rarely used upper ascii, not valid as UTF-8, and produce +// The characters are rarely used upper ASCII, not valid as UTF-8, and produce // a large 4-byte int at any alignment. unsigned char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 }; @@ -3030,12 +3049,12 @@ bool ProcessMessages(CNode* pfrom) { if (strstr(e.what(), "end of data")) { - // Allow exceptions from underlength message on vRecv + // Allow exceptions from under-length message on vRecv printf("ProcessMessages(%s, %u bytes) : Exception '%s' caught, normally caused by a message being shorter than its stated length\n", strCommand.c_str(), nMessageSize, e.what()); } else if (strstr(e.what(), "size too large")) { - // Allow exceptions from overlong size + // Allow exceptions from over-long size printf("ProcessMessages(%s, %u bytes) : Exception '%s' caught\n", strCommand.c_str(), nMessageSize, e.what()); } else @@ -3284,9 +3303,9 @@ unsigned int static ScanHash_CryptoPP(char* pmidstate, char* pdata, char* phash1 unsigned int& nNonce = *(unsigned int*)(pdata + 12); for (;;) { - // Crypto++ SHA-256 + // Crypto++ SHA256 // Hash pdata using pmidstate as the starting state into - // preformatted buffer phash1, then hash phash1 into phash + // pre-formatted buffer phash1, then hash phash1 into phash nNonce++; SHA256Transform(phash1, pdata, pmidstate); SHA256Transform(phash, phash1, pSHA256InitState); @@ -3312,16 +3331,18 @@ public: CTransaction* ptx; set<uint256> setDependsOn; double dPriority; + double dFeePerKb; COrphan(CTransaction* ptxIn) { ptx = ptxIn; - dPriority = 0; + dPriority = dFeePerKb = 0; } void print() const { - printf("COrphan(hash=%s, dPriority=%.1f)\n", ptx->GetHash().ToString().substr(0,10).c_str(), dPriority); + printf("COrphan(hash=%s, dPriority=%.1f, dFeePerKb=%.1f)\n", + ptx->GetHash().ToString().substr(0,10).c_str(), dPriority, dFeePerKb); BOOST_FOREACH(uint256 hash, setDependsOn) printf(" setDependsOn %s\n", hash.ToString().substr(0,10).c_str()); } @@ -3331,6 +3352,33 @@ public: uint64 nLastBlockTx = 0; uint64 nLastBlockSize = 0; +// We want to sort transactions by priority and fee, so: +typedef boost::tuple<double, double, CTransaction*> TxPriority; +class TxPriorityCompare +{ + bool byFee; +public: + TxPriorityCompare(bool _byFee) : byFee(_byFee) { } + bool operator()(const TxPriority& a, const TxPriority& b) + { + if (byFee) + { + if (a.get<1>() == b.get<1>()) + return a.get<0>() < b.get<0>(); + return a.get<1>() < b.get<1>(); + } + else + { + if (a.get<0>() == b.get<0>()) + return a.get<1>() < b.get<1>(); + return a.get<0>() < b.get<0>(); + } + } +}; + +const char* pszDummy = "\0\0"; +CScript scriptDummy(std::vector<unsigned char>(pszDummy, pszDummy + sizeof(pszDummy))); + CBlock* CreateNewBlock(CReserveKey& reservekey) { CBlockIndex* pindexPrev = pindexBest; @@ -3350,6 +3398,30 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) // Add our coinbase tx as first transaction pblock->vtx.push_back(txNew); + // Largest block you're willing to create: + unsigned int nBlockMaxSize = GetArg("-blockmaxsize", MAX_BLOCK_SIZE_GEN/2); + // Limit to betweeen 1K and MAX_BLOCK_SIZE-1K for sanity: + nBlockMaxSize = std::max((unsigned int)1000, std::min((unsigned int)(MAX_BLOCK_SIZE-1000), nBlockMaxSize)); + + // How much of the block should be dedicated to high-priority transactions, + // included regardless of the fees they pay + unsigned int nBlockPrioritySize = GetArg("-blockprioritysize", 27000); + nBlockPrioritySize = std::min(nBlockMaxSize, nBlockPrioritySize); + + // Minimum block size you want to create; block will be filled with free transactions + // until there are no more or the block reaches this size: + unsigned int nBlockMinSize = GetArg("-blockminsize", 0); + nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize); + + // Fee-per-kilobyte amount considered the same as "free" + // Be careful setting this: if you set it to zero then + // a transaction spammer can cheaply fill blocks using + // 1-satoshi-fee transactions. It should be set above the real + // cost to you of processing a transaction. + int64 nMinTxFee = MIN_TX_FEE; + if (mapArgs.count("-mintxfee")) + ParseMoney(mapArgs["-mintxfee"], nMinTxFee); + // Collect memory pool transactions into the block int64 nFees = 0; { @@ -3359,7 +3431,10 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) // Priority order to process transactions list<COrphan> vOrphan; // list memory doesn't move map<uint256, vector<COrphan*> > mapDependers; - multimap<double, CTransaction*> mapPriority; + + // This vector will be sorted into a priority queue: + vector<TxPriority> vecPriority; + vecPriority.reserve(mempool.mapTx.size()); for (map<uint256, CTransaction>::iterator mi = mempool.mapTx.begin(); mi != mempool.mapTx.end(); ++mi) { CTransaction& tx = (*mi).second; @@ -3368,6 +3443,8 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) COrphan* porphan = NULL; double dPriority = 0; + int64 nTotalIn = 0; + bool fMissingInputs = false; BOOST_FOREACH(const CTxIn& txin, tx.vin) { // Read prev transaction @@ -3375,6 +3452,19 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) CTxIndex txindex; if (!txPrev.ReadFromDisk(txdb, txin.prevout, txindex)) { + // This should never happen; all transactions in the memory + // pool should connect to either transactions in the chain + // or other transactions in the memory pool. + if (!mempool.mapTx.count(txin.prevout.hash)) + { + printf("ERROR: mempool transaction missing input\n"); + if (fDebug) assert("mempool transaction missing input" == 0); + fMissingInputs = true; + if (porphan) + vOrphan.pop_back(); + break; + } + // Has to wait for dependencies if (!porphan) { @@ -3384,34 +3474,33 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) } mapDependers[txin.prevout.hash].push_back(porphan); porphan->setDependsOn.insert(txin.prevout.hash); + nTotalIn += mempool.mapTx[txin.prevout.hash].vout[txin.prevout.n].nValue; continue; } int64 nValueIn = txPrev.vout[txin.prevout.n].nValue; + nTotalIn += nValueIn; - // Read block header int nConf = txindex.GetDepthInMainChain(); - dPriority += (double)nValueIn * nConf; - - if (fDebug && GetBoolArg("-printpriority")) - printf("priority nValueIn=%-12"PRI64d" nConf=%-5d dPriority=%-20.1f\n", nValueIn, nConf, dPriority); } + if (fMissingInputs) continue; // Priority is sum(valuein * age) / txsize - dPriority /= ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); + unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); + dPriority /= nTxSize; - if (porphan) - porphan->dPriority = dPriority; - else - mapPriority.insert(make_pair(-dPriority, &(*mi).second)); + // This is a more accurate fee-per-kilobyte than is used by the client code, because the + // client code rounds up the size to the nearest 1K. That's good, because it gives an + // incentive to create smaller transactions. + double dFeePerKb = double(nTotalIn-tx.GetValueOut()) / (double(nTxSize)/1000.0); - if (fDebug && GetBoolArg("-printpriority")) + if (porphan) { - printf("priority %-20.1f %s\n%s", dPriority, tx.GetHash().ToString().substr(0,10).c_str(), tx.ToString().c_str()); - if (porphan) - porphan->print(); - printf("\n"); + porphan->dPriority = dPriority; + porphan->dFeePerKb = dFeePerKb; } + else + vecPriority.push_back(TxPriority(dPriority, dFeePerKb, &(*mi).second)); } // Collect transactions into block @@ -3419,16 +3508,24 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) uint64 nBlockSize = 1000; uint64 nBlockTx = 0; int nBlockSigOps = 100; - while (!mapPriority.empty()) + bool fSortedByFee = (nBlockPrioritySize <= 0); + + TxPriorityCompare comparer(fSortedByFee); + std::make_heap(vecPriority.begin(), vecPriority.end(), comparer); + + while (!vecPriority.empty()) { - // Take highest priority transaction off priority queue - double dPriority = -(*mapPriority.begin()).first; - CTransaction& tx = *(*mapPriority.begin()).second; - mapPriority.erase(mapPriority.begin()); + // Take highest priority transaction off the priority queue: + double dPriority = vecPriority.front().get<0>(); + double dFeePerKb = vecPriority.front().get<1>(); + CTransaction& tx = *(vecPriority.front().get<2>()); + + std::pop_heap(vecPriority.begin(), vecPriority.end(), comparer); + vecPriority.pop_back(); // Size limits unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); - if (nBlockSize + nTxSize >= MAX_BLOCK_SIZE_GEN) + if (nBlockSize + nTxSize >= nBlockMaxSize) continue; // Legacy limits on sigOps: @@ -3436,9 +3533,19 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) continue; - // Transaction fee required depends on block size - bool fAllowFree = (nBlockSize + nTxSize < 4000 || CTransaction::AllowFree(dPriority)); - int64 nMinFee = tx.GetMinFee(nBlockSize, fAllowFree, GMF_BLOCK); + // Skip free transactions if we're past the minimum block size: + if (fSortedByFee && (dFeePerKb < nMinTxFee) && (nBlockSize + nTxSize >= nBlockMinSize)) + continue; + + // Prioritize by fee once past the priority size or we run out of high-priority + // transactions: + if (!fSortedByFee && + ((nBlockSize + nTxSize >= nBlockPrioritySize) || (dPriority < COIN * 144 / 250))) + { + fSortedByFee = true; + comparer = TxPriorityCompare(fSortedByFee); + std::make_heap(vecPriority.begin(), vecPriority.end(), comparer); + } // Connecting shouldn't fail due to dependency on other memory pool transactions // because we're already processing them in order of dependency @@ -3449,8 +3556,6 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) continue; int64 nTxFees = tx.GetValueIn(mapInputs)-tx.GetValueOut(); - if (nTxFees < nMinFee) - continue; nTxSigOps += tx.GetP2SHSigOpCount(mapInputs); if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) @@ -3468,6 +3573,12 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) nBlockSigOps += nTxSigOps; nFees += nTxFees; + if (fDebug && GetBoolArg("-printpriority")) + { + printf("priority %.1f feeperkb %.1f txid %s\n", + dPriority, dFeePerKb, tx.GetHash().ToString().c_str()); + } + // Add transactions that depend on this one to the priority queue uint256 hash = tx.GetHash(); if (mapDependers.count(hash)) @@ -3478,7 +3589,10 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) { porphan->setDependsOn.erase(hash); if (porphan->setDependsOn.empty()) - mapPriority.insert(make_pair(-porphan->dPriority, porphan->ptx)); + { + vecPriority.push_back(TxPriority(porphan->dPriority, porphan->dFeePerKb, porphan->ptx)); + std::push_heap(vecPriority.begin(), vecPriority.end(), comparer); + } } } } @@ -3488,16 +3602,22 @@ CBlock* CreateNewBlock(CReserveKey& reservekey) nLastBlockSize = nBlockSize; printf("CreateNewBlock(): total size %lu\n", nBlockSize); - } pblock->vtx[0].vout[0].nValue = GetBlockValue(pindexPrev->nHeight+1, nFees); // Fill in header pblock->hashPrevBlock = pindexPrev->GetBlockHash(); - pblock->hashMerkleRoot = pblock->BuildMerkleTree(); pblock->UpdateTime(pindexPrev); pblock->nBits = GetNextWorkRequired(pindexPrev, pblock.get()); pblock->nNonce = 0; + pblock->vtx[0].vin[0].scriptSig = scriptDummy; + CBlockIndex indexDummy(1, 1, *pblock); + indexDummy.pprev = pindexPrev; + indexDummy.nHeight = pindexPrev->nHeight + 1; + if (!pblock->ConnectBlock(txdb, &indexDummy, true)) + throw std::runtime_error("CreateNewBlock() : ConnectBlock failed"); + } + return pblock.release(); } @@ -3522,7 +3642,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1) { // - // Prebuild hash buffers + // Pre-build hash buffers // struct { @@ -3613,6 +3733,9 @@ void static BitcoinMiner(CWallet *pwallet) printf("BitcoinMiner started\n"); SetThreadPriority(THREAD_PRIORITY_LOWEST); + // Make this thread recognisable as the mining thread + RenameThread("bitcoin-miner"); + // Each thread has its own key and counter CReserveKey reservekey(pwallet); unsigned int nExtraNonce = 0; @@ -3642,11 +3765,12 @@ void static BitcoinMiner(CWallet *pwallet) return; IncrementExtraNonce(pblock.get(), pindexPrev, nExtraNonce); - printf("Running BitcoinMiner with %d transactions in block\n", pblock->vtx.size()); + printf("Running BitcoinMiner with %d transactions in block (%u bytes)\n", pblock->vtx.size(), + ::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION)); // - // Prebuild hash buffers + // Pre-build hash buffers // char pmidstatebuf[32+16]; char* pmidstate = alignup<16>(pmidstatebuf); char pdatabuf[128+16]; char* pdata = alignup<16>(pdatabuf); @@ -3671,7 +3795,7 @@ void static BitcoinMiner(CWallet *pwallet) unsigned int nHashesDone = 0; unsigned int nNonceFound; - // Crypto++ SHA-256 + // Crypto++ SHA256 nNonceFound = ScanHash_CryptoPP(pmidstate, pdata + 64, phash1, (char*)&hash, nHashesDone); diff --git a/src/main.h b/src/main.h index d7b8cc4613..688af076b8 100644 --- a/src/main.h +++ b/src/main.h @@ -553,7 +553,7 @@ public: if (nBlockSize == 1) { // Transactions under 10K are free - // (about 4500bc if made of 50bc inputs) + // (about 4500 BTC if made of 50 BTC inputs) if (nBytes < 10000) nMinFee = 0; } @@ -1017,11 +1017,11 @@ public: bool DisconnectBlock(CTxDB& txdb, CBlockIndex* pindex); - bool ConnectBlock(CTxDB& txdb, CBlockIndex* pindex); + bool ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck=false); bool ReadFromDisk(const CBlockIndex* pindex, bool fReadTransactions=true); bool SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew); bool AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos); - bool CheckBlock() const; + bool CheckBlock(bool fCheckPOW=true, bool fCheckMerkleRoot=true) const; bool AcceptBlock(); private: @@ -1607,6 +1607,7 @@ public: bool fCheckInputs, bool* pfMissingInputs); bool addUnchecked(const uint256& hash, CTransaction &tx); bool remove(CTransaction &tx); + void clear(); void queryHashes(std::vector<uint256>& vtxid); unsigned long size() diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index 6cd464266d..fc22bb76ee 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -1,6 +1,6 @@ # Copyright (c) 2009-2010 Satoshi Nakamoto # Distributed under the MIT/X11 software license, see the accompanying -# file license.txt or http://www.opensource.org/licenses/mit-license.php. +# file COPYING or http://www.opensource.org/licenses/mit-license.php. DEPSDIR:=/usr/i586-mingw32msvc diff --git a/src/makefile.mingw b/src/makefile.mingw index c270d4599a..47637f0bc6 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -1,18 +1,18 @@ # Copyright (c) 2009-2010 Satoshi Nakamoto # Distributed under the MIT/X11 software license, see the accompanying -# file license.txt or http://www.opensource.org/licenses/mit-license.php. +# file COPYING or http://www.opensource.org/licenses/mit-license.php. USE_UPNP:=0 INCLUDEPATHS= \ -I"C:\boost-1.49.0-mgw" \ -I"C:\db-4.8.30.NC-mgw\build_unix" \ - -I"C:\openssl-1.0.0d-mgw\include" + -I"C:\openssl-1.0.1b-mgw\include" LIBPATHS= \ -L"C:\boost-1.49.0-mgw\stage\lib" \ -L"C:\db-4.8.30.NC-mgw\build_unix" \ - -L"C:\openssl-1.0.0d-mgw" + -L"C:\openssl-1.0.1b-mgw" LIBS= \ -l boost_system-mgw45-mt-s-1_49 \ diff --git a/src/makefile.osx b/src/makefile.osx index f9f28267be..d64bed5617 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -1,7 +1,7 @@ # -*- mode: Makefile; -*- # Copyright (c) 2011 Bitcoin Developers # Distributed under the MIT/X11 software license, see the accompanying -# file license.txt or http://www.opensource.org/licenses/mit-license.php. +# file COPYING or http://www.opensource.org/licenses/mit-license.php. # Mac OS X makefile for bitcoin # Originally by Laszlo Hanyecz (solar@heliacal.net) diff --git a/src/makefile.unix b/src/makefile.unix index 2784335a20..857f44531e 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -1,6 +1,6 @@ # Copyright (c) 2009-2010 Satoshi Nakamoto # Distributed under the MIT/X11 software license, see the accompanying -# file license.txt or http://www.opensource.org/licenses/mit-license.php. +# file COPYING or http://www.opensource.org/licenses/mit-license.php. USE_UPNP:=0 @@ -66,13 +66,14 @@ LIBS+= \ # Make some important things such as the global offset table read only as soon as # the dynamic linker is finished building it. This will prevent overwriting of addresses # which would later be jumped to. - HARDENING+=-Wl,-z,relro -Wl,-z,now + LDHARDENING+=-Wl,-z,relro -Wl,-z,now # Build position independent code to take advantage of Address Space Layout Randomization # offered by some kernels. # see doc/build-unix.txt for more information. ifdef PIE - HARDENING+=-fPIE -pie + HARDENING+=-fPIE + LDHARDENING+=-pie endif # -D_FORTIFY_SOURCE=2 does some checking for potentially exploitable code patterns in @@ -88,6 +89,10 @@ DEBUGFLAGS=-g xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) +# LDFLAGS can be specified on the make command line, so we use xLDFLAGS that only +# adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work. +xLDFLAGS=$(LDHARDENING) $(LDFLAGS) + OBJS= \ obj/version.o \ obj/checkpoints.o \ @@ -133,7 +138,7 @@ obj/%.o: %.cpp rm -f $(@:%.o=%.d) bitcoind: $(OBJS:obj/%=obj/%) - $(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) + $(CXX) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) @@ -145,7 +150,7 @@ obj-test/%.o: test/%.cpp rm -f $(@:%.o=%.d) test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) - $(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS) + $(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(xLDFLAGS) $(LIBS) clean: -rm -f bitcoind test_bitcoin diff --git a/src/net.cpp b/src/net.cpp index e10829aca3..1c87eb9685 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -357,7 +357,7 @@ bool GetMyExternalIP(CNetAddr& ipRet) { // We should be phasing out our use of sites like these. If we need // replacements, we should ask for volunteers to put this simple - // php file on their webserver that prints the client IP: + // php file on their web server that prints the client IP: // <?php echo $_SERVER["REMOTE_ADDR"]; ?> if (nHost == 1) { @@ -407,6 +407,9 @@ bool GetMyExternalIP(CNetAddr& ipRet) void ThreadGetMyExternalIP(void* parg) { + // Make this thread recognisable as the external IP detection thread + RenameThread("bitcoin-ext-ip"); + CNetAddr addrLocalHost; if (GetMyExternalIP(addrLocalHost)) { @@ -494,14 +497,14 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) /// debug print printf("connected %s\n", pszDest ? pszDest : addrConnect.ToString().c_str()); - // Set to nonblocking + // Set to non-blocking #ifdef WIN32 u_long nOne = 1; if (ioctlsocket(hSocket, FIONBIO, &nOne) == SOCKET_ERROR) - printf("ConnectSocket() : ioctlsocket nonblocking setting failed, error %d\n", WSAGetLastError()); + printf("ConnectSocket() : ioctlsocket non-blocking setting failed, error %d\n", WSAGetLastError()); #else if (fcntl(hSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR) - printf("ConnectSocket() : fcntl nonblocking setting failed, error %d\n", errno); + printf("ConnectSocket() : fcntl non-blocking setting failed, error %d\n", errno); #endif // Add node @@ -586,7 +589,7 @@ bool CNode::Misbehaving(int howmuch) { if (addr.IsLocal()) { - printf("Warning: local node %s misbehaving\n", addrName.c_str()); + printf("Warning: Local node %s misbehaving (delta: %d)!\n", addrName.c_str(), howmuch); return false; } @@ -594,15 +597,16 @@ bool CNode::Misbehaving(int howmuch) if (nMisbehavior >= GetArg("-banscore", 100)) { int64 banTime = GetTime()+GetArg("-bantime", 60*60*24); // Default 24-hour ban + printf("Misbehaving: %s (%d -> %d) DISCONNECTING\n", addr.ToString().c_str(), nMisbehavior-howmuch, nMisbehavior); { LOCK(cs_setBanned); if (setBanned[addr] < banTime) setBanned[addr] = banTime; } CloseSocketDisconnect(); - printf("Disconnected %s for misbehavior (score=%d)\n", addrName.c_str(), nMisbehavior); return true; - } + } else + printf("Misbehaving: %s (%d -> %d)\n", addr.ToString().c_str(), nMisbehavior-howmuch, nMisbehavior); return false; } @@ -636,6 +640,10 @@ void CNode::copyStats(CNodeStats &stats) void ThreadSocketHandler(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadSocketHandler(parg)); + + // Make this thread recognisable as the networking thread + RenameThread("bitcoin-net"); + try { vnThreadsRunning[THREAD_SOCKETHANDLER]++; @@ -804,7 +812,7 @@ void ThreadSocketHandler2(void* parg) if (hSocket != INVALID_SOCKET) if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr)) - printf("warning: unknown socket family\n"); + printf("Warning: Unknown socket family\n"); { LOCK(cs_vNodes); @@ -988,6 +996,10 @@ void ThreadSocketHandler2(void* parg) void ThreadMapPort(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadMapPort(parg)); + + // Make this thread recognisable as the UPnP thread + RenameThread("bitcoin-UPnP"); + try { vnThreadsRunning[THREAD_UPNP]++; @@ -1137,15 +1149,19 @@ void MapPort() // The first name is used as information source for addrman. // The second name should resolve to a list of seed addresses. static const char *strDNSSeed[][2] = { - {"xf2.org", "bitseed.xf2.org"}, - {"bluematt.me", "dnsseed.bluematt.me"}, {"bitcoin.sipa.be", "seed.bitcoin.sipa.be"}, + {"bluematt.me", "dnsseed.bluematt.me"}, {"dashjr.org", "dnsseed.bitcoin.dashjr.org"}, + {"xf2.org", "bitseed.xf2.org"}, }; void ThreadDNSAddressSeed(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadDNSAddressSeed(parg)); + + // Make this thread recognisable as the DNS seeding thread + RenameThread("bitcoin-dnsseed"); + try { vnThreadsRunning[THREAD_DNSSEED]++; @@ -1315,6 +1331,10 @@ void ThreadDumpAddress2(void* parg) void ThreadDumpAddress(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadDumpAddress(parg)); + + // Make this thread recognisable as the address dumping thread + RenameThread("bitcoin-adrdump"); + try { ThreadDumpAddress2(parg); @@ -1328,6 +1348,10 @@ void ThreadDumpAddress(void* parg) void ThreadOpenConnections(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadOpenConnections(parg)); + + // Make this thread recognisable as the connection opening thread + RenameThread("bitcoin-opencon"); + try { vnThreadsRunning[THREAD_OPENCONNECTIONS]++; @@ -1481,6 +1505,10 @@ void ThreadOpenConnections2(void* parg) void ThreadOpenAddedConnections(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadOpenAddedConnections(parg)); + + // Make this thread recognisable as the connection opening thread + RenameThread("bitcoin-opencon"); + try { vnThreadsRunning[THREAD_ADDEDCONNECTIONS]++; @@ -1568,7 +1596,7 @@ void ThreadOpenAddedConnections2(void* parg) } } -// if succesful, this moves the passed grant to the constructed node +// if successful, this moves the passed grant to the constructed node bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound, const char *strDest, bool fOneShot) { // @@ -1610,6 +1638,10 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu void ThreadMessageHandler(void* parg) { IMPLEMENT_RANDOMIZE_STACK(ThreadMessageHandler(parg)); + + // Make this thread recognisable as the message handling thread + RenameThread("bitcoin-msghand"); + try { vnThreadsRunning[THREAD_MESSAGEHANDLER]++; @@ -1741,7 +1773,7 @@ bool BindListenPort(const CService &addrBind, string& strError) #ifdef WIN32 - // Set to nonblocking, incoming connections will also inherit this + // Set to non-blocking, incoming connections will also inherit this if (ioctlsocket(hListenSocket, FIONBIO, (u_long*)&nOne) == SOCKET_ERROR) #else if (fcntl(hListenSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR) @@ -1802,7 +1834,7 @@ void static Discover() return; #ifdef WIN32 - // Get local host ip + // Get local host IP char pszHostName[1000] = ""; if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR) { @@ -1847,11 +1879,16 @@ void static Discover() } #endif - CreateThread(ThreadGetMyExternalIP, NULL); + // Don't use external IPv4 discovery, when -onlynet="IPv6" + if (!IsLimited(NET_IPV4)) + CreateThread(ThreadGetMyExternalIP, NULL); } void StartNode(void* parg) { + // Make this thread recognisable as the startup thread + RenameThread("bitcoin-start"); + if (semOutbound == NULL) { // initialize semaphore int nMaxOutbound = min(MAX_OUTBOUND_CONNECTIONS, (int)GetArg("-maxconnections", 125)); @@ -49,7 +49,7 @@ enum LOCAL_BIND, // address explicit bound to LOCAL_UPNP, // address reported by UPnP LOCAL_IRC, // address reported by IRC (deprecated) - LOCAL_HTTP, // address reported by whatismyip.com and similars + LOCAL_HTTP, // address reported by whatismyip.com and similar LOCAL_MANUAL, // address explicitly specified (-externalip=) LOCAL_MAX @@ -181,7 +181,7 @@ protected: int nRefCount; // Denial-of-service detection/prevention - // Key is ip address, value is banned-until-time + // Key is IP address, value is banned-until-time static std::map<CNetAddr, int64> setBanned; static CCriticalSection cs_setBanned; int nMisbehavior; @@ -316,7 +316,7 @@ public: // the key is the earliest time the request can be sent int64& nRequestTime = mapAlreadyAskedFor[inv]; if (fDebugNet) - printf("askfor %s %"PRI64d"\n", inv.ToString().c_str(), nRequestTime); + printf("askfor %s %"PRI64d" (%s)\n", inv.ToString().c_str(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str()); // Make sure not to reuse time indexes to keep things in the same order int64 nNow = (GetTime() - 1) * 1000000; diff --git a/src/netbase.cpp b/src/netbase.cpp index 0a54fdf46c..b66c366641 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -702,7 +702,7 @@ bool CNetAddr::IsMulticast() const bool CNetAddr::IsValid() const { - // Clean up 3-byte shifted addresses caused by garbage in size field + // Cleanup 3-byte shifted addresses caused by garbage in size field // of addr messages from versions before 0.2.9 checksum. // Two consecutive addr messages look like this: // header20 vectorlen3 addr26 addr26 addr26 header20 vectorlen3 addr26 addr26 addr26... @@ -851,13 +851,13 @@ std::vector<unsigned char> CNetAddr::GetGroup() const nClass = NET_IPV4; nStartByte = 12; } - // for 6to4 tunneled addresses, use the encapsulated IPv4 address + // for 6to4 tunnelled addresses, use the encapsulated IPv4 address else if (IsRFC3964()) { nClass = NET_IPV4; nStartByte = 2; } - // for Teredo-tunneled IPv6 addresses, use the encapsulated IPv4 address + // for Teredo-tunnelled IPv6 addresses, use the encapsulated IPv4 address else if (IsRFC4380()) { vchRet.push_back(NET_IPV4); @@ -954,7 +954,7 @@ int CNetAddr::GetReachabilityFrom(const CNetAddr *paddrPartner) const default: return REACH_DEFAULT; case NET_TEREDO: return REACH_TEREDO; case NET_IPV4: return REACH_IPV4; - case NET_IPV6: return fTunnel ? REACH_IPV6_WEAK : REACH_IPV6_STRONG; // only prefer giving our IPv6 address if it's not tunneled + case NET_IPV6: return fTunnel ? REACH_IPV6_WEAK : REACH_IPV6_STRONG; // only prefer giving our IPv6 address if it's not tunnelled } case NET_TOR: switch(ourNet) { diff --git a/src/netbase.h b/src/netbase.h index f097d7f5ae..07ca12cb96 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -50,9 +50,9 @@ class CNetAddr bool IsRFC1918() const; // IPv4 private networks (10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12) bool IsRFC3849() const; // IPv6 documentation address (2001:0DB8::/32) bool IsRFC3927() const; // IPv4 autoconfig (169.254.0.0/16) - bool IsRFC3964() const; // IPv6 6to4 tunneling (2002::/16) + bool IsRFC3964() const; // IPv6 6to4 tunnelling (2002::/16) bool IsRFC4193() const; // IPv6 unique local (FC00::/15) - bool IsRFC4380() const; // IPv6 Teredo tunneling (2001::/32) + bool IsRFC4380() const; // IPv6 Teredo tunnelling (2001::/32) bool IsRFC4843() const; // IPv6 ORCHID (2001:10::/28) bool IsRFC4862() const; // IPv6 autoconfig (FE80::/64) bool IsRFC6052() const; // IPv6 well-known prefix (64:FF9B::/96) diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index e502d9bc31..8a74a47f58 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -113,6 +113,8 @@ void AddressBookPage::setModel(AddressTableModel *model) proxyModel = new QSortFilterProxyModel(this); proxyModel->setSourceModel(model); proxyModel->setDynamicSortFilter(true); + proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); + proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); switch(tab) { case ReceivingTab: @@ -190,10 +192,7 @@ void AddressBookPage::on_signMessage_clicked() addr = address.toString(); } - QObject *qoGUI = parent()->parent(); - BitcoinGUI *gui = qobject_cast<BitcoinGUI *>(qoGUI); - if (gui) - gui->gotoSignMessageTab(addr); + emit signMessage(addr); } void AddressBookPage::on_verifyMessage_clicked() @@ -208,10 +207,7 @@ void AddressBookPage::on_verifyMessage_clicked() addr = address.toString(); } - QObject *qoGUI = parent()->parent(); - BitcoinGUI *gui = qobject_cast<BitcoinGUI *>(qoGUI); - if (gui) - gui->gotoVerifyMessageTab(addr); + emit verifyMessage(addr); } void AddressBookPage::on_newAddressButton_clicked() diff --git a/src/qt/addressbookpage.h b/src/qt/addressbookpage.h index fae688fc9d..df87486949 100644 --- a/src/qt/addressbookpage.h +++ b/src/qt/addressbookpage.h @@ -76,6 +76,10 @@ private slots: /** New entry/entries were added to address table */ void selectNewAddress(const QModelIndex &parent, int begin, int end); + +signals: + void signMessage(QString addr); + void verifyMessage(QString addr); }; #endif // ADDRESSBOOKDIALOG_H diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp index 0a8ace09df..1eccaa9f8e 100644 --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -98,7 +98,7 @@ void AskPassphraseDialog::accept() break; } QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm wallet encryption"), - tr("WARNING: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>!\nAre you sure you wish to encrypt your wallet?"), + tr("Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>!") + "<br><br>" + tr("Are you sure you wish to encrypt your wallet?"), QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Cancel); if(retval == QMessageBox::Yes) @@ -157,7 +157,7 @@ void AskPassphraseDialog::accept() if(model->changePassphrase(oldpass, newpass1)) { QMessageBox::information(this, tr("Wallet encrypted"), - tr("Wallet passphrase was succesfully changed.")); + tr("Wallet passphrase was successfully changed.")); QDialog::accept(); // Success } else @@ -177,7 +177,7 @@ void AskPassphraseDialog::accept() void AskPassphraseDialog::textChanged() { - // Validate input, set Ok button to enabled when accepable + // Validate input, set Ok button to enabled when acceptable bool acceptable = false; switch(mode) { @@ -204,7 +204,7 @@ bool AskPassphraseDialog::event(QEvent *event) fCapsLock = !fCapsLock; } if (fCapsLock) { - ui->capsLabel->setText(tr("Warning: The Caps Lock key is on.")); + ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); } else { ui->capsLabel->clear(); } @@ -228,7 +228,7 @@ bool AskPassphraseDialog::eventFilter(QObject *, QEvent *event) bool fShift = (ke->modifiers() & Qt::ShiftModifier) != 0; if ((fShift && psz->isLower()) || (!fShift && psz->isUpper())) { fCapsLock = true; - ui->capsLabel->setText(tr("Warning: The Caps Lock key is on.")); + ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); } else if (psz->isLetter()) { fCapsLock = false; ui->capsLabel->clear(); diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 55b5f74c3b..42bfcfd0b2 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -109,7 +109,7 @@ static std::string Translate(const char* psz) static void handleRunawayException(std::exception *e) { PrintExceptionContinue(e, "Runaway exception"); - QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occured. Bitcoin can no longer continue safely and will quit.") + QString("\n\n") + QString::fromStdString(strMiscWarning)); + QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. Bitcoin can no longer continue safely and will quit.") + QString("\n\n") + QString::fromStdString(strMiscWarning)); exit(1); } @@ -126,13 +126,21 @@ int main(int argc, char *argv[]) const char *strURI = argv[i]; try { boost::interprocess::message_queue mq(boost::interprocess::open_only, BITCOINURI_QUEUE_NAME); - if(mq.try_send(strURI, strlen(strURI), 0)) + if (mq.try_send(strURI, strlen(strURI), 0)) + // if URI could be sent to the message queue exit here exit(0); else + // if URI could not be sent to the message queue do a normal Bitcoin-Qt startup break; } catch (boost::interprocess::interprocess_exception &ex) { - break; + // don't log the "file not found" exception, because that's normal for + // the first start of the first instance + if (ex.get_error_code() != boost::interprocess::not_found_error) + { + printf("main() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what()); + break; + } } } } @@ -264,7 +272,7 @@ int main(int argc, char *argv[]) // TODO: implement URI support on the Mac. #if !defined(MAC_OSX) - // Place this here as guiref has to be defined if we dont want to lose URIs + // Place this here as guiref has to be defined if we don't want to lose URIs ipcInit(); // Check for URI in argv @@ -278,6 +286,8 @@ int main(int argc, char *argv[]) mq.try_send(strURI, strlen(strURI), 0); } catch (boost::interprocess::interprocess_exception &ex) { + printf("main() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what()); + break; } } } @@ -289,7 +299,7 @@ int main(int argc, char *argv[]) window.setWalletModel(0); guiref = 0; } - // Shutdown the core and it's threads, but don't exit Bitcoin-Qt here + // Shutdown the core and its threads, but don't exit Bitcoin-Qt here Shutdown(NULL); } else diff --git a/src/qt/bitcoinaddressvalidator.cpp b/src/qt/bitcoinaddressvalidator.cpp index d2b93e70f5..5136ea0c40 100644 --- a/src/qt/bitcoinaddressvalidator.cpp +++ b/src/qt/bitcoinaddressvalidator.cpp @@ -5,8 +5,8 @@ This is: - All numbers except for '0' - - All uppercase letters except for 'I' and 'O' - - All lowercase letters except for 'l' + - All upper-case letters except for 'I' and 'O' + - All lower-case letters except for 'l' User friendly Base58 input can map - 'l' and 'I' to '1' diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h index ead8bdb84b..ca4a888e4e 100644 --- a/src/qt/bitcoinamountfield.h +++ b/src/qt/bitcoinamountfield.h @@ -40,7 +40,7 @@ signals: void textChanged(); protected: - /** Intercept focus-in event and ',' keypresses */ + /** Intercept focus-in event and ',' key presses */ bool eventFilter(QObject *object, QEvent *event); private: diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 775d676ee5..7e6ad15d6a 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -51,7 +51,6 @@ #include <QFileDialog> #include <QDesktopServices> #include <QTimer> - #include <QDragEnterEvent> #include <QUrl> @@ -69,7 +68,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): rpcConsole(0) { resize(850, 550); - setWindowTitle(tr("Bitcoin Wallet")); + setWindowTitle(tr("Bitcoin") + " - " + tr("Wallet")); #ifndef Q_WS_MAC qApp->setWindowIcon(QIcon(":icons/bitcoin")); setWindowIcon(QIcon(":icons/bitcoin")); @@ -159,12 +158,17 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage())); connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex))); - // Doubleclicking on a transaction on the transaction history page shows details + // Double-clicking on a transaction on the transaction history page shows details connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails())); rpcConsole = new RPCConsole(this); connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show())); + // Clicking on "Verify Message" in the address book sends you to the verify message tab + connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString))); + // Clicking on "Sign Message" in the receive coins page sends you to the sign message tab + connect(receiveCoinsPage, SIGNAL(signMessage(QString)), this, SLOT(gotoSignMessageTab(QString))); + gotoOverviewPage(); } @@ -250,7 +254,7 @@ void BitcoinGUI::createActions() quitAction->setToolTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); - aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About %1").arg(qApp->applicationName()), this); + aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About Bitcoin"), this); aboutAction->setToolTip(tr("Show information about Bitcoin")); aboutAction->setMenuRole(QAction::AboutRole); aboutQtAction = new QAction(tr("About &Qt"), this); @@ -340,6 +344,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) this->clientModel = clientModel; if(clientModel) { + // Replace some strings and icons, when using the testnet if(clientModel->isTestNet()) { setWindowTitle(windowTitle() + QString(" ") + tr("[testnet]")); @@ -355,6 +360,8 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) trayIcon->setIcon(QIcon(":/icons/toolbar_testnet")); toggleHideAction->setIcon(QIcon(":/icons/toolbar_testnet")); } + + aboutAction->setIcon(QIcon(":/icons/toolbar_testnet")); } // Keep up to date with client @@ -393,7 +400,7 @@ void BitcoinGUI::setWalletModel(WalletModel *walletModel) setEncryptionStatus(walletModel->getEncryptionStatus()); connect(walletModel, SIGNAL(encryptionStatusChanged(int)), this, SLOT(setEncryptionStatus(int))); - // Balloon popup for new transaction + // Balloon pop-up for new transaction connect(walletModel->getTransactionTableModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(incomingTransaction(QModelIndex,int,int))); @@ -485,7 +492,7 @@ void BitcoinGUI::setNumConnections(int count) void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) { - // don't show / hide progressBar and it's label if we have no connection(s) to the network + // don't show / hide progressBar and its label if we have no connection(s) to the network if (!clientModel || clientModel->getNumConnections() == 0) { progressBarLabel->setVisible(false); @@ -494,6 +501,7 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) return; } + QString strStatusBarWarnings = clientModel->getStatusBarWarnings(); QString tooltip; if(count < nTotalBlocks) @@ -501,7 +509,7 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) int nRemainingBlocks = nTotalBlocks - count; float nPercentageDone = count / (nTotalBlocks * 0.01f); - if (clientModel->getStatusBarWarnings() == "") + if (strStatusBarWarnings.isEmpty()) { progressBarLabel->setText(tr("Synchronizing with network...")); progressBarLabel->setVisible(true); @@ -510,30 +518,28 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) progressBar->setValue(count); progressBar->setVisible(true); } - else - { - progressBarLabel->setText(clientModel->getStatusBarWarnings()); - progressBarLabel->setVisible(true); - progressBar->setVisible(false); - } + tooltip = tr("Downloaded %1 of %2 blocks of transaction history (%3% done).").arg(count).arg(nTotalBlocks).arg(nPercentageDone, 0, 'f', 2); } else { - if (clientModel->getStatusBarWarnings() == "") + if (strStatusBarWarnings.isEmpty()) progressBarLabel->setVisible(false); - else - { - progressBarLabel->setText(clientModel->getStatusBarWarnings()); - progressBarLabel->setVisible(true); - } + progressBar->setVisible(false); tooltip = tr("Downloaded %1 blocks of transaction history.").arg(count); } - QDateTime now = QDateTime::currentDateTime(); + // Override progressBarLabel text and hide progressBar, when we have warnings to display + if (!strStatusBarWarnings.isEmpty()) + { + progressBarLabel->setText(strStatusBarWarnings); + progressBarLabel->setVisible(true); + progressBar->setVisible(false); + } + QDateTime lastBlockDate = clientModel->getLastBlockDate(); - int secs = lastBlockDate.secsTo(now); + int secs = lastBlockDate.secsTo(QDateTime::currentDateTime()); QString text; // Represent time from last generated block in human readable text diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index 4a395012ee..acf84eb941 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -101,7 +101,7 @@ private: /** Create the main UI actions. */ void createActions(); - /** Create the menu bar and submenus. */ + /** Create the menu bar and sub-menus. */ void createMenuBar(); /** Create the toolbars */ void createToolBars(); @@ -112,7 +112,7 @@ public slots: /** Set number of connections shown in the UI */ void setNumConnections(int count); /** Set number of blocks shown in the UI */ - void setNumBlocks(int count, int countOfPeers); + void setNumBlocks(int count, int nTotalBlocks); /** Set the encryption status as shown in the UI. @param[in] status current encryption status @see WalletModel::EncryptionStatus @@ -132,9 +132,6 @@ public slots: void askFee(qint64 nFeeRequired, bool *payFee); void handleURI(QString strURI); - void gotoSignMessageTab(QString addr = ""); - void gotoVerifyMessageTab(QString addr = ""); - private slots: /** Switch to overview (home) page */ void gotoOverviewPage(); @@ -147,6 +144,11 @@ private slots: /** Switch to send coins page */ void gotoSendCoinsPage(); + /** Show Sign/Verify Message dialog and switch to sign message tab */ + void gotoSignMessageTab(QString addr = ""); + /** Show Sign/Verify Message dialog and switch to verify message tab */ + void gotoVerifyMessageTab(QString addr = ""); + /** Show configuration dialog */ void optionsClicked(); /** Show about dialog */ @@ -166,7 +168,7 @@ private slots: void backupWallet(); /** Change encrypted wallet passphrase */ void changePassphrase(); - /** Ask for pass phrase to unlock wallet temporarily */ + /** Ask for passphrase to unlock wallet temporarily */ void unlockWallet(); /** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */ diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index 56214df7a7..219397dbf9 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -5,7 +5,8 @@ #else #define UNUSED #endif -static const char UNUSED *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", "" +static const char UNUSED *bitcoin_strings[] = { +QT_TRANSLATE_NOOP("bitcoin-core", "" "%s, you must set a rpcpassword in the configuration file:\n" " %s\n" "It is recommended you use the following random password:\n" @@ -81,7 +82,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Error: Wallet locked, unable to create transa QT_TRANSLATE_NOOP("bitcoin-core", "Error: could not start node"), QT_TRANSLATE_NOOP("bitcoin-core", "Failed to listen on any port. Use -listen=0 if you want this."), QT_TRANSLATE_NOOP("bitcoin-core", "Fee per KB to add to transactions you send"), -QT_TRANSLATE_NOOP("bitcoin-core", "Find peers using DNS lookup (default: 1)"), +QT_TRANSLATE_NOOP("bitcoin-core", "Find peers using DNS lookup (default: 1 unless -connect)"), QT_TRANSLATE_NOOP("bitcoin-core", "Find peers using internet relay chat (default: 0)"), QT_TRANSLATE_NOOP("bitcoin-core", "Generate coins"), QT_TRANSLATE_NOOP("bitcoin-core", "Get help for a command"), @@ -90,6 +91,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "How thorough the block verification is (0-6, QT_TRANSLATE_NOOP("bitcoin-core", "Imports blocks from external blk000?.dat file"), QT_TRANSLATE_NOOP("bitcoin-core", "Insufficient funds"), QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -proxy address: '%s'"), +QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -tor address: '%s'"), QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s'"), QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount"), QT_TRANSLATE_NOOP("bitcoin-core", "List commands"), @@ -99,11 +101,12 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Loading addresses..."), QT_TRANSLATE_NOOP("bitcoin-core", "Loading block index..."), QT_TRANSLATE_NOOP("bitcoin-core", "Loading wallet..."), QT_TRANSLATE_NOOP("bitcoin-core", "Maintain at most <n> connections to peers (default: 125)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: 10000)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: 10000)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network <net> (IPv4 or IPv6)"), +QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)"), +QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)"), +QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network <net> (IPv4, IPv6 or Tor)"), QT_TRANSLATE_NOOP("bitcoin-core", "Options:"), -QT_TRANSLATE_NOOP("bitcoin-core", "Output extra debugging information"), +QT_TRANSLATE_NOOP("bitcoin-core", "Output extra debugging information. Implies all other -debug* options"), +QT_TRANSLATE_NOOP("bitcoin-core", "Output extra network debugging information"), QT_TRANSLATE_NOOP("bitcoin-core", "Password for JSON-RPC connections"), QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp"), QT_TRANSLATE_NOOP("bitcoin-core", "Rescan the block chain for missing wallet transactions"), @@ -136,8 +139,10 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Usage:"), QT_TRANSLATE_NOOP("bitcoin-core", "Use OpenSSL (https) for JSON-RPC connections"), QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: 0)"), QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: 1 when listening)"), +QT_TRANSLATE_NOOP("bitcoin-core", "Use proxy to reach tor hidden services (default: same as -proxy)"), QT_TRANSLATE_NOOP("bitcoin-core", "Use the test network"), QT_TRANSLATE_NOOP("bitcoin-core", "Username for JSON-RPC connections"), QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart Bitcoin to complete"), QT_TRANSLATE_NOOP("bitcoin-core", "Warning: Disk space is low"), +QT_TRANSLATE_NOOP("bitcoin-core", "Warning: this version is obsolete, upgrade required"), };
\ No newline at end of file diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp index 9a9a4890dc..d4715abaec 100644 --- a/src/qt/bitcoinunits.cpp +++ b/src/qt/bitcoinunits.cpp @@ -99,7 +99,7 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus) QString quotient_str = QString::number(quotient); QString remainder_str = QString::number(remainder).rightJustified(num_decimals, '0'); - // Right-trim excess 0's after the decimal point + // Right-trim excess zeros after the decimal point int nTrim = 0; for (int i = remainder_str.size()-1; i>=2 && (remainder_str.at(i) == '0'); --i) ++nTrim; diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h index 18fa36a0b7..9b7c9e160e 100644 --- a/src/qt/bitcoinunits.h +++ b/src/qt/bitcoinunits.h @@ -5,7 +5,7 @@ #include <QAbstractListModel> /** Bitcoin unit definitions. Encapsulates parsing and formatting - and serves as list model for dropdown selection boxes. + and serves as list model for drop-down selection boxes. */ class BitcoinUnits: public QAbstractListModel { @@ -26,7 +26,7 @@ public: //! Unit conversion and formatting ///@{ - //! Get list of units, for dropdown box + //! Get list of units, for drop-down box static QList<Unit> availableUnits(); //! Is unit ID valid? static bool valid(int unit); @@ -49,7 +49,7 @@ public: ///@} //! @name AbstractListModel implementation - //! List model for unit dropdown selection box. + //! List model for unit drop-down selection box. ///@{ enum RoleIndex { /** Unit identifier */ diff --git a/src/qt/forms/aboutdialog.ui b/src/qt/forms/aboutdialog.ui index 21fc7b2019..6632e311d0 100644 --- a/src/qt/forms/aboutdialog.ui +++ b/src/qt/forms/aboutdialog.ui @@ -98,7 +98,7 @@ This is experimental software. -Distributed under the MIT/X11 software license, see the accompanying file license.txt or http://www.opensource.org/licenses/mit-license.php. +Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</string> </property> diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui index 7708e15363..eac35c27ae 100644 --- a/src/qt/forms/addressbookpage.ui +++ b/src/qt/forms/addressbookpage.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>691</width> - <height>347</height> + <width>760</width> + <height>380</height> </rect> </property> <property name="windowTitle"> diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui index 2d8237f360..d1d8ab42a0 100644 --- a/src/qt/forms/rpcconsole.ui +++ b/src/qt/forms/rpcconsole.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>Bitcoin debug window</string> + <string>Bitcoin - Debug window</string> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> @@ -36,7 +36,7 @@ </font> </property> <property name="text"> - <string>Client</string> + <string>Bitcoin Core</string> </property> </widget> </item> @@ -315,14 +315,14 @@ </font> </property> <property name="text"> - <string>Debug logfile</string> + <string>Debug log file</string> </property> </widget> </item> <item row="15" column="0"> <widget class="QPushButton" name="openDebugLogfileButton"> <property name="toolTip"> - <string>Open the Bitcoin debug logfile from the current data directory. This can take a few seconds for large logfiles.</string> + <string>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</string> </property> <property name="text"> <string>&Open</string> diff --git a/src/qt/forms/signverifymessagedialog.ui b/src/qt/forms/signverifymessagedialog.ui index e22aea8675..8128bdf457 100644 --- a/src/qt/forms/signverifymessagedialog.ui +++ b/src/qt/forms/signverifymessagedialog.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>Messaging - Sign / Verify a Message</string> + <string>Signatures - Sign / Verify a Message</string> </property> <property name="modal"> <bool>true</bool> diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h index 6f6fa7f261..405ba396b7 100644 --- a/src/qt/guiconstants.h +++ b/src/qt/guiconstants.h @@ -4,10 +4,10 @@ /* Milliseconds between model updates */ static const int MODEL_UPDATE_DELAY = 500; -/* Maximum passphrase length */ +/* AskPassphraseDialog -- Maximum passphrase length */ static const int MAX_PASSPHRASE_SIZE = 1024; -/* Size of icons in status bar */ +/* BitcoinGUI -- Size of icons in status bar */ static const int STATUSBAR_ICONSIZE = 16; /* Invalid field background style */ diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 50ed2eed04..d3afc0a565 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -131,7 +131,7 @@ bool parseBitcoinURI(QString uri, SendCoinsRecipient *out) // Convert bitcoin:// to bitcoin: // // Cannot handle this later, because bitcoin:// will cause Qt to see the part after // as host, - // which will lowercase it (and thus invalidate the address). + // which will lower-case it (and thus invalidate the address). if(uri.startsWith("bitcoin://")) { uri.replace(0, 10, "bitcoin:"); @@ -412,7 +412,7 @@ bool SetStartOnSystemStartup(bool fAutoStart) #else // TODO: OSX startup stuff; see: -// http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/CustomLogin.html +// https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Articles/CustomLogin.html bool GetStartOnSystemStartup() { return false; } bool SetStartOnSystemStartup(bool fAutoStart) { return false; } @@ -436,7 +436,7 @@ HelpMessageBox::HelpMessageBox(QWidget *parent) : setWindowTitle(tr("Bitcoin-Qt")); setTextFormat(Qt::PlainText); - // setMinimumWidth is ignored for QMessageBox so put in nonbreaking spaces to make it wider. + // setMinimumWidth is ignored for QMessageBox so put in non-breaking spaces to make it wider. setText(header + QString(QChar(0x2003)).repeated(50)); setDetailedText(coreOptions + "\n" + uiOptions); } diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 0240695505..db100bdb73 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -30,7 +30,7 @@ namespace GUIUtil void setupAddressWidget(QLineEdit *widget, QWidget *parent); void setupAmountWidget(QLineEdit *widget, QWidget *parent); - // Parse "bitcoin:" URI into recipient object, return true on succesful parsing + // Parse "bitcoin:" URI into recipient object, return true on successful parsing // See Bitcoin URI definition discussion here: https://bitcointalk.org/index.php?topic=33490.0 bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out); bool parseBitcoinURI(QString uri, SendCoinsRecipient *out); @@ -47,7 +47,7 @@ namespace GUIUtil */ void copyEntryData(QAbstractItemView *view, int column, int role=Qt::EditRole); - /** Get save file name, mimics QFileDialog::getSaveFileName, except that it appends a default suffix + /** Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix when no suffix is provided by the user. @param[in] parent Parent window (or 0) diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts index 9006870b9f..d9dc925973 100644 --- a/src/qt/locale/bitcoin_bg.ts +++ b/src/qt/locale/bitcoin_bg.ts @@ -264,7 +264,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Паролата за портфейла беше променена успешно.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts index deb7ea9040..a44eca9159 100644 --- a/src/qt/locale/bitcoin_ca_ES.ts +++ b/src/qt/locale/bitcoin_ca_ES.ts @@ -263,7 +263,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts index 528e17ae99..1a3b99ebbd 100644 --- a/src/qt/locale/bitcoin_cs.ts +++ b/src/qt/locale/bitcoin_cs.ts @@ -270,7 +270,7 @@ Jsi si jistý, že chceš peněženku zašifrovat?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Heslo k peněžence bylo v pořádku změněno.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts index 66166a74c4..70a5e2f9e7 100644 --- a/src/qt/locale/bitcoin_da.ts +++ b/src/qt/locale/bitcoin_da.ts @@ -264,7 +264,7 @@ Er du sikker på at du ønsker at kryptere din tegnebog?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Tegnebogskodeord blev ændret.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index 2b9aaf3296..5b96fbe299 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -269,7 +269,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Die Passphrase der Brieftasche wurde erfolgreich geändert.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts index 2058e1a123..63d7bd26a8 100644 --- a/src/qt/locale/bitcoin_el_GR.ts +++ b/src/qt/locale/bitcoin_el_GR.ts @@ -270,7 +270,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Ο κωδικος του πορτοφολιού άλλαξε με επιτυχία.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index afa30caf87..c6baca2dd9 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -5,22 +5,22 @@ <context> <name>AboutDialog</name> <message> - <location filename="../forms/aboutdialog.ui" line="14"/> + <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/aboutdialog.ui" line="53"/> + <location line="+39"/> <source><b>Bitcoin</b> version</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/aboutdialog.ui" line="97"/> + <location line="+44"/> <source>Copyright © 2009-2012 Bitcoin Developers This is experimental software. -Distributed under the MIT/X11 software license, see the accompanying file license.txt or http://www.opensource.org/licenses/mit-license.php. +Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"></translation> @@ -29,92 +29,102 @@ This product includes software developed by the OpenSSL Project for use in the O <context> <name>AddressBookPage</name> <message> - <location filename="../forms/addressbookpage.ui" line="14"/> + <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="20"/> - <source>These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="36"/> + <location line="+22"/> <source>Double-click to edit address or label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="63"/> + <location line="+27"/> <source>Create a new address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="77"/> + <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="66"/> + <location line="-11"/> <source>&New Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="80"/> + <location line="-46"/> + <source>These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+60"/> <source>&Copy Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="91"/> + <location line="+11"/> <source>Show &QR Code</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="102"/> - <source>Sign a message to prove you own this address</source> + <location line="+11"/> + <source>Sign a message to prove you own a Bitcoin address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="105"/> + <location line="+3"/> <source>&Sign Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="116"/> + <location line="+11"/> + <source>Verify a message to ensure it was signed with a specified Bitcoin address</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>&Verify Message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+11"/> <source>Delete the currently selected address from the list. Only sending addresses can be deleted.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/addressbookpage.ui" line="119"/> + <location line="+3"/> <source>&Delete</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="63"/> + <location filename="../addressbookpage.cpp" line="+65"/> <source>Copy &Label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="65"/> + <location line="+2"/> <source>&Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="287"/> + <location line="+250"/> <source>Export Address Book Data</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="288"/> + <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="301"/> + <location line="+13"/> <source>Error exporting</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="301"/> + <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"></translation> </message> @@ -122,17 +132,17 @@ This product includes software developed by the OpenSSL Project for use in the O <context> <name>AddressTableModel</name> <message> - <location filename="../addresstablemodel.cpp" line="142"/> + <location filename="../addresstablemodel.cpp" line="+142"/> <source>Label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addresstablemodel.cpp" line="142"/> + <location line="+0"/> <source>Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addresstablemodel.cpp" line="178"/> + <location line="+36"/> <source>(no label)</source> <translation type="unfinished"></translation> </message> @@ -140,259 +150,244 @@ This product includes software developed by the OpenSSL Project for use in the O <context> <name>AskPassphraseDialog</name> <message> - <location filename="../forms/askpassphrasedialog.ui" line="26"/> + <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/askpassphrasedialog.ui" line="47"/> + <location line="+21"/> <source>Enter passphrase</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/askpassphrasedialog.ui" line="61"/> + <location line="+14"/> <source>New passphrase</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/askpassphrasedialog.ui" line="75"/> + <location line="+14"/> <source>Repeat new passphrase</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="33"/> + <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="34"/> + <location line="+1"/> <source>Encrypt wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="37"/> + <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="42"/> + <location line="+5"/> <source>Unlock wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="45"/> + <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="50"/> + <location line="+5"/> <source>Decrypt wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="53"/> + <location line="+3"/> <source>Change passphrase</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="54"/> + <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="100"/> + <location line="+46"/> <source>Confirm wallet encryption</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="101"/> + <location line="+1"/> <source>WARNING: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! Are you sure you wish to encrypt your wallet?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="110"/> - <location filename="../askpassphrasedialog.cpp" line="159"/> + <location line="+9"/> + <location line="+49"/> <source>Wallet encrypted</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="111"/> + <location line="-48"/> <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="207"/> - <location filename="../askpassphrasedialog.cpp" line="231"/> + <location line="+96"/> + <location line="+24"/> <source>Warning: The Caps Lock key is on.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="116"/> - <location filename="../askpassphrasedialog.cpp" line="123"/> - <location filename="../askpassphrasedialog.cpp" line="165"/> - <location filename="../askpassphrasedialog.cpp" line="171"/> + <location line="-115"/> + <location line="+7"/> + <location line="+42"/> + <location line="+6"/> <source>Wallet encryption failed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="117"/> + <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="124"/> - <location filename="../askpassphrasedialog.cpp" line="172"/> + <location line="+7"/> + <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="135"/> + <location line="-37"/> <source>Wallet unlock failed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="136"/> - <location filename="../askpassphrasedialog.cpp" line="147"/> - <location filename="../askpassphrasedialog.cpp" line="166"/> + <location line="+1"/> + <location line="+11"/> + <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="146"/> + <location line="-20"/> <source>Wallet decryption failed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <location line="+14"/> + <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"></translation> </message> </context> <context> <name>BitcoinGUI</name> <message> - <location filename="../bitcoingui.cpp" line="73"/> - <source>Bitcoin Wallet</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../bitcoingui.cpp" line="215"/> + <location filename="../bitcoingui.cpp" line="+218"/> <source>Sign &message...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="248"/> + <location line="+48"/> <source>Show/Hide &Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="515"/> + <location line="+247"/> <source>Synchronizing with network...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="185"/> + <location line="-325"/> <source>&Overview</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="186"/> + <location line="+1"/> <source>Show general overview of wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="191"/> + <location line="+5"/> <source>&Transactions</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="192"/> + <location line="+1"/> <source>Browse transaction history</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="197"/> + <location line="+5"/> <source>&Address Book</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="198"/> + <location line="+1"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="203"/> + <location line="+5"/> <source>&Receive coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="204"/> + <location line="+1"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="209"/> + <location line="+5"/> <source>&Send coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="216"/> - <source>Prove you control an address</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../bitcoingui.cpp" line="235"/> + <location line="+41"/> <source>E&xit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="236"/> + <location line="+1"/> <source>Quit application</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="239"/> - <source>&About %1</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../bitcoingui.cpp" line="240"/> + <location line="+4"/> <source>Show information about Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="242"/> + <location line="+2"/> <source>About &Qt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="243"/> + <location line="+1"/> <source>Show information about Qt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="245"/> + <location line="+2"/> <source>&Options...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="252"/> + <location line="+7"/> <source>&Encrypt Wallet...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="255"/> + <location line="+3"/> <source>&Backup Wallet...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="257"/> + <location line="+2"/> <source>&Change Passphrase...</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="517"/> + <location line="+240"/> <source>~%n block(s) remaining</source> <translation> <numerusform>~%n block remaining</numerusform> @@ -400,109 +395,134 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message> - <location filename="../bitcoingui.cpp" line="528"/> + <location line="+11"/> <source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="250"/> + <location line="-258"/> <source>&Export...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="210"/> + <location line="-55"/> <source>Send coins to a Bitcoin address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="246"/> + <location line="+6"/> + <source>Sign a message to prove you own a Bitcoin address</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> + <source>Verify a message to ensure it was signed with a specified Bitcoin address</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> + <source>S&ignatures</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+37"/> <source>Modify configuration options for Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="249"/> + <location line="+3"/> <source>Show or hide the Bitcoin window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="251"/> + <location line="+2"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="253"/> + <location line="+2"/> <source>Encrypt or decrypt wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="256"/> + <location line="+3"/> <source>Backup wallet to another location</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="258"/> + <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="259"/> + <location line="+1"/> <source>&Debug window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="260"/> + <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="261"/> + <location line="-56"/> <source>&Verify message...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="262"/> - <source>Verify a message signature</source> + <location line="-151"/> + <source>Bitcoin</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+0"/> + <source>Wallet</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+186"/> + <source>&About Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="286"/> + <location line="+44"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="296"/> + <location line="+10"/> <source>&Settings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="302"/> + <location line="+6"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="311"/> + <location line="+9"/> <source>Tabs toolbar</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="322"/> + <location line="+11"/> <source>Actions toolbar</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="334"/> - <location filename="../bitcoingui.cpp" line="343"/> + <location line="+13"/> + <location line="+9"/> <source>[testnet]</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="343"/> - <location filename="../bitcoingui.cpp" line="399"/> + <location line="+0"/> + <location line="+60"/> <source>Bitcoin client</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="492"/> + <location line="+71"/> <source>%n active connection(s) to Bitcoin network</source> <translation> <numerusform>%n active connection to Bitcoin network</numerusform> @@ -510,12 +530,12 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message> - <location filename="../bitcoingui.cpp" line="540"/> + <location line="+48"/> <source>Downloaded %1 blocks of transaction history.</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="555"/> + <location line="+15"/> <source>%n second(s) ago</source> <translation> <numerusform>%n second ago</numerusform> @@ -523,7 +543,7 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="559"/> + <location line="+4"/> <source>%n minute(s) ago</source> <translation> <numerusform>%n minute ago</numerusform> @@ -531,7 +551,7 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="563"/> + <location line="+4"/> <source>%n hour(s) ago</source> <translation> <numerusform>%n hour ago</numerusform> @@ -539,7 +559,7 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="567"/> + <location line="+4"/> <source>%n day(s) ago</source> <translation> <numerusform>%n day ago</numerusform> @@ -547,42 +567,42 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message> - <location filename="../bitcoingui.cpp" line="573"/> + <location line="+6"/> <source>Up to date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="580"/> + <location line="+7"/> <source>Catching up...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="590"/> + <location line="+10"/> <source>Last received block was generated %1.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="649"/> + <location line="+59"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="654"/> + <location line="+5"/> <source>Confirm transaction fee</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="681"/> + <location line="+27"/> <source>Sent transaction</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="682"/> + <location line="+1"/> <source>Incoming transaction</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="683"/> + <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 @@ -591,45 +611,57 @@ Address: %4 <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="804"/> + <location line="+120"/> + <location line="+15"/> + <source>URI handling</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-15"/> + <location line="+15"/> + <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+16"/> <source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="812"/> + <location line="+8"/> <source>Wallet is <b>encrypted</b> and currently <b>locked</b></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="835"/> + <location line="+23"/> <source>Backup Wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="835"/> + <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="838"/> + <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="838"/> + <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoin.cpp" line="112"/> - <source>A fatal error occured. Bitcoin can no longer continue safely and will quit.</source> + <location filename="../bitcoin.cpp" line="+112"/> + <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source> <translation type="unfinished"></translation> </message> </context> <context> <name>ClientModel</name> <message> - <location filename="../clientmodel.cpp" line="84"/> + <location filename="../clientmodel.cpp" line="+84"/> <source>Network Alert</source> <translation type="unfinished"></translation> </message> @@ -637,67 +669,67 @@ Address: %4 <context> <name>EditAddressDialog</name> <message> - <location filename="../forms/editaddressdialog.ui" line="14"/> + <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/editaddressdialog.ui" line="25"/> + <location line="+11"/> <source>&Label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/editaddressdialog.ui" line="35"/> + <location line="+10"/> <source>The label associated with this address book entry</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/editaddressdialog.ui" line="42"/> + <location line="+7"/> <source>&Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/editaddressdialog.ui" line="52"/> + <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../editaddressdialog.cpp" line="20"/> + <location filename="../editaddressdialog.cpp" line="+20"/> <source>New receiving address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../editaddressdialog.cpp" line="24"/> + <location line="+4"/> <source>New sending address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../editaddressdialog.cpp" line="27"/> + <location line="+3"/> <source>Edit receiving address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../editaddressdialog.cpp" line="31"/> + <location line="+4"/> <source>Edit sending address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../editaddressdialog.cpp" line="91"/> + <location line="+60"/> <source>The entered address "%1" is already in the address book.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../editaddressdialog.cpp" line="96"/> + <location line="+5"/> <source>The entered address "%1" is not a valid Bitcoin address.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../editaddressdialog.cpp" line="101"/> + <location line="+5"/> <source>Could not unlock wallet.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../editaddressdialog.cpp" line="106"/> + <location line="+5"/> <source>New key generation failed.</source> <translation type="unfinished"></translation> </message> @@ -705,349 +737,238 @@ Address: %4 <context> <name>GUIUtil::HelpMessageBox</name> <message> - <location filename="../guiutil.cpp" line="420"/> - <location filename="../guiutil.cpp" line="432"/> + <location filename="../guiutil.cpp" line="+425"/> + <location line="+12"/> <source>Bitcoin-Qt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../guiutil.cpp" line="420"/> + <location line="-12"/> <source>version</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../guiutil.cpp" line="422"/> + <location line="+2"/> <source>Usage:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../guiutil.cpp" line="423"/> + <location line="+1"/> <source>command-line options</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../guiutil.cpp" line="427"/> + <location line="+4"/> <source>UI options</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../guiutil.cpp" line="428"/> + <location line="+1"/> <source>Set language, for example "de_DE" (default: system locale)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../guiutil.cpp" line="429"/> + <location line="+1"/> <source>Start minimized</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../guiutil.cpp" line="430"/> + <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"></translation> </message> </context> <context> - <name>MessagePage</name> - <message> - <location filename="../forms/messagepage.ui" line="14"/> - <source>Sign Message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="20"/> - <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="38"/> - <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="48"/> - <source>Choose adress from address book</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="58"/> - <source>Alt+A</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="71"/> - <source>Paste address from clipboard</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="81"/> - <source>Alt+P</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="93"/> - <source>Enter the message you want to sign here</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="128"/> - <source>Copy the current signature to the system clipboard</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="131"/> - <source>&Copy Signature</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="142"/> - <source>Reset all sign message fields</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="145"/> - <source>Clear &All</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../messagepage.cpp" line="31"/> - <source>Click "Sign Message" to get signature</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="114"/> - <source>Sign a message to prove you own this address</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/messagepage.ui" line="117"/> - <source>&Sign Message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../messagepage.cpp" line="30"/> - <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../messagepage.cpp" line="83"/> - <location filename="../messagepage.cpp" line="90"/> - <location filename="../messagepage.cpp" line="105"/> - <location filename="../messagepage.cpp" line="117"/> - <source>Error signing</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../messagepage.cpp" line="83"/> - <source>%1 is not a valid address.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../messagepage.cpp" line="90"/> - <source>%1 does not refer to a key.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../messagepage.cpp" line="105"/> - <source>Private key for %1 is not available.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../messagepage.cpp" line="117"/> - <source>Sign failed</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> <name>OptionsDialog</name> <message> - <location filename="../forms/optionsdialog.ui" line="14"/> + <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="30"/> + <location line="+16"/> <source>&Main</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="36"/> + <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="51"/> + <location line="+15"/> <source>Pay transaction &fee</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="82"/> + <location line="+31"/> <source>Automatically start Bitcoin after logging in to the system.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="85"/> + <location line="+3"/> <source>&Start Bitcoin on system login</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="92"/> + <location line="+7"/> <source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="95"/> + <location line="+3"/> <source>&Detach databases at shutdown</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="116"/> + <location line="+21"/> <source>&Network</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="122"/> + <location line="+6"/> <source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="125"/> + <location line="+3"/> <source>Map port using &UPnP</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="132"/> - <source>Connect to the Bitcon network through a SOCKS proxy (e.g. when connecting through Tor).</source> + <location line="+7"/> + <source>Connect to the Bitcoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="135"/> + <location line="+3"/> <source>&Connect through SOCKS proxy:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="144"/> + <location line="+9"/> <source>Proxy &IP:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="163"/> + <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="170"/> + <location line="+7"/> <source>&Port:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="189"/> + <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="196"/> + <location line="+7"/> <source>SOCKS &Version:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="209"/> + <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="245"/> + <location line="+36"/> <source>&Window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="251"/> + <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="254"/> + <location line="+3"/> <source>&Minimize to the tray instead of the taskbar</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="261"/> + <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="264"/> + <location line="+3"/> <source>M&inimize on close</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="285"/> + <location line="+21"/> <source>&Display</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="293"/> + <location line="+8"/> <source>User Interface &language:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="306"/> + <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="317"/> + <location line="+11"/> <source>&Unit to show amounts in:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="330"/> + <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="339"/> + <location line="+9"/> <source>Whether to show Bitcoin addresses in the transaction list or not.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="342"/> + <location line="+3"/> <source>&Display addresses in transaction list</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="413"/> + <location line="+71"/> <source>&OK</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="420"/> + <location line="+7"/> <source>&Cancel</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/optionsdialog.ui" line="430"/> + <location line="+10"/> <source>&Apply</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="62"/> + <location filename="../optionsdialog.cpp" line="+63"/> <source>default</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="173"/> - <location filename="../optionsdialog.cpp" line="182"/> + <location line="+133"/> + <location line="+9"/> <source>Warning</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="173"/> - <location filename="../optionsdialog.cpp" line="182"/> + <location line="-9"/> + <location line="+9"/> <source>This setting will take effect after restarting Bitcoin.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../optionsdialog.cpp" line="207"/> + <location line="+25"/> <source>The supplied proxy address is invalid.</source> <translation type="unfinished"></translation> </message> @@ -1055,69 +976,69 @@ Address: %4 <context> <name>OverviewPage</name> <message> - <location filename="../forms/overviewpage.ui" line="14"/> + <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="47"/> - <location filename="../forms/overviewpage.ui" line="230"/> + <location line="+33"/> + <location line="+183"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="89"/> + <location line="-141"/> <source>Balance:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="147"/> + <location line="+58"/> <source>Number of transactions:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="118"/> + <location line="-29"/> <source>Unconfirmed:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="40"/> + <location line="-78"/> <source>Wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="164"/> + <location line="+124"/> <source>Immature:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="177"/> + <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="223"/> + <location line="+46"/> <source><b>Recent transactions</b></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="105"/> + <location line="-118"/> <source>Your current balance</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="134"/> + <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/overviewpage.ui" line="154"/> + <location line="+20"/> <source>Total number of transactions in wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../overviewpage.cpp" line="112"/> - <location filename="../overviewpage.cpp" line="113"/> + <location filename="../overviewpage.cpp" line="+112"/> + <location line="+1"/> <source>out of sync</source> <translation type="unfinished"></translation> </message> @@ -1125,62 +1046,57 @@ Address: %4 <context> <name>QRCodeDialog</name> <message> - <location filename="../forms/qrcodedialog.ui" line="14"/> + <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/qrcodedialog.ui" line="32"/> - <source>QR Code</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/qrcodedialog.ui" line="55"/> + <location line="+59"/> <source>Request Payment</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/qrcodedialog.ui" line="70"/> + <location line="+56"/> <source>Amount:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/qrcodedialog.ui" line="105"/> - <source>BTC</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/qrcodedialog.ui" line="121"/> + <location line="-44"/> <source>Label:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/qrcodedialog.ui" line="144"/> + <location line="+19"/> <source>Message:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/qrcodedialog.ui" line="186"/> + <location line="+71"/> <source>&Save As...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qrcodedialog.cpp" line="45"/> + <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qrcodedialog.cpp" line="63"/> + <location line="+40"/> + <source>The entered amount is invalid, please check.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qrcodedialog.cpp" line="120"/> + <location line="+25"/> <source>Save QR Code</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../qrcodedialog.cpp" line="120"/> + <location line="+0"/> <source>PNG Images (*.png)</source> <translation type="unfinished"></translation> </message> @@ -1188,140 +1104,146 @@ Address: %4 <context> <name>RPCConsole</name> <message> - <location filename="../forms/rpcconsole.ui" line="14"/> - <source>Bitcoin debug window</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/rpcconsole.ui" line="46"/> + <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="56"/> - <location filename="../forms/rpcconsole.ui" line="79"/> - <location filename="../forms/rpcconsole.ui" line="102"/> - <location filename="../forms/rpcconsole.ui" line="125"/> - <location filename="../forms/rpcconsole.ui" line="161"/> - <location filename="../forms/rpcconsole.ui" line="214"/> - <location filename="../forms/rpcconsole.ui" line="237"/> - <location filename="../forms/rpcconsole.ui" line="260"/> - <location filename="../rpcconsole.cpp" line="242"/> + <location line="+10"/> + <location line="+23"/> + <location line="+26"/> + <location line="+23"/> + <location line="+23"/> + <location line="+36"/> + <location line="+53"/> + <location line="+23"/> + <location line="+23"/> + <location filename="../rpcconsole.cpp" line="+246"/> <source>N/A</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="69"/> + <location line="-217"/> <source>Client version</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="24"/> + <location line="-45"/> <source>&Information</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="39"/> - <source>Client</source> + <location line="+68"/> + <source>Using OpenSSL version</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="115"/> + <location line="+49"/> <source>Startup time</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="144"/> + <location line="+29"/> <source>Network</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="151"/> + <location line="+7"/> <source>Number of connections</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="174"/> + <location line="+23"/> <source>On testnet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="197"/> + <location line="+23"/> <source>Block chain</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="204"/> + <location line="+7"/> <source>Current number of blocks</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="227"/> + <location line="+23"/> <source>Estimated total blocks</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="250"/> + <location line="+23"/> <source>Last block time</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="292"/> - <source>Debug logfile</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/rpcconsole.ui" line="299"/> - <source>Open the Bitcoin debug logfile from the current data directory. This can take a few seconds for large logfiles.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/rpcconsole.ui" line="302"/> + <location line="+52"/> <source>&Open</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="318"/> + <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="325"/> + <location line="+7"/> <source>Show the Bitcoin-Qt help message to get a list with possible Bitcoin command-line options.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="328"/> + <location line="+3"/> <source>&Show</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="352"/> + <location line="+24"/> <source>&Console</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="92"/> + <location line="-260"/> <source>Build date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/rpcconsole.ui" line="401"/> + <location line="-104"/> + <source>Bitcoin - Debug window</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+25"/> + <source>Bitcoin Core</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+279"/> + <source>Debug log file</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+7"/> + <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+102"/> <source>Clear console</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../rpcconsole.cpp" line="209"/> + <location filename="../rpcconsole.cpp" line="-33"/> <source>Welcome to the Bitcoin RPC console.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../rpcconsole.cpp" line="210"/> + <location line="+1"/> <source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../rpcconsole.cpp" line="211"/> + <location line="+1"/> <source>Type <b>help</b> for an overview of available commands.</source> <translation type="unfinished"></translation> </message> @@ -1329,109 +1251,109 @@ Address: %4 <context> <name>SendCoinsDialog</name> <message> - <location filename="../forms/sendcoinsdialog.ui" line="14"/> - <location filename="../sendcoinsdialog.cpp" line="122"/> - <location filename="../sendcoinsdialog.cpp" line="127"/> - <location filename="../sendcoinsdialog.cpp" line="132"/> - <location filename="../sendcoinsdialog.cpp" line="137"/> - <location filename="../sendcoinsdialog.cpp" line="143"/> - <location filename="../sendcoinsdialog.cpp" line="148"/> - <location filename="../sendcoinsdialog.cpp" line="153"/> + <location filename="../forms/sendcoinsdialog.ui" line="+14"/> + <location filename="../sendcoinsdialog.cpp" line="+123"/> + <location line="+5"/> + <location line="+5"/> + <location line="+5"/> + <location line="+6"/> + <location line="+5"/> + <location line="+5"/> <source>Send Coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsdialog.ui" line="64"/> + <location line="+50"/> <source>Send to multiple recipients at once</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsdialog.ui" line="67"/> + <location line="+3"/> <source>&Add Recipient</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsdialog.ui" line="84"/> + <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsdialog.ui" line="87"/> + <location line="+3"/> <source>Clear &All</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsdialog.ui" line="106"/> + <location line="+22"/> <source>Balance:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsdialog.ui" line="113"/> + <location line="+10"/> <source>123.456 BTC</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsdialog.ui" line="144"/> + <location line="+31"/> <source>Confirm the send action</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsdialog.ui" line="147"/> + <location line="+3"/> <source>&Send</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="94"/> + <location filename="../sendcoinsdialog.cpp" line="-59"/> <source><b>%1</b> to %2 (%3)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="99"/> + <location line="+5"/> <source>Confirm send coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="100"/> + <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="100"/> + <location line="+0"/> <source> and </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="123"/> - <source>The recepient address is not valid, please recheck.</source> + <location line="+23"/> + <source>The recipient address is not valid, please recheck.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="128"/> + <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="133"/> + <location line="+5"/> <source>The amount exceeds your balance.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="138"/> + <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="144"/> + <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="149"/> + <location line="+5"/> <source>Error: Transaction creation failed.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsdialog.cpp" line="154"/> + <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"></translation> </message> @@ -1439,217 +1361,439 @@ Address: %4 <context> <name>SendCoinsEntry</name> <message> - <location filename="../forms/sendcoinsentry.ui" line="14"/> + <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsentry.ui" line="29"/> + <location line="+15"/> <source>A&mount:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsentry.ui" line="42"/> + <location line="+13"/> <source>Pay &To:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsentry.ui" line="66"/> - <location filename="../sendcoinsentry.cpp" line="25"/> + <location line="+24"/> + <location filename="../sendcoinsentry.cpp" line="+25"/> <source>Enter a label for this address to add it to your address book</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsentry.ui" line="75"/> + <location line="+9"/> <source>&Label:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsentry.ui" line="93"/> + <location line="+18"/> <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsentry.ui" line="103"/> + <location line="+10"/> <source>Choose address from address book</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsentry.ui" line="113"/> + <location line="+10"/> <source>Alt+A</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsentry.ui" line="120"/> + <location line="+7"/> <source>Paste address from clipboard</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsentry.ui" line="130"/> + <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/sendcoinsentry.ui" line="137"/> + <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../sendcoinsentry.cpp" line="26"/> + <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> <translation type="unfinished"></translation> </message> </context> <context> - <name>TransactionDesc</name> + <name>SignVerifyMessageDialog</name> + <message> + <location filename="../forms/signverifymessagedialog.ui" line="+14"/> + <source>Signatures - Sign / Verify a Message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+13"/> + <location line="+124"/> + <source>&Sign Message</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-118"/> + <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+18"/> + <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+10"/> + <location line="+203"/> + <source>Choose an address from the address book</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-193"/> + <location line="+203"/> + <source>Alt+A</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-193"/> + <source>Paste address from clipboard</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+10"/> + <source>Alt+P</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>Enter the message you want to sign here</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+24"/> + <source>Copy the current signature to the system clipboard</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+21"/> + <source>Sign the message to prove you own this Bitcoin address</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+17"/> + <source>Reset all sign message fields</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <location line="+146"/> + <source>Clear &All</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-87"/> + <location line="+70"/> + <source>&Verify Message</source> + <translation type="unfinished"></translation> + </message> <message> - <location filename="../transactiondesc.cpp" line="21"/> - <source>Open for %1 blocks</source> + <location line="-64"/> + <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="23"/> + <location line="+21"/> + <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+40"/> + <source>Verify the message to ensure it was signed with the specified Bitcoin address</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+17"/> + <source>Reset all verify message fields</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../signverifymessagedialog.cpp" line="+27"/> + <location line="+3"/> + <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-2"/> + <source>Click "Sign Message" to generate signature</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+3"/> + <source>Enter Bitcoin signature</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+82"/> + <location line="+81"/> + <source>The entered address is invalid.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-81"/> + <location line="+8"/> + <location line="+73"/> + <location line="+8"/> + <source>Please check the address and try again.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-81"/> + <location line="+81"/> + <source>The entered address does not refer to a key.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-73"/> + <source>Wallet unlock was canceled.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+8"/> + <source>Private key for the entered address is not available.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+12"/> + <source>Message signing failed.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+5"/> + <source>Message signed.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+59"/> + <source>The signature could not be decoded.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+0"/> + <location line="+13"/> + <source>Please check the signature and try again.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+0"/> + <source>The signature did not match the message digest.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+7"/> + <source>Message verification failed.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+5"/> + <source>Message verified.</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>TransactionDesc</name> + <message> + <location filename="../transactiondesc.cpp" line="+19"/> <source>Open until %1</source> <translation type="unfinished"></translation> </message> + <message numerus="yes"> + <location line="-2"/> + <source>Open for %n block(s)</source> + <translation type="unfinished"> + <numerusform>Open for %n block</numerusform> + <numerusform>Open for %n blocks</numerusform> + </translation> + </message> <message> - <location filename="../transactiondesc.cpp" line="29"/> - <source>%1/offline?</source> + <location line="+8"/> + <source>%1/offline</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="31"/> + <location line="+2"/> <source>%1/unconfirmed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="33"/> + <location line="+2"/> <source>%1 confirmations</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="51"/> - <source><b>Status:</b> </source> + <location line="+18"/> + <source>Status</source> <translation type="unfinished"></translation> </message> + <message numerus="yes"> + <location line="+7"/> + <source>, broadcast through %n node(s)</source> + <translation> + <numerusform>, broadcast through %n node</numerusform> + <numerusform>, broadcast through %n nodes</numerusform> + </translation> + </message> <message> - <location filename="../transactiondesc.cpp" line="56"/> - <source>, has not been successfully broadcast yet</source> + <location line="+4"/> + <source>Date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="58"/> - <source>, broadcast through %1 node</source> + <location line="+7"/> + <source>Source</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="60"/> - <source>, broadcast through %1 nodes</source> + <location line="+0"/> + <source>Generated</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="64"/> - <source><b>Date:</b> </source> + <location line="+6"/> + <location line="+17"/> + <source>From</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="71"/> - <source><b>Source:</b> Generated<br></source> + <location line="+1"/> + <location line="+22"/> + <location line="+58"/> + <source>To</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="77"/> - <location filename="../transactiondesc.cpp" line="94"/> - <source><b>From:</b> </source> + <location line="-77"/> + <location line="+2"/> + <source>own address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="94"/> - <source>unknown</source> + <location line="-2"/> + <source>label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="95"/> - <location filename="../transactiondesc.cpp" line="118"/> - <location filename="../transactiondesc.cpp" line="178"/> - <source><b>To:</b> </source> + <location line="+37"/> + <location line="+12"/> + <location line="+45"/> + <location line="+17"/> + <location line="+30"/> + <source>Credit</source> <translation type="unfinished"></translation> </message> + <message numerus="yes"> + <location line="-102"/> + <source>matures in %n more block(s)</source> + <translation> + <numerusform>matures in %n more block</numerusform> + <numerusform>matures in %n more blocks</numerusform> + </translation> + </message> <message> - <location filename="../transactiondesc.cpp" line="98"/> - <source> (yours, label: </source> + <location line="+2"/> + <source>not accepted</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="100"/> - <source> (yours)</source> + <location line="+44"/> + <location line="+8"/> + <location line="+15"/> + <location line="+30"/> + <source>Debit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="136"/> - <location filename="../transactiondesc.cpp" line="150"/> - <location filename="../transactiondesc.cpp" line="195"/> - <location filename="../transactiondesc.cpp" line="212"/> - <source><b>Credit:</b> </source> + <location line="-39"/> + <source>Transaction fee</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="138"/> - <source>(%1 matures in %2 more blocks)</source> + <location line="+16"/> + <source>Net amount</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="142"/> - <source>(not accepted)</source> + <location line="+6"/> + <source>Message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="186"/> - <location filename="../transactiondesc.cpp" line="194"/> - <location filename="../transactiondesc.cpp" line="209"/> - <source><b>Debit:</b> </source> + <location line="+2"/> + <source>Comment</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="200"/> - <source><b>Transaction fee:</b> </source> + <location line="+2"/> + <source>Transaction ID</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="216"/> - <source><b>Net amount:</b> </source> + <location line="+3"/> + <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="222"/> - <source>Message:</source> + <location line="+7"/> + <source>Debug information</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+8"/> + <source>Transaction</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="224"/> - <source>Comment:</source> + <location line="+5"/> + <source>Inputs</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="226"/> - <source>Transaction ID:</source> + <location line="+23"/> + <source>Amount</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiondesc.cpp" line="229"/> - <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it's state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> + <location line="+1"/> + <source>true</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+0"/> + <source>false</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-212"/> + <source>, has not been successfully broadcast yet</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+36"/> + <source>unknown</source> <translation type="unfinished"></translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> - <location filename="../forms/transactiondescdialog.ui" line="14"/> + <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../forms/transactiondescdialog.ui" line="20"/> + <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation type="unfinished"></translation> </message> @@ -1657,27 +1801,27 @@ Address: %4 <context> <name>TransactionTableModel</name> <message> - <location filename="../transactiontablemodel.cpp" line="226"/> + <location filename="../transactiontablemodel.cpp" line="+226"/> <source>Date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="226"/> + <location line="+0"/> <source>Type</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="226"/> + <location line="+0"/> <source>Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="226"/> + <location line="+0"/> <source>Amount</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../transactiontablemodel.cpp" line="281"/> + <location line="+57"/> <source>Open for %n block(s)</source> <translation> <numerusform>Open for %n block</numerusform> @@ -1685,95 +1829,95 @@ Address: %4 </translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="284"/> + <location line="+3"/> <source>Open until %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="287"/> + <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="290"/> + <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="293"/> + <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../transactiontablemodel.cpp" line="301"/> + <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> - <translation type="unfinished"> - <numerusform></numerusform> - <numerusform></numerusform> + <translation> + <numerusform>Mined balance will be available when it matures in %n more block</numerusform> + <numerusform>Mined balance will be available when it matures in %n more blocks</numerusform> </translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="306"/> + <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="309"/> + <location line="+3"/> <source>Generated but not accepted</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="352"/> + <location line="+43"/> <source>Received with</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="354"/> + <location line="+2"/> <source>Received from</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="357"/> + <location line="+3"/> <source>Sent to</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="359"/> + <location line="+2"/> <source>Payment to yourself</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="361"/> + <location line="+2"/> <source>Mined</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="399"/> + <location line="+38"/> <source>(n/a)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="598"/> + <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="600"/> + <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="602"/> + <location line="+2"/> <source>Type of transaction.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="604"/> + <location line="+2"/> <source>Destination address of transaction.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactiontablemodel.cpp" line="606"/> + <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished"></translation> </message> @@ -1781,256 +1925,171 @@ Address: %4 <context> <name>TransactionView</name> <message> - <location filename="../transactionview.cpp" line="55"/> - <location filename="../transactionview.cpp" line="71"/> + <location filename="../transactionview.cpp" line="+55"/> + <location line="+16"/> <source>All</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="56"/> + <location line="-15"/> <source>Today</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="57"/> + <location line="+1"/> <source>This week</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="58"/> + <location line="+1"/> <source>This month</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="59"/> + <location line="+1"/> <source>Last month</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="60"/> + <location line="+1"/> <source>This year</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="61"/> + <location line="+1"/> <source>Range...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="72"/> + <location line="+11"/> <source>Received with</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="74"/> + <location line="+2"/> <source>Sent to</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="76"/> + <location line="+2"/> <source>To yourself</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="77"/> + <location line="+1"/> <source>Mined</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="78"/> + <location line="+1"/> <source>Other</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="85"/> + <location line="+7"/> <source>Enter address or label to search</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="92"/> + <location line="+7"/> <source>Min amount</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="126"/> + <location line="+34"/> <source>Copy address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="127"/> + <location line="+1"/> <source>Copy label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="128"/> + <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="129"/> + <location line="+1"/> <source>Edit label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="130"/> + <location line="+1"/> <source>Show transaction details</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="270"/> + <location line="+142"/> <source>Export Transaction Data</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="271"/> + <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="279"/> + <location line="+8"/> <source>Confirmed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="280"/> + <location line="+1"/> <source>Date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="281"/> + <location line="+1"/> <source>Type</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="282"/> + <location line="+1"/> <source>Label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="283"/> + <location line="+1"/> <source>Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="284"/> + <location line="+1"/> <source>Amount</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="285"/> + <location line="+1"/> <source>ID</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="289"/> + <location line="+4"/> <source>Error exporting</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="289"/> + <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="384"/> + <location line="+95"/> <source>Range:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="392"/> + <location line="+8"/> <source>to</source> <translation type="unfinished"></translation> </message> </context> <context> - <name>VerifyMessageDialog</name> - <message> - <location filename="../forms/verifymessagedialog.ui" line="14"/> - <source>Verify Signed Message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/verifymessagedialog.ui" line="55"/> - <source>&Verify Message</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/verifymessagedialog.ui" line="20"/> - <source>Enter the signing address, signature and message below (be careful to correctly copy newlines, spaces, tabs and other invisible characters) to verify the message.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/verifymessagedialog.ui" line="52"/> - <source>Verify a message to ensure it was signed with the specified Bitcoin address</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/verifymessagedialog.ui" line="66"/> - <source>Reset all verify message fields</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../forms/verifymessagedialog.ui" line="69"/> - <source>Clear &All</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../verifymessagedialog.cpp" line="27"/> - <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../verifymessagedialog.cpp" line="28"/> - <source>Enter Bitcoin signature</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../verifymessagedialog.cpp" line="51"/> - <source>"%1" is not a valid address.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../verifymessagedialog.cpp" line="51"/> - <location filename="../verifymessagedialog.cpp" line="59"/> - <source>Please check the address and try again.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../verifymessagedialog.cpp" line="59"/> - <source>"%1" does not refer to a key.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../verifymessagedialog.cpp" line="70"/> - <source>The signature could not be decoded.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../verifymessagedialog.cpp" line="70"/> - <location filename="../verifymessagedialog.cpp" line="83"/> - <source>Please check the signature and try again.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../verifymessagedialog.cpp" line="83"/> - <source>The signature did not match the message digest.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../verifymessagedialog.cpp" line="90"/> - <source>Message verification failed.</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../verifymessagedialog.cpp" line="95"/> - <source>Message verified.</source> - <translation type="unfinished"></translation> - </message> -</context> -<context> <name>WalletModel</name> <message> - <location filename="../walletmodel.cpp" line="167"/> + <location filename="../walletmodel.cpp" line="+192"/> <source>Sending...</source> <translation type="unfinished"></translation> </message> @@ -2038,493 +2097,513 @@ Address: %4 <context> <name>bitcoin-core</name> <message> - <location filename="../bitcoinstrings.cpp" line="61"/> + <location filename="../bitcoinstrings.cpp" line="+62"/> <source>Bitcoin version</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="135"/> + <location line="+76"/> <source>Usage:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="113"/> + <location line="-22"/> <source>Send command to -server or bitcoind</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="95"/> + <location line="-19"/> <source>List commands</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="87"/> + <location line="-9"/> <source>Get help for a command</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="105"/> + <location line="+19"/> <source>Options:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="123"/> + <location line="+19"/> <source>Specify configuration file (default: bitcoin.conf)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="126"/> + <location line="+3"/> <source>Specify pid file (default: bitcoind.pid)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="86"/> + <location line="-42"/> <source>Generate coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="72"/> + <location line="-14"/> <source>Don't generate coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="125"/> + <location line="+55"/> <source>Specify data directory</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="120"/> + <location line="-5"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="121"/> + <location line="+1"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="124"/> + <location line="+3"/> <source>Specify connection timeout (in milliseconds)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="97"/> + <location line="-28"/> <source>Listen for connections on <port> (default: 8333 or testnet: 18333)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="101"/> + <location line="+4"/> <source>Maintain at most <n> connections to peers (default: 125)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="70"/> + <location line="-32"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="127"/> + <location line="+59"/> <source>Specify your own public address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="104"/> - <source>Only connect to nodes in network <net> (IPv4 or IPv6)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="60"/> + <location line="-69"/> <source>Bind to given address. Use [host]:port notation for IPv6</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="129"/> + <location line="+71"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="35"/> + <location line="-96"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="102"/> - <source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 10000)</source> + <location line="-12"/> + <source>Detach block and address databases. Increases shutdown time (default: 0)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="103"/> - <source>Maximum per-connection send buffer, <n>*1000 bytes (default: 10000)</source> + <location line="+31"/> + <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="23"/> - <source>Detach block and address databases. Increases shutdown time (default: 0)</source> + <location line="+59"/> + <source>Run in the background as a daemon and accept commands</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="54"/> - <source>Accept command line and JSON-RPC commands</source> + <location line="+29"/> + <source>Use the test network</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="111"/> - <source>Run in the background as a daemon and accept commands</source> + <location line="-87"/> + <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="139"/> - <source>Use the test network</source> + <location line="+13"/> + <source>Connect only to the specified node(s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="106"/> - <source>Output extra debugging information</source> + <location line="+3"/> + <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="55"/> - <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> + <location line="+11"/> + <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="68"/> - <source>Connect only to the specified node(s)</source> + <location line="+2"/> + <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="71"/> - <source>Discover own IP address (default: 1 when listening and no -externalip)</source> + <location line="+9"/> + <source>Invalid -tor address: '%s'</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="82"/> - <source>Failed to listen on any port. Use -listen=0 if you want this.</source> + <location line="+10"/> + <source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> + <source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> + <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="108"/> + <location line="+1"/> + <source>Output extra network debugging information</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="112"/> + <location line="+4"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="115"/> + <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="116"/> + <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="137"/> + <location line="+21"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="138"/> + <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="140"/> + <location line="+1"/> + <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="107"/> + <location line="+3"/> + <source>Warning: this version is obsolete, upgrade required</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="-37"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="96"/> + <location line="-12"/> <source>Listen for JSON-RPC connections on <port> (default: 8332)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="58"/> + <location line="-39"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="114"/> + <location line="+58"/> <source>Send commands to node running on <ip> (default: 127.0.0.1)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="32"/> + <location line="-84"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="134"/> + <location line="+104"/> <source>Upgrade wallet to latest format</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="122"/> + <location line="-12"/> <source>Set key pool size to <n> (default: 100)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="109"/> + <location line="-13"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="88"/> + <location line="-23"/> <source>How many blocks to check at startup (default: 2500, 0 = all)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="89"/> + <location line="+1"/> <source>How thorough the block verification is (0-6, default: 1)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="90"/> + <location line="+1"/> <source>Imports blocks from external blk000?.dat file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="51"/> + <location line="-39"/> <source> SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="136"/> + <location line="+87"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="118"/> + <location line="-18"/> <source>Server certificate file (default: server.cert)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="119"/> + <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="17"/> + <location line="-104"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="142"/> + <location line="+128"/> <source>Warning: Disk space is low</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="128"/> + <location line="-15"/> <source>This help message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="20"/> + <location line="-110"/> <source>Cannot obtain a lock on data directory %s. Bitcoin is probably already running.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="62"/> + <location line="+42"/> <source>Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="131"/> + <location line="+71"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="69"/> + <location line="-64"/> <source>Connect through socks proxy</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="57"/> + <location line="-12"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="98"/> + <location line="+42"/> <source>Loading addresses...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="74"/> + <location line="-25"/> <source>Error loading blkindex.dat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="76"/> + <location line="+2"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="77"/> + <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="141"/> + <location line="+67"/> <source>Wallet needed to be rewritten: restart Bitcoin to complete</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="75"/> + <location line="-69"/> <source>Error loading wallet.dat</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="92"/> + <location line="+17"/> <source>Invalid -proxy address: '%s'</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="133"/> + <location line="+43"/> <source>Unknown network specified in -onlynet: '%s'</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="132"/> + <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="65"/> + <location line="-69"/> <source>Cannot resolve -bind address: '%s'</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="66"/> + <location line="+1"/> <source>Cannot resolve -externalip address: '%s'</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="93"/> + <location line="+28"/> <source>Invalid amount for -paytxfee=<amount>: '%s'</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="81"/> + <location line="-13"/> <source>Error: could not start node</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="80"/> + <location line="-1"/> <source>Error: Wallet locked, unable to create transaction </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="29"/> + <location line="-51"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="79"/> + <location line="+50"/> <source>Error: Transaction creation failed </source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="117"/> + <location line="+40"/> <source>Sending...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="25"/> + <location line="-94"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="94"/> + <location line="+70"/> <source>Invalid amount</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="91"/> + <location line="-4"/> <source>Insufficient funds</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="99"/> + <location line="+9"/> <source>Loading block index...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="56"/> + <location line="-44"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="38"/> + <location line="-18"/> <source>Unable to bind to %s on this computer. Bitcoin is probably already running.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="85"/> + <location line="+47"/> <source>Find peers using internet relay chat (default: 0)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="84"/> - <source>Find peers using DNS lookup (default: 1)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="83"/> + <location line="-2"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="40"/> + <location line="-43"/> <source>Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="100"/> + <location line="+61"/> <source>Loading wallet...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="63"/> + <location line="-38"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="64"/> + <location line="+1"/> <source>Cannot initialize keypool</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="67"/> + <location line="+3"/> <source>Cannot write default address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="110"/> + <location line="+45"/> <source>Rescanning...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="73"/> + <location line="-39"/> <source>Done loading</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="130"/> + <location line="+59"/> <source>To use the %s option</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="8"/> + <location line="-124"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: @@ -2536,24 +2615,24 @@ If the file does not exist, create it with owner-readable-only file permissions. <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="78"/> + <location line="+70"/> <source>Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="59"/> + <location line="-19"/> <source>An error occured while setting up the RPC port %i for listening: %s</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="46"/> + <location line="-13"/> <source>You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoinstrings.cpp" line="43"/> + <location line="-3"/> <source>Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly.</source> <translation type="unfinished"></translation> </message> diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts index 2636d196d6..aa93097c4c 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/bitcoin_es.ts @@ -270,7 +270,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>La contraseña del monedero ha sido cambiada correctamente.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts index 89228e5a97..e1be3866a1 100644 --- a/src/qt/locale/bitcoin_es_CL.ts +++ b/src/qt/locale/bitcoin_es_CL.ts @@ -270,7 +270,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>La contraseña de billetera ha sido cambiada con éxito.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts index aafd7a214f..c4c18244e9 100644 --- a/src/qt/locale/bitcoin_et.ts +++ b/src/qt/locale/bitcoin_et.ts @@ -263,7 +263,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> diff --git a/src/qt/locale/bitcoin_eu_ES.ts b/src/qt/locale/bitcoin_eu_ES.ts index 01a156c0b1..4466b568da 100644 --- a/src/qt/locale/bitcoin_eu_ES.ts +++ b/src/qt/locale/bitcoin_eu_ES.ts @@ -263,7 +263,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts index e918c460e5..7184b84b40 100644 --- a/src/qt/locale/bitcoin_fa.ts +++ b/src/qt/locale/bitcoin_fa.ts @@ -272,7 +272,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>عبارت عبور با موفقیت تغییر شد</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts index 01958e81d7..fd5116a547 100644 --- a/src/qt/locale/bitcoin_fa_IR.ts +++ b/src/qt/locale/bitcoin_fa_IR.ts @@ -263,7 +263,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts index e9fcf50330..a6ad4f8f77 100644 --- a/src/qt/locale/bitcoin_fi.ts +++ b/src/qt/locale/bitcoin_fi.ts @@ -270,7 +270,7 @@ Tahdotko varmasti salata lompakon?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Lompakon tunnuslause on vaihdettu.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts index 03ff69e3c6..bc71752a87 100644 --- a/src/qt/locale/bitcoin_fr.ts +++ b/src/qt/locale/bitcoin_fr.ts @@ -270,7 +270,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>La phrase de passe du porte-monnaie a été modifiée avec succès.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_fr_CA.ts b/src/qt/locale/bitcoin_fr_CA.ts index e3565d210b..a6bf6704b4 100644 --- a/src/qt/locale/bitcoin_fr_CA.ts +++ b/src/qt/locale/bitcoin_fr_CA.ts @@ -263,7 +263,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts index 224bf54d5d..de1d6aae30 100644 --- a/src/qt/locale/bitcoin_he.ts +++ b/src/qt/locale/bitcoin_he.ts @@ -270,7 +270,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>סיסמת הארנק שונתה בהצלחה.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/bitcoin_hr.ts index 300bbd64b6..20d1520d90 100644 --- a/src/qt/locale/bitcoin_hr.ts +++ b/src/qt/locale/bitcoin_hr.ts @@ -270,7 +270,7 @@ Jeste li sigurni da želite šifrirati svoj novčanik?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Lozinka novčanika je uspješno promijenjena.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts index e69453c8e6..67dd119650 100644 --- a/src/qt/locale/bitcoin_hu.ts +++ b/src/qt/locale/bitcoin_hu.ts @@ -264,7 +264,7 @@ Biztosan kódolni akarod a tárcát?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Jelszó megváltoztatva.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts index 92d3b7cf2d..fb3ceaa40e 100644 --- a/src/qt/locale/bitcoin_it.ts +++ b/src/qt/locale/bitcoin_it.ts @@ -270,7 +270,7 @@ Si è sicuri di voler cifrare il portamonete?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Passphrase del portamonete modificata con successo.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts index f14b5ecb86..d89080084e 100644 --- a/src/qt/locale/bitcoin_lt.ts +++ b/src/qt/locale/bitcoin_lt.ts @@ -271,7 +271,7 @@ Ar jūs tikrai norite užšifruoti savo piniginę?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Sėkmingai pakeistas piniginės slaptažodis</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts index 8f32f6b65f..4fe706a37b 100644 --- a/src/qt/locale/bitcoin_nb.ts +++ b/src/qt/locale/bitcoin_nb.ts @@ -270,7 +270,7 @@ Er du sikker på at du vil kryptere lommeboken?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Lommebokens adgangsfrase ble endret.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts index 8ffa7694ff..43ac38a211 100644 --- a/src/qt/locale/bitcoin_nl.ts +++ b/src/qt/locale/bitcoin_nl.ts @@ -271,7 +271,7 @@ Bent u er zeker van uw dat u uw portemonnee wilt versleutelen?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Portemonneewachtwoord is succesvol gewijzigd</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts index fe44a97a03..62535cf803 100644 --- a/src/qt/locale/bitcoin_pl.ts +++ b/src/qt/locale/bitcoin_pl.ts @@ -275,7 +275,7 @@ Czy na pewno chcesz zaszyfrować swój portfel?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Hasło do portfela zostało pomyślnie zmienione.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts index 64e292358e..2252b3129a 100644 --- a/src/qt/locale/bitcoin_pt_BR.ts +++ b/src/qt/locale/bitcoin_pt_BR.ts @@ -269,7 +269,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>A frase de segurança da carteira foi alterada com êxito.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts index bd7f74bb7f..30717fda8e 100644 --- a/src/qt/locale/bitcoin_pt_PT.ts +++ b/src/qt/locale/bitcoin_pt_PT.ts @@ -269,7 +269,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>A frase de segurança da carteira foi alterada com êxito.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts index 6b8bbd3732..1f387b06cf 100644 --- a/src/qt/locale/bitcoin_ro_RO.ts +++ b/src/qt/locale/bitcoin_ro_RO.ts @@ -264,7 +264,7 @@ Sunteţi sigur că doriţi să criptaţi portofelul electronic?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Parola portofelului electronic a fost schimbată.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index f4e3c8c851..2d481ec7c2 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -270,7 +270,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Пароль бумажника успешно изменён.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts index bd56dd1bf6..d423ae44be 100644 --- a/src/qt/locale/bitcoin_sk.ts +++ b/src/qt/locale/bitcoin_sk.ts @@ -264,7 +264,7 @@ Ste si istí, že si želáte zašifrovať peňaženku?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Heslo k peňaženke bolo úspešne zmenené.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts index 89d8f77a5f..bac82f14b9 100644 --- a/src/qt/locale/bitcoin_sr.ts +++ b/src/qt/locale/bitcoin_sr.ts @@ -264,7 +264,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Лозинка за приступ новчанику је успешно промењена.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts index d41390fb7c..9b03314d5e 100644 --- a/src/qt/locale/bitcoin_sv.ts +++ b/src/qt/locale/bitcoin_sv.ts @@ -270,7 +270,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Plånbokens lösenord har ändrats.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts index 4e0e82dc1d..b84e078cc1 100644 --- a/src/qt/locale/bitcoin_tr.ts +++ b/src/qt/locale/bitcoin_tr.ts @@ -270,7 +270,7 @@ Cüzdanınızı şifrelemek istediğinizden emin misiniz?</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Cüzdan parolası başarılı bir şekilde değiştirildi.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts index bf41f5113a..dda0e5b419 100644 --- a/src/qt/locale/bitcoin_uk.ts +++ b/src/qt/locale/bitcoin_uk.ts @@ -270,7 +270,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>Пароль було успішно змінено.</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts index 087e19b00e..6029be0708 100644 --- a/src/qt/locale/bitcoin_zh_CN.ts +++ b/src/qt/locale/bitcoin_zh_CN.ts @@ -270,7 +270,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>钱包口令修改成功</translation> </message> </context> diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts index c2b318e990..74027800c1 100644 --- a/src/qt/locale/bitcoin_zh_TW.ts +++ b/src/qt/locale/bitcoin_zh_TW.ts @@ -270,7 +270,7 @@ Are you sure you wish to encrypt your wallet?</source> </message> <message> <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet passphrase was succesfully changed.</source> + <source>Wallet passphrase was successfully changed.</source> <translation>錢包密碼變更成功.</translation> </message> </context> diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp index e668079536..c1c177dbfe 100644 --- a/src/qt/notificator.cpp +++ b/src/qt/notificator.cpp @@ -82,7 +82,7 @@ public: static int metaType(); - // Image to variant that can be marshaled over DBus + // Image to variant that can be marshalled over DBus static QVariant toVariant(const QImage &img); private: @@ -294,7 +294,7 @@ void Notificator::notify(Class cls, const QString &title, const QString &text, c default: if(cls == Critical) { - // Fall back to old fashioned popup dialog if critical and no other notification available + // Fall back to old fashioned pop-up dialog if critical and no other notification available QMessageBox::critical(parent, title, text, QMessageBox::Ok, QMessageBox::Ok); } break; diff --git a/src/qt/notificator.h b/src/qt/notificator.h index 0271c26f48..8abc0b2ec2 100644 --- a/src/qt/notificator.h +++ b/src/qt/notificator.h @@ -27,7 +27,7 @@ public: { Information, /**< Informational message */ Warning, /**< Notify user of potential problem */ - Critical /**< An error occured */ + Critical /**< An error occurred */ }; public slots: diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index e28b96b090..6bb7eaec2e 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -1,26 +1,17 @@ #include "optionsdialog.h" #include "ui_optionsdialog.h" -#include "bitcoinamountfield.h" #include "bitcoinunits.h" #include "monitoreddatamapper.h" #include "netbase.h" #include "optionsmodel.h" -#include "qvalidatedlineedit.h" -#include "qvaluecombobox.h" -#include <QCheckBox> #include <QDir> #include <QIntValidator> -#include <QLabel> -#include <QLineEdit> #include <QLocale> #include <QMessageBox> -#include <QPushButton> #include <QRegExp> #include <QRegExpValidator> -#include <QTabWidget> -#include <QWidget> OptionsDialog::OptionsDialog(QWidget *parent) : QDialog(parent), @@ -38,18 +29,19 @@ OptionsDialog::OptionsDialog(QWidget *parent) : ui->mapPortUpnp->setEnabled(false); #endif + ui->proxyIp->setEnabled(false); + ui->proxyPort->setEnabled(false); + ui->proxyPort->setValidator(new QIntValidator(1, 65535, this)); + ui->socksVersion->setEnabled(false); ui->socksVersion->addItem("5", 5); ui->socksVersion->addItem("4", 4); ui->socksVersion->setCurrentIndex(0); - ui->proxyIp->setEnabled(false); - ui->proxyPort->setEnabled(false); - ui->proxyPort->setValidator(new QIntValidator(0, 65535, this)); - - connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->socksVersion, SLOT(setEnabled(bool))); connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->proxyIp, SLOT(setEnabled(bool))); connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->proxyPort, SLOT(setEnabled(bool))); + connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->socksVersion, SLOT(setEnabled(bool))); + connect(ui->connectSocks, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning_Proxy())); ui->proxyIp->installEventFilter(this); @@ -68,21 +60,28 @@ OptionsDialog::OptionsDialog(QWidget *parent) : /** check if the locale name consists of 2 parts (language_country) */ if(langStr.contains("_")) { +#if QT_VERSION >= 0x040800 + /** display language strings as "native language - native country (locale name)", e.g. "Deutsch - Deutschland (de)" */ + ui->lang->addItem(locale.nativeLanguageName() + QString(" - ") + locale.nativeCountryName() + QString(" (") + langStr + QString(")"), QVariant(langStr)); +#else /** display language strings as "language - country (locale name)", e.g. "German - Germany (de)" */ ui->lang->addItem(QLocale::languageToString(locale.language()) + QString(" - ") + QLocale::countryToString(locale.country()) + QString(" (") + langStr + QString(")"), QVariant(langStr)); +#endif } else { +#if QT_VERSION >= 0x040800 + /** display language strings as "native language (locale name)", e.g. "Deutsch (de)" */ + ui->lang->addItem(locale.nativeLanguageName() + QString(" (") + langStr + QString(")"), QVariant(langStr)); +#else /** display language strings as "language (locale name)", e.g. "German (de)" */ ui->lang->addItem(QLocale::languageToString(locale.language()) + QString(" (") + langStr + QString(")"), QVariant(langStr)); +#endif } } ui->unit->setModel(new BitcoinUnits(this)); - connect(ui->connectSocks, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning_Proxy())); - connect(ui->lang, SIGNAL(activated(int)), this, SLOT(showRestartWarning_Lang())); - /* Widget-to-option mapper */ mapper = new MonitoredDataMapper(this); mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit); @@ -92,8 +91,8 @@ OptionsDialog::OptionsDialog(QWidget *parent) : connect(mapper, SIGNAL(viewModified()), this, SLOT(enableSaveButtons())); /* disable save buttons when new data loaded */ connect(mapper, SIGNAL(currentIndexChanged(int)), this, SLOT(disableSaveButtons())); - /* disable/enable save buttons when proxy IP is invalid/valid */ - connect(this, SIGNAL(proxyIpValid(bool)), this, SLOT(setSaveButtonState(bool))); + /* setup/change UI elements when proxy IP is invalid/valid */ + connect(this, SIGNAL(proxyIpValid(QValidatedLineEdit *, bool)), this, SLOT(handleProxyIpValid(QValidatedLineEdit *, bool))); } OptionsDialog::~OptionsDialog() @@ -114,8 +113,11 @@ void OptionsDialog::setModel(OptionsModel *model) mapper->toFirst(); } - // update the display unit, to not use the default ("BTC") + /* update the display unit, to not use the default ("BTC") */ updateDisplayUnit(); + + /* warn only when language selection changes (placed here so init of ui->lang via mapper doesn't trigger this) */ + connect(ui->lang, SIGNAL(valueChanged()), this, SLOT(showRestartWarning_Lang())); } void OptionsDialog::setMapper() @@ -127,10 +129,11 @@ void OptionsDialog::setMapper() /* Network */ mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP); + mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse); - mapper->addMapping(ui->socksVersion, OptionsModel::ProxySocksVersion); mapper->addMapping(ui->proxyIp, OptionsModel::ProxyIP); mapper->addMapping(ui->proxyPort, OptionsModel::ProxyPort); + mapper->addMapping(ui->socksVersion, OptionsModel::ProxySocksVersion); /* Window */ #ifndef Q_WS_MAC @@ -146,7 +149,7 @@ void OptionsDialog::setMapper() void OptionsDialog::enableSaveButtons() { - // prevent enabling of the save buttons when data modified, if there is an invalid proxy address present + /* prevent enabling of the save buttons when data modified, if there is an invalid proxy address present */ if(fProxyIpValid) setSaveButtonState(true); } @@ -201,30 +204,39 @@ void OptionsDialog::updateDisplayUnit() { if(model) { - // Update transactionFee with the current unit + /* Update transactionFee with the current unit */ ui->transactionFee->setDisplayUnit(model->getDisplayUnit()); } } +void OptionsDialog::handleProxyIpValid(QValidatedLineEdit *object, bool fState) +{ + // this is used in a check before re-enabling the save buttons + fProxyIpValid = fState; + + if(fProxyIpValid) + { + enableSaveButtons(); + ui->statusLabel->clear(); + } + else + { + disableSaveButtons(); + object->setValid(fProxyIpValid); + ui->statusLabel->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel->setText(tr("The supplied proxy address is invalid.")); + } +} + bool OptionsDialog::eventFilter(QObject *object, QEvent *event) { - if(object == ui->proxyIp && event->type() == QEvent::FocusOut) + if(event->type() == QEvent::FocusOut) { - // Check proxyIP for a valid IPv4/IPv6 address - CService addr; - if(!LookupNumeric(ui->proxyIp->text().toStdString().c_str(), addr)) - { - ui->proxyIp->setValid(false); - fProxyIpValid = false; - ui->statusLabel->setStyleSheet("QLabel { color: red; }"); - ui->statusLabel->setText(tr("The supplied proxy address is invalid.")); - emit proxyIpValid(false); - } - else + if(object == ui->proxyIp) { - fProxyIpValid = true; - ui->statusLabel->clear(); - emit proxyIpValid(true); + CService addr; + /* Check proxyIp for a valid IPv4/IPv6 address and emit the proxyIpValid signal */ + emit proxyIpValid(ui->proxyIp, LookupNumeric(ui->proxyIp->text().toStdString().c_str(), addr)); } } return QDialog::eventFilter(object, event); diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h index 7e91c96475..9e91000b63 100644 --- a/src/qt/optionsdialog.h +++ b/src/qt/optionsdialog.h @@ -8,6 +8,7 @@ class OptionsDialog; } class OptionsModel; class MonitoredDataMapper; +class QValidatedLineEdit; /** Preferences dialog. */ class OptionsDialog : public QDialog @@ -38,9 +39,10 @@ private slots: void showRestartWarning_Proxy(); void showRestartWarning_Lang(); void updateDisplayUnit(); + void handleProxyIpValid(QValidatedLineEdit *object, bool fState); signals: - void proxyIpValid(bool fValid); + void proxyIpValid(QValidatedLineEdit *object, bool fValid); private: Ui::OptionsDialog *ui; diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 0ee6d8e0c4..caa33414b2 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -144,8 +144,6 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const return QVariant(fMinimizeOnClose); case ProxyUse: return settings.value("fUseProxy", false); - case ProxySocksVersion: - return settings.value("nSocksVersion", 5); case ProxyIP: { CService addrProxy; if (GetProxy(NET_IPV4, addrProxy)) @@ -160,6 +158,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const else return 9050; } + case ProxySocksVersion: + return settings.value("nSocksVersion", 5); case Fee: return QVariant(nTransactionFee); case DisplayUnit: @@ -192,11 +192,9 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in settings.setValue("fMinimizeToTray", fMinimizeToTray); break; case MapPortUPnP: - { - fUseUPnP = value.toBool(); - settings.setValue("fUseUPnP", fUseUPnP); - MapPort(); - } + fUseUPnP = value.toBool(); + settings.setValue("fUseUPnP", fUseUPnP); + MapPort(); break; case MinimizeOnClose: fMinimizeOnClose = value.toBool(); @@ -206,60 +204,41 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in settings.setValue("fUseProxy", value.toBool()); ApplyProxySettings(); break; - case ProxySocksVersion: - settings.setValue("nSocksVersion", value.toInt()); - ApplyProxySettings(); - break; case ProxyIP: { CService addrProxy("127.0.0.1", 9050); GetProxy(NET_IPV4, addrProxy); CNetAddr addr(value.toString().toStdString()); - if (addr.IsValid()) - { - addrProxy.SetIP(addr); - settings.setValue("addrProxy", addrProxy.ToStringIPPort().c_str()); - successful = ApplyProxySettings(); - } - else - { - successful = false; - } + addrProxy.SetIP(addr); + settings.setValue("addrProxy", addrProxy.ToStringIPPort().c_str()); + successful = ApplyProxySettings(); } break; case ProxyPort: { CService addrProxy("127.0.0.1", 9050); GetProxy(NET_IPV4, addrProxy); - int nPort = atoi(value.toString().toAscii().data()); - if (nPort > 0 && nPort < std::numeric_limits<unsigned short>::max()) - { - addrProxy.SetPort(nPort); - settings.setValue("addrProxy", addrProxy.ToStringIPPort().c_str()); - successful = ApplyProxySettings(); - } - else - { - successful = false; - } + addrProxy.SetPort(value.toInt()); + settings.setValue("addrProxy", addrProxy.ToStringIPPort().c_str()); + successful = ApplyProxySettings(); } break; - case Fee: { + case ProxySocksVersion: + settings.setValue("nSocksVersion", value.toInt()); + ApplyProxySettings(); + break; + case Fee: nTransactionFee = value.toLongLong(); settings.setValue("nTransactionFee", nTransactionFee); - } break; - case DisplayUnit: { - int unit = value.toInt(); - nDisplayUnit = unit; + case DisplayUnit: + nDisplayUnit = value.toInt(); settings.setValue("nDisplayUnit", nDisplayUnit); - emit displayUnitChanged(unit); - } + emit displayUnitChanged(nDisplayUnit); break; - case DisplayAddresses: { + case DisplayAddresses: bDisplayAddresses = value.toBool(); settings.setValue("bDisplayAddresses", bDisplayAddresses); - } break; case DetachDatabases: { bool fDetachDB = value.toBool(); @@ -267,9 +246,8 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in settings.setValue("detachDB", fDetachDB); } break; - case Language: { + case Language: settings.setValue("language", value); - } break; default: break; diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h index b196f0bf60..34724ad032 100644 --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -12,23 +12,24 @@ class OptionsModel : public QAbstractListModel { Q_OBJECT + public: explicit OptionsModel(QObject *parent = 0); enum OptionID { - StartAtStartup, // bool - MinimizeToTray, // bool - MapPortUPnP, // bool - MinimizeOnClose, // bool - ProxyUse, // bool + StartAtStartup, // bool + MinimizeToTray, // bool + MapPortUPnP, // bool + MinimizeOnClose, // bool + ProxyUse, // bool + ProxyIP, // QString + ProxyPort, // int ProxySocksVersion, // int - ProxyIP, // QString - ProxyPort, // int - Fee, // qint64 - DisplayUnit, // BitcoinUnits::Unit - DisplayAddresses, // bool - DetachDatabases, // bool - Language, // QString + Fee, // qint64 + DisplayUnit, // BitcoinUnits::Unit + DisplayAddresses, // bool + DetachDatabases, // bool + Language, // QString OptionIDRowCount, }; @@ -48,17 +49,16 @@ public: int getDisplayUnit(); bool getDisplayAddresses(); QString getLanguage() { return language; } + private: int nDisplayUnit; bool bDisplayAddresses; bool fMinimizeToTray; bool fMinimizeOnClose; QString language; + signals: void displayUnitChanged(int unit); - -public slots: - }; #endif // OPTIONSMODEL_H diff --git a/src/qt/qtipcserver.cpp b/src/qt/qtipcserver.cpp index 5ff00451e5..ccdfc66bad 100644 --- a/src/qt/qtipcserver.cpp +++ b/src/qt/qtipcserver.cpp @@ -1,77 +1,97 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "qtipcserver.h" +#include "guiconstants.h" +#include "ui_interface.h" +#include "util.h" -#include <boost/algorithm/string.hpp> -#include <boost/interprocess/ipc/message_queue.hpp> -#include <boost/tokenizer.hpp> #include <boost/date_time/posix_time/posix_time.hpp> +#include <boost/interprocess/ipc/message_queue.hpp> #include <boost/version.hpp> #if defined(WIN32) && (!defined(BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME) || !defined(BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME) || BOOST_VERSION < 104900) #warning Compiling without BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME and BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME uncommented in boost/interprocess/detail/tmp_dir_helpers.hpp or using a boost version before 1.49 may have unintended results see svn.boost.org/trac/boost/ticket/5392 #endif -#include "ui_interface.h" -#include "qtipcserver.h" - +using namespace boost; using namespace boost::interprocess; using namespace boost::posix_time; -using namespace boost; -using namespace std; + +static void ipcThread2(void* pArg); #ifdef MAC_OSX // URI handling not implemented on OSX yet void ipcInit() { } -void ipcShutdown() { } #else -void ipcShutdown() +static void ipcThread(void* pArg) { - message_queue::remove(BITCOINURI_QUEUE_NAME); + IMPLEMENT_RANDOMIZE_STACK(ipcThread(pArg)); + + // Make this thread recognisable as the GUI-IPC thread + RenameThread("bitcoin-gui-ipc"); + + try + { + ipcThread2(pArg); + } + catch (std::exception& e) { + PrintExceptionContinue(&e, "ipcThread()"); + } catch (...) { + PrintExceptionContinue(NULL, "ipcThread()"); + } + printf("ipcThread exited\n"); } -void ipcThread(void* parg) +static void ipcThread2(void* pArg) { - message_queue* mq = (message_queue*)parg; - char strBuf[257]; - size_t nSize; - unsigned int nPriority; + printf("ipcThread started\n"); + + message_queue* mq = (message_queue*)pArg; + char buffer[MAX_URI_LENGTH + 1] = ""; + size_t nSize = 0; + unsigned int nPriority = 0; + loop { ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(100); - if(mq->timed_receive(&strBuf, sizeof(strBuf), nSize, nPriority, d)) + if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d)) { - uiInterface.ThreadSafeHandleURI(std::string(strBuf, nSize)); + uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize)); Sleep(1000); } + if (fShutdown) - { - ipcShutdown(); break; - } } - ipcShutdown(); + + // Remove message queue + message_queue::remove(BITCOINURI_QUEUE_NAME); + // Cleanup allocated memory + delete mq; } void ipcInit() { - message_queue* mq; - char strBuf[257]; - size_t nSize; - unsigned int nPriority; + message_queue* mq = NULL; + char buffer[MAX_URI_LENGTH + 1] = ""; + size_t nSize = 0; + unsigned int nPriority = 0; + try { - mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, 256); + mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH); // Make sure we don't lose any bitcoin: URIs for (int i = 0; i < 2; i++) { ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(1); - if(mq->timed_receive(&strBuf, sizeof(strBuf), nSize, nPriority, d)) + if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d)) { - uiInterface.ThreadSafeHandleURI(std::string(strBuf, nSize)); + uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize)); } else break; @@ -79,14 +99,19 @@ void ipcInit() // Make sure only one bitcoin instance is listening message_queue::remove(BITCOINURI_QUEUE_NAME); - mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, 256); + delete mq; + + mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH); } catch (interprocess_exception &ex) { + printf("ipcInit() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what()); return; } + if (!CreateThread(ipcThread, mq)) { delete mq; + return; } } diff --git a/src/qt/qtipcserver.h b/src/qt/qtipcserver.h index fcff10d8da..484b6222eb 100644 --- a/src/qt/qtipcserver.h +++ b/src/qt/qtipcserver.h @@ -1,4 +1,9 @@ +#ifndef QTIPCSERVER_H +#define QTIPCSERVER_H + +// Define Bitcoin-Qt message queue name #define BITCOINURI_QUEUE_NAME "BitcoinURI" void ipcInit(); -void ipcShutdown(); + +#endif // QTIPCSERVER_H diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 86c2b01fec..2c46ea5a70 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -121,7 +121,7 @@ void SendCoinsDialog::on_sendButton_clicked() { case WalletModel::InvalidAddress: QMessageBox::warning(this, tr("Send Coins"), - tr("The recepient address is not valid, please recheck."), + tr("The recipient address is not valid, please recheck."), QMessageBox::Ok, QMessageBox::Ok); break; case WalletModel::InvalidAmount: diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp index f8edbf80ea..b3fc69ef0f 100644 --- a/src/qt/signverifymessagedialog.cpp +++ b/src/qt/signverifymessagedialog.cpp @@ -126,7 +126,7 @@ void SignVerifyMessageDialog::on_signMessageButton_SM_clicked() if (!ctx.isValid()) { ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); - ui->statusLabel_SM->setText(tr("Wallet unlock was canceled.")); + ui->statusLabel_SM->setText(tr("Wallet unlock was cancelled.")); return; } diff --git a/src/qt/transactionfilterproxy.h b/src/qt/transactionfilterproxy.h index 8d6829d6f0..30b98588f0 100644 --- a/src/qt/transactionfilterproxy.h +++ b/src/qt/transactionfilterproxy.h @@ -23,7 +23,7 @@ public: void setDateRange(const QDateTime &from, const QDateTime &to); void setAddressPrefix(const QString &addrPrefix); /** - @note Type filter takes a bitfield created with TYPE() or ALL_TYPES + @note Type filter takes a bit field created with TYPE() or ALL_TYPES */ void setTypeFilter(quint32 modes); void setMinAmount(qint64 minimum); diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index a0e7dd4e77..ed2a70a350 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -160,6 +160,8 @@ void TransactionView::setModel(WalletModel *model) transactionProxyModel = new TransactionFilterProxy(this); transactionProxyModel->setSourceModel(model->getTransactionTableModel()); transactionProxyModel->setDynamicSortFilter(true); + transactionProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); + transactionProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); transactionProxyModel->setSortRole(Qt::EditRole); @@ -203,7 +205,7 @@ void TransactionView::chooseDate(int idx) TransactionFilterProxy::MAX_DATE); break; case ThisWeek: { - // Find last monday + // Find last Monday QDate startOfWeek = current.addDays(-(current.dayOfWeek()-1)); transactionProxyModel->setDateRange( QDateTime(startOfWeek), diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 0111e0cd91..3568616cd3 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -23,13 +23,10 @@ WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *p addressTableModel = new AddressTableModel(wallet, this); transactionTableModel = new TransactionTableModel(wallet, this); - // This single-shot timer will be fired from the 'checkBalancedChanged' - // method repeatedly while either of the unconfirmed or immature balances - // are non-zero + // This timer will be fired repeatedly to update the balance pollTimer = new QTimer(this); - pollTimer->setInterval(MODEL_UPDATE_DELAY); - pollTimer->setSingleShot(true); connect(pollTimer, SIGNAL(timeout()), this, SLOT(pollBalanceChanged())); + pollTimer->start(MODEL_UPDATE_DELAY); subscribeToCoreSignals(); } @@ -74,13 +71,12 @@ void WalletModel::updateStatus() void WalletModel::pollBalanceChanged() { - if(nBestHeight != cachedNumBlocks) { + if(nBestHeight != cachedNumBlocks) + { + // Balance and number of transactions might have changed cachedNumBlocks = nBestHeight; checkBalanceChanged(); } - - if(cachedUnconfirmedBalance || cachedImmatureBalance) - pollTimer->start(); } void WalletModel::checkBalanceChanged() @@ -89,7 +85,8 @@ void WalletModel::checkBalanceChanged() qint64 newUnconfirmedBalance = getUnconfirmedBalance(); qint64 newImmatureBalance = getImmatureBalance(); - if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance) { + if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance) + { cachedBalance = newBalance; cachedUnconfirmedBalance = newUnconfirmedBalance; cachedImmatureBalance = newImmatureBalance; @@ -105,13 +102,11 @@ void WalletModel::updateTransaction(const QString &hash, int status) // Balance and number of transactions might have changed checkBalanceChanged(); - if(cachedUnconfirmedBalance || cachedImmatureBalance) - pollTimer->start(); - int newNumTransactions = getNumTransactions(); - if(cachedNumTransactions != newNumTransactions) { - emit numTransactionsChanged(newNumTransactions); + if(cachedNumTransactions != newNumTransactions) + { cachedNumTransactions = newNumTransactions; + emit numTransactionsChanged(newNumTransactions); } } diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index 63c2dfe0ac..66e4d85f37 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -10,6 +10,7 @@ #include "db.h" #include "init.h" #include "main.h" +#include "net.h" #include "wallet.h" using namespace std; @@ -275,14 +276,16 @@ Value decoderawtransaction(const Array& params, bool fHelp) Value signrawtransaction(const Array& params, bool fHelp) { - if (fHelp || params.size() < 1 || params.size() > 3) + if (fHelp || params.size() < 1 || params.size() > 4) throw runtime_error( - "signrawtransaction <hex string> [{\"txid\":txid,\"vout\":n,\"scriptPubKey\":hex},...] [<privatekey1>,...]\n" + "signrawtransaction <hex string> [{\"txid\":txid,\"vout\":n,\"scriptPubKey\":hex},...] [<privatekey1>,...] [sighashtype=\"ALL\"]\n" "Sign inputs for raw transaction (serialized, hex-encoded).\n" "Second optional argument is an array of previous transaction outputs that\n" "this transaction depends on but may not yet be in the blockchain.\n" "Third optional argument is an array of base58-encoded private\n" "keys that, if given, will be the only keys used to sign the transaction.\n" + "Fourth option is a string that is one of six values; ALL, NONE, SINGLE or\n" + "ALL|ANYONECANPAY, NONE|ANYONECANPAY, SINGLE|ANYONECANPAY.\n" "Returns json object with keys:\n" " hex : raw transaction with signature(s) (hex-encoded string)\n" " complete : 1 if transaction has a complete set of signature (0 if not)" @@ -401,6 +404,25 @@ Value signrawtransaction(const Array& params, bool fHelp) } const CKeyStore& keystore = (fGivenKeys ? tempKeystore : *pwalletMain); + int nHashType = SIGHASH_ALL; + if (params.size() > 3) + { + static map<string, int> mapSigHashValues = + boost::assign::map_list_of + (string("ALL"), int(SIGHASH_ALL)) + (string("ALL|ANYONECANPAY"), int(SIGHASH_ALL|SIGHASH_ANYONECANPAY)) + (string("NONE"), int(SIGHASH_NONE)) + (string("NONE|ANYONECANPAY"), int(SIGHASH_NONE|SIGHASH_ANYONECANPAY)) + (string("SINGLE"), int(SIGHASH_SINGLE)) + (string("SINGLE|ANYONECANPAY"), int(SIGHASH_SINGLE|SIGHASH_ANYONECANPAY)) + ; + string strHashType = params[3].get_str(); + if (mapSigHashValues.count(strHashType)) + nHashType = mapSigHashValues[strHashType]; + else + throw JSONRPCError(-8, "Invalid sighash param"); + } + // Sign what we can: for (unsigned int i = 0; i < mergedTx.vin.size(); i++) { @@ -413,7 +435,7 @@ Value signrawtransaction(const Array& params, bool fHelp) const CScript& prevPubKey = mapPrevOut[txin.prevout]; txin.scriptSig.clear(); - SignSignature(keystore, prevPubKey, mergedTx, i); + SignSignature(keystore, prevPubKey, mergedTx, i, nHashType); // ... and merge in other signatures: BOOST_FOREACH(const CTransaction& txv, txVariants) @@ -454,17 +476,29 @@ Value sendrawtransaction(const Array& params, bool fHelp) catch (std::exception &e) { throw JSONRPCError(-22, "TX decode failed"); } + uint256 hashTx = tx.GetHash(); - // push to local node - CTxDB txdb("r"); - if (!tx.AcceptToMemoryPool(txdb)) - throw JSONRPCError(-22, "TX rejected"); - - SyncWithWallets(tx, NULL, true); + // See if the transaction is already in a block + // or in the memory pool: + CTransaction existingTx; + uint256 hashBlock = 0; + if (GetTransaction(hashTx, existingTx, hashBlock)) + { + if (hashBlock != 0) + throw JSONRPCError(-5, string("transaction already in block ")+hashBlock.GetHex()); + // Not in block, but already in the memory pool; will drop + // through to re-relay it. + } + else + { + // push to local node + CTxDB txdb("r"); + if (!tx.AcceptToMemoryPool(txdb)) + throw JSONRPCError(-22, "TX rejected"); - // relay to network - CInv inv(MSG_TX, tx.GetHash()); - RelayInventory(inv); + SyncWithWallets(tx, NULL, true); + } + RelayMessage(CInv(MSG_TX, hashTx), tx); - return tx.GetHash().GetHex(); + return hashTx.GetHex(); } diff --git a/src/script.cpp b/src/script.cpp index c29648c2bc..8c35f0eed5 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1070,7 +1070,7 @@ uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int } else if ((nHashType & 0x1f) == SIGHASH_SINGLE) { - // Only lockin the txout payee at same index as txin + // Only lock-in the txout payee at same index as txin unsigned int nOut = nIn; if (nOut >= txTmp.vout.size()) { @@ -1272,7 +1272,7 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi if (!script2.GetOp(pc2, opcode2, vch2)) break; // Normal situation is to fall through - // to other if/else statments + // to other if/else statements } if (opcode2 == OP_PUBKEY) @@ -1345,7 +1345,7 @@ bool SignN(const vector<valtype>& multisigdata, const CKeyStore& keystore, uint2 // Sign scriptPubKey with private keys stored in keystore, given transaction hash and hash type. // Signatures are returned in scriptSigRet (or returns false if scriptPubKey can't be signed), // unless whichTypeRet is TX_SCRIPTHASH, in which case scriptSigRet is the redemption script. -// Returns false if scriptPubKey could not be completely satisified. +// Returns false if scriptPubKey could not be completely satisfied. // bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash, int nHashType, CScript& scriptSigRet, txnouttype& whichTypeRet) @@ -1733,7 +1733,7 @@ static CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, return PushAll(sigs1); else { - // Recurse to combine: + // Recur to combine: valtype spk = sigs1.back(); CScript pubKey2(spk.begin(), spk.end()); @@ -1811,7 +1811,7 @@ unsigned int CScript::GetSigOpCount(const CScript& scriptSig) const return 0; } - /// ... and return it's opcount: + /// ... and return its opcount: CScript subscript(data.begin(), data.end()); return subscript.GetSigOpCount(true); } diff --git a/src/script.h b/src/script.h index f4db112dd6..fdcf802945 100644 --- a/src/script.h +++ b/src/script.h @@ -378,7 +378,7 @@ public: { // I'm not sure if this should push the script or concatenate scripts. // If there's ever a use for pushing a script onto a script, delete this member fn - assert(!"warning: pushing a CScript onto a CScript with << is probably not intended, use + to concatenate"); + assert(!"Warning: Pushing a CScript onto a CScript with << is probably not intended, use + to concatenate!"); return *this; } diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp index 4a185b3cc5..7f08dd5543 100644 --- a/src/test/DoS_tests.cpp +++ b/src/test/DoS_tests.cpp @@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE(DoS_banning) CNode dummyNode1(INVALID_SOCKET, addr1, "", true); dummyNode1.Misbehaving(100); // Should get banned BOOST_CHECK(CNode::IsBanned(addr1)); - BOOST_CHECK(!CNode::IsBanned(ip(0xa0b0c001|0x0000ff00))); // Different ip, not banned + BOOST_CHECK(!CNode::IsBanned(ip(0xa0b0c001|0x0000ff00))); // Different IP, not banned CAddress addr2(ip(0xa0b0c002)); CNode dummyNode2(INVALID_SOCKET, addr2, "", true); diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 5712b4a1b1..3c6039541e 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -1,12 +1,202 @@ #include <boost/test/unit_test.hpp> +#include "init.h" +#include "main.h" #include "uint256.h" #include "util.h" +#include "wallet.h" extern void SHA256Transform(void* pstate, void* pinput, const void* pinit); BOOST_AUTO_TEST_SUITE(miner_tests) +static +struct { + unsigned char extranonce; + unsigned int nonce; +} blockinfo[] = { + {4, 0xa4a3e223}, {2, 0x15c32f9e}, {1, 0x0375b547}, {1, 0x7004a8a5}, + {2, 0xce440296}, {2, 0x52cfe198}, {1, 0x77a72cd0}, {2, 0xbb5d6f84}, + {2, 0x83f30c2c}, {1, 0x48a73d5b}, {1, 0xef7dcd01}, {2, 0x6809c6c4}, + {2, 0x0883ab3c}, {1, 0x087bbbe2}, {2, 0x2104a814}, {2, 0xdffb6daa}, + {1, 0xee8a0a08}, {2, 0xba4237c1}, {1, 0xa70349dc}, {1, 0x344722bb}, + {3, 0xd6294733}, {2, 0xec9f5c94}, {2, 0xca2fbc28}, {1, 0x6ba4f406}, + {2, 0x015d4532}, {1, 0x6e119b7c}, {2, 0x43e8f314}, {2, 0x27962f38}, + {2, 0xb571b51b}, {2, 0xb36bee23}, {2, 0xd17924a8}, {2, 0x6bc212d9}, + {1, 0x630d4948}, {2, 0x9a4c4ebb}, {2, 0x554be537}, {1, 0xd63ddfc7}, + {2, 0xa10acc11}, {1, 0x759a8363}, {2, 0xfb73090d}, {1, 0xe82c6a34}, + {1, 0xe33e92d7}, {3, 0x658ef5cb}, {2, 0xba32ff22}, {5, 0x0227a10c}, + {1, 0xa9a70155}, {5, 0xd096d809}, {1, 0x37176174}, {1, 0x830b8d0f}, + {1, 0xc6e3910e}, {2, 0x823f3ca8}, {1, 0x99850849}, {1, 0x7521fb81}, + {1, 0xaacaabab}, {1, 0xd645a2eb}, {5, 0x7aea1781}, {5, 0x9d6e4b78}, + {1, 0x4ce90fd8}, {1, 0xabdc832d}, {6, 0x4a34f32a}, {2, 0xf2524c1c}, + {2, 0x1bbeb08a}, {1, 0xad47f480}, {1, 0x9f026aeb}, {1, 0x15a95049}, + {2, 0xd1cb95b2}, {2, 0xf84bbda5}, {1, 0x0fa62cd1}, {1, 0xe05f9169}, + {1, 0x78d194a9}, {5, 0x3e38147b}, {5, 0x737ba0d4}, {1, 0x63378e10}, + {1, 0x6d5f91cf}, {2, 0x88612eb8}, {2, 0xe9639484}, {1, 0xb7fabc9d}, + {2, 0x19b01592}, {1, 0x5a90dd31}, {2, 0x5bd7e028}, {2, 0x94d00323}, + {1, 0xa9b9c01a}, {1, 0x3a40de61}, {1, 0x56e7eec7}, {5, 0x859f7ef6}, + {1, 0xfd8e5630}, {1, 0x2b0c9f7f}, {1, 0xba700e26}, {1, 0x7170a408}, + {1, 0x70de86a8}, {1, 0x74d64cd5}, {1, 0x49e738a1}, {2, 0x6910b602}, + {0, 0x643c565f}, {1, 0x54264b3f}, {2, 0x97ea6396}, {2, 0x55174459}, + {2, 0x03e8779a}, {1, 0x98f34d8f}, {1, 0xc07b2b07}, {1, 0xdfe29668}, + {1, 0x3141c7c1}, {1, 0xb3b595f4}, {1, 0x735abf08}, {5, 0x623bfbce}, + {2, 0xd351e722}, {1, 0xf4ca48c9}, {1, 0x5b19c670}, {1, 0xa164bf0e}, + {2, 0xbbbeb305}, {2, 0xfe1c810a}, +}; + +// NOTE: These tests rely on CreateNewBlock doing its own self-validation! +BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) +{ + CReserveKey reservekey(pwalletMain); + CBlock *pblock; + CTransaction tx; + CScript script; + uint256 hash; + + // Simple block creation, nothing special yet: + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + + // We can't make transactions until we have inputs + // Therefore, load 100 blocks :) + std::vector<CTransaction*>txFirst; + for (unsigned int i = 0; i < sizeof(blockinfo)/sizeof(*blockinfo); ++i) + { + pblock->nTime = pindexBest->GetMedianTimePast()+1; + pblock->vtx[0].vin[0].scriptSig = CScript(); + pblock->vtx[0].vin[0].scriptSig.push_back(blockinfo[i].extranonce); + pblock->vtx[0].vin[0].scriptSig.push_back(pindexBest->nHeight); + pblock->vtx[0].vout[0].scriptPubKey = CScript(); + if (txFirst.size() < 2) + txFirst.push_back(new CTransaction(pblock->vtx[0])); + pblock->hashMerkleRoot = pblock->BuildMerkleTree(); + pblock->nNonce = blockinfo[i].nonce; + assert(ProcessBlock(NULL, pblock)); + pblock->hashPrevBlock = pblock->GetHash(); + } + delete pblock; + + // Just to make sure we can still make simple blocks + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + + // block sigops > limit: 1000 CHECKMULTISIG + 1 + tx.vin.resize(1); + // NOTE: OP_NOP is used to force 20 SigOps for the CHECKMULTISIG + tx.vin[0].scriptSig = CScript() << OP_0 << OP_0 << OP_0 << OP_NOP << OP_CHECKMULTISIG << OP_1; + tx.vin[0].prevout.hash = txFirst[0]->GetHash(); + tx.vin[0].prevout.n = 0; + tx.vout.resize(1); + tx.vout[0].nValue = 5000000000LL; + for (unsigned int i = 0; i < 1001; ++i) + { + tx.vout[0].nValue -= 1000000; + hash = tx.GetHash(); + mempool.addUnchecked(hash, tx); + tx.vin[0].prevout.hash = hash; + } + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + delete pblock; + mempool.clear(); + + // block size > limit + tx.vin[0].scriptSig = CScript(); + // 18 * (520char + DROP) + OP_1 = 9433 bytes + std::vector<unsigned char> vchData(520); + for (unsigned int i = 0; i < 18; ++i) + tx.vin[0].scriptSig << vchData << OP_DROP; + tx.vin[0].scriptSig << OP_1; + tx.vin[0].prevout.hash = txFirst[0]->GetHash(); + tx.vout[0].nValue = 5000000000LL; + for (unsigned int i = 0; i < 128; ++i) + { + tx.vout[0].nValue -= 10000000; + hash = tx.GetHash(); + mempool.addUnchecked(hash, tx); + tx.vin[0].prevout.hash = hash; + } + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + delete pblock; + mempool.clear(); + + // orphan in mempool + hash = tx.GetHash(); + mempool.addUnchecked(hash, tx); + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + delete pblock; + mempool.clear(); + + // child with higher priority than parent + tx.vin[0].scriptSig = CScript() << OP_1; + tx.vin[0].prevout.hash = txFirst[1]->GetHash(); + tx.vout[0].nValue = 4900000000LL; + hash = tx.GetHash(); + mempool.addUnchecked(hash, tx); + tx.vin[0].prevout.hash = hash; + tx.vin.resize(2); + tx.vin[1].scriptSig = CScript() << OP_1; + tx.vin[1].prevout.hash = txFirst[0]->GetHash(); + tx.vin[1].prevout.n = 0; + tx.vout[0].nValue = 5900000000LL; + hash = tx.GetHash(); + mempool.addUnchecked(hash, tx); + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + delete pblock; + mempool.clear(); + + // coinbase in mempool + tx.vin.resize(1); + tx.vin[0].prevout.SetNull(); + tx.vin[0].scriptSig = CScript() << OP_0 << OP_1; + tx.vout[0].nValue = 0; + hash = tx.GetHash(); + mempool.addUnchecked(hash, tx); + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + delete pblock; + mempool.clear(); + + // invalid (pre-p2sh) txn in mempool + tx.vin[0].prevout.hash = txFirst[0]->GetHash(); + tx.vin[0].prevout.n = 0; + tx.vin[0].scriptSig = CScript() << OP_1; + tx.vout[0].nValue = 4900000000LL; + script = CScript() << OP_0; + tx.vout[0].scriptPubKey.SetDestination(script.GetID()); + hash = tx.GetHash(); + mempool.addUnchecked(hash, tx); + tx.vin[0].prevout.hash = hash; + tx.vin[0].scriptSig = CScript() << (std::vector<unsigned char>)script; + tx.vout[0].nValue -= 1000000; + hash = tx.GetHash(); + mempool.addUnchecked(hash,tx); + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + delete pblock; + mempool.clear(); + + // double spend txn pair in mempool + tx.vin[0].prevout.hash = txFirst[0]->GetHash(); + tx.vin[0].scriptSig = CScript() << OP_1; + tx.vout[0].nValue = 4900000000LL; + tx.vout[0].scriptPubKey = CScript() << OP_1; + hash = tx.GetHash(); + mempool.addUnchecked(hash, tx); + tx.vout[0].scriptPubKey = CScript() << OP_2; + hash = tx.GetHash(); + mempool.addUnchecked(hash, tx); + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + delete pblock; + mempool.clear(); + + // subsidy changing + int nHeight = pindexBest->nHeight; + pindexBest->nHeight = 209999; + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + delete pblock; + pindexBest->nHeight = 210000; + BOOST_CHECK(pblock = CreateNewBlock(reservekey)); + delete pblock; + pindexBest->nHeight = nHeight; +} + BOOST_AUTO_TEST_CASE(sha256transform_equality) { unsigned int pSHA256InitState[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19}; diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp index f7bf5dfbf1..eabfcd0304 100644 --- a/src/test/script_P2SH_tests.cpp +++ b/src/test/script_P2SH_tests.cpp @@ -130,7 +130,7 @@ BOOST_AUTO_TEST_CASE(norecurse) // Should not verify, because it will try to execute OP_INVALIDOPCODE BOOST_CHECK(!Verify(scriptSig, p2sh, true)); - // Try to recurse, and verification should succeed because + // Try to recur, and verification should succeed because // the inner HASH160 <> EQUAL should only check the hash: CScript p2sh2; p2sh2.SetDestination(p2sh.GetID()); @@ -225,7 +225,7 @@ BOOST_AUTO_TEST_CASE(is) BOOST_AUTO_TEST_CASE(switchover) { - // Test switchover code + // Test switch over code CScript notValid; notValid << OP_11 << OP_12 << OP_EQUALVERIFY; CScript scriptSig; diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 96d63bff97..cae0bb6baf 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -1,6 +1,7 @@ #define BOOST_TEST_MODULE Bitcoin Test Suite #include <boost/test/unit_test.hpp> +#include "db.h" #include "main.h" #include "wallet.h" @@ -14,13 +15,18 @@ struct TestingSetup { TestingSetup() { fPrintToConsole = true; // don't want to write to debug.log file noui_connect(); - pwalletMain = new CWallet(); + bitdb.MakeMock(); + LoadBlockIndex(true); + bool fFirstRun; + pwalletMain = new CWallet("wallet.dat"); + pwalletMain->LoadWallet(fFirstRun); RegisterWallet(pwalletMain); } ~TestingSetup() { delete pwalletMain; pwalletMain = NULL; + bitdb.Flush(true); } }; diff --git a/src/test/wallet_tests.cpp b/src/test/wallet_tests.cpp index 2f6da932a6..b0b3c47967 100644 --- a/src/test/wallet_tests.cpp +++ b/src/test/wallet_tests.cpp @@ -164,11 +164,11 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) add_coin( 3*COIN); add_coin( 4*COIN); // now we have 5+6+7+8+18+20+30+100+200+300+400 = 1094 cents BOOST_CHECK( wallet.SelectCoinsMinConf(95 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); - BOOST_CHECK_EQUAL(nValueRet, 1 * COIN); // we should get 1 bitcoin in 1 coin + BOOST_CHECK_EQUAL(nValueRet, 1 * COIN); // we should get 1 BTC in 1 coin BOOST_CHECK_EQUAL(setCoinsRet.size(), 1); BOOST_CHECK( wallet.SelectCoinsMinConf(195 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); - BOOST_CHECK_EQUAL(nValueRet, 2 * COIN); // we should get 2 bitcoins in 1 coin + BOOST_CHECK_EQUAL(nValueRet, 2 * COIN); // we should get 2 BTC in 1 coin BOOST_CHECK_EQUAL(setCoinsRet.size(), 1); // empty the wallet and start again, now with fractions of a cent, to test sub-cent change avoidance diff --git a/src/util.cpp b/src/util.cpp index 9881545a02..c9654989af 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -51,6 +51,8 @@ namespace boost { #endif #include <io.h> /* for _commit */ #include "shlobj.h" +#elif defined(__linux__) +# include <sys/prctl.h> #endif using namespace std; @@ -73,7 +75,7 @@ bool fLogTimestamps = false; CMedianFilter<int64> vTimeOffsets(200,0); bool fReopenDebugLog = false; -// Init openssl library multithreading support +// Init OpenSSL library multithreading support static CCriticalSection** ppmutexOpenSSL; void locking_callback(int mode, int i, const char* file, int line) { @@ -90,7 +92,7 @@ class CInit public: CInit() { - // Init openssl library multithreading support + // Init OpenSSL library multithreading support ppmutexOpenSSL = (CCriticalSection**)OPENSSL_malloc(CRYPTO_num_locks() * sizeof(CCriticalSection*)); for (int i = 0; i < CRYPTO_num_locks(); i++) ppmutexOpenSSL[i] = new CCriticalSection(); @@ -106,7 +108,7 @@ public: } ~CInit() { - // Shutdown openssl library multithreading support + // Shutdown OpenSSL library multithreading support CRYPTO_set_locking_callback(NULL); for (int i = 0; i < CRYPTO_num_locks(); i++) delete ppmutexOpenSSL[i]; @@ -346,7 +348,7 @@ string FormatMoney(int64 n, bool fPlus) int64 remainder = n_abs%COIN; string str = strprintf("%"PRI64d".%08"PRI64d, quotient, remainder); - // Right-trim excess 0's before the decimal point: + // Right-trim excess zeros before the decimal point: int nTrim = 0; for (int i = str.size()-1; (str[i] == '0' && isdigit(str[i-2])); --i) ++nTrim; @@ -1203,7 +1205,7 @@ void AddTimeData(const CNetAddr& ip, int64 nTime) if (!fMatch) { fDone = true; - string strMessage = _("Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly."); + string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin will not work properly."); strMiscWarning = strMessage; printf("*** %s\n", strMessage.c_str()); uiInterface.ThreadSafeMessageBox(strMessage+" ", string("Bitcoin"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION); @@ -1275,3 +1277,20 @@ void runCommand(std::string strCommand) printf("runCommand error: system(%s) returned %d\n", strCommand.c_str(), nErr); } +void RenameThread(const char* name) +{ +#if defined(PR_SET_NAME) + // Only the first 15 characters are used (16 - NUL terminator) + ::prctl(PR_SET_NAME, name, 0, 0, 0); +#elif 0 && (defined(__FreeBSD__) || defined(__OpenBSD__)) + // TODO: This is currently disabled because it needs to be verified to work + // on FreeBSD or OpenBSD first. When verified the '0 &&' part can be + // removed. + pthread_set_name_np(pthread_self(), name); +#elif defined(MAC_OSX) + pthread_setname_np(name); +#else + // Prevent warnings for unused parameters... + (void)name; +#endif +} diff --git a/src/util.h b/src/util.h index 7b2c678916..8244dcbaf1 100644 --- a/src/util.h +++ b/src/util.h @@ -12,7 +12,7 @@ #include <sys/time.h> #include <sys/resource.h> #else -typedef int pid_t; /* define for windows compatiblity */ +typedef int pid_t; /* define for windows compatibility */ #endif #include <map> #include <vector> @@ -391,6 +391,46 @@ inline uint256 Hash(const T1 pbegin, const T1 pend) return hash2; } +class CHashWriter +{ +private: + SHA256_CTX ctx; + +public: + int nType; + int nVersion; + + void Init() { + SHA256_Init(&ctx); + } + + CHashWriter(int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn) { + Init(); + } + + CHashWriter& write(const char *pch, size_t size) { + SHA256_Update(&ctx, pch, size); + return (*this); + } + + // invalidates the object + uint256 GetHash() { + uint256 hash1; + SHA256_Final((unsigned char*)&hash1, &ctx); + uint256 hash2; + SHA256((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2); + return hash2; + } + + template<typename T> + CHashWriter& operator<<(const T& obj) { + // Serialize to this stream + ::Serialize(*this, obj, nType, nVersion); + return (*this); + } +}; + + template<typename T1, typename T2> inline uint256 Hash(const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end) @@ -428,13 +468,9 @@ inline uint256 Hash(const T1 p1begin, const T1 p1end, template<typename T> uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION) { - // Most of the time is spent allocating and deallocating CDataStream's - // buffer. If this ever needs to be optimized further, make a CStaticStream - // class with its buffer on the stack. - CDataStream ss(nType, nVersion); - ss.reserve(10000); + CHashWriter ss(nType, nVersion); ss << obj; - return Hash(ss.begin(), ss.end()); + return ss.GetHash(); } inline uint160 Hash160(const std::vector<unsigned char>& vch) @@ -585,9 +621,7 @@ inline void ExitThread(size_t nExitCode) } #endif - - - +void RenameThread(const char* name); inline uint32_t ByteReverse(uint32_t value) { diff --git a/src/version.h b/src/version.h index c0d53e8b91..ca60e02bd0 100644 --- a/src/version.h +++ b/src/version.h @@ -10,7 +10,7 @@ // client versioning // -// These need to be macro's, as version.cpp's voodoo requires it +// These need to be macros, as version.cpp's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 6 #define CLIENT_VERSION_REVISION 99 diff --git a/src/wallet.cpp b/src/wallet.cpp index 4d99ce6560..8ad0f84aca 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -758,7 +758,7 @@ void CWallet::ReacceptWalletTransactions() } else { - // Reaccept any txes of ours that aren't already in a block + // Re-accept any txes of ours that aren't already in a block if (!wtx.IsCoinBase()) wtx.AcceptWalletTransaction(txdb, false); } @@ -767,7 +767,7 @@ void CWallet::ReacceptWalletTransactions() { // TODO: optimize this to scan just part of the block chain? if (ScanForWalletTransactions(pindexGenesisBlock)) - fRepeat = true; // Found missing transactions: re-do Reaccept. + fRepeat = true; // Found missing transactions: re-do re-accept. } } } @@ -1557,7 +1557,7 @@ CPubKey CReserveKey::GetReservedKey() vchPubKey = keypool.vchPubKey; else { - printf("CReserveKey::GetReservedKey(): Warning: using default key instead of a new key, top up your keypool."); + printf("CReserveKey::GetReservedKey(): Warning: Using default key instead of a new key, top up your keypool!"); vchPubKey = pwallet->vchDefaultKey; } } diff --git a/src/walletdb.cpp b/src/walletdb.cpp index 2c4d4c0ef0..72c548e602 100644 --- a/src/walletdb.cpp +++ b/src/walletdb.cpp @@ -323,6 +323,9 @@ int CWalletDB::LoadWallet(CWallet* pwallet) void ThreadFlushWalletDB(void* parg) { + // Make this thread recognisable as the wallet flushing thread + RenameThread("bitcoin-wallet"); + const string& strFile = ((const string*)parg)[0]; static bool fOneThread; if (fOneThread) |