diff --git a/COPYING b/COPYING index ce7db4c..21fce62 100644 --- a/COPYING +++ b/COPYING @@ -1,7 +1,7 @@ -Copyright (c) 2014 triangles Developers -Copyright (c) 2013 NovaCoin Developers +Copyright (c) 2014 Triangles Team +Copyright (c) 2013-2014 Triangles Team Copyright (c) 2011-2012 PPCoin Developers -Copyright (c) 2009-2012 Bitcoin Developers +Copyright (c) 2009-2014 Bitcoin developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/INSTALL b/INSTALL index 5039fbc..a3b2465 100644 --- a/INSTALL +++ b/INSTALL @@ -2,8 +2,8 @@ Building triangles See doc/readme-qt.rst for instructions on building triangles QT, the intended-for-end-users, nice-graphical-interface, reference -implementation of triangles. +implementation of Triangles. See doc/build-*.txt for instructions on building trianglesd, the intended-for-services, no-graphical-interface, reference -implementation of triangles. +implementation of Triangles. diff --git a/README b/README index b43bf86..42061c0 100644 --- a/README +++ b/README @@ -1 +1 @@ -README.md +README.md \ No newline at end of file diff --git a/README.md b/README.md index 922c794..a7a5bc5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -Triangles (TRI) Release +Triangles (TRI) "Pharao" Version 4.0.0.4 Release, -triangles is a cool new crypto currency that will feature a uniquely implemented anonymization feature that uses exchanges on the back end and a decoupled transaction flow architecture. +Triangles is a cool new crypto currency that features TOR implementation and secure messaging. This wallet supports the staking=0 option in the triangles.conf file to disable the stake miner thread for pool and exchange operators. diff --git a/doc/Doxyfile b/doc/Doxyfile index 08d4f8c..bab6626 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -28,13 +28,13 @@ DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = Bitcoin +PROJECT_NAME = Triangles # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.5.0 +PROJECT_NUMBER = 4.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer @@ -47,7 +47,7 @@ PROJECT_BRIEF = "P2P Digital Currency" # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. -PROJECT_LOGO = doc/bitcoin_logo_doxygen.png +PROJECT_LOGO = doc/triangles_logo_doxygen.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/doc/README b/doc/README index ebab395..824b63c 100644 --- a/doc/README +++ b/doc/README @@ -1,14 +1,18 @@ +Triangles 4.0.0.4 BETA -Copyright (c) 2014 TRI Developers - - -triangles 3.3.3.3 BETA - -Copyright (c) 2014 TRI Developers -Copyright (c) 2013 NovaCoin Developers -Copyright (c) 2011-2012 Bitcoin Developers +Copyright (c) 2014 Triangles team +Copyright (c) 2011-2012 PPCoin Developers Distributed under the MIT/X11 software license, see the accompanying file license.txt 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). + + +Intro +----- +Triangles is a free open source project derived from Bitcoin, with +the goal of providing a long-term energy-efficient X13 anon PoS crypto-currency. +Built on the foundation of Shadowcoin, PPCoin and Bitcoin, innovations such as proof-of-stake +help further advance the field of crypto-currency. + diff --git a/doc/README_windows.txt b/doc/README_windows.txt new file mode 100644 index 0000000..04aaff3 --- /dev/null +++ b/doc/README_windows.txt @@ -0,0 +1,18 @@ +Triangles 4.0.0.4 BETA + +Copyright (c) 2014 Triangles team +Copyright (c) 2011-2013 PPCoin Developers +Distributed under the MIT/X11 software license, see the accompanying +file license.txt 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). + + +Intro +----- +Triangles is a free open source project derived from Bitcoin, with +the goal of providing a long-term energy-efficient X13 anon PoS crypto-currency. +Built on the foundation of Shadowcoin, PPCoin and Bitcoin, innovations such as proof-of-stake +help further advance the field of crypto-currency. + diff --git a/doc/assets-attribution.txt b/doc/assets-attribution.txt index 0b0e377..bd7781a 100644 --- a/doc/assets-attribution.txt +++ b/doc/assets-attribution.txt @@ -38,7 +38,7 @@ Designer: http://www.everaldo.com Icon Pack: Crystal SVG License: LGPL -Icon: src/qt/res/icons/bitcoin.png, src/qt/res/icons/toolbar.png +Icon: src/qt/res/icons/triangles.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 @@ -49,8 +49,4 @@ Designer: Everaldo (Everaldo Coelho) License: GNU/GPL Site: http://findicons.com/icon/17102/reload?id=17102 -Image: src/qt/res/images/splash2.jpg (Wallet image) -Designer: Crobbo (forum) -Site: https://bitcointalk.org/index.php?topic=32273.0 -License: Public domain diff --git a/doc/build-msw.txt b/doc/build-msw.txt index b180515..1308e6f 100644 --- a/doc/build-msw.txt +++ b/doc/build-msw.txt @@ -1,4 +1,4 @@ -Copyright (c) 2009-2012 Bitcoin Developers +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. This product includes software developed by the OpenSSL Project for use in @@ -7,7 +7,7 @@ cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard. -See readme-qt.rst for instructions on building Bitcoin QT, the +See readme-qt.rst for instructions on building Triangles QT, the graphical user interface. WINDOWS BUILD NOTES @@ -36,10 +36,12 @@ Boost MIT-like license miniupnpc New (3-clause) BSD license Versions used in this release: -OpenSSL 1.0.1b +OpenSSL 1.0.1h Berkeley DB 4.8.30.NC -Boost 1.47.0 -miniupnpc 1.6 +Boost 1.55.0 +miniupnpc 1.9 +libevent 2.0.21 stable +leveldb 1.2 OpenSSL @@ -48,7 +50,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.1b-mgw +cd /c/openssl-1.0.1h ./config make @@ -76,9 +78,22 @@ make -f Makefile.mingw mkdir miniupnpc cp *.h miniupnpc/ -Bitcoin +Libevent +-------- +MSYS SHELL: +tar xvzf ./libevent-2.0.21-stable.tar +./configure --enable-static --disable-shared +make + +LevelDB (sources included in this release) ------- +MSYS SHELL: +cd src/leveldb +TARGET_OS=NATIVE_WINDOWS make libleveldb.a libmemenv.a + +triangles-qt.exe +---------------- DOS prompt: -cd \bitcoin\src +cd \triangles-master\src mingw32-make -f makefile.mingw -strip bitcoind.exe +strip trianglesd.exe diff --git a/doc/build-osx.txt b/doc/build-osx.txt index b5916b2..6417dee 100644 --- a/doc/build-osx.txt +++ b/doc/build-osx.txt @@ -1,4 +1,4 @@ -Copyright (c) 2009-2012 Bitcoin Developers +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. This product includes software developed by the OpenSSL Project for use in the @@ -7,19 +7,14 @@ software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard. -Mac OS X bitcoind build instructions +Mac OS X trianglesd build instructions Laszlo Hanyecz Douglas Huff These instructions are not complete and probably won't work. They will be ammneded in the future. - -Please read this if you are on 10.9: -https://github.com/bitcoin/bitcoin/issues/3228 - - -See readme-qt.rst for instructions on building Bitcoin QT, the +See readme-qt.rst for instructions on building triangles QT, the graphical user interface. Tested on 10.5 and 10.6 intel. PPC is not supported because it's big-endian. @@ -34,7 +29,7 @@ but you can get the current version from http://developer.apple.com 1. Clone the github tree to get the source code: -git clone git@github.com:bitcoin/bitcoin.git bitcoin +git clone https://github.com/TrianglesCommunityProject/triangles triangles 2. Download and install MacPorts from http://www.macports.org/ @@ -48,14 +43,14 @@ sudo port install boost db48 openssl miniupnpc Optionally install qrencode (and set USE_QRCODE=1): sudo port install qrencode -4. Now you should be able to build bitcoind: +4. Now you should be able to build trianglesd: -cd bitcoin/src +cd triangles/src make -f makefile.osx Run: - ./bitcoind --help # for a list of command-line options. + ./trianglesd --help # for a list of command-line options. Run - ./bitcoind -daemon # to start the bitcoin daemon. + ./trianglesd -daemon # to start the triangles daemon. Run - ./bitcoind help # When the daemon is running, to get a list of RPC commands + ./trianglesd help # When the daemon is running, to get a list of RPC commands diff --git a/doc/build-unix.txt b/doc/build-unix.txt index 3dffb22..55f7436 100644 --- a/doc/build-unix.txt +++ b/doc/build-unix.txt @@ -1,4 +1,4 @@ -Copyright (c) 2009-2012 Bitcoin Developers +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. This product includes software developed by the OpenSSL Project for use in @@ -14,10 +14,10 @@ To Build -------- cd src/ -make -f makefile.unix # Headless bitcoin +make -f makefile.unix # Headless Triangles -See readme-qt.rst for instructions on building Bitcoin QT, -the graphical bitcoin. +See readme-qt.rst for instructions on building Triangles QT, +the graphical Triangles. Dependencies ------------ @@ -25,10 +25,11 @@ Dependencies Library Purpose Description ------- ------- ----------- libssl SSL Support Secure communications - libdb4.8 Berkeley DB Blockchain & wallet storage + libdb Berkeley DB Blockchain & wallet storage libboost Boost C++ Library miniupnpc UPnP Support Optional firewall-jumping support libqrencode QRCode generation Optional QRCode generation + libevent Callbacks Execute a callback function when a specific event occurs Note that libexecinfo should be installed, if you building under *BSD systems. This library provides backtrace facility. @@ -54,19 +55,19 @@ Licenses of statically linked libraries: Versions used in this release: GCC 4.3.3 - OpenSSL 0.9.8g - Berkeley DB 4.8.30.NC - Boost 1.37 - miniupnpc 1.6 + OpenSSL 1.0.1h + Berkeley DB 5.1 (4.8.30.NC should work too) + Boost 1.48 + miniupnpc 1.9 Dependency Build Instructions: Ubuntu & Debian ---------------------------------------------- sudo apt-get install build-essential sudo apt-get install libssl-dev -sudo apt-get install libdb4.8-dev -sudo apt-get install libdb4.8++-dev - Boost 1.40+: sudo apt-get install libboost-all-dev - or Boost 1.37: sudo apt-get install libboost1.37-dev +sudo apt-get install libdb-dev +sudo apt-get install libdb++-dev +sudo apt-get install libboost1.48-all-dev +sudo apt-get install libevent-dev sudo apt-get install libqrencode-dev If using Boost 1.37, append -mt to the boost libraries in the makefile. @@ -75,21 +76,21 @@ If using Boost 1.37, append -mt to the boost libraries in the makefile. Dependency Build Instructions: Gentoo ------------------------------------- -Note: If you just want to install bitcoind on Gentoo, you can add the Bitcoin +Note: If you just want to install trianglesd on Gentoo, you can add the Triangles overlay and use your package manager: - layman -a bitcoin && emerge bitcoind + layman -a triangles && emerge trianglesd -emerge -av1 --noreplace boost glib openssl sys-libs/db:4.8 +emerge -av1 --noreplace boost glib openssl sys-libs/db Take the following steps to build (no UPnP support): - cd ${BITCOIN_DIR}/src + cd ${TRIANGLES_DIR}/src make -f makefile.unix USE_UPNP= BDB_INCLUDE_PATH='/usr/include/db4.8' - strip bitcoind + strip trianglesd Notes ----- -The release is built with GCC and then "strip bitcoind" to strip the debug +The release is built with GCC and then "strip trianglesd" to strip the debug symbols, which reduces the executable size by about 90%. @@ -116,10 +117,16 @@ sudo su ./bootstrap.sh ./bjam install +Libevent +-------- +If you need to build Libevent yourself +./configure --enable-static --disable-shared +make + Security -------- -To help make your bitcoin installation more secure by making certain attacks impossible to +To help make your Triangles installation more secure by making certain attacks impossible to exploit even if a vulnerability is found, you can take the following measures: * Position Independent Executable @@ -136,7 +143,7 @@ exploit even if a vulnerability is found, you can take the following measures: make -f makefile.unix ... -e PIE=1 To test that you have built PIE executable, install scanelf, part of paxutils, and use: - scanelf -e ./bitcoin + scanelf -e ./triangles The output should contain: TYPE @@ -144,13 +151,13 @@ exploit even if a vulnerability is found, you can take the following measures: * Non-executable Stack If the stack is executable then trivial stack based buffer overflow exploits are possible if - vulnerable buffers are found. By default, bitcoin should be built with a non-executable stack + vulnerable buffers are found. By default, Triangles should be built with a non-executable stack but if one of the libraries it uses asks for an executable stack or someone makes a mistake and uses a compiler extension which requires an executable stack, it will silently build an executable without the non-executable stack protection. To verify that the stack is non-executable after compiling use: - scanelf -e ./bitcoin + scanelf -e ./triangles the output should contain: STK/REL/PTL diff --git a/doc/coding.txt b/doc/coding.txt index 46da661..7e6b0fd 100644 --- a/doc/coding.txt +++ b/doc/coding.txt @@ -28,7 +28,7 @@ someVariable. Common types: n integer number: short, unsigned short, int, unsigned int, - int64, uint64, sometimes char if used as a number + int64_t, uint64_t, sometimes char if used as a number d double, float f flag hash uint256 @@ -90,7 +90,7 @@ in 500ms. ThreadRPCServer : Remote procedure call handler, listens on port 8332 for connections and services them. -ThreadBitcoinMiner : Generates bitcoins +ThreadStakeMiner : Generates TRIs ThreadMapPort : Universal plug-and-play startup/shutdown diff --git a/doc/readme-qt.rst b/doc/readme-qt.rst index 6bfbd93..909cb1f 100644 --- a/doc/readme-qt.rst +++ b/doc/readme-qt.rst @@ -1,28 +1,24 @@ -Bitcoin-qt: Qt4 GUI for Bitcoin +triangles-qt: Qt5 GUI for triangles =============================== +Note: Not all of these instructions are updated yet, so they probably don't work. +Feel free to update them! ;) + Build instructions =================== Debian ------- -First, make sure that the required packages for Qt4 development of your -distribution are installed. - -On recent Ubuntu releases, the `libdb4.8++-dev` package is not in the default -repositories. However it's in the bitcoin repository, which we can add -with: - - apt-add-repository ppa:bitcoin/bitcoin - -Then we need to make sure our build environment is up to date. For Debian and Ubuntu: +First, make sure that the required packages for Qt5 development of your +distribution are installed, for Debian and Ubuntu these are: :: - apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev \ + apt-get install qt5-default qt5-qmake qtbase5-dev-tools qttools5-dev-tools \ + build-essential libboost-dev libboost-system-dev \ libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev \ - libssl-dev libdb4.8++-dev libminiupnpc-dev libminiupnpc8 + libssl-dev libdb++-dev then execute the following: @@ -31,9 +27,9 @@ then execute the following: qmake make -Alternatively, install Qt Creator and open the `bitcoin-qt.pro` file. +Alternatively, install Qt Creator and open the `triangles-qt.pro` file. -An executable named `bitcoin-qt` will be built. +An executable named `triangles-qt` will be built. Windows @@ -50,8 +46,8 @@ Windows build instructions: - Open the .pro file in QT creator and build as normal (ctrl-B) .. _`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`_) +.. _`dependencies archive`: https://download.visucore.com/triangles/qtgui_deps_1.zip +.. [#] PGP signature: https://download.visucore.com/triangles/qtgui_deps_1.zip.sig (signed with RSA key ID `610945D0`_) .. _`610945D0`: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x610945D0 @@ -81,7 +77,7 @@ Build configuration options UPNnP 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: +To use UPnP for port forwarding behind a NAT router (recommended, as more connections overall allow for a faster and more stable triangles experience), pass the following argument to qmake: :: @@ -129,9 +125,9 @@ flag to qmake to control this: Berkely DB version warning ========================== -A warning for people using the *static binary* version of Bitcoin on a Linux/UNIX-ish system (tl;dr: **Berkely DB databases are not forward compatible**). +A warning for people using the *static binary* version of triangles on a Linux/UNIX-ish system (tl;dr: **Berkely DB databases are not forward compatible**). -The static binary version of Bitcoin is linked against libdb4.8 (see also `this Debian issue`_). +The static binary version of triangles is linked against libdb 5.0 (see also `this Debian issue`_). Now the nasty thing is that databases from 5.X are not compatible with 4.X. @@ -146,7 +142,7 @@ Ubuntu 11.10 warning ==================== Ubuntu 11.10 has a package called 'qt-at-spi' installed by default. At the time of writing, having that package -installed causes bitcoin-qt to crash intermittently. The issue has been reported as `launchpad bug 857790`_, but +installed causes triangles-qt to crash intermittently. The issue has been reported as `launchpad bug 857790`_, but isn't yet fixed. Until the bug is fixed, you can remove the qt-at-spi package to work around the problem, though this will presumably diff --git a/doc/release-process.txt b/doc/release-process.txt index ed23ef3..2d60d8b 100644 --- a/doc/release-process.txt +++ b/doc/release-process.txt @@ -1,7 +1,10 @@ +Note: This is old and outdated and doesn't apply to Triangles. + + * update translations (ping tcatm on IRC for now) * update (commit) version in sources - bitcoin-qt.pro + triangles-qt.pro src/version.h share/setup.nsi doc/README* @@ -16,7 +19,7 @@ * perform gitian builds - * From a directory containing the bitcoin source, gitian-builder and gitian.sigs + * From a directory containing the triangles source, gitian-builder and gitian.sigs export SIGNER=(your gitian key, ie bluematt, sipa, etc) export VERSION=0.5.1 cd ./gitian-builder @@ -32,61 +35,61 @@ wget 'http://downloads.sourceforge.net/project/boost/boost/1.47.0/boost_1_47_0.tar.bz2' wget 'http://download.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.tar.gz' cd .. - ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-win32.yml + ./bin/gbuild ../triangles/contrib/gitian-descriptors/boost-win32.yml cp build/out/boost-win32-1.47.0-gitian.zip inputs/ - ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/qt-win32.yml + ./bin/gbuild ../triangles/contrib/gitian-descriptors/qt-win32.yml cp build/out/qt-win32-4.7.4-gitian.zip inputs/ - ./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-win32.yml - cp build/out/bitcoin-deps-0.0.3.zip inputs/ + ./bin/gbuild ../triangles/contrib/gitian-descriptors/deps-win32.yml + cp build/out/triangles-deps-0.0.3.zip inputs/ - * Build bitcoind and bitcoin-qt on Linux32, Linux64, and Win32: - ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian.yml - ./bin/gsign --signer $SIGNER --release ${VERSION} --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian.yml + * Build trianglesd and triangles-qt on Linux32, Linux64, and Win32: + ./bin/gbuild --commit triangles=v${VERSION} ../triangles/contrib/gitian-descriptors/gitian.yml + ./bin/gsign --signer $SIGNER --release ${VERSION} --destination ../gitian.sigs/ ../triangles/contrib/gitian-descriptors/gitian.yml pushd build/out - zip -r bitcoin-${VERSION}-linux-gitian.zip * - mv bitcoin-${VERSION}-linux-gitian.zip ../../ + zip -r triangles-${VERSION}-linux-gitian.zip * + mv triangles-${VERSION}-linux-gitian.zip ../../ popd - ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win32.yml - ./bin/gsign --signer $SIGNER --release ${VERSION}-win32 --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win32.yml + ./bin/gbuild --commit triangles=v${VERSION} ../triangles/contrib/gitian-descriptors/gitian-win32.yml + ./bin/gsign --signer $SIGNER --release ${VERSION}-win32 --destination ../gitian.sigs/ ../triangles/contrib/gitian-descriptors/gitian-win32.yml pushd build/out - zip -r bitcoin-${VERSION}-win32-gitian.zip * - mv bitcoin-${VERSION}-win32-gitian.zip ../../ + zip -r triangles-${VERSION}-win32-gitian.zip * + mv triangles-${VERSION}-win32-gitian.zip ../../ popd Build output expected: - 1. linux 32-bit and 64-bit binaries + source (bitcoin-${VERSION}-linux-gitian.zip) - 2. windows 32-bit binary, installer + source (bitcoin-${VERSION}-win32-gitian.zip) + 1. linux 32-bit and 64-bit binaries + source (triangles-${VERSION}-linux-gitian.zip) + 2. windows 32-bit binary, installer + source (triangles-${VERSION}-win32-gitian.zip) 3. Gitian signatures (in gitian.sigs/${VERSION}[-win32]/(your gitian key)/ * repackage gitian builds for release as stand-alone zip/tar/installer exe * Linux .tar.gz: - unzip bitcoin-${VERSION}-linux-gitian.zip -d bitcoin-${VERSION}-linux - tar czvf bitcoin-${VERSION}-linux.tar.gz bitcoin-${VERSION}-linux - rm -rf bitcoin-${VERSION}-linux + unzip triangles-${VERSION}-linux-gitian.zip -d triangles-${VERSION}-linux + tar czvf triangles-${VERSION}-linux.tar.gz triangles-${VERSION}-linux + rm -rf triangles-${VERSION}-linux * Windows .zip and setup.exe: - unzip bitcoin-${VERSION}-win32-gitian.zip -d bitcoin-${VERSION}-win32 - mv bitcoin-${VERSION}-win32/bitcoin-*-setup.exe . - zip -r bitcoin-${VERSION}-win32.zip bitcoin-${VERSION}-win32 - rm -rf bitcoin-${VERSION}-win32 + unzip triangles-${VERSION}-win32-gitian.zip -d triangles-${VERSION}-win32 + mv triangles-${VERSION}-win32/triangles-*-setup.exe . + zip -r triangles-${VERSION}-win32.zip triangles-${VERSION}-win32 + rm -rf triangles-${VERSION}-win32 * perform Mac build See this blog post for how Gavin set up his build environment to build the OSX release; note that a patched version of macdeployqt is not needed anymore, as the required functionality and fixes are implemented directly in macdeployqtplus: - http://gavintech.blogspot.com/2011/11/deploying-bitcoin-qt-on-osx.html + http://gavintech.blogspot.com/2011/11/deploying-triangles-qt-on-osx.html Gavin also had trouble with the macports py27-appscript package; he ended up installing a version that worked with: /usr/bin/easy_install-2.7 appscript - qmake RELEASE=1 USE_UPNP=1 USE_QRCODE=1 bitcoin-qt.pro + qmake RELEASE=1 USE_UPNP=1 USE_QRCODE=1 triangles-qt.pro make export QTDIR=/opt/local/share/qt4 # needed to find translations/qt_*.qm files T=$(contrib/qt_translations.py $QTDIR/translations src/qt/locale) - python2.7 contrib/macdeploy/macdeployqtplus Bitcoin-Qt.app -add-qt-tr $T -dmg -fancy contrib/macdeploy/fancy.plist + python2.7 contrib/macdeploy/macdeployqtplus triangles-Qt.app -add-qt-tr $T -dmg -fancy contrib/macdeploy/fancy.plist Build output expected: - Bitcoin-Qt.dmg + triangles-Qt.dmg * upload builds to SourceForge @@ -98,7 +101,7 @@ * update wiki download links -* update wiki changelog: https://en.bitcoin.it/wiki/Changelog +* update wiki changelog: https://en.triangles.it/wiki/Changelog * Commit your signature to gitian.sigs: pushd gitian.sigs @@ -112,31 +115,34 @@ * After 3 or more people have gitian-built, repackage gitian-signed zips: - * From a directory containing bitcoin source, gitian.sigs and gitian zips + * From a directory containing triangles source, gitian.sigs and gitian zips export VERSION=0.5.1 - mkdir bitcoin-${VERSION}-linux-gitian - pushd bitcoin-${VERSION}-linux-gitian - unzip ../bitcoin-${VERSION}-linux-gitian.zip + mkdir triangles-${VERSION}-linux-gitian + pushd triangles-${VERSION}-linux-gitian + unzip ../triangles-${VERSION}-linux-gitian.zip mkdir gitian - cp ../bitcoin/contrib/gitian-downloader/*.pgp ./gitian/ + cp ../triangles/contrib/gitian-downloader/*.pgp ./gitian/ for signer in $(ls ../gitian.sigs/${VERSION}/); do - cp ../gitian.sigs/${VERSION}/${signer}/bitcoin-build.assert ./gitian/${signer}-build.assert - cp ../gitian.sigs/${VERSION}/${signer}/bitcoin-build.assert.sig ./gitian/${signer}-build.assert.sig + cp ../gitian.sigs/${VERSION}/${signer}/triangles-build.assert ./gitian/${signer}-build.assert + cp ../gitian.sigs/${VERSION}/${signer}/triangles-build.assert.sig ./gitian/${signer}-build.assert.sig done - zip -r bitcoin-${VERSION}-linux-gitian.zip * - cp bitcoin-${VERSION}-linux-gitian.zip ../ + zip -r triangles-${VERSION}-linux-gitian.zip * + cp triangles-${VERSION}-linux-gitian.zip ../ popd - mkdir bitcoin-${VERSION}-win32-gitian - pushd bitcoin-${VERSION}-win32-gitian - unzip ../bitcoin-${VERSION}-win32-gitian.zip + mkdir triangles-${VERSION}-win32-gitian + pushd triangles-${VERSION}-win32-gitian + unzip ../triangles-${VERSION}-win32-gitian.zip mkdir gitian - cp ../bitcoin/contrib/gitian-downloader/*.pgp ./gitian/ + cp ../triangles/contrib/gitian-downloader/*.pgp ./gitian/ for signer in $(ls ../gitian.sigs/${VERSION}-win32/); do - cp ../gitian.sigs/${VERSION}-win32/${signer}/bitcoin-build.assert ./gitian/${signer}-build.assert - cp ../gitian.sigs/${VERSION}-win32/${signer}/bitcoin-build.assert.sig ./gitian/${signer}-build.assert.sig + cp ../gitian.sigs/${VERSION}-win32/${signer}/triangles-build.assert ./gitian/${signer}-build.assert + cp ../gitian.sigs/${VERSION}-win32/${signer}/triangles-build.assert.sig ./gitian/${signer}-build.assert.sig done - zip -r bitcoin-${VERSION}-win32-gitian.zip * - cp bitcoin-${VERSION}-win32-gitian.zip ../ + zip -r triangles-${VERSION}-win32-gitian.zip * + cp triangles-${VERSION}-win32-gitian.zip ../ popd * Upload gitian zips to SourceForge +ICU + +https://qt-project.org/wiki/Compiling-ICU-with-MinGW diff --git a/doc/translation_process.md b/doc/translation_process.md index 3ddfc0c..312eb8f 100644 --- a/doc/translation_process.md +++ b/doc/translation_process.md @@ -7,18 +7,18 @@ handle those translations. Files and Folders ----------------- -### bitcoin-qt.pro +### triangles-qt.pro This file takes care of generating `.qm` files from `.ts` files. It is mostly automated. -### src/qt/bitcoin.qrc +### src/qt/triangles.qrc This file must be updated whenever a new translation is added. Please note that files must end with `.qm`, not `.ts`. - locale/bitcoin_en.qm + locale/triangles_en.qm ... @@ -26,11 +26,11 @@ files must end with `.qm`, not `.ts`. This directory contains all translations. Filenames must adhere to this format: - bitcoin_xx_YY.ts or bitcoin_xx.ts + triangles_xx_YY.ts or triangles_xx.ts #### Source file -`src/qt/locale/bitcoin_en.ts` is treated in a special way. It is used as the +`src/qt/locale/triangles_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). @@ -44,7 +44,7 @@ Syncing with transifex We are using http://transifex.net as a frontend for translating the client. -https://www.transifex.net/projects/p/bitcoin/resource/tx/ +https://www.transifex.net/projects/p/triangles/resource/tx/ The "transifex client" (see: http://help.transifex.net/features/client/) will help with fetching new translations from transifex. Use the following @@ -55,9 +55,9 @@ config to be able to connect with the client. [main] host = https://www.transifex.net - [bitcoin.tx] - file_filter = src/qt/locale/bitcoin_.ts - source_file = src/qt/locale/bitcoin_en.ts + [triangles.tx] + file_filter = src/qt/locale/triangles_.ts + source_file = src/qt/locale/triangles_en.ts source_lang = en ### .tx/config (for Windows) @@ -65,9 +65,9 @@ config to be able to connect with the client. [main] host = https://www.transifex.net - [bitcoin.tx] - file_filter = src\qt\locale\bitcoin_.ts - source_file = src\qt\locale\bitcoin_en.ts + [triangles.tx] + file_filter = src\qt\locale\triangles_.ts + source_file = src\qt\locale\triangles_en.ts source_lang = en It is also possible to directly download new translations one by one from transifex. @@ -75,6 +75,6 @@ It is also possible to directly download new translations one by one from transi ### Fetching new translations 1. `tx pull -a` -2. update `src/qt/bitcoin.qrc` manually or via - `ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(bitcoin_\(.*\)\).ts/locale/\1.qm<\/file>/'` +2. update `src/qt/triangles.qrc` manually or via + `ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(triangles_\(.*\)\).ts/locale/\1.qm<\/file>/'` 3. `git add` new translations from `src/qt/locale/` diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py index 771f28a..ed6313a 100644 --- a/share/qt/extract_strings_qt.py +++ b/share/qt/extract_strings_qt.py @@ -6,7 +6,7 @@ they can be picked up by Qt linguist. from subprocess import Popen, PIPE import glob -OUT_CPP="src/qt/bitcoinstrings.cpp" +OUT_CPP="src/qt/trianglesstrings.cpp" EMPTY=['""'] def parse_po(text): @@ -62,9 +62,9 @@ f.write("""#include #define UNUSED #endif """) -f.write('static const char UNUSED *bitcoin_strings[] = {') +f.write('static const char UNUSED *triangles_strings[] = {') for (msgid, msgstr) in messages: if msgid != EMPTY: - f.write('QT_TRANSLATE_NOOP("bitcoin-core", %s),\n' % ('\n'.join(msgid))) + f.write('QT_TRANSLATE_NOOP("Triangles-core", %s),\n' % ('\n'.join(msgid))) f.write('};') f.close() diff --git a/share/qt/make_windows_icon.sh b/share/qt/make_windows_icon.sh index 9ac6916..60f65db 100644 --- a/share/qt/make_windows_icon.sh +++ b/share/qt/make_windows_icon.sh @@ -2,4 +2,4 @@ # create multiresolution windows icon ICON_DST=../../src/qt/res/icons/triangles.ico -convert ../../src/qt/res/icons/triangles-16.png ../../src/qt/res/icons/triangles-32.png ../../src/qt/res/icons/triangles-48.png ${ICON_DST} +convert ../../src/qt/res/icons/triangles-32.png ../../src/qt/res/icons/triangles-32.png ../../src/qt/res/icons/triangles-48.png ${ICON_DST} diff --git a/share/ui.rc b/share/ui.rc index 431d8fd..966e0ad 100644 --- a/share/ui.rc +++ b/share/ui.rc @@ -1,4 +1,4 @@ -BottleCaps ICON "pixmaps/BottleCaps.ico" +triangles ICON "pixmaps/triangles.ico" #include "wx/msw/wx.rc" diff --git a/src/addrman.cpp b/src/addrman.cpp index 4428cd1..ae77459 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -11,12 +11,12 @@ int CAddrInfo::GetTriedBucket(const std::vector &nKey) const CDataStream ss1(SER_GETHASH, 0); std::vector vchKey = GetKey(); ss1 << nKey << vchKey; - uint64 hash1 = Hash(ss1.begin(), ss1.end()).Get64(); + uint64_t hash1 = Hash(ss1.begin(), ss1.end()).Get64(); CDataStream ss2(SER_GETHASH, 0); std::vector vchGroupKey = GetGroup(); ss2 << nKey << vchGroupKey << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP); - uint64 hash2 = Hash(ss2.begin(), ss2.end()).Get64(); + uint64_t hash2 = Hash(ss2.begin(), ss2.end()).Get64(); return hash2 % ADDRMAN_TRIED_BUCKET_COUNT; } @@ -26,15 +26,15 @@ int CAddrInfo::GetNewBucket(const std::vector &nKey, const CNetAd std::vector vchGroupKey = GetGroup(); std::vector vchSourceGroupKey = src.GetGroup(); ss1 << nKey << vchGroupKey << vchSourceGroupKey; - uint64 hash1 = Hash(ss1.begin(), ss1.end()).Get64(); + uint64_t hash1 = Hash(ss1.begin(), ss1.end()).Get64(); CDataStream ss2(SER_GETHASH, 0); ss2 << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP); - uint64 hash2 = Hash(ss2.begin(), ss2.end()).Get64(); + uint64_t hash2 = Hash(ss2.begin(), ss2.end()).Get64(); return hash2 % ADDRMAN_NEW_BUCKET_COUNT; } -bool CAddrInfo::IsTerrible(int64 nNow) const +bool CAddrInfo::IsTerrible(int64_t nNow) const { if (nLastTry && nLastTry >= nNow-60) // never remove things tried the last minute return false; @@ -54,12 +54,12 @@ bool CAddrInfo::IsTerrible(int64 nNow) const return false; } -double CAddrInfo::GetChance(int64 nNow) const +double CAddrInfo::GetChance(int64_t nNow) const { double fChance = 1.0; - int64 nSinceLastSeen = nNow - nTime; - int64 nSinceLastTry = nNow - nLastTry; + int64_t nSinceLastSeen = nNow - nTime; + int64_t nSinceLastTry = nNow - nLastTry; if (nSinceLastSeen < 0) nSinceLastSeen = 0; if (nSinceLastTry < 0) nSinceLastTry = 0; @@ -128,7 +128,7 @@ int CAddrMan::SelectTried(int nKBucket) // random shuffle the first few elements (using the entire list) // find the least recently tried among them - int64 nOldest = -1; + int64_t nOldest = -1; int nOldestPos = -1; for (unsigned int i = 0; i < ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT && i < vTried.size(); i++) { @@ -258,7 +258,7 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin) return; } -void CAddrMan::Good_(const CService &addr, int64 nTime) +void CAddrMan::Good_(const CService &addr, int64_t nTime) { // printf("Good: addr=%s\n", addr.ToString().c_str()); @@ -309,7 +309,7 @@ void CAddrMan::Good_(const CService &addr, int64 nTime) MakeTried(info, nId, nUBucket); } -bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64 nTimePenalty) +bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty) { if (!addr.IsRoutable()) return false; @@ -322,9 +322,9 @@ bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64 nTimePen { // periodically update nTime bool fCurrentlyOnline = (GetAdjustedTime() - addr.nTime < 24 * 60 * 60); - int64 nUpdateInterval = (fCurrentlyOnline ? 60 * 60 : 24 * 60 * 60); + int64_t nUpdateInterval = (fCurrentlyOnline ? 60 * 60 : 24 * 60 * 60); if (addr.nTime && (!pinfo->nTime || pinfo->nTime < addr.nTime - nUpdateInterval - nTimePenalty)) - pinfo->nTime = max((int64)0, addr.nTime - nTimePenalty); + pinfo->nTime = max((int64_t)0, addr.nTime - nTimePenalty); // add services pinfo->nServices |= addr.nServices; @@ -349,7 +349,7 @@ bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64 nTimePen return false; } else { pinfo = Create(addr, source, &nId); - pinfo->nTime = max((int64)0, (int64)pinfo->nTime - nTimePenalty); + pinfo->nTime = max((int64_t)0, (int64_t)pinfo->nTime - nTimePenalty); // printf("Added %s [nTime=%fhr]\n", pinfo->ToString().c_str(), (GetAdjustedTime() - pinfo->nTime) / 3600.0); nNew++; fNew = true; @@ -367,7 +367,7 @@ bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64 nTimePen return fNew; } -void CAddrMan::Attempt_(const CService &addr, int64 nTime) +void CAddrMan::Attempt_(const CService &addr, int64_t nTime) { CAddrInfo *pinfo = Find(addr); @@ -506,7 +506,7 @@ void CAddrMan::GetAddr_(std::vector &vAddr) } } -void CAddrMan::Connected_(const CService &addr, int64 nTime) +void CAddrMan::Connected_(const CService &addr, int64_t nTime) { CAddrInfo *pinfo = Find(addr); @@ -521,7 +521,7 @@ void CAddrMan::Connected_(const CService &addr, int64 nTime) return; // update info - int64 nUpdateInterval = 20 * 60; + int64_t nUpdateInterval = 20 * 60; if (nTime - info.nTime > nUpdateInterval) info.nTime = nTime; } diff --git a/src/addrman.h b/src/addrman.h index f65e0b3..705bf5d 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -1,8 +1,8 @@ // Copyright (c) 2012 Pieter Wuille // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef _BITCOIN_ADDRMAN -#define _BITCOIN_ADDRMAN 1 +#ifndef _TRIANGLES_ADDRMAN +#define _TRIANGLES_ADDRMAN 1 #include "netbase.h" #include "protocol.h" @@ -24,10 +24,10 @@ private: CNetAddr source; // last successful connection by us - int64 nLastSuccess; + int64_t nLastSuccess; // last try whatsoever by us: - // int64 CAddress::nLastTry + // int64_t CAddress::nLastTry // connection attempts since last successful attempt int nAttempts; @@ -86,10 +86,10 @@ public: } // Determine whether the statistics about this entry are bad enough so that it can just be deleted - bool IsTerrible(int64 nNow = GetAdjustedTime()) const; + bool IsTerrible(int64_t nNow = GetAdjustedTime()) const; // Calculate the relative chance this entry should be given when selecting nodes to connect to - double GetChance(int64 nNow = GetAdjustedTime()) const; + double GetChance(int64_t nNow = GetAdjustedTime()) const; }; @@ -179,12 +179,6 @@ private: // find an nId based on its network address std::map mapAddr; - - // address verification tokens - std::map verificationToken; - - // address reconnect tokens - std::map reconnectToken; // randomly-ordered vector of all nIds std::vector vRandom; @@ -226,13 +220,13 @@ protected: void MakeTried(CAddrInfo& info, int nId, int nOrigin); // Mark an entry "good", possibly moving it from "new" to "tried". - void Good_(const CService &addr, int64 nTime); + void Good_(const CService &addr, int64_t nTime); // Add an entry to the "new" table. - bool Add_(const CAddress &addr, const CNetAddr& source, int64 nTimePenalty); + bool Add_(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty); // Mark an entry as attempted to connect. - void Attempt_(const CService &addr, int64 nTime); + void Attempt_(const CService &addr, int64_t nTime); // Select an address to connect to. // nUnkBias determines how much to favor new addresses over tried ones (min=0, max=100) @@ -247,7 +241,7 @@ protected: void GetAddr_(std::vector &vAddr); // Mark an entry as currently-connected-to. - void Connected_(const CService &addr, int64 nTime); + void Connected_(const CService &addr, int64_t nTime); public: @@ -415,7 +409,7 @@ public: } // Add a single address. - bool Add(const CAddress &addr, const CNetAddr& source, int64 nTimePenalty = 0) + bool Add(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty = 0) { bool fRet = false; { @@ -430,7 +424,7 @@ public: } // Add multiple addresses. - bool Add(const std::vector &vAddr, const CNetAddr& source, int64 nTimePenalty = 0) + bool Add(const std::vector &vAddr, const CNetAddr& source, int64_t nTimePenalty = 0) { int nAdd = 0; { @@ -446,7 +440,7 @@ public: } // Mark an entry as accessible. - void Good(const CService &addr, int64 nTime = GetAdjustedTime()) + void Good(const CService &addr, int64_t nTime = GetAdjustedTime()) { { LOCK(cs); @@ -457,7 +451,7 @@ public: } // Mark an entry as connection attempted to. - void Attempt(const CService &addr, int64 nTime = GetAdjustedTime()) + void Attempt(const CService &addr, int64_t nTime = GetAdjustedTime()) { { LOCK(cs); @@ -466,71 +460,6 @@ public: Check(); } } - - void SetReconnectToken(const CNetAddr &addr, uint64 reconnect_token) - { - { - LOCK(cs); - Check(); - reconnectToken[addr] = reconnect_token; - Check(); - } - } - - bool GetReconnectToken(const CNetAddr &addr, uint64& reconnect_token) - { - bool result = false; - { - LOCK(cs); - Check(); - std::map< - CNetAddr, - uint64 - >::const_iterator found = reconnectToken.find( - addr - ); - if ( - reconnectToken.end() != found - ) { - reconnect_token = found->second; - result = true; - } - Check(); - } - return result; - } - - void SetVerificationToken(const CNetAddr &addr, uint64 verification_token) - { - { - LOCK(cs); - Check(); - verificationToken[addr] = verification_token; - Check(); - } - } - - bool CheckVerificationToken(const CNetAddr &addr, uint64 verification_token) - { - bool result = false; - { - LOCK(cs); - Check(); - std::map< - CNetAddr, - uint64 - >::const_iterator found = verificationToken.find( - addr - ); - if ( - verificationToken.end() != found - ) { - result = verification_token == found->second; - } - Check(); - } - return result; - } // Choose an address to connect to. // nUnkBias determines how much "new" entries are favored over "tried" ones (0-100). @@ -560,7 +489,7 @@ public: } // Mark an entry as currently-connected-to. - void Connected(const CService &addr, int64 nTime = GetAdjustedTime()) + void Connected(const CService &addr, int64_t nTime = GetAdjustedTime()) { { LOCK(cs); diff --git a/src/alert.cpp b/src/alert.cpp index 437f21c..9bd5b07 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -2,6 +2,9 @@ // Alert system // +#include +#include +#include #include #include @@ -50,8 +53,8 @@ std::string CUnsignedAlert::ToString() const return strprintf( "CAlert(\n" " nVersion = %d\n" - " nRelayUntil = %"PRI64d"\n" - " nExpiration = %"PRI64d"\n" + " nRelayUntil = %"PRId64"\n" + " nExpiration = %"PRId64"\n" " nID = %d\n" " nCancel = %d\n" " setCancel = %s\n" @@ -167,7 +170,7 @@ CAlert CAlert::getAlertByHash(const uint256 &hash) return retval; } -bool CAlert::ProcessAlert() +bool CAlert::ProcessAlert(bool fThread) { if (!CheckSignature()) return false; @@ -231,11 +234,38 @@ bool CAlert::ProcessAlert() // Add to mapAlerts mapAlerts.insert(make_pair(GetHash(), *this)); - // Notify UI if it applies to me + // Notify UI and -alertnotify if it applies to me if(AppliesToMe()) + { uiInterface.NotifyAlertChanged(GetHash(), CT_NEW); + std::string strCmd = GetArg("-alertnotify", ""); + if (!strCmd.empty()) + { + // Alert text should be plain ascii coming from a trusted source, but to + // be safe we first strip anything not in safeChars, then add single quotes around + // the whole string before passing it to the shell: + std::string singleQuote("'"); + // safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything + // even possibly remotely dangerous like & or > + std::string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@"); + std::string safeStatus; + for (std::string::size_type i = 0; i < strStatusBar.size(); i++) + { + if (safeChars.find(strStatusBar[i]) != std::string::npos) + safeStatus.push_back(strStatusBar[i]); + } + safeStatus = singleQuote+safeStatus+singleQuote; + boost::replace_all(strCmd, "%s", safeStatus); + + if (fThread) + boost::thread t(runCommand, strCmd); // thread runs free + else + runCommand(strCmd); + } + } } printf("accepted alert %d, AppliesToMe()=%d\n", nID, AppliesToMe()); return true; } + diff --git a/src/alert.h b/src/alert.h index 7949c76..124545b 100644 --- a/src/alert.h +++ b/src/alert.h @@ -3,8 +3,8 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef _BITCOINALERT_H_ -#define _BITCOINALERT_H_ 1 +#ifndef _TRIANGLESALERT_H_ +#define _TRIANGLESALERT_H_ 1 #include #include @@ -24,8 +24,8 @@ class CUnsignedAlert { public: int nVersion; - int64 nRelayUntil; // when newer nodes stop relaying to newer nodes - int64 nExpiration; + int64_t nRelayUntil; // when newer nodes stop relaying to newer nodes + int64_t nExpiration; int nID; int nCancel; std::set setCancel; @@ -91,7 +91,7 @@ public: bool AppliesToMe() const; bool RelayTo(CNode* pnode) const; bool CheckSignature() const; - bool ProcessAlert(); + bool ProcessAlert(bool fThread = true); /* * Get copy of (active) alert object by hash. Returns a null alert if it is not found. @@ -100,3 +100,5 @@ public: }; #endif + + diff --git a/src/allocators.h b/src/allocators.h index 99afa10..24f6e37 100644 --- a/src/allocators.h +++ b/src/allocators.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_ALLOCATORS_H -#define BITCOIN_ALLOCATORS_H +#ifndef TRIANGLES_ALLOCATORS_H +#define TRIANGLES_ALLOCATORS_H #include #include diff --git a/src/base58.h b/src/base58.h index 082c2d0..8b38bcd 100644 --- a/src/base58.h +++ b/src/base58.h @@ -12,8 +12,8 @@ // - E-mail usually won't line-break if there's no punctuation to break at. // - Double-clicking selects the whole number as one word if it's all alphanumeric. // -#ifndef BITCOIN_BASE58_H -#define BITCOIN_BASE58_H +#ifndef TRIANGLES_BASE58_H +#define TRIANGLES_BASE58_H #include #include @@ -253,25 +253,25 @@ public: bool operator> (const CBase58Data& b58) const { return CompareTo(b58) > 0; } }; -/** base58-encoded Bitcoin addresses. +/** base58-encoded addresses. * Public-key-hash-addresses have version 0 (or 111 testnet). * The data vector contains RIPEMD160(SHA256(pubkey)), where pubkey is the serialized public key. * Script-hash-addresses have version 5 (or 196 testnet). * The data vector contains RIPEMD160(SHA256(cscript)), where cscript is the serialized redemption script. */ -class CBitcoinAddress; -class CBitcoinAddressVisitor : public boost::static_visitor +class CTrianglesAddress; +class CTrianglesAddressVisitor : public boost::static_visitor { private: - CBitcoinAddress *addr; + CTrianglesAddress *addr; public: - CBitcoinAddressVisitor(CBitcoinAddress *addrIn) : addr(addrIn) { } + CTrianglesAddressVisitor(CTrianglesAddress *addrIn) : addr(addrIn) { } bool operator()(const CKeyID &id) const; bool operator()(const CScriptID &id) const; bool operator()(const CNoDestination &no) const; }; -class CBitcoinAddress : public CBase58Data +class CTrianglesAddress : public CBase58Data { public: enum @@ -294,7 +294,7 @@ public: bool Set(const CTxDestination &dest) { - return boost::apply_visitor(CBitcoinAddressVisitor(this), dest); + return boost::apply_visitor(CTrianglesAddressVisitor(this), dest); } bool IsValid() const @@ -327,21 +327,21 @@ public: return fExpectTestNet == fTestNet && vchData.size() == nExpectedSize; } - CBitcoinAddress() + CTrianglesAddress() { } - CBitcoinAddress(const CTxDestination &dest) + CTrianglesAddress(const CTxDestination &dest) { Set(dest); } - CBitcoinAddress(const std::string& strAddress) + CTrianglesAddress(const std::string& strAddress) { SetString(strAddress); } - CBitcoinAddress(const char* pszAddress) + CTrianglesAddress(const char* pszAddress) { SetString(pszAddress); } @@ -394,18 +394,18 @@ public: } }; -bool inline CBitcoinAddressVisitor::operator()(const CKeyID &id) const { return addr->Set(id); } -bool inline CBitcoinAddressVisitor::operator()(const CScriptID &id) const { return addr->Set(id); } -bool inline CBitcoinAddressVisitor::operator()(const CNoDestination &id) const { return false; } +bool inline CTrianglesAddressVisitor::operator()(const CKeyID &id) const { return addr->Set(id); } +bool inline CTrianglesAddressVisitor::operator()(const CScriptID &id) const { return addr->Set(id); } +bool inline CTrianglesAddressVisitor::operator()(const CNoDestination &id) const { return false; } /** A base58-encoded secret key */ -class CBitcoinSecret : public CBase58Data +class CTrianglesSecret : public CBase58Data { public: void SetSecret(const CSecret& vchSecret, bool fCompressed) { assert(vchSecret.size() == 32); - SetData(128 + (fTestNet ? CBitcoinAddress::PUBKEY_ADDRESS_TEST : CBitcoinAddress::PUBKEY_ADDRESS), &vchSecret[0], vchSecret.size()); + SetData(128 + (fTestNet ? CTrianglesAddress::PUBKEY_ADDRESS_TEST : CTrianglesAddress::PUBKEY_ADDRESS), &vchSecret[0], vchSecret.size()); if (fCompressed) vchData.push_back(1); } @@ -424,10 +424,10 @@ public: bool fExpectTestNet = false; switch(nVersion) { - case (128 + CBitcoinAddress::PUBKEY_ADDRESS): + case (128 + CTrianglesAddress::PUBKEY_ADDRESS): break; - case (128 + CBitcoinAddress::PUBKEY_ADDRESS_TEST): + case (128 + CTrianglesAddress::PUBKEY_ADDRESS_TEST): fExpectTestNet = true; break; @@ -447,12 +447,12 @@ public: return SetString(strSecret.c_str()); } - CBitcoinSecret(const CSecret& vchSecret, bool fCompressed) + CTrianglesSecret(const CSecret& vchSecret, bool fCompressed) { SetSecret(vchSecret, fCompressed); } - CBitcoinSecret() + CTrianglesSecret() { } }; diff --git a/src/bignum.h b/src/bignum.h index c214275..a245fed 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -2,14 +2,20 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_BIGNUM_H -#define BITCOIN_BIGNUM_H + +#ifndef TRIANGLES_BIGNUM_H +#define TRIANGLES_BIGNUM_H + +#include "serialize.h" +#include "uint256.h" +#include "version.h" + +#include #include #include -#include -#include "util.h" // for uint64 +#include /** Errors thrown by the bignum class */ class bignum_error : public std::runtime_error @@ -79,17 +85,17 @@ public: } //CBigNum(char n) is not portable. Use 'signed char' or 'unsigned char'. - CBigNum(signed char n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } - CBigNum(short n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } - CBigNum(int n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } - CBigNum(long n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } - CBigNum(int64 n) { BN_init(this); setint64(n); } - CBigNum(unsigned char n) { BN_init(this); setulong(n); } - CBigNum(unsigned short n) { BN_init(this); setulong(n); } - CBigNum(unsigned int n) { BN_init(this); setulong(n); } - CBigNum(unsigned long n) { BN_init(this); setulong(n); } - CBigNum(uint64 n) { BN_init(this); setuint64(n); } - explicit CBigNum(uint256 n) { BN_init(this); setuint256(n); } + CBigNum(signed char n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } + CBigNum(short n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } + CBigNum(int n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } + CBigNum(long n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); } + CBigNum(long long n) { BN_init(this); setint64(n); } + CBigNum(unsigned char n) { BN_init(this); setulong(n); } + CBigNum(unsigned short n) { BN_init(this); setulong(n); } + CBigNum(unsigned int n) { BN_init(this); setulong(n); } + CBigNum(unsigned long n) { BN_init(this); setulong(n); } + CBigNum(unsigned long long n) { BN_init(this); setuint64(n); } + explicit CBigNum(uint256 n) { BN_init(this); setuint256(n); } explicit CBigNum(const std::vector& vch) { @@ -97,6 +103,40 @@ public: setvch(vch); } + /** Generates a cryptographically secure random number between zero and range exclusive + * i.e. 0 < returned number < range + * @param range The upper bound on the number. + * @return + */ + static CBigNum randBignum(const CBigNum& range) { + CBigNum ret; + if(!BN_rand_range(&ret, &range)){ + throw bignum_error("CBigNum:rand element : BN_rand_range failed"); + } + return ret; + } + + /** Generates a cryptographically secure random k-bit number + * @param k The bit length of the number. + * @return + */ + static CBigNum RandKBitBigum(const uint32_t k){ + CBigNum ret; + if(!BN_rand(&ret, k, -1, 0)){ + throw bignum_error("CBigNum:rand element : BN_rand failed"); + } + return ret; + } + + /**Returns the size in bits of the underlying bignum. + * + * @return the size + */ + int bitSize() const{ + return BN_num_bits(this); + } + + void setulong(unsigned long n) { if (!BN_set_word(this, n)) @@ -122,14 +162,14 @@ public: return (n > (unsigned long)std::numeric_limits::max() ? std::numeric_limits::min() : -(int)n); } - void setint64(int64 sn) + void setint64(int64_t sn) { unsigned char pch[sizeof(sn) + 6]; unsigned char* p = pch + 4; bool fNegative; - uint64 n; + uint64_t n; - if (sn < (int64)0) + if (sn < (int64_t)0) { // 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); @@ -165,7 +205,7 @@ public: BN_mpi2bn(pch, p - pch, this); } - uint64 getuint64() + uint64_t getuint64() { unsigned int nSize = BN_bn2mpi(this, NULL); if (nSize < 4) @@ -174,13 +214,13 @@ public: BN_bn2mpi(this, &vch[0]); if (vch.size() > 4) vch[4] &= 0x7f; - uint64 n = 0; + uint64_t n = 0; for (unsigned int i = 0, j = vch.size()-1; i < sizeof(n) && j >= 4; i++, j--) ((unsigned char*)&n)[i] = vch[j]; return n; } - void setuint64(uint64 n) + void setuint64(uint64_t n) { unsigned char pch[sizeof(n) + 6]; unsigned char* p = pch + 4; @@ -235,7 +275,7 @@ public: BN_mpi2bn(pch, p - pch, this); } - uint256 getuint256() + uint256 getuint256() const { unsigned int nSize = BN_bn2mpi(this, NULL); if (nSize < 4) @@ -383,6 +423,122 @@ public: setvch(vch); } + /** + * exponentiation with an int. this^e + * @param e the exponent as an int + * @return + */ + CBigNum pow(const int e) const { + return this->pow(CBigNum(e)); + } + + /** + * exponentiation this^e + * @param e the exponent + * @return + */ + CBigNum pow(const CBigNum& e) const { + CAutoBN_CTX pctx; + CBigNum ret; + if (!BN_exp(&ret, this, &e, pctx)) + throw bignum_error("CBigNum::pow : BN_exp failed"); + return ret; + } + + /** + * modular multiplication: (this * b) mod m + * @param b operand + * @param m modulus + */ + CBigNum mul_mod(const CBigNum& b, const CBigNum& m) const { + CAutoBN_CTX pctx; + CBigNum ret; + if (!BN_mod_mul(&ret, this, &b, &m, pctx)) + throw bignum_error("CBigNum::mul_mod : BN_mod_mul failed"); + + return ret; + } + + /** + * modular exponentiation: this^e mod n + * @param e exponent + * @param m modulus + */ + CBigNum pow_mod(const CBigNum& e, const CBigNum& m) const { + CAutoBN_CTX pctx; + CBigNum ret; + if( e < 0){ + // g^-x = (g^-1)^x + CBigNum inv = this->inverse(m); + CBigNum posE = e * -1; + if (!BN_mod_exp(&ret, &inv, &posE, &m, pctx)) + throw bignum_error("CBigNum::pow_mod: BN_mod_exp failed on negative exponent"); + }else + if (!BN_mod_exp(&ret, this, &e, &m, pctx)) + throw bignum_error("CBigNum::pow_mod : BN_mod_exp failed"); + + return ret; + } + + /** + * Calculates the inverse of this element mod m. + * i.e. i such this*i = 1 mod m + * @param m the modu + * @return the inverse + */ + CBigNum inverse(const CBigNum& m) const { + CAutoBN_CTX pctx; + CBigNum ret; + if (!BN_mod_inverse(&ret, this, &m, pctx)) + throw bignum_error("CBigNum::inverse*= :BN_mod_inverse"); + return ret; + } + + /** + * Generates a random (safe) prime of numBits bits + * @param numBits the number of bits + * @param safe true for a safe prime + * @return the prime + */ + static CBigNum generatePrime(const unsigned int numBits, bool safe = false) { + CBigNum ret; + if(!BN_generate_prime_ex(&ret, numBits, (safe == true), NULL, NULL, NULL)) + throw bignum_error("CBigNum::generatePrime*= :BN_generate_prime_ex"); + return ret; + } + + /** + * Calculates the greatest common divisor (GCD) of two numbers. + * @param m the second element + * @return the GCD + */ + CBigNum gcd( const CBigNum& b) const{ + CAutoBN_CTX pctx; + CBigNum ret; + if (!BN_gcd(&ret, this, &b, pctx)) + throw bignum_error("CBigNum::gcd*= :BN_gcd"); + return ret; + } + + /** + * Miller-Rabin primality test on this element + * @param checks: optional, the number of Miller-Rabin tests to run + * default causes error rate of 2^-80. + * @return true if prime + */ + bool isPrime(const int checks=BN_prime_checks) const { + CAutoBN_CTX pctx; + int ret = BN_is_prime(this, checks, NULL, pctx, NULL); + if(ret < 0){ + throw bignum_error("CBigNum::isPrime :BN_is_prime"); + } + return ret; + } + + bool isOne() const { + return BN_is_one(this); + } + bool operator!() const { @@ -485,6 +641,8 @@ public: friend inline const CBigNum operator-(const CBigNum& a, const CBigNum& b); friend inline const CBigNum operator/(const CBigNum& a, const CBigNum& b); friend inline const CBigNum operator%(const CBigNum& a, const CBigNum& b); + friend inline const CBigNum operator*(const CBigNum& a, const CBigNum& b); + friend inline bool operator<(const CBigNum& a, const CBigNum& b); }; @@ -534,7 +692,7 @@ inline const CBigNum operator%(const CBigNum& a, const CBigNum& b) { CAutoBN_CTX pctx; CBigNum r; - if (!BN_mod(&r, &a, &b, pctx)) + if (!BN_nnmod(&r, &a, &b, pctx)) throw bignum_error("CBigNum::operator% : BN_div failed"); return r; } @@ -561,4 +719,9 @@ inline bool operator>=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, inline bool operator<(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) < 0); } inline bool operator>(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) > 0); } +inline std::ostream& operator<<(std::ostream &strm, const CBigNum &b) { return strm << b.ToString(10); } + +typedef CBigNum Bignum; + #endif + diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index 4213f37..8eb43d9 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -7,7 +7,7 @@ #include "checkpoints.h" -#include "db.h" +#include "txdb.h" #include "main.h" #include "uint256.h" @@ -35,6 +35,7 @@ namespace Checkpoints ( 9001, uint256("0x6d5c6c5f201cc9e59659ee0da30d1430dc6bf3b12a8ff4c3864ab8d6286b0007")) ( 9002, uint256("0xa1e20fb1d44688b763690cf74d6aefe859e4cc32981f9e3f2b2ae9702bbcf249")) ( 10881, uint256("0x4b6554c45e1e6764a6f3c309c47baf53c9edd81f624e52b072518cd15da237e6")) + ( 17650, uint256("0x224940e1f986a202209b8e762728d1452ab45870c308abf84905674acf326a47")) ; static MapCheckpoints mapCheckpointsTestnet = @@ -47,11 +48,12 @@ namespace Checkpoints ( 3935, uint256("0xe16290c9757d1368b8d7c35de07d4f8f70c2c9f9c785b667df0c3bff85086ca6")) ( 5703, uint256("0x587db07bb2172ad7db72c5fabc2518262a1b27f503f99417510b2c6fafa6557b")) ( 9000, uint256("0x00000000019ef6b2f5e7c324c7d083ee94502305aabc7e9cd73a7fb2a57bb8db")) - ( 9001, uint256("0x6d5c6c5f201cc9e59659ee0da30d1430dc6bf3b12a8ff4c3864ab8d6286b0007")) + ( 9001, uint256("0x6d5c6c5f201cc9e59659ee0da30d1430dc6bf3b12a8ff4c3864ab8d6286b0007")) ( 9002, uint256("0xa1e20fb1d44688b763690cf74d6aefe859e4cc32981f9e3f2b2ae9702bbcf249")) ( 10881, uint256("0x4b6554c45e1e6764a6f3c309c47baf53c9edd81f624e52b072518cd15da237e6")) + ( 17650, uint256("0x224940e1f986a202209b8e762728d1452ab45870c308abf84905674acf326a47")) ; - + bool CheckHardened(int nHeight, const uint256& hash) { MapCheckpoints& checkpoints = (fTestNet ? mapCheckpointsTestnet : mapCheckpoints); @@ -83,8 +85,8 @@ namespace Checkpoints } // triangles: synchronized checkpoint (centrally broadcasted) - uint256 hashSyncCheckpoint = uint256("0x4b6554c45e1e6764a6f3c309c47baf53c9edd81f624e52b072518cd15da237e6"); - uint256 hashPendingCheckpoint = uint256("0x4b6554c45e1e6764a6f3c309c47baf53c9edd81f624e52b072518cd15da237e6"); + uint256 hashSyncCheckpoint = uint256("0x224940e1f986a202209b8e762728d1452ab45870c308abf84905674acf326a47"); + uint256 hashPendingCheckpoint = uint256("0x224940e1f986a202209b8e762728d1452ab45870c308abf84905674acf326a47"); CSyncCheckpoint checkpointMessage; CSyncCheckpoint checkpointMessagePending; uint256 hashInvalidCheckpoint = 0; @@ -120,7 +122,7 @@ namespace Checkpoints CBlockIndex* pindex = pindexSyncCheckpoint; while (pindex->nHeight > pindexCheckpointRecv->nHeight) if (!(pindex = pindex->pprev)) - return error("ValidateSyncCheckpoint: pprev1 null - block index structure failure"); + return error("ValidateSyncCheckpoint: pprev null - block index structure failure"); if (pindex->GetBlockHash() != hashCheckpoint) { hashInvalidCheckpoint = hashCheckpoint; @@ -155,7 +157,6 @@ namespace Checkpoints } if (!txdb.TxnCommit()) return error("WriteSyncCheckpoint(): failed to commit to db sync checkpoint %s", hashCheckpoint.ToString().c_str()); - txdb.Close(); Checkpoints::hashSyncCheckpoint = hashCheckpoint; return true; @@ -186,7 +187,6 @@ namespace Checkpoints return error("AcceptPendingSyncCheckpoint: SetBestChain failed for sync checkpoint %s", hashPendingCheckpoint.ToString().c_str()); } } - txdb.Close(); if (!WriteSyncCheckpoint(hashPendingCheckpoint)) return error("AcceptPendingSyncCheckpoint(): failed to write sync checkpoint %s", hashPendingCheckpoint.ToString().c_str()); @@ -208,14 +208,10 @@ namespace Checkpoints // Automatically select a suitable sync-checkpoint uint256 AutoSelectSyncCheckpoint() { - // Proof-of-work blocks are immediately checkpointed - // to defend against 51% attack which rejects other miners block - - // Select the last proof-of-work block - const CBlockIndex *pindex = GetLastBlockIndex(pindexBest, false); - // Search forward for a block within max span and 6 blocks - while (pindex->pnext && (pindex->GetBlockTime() + CHECKPOINT_MAX_SPAN <= pindexBest->GetBlockTime() || pindex->nHeight + 6 <= pindexBest->nHeight)) - pindex = pindex->pnext; + const CBlockIndex *pindex = pindexBest; + // Search backward for a block within max span and maturity window + while (pindex->pprev && (pindex->GetBlockTime() + CHECKPOINT_MAX_SPAN > pindexBest->GetBlockTime() || pindex->nHeight + 8 > pindexBest->nHeight)) + pindex = pindex->pprev; return pindex->GetBlockHash(); } @@ -277,7 +273,6 @@ namespace Checkpoints { return error("ResetSyncCheckpoint: SetBestChain failed for hardened checkpoint %s", hash.ToString().c_str()); } - txdb.Close(); } else if(!mapBlockIndex.count(hash)) { @@ -313,7 +308,7 @@ namespace Checkpoints { // Test signing a sync-checkpoint with genesis block CSyncCheckpoint checkpoint; - checkpoint.hashCheckpoint = !fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet; + checkpoint.hashCheckpoint = !fTestNet ? hashGenesisBlockOfficial : hashGenesisBlockTestNet; CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION); sMsg << (CUnsignedSyncCheckpoint)checkpoint; checkpoint.vchMsg = std::vector(sMsg.begin(), sMsg.end()); @@ -370,16 +365,6 @@ namespace Checkpoints return (nBestHeight >= pindexSync->nHeight + nCoinbaseMaturity || pindexSync->GetBlockTime() + nStakeMinAge < GetAdjustedTime()); } - - // Is the sync-checkpoint too old? - bool IsSyncCheckpointTooOld(unsigned int nSeconds) - { - LOCK(cs_hashSyncCheckpoint); - // sync-checkpoint should always be accepted block - assert(mapBlockIndex.count(hashSyncCheckpoint)); - const CBlockIndex* pindexSync = mapBlockIndex[hashSyncCheckpoint]; - return (pindexSync->GetBlockTime() + nSeconds < GetAdjustedTime()); - } } // triangles: sync-checkpoint master key @@ -443,7 +428,6 @@ bool CSyncCheckpoint::ProcessSyncCheckpoint(CNode* pfrom) return error("ProcessSyncCheckpoint: SetBestChain failed for sync checkpoint %s", hashCheckpoint.ToString().c_str()); } } - txdb.Close(); if (!Checkpoints::WriteSyncCheckpoint(hashCheckpoint)) return error("ProcessSyncCheckpoint(): failed to write sync checkpoint %s", hashCheckpoint.ToString().c_str()); diff --git a/src/checkpoints.h b/src/checkpoints.h index e5ab6a4..d6c0557 100644 --- a/src/checkpoints.h +++ b/src/checkpoints.h @@ -1,8 +1,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_CHECKPOINT_H -#define BITCOIN_CHECKPOINT_H +#ifndef TRIANGLES_CHECKPOINT_H +#define TRIANGLES_CHECKPOINT_H #include #include "net.h" @@ -10,6 +10,12 @@ #define CHECKPOINT_MAX_SPAN (60 * 60 * 2) // max 2 hours before latest block +#ifdef WIN32 +#undef STRICT +#undef PERMISSIVE +#undef ADVISORY +#endif + class uint256; class CBlockIndex; class CSyncCheckpoint; @@ -19,6 +25,17 @@ class CSyncCheckpoint; */ namespace Checkpoints { + /** Checkpointing mode */ + enum CPMode + { + // Scrict checkpoints policy, perform conflicts verification and resolve conflicts + STRICT = 0, + // Advisory checkpoints policy, perform conflicts verification but don't try to resolve them + ADVISORY = 1, + // Permissive checkpoints policy, don't perform any checking + PERMISSIVE = 2 + }; + // Returns true if block passes checkpoint checks bool CheckHardened(int nHeight, const uint256& hash); @@ -44,7 +61,6 @@ namespace Checkpoints bool SetCheckpointPrivKey(std::string strPrivKey); bool SendSyncCheckpoint(uint256 hashCheckpoint); bool IsMatureSyncCheckpoint(); - bool IsSyncCheckpointTooOld(unsigned int nSeconds); } // triangles: synchronized checkpoint diff --git a/src/clientversion.h b/src/clientversion.h index 5addf46..9dc1d5a 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -5,11 +5,11 @@ // client versioning // -// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it -#define CLIENT_VERSION_MAJOR 3 -#define CLIENT_VERSION_MINOR 4 -#define CLIENT_VERSION_REVISION 3 -#define CLIENT_VERSION_BUILD 1 +// These need to be macros, as version.cpp's and triangles-qt.rc's voodoo requires it +#define CLIENT_VERSION_MAJOR 4 +#define CLIENT_VERSION_MINOR 0 +#define CLIENT_VERSION_REVISION 0 +#define CLIENT_VERSION_BUILD 4 // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! diff --git a/src/compat.h b/src/compat.h index 79ebb93..1aa8dff 100644 --- a/src/compat.h +++ b/src/compat.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef _BITCOIN_COMPAT_H -#define _BITCOIN_COMPAT_H 1 +#ifndef _TRIANGLES_COMPAT_H +#define _TRIANGLES_COMPAT_H 1 #ifdef WIN32 #define _WIN32_WINNT 0x0501 @@ -23,9 +23,11 @@ #include #include #include -#endif typedef u_int SOCKET; +#endif + + #ifdef WIN32 #define MSG_NOSIGNAL 0 #define MSG_DONTWAIT 0 diff --git a/src/crypter.cpp b/src/crypter.cpp index 181b8fa..3a7f997 100644 --- a/src/crypter.cpp +++ b/src/crypter.cpp @@ -11,6 +11,7 @@ #endif #include "crypter.h" +#include "scrypt.h" bool CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::vector& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod) { @@ -19,13 +20,26 @@ bool CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::v int i = 0; if (nDerivationMethod == 0) + { i = EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha512(), &chSalt[0], (unsigned char *)&strKeyData[0], strKeyData.size(), nRounds, chKey, chIV); + } + + if (nDerivationMethod == 1) + { + // Passphrase conversion + uint256 scryptHash = scrypt_salted_multiround_hash((const void*)strKeyData.c_str(), strKeyData.size(), &chSalt[0], 8, nRounds); + + i = EVP_BytesToKey(EVP_aes_256_cbc(), EVP_sha512(), &chSalt[0], + (unsigned char *)&scryptHash, sizeof scryptHash, nRounds, chKey, chIV); + OPENSSL_cleanse(&scryptHash, sizeof scryptHash); + } + if (i != (int)WALLET_CRYPTO_KEY_SIZE) { - memset(&chKey, 0, sizeof chKey); - memset(&chIV, 0, sizeof chIV); + OPENSSL_cleanse(&chKey, sizeof chKey); + OPENSSL_cleanse(&chIV, sizeof chIV); return false; } diff --git a/src/crypter.h b/src/crypter.h index 04538a3..c1bb64f 100644 --- a/src/crypter.h +++ b/src/crypter.h @@ -56,6 +56,26 @@ public: nDerivationMethod = 0; vchOtherDerivationParameters = std::vector(0); } + + CMasterKey(unsigned int nDerivationMethodIndex) + { + switch (nDerivationMethodIndex) + { + case 0: // sha512 + default: + nDeriveIterations = 25000; + nDerivationMethod = 0; + vchOtherDerivationParameters = std::vector(0); + break; + + case 1: // scrypt+sha512 + nDeriveIterations = 10000; + nDerivationMethod = 1; + vchOtherDerivationParameters = std::vector(0); + break; + } + } + }; typedef std::vector > CKeyingMaterial; @@ -76,8 +96,8 @@ public: void CleanKey() { - memset(&chKey, 0, sizeof chKey); - memset(&chIV, 0, sizeof chIV); + OPENSSL_cleanse(&chKey, sizeof chKey); + OPENSSL_cleanse(&chIV, sizeof chIV); fKeySet = false; } diff --git a/src/db.cpp b/src/db.cpp index cfe173f..03478ca 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -5,11 +5,9 @@ #include "db.h" #include "net.h" -#include "checkpoints.h" #include "util.h" #include "main.h" -#include "kernel.h" -#include +#include "ui_interface.h" #include #include @@ -85,12 +83,18 @@ bool CDBEnv::Open(boost::filesystem::path pathEnv_) dbenv.set_cachesize(nDbCache / 1024, (nDbCache % 1024)*1048576, 1); dbenv.set_lg_bsize(1048576); dbenv.set_lg_max(10485760); - dbenv.set_lk_max_locks(10000); + + // Bugfix: Bump lk_max_locks default to 537000, to safely handle reorgs with up to 5 blocks reversed + // dbenv.set_lk_max_locks(10000); + dbenv.set_lk_max_locks(537000); + dbenv.set_lk_max_objects(10000); dbenv.set_errfile(fopen(pathErrorFile.string().c_str(), "a")); /// debug dbenv.set_flags(DB_AUTO_COMMIT, 1); dbenv.set_flags(DB_TXN_WRITE_NOSYNC, 1); -// dbenv.log_set_config(DB_LOG_AUTO_REMOVE, 1); +#ifdef DB_LOG_AUTO_REMOVE + dbenv.log_set_config(DB_LOG_AUTO_REMOVE, 1); +#endif int ret = dbenv.open(strPath.c_str(), DB_CREATE | DB_INIT_LOCK | @@ -106,6 +110,7 @@ bool CDBEnv::Open(boost::filesystem::path pathEnv_) fDbEnvInit = true; fMockDb = false; + return true; } @@ -125,7 +130,9 @@ void CDBEnv::MakeMock() 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); +#ifdef DB_LOG_IN_MEMORY + dbenv.log_set_config(DB_LOG_IN_MEMORY, 1); +#endif int ret = dbenv.open(NULL, DB_CREATE | DB_INIT_LOCK | @@ -172,9 +179,18 @@ bool CDBEnv::Salvage(std::string strFile, bool fAggressive, Db db(&dbenv, 0); int result = db.verify(strFile.c_str(), NULL, &strDump, flags); - if (result != 0) + if (result == DB_VERIFY_BAD) { - printf("ERROR: db salvage failed\n"); + printf("Error: Salvage found errors, all data may not be recoverable.\n"); + if (!fAggressive) + { + printf("Error: Rerun with aggressive mode to ignore errors and continue.\n"); + return false; + } + } + if (result != 0 && result != DB_VERIFY_BAD) + { + printf("ERROR: db salvage failed: %d\n",result); return false; } @@ -423,7 +439,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip) return fSuccess; } } - Sleep(100); + MilliSleep(100); } return false; } @@ -431,7 +447,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip) void CDBEnv::Flush(bool fShutdown) { - int64 nStart = GetTimeMillis(); + int64_t nStart = GetTimeMillis(); // Flush log data to the actual data file // on all files that are not in use printf("Flush(%s)%s\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started"); @@ -462,7 +478,7 @@ void CDBEnv::Flush(bool fShutdown) else mi++; } - printf("DBFlush(%s)%s ended %15"PRI64d"ms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started", GetTimeMillis() - nStart); + printf("DBFlush(%s)%s ended %15"PRId64"ms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started", GetTimeMillis() - nStart); if (fShutdown) { char** listp; @@ -476,405 +492,6 @@ void CDBEnv::Flush(bool fShutdown) } - - - - -// -// CTxDB -// - -bool CTxDB::ReadTxIndex(uint256 hash, CTxIndex& txindex) -{ - assert(!fClient); - txindex.SetNull(); - return Read(make_pair(string("tx"), hash), txindex); -} - -bool CTxDB::UpdateTxIndex(uint256 hash, const CTxIndex& txindex) -{ - assert(!fClient); - return Write(make_pair(string("tx"), hash), txindex); -} - -bool CTxDB::AddTxIndex(const CTransaction& tx, const CDiskTxPos& pos, int nHeight) -{ - assert(!fClient); - - // Add to tx index - uint256 hash = tx.GetHash(); - CTxIndex txindex(pos, tx.vout.size()); - return Write(make_pair(string("tx"), hash), txindex); -} - -bool CTxDB::EraseTxIndex(const CTransaction& tx) -{ - assert(!fClient); - uint256 hash = tx.GetHash(); - - return Erase(make_pair(string("tx"), hash)); -} - -bool CTxDB::ContainsTx(uint256 hash) -{ - assert(!fClient); - return Exists(make_pair(string("tx"), hash)); -} - -bool CTxDB::ReadDiskTx(uint256 hash, CTransaction& tx, CTxIndex& txindex) -{ - assert(!fClient); - tx.SetNull(); - if (!ReadTxIndex(hash, txindex)) - return false; - return (tx.ReadFromDisk(txindex.pos)); -} - -bool CTxDB::ReadDiskTx(uint256 hash, CTransaction& tx) -{ - CTxIndex txindex; - return ReadDiskTx(hash, tx, txindex); -} - -bool CTxDB::ReadDiskTx(COutPoint outpoint, CTransaction& tx, CTxIndex& txindex) -{ - return ReadDiskTx(outpoint.hash, tx, txindex); -} - -bool CTxDB::ReadDiskTx(COutPoint outpoint, CTransaction& tx) -{ - CTxIndex txindex; - return ReadDiskTx(outpoint.hash, tx, txindex); -} - -bool CTxDB::WriteBlockIndex(const CDiskBlockIndex& blockindex) -{ - return Write(make_pair(string("blockindex"), blockindex.GetBlockHash()), blockindex); -} - -bool CTxDB::ReadHashBestChain(uint256& hashBestChain) -{ - return Read(string("hashBestChain"), hashBestChain); -} - -bool CTxDB::WriteHashBestChain(uint256 hashBestChain) -{ - return Write(string("hashBestChain"), hashBestChain); -} - -bool CTxDB::ReadBestInvalidTrust(CBigNum& bnBestInvalidTrust) -{ - return Read(string("bnBestInvalidTrust"), bnBestInvalidTrust); -} - -bool CTxDB::WriteBestInvalidTrust(CBigNum bnBestInvalidTrust) -{ - return Write(string("bnBestInvalidTrust"), bnBestInvalidTrust); -} - -bool CTxDB::ReadSyncCheckpoint(uint256& hashCheckpoint) -{ - return Read(string("hashSyncCheckpoint"), hashCheckpoint); -} - -bool CTxDB::WriteSyncCheckpoint(uint256 hashCheckpoint) -{ - return Write(string("hashSyncCheckpoint"), hashCheckpoint); -} - -bool CTxDB::ReadCheckpointPubKey(string& strPubKey) -{ - return Read(string("strCheckpointPubKey"), strPubKey); -} - -bool CTxDB::WriteCheckpointPubKey(const string& strPubKey) -{ - return Write(string("strCheckpointPubKey"), strPubKey); -} - -CBlockIndex static * InsertBlockIndex(uint256 hash) -{ - if (hash == 0) - return NULL; - - // Return existing - map::iterator mi = mapBlockIndex.find(hash); - if (mi != mapBlockIndex.end()) - return (*mi).second; - - // Create new - CBlockIndex* pindexNew = new CBlockIndex(); - if (!pindexNew) - throw runtime_error("LoadBlockIndex() : new CBlockIndex failed"); - mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first; - pindexNew->phashBlock = &((*mi).first); - - return pindexNew; -} - -bool CTxDB::LoadBlockIndex() -{ - if (!LoadBlockIndexGuts()) - return false; - - if (fRequestShutdown) - return true; - - // Calculate bnChainTrust - vector > vSortedByHeight; - vSortedByHeight.reserve(mapBlockIndex.size()); - BOOST_FOREACH(const PAIRTYPE(uint256, CBlockIndex*)& item, mapBlockIndex) - { - CBlockIndex* pindex = item.second; - vSortedByHeight.push_back(make_pair(pindex->nHeight, pindex)); - } - sort(vSortedByHeight.begin(), vSortedByHeight.end()); - BOOST_FOREACH(const PAIRTYPE(int, CBlockIndex*)& item, vSortedByHeight) - { - CBlockIndex* pindex = item.second; - pindex->bnChainTrust = (pindex->pprev ? pindex->pprev->bnChainTrust : 0) + pindex->GetBlockTrust(); - // triangles: calculate stake modifier checksum - pindex->nStakeModifierChecksum = GetStakeModifierChecksum(pindex); - if (!CheckStakeModifierCheckpoints(pindex->nHeight, pindex->nStakeModifierChecksum)) - return error("CTxDB::LoadBlockIndex() : Failed stake modifier checkpoint height=%d, modifier=0x%016"PRI64x, pindex->nHeight, pindex->nStakeModifier); - } - - // Load hashBestChain pointer to end of best chain - if (!ReadHashBestChain(hashBestChain)) - { - if (pindexGenesisBlock == NULL) - return true; - return error("CTxDB::LoadBlockIndex() : hashBestChain not loaded"); - } - if (!mapBlockIndex.count(hashBestChain)) - return error("CTxDB::LoadBlockIndex() : hashBestChain not found in the block index"); - pindexBest = mapBlockIndex[hashBestChain]; - nBestHeight = pindexBest->nHeight; - bnBestChainTrust = pindexBest->bnChainTrust; - printf("LoadBlockIndex(): hashBestChain=%s height=%d trust=%s date=%s\n", - hashBestChain.ToString().substr(0,20).c_str(), nBestHeight, bnBestChainTrust.ToString().c_str(), - DateTimeStrFormat("%x %H:%M:%S", pindexBest->GetBlockTime()).c_str()); - - // triangles: load hashSyncCheckpoint - if (!ReadSyncCheckpoint(Checkpoints::hashSyncCheckpoint)) - return error("CTxDB::LoadBlockIndex() : hashSyncCheckpoint not loaded"); - printf("LoadBlockIndex(): synchronized checkpoint %s\n", Checkpoints::hashSyncCheckpoint.ToString().c_str()); - - // Load bnBestInvalidTrust, OK if it doesn't exist - ReadBestInvalidTrust(bnBestInvalidTrust); - - // Verify blocks in the best chain - int nCheckLevel = GetArg("-checklevel", 1); - int nCheckDepth = GetArg( "-checkblocks", 2500); - if (nCheckDepth == 0) - nCheckDepth = 1000000000; // suffices until the year 19000 - if (nCheckDepth > nBestHeight) - nCheckDepth = nBestHeight; - printf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel); - CBlockIndex* pindexFork = NULL; - map, CBlockIndex*> mapBlockPos; - for (CBlockIndex* pindex = pindexBest; pindex && pindex->pprev; pindex = pindex->pprev) - { - if (fRequestShutdown || pindex->nHeight < nBestHeight-nCheckDepth) - break; - CBlock block; - if (!block.ReadFromDisk(pindex)) - return error("LoadBlockIndex() : block.ReadFromDisk failed"); - // check level 1: verify block validity - if (nCheckLevel>0 && !block.CheckBlock()) - { - printf("LoadBlockIndex() : *** found bad block at %d, hash=%s\n", pindex->nHeight, pindex->GetBlockHash().ToString().c_str()); - pindexFork = pindex->pprev; - } - // check level 2: verify transaction index validity - if (nCheckLevel>1) - { - pair pos = make_pair(pindex->nFile, pindex->nBlockPos); - mapBlockPos[pos] = pindex; - BOOST_FOREACH(const CTransaction &tx, block.vtx) - { - uint256 hashTx = tx.GetHash(); - CTxIndex txindex; - if (ReadTxIndex(hashTx, txindex)) - { - // check level 3: checker transaction hashes - if (nCheckLevel>2 || pindex->nFile != txindex.pos.nFile || pindex->nBlockPos != txindex.pos.nBlockPos) - { - // either an error or a duplicate transaction - CTransaction txFound; - if (!txFound.ReadFromDisk(txindex.pos)) - { - printf("LoadBlockIndex() : *** cannot read mislocated transaction %s\n", hashTx.ToString().c_str()); - pindexFork = pindex->pprev; - } - else - if (txFound.GetHash() != hashTx) // not a duplicate tx - { - printf("LoadBlockIndex(): *** invalid tx position for %s\n", hashTx.ToString().c_str()); - pindexFork = pindex->pprev; - } - } - // check level 4: check whether spent txouts were spent within the main chain - unsigned int nOutput = 0; - if (nCheckLevel>3) - { - BOOST_FOREACH(const CDiskTxPos &txpos, txindex.vSpent) - { - if (!txpos.IsNull()) - { - pair posFind = make_pair(txpos.nFile, txpos.nBlockPos); - if (!mapBlockPos.count(posFind)) - { - printf("LoadBlockIndex(): *** found bad spend at %d, hashBlock=%s, hashTx=%s\n", pindex->nHeight, pindex->GetBlockHash().ToString().c_str(), hashTx.ToString().c_str()); - pindexFork = pindex->pprev; - } - // check level 6: check whether spent txouts were spent by a valid transaction that consume them - if (nCheckLevel>5) - { - CTransaction txSpend; - if (!txSpend.ReadFromDisk(txpos)) - { - printf("LoadBlockIndex(): *** cannot read spending transaction of %s:%i from disk\n", hashTx.ToString().c_str(), nOutput); - pindexFork = pindex->pprev; - } - else if (!txSpend.CheckTransaction()) - { - printf("LoadBlockIndex(): *** spending transaction of %s:%i is invalid\n", hashTx.ToString().c_str(), nOutput); - pindexFork = pindex->pprev; - } - else - { - bool fFound = false; - BOOST_FOREACH(const CTxIn &txin, txSpend.vin) - if (txin.prevout.hash == hashTx && txin.prevout.n == nOutput) - fFound = true; - if (!fFound) - { - printf("LoadBlockIndex(): *** spending transaction of %s:%i does not spend it\n", hashTx.ToString().c_str(), nOutput); - pindexFork = pindex->pprev; - } - } - } - } - nOutput++; - } - } - } - // check level 5: check whether all prevouts are marked spent - if (nCheckLevel>4) - { - BOOST_FOREACH(const CTxIn &txin, tx.vin) - { - CTxIndex txindex; - if (ReadTxIndex(txin.prevout.hash, txindex)) - if (txindex.vSpent.size()-1 < txin.prevout.n || txindex.vSpent[txin.prevout.n].IsNull()) - { - printf("LoadBlockIndex(): *** found unspent prevout %s:%i in %s\n", txin.prevout.hash.ToString().c_str(), txin.prevout.n, hashTx.ToString().c_str()); - pindexFork = pindex->pprev; - } - } - } - } - } - } - if (pindexFork && !fRequestShutdown) - { - // Reorg back to the fork - printf("LoadBlockIndex() : *** moving best chain pointer back to block %d\n", pindexFork->nHeight); - CBlock block; - if (!block.ReadFromDisk(pindexFork)) - return error("LoadBlockIndex() : block.ReadFromDisk failed"); - CTxDB txdb; - block.SetBestChain(txdb, pindexFork); - } - - return true; -} - - - -bool CTxDB::LoadBlockIndexGuts() -{ - // Get database cursor - Dbc* pcursor = GetCursor(); - if (!pcursor) - return false; - - // Load mapBlockIndex - unsigned int fFlags = DB_SET_RANGE; - loop - { - // Read next record - CDataStream ssKey(SER_DISK, CLIENT_VERSION); - if (fFlags == DB_SET_RANGE) - ssKey << make_pair(string("blockindex"), uint256(0)); - CDataStream ssValue(SER_DISK, CLIENT_VERSION); - int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags); - fFlags = DB_NEXT; - if (ret == DB_NOTFOUND) - break; - else if (ret != 0) - return false; - - // Unserialize - - try { - string strType; - ssKey >> strType; - if (strType == "blockindex" && !fRequestShutdown) - { - CDiskBlockIndex diskindex; - ssValue >> diskindex; - - // Construct block index object - CBlockIndex* pindexNew = InsertBlockIndex(diskindex.GetBlockHash()); - pindexNew->pprev = InsertBlockIndex(diskindex.hashPrev); - pindexNew->pnext = InsertBlockIndex(diskindex.hashNext); - pindexNew->nFile = diskindex.nFile; - pindexNew->nBlockPos = diskindex.nBlockPos; - pindexNew->nHeight = diskindex.nHeight; - pindexNew->nMint = diskindex.nMint; - pindexNew->nMoneySupply = diskindex.nMoneySupply; - pindexNew->nFlags = diskindex.nFlags; - pindexNew->nStakeModifier = diskindex.nStakeModifier; - pindexNew->prevoutStake = diskindex.prevoutStake; - pindexNew->nStakeTime = diskindex.nStakeTime; - pindexNew->hashProofOfStake = diskindex.hashProofOfStake; - pindexNew->nVersion = diskindex.nVersion; - pindexNew->hashMerkleRoot = diskindex.hashMerkleRoot; - pindexNew->nTime = diskindex.nTime; - pindexNew->nBits = diskindex.nBits; - pindexNew->nNonce = diskindex.nNonce; - - // Watch for genesis block - if (pindexGenesisBlock == NULL && diskindex.GetBlockHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)) - pindexGenesisBlock = pindexNew; - - if (!pindexNew->CheckIndex()) - return error("LoadBlockIndex() : CheckIndex failed at %d", pindexNew->nHeight); - - // triangles: build setStakeSeen - if (pindexNew->IsProofOfStake()) - setStakeSeen.insert(make_pair(pindexNew->prevoutStake, pindexNew->nStakeTime)); - } - else - { - break; // if shutdown requested or finished loading block index - } - } // try - catch (std::exception &e) { - return error("%s() : deserialize error", __PRETTY_FUNCTION__); - } - } - pcursor->close(); - - return true; -} - - - - - // // CAddrDB // @@ -932,8 +549,10 @@ bool CAddrDB::Read(CAddrMan& addr) return error("CAddrman::Read() : open failed"); // use file size to size memory buffer - int fileSize = GetFilesize(filein); + int fileSize = boost::filesystem::file_size(pathAddr); int dataSize = fileSize - sizeof(uint256); + // Don't try to resize to a negative number if file is small + if ( dataSize < 0 ) dataSize = 0; vector vchData; vchData.resize(dataSize); uint256 hashIn; diff --git a/src/db.h b/src/db.h index 2be0262..40ffeb9 100644 --- a/src/db.h +++ b/src/db.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_DB_H -#define BITCOIN_DB_H +#ifndef TRIANGLES_DB_H +#define TRIANGLES_DB_H #include "main.h" @@ -11,7 +11,7 @@ #include #include -#include +#include class CAddress; class CAddrMan; @@ -312,46 +312,6 @@ public: }; - - - - - -/** Access to the transaction database (blkindex.dat) */ -class CTxDB : public CDB -{ -public: - CTxDB(const char* pszMode="r+") : CDB("blkindex.dat", pszMode) { } -private: - CTxDB(const CTxDB&); - void operator=(const CTxDB&); -public: - bool ReadTxIndex(uint256 hash, CTxIndex& txindex); - bool UpdateTxIndex(uint256 hash, const CTxIndex& txindex); - bool AddTxIndex(const CTransaction& tx, const CDiskTxPos& pos, int nHeight); - bool EraseTxIndex(const CTransaction& tx); - bool ContainsTx(uint256 hash); - bool ReadDiskTx(uint256 hash, CTransaction& tx, CTxIndex& txindex); - bool ReadDiskTx(uint256 hash, CTransaction& tx); - bool ReadDiskTx(COutPoint outpoint, CTransaction& tx, CTxIndex& txindex); - bool ReadDiskTx(COutPoint outpoint, CTransaction& tx); - bool WriteBlockIndex(const CDiskBlockIndex& blockindex); - bool ReadHashBestChain(uint256& hashBestChain); - bool WriteHashBestChain(uint256 hashBestChain); - bool ReadBestInvalidTrust(CBigNum& bnBestInvalidTrust); - bool WriteBestInvalidTrust(CBigNum bnBestInvalidTrust); - bool ReadSyncCheckpoint(uint256& hashCheckpoint); - bool WriteSyncCheckpoint(uint256 hashCheckpoint); - bool ReadCheckpointPubKey(std::string& strPubKey); - bool WriteCheckpointPubKey(const std::string& strPubKey); - bool LoadBlockIndex(); -private: - bool LoadBlockIndexGuts(); -}; - - - - /** Access to the (IP) address database (peers.dat) */ class CAddrDB { @@ -363,4 +323,6 @@ public: bool Read(CAddrMan& addr); }; -#endif // BITCOIN_DB_H +#endif // TRIANGLES_DB_H + + diff --git a/src/init.cpp b/src/init.cpp index 790bfe0..f153d0c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -2,14 +2,15 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "db.h" +#include "txdb.h" #include "walletdb.h" -#include "bitcoinrpc.h" +#include "trianglesrpc.h" #include "net.h" #include "init.h" #include "util.h" #include "ui_interface.h" #include "checkpoints.h" +#include "smessage.h" #include #include #include @@ -21,11 +22,20 @@ #include #endif + using namespace std; using namespace boost; CWallet* pwalletMain; CClientUIInterface uiInterface; +std::string strWalletFileName; +bool fConfChange; +bool fEnforceCanonical; +unsigned int nNodeLifespan; +unsigned int nDerivationMethodIndex; +//unsigned int nMinerSleep; +bool fUseFastIndex; +enum Checkpoints::CPMode CheckpointsMode; ////////////////////////////////////////////////////////////////////////////// // @@ -35,7 +45,7 @@ CClientUIInterface uiInterface; void ExitTimeout(void* parg) { #ifdef WIN32 - Sleep(5000); + MilliSleep(5000); ExitProcess(0); #endif } @@ -43,7 +53,7 @@ void ExitTimeout(void* parg) void StartShutdown() { #ifdef QT_GUI - // ensure we leave the Qt main loop for a clean GUI exit (Shutdown() is called in bitcoin.cpp afterwards) + // ensure we leave the Qt main loop for a clean GUI exit (Shutdown() is called in triangles.cpp afterwards) uiInterface.QueueShutdown(); #else // Without UI, Shutdown() can simply be started in a new thread @@ -57,7 +67,7 @@ void Shutdown(void* parg) static bool fTaken; // Make this thread recognisable as the shutdown thread - RenameThread("bitcoin-shutoff"); + RenameThread("Triangles-shutoff"); bool fFirstThread = false; { @@ -72,7 +82,11 @@ void Shutdown(void* parg) if (fFirstThread) { fShutdown = true; + + SecureMsgShutdown(); + nTransactionsUpdated++; +// CTxDB().Close(); bitdb.Flush(false); StopNode(); bitdb.Flush(true); @@ -80,19 +94,19 @@ void Shutdown(void* parg) UnregisterWallet(pwalletMain); delete pwalletMain; NewThread(ExitTimeout, NULL); - Sleep(50); - printf("triangles exited\n\n"); + MilliSleep(50); + printf("Triangles exited\n\n"); fExit = true; #ifndef QT_GUI - // ensure non-UI client gets exited here, but let Bitcoin-Qt reach 'return 0;' in bitcoin.cpp + // ensure non-UI client gets exited here, but let Triangles-Qt reach 'return 0;' in triangles.cpp exit(0); #endif } else { while (!fExit) - Sleep(500); - Sleep(100); + MilliSleep(500); + MilliSleep(100); ExitThread(0); } } @@ -124,7 +138,7 @@ bool AppInit(int argc, char* argv[]) // // Parameters // - // If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main() + // If Qt is used, parameters/triangles.conf are parsed in qt/triangles.cpp's main() ParseParameters(argc, argv); if (!boost::filesystem::is_directory(GetDataDir(false))) { @@ -135,8 +149,8 @@ bool AppInit(int argc, char* argv[]) if (mapArgs.count("-?") || mapArgs.count("--help")) { - // First part of help message is specific to bitcoind / RPC client - std::string strUsage = _("triangles version") + " " + FormatFullVersion() + "\n\n" + + // First part of help message is specific to trianglesd / RPC client + std::string strUsage = _("Triangles version") + " " + FormatFullVersion() + "\n\n" + _("Usage:") + "\n" + " trianglesd [options] " + "\n" + " trianglesd [options] [params] " + _("Send command to -server or trianglesd") + "\n" + @@ -151,7 +165,7 @@ bool AppInit(int argc, char* argv[]) // Command-line RPC for (int i = 1; i < argc; i++) - if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "triangles:")) + if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "Triangles:")) fCommandLine = true; if (fCommandLine) @@ -177,7 +191,7 @@ int main(int argc, char* argv[]) { bool fRet = false; - // Connect bitcoind signal handlers + // Connect trianglesd signal handlers noui_connect(); fRet = AppInit(argc, argv); @@ -191,13 +205,13 @@ int main(int argc, char* argv[]) bool static InitError(const std::string &str) { - uiInterface.ThreadSafeMessageBox(str, _("triangles"), CClientUIInterface::OK | CClientUIInterface::MODAL); + uiInterface.ThreadSafeMessageBox(str, _("Triangles"), CClientUIInterface::OK | CClientUIInterface::MODAL); return false; } bool static InitWarning(const std::string &str) { - uiInterface.ThreadSafeMessageBox(str, _("triangles"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); + uiInterface.ThreadSafeMessageBox(str, _("Triangles"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); return true; } @@ -221,25 +235,31 @@ std::string HelpMessage() " -? " + _("This help message") + "\n" + " -conf= " + _("Specify configuration file (default: triangles.conf)") + "\n" + " -pid= " + _("Specify pid file (default: trianglesd.pid)") + "\n" + - " -gen " + _("Generate coins") + "\n" + - " -gen=0 " + _("Don't generate coins") + "\n" + - " -stake " + _("Stake coins") + "\n" + - " -stake=0 " + _("Turn off staking") + "\n" + " -datadir= " + _("Specify data directory") + "\n" + + " -wallet= " + _("Specify wallet file (within data directory)") + "\n" + " -dbcache= " + _("Set database cache size in megabytes (default: 25)") + "\n" + " -dblogsize= " + _("Set database disk log size in megabytes (default: 100)") + "\n" + " -timeout= " + _("Specify connection timeout in milliseconds (default: 5000)") + "\n" + - " -socks= " + _("Select the version of socks proxy to use (4-5, default: 5)") + "\n" + - " -tor= " + _("Use proxy to reach tor hidden services") + "\n" - " -dns " + _("Allow DNS lookups for -addnode, -seednode and -connect") + "\n" + - " -port= " + _("Listen for connections on (default: 24242 or testnet: 24495)") + "\n" + + //" -proxy= " + _("Connect through socks proxy") + "\n" + + //" -socks= " + _("Select the version of socks proxy to use (4-5, default: 5)") + "\n" + + " -tor= " + _("Use proxy to reach tor hidden services (default: same as -proxy)") + "\n" + //" -dns " + _("Allow DNS lookups for -addnode, -seednode and -connect") + "\n" + + " -port= " + _("Listen for connections on (default: 24112 or testnet: 24111)") + "\n" + " -maxconnections= " + _("Maintain at most connections to peers (default: 125)") + "\n" + " -addnode= " + _("Add a node to connect to and attempt to keep the connection open") + "\n" + " -connect= " + _("Connect only to the specified node(s)") + "\n" + " -seednode= " + _("Connect to a node to retrieve peer addresses, and disconnect") + "\n" + " -externalip= " + _("Specify your own public address") + "\n" + + //" -onlynet= " + _("Only connect to nodes in network (IPv4, IPv6 or Tor)") + "\n" + + //" -discover " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n" + + //" -irc " + _("Find peers using internet relay chat (default: 0)") + "\n" + + //" -listen " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n" + + //" -bind= " + _("Bind to given address. Use [host]:port notation for IPv6") + "\n" + + // -dnsseed " + _("Find peers using DNS lookup (default: 1)") + "\n" + + " -staking " + _("Stake your coins to support network and gain reward (default: 1)") + "\n" + + " -synctime " + _("Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)") + "\n" + + " -cppolicy " + _("Sync checkpoints policy (default: strict)") + "\n" + " -onionseed " + _("Find peers using .onion seeds (default: 1 unless -connect)") + "\n" + - " -nosynccheckpoints " + _("Disable sync checkpoints (default: 0)") + "\n" + " -banscore= " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n" + " -bantime= " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n" + " -maxreceivebuffer= " + _("Maximum per-connection receive buffer, *1000 bytes (default: 5000)") + "\n" + @@ -253,6 +273,7 @@ std::string HelpMessage() #endif " -detachdb " + _("Detach block and address databases. Increases shutdown time (default: 0)") + "\n" + " -paytxfee= " + _("Fee per KB to add to transactions you send") + "\n" + + //" -mininput= " + _("When creating transactions, ignore inputs with value less than this (default: 0.01)") + "\n" + #ifdef QT_GUI " -server " + _("Accept command line and JSON-RPC commands") + "\n" + #endif @@ -270,11 +291,14 @@ std::string HelpMessage() #endif " -rpcuser= " + _("Username for JSON-RPC connections") + "\n" + " -rpcpassword= " + _("Password for JSON-RPC connections") + "\n" + - " -rpcport= " + _("Listen for JSON-RPC connections on (default: 24444 or testnet: 24445)") + "\n" + + " -rpcport= " + _("Listen for JSON-RPC connections on (default: 19111 or testnet: 19112)") + "\n" + " -rpcallowip= " + _("Allow JSON-RPC connections from specified IP address") + "\n" + " -rpcconnect= " + _("Send commands to node running on (default: 127.0.0.1)") + "\n" + " -blocknotify= " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n" + - " -walletnotify= " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n" + + " -walletnotify= " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n" + + " -confchange " + _("Require a confirmations for change (default: 0)") + "\n" + + " -enforcecanonical " + _("Enforce transaction scripts to use canonical PUSH operators (default: 1)") + "\n" + + " -alertnotify= " + _("Execute command when a relevant alert is received (%s in cmd is replaced by message)") + "\n" + " -upgradewallet " + _("Upgrade wallet to latest format") + "\n" + " -keypool= " + _("Set key pool size to (default: 100)") + "\n" + " -rescan " + _("Rescan the block chain for missing wallet transactions") + "\n" + @@ -288,16 +312,38 @@ std::string HelpMessage() " -blockmaxsize= " + _("Set maximum block size in bytes (default: 250000)") + "\n" + " -blockprioritysize= " + _("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" + + "\n" + _("SSL options: (see the Triangles Wiki for SSL setup instructions)") + "\n" + " -rpcssl " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n" + " -rpcsslcertificatechainfile= " + _("Server certificate file (default: server.cert)") + "\n" + " -rpcsslprivatekeyfile= " + _("Server private key (default: server.pem)") + "\n" + - " -rpcsslciphers= " + _("Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)") + "\n"; + " -rpcsslciphers= " + _("Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)") + "\n" + + + "\n" + _("Secure messaging options:") + "\n" + + " -nosmsg " + _("Disable secure messaging.") + "\n" + + " -debugsmsg " + _("Log extra debug messages.") + "\n" + + " -smsgscanchain " + _("Scan the block chain for public key addresses on startup.") + "\n"; return strUsage; } -/** Initialize bitcoin. +/** Sanity checks + * Ensure that Triangles is running in a usable environment with all + * necessary library support. + */ +bool InitSanityCheck(void) +{ + if(!ECC_InitSanityCheck()) { + InitError("OpenSSL appears to lack support for elliptic curve cryptography. For more " + "information, visit https://en.bitcoin.it/wiki/OpenSSL_and_EC_Libraries"); + return false; + } + + // TODO: remaining sanity checks, see #4081 + + return true; +} + +/** Initialize Triangles. * @pre Parameters should be parsed and config file should be read. */ bool AppInit2() @@ -346,16 +392,58 @@ bool AppInit2() // ********************************************************* Step 2: parameter interactions + nNodeLifespan = GetArg("-addrlifespan", 7); + fUseFastIndex = GetBoolArg("-fastindex", true); + //nMinerSleep = GetArg("-minersleep", 500); + + CheckpointsMode = Checkpoints::STRICT; + std::string strCpMode = GetArg("-cppolicy", "strict"); + + if(strCpMode == "strict") + CheckpointsMode = Checkpoints::STRICT; + + if(strCpMode == "advisory") + CheckpointsMode = Checkpoints::ADVISORY; + + if(strCpMode == "permissive") + CheckpointsMode = Checkpoints::PERMISSIVE; + + nDerivationMethodIndex = 0; + fTestNet = GetBoolArg("-testnet"); if (fTestNet) { SoftSetBoolArg("-irc", true); } + if (mapArgs.count("-bind")) { + // when specifying an explicit binding address, you want to listen on it + // even when -connect or -proxy is specified + SoftSetBoolArg("-listen", true); + } + if (mapArgs.count("-connect") && mapMultiArgs["-connect"].size() > 0) { // when only connecting to trusted nodes, do not seed via .onion, or listen by default SoftSetBoolArg("-onionseed", false); + SoftSetBoolArg("-listen", false); } + if (mapArgs.count("-proxy")) { + // to protect privacy, do not listen by default if a proxy server is specified + SoftSetBoolArg("-listen", false); + } + + //if (!GetBoolArg("-listen", true)) { + // do not map ports or try to retrieve public IP when not listening (pointless) + //triangles: never listen, always using tor. + //SoftSetBoolArg("-upnp", false); + //SoftSetBoolArg("-discover", false); + //} + + //if (mapArgs.count("-externalip")) { + // if an explicit public IP is specified, do not try to find others + // SoftSetBoolArg("-discover", false); + //} + if (GetBoolArg("-salvagewallet")) { // Rewrite just private keys: rescan to find transactions SoftSetBoolArg("-rescan", true); @@ -367,12 +455,16 @@ bool AppInit2() // -debug implies fDebug* if (fDebug) - fDebugNet = true; - else - fDebugNet = GetBoolArg("-debugnet"); - - //fStaking = GetBoolArg("-staking", true); - + { + fDebugNet = true; + fDebugSmsg = true; + } else + { + fDebugNet = GetBoolArg("-debugnet"); + fDebugSmsg = GetBoolArg("-debugsmsg"); + } + fNoSmsg = GetBoolArg("-nosmsg"); + bitdb.SetDetach(GetBoolArg("-detachdb", false)); #if !defined(WIN32) && !defined(QT_GUI) @@ -401,13 +493,6 @@ bool AppInit2() nConnectTimeout = nNewTimeout; } - // Continue to put "/P2SH/" in the coinbase to monitor - // BIP16 support. - // This can be removed eventually... - const char* pszP2SH = "/P2SH/"; - COINBASE_FLAGS << std::vector(pszP2SH, pszP2SH+strlen(pszP2SH)); - - if (mapArgs.count("-paytxfee")) { if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee)) @@ -416,17 +501,34 @@ bool AppInit2() InitWarning(_("Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.")); } + fConfChange = GetBoolArg("-confchange", false); + fEnforceCanonical = GetBoolArg("-enforcecanonical", true); + + if (mapArgs.count("-mininput")) + { + if (!ParseMoney(mapArgs["-mininput"], nMinimumInputValue)) + return InitError(strprintf(_("Invalid amount for -mininput=: '%s'"), mapArgs["-mininput"].c_str())); + } + // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log + // Sanity check + if (!InitSanityCheck()) + return InitError(_("Initialization sanity check failed. Triangles is shutting down.")); std::string strDataDir = GetDataDir().string(); + std::string strWalletFileName = GetArg("-wallet", "wallet.dat"); - // Make sure only a single Bitcoin process is using the data directory. + // strWalletFileName must be a plain filename without a directory + if (strWalletFileName != boost::filesystem::basename(strWalletFileName) + boost::filesystem::extension(strWalletFileName)) + return InitError(strprintf(_("Wallet %s resides outside data directory %s."), strWalletFileName.c_str(), strDataDir.c_str())); + + // Make sure only a single Triangles process is using the data directory. boost::filesystem::path pathLockFile = GetDataDir() / ".lock"; FILE* file = fopen(pathLockFile.string().c_str(), "a"); // empty lock file; created if it doesn't exist. if (file) fclose(file); static boost::interprocess::file_lock lock(pathLockFile.string().c_str()); if (!lock.try_lock()) - return InitError(strprintf(_("Cannot obtain a lock on data directory %s. triangles is probably already running."), strDataDir.c_str())); + return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Triangles is probably already running."), strDataDir.c_str())); #if !defined(WIN32) && !defined(QT_GUI) if (fDaemon) @@ -453,7 +555,7 @@ bool AppInit2() 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("triangles version %s (%s)\n", FormatFullVersion().c_str(), CLIENT_DATE.c_str()); + printf("Triangles version %s (%s)\n", FormatFullVersion().c_str(), CLIENT_DATE.c_str()); printf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION)); if (!fLogTimestamps) printf("Startup time: %s\n", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str()); @@ -462,9 +564,9 @@ bool AppInit2() std::ostringstream strErrors; if (fDaemon) - fprintf(stdout, "triangles server starting\n"); + fprintf(stdout, "Triangles server starting\n"); - int64 nStart; + int64_t nStart; // ********************************************************* Step 5: verify database integrity @@ -481,20 +583,20 @@ bool AppInit2() if (GetBoolArg("-salvagewallet")) { // Recover readable keypairs: - if (!CWalletDB::Recover(bitdb, "wallet.dat", true)) + if (!CWalletDB::Recover(bitdb, strWalletFileName, true)) return false; } - if (filesystem::exists(GetDataDir() / "wallet.dat")) + if (filesystem::exists(GetDataDir() / strWalletFileName)) { - CDBEnv::VerifyResult r = bitdb.Verify("wallet.dat", CWalletDB::Recover); + CDBEnv::VerifyResult r = bitdb.Verify(strWalletFileName, CWalletDB::Recover); if (r == CDBEnv::RECOVER_OK) { string msg = strprintf(_("Warning: wallet.dat corrupt, data salvaged!" " Original wallet.dat saved as wallet.{timestamp}.bak in %s; if" " your balance or transactions are incorrect you should" " restore from a backup."), strDataDir.c_str()); - uiInterface.ThreadSafeMessageBox(msg, _("triangles"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); + uiInterface.ThreadSafeMessageBox(msg, _("Triangles"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); } if (r == CDBEnv::RECOVER_FAIL) return InitError(_("wallet.dat corrupt, salvage failed")); @@ -502,26 +604,28 @@ bool AppInit2() // ********************************************************* Step 6: network initialization - int nSocksVersion = GetArg("-socks", 5); - if (nSocksVersion != 4 && nSocksVersion != 5) - return InitError(strprintf(_("Unknown -socks proxy version requested: %i"), nSocksVersion)); + //int nSocksVersion = GetArg("-socks", 5); + // + //if (nSocksVersion != 4 && nSocksVersion != 5) + // return InitError(strprintf(_("Unknown -socks proxy version requested: %i"), nSocksVersion)); do { std::set nets; - nets.insert( - NET_TOR - ); + + + + + nets.insert(NET_TOR); + for (int n = 0; n < NET_MAX; n++) { enum Network net = (enum Network)n; if (!nets.count(net)) SetLimited(net); } - } while ( - false - ); + } while (false); - - CService addrOnion; + + CService addrOnion; // need to move onion_port to a header unsigned short const onion_port = 19099; @@ -539,8 +643,12 @@ bool AppInit2() } // see Step 2: parameter interactions for more information about these - fNameLookup = GetBoolArg("-dns", true); - + fNoListen = !GetBoolArg("-listen", true); + //fDiscover = GetBoolArg("-discover", true); + //fNameLookup = GetBoolArg("-dns", true); +#ifdef USE_UPNP + fUseUPnP = GetBoolArg("-upnp", USE_UPNP); +#endif bool fBound = false; if (true) { if (true) { @@ -549,9 +657,7 @@ bool AppInit2() if (!Lookup("127.0.0.1", addrBind, GetListenPort(), false)) return InitError(strprintf(_("Cannot resolve binding address: '%s'"), "127.0.0.1")); fBound |= Bind(addrBind); - } while ( - false - ); + } while (false); } if (!fBound) return InitError(_("Failed to listen on any port.")); @@ -575,7 +681,7 @@ bool AppInit2() return InitError(strprintf(_("Cannot resolve -externalip address: '%s'"), strAddr.c_str())); AddLocal(CService(strAddr, GetListenPort(), fNameLookup), LOCAL_MANUAL); } - } else { + } else { string automatic_onion; filesystem::path const hostname_path = GetDataDir( ) / "onion" / "hostname"; @@ -595,13 +701,8 @@ bool AppInit2() AddLocal(CService(automatic_onion, GetListenPort(), fNameLookup), LOCAL_MANUAL); } - BOOST_FOREACH(string strDest, mapMultiArgs["-seednode"]) - AddOneShot(strDest); - - if (mapArgs.count("-reservebalance")) // triangles: reserve balance amount { - int64 nReserveBalance = 0; if (!ParseMoney(mapArgs["-reservebalance"], nReserveBalance)) { InitError(_("Invalid amount for -reservebalance=")); @@ -609,14 +710,14 @@ bool AppInit2() } } - - if (mapArgs.count("-checkpointkey")) // triangles: checkpoint master priv key + if (mapArgs.count("-checkpointkey")) // triangles: checkpoint master priv key { if (!Checkpoints::SetCheckpointPrivKey(GetArg("-checkpointkey", ""))) InitError(_("Unable to sign checkpoint, wrong checkpointkey?\n")); } - //AddOneShot(string("")); + BOOST_FOREACH(string strDest, mapMultiArgs["-seednode"]) + AddOneShot(strDest); // ********************************************************* Step 7: load blockchain @@ -642,15 +743,16 @@ bool AppInit2() if (!LoadBlockIndex()) return InitError(_("Error loading blkindex.dat")); + // as LoadBlockIndex can take several minutes, it's possible the user - // requested to kill bitcoin-qt during the last operation. If so, exit. + // requested to kill triangles-qt during the last operation. If so, exit. // As the program has not fully started yet, Shutdown() is possibly overkill. if (fRequestShutdown) { printf("Shutdown requested. Exiting.\n"); return false; } - printf(" block index %15"PRI64d"ms\n", GetTimeMillis() - nStart); + printf(" block index %15"PRId64"ms\n", GetTimeMillis() - nStart); if (GetBoolArg("-printblockindex") || GetBoolArg("-printblocktree")) { @@ -681,13 +783,16 @@ bool AppInit2() return false; } + // ********************************************************* Testing Zerocoin + + // ********************************************************* Step 8: load wallet uiInterface.InitMessage(_("Loading wallet...")); printf("Loading wallet...\n"); nStart = GetTimeMillis(); bool fFirstRun = true; - pwalletMain = new CWallet("wallet.dat"); + pwalletMain = new CWallet(strWalletFileName); DBErrors nLoadWalletRet = pwalletMain->LoadWallet(fFirstRun); if (nLoadWalletRet != DB_LOAD_OK) { @@ -697,13 +802,13 @@ bool AppInit2() { string msg(_("Warning: error reading wallet.dat! All keys read correctly, but transaction data" " or address book entries might be missing or incorrect.")); - uiInterface.ThreadSafeMessageBox(msg, _("triangles"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); + uiInterface.ThreadSafeMessageBox(msg, _("Triangles"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); } else if (nLoadWalletRet == DB_TOO_NEW) - strErrors << _("Error loading wallet.dat: Wallet requires newer version of triangles") << "\n"; + strErrors << _("Error loading wallet.dat: Wallet requires newer version of Triangles") << "\n"; else if (nLoadWalletRet == DB_NEED_REWRITE) { - strErrors << _("Wallet needed to be rewritten: restart triangles to complete") << "\n"; + strErrors << _("Wallet needed to be rewritten: restart Triangles to complete") << "\n"; printf("%s", strErrors.str().c_str()); return InitError(strErrors.str()); } @@ -741,7 +846,7 @@ bool AppInit2() } printf("%s", strErrors.str().c_str()); - printf(" wallet %15"PRI64d"ms\n", GetTimeMillis() - nStart); + printf(" wallet %15"PRId64"ms\n", GetTimeMillis() - nStart); RegisterWallet(pwalletMain); @@ -750,7 +855,7 @@ bool AppInit2() pindexRescan = pindexGenesisBlock; else { - CWalletDB walletdb("wallet.dat"); + CWalletDB walletdb(strWalletFileName); CBlockLocator locator; if (walletdb.ReadBestBlock(locator)) pindexRescan = locator.GetBlockIndex(); @@ -761,7 +866,7 @@ bool AppInit2() printf("Rescanning last %i blocks (from block %i)...\n", pindexBest->nHeight - pindexRescan->nHeight, pindexRescan->nHeight); nStart = GetTimeMillis(); pwalletMain->ScanForWalletTransactions(pindexRescan, true); - printf(" rescan %15"PRI64d"ms\n", GetTimeMillis() - nStart); + printf(" rescan %15"PRId64"ms\n", GetTimeMillis() - nStart); } // ********************************************************* Step 9: import blocks @@ -776,6 +881,7 @@ bool AppInit2() if (file) LoadExternalBlockFile(file); } + exit(0); } filesystem::path pathBootstrap = GetDataDir() / "bootstrap.dat"; @@ -802,9 +908,14 @@ bool AppInit2() printf("Invalid or missing peers.dat; recreating\n"); } - printf("Loaded %i addresses from peers.dat %"PRI64d"ms\n", + printf("Loaded %i addresses from peers.dat %"PRId64"ms\n", addrman.size(), GetTimeMillis() - nStart); - + + + // ********************************************************* Step 10.1: startup secure messaging + + SecureMsgStart(fNoSmsg, GetBoolArg("-smsgscanchain")); + // ********************************************************* Step 11: start node if (!CheckDiskSpace()) @@ -840,8 +951,10 @@ bool AppInit2() // Loop until process is exit()ed from shutdown() function, // called from ThreadRPCServer thread when a "stop" command is received. while (1) - Sleep(5000); + MilliSleep(5000); #endif return true; } + + diff --git a/src/init.h b/src/init.h index d74d5b7..c24280a 100644 --- a/src/init.h +++ b/src/init.h @@ -2,17 +2,19 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_INIT_H -#define BITCOIN_INIT_H +#ifndef TRIANGLES_INIT_H +#define TRIANGLES_INIT_H #include "wallet.h" -#include "anonymize.h" +#include extern CWallet* pwalletMain; - +extern std::string strWalletFileName; void StartShutdown(); void Shutdown(void* parg); bool AppInit2(); std::string HelpMessage(); #endif + + diff --git a/src/irc.cpp b/src/irc.cpp index c59a61a..92cf296 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -55,6 +55,10 @@ bool DecodeAddress(string str, CService& addr) } + + + + static bool Send(SOCKET hSocket, const char* pszSend) { if (strstr(pszSend, "PONG") != pszSend) @@ -73,7 +77,7 @@ static bool Send(SOCKET hSocket, const char* pszSend) bool RecvLineIRC(SOCKET hSocket, string& strLine) { - loop + while (true) { bool fRet = RecvLine(hSocket, strLine); if (fRet) @@ -96,7 +100,7 @@ bool RecvLineIRC(SOCKET hSocket, string& strLine) int RecvUntil(SOCKET hSocket, const char* psz1, const char* psz2=NULL, const char* psz3=NULL, const char* psz4=NULL) { - loop + while(true) { string strLine; strLine.reserve(10000); @@ -123,7 +127,7 @@ bool Wait(int nSeconds) { if (fShutdown) return false; - Sleep(1000); + MilliSleep(1000); } return true; } @@ -131,7 +135,7 @@ bool Wait(int nSeconds) bool RecvCodeLine(SOCKET hSocket, const char* psz1, string& strRet) { strRet.clear(); - loop + while (true) { string strLine; if (!RecvLineIRC(hSocket, strLine)) @@ -185,7 +189,7 @@ bool GetIPFromIRC(SOCKET hSocket, string strMyName, CNetAddr& ipRet) void ThreadIRCSeed(void* parg) { // Make this thread recognisable as the IRC seeding thread - RenameThread("bitcoin-ircseed"); + RenameThread("Triangles-ircseed"); try { @@ -206,11 +210,11 @@ void ThreadIRCSeed2(void* parg) return; // ... or if we won't make outbound connections and won't accept inbound ones. - if (mapArgs.count("-connect")) + if (mapArgs.count("-connect") && fNoListen) return; // ... or if IRC is not enabled. - if (!GetBoolArg("-irc", true)) + if (!GetBoolArg("-irc", false)) return; printf("ThreadIRCSeed started\n"); @@ -253,10 +257,10 @@ void ThreadIRCSeed2(void* parg) string strMyName; // Don't use our IP as our nick if we're not listening // or if it keeps failing because the nick is already in use. - if (GetLocal(addrLocal, &addrIPv4) && nNameRetry<3) + if (!fNoListen && GetLocal(addrLocal, &addrIPv4) && nNameRetry<3) strMyName = EncodeAddress(GetLocalAddress(&addrConnect)); if (strMyName == "") - strMyName = strprintf("x%"PRI64u"", GetRand(1000000000)); + strMyName = strprintf("x%"PRIu64"", GetRand(1000000000)); Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str()); Send(hSocket, strprintf("USER %s 8 * : %s\r", strMyName.c_str(), strMyName.c_str()).c_str()); @@ -280,7 +284,7 @@ void ThreadIRCSeed2(void* parg) return; } nNameRetry = 0; - Sleep(500); + MilliSleep(500); // Get our external IP from the IRC server and re-nick before joining the channel CNetAddr addrFromIRC; @@ -288,7 +292,7 @@ void ThreadIRCSeed2(void* parg) { printf("GetIPFromIRC() returned %s\n", addrFromIRC.ToString().c_str()); // Don't use our IP as our nick if we're not listening - if (addrFromIRC.IsRoutable()) + if (!fNoListen && addrFromIRC.IsRoutable()) { // IRC lets you to re-nick AddLocal(addrFromIRC, LOCAL_IRC); @@ -298,19 +302,19 @@ void ThreadIRCSeed2(void* parg) } if (fTestNet) { - Send(hSocket, "JOIN #triangles-00\r"); - Send(hSocket, "WHO #triangles-01\r"); + Send(hSocket, "JOIN #TrianglesTEST\r"); + Send(hSocket, "WHO #TrianglesTEST\r"); } else { // randomly join // int channel_number = GetRandInt(5); // Channel number is always 0 for initial release int channel_number = 0; - Send(hSocket, strprintf("JOIN #triangles-00%02d\r", channel_number).c_str()); - Send(hSocket, strprintf("WHO #triangles-01%02d\r", channel_number).c_str()); + Send(hSocket, strprintf("JOIN #Triangles%02d\r", channel_number).c_str()); + Send(hSocket, strprintf("WHO #Triangles%02d\r", channel_number).c_str()); } - int64 nStart = GetTime(); + int64_t nStart = GetTime(); string strLine; strLine.reserve(10000); while (!fShutdown && RecvLineIRC(hSocket, strLine)) @@ -375,6 +379,14 @@ void ThreadIRCSeed2(void* parg) } + + + + + + + + #ifdef TEST int main(int argc, char *argv[]) { diff --git a/src/irc.h b/src/irc.h index 119aeb3..a041dd0 100644 --- a/src/irc.h +++ b/src/irc.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_IRC_H -#define BITCOIN_IRC_H +#ifndef TRIANGLES_IRC_H +#define TRIANGLES_IRC_H void ThreadIRCSeed(void* parg); diff --git a/src/json/json_spirit_value.h b/src/json/json_spirit_value.h index 7e83a2a..d6ae3cc 100644 --- a/src/json/json_spirit_value.h +++ b/src/json/json_spirit_value.h @@ -342,7 +342,7 @@ namespace json_spirit { std::ostringstream os; - ///// Bitcoin: Tell the types by name instead of by number + ///// triangles: Tell the types by name instead of by number os << "value is type " << Value_type_name[type()] << ", expected " << Value_type_name[vtype]; throw std::runtime_error( os.str() ); diff --git a/src/json/json_spirit_writer_template.h b/src/json/json_spirit_writer_template.h index 28c49dd..7481eda 100644 --- a/src/json/json_spirit_writer_template.h +++ b/src/json/json_spirit_writer_template.h @@ -125,7 +125,7 @@ namespace json_spirit case bool_type: output( value.get_bool() ); break; case int_type: output_int( value ); break; - /// Bitcoin: Added std::fixed and changed precision from 16 to 8 + /// triangles: Added std::fixed and changed precision from 16 to 8 case real_type: os_ << std::showpoint << std::fixed << std::setprecision(8) << value.get_real(); break; diff --git a/src/kernel.cpp b/src/kernel.cpp index dc5693a..60517d3 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -5,17 +5,18 @@ #include #include "kernel.h" -#include "db.h" +#include "txdb.h" using namespace std; -extern int nStakeMaxAge; -extern int nStakeTargetSpacing; +extern unsigned int nStakeMaxAge; +extern unsigned int nTargetSpacing; // Modifier interval: time to elapse before new modifier is computed // Set to 20-minute for production network +//unsigned int nModifierInterval = MODIFIER_INTERVAL; -unsigned int nModifierInterval = MODIFIER_INTERVAL; +typedef std::map MapModifierCheckpoints; // Hard checkpoints of stake modifiers to ensure they are deterministic static std::map mapStakeModifierCheckpoints = @@ -24,17 +25,17 @@ static std::map mapStakeModifierCheckpoints = ; // Get time weight -int64 GetWeight(int64 nIntervalBeginning, int64 nIntervalEnd) +int64_t GetWeight(int64_t nIntervalBeginning, int64_t nIntervalEnd) { // Kernel hash weight starts from 0 at the min age // this change increases active coins participating the hash and helps // to secure the network when proof-of-stake difficulty is low - return min(nIntervalEnd - nIntervalBeginning - nStakeMinAge, (int64)nStakeMaxAge); + return min(nIntervalEnd - nIntervalBeginning - nStakeMinAge, (int64_t)nStakeMaxAge); } // Get the last stake modifier and its generation time from a given block -static bool GetLastStakeModifier(const CBlockIndex* pindex, uint64& nStakeModifier, int64& nModifierTime) +static bool GetLastStakeModifier(const CBlockIndex* pindex, uint64_t& nStakeModifier, int64_t& nModifierTime) { if (!pindex) return error("GetLastStakeModifier: null pindex"); @@ -48,37 +49,31 @@ static bool GetLastStakeModifier(const CBlockIndex* pindex, uint64& nStakeModifi } // Get selection interval section (in seconds) -static int64 GetStakeModifierSelectionIntervalSection(int nSection) +static int64_t GetStakeModifierSelectionIntervalSection(int nSection) { assert (nSection >= 0 && nSection < 64); - int64 a = nModifierInterval * 63 / (63 + ((63 - nSection) * (MODIFIER_INTERVAL_RATIO - 1))); - return a; + return (nModifierInterval * 63 / (63 + ((63 - nSection) * (MODIFIER_INTERVAL_RATIO - 1)))); } // Get stake modifier selection interval (in seconds) -static int64 GetStakeModifierSelectionInterval() +static int64_t GetStakeModifierSelectionInterval() { - int64 nSelectionInterval = 0; + int64_t nSelectionInterval = 0; for (int nSection=0; nSection<64; nSection++) - { nSelectionInterval += GetStakeModifierSelectionIntervalSection(nSection); - } return nSelectionInterval; } // select a block from the candidate blocks in vSortedByTimestamp, excluding // already selected blocks in vSelectedBlocks, and with timestamp up to // nSelectionIntervalStop. -static bool SelectBlockFromCandidates( - vector >& vSortedByTimestamp, - map& mapSelectedBlocks, - int64 nSelectionIntervalStop, uint64 nStakeModifierPrev, - const CBlockIndex** pindexSelected) +static bool SelectBlockFromCandidates(vector >& vSortedByTimestamp, map& mapSelectedBlocks, + int64_t nSelectionIntervalStop, uint64_t nStakeModifierPrev, const CBlockIndex** pindexSelected) { bool fSelected = false; uint256 hashBest = 0; *pindexSelected = (const CBlockIndex*) 0; - BOOST_FOREACH(const PAIRTYPE(int64, uint256)& item, vSortedByTimestamp) + BOOST_FOREACH(const PAIRTYPE(int64_t, uint256)& item, vSortedByTimestamp) { if (!mapBlockIndex.count(item.second)) return error("SelectBlockFromCandidates: failed to find block index for candidate block %s", item.second.ToString().c_str()); @@ -128,7 +123,7 @@ static bool SelectBlockFromCandidates( // block. This is to make it difficult for an attacker to gain control of // additional bits in the stake modifier, even after generating a chain of // blocks. -bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64& nStakeModifier, bool& fGeneratedStakeModifier) +bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64_t& nStakeModifier, bool& fGeneratedStakeModifier) { nStakeModifier = 0; fGeneratedStakeModifier = false; @@ -139,21 +134,21 @@ bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64& nStakeModif } // First find current stake modifier and its generation block time // if it's not old enough, return the same stake modifier - int64 nModifierTime = 0; + int64_t nModifierTime = 0; if (!GetLastStakeModifier(pindexPrev, nStakeModifier, nModifierTime)) return error("ComputeNextStakeModifier: unable to get last modifier"); if (fDebug) { - printf("ComputeNextStakeModifier: prev modifier=0x%016"PRI64x" time=%s\n", nStakeModifier, DateTimeStrFormat(nModifierTime).c_str()); + printf("ComputeNextStakeModifier: prev modifier=0x%016"PRIx64" time=%s\n", nStakeModifier, DateTimeStrFormat(nModifierTime).c_str()); } if (nModifierTime / nModifierInterval >= pindexPrev->GetBlockTime() / nModifierInterval) return true; // Sort candidate blocks by timestamp - vector > vSortedByTimestamp; - vSortedByTimestamp.reserve(64 * nModifierInterval / nStakeTargetSpacing); - int64 nSelectionInterval = GetStakeModifierSelectionInterval(); - int64 nSelectionIntervalStart = (pindexPrev->GetBlockTime() / nModifierInterval) * nModifierInterval - nSelectionInterval; + vector > vSortedByTimestamp; + vSortedByTimestamp.reserve(64 * nModifierInterval / nTargetSpacing); + int64_t nSelectionInterval = GetStakeModifierSelectionInterval(); + int64_t nSelectionIntervalStart = (pindexPrev->GetBlockTime() / nModifierInterval) * nModifierInterval - nSelectionInterval; const CBlockIndex* pindex = pindexPrev; while (pindex && pindex->GetBlockTime() >= nSelectionIntervalStart) { @@ -165,8 +160,8 @@ bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64& nStakeModif sort(vSortedByTimestamp.begin(), vSortedByTimestamp.end()); // Select 64 blocks from candidate blocks to generate stake modifier - uint64 nStakeModifierNew = 0; - int64 nSelectionIntervalStop = nSelectionIntervalStart; + uint64_t nStakeModifierNew = 0; + int64_t nSelectionIntervalStop = nSelectionIntervalStart; map mapSelectedBlocks; for (int nRound=0; nRoundGetStakeEntropyBit()) << nRound); + nStakeModifierNew |= (((uint64_t)pindex->GetStakeEntropyBit()) << nRound); // add the selected block from candidates to selected list mapSelectedBlocks.insert(make_pair(pindex->GetBlockHash(), pindex)); if (fDebug && GetBoolArg("-printstakemodifier")) - printf("ComputeNextStakeModifier: selected round %d stop=%s height=%d bit=%d\n", - nRound, DateTimeStrFormat(nSelectionIntervalStop).c_str(), pindex->nHeight, pindex->GetStakeEntropyBit()); + printf("ComputeNextStakeModifier: selected round %d stop=%s height=%d bit=%d\n", nRound, DateTimeStrFormat(nSelectionIntervalStop).c_str(), pindex->nHeight, pindex->GetStakeEntropyBit()); } // Print selection map for visualization of the selected blocks @@ -208,7 +202,7 @@ bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64& nStakeModif } if (fDebug) { - printf("ComputeNextStakeModifier: new modifier=0x%016"PRI64x" time=%s\n", nStakeModifierNew, DateTimeStrFormat(pindexPrev->GetBlockTime()).c_str()); + printf("ComputeNextStakeModifier: new modifier=0x%016"PRIx64" time=%s\n", nStakeModifierNew, DateTimeStrFormat(pindexPrev->GetBlockTime()).c_str()); } nStakeModifier = nStakeModifierNew; @@ -218,7 +212,7 @@ bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64& nStakeModif // The stake modifier used to hash for a stake kernel is chosen as the stake // modifier about a selection interval later than the coin generating the kernel -static bool GetKernelStakeModifier(uint256 hashBlockFrom, uint64& nStakeModifier, int& nStakeModifierHeight, int64& nStakeModifierTime, bool fPrintProofOfStake) +static bool GetKernelStakeModifier(uint256 hashBlockFrom, uint64_t& nStakeModifier, int& nStakeModifierHeight, int64_t& nStakeModifierTime, bool fPrintProofOfStake) { nStakeModifier = 0; if (!mapBlockIndex.count(hashBlockFrom)) @@ -226,10 +220,10 @@ static bool GetKernelStakeModifier(uint256 hashBlockFrom, uint64& nStakeModifier const CBlockIndex* pindexFrom = mapBlockIndex[hashBlockFrom]; nStakeModifierHeight = pindexFrom->nHeight; nStakeModifierTime = pindexFrom->GetBlockTime(); - int64 nStakeModifierSelectionInterval = GetStakeModifierSelectionInterval(); + int64_t nStakeModifierSelectionInterval = GetStakeModifierSelectionInterval(); const CBlockIndex* pindex = pindexFrom; - //fixed nStakeModifierSelectionInterval + //triangles fixed nStakeModifierSelectionInterval nStakeModifierSelectionInterval = 2 * nModifierInterval; // loop to find the stake modifier later by a selection interval @@ -241,13 +235,12 @@ static bool GetKernelStakeModifier(uint256 hashBlockFrom, uint64& nStakeModifier return error("GetKernelStakeModifier() : reached best block %s at height %d from block %s", pindex->GetBlockHash().ToString().c_str(), pindex->nHeight, hashBlockFrom.ToString().c_str()); else - { - if(fDebug) - printf(">> nStakeModifierTime = %"PRI64d", pindexFrom->GetBlockTime() = %"PRI64d", nStakeModifierSelectionInterval = %"PRI64d"\n", - nStakeModifierTime, pindexFrom->GetBlockTime(), nStakeModifierSelectionInterval); + { + if(fDebug) + printf(">> nStakeModifierTime = %"PRId64", pindexFrom->GetBlockTime() = %"PRId64", nStakeModifierSelectionInterval = %"PRId64"\n", nStakeModifierTime, pindexFrom->GetBlockTime(), nStakeModifierSelectionInterval); - return false; - } + return false; + } } pindex = pindex->pnext; if (pindex->GeneratedStakeModifier()) @@ -267,10 +260,8 @@ static bool GetKernelStakeModifier(uint256 hashBlockFrom, uint64& nStakeModifier // this ensures that the chance of getting a coinstake is proportional to the // amount of coin age one owns. // The reason this hash is chosen is the following: -// nStakeModifier: -// (v0.3) scrambles computation to make it very difficult to precompute -// future proof-of-stake at the time of the coin's confirmation -// (v0.2) nBits (deprecated): encodes all past block timestamps +// nStakeModifier: scrambles computation to make it very difficult to precompute +// future proof-of-stake at the time of the coin's confirmation // txPrev.block.nTime: prevent nodes from guessing a good timestamp to // generate transaction for future advantage // txPrev.offset: offset of txPrev inside block, to reduce the chance of @@ -283,7 +274,7 @@ static bool GetKernelStakeModifier(uint256 hashBlockFrom, uint64& nStakeModifier // quantities so as to generate blocks faster, degrading the system back into // a proof-of-work situation. // -bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned int nTxPrevOffset, const CTransaction& txPrev, const COutPoint& prevout, unsigned int nTimeTx, uint256& hashProofOfStake, bool fPrintProofOfStake) +bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned int nTxPrevOffset, const CTransaction& txPrev, const COutPoint& prevout, unsigned int nTimeTx, uint256& hashProofOfStake, uint256& targetProofOfStake, bool fPrintProofOfStake) { if (nTimeTx < txPrev.nTime) // Transaction timestamp violation return error("CheckStakeKernelHash() : nTime violation"); @@ -294,70 +285,79 @@ bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned CBigNum bnTargetPerCoinDay; bnTargetPerCoinDay.SetCompact(nBits); - int64 nValueIn = txPrev.vout[prevout.n].nValue; + int64_t nValueIn = txPrev.vout[prevout.n].nValue; + + uint256 hashBlockFrom = blockFrom.GetHash(); + + CBigNum bnCoinDayWeight = CBigNum(nValueIn) * GetWeight((int64_t)txPrev.nTime, (int64_t)nTimeTx) / COIN / (24 * 60 * 60); + targetProofOfStake = (bnCoinDayWeight * bnTargetPerCoinDay).getuint256(); - // v0.3 protocol kernel hash weight starts from 0 at the min age - // this change increases active coins participating the hash and helps - // to secure the network when proof-of-stake difficulty is low - int64 nTimeWeight = min((int64)nTimeTx - txPrev.nTime, (int64)nStakeMaxAge) - nStakeMinAge; - CBigNum bnCoinDayWeight = CBigNum(nValueIn) * nTimeWeight / COIN / (24 * 60 * 6); - // printf(">>> CheckStakeKernelHash: nTimeWeight = %"PRI64d"\n", nTimeWeight); // Calculate hash CDataStream ss(SER_GETHASH, 0); - uint64 nStakeModifier = 0; + uint64_t nStakeModifier = 0; int nStakeModifierHeight = 0; - int64 nStakeModifierTime = 0; + int64_t nStakeModifierTime = 0; - if (!GetKernelStakeModifier(blockFrom.GetHash(), nStakeModifier, nStakeModifierHeight, nStakeModifierTime, fPrintProofOfStake)) - { - if(fDebug) + if (!GetKernelStakeModifier(hashBlockFrom, nStakeModifier, nStakeModifierHeight, nStakeModifierTime, fPrintProofOfStake)) + { + if(fDebug) printf(">>> CheckStakeKernelHash: GetKernelStakeModifier return false\n"); - return false; - } + return false; + } + if (fDebug) printf(">>> CheckStakeKernelHash: passed GetKernelStakeModifier\n"); ss << nStakeModifier; + ss << nTimeBlockFrom << nTxPrevOffset << txPrev.nTime << prevout.n << nTimeTx; hashProofOfStake = Hash(ss.begin(), ss.end()); if (fPrintProofOfStake) { - printf("CheckStakeKernelHash() : using modifier 0x%016"PRI64x" at height=%d timestamp=%s for block from height=%d timestamp=%s\n", + printf("CheckStakeKernelHash() : using modifier 0x%016"PRIx64" at height=%d timestamp=%s for block from height=%d timestamp=%s\n", nStakeModifier, nStakeModifierHeight, DateTimeStrFormat(nStakeModifierTime).c_str(), - mapBlockIndex[blockFrom.GetHash()]->nHeight, + mapBlockIndex[hashBlockFrom]->nHeight, DateTimeStrFormat(blockFrom.GetBlockTime()).c_str()); - printf("CheckStakeKernelHash() : check protocol=%s modifier=0x%016"PRI64x" nTimeBlockFrom=%u nTxPrevOffset=%u nTimeTxPrev=%u nPrevout=%u nTimeTx=%u hashProof=%s\n", - "0.3", + printf("CheckStakeKernelHash() : check modifier=0x%016"PRIx64" nTimeBlockFrom=%u nTxPrevOffset=%u nTimeTxPrev=%u nPrevout=%u nTimeTx=%u hashProof=%s\n", nStakeModifier, nTimeBlockFrom, nTxPrevOffset, txPrev.nTime, prevout.n, nTimeTx, hashProofOfStake.ToString().c_str()); } // Now check if proof-of-stake hash meets target protocol - if (CBigNum(hashProofOfStake) > bnCoinDayWeight * bnTargetPerCoinDay * 10) - { - if(fDebug) - { - printf(">>> bnCoinDayWeight = %s, bnTargetPerCoinDay=%s\n", - bnCoinDayWeight.ToString().c_str(), bnTargetPerCoinDay.ToString().c_str()); - printf(">>> CheckStakeKernelHash - hashProofOfStake too much\n"); - } - return false; - } + if (CBigNum(hashProofOfStake) > bnCoinDayWeight * bnTargetPerCoinDay) + { + // triangles fix: accept hash to get blockchain moving again with Pharao release (v 4.0.0.1) for first 10 blocks after release + //printf(">>>> pindexBest->nHeight %d\n",pindexBest->nHeight); + if (pindexBest->nHeight > CRAPCHAIN_CUTOFF_BLOCK) + { + if(fDebug) + { + printf(">>> bnCoinDayWeight = %s, bnTargetPerCoinDay=%s\n", + bnCoinDayWeight.ToString().c_str(), bnTargetPerCoinDay.ToString().c_str()); + printf(">>> CheckStakeKernelHash - hashProofOfStake too much\n"); + } + return false; + } + else + { + //accept hash + printf(">>>> pindexBest->nHeight %d, Pharao release - hash accepted\n", pindexBest->nHeight); + } + } if (fDebug && !fPrintProofOfStake) { - printf("CheckStakeKernelHash() : using modifier 0x%016"PRI64x" at height=%d timestamp=%s for block from height=%d timestamp=%s\n", + printf("CheckStakeKernelHash() : using modifier 0x%016"PRIx64" at height=%d timestamp=%s for block from height=%d timestamp=%s\n", nStakeModifier, nStakeModifierHeight, DateTimeStrFormat(nStakeModifierTime).c_str(), - mapBlockIndex[blockFrom.GetHash()]->nHeight, + mapBlockIndex[hashBlockFrom]->nHeight, DateTimeStrFormat(blockFrom.GetBlockTime()).c_str()); - printf("CheckStakeKernelHash() : pass protocol=%s modifier=0x%016"PRI64x" nTimeBlockFrom=%u nTxPrevOffset=%u nTimeTxPrev=%u nPrevout=%u nTimeTx=%u hashProof=%s\n", - "0.3", + printf("CheckStakeKernelHash() : pass modifier=0x%016"PRIx64" nTimeBlockFrom=%u nTxPrevOffset=%u nTimeTxPrev=%u nPrevout=%u nTimeTx=%u hashProof=%s\n", nStakeModifier, nTimeBlockFrom, nTxPrevOffset, txPrev.nTime, prevout.n, nTimeTx, hashProofOfStake.ToString().c_str()); @@ -366,16 +366,11 @@ bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned } // Check kernel hash target and coinstake signature -bool CheckProofOfStake(const CTransaction& tx, unsigned int nBits, uint256& hashProofOfStake, bool fIsInitialDownload) +bool CheckProofOfStake(const CTransaction& tx, unsigned int nBits, uint256& hashProofOfStake, uint256& targetProofOfStake) { if (!tx.IsCoinStake()) return error("CheckProofOfStake() : called on non-coinstake %s", tx.GetHash().ToString().c_str()); - // this prevents many restarts just to load a chain, which has the same effect - if (fIsInitialDownload) { - return true; - } - // Kernel (input 0) must match the stake hash target per coin age (nBits) const CTxIn& txin = tx.vin[0]; @@ -385,10 +380,9 @@ bool CheckProofOfStake(const CTransaction& tx, unsigned int nBits, uint256& hash CTxIndex txindex; if (!txPrev.ReadFromDisk(txdb, txin.prevout, txindex)) return tx.DoS(1, error("CheckProofOfStake() : INFO: read txPrev failed")); // previous transaction not in main chain, may occur during initial download - txdb.Close(); // Verify signature - if (!VerifySignature(txPrev, tx, 0, true, 0)) + if (!VerifySignature(txPrev, tx, 0, 0)) return tx.DoS(100, error("CheckProofOfStake() : VerifySignature failed on coinstake %s", tx.GetHash().ToString().c_str())); // Read block header @@ -396,14 +390,14 @@ bool CheckProofOfStake(const CTransaction& tx, unsigned int nBits, uint256& hash if (!block.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos, false)) return fDebug? error("CheckProofOfStake() : read block failed") : false; // unable to read block of previous transaction - if (!CheckStakeKernelHash(nBits, block, txindex.pos.nTxPos - txindex.pos.nBlockPos, txPrev, txin.prevout, tx.nTime, hashProofOfStake, fDebug)) + if (!CheckStakeKernelHash(nBits, block, txindex.pos.nTxPos - txindex.pos.nBlockPos, txPrev, txin.prevout, tx.nTime, hashProofOfStake, targetProofOfStake, fDebug)) return tx.DoS(1, error("CheckProofOfStake() : INFO: check kernel failed on coinstake %s, hashProof=%s", tx.GetHash().ToString().c_str(), hashProofOfStake.ToString().c_str())); // may occur during initial download or if behind on block chain sync return true; } // Check whether the coinstake timestamp meets protocol -bool CheckCoinStakeTimestamp(int64 nTimeBlock, int64 nTimeTx) +bool CheckCoinStakeTimestamp(int64_t nTimeBlock, int64_t nTimeTx) { // v0.3 protocol return (nTimeBlock == nTimeTx); @@ -412,7 +406,7 @@ bool CheckCoinStakeTimestamp(int64 nTimeBlock, int64 nTimeTx) // Get stake modifier checksum unsigned int GetStakeModifierChecksum(const CBlockIndex* pindex) { - assert (pindex->pprev || pindex->GetBlockHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)); + assert (pindex->pprev || pindex->GetBlockHash() == (!fTestNet ? hashGenesisBlockOfficial : hashGenesisBlockTestNet)); // Hash previous checksum with flags, hashProofOfStake and nStakeModifier CDataStream ss(SER_GETHASH, 0); if (pindex->pprev) @@ -421,7 +415,7 @@ unsigned int GetStakeModifierChecksum(const CBlockIndex* pindex) uint256 hashChecksum = Hash(ss.begin(), ss.end()); hashChecksum >>= (256 - 32); if(fDebug) - printf("stake checksum: 0x%016"PRI64x"", hashChecksum.Get64()); + printf("stake checksum: 0x%016"PRIx64"", hashChecksum.Get64()); return hashChecksum.Get64(); } @@ -429,9 +423,10 @@ unsigned int GetStakeModifierChecksum(const CBlockIndex* pindex) bool CheckStakeModifierCheckpoints(int nHeight, unsigned int nStakeModifierChecksum) { if (fTestNet) return true; // Testnet has no checkpoints + if (mapStakeModifierCheckpoints.count(nHeight)) - { return nStakeModifierChecksum == mapStakeModifierCheckpoints[nHeight]; - } - return true; + return true; } + + diff --git a/src/kernel.h b/src/kernel.h index 4bd43b8..e4339e9 100644 --- a/src/kernel.h +++ b/src/kernel.h @@ -1,13 +1,12 @@ // Copyright (c) 2012-2013 The PPCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef PPCOIN_KERNEL_H -#define PPCOIN_KERNEL_H +#ifndef TRIANGLES_KERNEL_H +#define TRIANGLES_KERNEL_H #include "main.h" // MODIFIER_INTERVAL: time to elapse before new modifier is computed -static const unsigned int MODIFIER_INTERVAL = 5 * 60; // 5 minutes extern unsigned int nModifierInterval; // MODIFIER_INTERVAL_RATIO: @@ -15,18 +14,18 @@ extern unsigned int nModifierInterval; static const int MODIFIER_INTERVAL_RATIO = 3; // Compute the hash modifier for proof-of-stake -bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64& nStakeModifier, bool& fGeneratedStakeModifier); +bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64_t& nStakeModifier, bool& fGeneratedStakeModifier); // Check whether stake kernel meets hash target // Sets hashProofOfStake on success return -bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned int nTxPrevOffset, const CTransaction& txPrev, const COutPoint& prevout, unsigned int nTimeTx, uint256& hashProofOfStake, bool fPrintProofOfStake=false); +bool CheckStakeKernelHash(unsigned int nBits, const CBlock& blockFrom, unsigned int nTxPrevOffset, const CTransaction& txPrev, const COutPoint& prevout, unsigned int nTimeTx, uint256& hashProofOfStake, uint256& targetProofOfStake, bool fPrintProofOfStake=false); // Check kernel hash target and coinstake signature // Sets hashProofOfStake on success return -bool CheckProofOfStake(const CTransaction& tx, unsigned int nBits, uint256& hashProofOfStake, bool fIsInitialDownload); +bool CheckProofOfStake(const CTransaction& tx, unsigned int nBits, uint256& hashProofOfStake, uint256& targetProofOfStake); // Check whether the coinstake timestamp meets protocol -bool CheckCoinStakeTimestamp(int64 nTimeBlock, int64 nTimeTx); +bool CheckCoinStakeTimestamp(int64_t nTimeBlock, int64_t nTimeTx); // Get stake modifier checksum unsigned int GetStakeModifierChecksum(const CBlockIndex* pindex); @@ -35,6 +34,6 @@ unsigned int GetStakeModifierChecksum(const CBlockIndex* pindex); bool CheckStakeModifierCheckpoints(int nHeight, unsigned int nStakeModifierChecksum); // Get time weight using supplied timestamps -int64 GetWeight(int64 nIntervalBeginning, int64 nIntervalEnd); +int64_t GetWeight(int64_t nIntervalBeginning, int64_t nIntervalEnd); -#endif // PPCOIN_KERNEL_H +#endif // TRIANGLES_KERNEL_H diff --git a/src/key.cpp b/src/key.cpp index 23f3152..148ce96 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -126,6 +126,17 @@ void CKey::SetCompressedPubKey() fCompressedPubKey = true; } +void CKey::SetUnCompressedPubKey() +{ + EC_KEY_set_conv_form(pkey, POINT_CONVERSION_UNCOMPRESSED); + fCompressedPubKey = false; +} + +EC_KEY* CKey::GetECKey() +{ + return pkey; +} + void CKey::Reset() { fCompressedPubKey = false; @@ -174,6 +185,54 @@ bool CKey::IsCompressed() const return fCompressedPubKey; } +int CompareBigEndian(const unsigned char *c1, size_t c1len, const unsigned char *c2, size_t c2len) { + while (c1len > c2len) { + if (*c1) + return 1; + c1++; + c1len--; + } + while (c2len > c1len) { + if (*c2) + return -1; + c2++; + c2len--; + } + while (c1len > 0) { + if (*c1 > *c2) + return 1; + if (*c2 > *c1) + return -1; + c1++; + c2++; + c1len--; + } + return 0; +} + +// Order of secp256k1's generator minus 1. +const unsigned char vchMaxModOrder[32] = { + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, + 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, + 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40 +}; + +// Half of the order of secp256k1's generator minus 1. +const unsigned char vchMaxModHalfOrder[32] = { + 0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0x5D,0x57,0x6E,0x73,0x57,0xA4,0x50,0x1D, + 0xDF,0xE9,0x2F,0x46,0x68,0x1B,0x20,0xA0 +}; + +const unsigned char vchZero[0] = {}; + +bool CKey::CheckSignatureElement(const unsigned char *vch, int len, bool half) { + return CompareBigEndian(vch, len, vchZero, 0) > 0 && + CompareBigEndian(vch, len, half ? vchMaxModHalfOrder : vchMaxModOrder, 32) <= 0; +} + void CKey::MakeNewKey(bool fCompressed) { if (!EC_KEY_generate_key(pkey)) @@ -285,13 +344,28 @@ CPubKey CKey::GetPubKey() const bool CKey::Sign(uint256 hash, std::vector& vchSig) { + vchSig.clear(); + ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey); + if (sig == NULL) + return false; + BN_CTX *ctx = BN_CTX_new(); + BN_CTX_start(ctx); + const EC_GROUP *group = EC_KEY_get0_group(pkey); + BIGNUM *order = BN_CTX_get(ctx); + BIGNUM *halforder = BN_CTX_get(ctx); + EC_GROUP_get_order(group, order, ctx); + BN_rshift1(halforder, order); + if (BN_cmp(sig->s, halforder) > 0) { + // enforce low S values, by negating the value (modulo the order) if above order/2. + BN_sub(sig->s, order, sig->s); + } + BN_CTX_end(ctx); + BN_CTX_free(ctx); unsigned int nSize = ECDSA_size(pkey); vchSig.resize(nSize); // Make sure it is big enough - if (!ECDSA_sign(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], &nSize, pkey)) - { - vchSig.clear(); - return false; - } + unsigned char *pos = &vchSig[0]; + nSize = i2d_ECDSA_SIG(sig, &pos); + ECDSA_SIG_free(sig); vchSig.resize(nSize); // Shrink to fit actual size return true; } @@ -328,7 +402,10 @@ bool CKey::SignCompact(uint256 hash, std::vector& vchSig) } if (nRecId == -1) + { + ECDSA_SIG_free(sig); throw key_error("CKey::SignCompact() : unable to construct recoverable key"); + } vchSig[0] = nRecId+27+(fCompressedPubKey ? 4 : 0); BN_bn2bin(sig->r,&vchSig[33-(nBitsR+7)/8]); @@ -367,6 +444,7 @@ bool CKey::SetCompactSignature(uint256 hash, const std::vector& v ECDSA_SIG_free(sig); return true; } + ECDSA_SIG_free(sig); return false; } @@ -404,3 +482,13 @@ bool CKey::IsValid() key2.SetSecret(secret, fCompr); return GetPubKey() == key2.GetPubKey(); } + +bool ECC_InitSanityCheck() { + EC_KEY *pkey = EC_KEY_new_by_curve_name(NID_secp256k1); + if(pkey == NULL) + return false; + EC_KEY_free(pkey); + + // TODO Is there more EC functionality that could be missing? + return true; +} diff --git a/src/key.h b/src/key.h index c98f52e..c61dc0d 100644 --- a/src/key.h +++ b/src/key.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_KEY_H -#define BITCOIN_KEY_H +#ifndef TRIANGLES_KEY_H +#define TRIANGLES_KEY_H #include #include @@ -113,10 +113,12 @@ protected: bool fSet; bool fCompressedPubKey; - void SetCompressedPubKey(); - public: - + void SetCompressedPubKey(); + void SetUnCompressedPubKey(); + + EC_KEY* GetECKey(); + void Reset(); CKey(); @@ -157,6 +159,12 @@ public: bool VerifyCompact(uint256 hash, const std::vector& vchSig); bool IsValid(); + + // Check whether an element of a signature (r or s) is valid. + static bool CheckSignatureElement(const unsigned char *vch, int len, bool half); }; +/** Check that required EC support is available at runtime */ +bool ECC_InitSanityCheck(void); + #endif diff --git a/src/keystore.cpp b/src/keystore.cpp index e0cf805..bffe860 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -73,7 +73,7 @@ bool CCryptoKeyStore::SetCrypted() return true; } -bool CCryptoKeyStore::Lock() +bool CCryptoKeyStore::LockKeyStore() { if (!SetCrypted()) return false; diff --git a/src/keystore.h b/src/keystore.h index ab369bb..7470558 100644 --- a/src/keystore.h +++ b/src/keystore.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_KEYSTORE_H -#define BITCOIN_KEYSTORE_H +#ifndef TRIANGLES_KEYSTORE_H +#define TRIANGLES_KEYSTORE_H #include "crypter.h" #include "sync.h" @@ -105,15 +105,14 @@ typedef std::map > > Crypt class CCryptoKeyStore : public CBasicKeyStore { private: - CryptedKeyMap mapCryptedKeys; - - CKeyingMaterial vMasterKey; - // if fUseCrypto is true, mapKeys must be empty // if fUseCrypto is false, vMasterKey must be empty bool fUseCrypto; protected: + CryptedKeyMap mapCryptedKeys; + CKeyingMaterial vMasterKey; + bool SetCrypted(); // will encrypt previously unencrypted keys @@ -143,7 +142,7 @@ public: return result; } - bool Lock(); + bool LockKeyStore(); virtual bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret); bool AddKey(const CKey& key); diff --git a/src/leveldb/.gitignore b/src/leveldb/.gitignore new file mode 100644 index 0000000..71d87a4 --- /dev/null +++ b/src/leveldb/.gitignore @@ -0,0 +1,13 @@ +build_config.mk +*.a +*.o +*.dylib* +*.so +*.so.* +*_test +db_bench +leveldbutil +Release +Debug +Benchmark +vs2010.* diff --git a/src/leveldb/AUTHORS b/src/leveldb/AUTHORS new file mode 100644 index 0000000..2439d7a --- /dev/null +++ b/src/leveldb/AUTHORS @@ -0,0 +1,12 @@ +# Names should be added to this file like so: +# Name or Organization + +Google Inc. + +# Initial version authors: +Jeffrey Dean +Sanjay Ghemawat + +# Partial list of contributors: +Kevin Regan +Johan Bilien diff --git a/src/leveldb/LICENSE b/src/leveldb/LICENSE new file mode 100644 index 0000000..8e80208 --- /dev/null +++ b/src/leveldb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The LevelDB Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/leveldb/Makefile b/src/leveldb/Makefile new file mode 100644 index 0000000..344ff29 --- /dev/null +++ b/src/leveldb/Makefile @@ -0,0 +1,214 @@ +# Copyright (c) 2011 The LevelDB Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. See the AUTHORS file for names of contributors. + +#----------------------------------------------- +# Uncomment exactly one of the lines labelled (A), (B), and (C) below +# to switch between compilation modes. + +OPT ?= -O2 -DNDEBUG # (A) Production use (optimized mode) +# OPT ?= -g2 # (B) Debug mode, w/ full line-level debugging symbols +# OPT ?= -O2 -g2 -DNDEBUG # (C) Profiling mode: opt, but w/debugging symbols +#----------------------------------------------- + +# detect what platform we're building on +$(shell CC="$(CC)" CXX="$(CXX)" TARGET_OS="$(TARGET_OS)" \ + ./build_detect_platform build_config.mk ./) +# this file is generated by the previous line to set build flags and sources +include build_config.mk + +CFLAGS += -I. -I./include $(PLATFORM_CCFLAGS) $(OPT) +CXXFLAGS += -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) + +LDFLAGS += $(PLATFORM_LDFLAGS) +LIBS += $(PLATFORM_LIBS) + +LIBOBJECTS = $(SOURCES:.cc=.o) +MEMENVOBJECTS = $(MEMENV_SOURCES:.cc=.o) + +TESTUTIL = ./util/testutil.o +TESTHARNESS = ./util/testharness.o $(TESTUTIL) + +TESTS = \ + arena_test \ + autocompact_test \ + bloom_test \ + c_test \ + cache_test \ + coding_test \ + corruption_test \ + crc32c_test \ + db_test \ + dbformat_test \ + env_test \ + filename_test \ + filter_block_test \ + issue178_test \ + issue200_test \ + log_test \ + memenv_test \ + skiplist_test \ + table_test \ + version_edit_test \ + version_set_test \ + write_batch_test + +PROGRAMS = db_bench leveldbutil $(TESTS) +BENCHMARKS = db_bench_sqlite3 db_bench_tree_db + +LIBRARY = libleveldb.a +MEMENVLIBRARY = libmemenv.a + +default: all + +# Should we build shared libraries? +ifneq ($(PLATFORM_SHARED_EXT),) + +ifneq ($(PLATFORM_SHARED_VERSIONED),true) +SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT) +SHARED2 = $(SHARED1) +SHARED3 = $(SHARED1) +SHARED = $(SHARED1) +else +# Update db.h if you change these. +SHARED_MAJOR = 1 +SHARED_MINOR = 15 +SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT) +SHARED2 = $(SHARED1).$(SHARED_MAJOR) +SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR) +SHARED = $(SHARED1) $(SHARED2) $(SHARED3) +$(SHARED1): $(SHARED3) + ln -fs $(SHARED3) $(SHARED1) +$(SHARED2): $(SHARED3) + ln -fs $(SHARED3) $(SHARED2) +endif + +$(SHARED3): + $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED2) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SOURCES) -o $(SHARED3) $(LIBS) + +endif # PLATFORM_SHARED_EXT + +all: $(SHARED) $(LIBRARY) + +check: all $(PROGRAMS) $(TESTS) + for t in $(TESTS); do echo "***** Running $$t"; ./$$t || exit 1; done + +clean: + -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(SHARED) $(MEMENVLIBRARY) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk + -rm -rf ios-x86/* ios-arm/* + +$(LIBRARY): $(LIBOBJECTS) + rm -f $@ + $(AR) -rs $@ $(LIBOBJECTS) + +db_bench: db/db_bench.o $(LIBOBJECTS) $(TESTUTIL) + $(CXX) $(LDFLAGS) db/db_bench.o $(LIBOBJECTS) $(TESTUTIL) -o $@ $(LIBS) + +db_bench_sqlite3: doc/bench/db_bench_sqlite3.o $(LIBOBJECTS) $(TESTUTIL) + $(CXX) $(LDFLAGS) doc/bench/db_bench_sqlite3.o $(LIBOBJECTS) $(TESTUTIL) -o $@ -lsqlite3 $(LIBS) + +db_bench_tree_db: doc/bench/db_bench_tree_db.o $(LIBOBJECTS) $(TESTUTIL) + $(CXX) $(LDFLAGS) doc/bench/db_bench_tree_db.o $(LIBOBJECTS) $(TESTUTIL) -o $@ -lkyotocabinet $(LIBS) + +leveldbutil: db/leveldb_main.o $(LIBOBJECTS) + $(CXX) $(LDFLAGS) db/leveldb_main.o $(LIBOBJECTS) -o $@ $(LIBS) + +arena_test: util/arena_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) util/arena_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +autocompact_test: db/autocompact_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/autocompact_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +bloom_test: util/bloom_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) util/bloom_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +c_test: db/c_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/c_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +cache_test: util/cache_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) util/cache_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +coding_test: util/coding_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) util/coding_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +corruption_test: db/corruption_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/corruption_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +crc32c_test: util/crc32c_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) util/crc32c_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +db_test: db/db_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/db_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +dbformat_test: db/dbformat_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/dbformat_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +env_test: util/env_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) util/env_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +filename_test: db/filename_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/filename_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +filter_block_test: table/filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) table/filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +issue178_test: issues/issue178_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) issues/issue178_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +issue200_test: issues/issue200_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) issues/issue200_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +log_test: db/log_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/log_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +table_test: table/table_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) table/table_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +skiplist_test: db/skiplist_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/skiplist_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +version_edit_test: db/version_edit_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/version_edit_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +version_set_test: db/version_set_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/version_set_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +write_batch_test: db/write_batch_test.o $(LIBOBJECTS) $(TESTHARNESS) + $(CXX) $(LDFLAGS) db/write_batch_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS) + +$(MEMENVLIBRARY) : $(MEMENVOBJECTS) + rm -f $@ + $(AR) -rs $@ $(MEMENVOBJECTS) + +memenv_test : helpers/memenv/memenv_test.o $(MEMENVLIBRARY) $(LIBRARY) $(TESTHARNESS) + $(CXX) $(LDFLAGS) helpers/memenv/memenv_test.o $(MEMENVLIBRARY) $(LIBRARY) $(TESTHARNESS) -o $@ $(LIBS) + +ifeq ($(PLATFORM), IOS) +# For iOS, create universal object files to be used on both the simulator and +# a device. +PLATFORMSROOT=/Applications/Xcode.app/Contents/Developer/Platforms +SIMULATORROOT=$(PLATFORMSROOT)/iPhoneSimulator.platform/Developer +DEVICEROOT=$(PLATFORMSROOT)/iPhoneOS.platform/Developer +IOSVERSION=$(shell defaults read $(PLATFORMSROOT)/iPhoneOS.platform/version CFBundleShortVersionString) + +.cc.o: + mkdir -p ios-x86/$(dir $@) + $(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -c $< -o ios-x86/$@ + mkdir -p ios-arm/$(dir $@) + xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk -arch armv6 -arch armv7 -c $< -o ios-arm/$@ + lipo ios-x86/$@ ios-arm/$@ -create -output $@ + +.c.o: + mkdir -p ios-x86/$(dir $@) + $(CC) $(CFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -c $< -o ios-x86/$@ + mkdir -p ios-arm/$(dir $@) + xcrun -sdk iphoneos $(CC) $(CFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk -arch armv6 -arch armv7 -c $< -o ios-arm/$@ + lipo ios-x86/$@ ios-arm/$@ -create -output $@ + +else +.cc.o: + $(CXX) $(CXXFLAGS) -c $< -o $@ + +.c.o: + $(CC) $(CFLAGS) -c $< -o $@ +endif diff --git a/src/leveldb/NEWS b/src/leveldb/NEWS new file mode 100644 index 0000000..3fd9924 --- /dev/null +++ b/src/leveldb/NEWS @@ -0,0 +1,17 @@ +Release 1.2 2011-05-16 +---------------------- + +Fixes for larger databases (tested up to one billion 100-byte entries, +i.e., ~100GB). + +(1) Place hard limit on number of level-0 files. This fixes errors +of the form "too many open files". + +(2) Fixed memtable management. Before the fix, a heavy write burst +could cause unbounded memory usage. + +A fix for a logging bug where the reader would incorrectly complain +about corruption. + +Allow public access to WriteBatch contents so that users can easily +wrap a DB. diff --git a/src/leveldb/README b/src/leveldb/README new file mode 100644 index 0000000..3618ade --- /dev/null +++ b/src/leveldb/README @@ -0,0 +1,51 @@ +leveldb: A key-value store +Authors: Sanjay Ghemawat (sanjay@google.com) and Jeff Dean (jeff@google.com) + +The code under this directory implements a system for maintaining a +persistent key/value store. + +See doc/index.html for more explanation. +See doc/impl.html for a brief overview of the implementation. + +The public interface is in include/*.h. Callers should not include or +rely on the details of any other header files in this package. Those +internal APIs may be changed without warning. + +Guide to header files: + +include/db.h + Main interface to the DB: Start here + +include/options.h + Control over the behavior of an entire database, and also + control over the behavior of individual reads and writes. + +include/comparator.h + Abstraction for user-specified comparison function. If you want + just bytewise comparison of keys, you can use the default comparator, + but clients can write their own comparator implementations if they + want custom ordering (e.g. to handle different character + encodings, etc.) + +include/iterator.h + Interface for iterating over data. You can get an iterator + from a DB object. + +include/write_batch.h + Interface for atomically applying multiple updates to a database. + +include/slice.h + A simple module for maintaining a pointer and a length into some + other byte array. + +include/status.h + Status is returned from many of the public interfaces and is used + to report success and various kinds of errors. + +include/env.h + Abstraction of the OS environment. A posix implementation of + this interface is in util/env_posix.cc + +include/table.h +include/table_builder.h + Lower-level modules that most clients probably won't use directly diff --git a/src/leveldb/TODO b/src/leveldb/TODO new file mode 100644 index 0000000..e603c07 --- /dev/null +++ b/src/leveldb/TODO @@ -0,0 +1,14 @@ +ss +- Stats + +db +- Maybe implement DB::BulkDeleteForRange(start_key, end_key) + that would blow away files whose ranges are entirely contained + within [start_key..end_key]? For Chrome, deletion of obsolete + object stores, etc. can be done in the background anyway, so + probably not that important. +- There have been requests for MultiGet. + +After a range is completely deleted, what gets rid of the +corresponding files if we do no future changes to that range. Make +the conditions for triggering compactions fire in more situations? diff --git a/src/leveldb/WINDOWS.md b/src/leveldb/WINDOWS.md new file mode 100644 index 0000000..5b76c24 --- /dev/null +++ b/src/leveldb/WINDOWS.md @@ -0,0 +1,39 @@ +# Building LevelDB On Windows + +## Prereqs + +Install the [Windows Software Development Kit version 7.1](http://www.microsoft.com/downloads/dlx/en-us/listdetailsview.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b). + +Download and extract the [Snappy source distribution](http://snappy.googlecode.com/files/snappy-1.0.5.tar.gz) + +1. Open the "Windows SDK 7.1 Command Prompt" : + Start Menu -> "Microsoft Windows SDK v7.1" > "Windows SDK 7.1 Command Prompt" +2. Change the directory to the leveldb project + +## Building the Static lib + +* 32 bit Version + + setenv /x86 + msbuild.exe /p:Configuration=Release /p:Platform=Win32 /p:Snappy=..\snappy-1.0.5 + +* 64 bit Version + + setenv /x64 + msbuild.exe /p:Configuration=Release /p:Platform=x64 /p:Snappy=..\snappy-1.0.5 + + +## Building and Running the Benchmark app + +* 32 bit Version + + setenv /x86 + msbuild.exe /p:Configuration=Benchmark /p:Platform=Win32 /p:Snappy=..\snappy-1.0.5 + Benchmark\leveldb.exe + +* 64 bit Version + + setenv /x64 + msbuild.exe /p:Configuration=Benchmark /p:Platform=x64 /p:Snappy=..\snappy-1.0.5 + x64\Benchmark\leveldb.exe + diff --git a/src/leveldb/build_detect_platform b/src/leveldb/build_detect_platform new file mode 100644 index 0000000..85b1ce0 --- /dev/null +++ b/src/leveldb/build_detect_platform @@ -0,0 +1,224 @@ +#!/bin/sh +# +# Detects OS we're compiling on and outputs a file specified by the first +# argument, which in turn gets read while processing Makefile. +# +# The output will set the following variables: +# CC C Compiler path +# CXX C++ Compiler path +# PLATFORM_LDFLAGS Linker flags +# PLATFORM_LIBS Libraries flags +# PLATFORM_SHARED_EXT Extension for shared libraries +# PLATFORM_SHARED_LDFLAGS Flags for building shared library +# This flag is embedded just before the name +# of the shared library without intervening spaces +# PLATFORM_SHARED_CFLAGS Flags for compiling objects for shared library +# PLATFORM_CCFLAGS C compiler flags +# PLATFORM_CXXFLAGS C++ compiler flags. Will contain: +# PLATFORM_SHARED_VERSIONED Set to 'true' if platform supports versioned +# shared libraries, empty otherwise. +# +# The PLATFORM_CCFLAGS and PLATFORM_CXXFLAGS might include the following: +# +# -DLEVELDB_CSTDATOMIC_PRESENT if is present +# -DLEVELDB_PLATFORM_POSIX for Posix-based platforms +# -DSNAPPY if the Snappy library is present +# + +OUTPUT=$1 +PREFIX=$2 +if test -z "$OUTPUT" || test -z "$PREFIX"; then + echo "usage: $0 " >&2 + exit 1 +fi + +# Delete existing output, if it exists +rm -f $OUTPUT +touch $OUTPUT + +if test -z "$CC"; then + CC=cc +fi + +if test -z "$CXX"; then + CXX=g++ +fi + +if test -z "$TMPDIR"; then + TMPDIR=/tmp +fi + +# Detect OS +if test -z "$TARGET_OS"; then + TARGET_OS=`uname -s` +fi + +COMMON_FLAGS= +CROSS_COMPILE= +PLATFORM_CCFLAGS= +PLATFORM_CXXFLAGS= +PLATFORM_LDFLAGS= +PLATFORM_LIBS= +PLATFORM_SHARED_EXT="so" +PLATFORM_SHARED_LDFLAGS="-shared -Wl,-soname -Wl," +PLATFORM_SHARED_CFLAGS="-fPIC" +PLATFORM_SHARED_VERSIONED=true + +MEMCMP_FLAG= +if [ "$CXX" = "g++" ]; then + # Use libc's memcmp instead of GCC's memcmp. This results in ~40% + # performance improvement on readrandom under gcc 4.4.3 on Linux/x86. + MEMCMP_FLAG="-fno-builtin-memcmp" +fi + +case "$TARGET_OS" in + Darwin) + PLATFORM=OS_MACOSX + COMMON_FLAGS="$MEMCMP_FLAG -DOS_MACOSX" + PLATFORM_SHARED_EXT=dylib + [ -z "$INSTALL_PATH" ] && INSTALL_PATH=`pwd` + PLATFORM_SHARED_LDFLAGS="-dynamiclib -install_name $INSTALL_PATH/" + PORT_FILE=port/port_posix.cc + ;; + Linux) + PLATFORM=OS_LINUX + COMMON_FLAGS="$MEMCMP_FLAG -pthread -DOS_LINUX" + PLATFORM_LDFLAGS="-pthread" + PORT_FILE=port/port_posix.cc + ;; + SunOS) + PLATFORM=OS_SOLARIS + COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_SOLARIS" + PLATFORM_LIBS="-lpthread -lrt" + PORT_FILE=port/port_posix.cc + ;; + FreeBSD) + PLATFORM=OS_FREEBSD + COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_FREEBSD" + PLATFORM_LIBS="-lpthread" + PORT_FILE=port/port_posix.cc + ;; + GNU/kFreeBSD) + PLATFORM=OS_KFREEBSD + COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_KFREEBSD" + PLATFORM_LIBS="-lpthread" + PORT_FILE=port/port_posix.cc + ;; + NetBSD) + PLATFORM=OS_NETBSD + COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_NETBSD" + PLATFORM_LIBS="-lpthread -lgcc_s" + PORT_FILE=port/port_posix.cc + ;; + OpenBSD) + PLATFORM=OS_OPENBSD + COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_OPENBSD" + PLATFORM_LDFLAGS="-pthread" + PORT_FILE=port/port_posix.cc + ;; + DragonFly) + PLATFORM=OS_DRAGONFLYBSD + COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_DRAGONFLYBSD" + PLATFORM_LIBS="-lpthread" + PORT_FILE=port/port_posix.cc + ;; + OS_ANDROID_CROSSCOMPILE) + PLATFORM=OS_ANDROID + COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_ANDROID -DLEVELDB_PLATFORM_POSIX" + PLATFORM_LDFLAGS="" # All pthread features are in the Android C library + PORT_FILE=port/port_posix.cc + CROSS_COMPILE=true + ;; + HP-UX) + PLATFORM=OS_HPUX + COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_HPUX" + PLATFORM_LDFLAGS="-pthread" + PORT_FILE=port/port_posix.cc + # man ld: +h internal_name + PLATFORM_SHARED_LDFLAGS="-shared -Wl,+h -Wl," + ;; + IOS) + PLATFORM=IOS + COMMON_FLAGS="$MEMCMP_FLAG -DOS_MACOSX" + [ -z "$INSTALL_PATH" ] && INSTALL_PATH=`pwd` + PORT_FILE=port/port_posix.cc + PLATFORM_SHARED_EXT= + PLATFORM_SHARED_LDFLAGS= + PLATFORM_SHARED_CFLAGS= + PLATFORM_SHARED_VERSIONED= + ;; + OS_WINDOWS_CROSSCOMPILE | NATIVE_WINDOWS) + PLATFORM=OS_WINDOWS + COMMON_FLAGS="-fno-builtin-memcmp -D_REENTRANT -DOS_WINDOWS -DLEVELDB_PLATFORM_WINDOWS -DWINVER=0x0500 -D__USE_MINGW_ANSI_STDIO=1" + PLATFORM_SOURCES="util/env_win.cc" + PLATFORM_LIBS="-lshlwapi" + PORT_FILE=port/port_win.cc + CROSS_COMPILE=true + ;; + *) + echo "Unknown platform!" >&2 + exit 1 +esac + +# We want to make a list of all cc files within util, db, table, and helpers +# except for the test and benchmark files. By default, find will output a list +# of all files matching either rule, so we need to append -print to make the +# prune take effect. +DIRS="$PREFIX/db $PREFIX/util $PREFIX/table" + +set -f # temporarily disable globbing so that our patterns aren't expanded +PRUNE_TEST="-name *test*.cc -prune" +PRUNE_BENCH="-name *_bench.cc -prune" +PRUNE_TOOL="-name leveldb_main.cc -prune" +PORTABLE_FILES=`find $DIRS $PRUNE_TEST -o $PRUNE_BENCH -o $PRUNE_TOOL -o -name '*.cc' -print | sort | sed "s,^$PREFIX/,," | tr "\n" " "` + +set +f # re-enable globbing + +# The sources consist of the portable files, plus the platform-specific port +# file. +echo "SOURCES=$PORTABLE_FILES $PORT_FILE" >> $OUTPUT +echo "MEMENV_SOURCES=helpers/memenv/memenv.cc" >> $OUTPUT + +if [ "$CROSS_COMPILE" = "true" ]; then + # Cross-compiling; do not try any compilation tests. + true +else + CXXOUTPUT="${TMPDIR}/leveldb_build_detect_platform-cxx.$$" + + # If -std=c++0x works, use . Otherwise use port_posix.h. + $CXX $CXXFLAGS -std=c++0x -x c++ - -o $CXXOUTPUT 2>/dev/null < + int main() {} +EOF + if [ "$?" = 0 ]; then + COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX -DLEVELDB_CSTDATOMIC_PRESENT" + PLATFORM_CXXFLAGS="-std=c++0x" + else + COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX" + fi + + # Test whether tcmalloc is available + $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null </dev/null +fi + +PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS" +PLATFORM_CXXFLAGS="$PLATFORM_CXXFLAGS $COMMON_FLAGS" + +echo "CC=$CC" >> $OUTPUT +echo "CXX=$CXX" >> $OUTPUT +echo "PLATFORM=$PLATFORM" >> $OUTPUT +echo "PLATFORM_LDFLAGS=$PLATFORM_LDFLAGS" >> $OUTPUT +echo "PLATFORM_LIBS=$PLATFORM_LIBS" >> $OUTPUT +echo "PLATFORM_CCFLAGS=$PLATFORM_CCFLAGS" >> $OUTPUT +echo "PLATFORM_CXXFLAGS=$PLATFORM_CXXFLAGS" >> $OUTPUT +echo "PLATFORM_SHARED_CFLAGS=$PLATFORM_SHARED_CFLAGS" >> $OUTPUT +echo "PLATFORM_SHARED_EXT=$PLATFORM_SHARED_EXT" >> $OUTPUT +echo "PLATFORM_SHARED_LDFLAGS=$PLATFORM_SHARED_LDFLAGS" >> $OUTPUT +echo "PLATFORM_SHARED_VERSIONED=$PLATFORM_SHARED_VERSIONED" >> $OUTPUT diff --git a/src/leveldb/db/autocompact_test.cc b/src/leveldb/db/autocompact_test.cc new file mode 100644 index 0000000..d20a236 --- /dev/null +++ b/src/leveldb/db/autocompact_test.cc @@ -0,0 +1,118 @@ +// Copyright (c) 2013 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/db.h" +#include "db/db_impl.h" +#include "leveldb/cache.h" +#include "util/testharness.h" +#include "util/testutil.h" + +namespace leveldb { + +class AutoCompactTest { + public: + std::string dbname_; + Cache* tiny_cache_; + Options options_; + DB* db_; + + AutoCompactTest() { + dbname_ = test::TmpDir() + "/autocompact_test"; + tiny_cache_ = NewLRUCache(100); + options_.block_cache = tiny_cache_; + DestroyDB(dbname_, options_); + options_.create_if_missing = true; + options_.compression = kNoCompression; + ASSERT_OK(DB::Open(options_, dbname_, &db_)); + } + + ~AutoCompactTest() { + delete db_; + DestroyDB(dbname_, Options()); + delete tiny_cache_; + } + + std::string Key(int i) { + char buf[100]; + snprintf(buf, sizeof(buf), "key%06d", i); + return std::string(buf); + } + + uint64_t Size(const Slice& start, const Slice& limit) { + Range r(start, limit); + uint64_t size; + db_->GetApproximateSizes(&r, 1, &size); + return size; + } + + void DoReads(int n); +}; + +static const int kValueSize = 200 * 1024; +static const int kTotalSize = 100 * 1024 * 1024; +static const int kCount = kTotalSize / kValueSize; + +// Read through the first n keys repeatedly and check that they get +// compacted (verified by checking the size of the key space). +void AutoCompactTest::DoReads(int n) { + std::string value(kValueSize, 'x'); + DBImpl* dbi = reinterpret_cast(db_); + + // Fill database + for (int i = 0; i < kCount; i++) { + ASSERT_OK(db_->Put(WriteOptions(), Key(i), value)); + } + ASSERT_OK(dbi->TEST_CompactMemTable()); + + // Delete everything + for (int i = 0; i < kCount; i++) { + ASSERT_OK(db_->Delete(WriteOptions(), Key(i))); + } + ASSERT_OK(dbi->TEST_CompactMemTable()); + + // Get initial measurement of the space we will be reading. + const int64_t initial_size = Size(Key(0), Key(n)); + const int64_t initial_other_size = Size(Key(n), Key(kCount)); + + // Read until size drops significantly. + std::string limit_key = Key(n); + for (int read = 0; true; read++) { + ASSERT_LT(read, 100) << "Taking too long to compact"; + Iterator* iter = db_->NewIterator(ReadOptions()); + for (iter->SeekToFirst(); + iter->Valid() && iter->key().ToString() < limit_key; + iter->Next()) { + // Drop data + } + delete iter; + // Wait a little bit to allow any triggered compactions to complete. + Env::Default()->SleepForMicroseconds(1000000); + uint64_t size = Size(Key(0), Key(n)); + fprintf(stderr, "iter %3d => %7.3f MB [other %7.3f MB]\n", + read+1, size/1048576.0, Size(Key(n), Key(kCount))/1048576.0); + if (size <= initial_size/10) { + break; + } + } + + // Verify that the size of the key space not touched by the reads + // is pretty much unchanged. + const int64_t final_other_size = Size(Key(n), Key(kCount)); + ASSERT_LE(final_other_size, initial_other_size + 1048576); + ASSERT_GE(final_other_size, initial_other_size/5 - 1048576); +} + +TEST(AutoCompactTest, ReadAll) { + DoReads(kCount); +} + +TEST(AutoCompactTest, ReadHalf) { + DoReads(kCount/2); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/db/builder.cc b/src/leveldb/db/builder.cc new file mode 100644 index 0000000..f419882 --- /dev/null +++ b/src/leveldb/db/builder.cc @@ -0,0 +1,88 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/builder.h" + +#include "db/filename.h" +#include "db/dbformat.h" +#include "db/table_cache.h" +#include "db/version_edit.h" +#include "leveldb/db.h" +#include "leveldb/env.h" +#include "leveldb/iterator.h" + +namespace leveldb { + +Status BuildTable(const std::string& dbname, + Env* env, + const Options& options, + TableCache* table_cache, + Iterator* iter, + FileMetaData* meta) { + Status s; + meta->file_size = 0; + iter->SeekToFirst(); + + std::string fname = TableFileName(dbname, meta->number); + if (iter->Valid()) { + WritableFile* file; + s = env->NewWritableFile(fname, &file); + if (!s.ok()) { + return s; + } + + TableBuilder* builder = new TableBuilder(options, file); + meta->smallest.DecodeFrom(iter->key()); + for (; iter->Valid(); iter->Next()) { + Slice key = iter->key(); + meta->largest.DecodeFrom(key); + builder->Add(key, iter->value()); + } + + // Finish and check for builder errors + if (s.ok()) { + s = builder->Finish(); + if (s.ok()) { + meta->file_size = builder->FileSize(); + assert(meta->file_size > 0); + } + } else { + builder->Abandon(); + } + delete builder; + + // Finish and check for file errors + if (s.ok()) { + s = file->Sync(); + } + if (s.ok()) { + s = file->Close(); + } + delete file; + file = NULL; + + if (s.ok()) { + // Verify that the table is usable + Iterator* it = table_cache->NewIterator(ReadOptions(), + meta->number, + meta->file_size); + s = it->status(); + delete it; + } + } + + // Check for input iterator errors + if (!iter->status().ok()) { + s = iter->status(); + } + + if (s.ok() && meta->file_size > 0) { + // Keep it + } else { + env->DeleteFile(fname); + } + return s; +} + +} // namespace leveldb diff --git a/src/leveldb/db/builder.h b/src/leveldb/db/builder.h new file mode 100644 index 0000000..62431fc --- /dev/null +++ b/src/leveldb/db/builder.h @@ -0,0 +1,34 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_DB_BUILDER_H_ +#define STORAGE_LEVELDB_DB_BUILDER_H_ + +#include "leveldb/status.h" + +namespace leveldb { + +struct Options; +struct FileMetaData; + +class Env; +class Iterator; +class TableCache; +class VersionEdit; + +// Build a Table file from the contents of *iter. The generated file +// will be named according to meta->number. On success, the rest of +// *meta will be filled with metadata about the generated table. +// If no data is present in *iter, meta->file_size will be set to +// zero, and no Table file will be produced. +extern Status BuildTable(const std::string& dbname, + Env* env, + const Options& options, + TableCache* table_cache, + Iterator* iter, + FileMetaData* meta); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_BUILDER_H_ diff --git a/src/leveldb/db/c.cc b/src/leveldb/db/c.cc new file mode 100644 index 0000000..08ff0ad --- /dev/null +++ b/src/leveldb/db/c.cc @@ -0,0 +1,595 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/c.h" + +#include +#include +#include "leveldb/cache.h" +#include "leveldb/comparator.h" +#include "leveldb/db.h" +#include "leveldb/env.h" +#include "leveldb/filter_policy.h" +#include "leveldb/iterator.h" +#include "leveldb/options.h" +#include "leveldb/status.h" +#include "leveldb/write_batch.h" + +using leveldb::Cache; +using leveldb::Comparator; +using leveldb::CompressionType; +using leveldb::DB; +using leveldb::Env; +using leveldb::FileLock; +using leveldb::FilterPolicy; +using leveldb::Iterator; +using leveldb::kMajorVersion; +using leveldb::kMinorVersion; +using leveldb::Logger; +using leveldb::NewBloomFilterPolicy; +using leveldb::NewLRUCache; +using leveldb::Options; +using leveldb::RandomAccessFile; +using leveldb::Range; +using leveldb::ReadOptions; +using leveldb::SequentialFile; +using leveldb::Slice; +using leveldb::Snapshot; +using leveldb::Status; +using leveldb::WritableFile; +using leveldb::WriteBatch; +using leveldb::WriteOptions; + +extern "C" { + +struct leveldb_t { DB* rep; }; +struct leveldb_iterator_t { Iterator* rep; }; +struct leveldb_writebatch_t { WriteBatch rep; }; +struct leveldb_snapshot_t { const Snapshot* rep; }; +struct leveldb_readoptions_t { ReadOptions rep; }; +struct leveldb_writeoptions_t { WriteOptions rep; }; +struct leveldb_options_t { Options rep; }; +struct leveldb_cache_t { Cache* rep; }; +struct leveldb_seqfile_t { SequentialFile* rep; }; +struct leveldb_randomfile_t { RandomAccessFile* rep; }; +struct leveldb_writablefile_t { WritableFile* rep; }; +struct leveldb_logger_t { Logger* rep; }; +struct leveldb_filelock_t { FileLock* rep; }; + +struct leveldb_comparator_t : public Comparator { + void* state_; + void (*destructor_)(void*); + int (*compare_)( + void*, + const char* a, size_t alen, + const char* b, size_t blen); + const char* (*name_)(void*); + + virtual ~leveldb_comparator_t() { + (*destructor_)(state_); + } + + virtual int Compare(const Slice& a, const Slice& b) const { + return (*compare_)(state_, a.data(), a.size(), b.data(), b.size()); + } + + virtual const char* Name() const { + return (*name_)(state_); + } + + // No-ops since the C binding does not support key shortening methods. + virtual void FindShortestSeparator(std::string*, const Slice&) const { } + virtual void FindShortSuccessor(std::string* key) const { } +}; + +struct leveldb_filterpolicy_t : public FilterPolicy { + void* state_; + void (*destructor_)(void*); + const char* (*name_)(void*); + char* (*create_)( + void*, + const char* const* key_array, const size_t* key_length_array, + int num_keys, + size_t* filter_length); + unsigned char (*key_match_)( + void*, + const char* key, size_t length, + const char* filter, size_t filter_length); + + virtual ~leveldb_filterpolicy_t() { + (*destructor_)(state_); + } + + virtual const char* Name() const { + return (*name_)(state_); + } + + virtual void CreateFilter(const Slice* keys, int n, std::string* dst) const { + std::vector key_pointers(n); + std::vector key_sizes(n); + for (int i = 0; i < n; i++) { + key_pointers[i] = keys[i].data(); + key_sizes[i] = keys[i].size(); + } + size_t len; + char* filter = (*create_)(state_, &key_pointers[0], &key_sizes[0], n, &len); + dst->append(filter, len); + free(filter); + } + + virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const { + return (*key_match_)(state_, key.data(), key.size(), + filter.data(), filter.size()); + } +}; + +struct leveldb_env_t { + Env* rep; + bool is_default; +}; + +static bool SaveError(char** errptr, const Status& s) { + assert(errptr != NULL); + if (s.ok()) { + return false; + } else if (*errptr == NULL) { + *errptr = strdup(s.ToString().c_str()); + } else { + // TODO(sanjay): Merge with existing error? + free(*errptr); + *errptr = strdup(s.ToString().c_str()); + } + return true; +} + +static char* CopyString(const std::string& str) { + char* result = reinterpret_cast(malloc(sizeof(char) * str.size())); + memcpy(result, str.data(), sizeof(char) * str.size()); + return result; +} + +leveldb_t* leveldb_open( + const leveldb_options_t* options, + const char* name, + char** errptr) { + DB* db; + if (SaveError(errptr, DB::Open(options->rep, std::string(name), &db))) { + return NULL; + } + leveldb_t* result = new leveldb_t; + result->rep = db; + return result; +} + +void leveldb_close(leveldb_t* db) { + delete db->rep; + delete db; +} + +void leveldb_put( + leveldb_t* db, + const leveldb_writeoptions_t* options, + const char* key, size_t keylen, + const char* val, size_t vallen, + char** errptr) { + SaveError(errptr, + db->rep->Put(options->rep, Slice(key, keylen), Slice(val, vallen))); +} + +void leveldb_delete( + leveldb_t* db, + const leveldb_writeoptions_t* options, + const char* key, size_t keylen, + char** errptr) { + SaveError(errptr, db->rep->Delete(options->rep, Slice(key, keylen))); +} + + +void leveldb_write( + leveldb_t* db, + const leveldb_writeoptions_t* options, + leveldb_writebatch_t* batch, + char** errptr) { + SaveError(errptr, db->rep->Write(options->rep, &batch->rep)); +} + +char* leveldb_get( + leveldb_t* db, + const leveldb_readoptions_t* options, + const char* key, size_t keylen, + size_t* vallen, + char** errptr) { + char* result = NULL; + std::string tmp; + Status s = db->rep->Get(options->rep, Slice(key, keylen), &tmp); + if (s.ok()) { + *vallen = tmp.size(); + result = CopyString(tmp); + } else { + *vallen = 0; + if (!s.IsNotFound()) { + SaveError(errptr, s); + } + } + return result; +} + +leveldb_iterator_t* leveldb_create_iterator( + leveldb_t* db, + const leveldb_readoptions_t* options) { + leveldb_iterator_t* result = new leveldb_iterator_t; + result->rep = db->rep->NewIterator(options->rep); + return result; +} + +const leveldb_snapshot_t* leveldb_create_snapshot( + leveldb_t* db) { + leveldb_snapshot_t* result = new leveldb_snapshot_t; + result->rep = db->rep->GetSnapshot(); + return result; +} + +void leveldb_release_snapshot( + leveldb_t* db, + const leveldb_snapshot_t* snapshot) { + db->rep->ReleaseSnapshot(snapshot->rep); + delete snapshot; +} + +char* leveldb_property_value( + leveldb_t* db, + const char* propname) { + std::string tmp; + if (db->rep->GetProperty(Slice(propname), &tmp)) { + // We use strdup() since we expect human readable output. + return strdup(tmp.c_str()); + } else { + return NULL; + } +} + +void leveldb_approximate_sizes( + leveldb_t* db, + int num_ranges, + const char* const* range_start_key, const size_t* range_start_key_len, + const char* const* range_limit_key, const size_t* range_limit_key_len, + uint64_t* sizes) { + Range* ranges = new Range[num_ranges]; + for (int i = 0; i < num_ranges; i++) { + ranges[i].start = Slice(range_start_key[i], range_start_key_len[i]); + ranges[i].limit = Slice(range_limit_key[i], range_limit_key_len[i]); + } + db->rep->GetApproximateSizes(ranges, num_ranges, sizes); + delete[] ranges; +} + +void leveldb_compact_range( + leveldb_t* db, + const char* start_key, size_t start_key_len, + const char* limit_key, size_t limit_key_len) { + Slice a, b; + db->rep->CompactRange( + // Pass NULL Slice if corresponding "const char*" is NULL + (start_key ? (a = Slice(start_key, start_key_len), &a) : NULL), + (limit_key ? (b = Slice(limit_key, limit_key_len), &b) : NULL)); +} + +void leveldb_destroy_db( + const leveldb_options_t* options, + const char* name, + char** errptr) { + SaveError(errptr, DestroyDB(name, options->rep)); +} + +void leveldb_repair_db( + const leveldb_options_t* options, + const char* name, + char** errptr) { + SaveError(errptr, RepairDB(name, options->rep)); +} + +void leveldb_iter_destroy(leveldb_iterator_t* iter) { + delete iter->rep; + delete iter; +} + +unsigned char leveldb_iter_valid(const leveldb_iterator_t* iter) { + return iter->rep->Valid(); +} + +void leveldb_iter_seek_to_first(leveldb_iterator_t* iter) { + iter->rep->SeekToFirst(); +} + +void leveldb_iter_seek_to_last(leveldb_iterator_t* iter) { + iter->rep->SeekToLast(); +} + +void leveldb_iter_seek(leveldb_iterator_t* iter, const char* k, size_t klen) { + iter->rep->Seek(Slice(k, klen)); +} + +void leveldb_iter_next(leveldb_iterator_t* iter) { + iter->rep->Next(); +} + +void leveldb_iter_prev(leveldb_iterator_t* iter) { + iter->rep->Prev(); +} + +const char* leveldb_iter_key(const leveldb_iterator_t* iter, size_t* klen) { + Slice s = iter->rep->key(); + *klen = s.size(); + return s.data(); +} + +const char* leveldb_iter_value(const leveldb_iterator_t* iter, size_t* vlen) { + Slice s = iter->rep->value(); + *vlen = s.size(); + return s.data(); +} + +void leveldb_iter_get_error(const leveldb_iterator_t* iter, char** errptr) { + SaveError(errptr, iter->rep->status()); +} + +leveldb_writebatch_t* leveldb_writebatch_create() { + return new leveldb_writebatch_t; +} + +void leveldb_writebatch_destroy(leveldb_writebatch_t* b) { + delete b; +} + +void leveldb_writebatch_clear(leveldb_writebatch_t* b) { + b->rep.Clear(); +} + +void leveldb_writebatch_put( + leveldb_writebatch_t* b, + const char* key, size_t klen, + const char* val, size_t vlen) { + b->rep.Put(Slice(key, klen), Slice(val, vlen)); +} + +void leveldb_writebatch_delete( + leveldb_writebatch_t* b, + const char* key, size_t klen) { + b->rep.Delete(Slice(key, klen)); +} + +void leveldb_writebatch_iterate( + leveldb_writebatch_t* b, + void* state, + void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen), + void (*deleted)(void*, const char* k, size_t klen)) { + class H : public WriteBatch::Handler { + public: + void* state_; + void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen); + void (*deleted_)(void*, const char* k, size_t klen); + virtual void Put(const Slice& key, const Slice& value) { + (*put_)(state_, key.data(), key.size(), value.data(), value.size()); + } + virtual void Delete(const Slice& key) { + (*deleted_)(state_, key.data(), key.size()); + } + }; + H handler; + handler.state_ = state; + handler.put_ = put; + handler.deleted_ = deleted; + b->rep.Iterate(&handler); +} + +leveldb_options_t* leveldb_options_create() { + return new leveldb_options_t; +} + +void leveldb_options_destroy(leveldb_options_t* options) { + delete options; +} + +void leveldb_options_set_comparator( + leveldb_options_t* opt, + leveldb_comparator_t* cmp) { + opt->rep.comparator = cmp; +} + +void leveldb_options_set_filter_policy( + leveldb_options_t* opt, + leveldb_filterpolicy_t* policy) { + opt->rep.filter_policy = policy; +} + +void leveldb_options_set_create_if_missing( + leveldb_options_t* opt, unsigned char v) { + opt->rep.create_if_missing = v; +} + +void leveldb_options_set_error_if_exists( + leveldb_options_t* opt, unsigned char v) { + opt->rep.error_if_exists = v; +} + +void leveldb_options_set_paranoid_checks( + leveldb_options_t* opt, unsigned char v) { + opt->rep.paranoid_checks = v; +} + +void leveldb_options_set_env(leveldb_options_t* opt, leveldb_env_t* env) { + opt->rep.env = (env ? env->rep : NULL); +} + +void leveldb_options_set_info_log(leveldb_options_t* opt, leveldb_logger_t* l) { + opt->rep.info_log = (l ? l->rep : NULL); +} + +void leveldb_options_set_write_buffer_size(leveldb_options_t* opt, size_t s) { + opt->rep.write_buffer_size = s; +} + +void leveldb_options_set_max_open_files(leveldb_options_t* opt, int n) { + opt->rep.max_open_files = n; +} + +void leveldb_options_set_cache(leveldb_options_t* opt, leveldb_cache_t* c) { + opt->rep.block_cache = c->rep; +} + +void leveldb_options_set_block_size(leveldb_options_t* opt, size_t s) { + opt->rep.block_size = s; +} + +void leveldb_options_set_block_restart_interval(leveldb_options_t* opt, int n) { + opt->rep.block_restart_interval = n; +} + +void leveldb_options_set_compression(leveldb_options_t* opt, int t) { + opt->rep.compression = static_cast(t); +} + +leveldb_comparator_t* leveldb_comparator_create( + void* state, + void (*destructor)(void*), + int (*compare)( + void*, + const char* a, size_t alen, + const char* b, size_t blen), + const char* (*name)(void*)) { + leveldb_comparator_t* result = new leveldb_comparator_t; + result->state_ = state; + result->destructor_ = destructor; + result->compare_ = compare; + result->name_ = name; + return result; +} + +void leveldb_comparator_destroy(leveldb_comparator_t* cmp) { + delete cmp; +} + +leveldb_filterpolicy_t* leveldb_filterpolicy_create( + void* state, + void (*destructor)(void*), + char* (*create_filter)( + void*, + const char* const* key_array, const size_t* key_length_array, + int num_keys, + size_t* filter_length), + unsigned char (*key_may_match)( + void*, + const char* key, size_t length, + const char* filter, size_t filter_length), + const char* (*name)(void*)) { + leveldb_filterpolicy_t* result = new leveldb_filterpolicy_t; + result->state_ = state; + result->destructor_ = destructor; + result->create_ = create_filter; + result->key_match_ = key_may_match; + result->name_ = name; + return result; +} + +void leveldb_filterpolicy_destroy(leveldb_filterpolicy_t* filter) { + delete filter; +} + +leveldb_filterpolicy_t* leveldb_filterpolicy_create_bloom(int bits_per_key) { + // Make a leveldb_filterpolicy_t, but override all of its methods so + // they delegate to a NewBloomFilterPolicy() instead of user + // supplied C functions. + struct Wrapper : public leveldb_filterpolicy_t { + const FilterPolicy* rep_; + ~Wrapper() { delete rep_; } + const char* Name() const { return rep_->Name(); } + void CreateFilter(const Slice* keys, int n, std::string* dst) const { + return rep_->CreateFilter(keys, n, dst); + } + bool KeyMayMatch(const Slice& key, const Slice& filter) const { + return rep_->KeyMayMatch(key, filter); + } + static void DoNothing(void*) { } + }; + Wrapper* wrapper = new Wrapper; + wrapper->rep_ = NewBloomFilterPolicy(bits_per_key); + wrapper->state_ = NULL; + wrapper->destructor_ = &Wrapper::DoNothing; + return wrapper; +} + +leveldb_readoptions_t* leveldb_readoptions_create() { + return new leveldb_readoptions_t; +} + +void leveldb_readoptions_destroy(leveldb_readoptions_t* opt) { + delete opt; +} + +void leveldb_readoptions_set_verify_checksums( + leveldb_readoptions_t* opt, + unsigned char v) { + opt->rep.verify_checksums = v; +} + +void leveldb_readoptions_set_fill_cache( + leveldb_readoptions_t* opt, unsigned char v) { + opt->rep.fill_cache = v; +} + +void leveldb_readoptions_set_snapshot( + leveldb_readoptions_t* opt, + const leveldb_snapshot_t* snap) { + opt->rep.snapshot = (snap ? snap->rep : NULL); +} + +leveldb_writeoptions_t* leveldb_writeoptions_create() { + return new leveldb_writeoptions_t; +} + +void leveldb_writeoptions_destroy(leveldb_writeoptions_t* opt) { + delete opt; +} + +void leveldb_writeoptions_set_sync( + leveldb_writeoptions_t* opt, unsigned char v) { + opt->rep.sync = v; +} + +leveldb_cache_t* leveldb_cache_create_lru(size_t capacity) { + leveldb_cache_t* c = new leveldb_cache_t; + c->rep = NewLRUCache(capacity); + return c; +} + +void leveldb_cache_destroy(leveldb_cache_t* cache) { + delete cache->rep; + delete cache; +} + +leveldb_env_t* leveldb_create_default_env() { + leveldb_env_t* result = new leveldb_env_t; + result->rep = Env::Default(); + result->is_default = true; + return result; +} + +void leveldb_env_destroy(leveldb_env_t* env) { + if (!env->is_default) delete env->rep; + delete env; +} + +void leveldb_free(void* ptr) { + free(ptr); +} + +int leveldb_major_version() { + return kMajorVersion; +} + +int leveldb_minor_version() { + return kMinorVersion; +} + +} // end extern "C" diff --git a/src/leveldb/db/c_test.c b/src/leveldb/db/c_test.c new file mode 100644 index 0000000..7cd5ee0 --- /dev/null +++ b/src/leveldb/db/c_test.c @@ -0,0 +1,390 @@ +/* Copyright (c) 2011 The LevelDB Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. See the AUTHORS file for names of contributors. */ + +#include "leveldb/c.h" + +#include +#include +#include +#include +#include +#include + +const char* phase = ""; +static char dbname[200]; + +static void StartPhase(const char* name) { + fprintf(stderr, "=== Test %s\n", name); + phase = name; +} + +static const char* GetTempDir(void) { + const char* ret = getenv("TEST_TMPDIR"); + if (ret == NULL || ret[0] == '\0') + ret = "/tmp"; + return ret; +} + +#define CheckNoError(err) \ + if ((err) != NULL) { \ + fprintf(stderr, "%s:%d: %s: %s\n", __FILE__, __LINE__, phase, (err)); \ + abort(); \ + } + +#define CheckCondition(cond) \ + if (!(cond)) { \ + fprintf(stderr, "%s:%d: %s: %s\n", __FILE__, __LINE__, phase, #cond); \ + abort(); \ + } + +static void CheckEqual(const char* expected, const char* v, size_t n) { + if (expected == NULL && v == NULL) { + // ok + } else if (expected != NULL && v != NULL && n == strlen(expected) && + memcmp(expected, v, n) == 0) { + // ok + return; + } else { + fprintf(stderr, "%s: expected '%s', got '%s'\n", + phase, + (expected ? expected : "(null)"), + (v ? v : "(null")); + abort(); + } +} + +static void Free(char** ptr) { + if (*ptr) { + free(*ptr); + *ptr = NULL; + } +} + +static void CheckGet( + leveldb_t* db, + const leveldb_readoptions_t* options, + const char* key, + const char* expected) { + char* err = NULL; + size_t val_len; + char* val; + val = leveldb_get(db, options, key, strlen(key), &val_len, &err); + CheckNoError(err); + CheckEqual(expected, val, val_len); + Free(&val); +} + +static void CheckIter(leveldb_iterator_t* iter, + const char* key, const char* val) { + size_t len; + const char* str; + str = leveldb_iter_key(iter, &len); + CheckEqual(key, str, len); + str = leveldb_iter_value(iter, &len); + CheckEqual(val, str, len); +} + +// Callback from leveldb_writebatch_iterate() +static void CheckPut(void* ptr, + const char* k, size_t klen, + const char* v, size_t vlen) { + int* state = (int*) ptr; + CheckCondition(*state < 2); + switch (*state) { + case 0: + CheckEqual("bar", k, klen); + CheckEqual("b", v, vlen); + break; + case 1: + CheckEqual("box", k, klen); + CheckEqual("c", v, vlen); + break; + } + (*state)++; +} + +// Callback from leveldb_writebatch_iterate() +static void CheckDel(void* ptr, const char* k, size_t klen) { + int* state = (int*) ptr; + CheckCondition(*state == 2); + CheckEqual("bar", k, klen); + (*state)++; +} + +static void CmpDestroy(void* arg) { } + +static int CmpCompare(void* arg, const char* a, size_t alen, + const char* b, size_t blen) { + int n = (alen < blen) ? alen : blen; + int r = memcmp(a, b, n); + if (r == 0) { + if (alen < blen) r = -1; + else if (alen > blen) r = +1; + } + return r; +} + +static const char* CmpName(void* arg) { + return "foo"; +} + +// Custom filter policy +static unsigned char fake_filter_result = 1; +static void FilterDestroy(void* arg) { } +static const char* FilterName(void* arg) { + return "TestFilter"; +} +static char* FilterCreate( + void* arg, + const char* const* key_array, const size_t* key_length_array, + int num_keys, + size_t* filter_length) { + *filter_length = 4; + char* result = malloc(4); + memcpy(result, "fake", 4); + return result; +} +unsigned char FilterKeyMatch( + void* arg, + const char* key, size_t length, + const char* filter, size_t filter_length) { + CheckCondition(filter_length == 4); + CheckCondition(memcmp(filter, "fake", 4) == 0); + return fake_filter_result; +} + +int main(int argc, char** argv) { + leveldb_t* db; + leveldb_comparator_t* cmp; + leveldb_cache_t* cache; + leveldb_env_t* env; + leveldb_options_t* options; + leveldb_readoptions_t* roptions; + leveldb_writeoptions_t* woptions; + char* err = NULL; + int run = -1; + + CheckCondition(leveldb_major_version() >= 1); + CheckCondition(leveldb_minor_version() >= 1); + + snprintf(dbname, sizeof(dbname), + "%s/leveldb_c_test-%d", + GetTempDir(), + ((int) geteuid())); + + StartPhase("create_objects"); + cmp = leveldb_comparator_create(NULL, CmpDestroy, CmpCompare, CmpName); + env = leveldb_create_default_env(); + cache = leveldb_cache_create_lru(100000); + + options = leveldb_options_create(); + leveldb_options_set_comparator(options, cmp); + leveldb_options_set_error_if_exists(options, 1); + leveldb_options_set_cache(options, cache); + leveldb_options_set_env(options, env); + leveldb_options_set_info_log(options, NULL); + leveldb_options_set_write_buffer_size(options, 100000); + leveldb_options_set_paranoid_checks(options, 1); + leveldb_options_set_max_open_files(options, 10); + leveldb_options_set_block_size(options, 1024); + leveldb_options_set_block_restart_interval(options, 8); + leveldb_options_set_compression(options, leveldb_no_compression); + + roptions = leveldb_readoptions_create(); + leveldb_readoptions_set_verify_checksums(roptions, 1); + leveldb_readoptions_set_fill_cache(roptions, 0); + + woptions = leveldb_writeoptions_create(); + leveldb_writeoptions_set_sync(woptions, 1); + + StartPhase("destroy"); + leveldb_destroy_db(options, dbname, &err); + Free(&err); + + StartPhase("open_error"); + db = leveldb_open(options, dbname, &err); + CheckCondition(err != NULL); + Free(&err); + + StartPhase("leveldb_free"); + db = leveldb_open(options, dbname, &err); + CheckCondition(err != NULL); + leveldb_free(err); + err = NULL; + + StartPhase("open"); + leveldb_options_set_create_if_missing(options, 1); + db = leveldb_open(options, dbname, &err); + CheckNoError(err); + CheckGet(db, roptions, "foo", NULL); + + StartPhase("put"); + leveldb_put(db, woptions, "foo", 3, "hello", 5, &err); + CheckNoError(err); + CheckGet(db, roptions, "foo", "hello"); + + StartPhase("compactall"); + leveldb_compact_range(db, NULL, 0, NULL, 0); + CheckGet(db, roptions, "foo", "hello"); + + StartPhase("compactrange"); + leveldb_compact_range(db, "a", 1, "z", 1); + CheckGet(db, roptions, "foo", "hello"); + + StartPhase("writebatch"); + { + leveldb_writebatch_t* wb = leveldb_writebatch_create(); + leveldb_writebatch_put(wb, "foo", 3, "a", 1); + leveldb_writebatch_clear(wb); + leveldb_writebatch_put(wb, "bar", 3, "b", 1); + leveldb_writebatch_put(wb, "box", 3, "c", 1); + leveldb_writebatch_delete(wb, "bar", 3); + leveldb_write(db, woptions, wb, &err); + CheckNoError(err); + CheckGet(db, roptions, "foo", "hello"); + CheckGet(db, roptions, "bar", NULL); + CheckGet(db, roptions, "box", "c"); + int pos = 0; + leveldb_writebatch_iterate(wb, &pos, CheckPut, CheckDel); + CheckCondition(pos == 3); + leveldb_writebatch_destroy(wb); + } + + StartPhase("iter"); + { + leveldb_iterator_t* iter = leveldb_create_iterator(db, roptions); + CheckCondition(!leveldb_iter_valid(iter)); + leveldb_iter_seek_to_first(iter); + CheckCondition(leveldb_iter_valid(iter)); + CheckIter(iter, "box", "c"); + leveldb_iter_next(iter); + CheckIter(iter, "foo", "hello"); + leveldb_iter_prev(iter); + CheckIter(iter, "box", "c"); + leveldb_iter_prev(iter); + CheckCondition(!leveldb_iter_valid(iter)); + leveldb_iter_seek_to_last(iter); + CheckIter(iter, "foo", "hello"); + leveldb_iter_seek(iter, "b", 1); + CheckIter(iter, "box", "c"); + leveldb_iter_get_error(iter, &err); + CheckNoError(err); + leveldb_iter_destroy(iter); + } + + StartPhase("approximate_sizes"); + { + int i; + int n = 20000; + char keybuf[100]; + char valbuf[100]; + uint64_t sizes[2]; + const char* start[2] = { "a", "k00000000000000010000" }; + size_t start_len[2] = { 1, 21 }; + const char* limit[2] = { "k00000000000000010000", "z" }; + size_t limit_len[2] = { 21, 1 }; + leveldb_writeoptions_set_sync(woptions, 0); + for (i = 0; i < n; i++) { + snprintf(keybuf, sizeof(keybuf), "k%020d", i); + snprintf(valbuf, sizeof(valbuf), "v%020d", i); + leveldb_put(db, woptions, keybuf, strlen(keybuf), valbuf, strlen(valbuf), + &err); + CheckNoError(err); + } + leveldb_approximate_sizes(db, 2, start, start_len, limit, limit_len, sizes); + CheckCondition(sizes[0] > 0); + CheckCondition(sizes[1] > 0); + } + + StartPhase("property"); + { + char* prop = leveldb_property_value(db, "nosuchprop"); + CheckCondition(prop == NULL); + prop = leveldb_property_value(db, "leveldb.stats"); + CheckCondition(prop != NULL); + Free(&prop); + } + + StartPhase("snapshot"); + { + const leveldb_snapshot_t* snap; + snap = leveldb_create_snapshot(db); + leveldb_delete(db, woptions, "foo", 3, &err); + CheckNoError(err); + leveldb_readoptions_set_snapshot(roptions, snap); + CheckGet(db, roptions, "foo", "hello"); + leveldb_readoptions_set_snapshot(roptions, NULL); + CheckGet(db, roptions, "foo", NULL); + leveldb_release_snapshot(db, snap); + } + + StartPhase("repair"); + { + leveldb_close(db); + leveldb_options_set_create_if_missing(options, 0); + leveldb_options_set_error_if_exists(options, 0); + leveldb_repair_db(options, dbname, &err); + CheckNoError(err); + db = leveldb_open(options, dbname, &err); + CheckNoError(err); + CheckGet(db, roptions, "foo", NULL); + CheckGet(db, roptions, "bar", NULL); + CheckGet(db, roptions, "box", "c"); + leveldb_options_set_create_if_missing(options, 1); + leveldb_options_set_error_if_exists(options, 1); + } + + StartPhase("filter"); + for (run = 0; run < 2; run++) { + // First run uses custom filter, second run uses bloom filter + CheckNoError(err); + leveldb_filterpolicy_t* policy; + if (run == 0) { + policy = leveldb_filterpolicy_create( + NULL, FilterDestroy, FilterCreate, FilterKeyMatch, FilterName); + } else { + policy = leveldb_filterpolicy_create_bloom(10); + } + + // Create new database + leveldb_close(db); + leveldb_destroy_db(options, dbname, &err); + leveldb_options_set_filter_policy(options, policy); + db = leveldb_open(options, dbname, &err); + CheckNoError(err); + leveldb_put(db, woptions, "foo", 3, "foovalue", 8, &err); + CheckNoError(err); + leveldb_put(db, woptions, "bar", 3, "barvalue", 8, &err); + CheckNoError(err); + leveldb_compact_range(db, NULL, 0, NULL, 0); + + fake_filter_result = 1; + CheckGet(db, roptions, "foo", "foovalue"); + CheckGet(db, roptions, "bar", "barvalue"); + if (phase == 0) { + // Must not find value when custom filter returns false + fake_filter_result = 0; + CheckGet(db, roptions, "foo", NULL); + CheckGet(db, roptions, "bar", NULL); + fake_filter_result = 1; + + CheckGet(db, roptions, "foo", "foovalue"); + CheckGet(db, roptions, "bar", "barvalue"); + } + leveldb_options_set_filter_policy(options, NULL); + leveldb_filterpolicy_destroy(policy); + } + + StartPhase("cleanup"); + leveldb_close(db); + leveldb_options_destroy(options); + leveldb_readoptions_destroy(roptions); + leveldb_writeoptions_destroy(woptions); + leveldb_cache_destroy(cache); + leveldb_comparator_destroy(cmp); + leveldb_env_destroy(env); + + fprintf(stderr, "PASS\n"); + return 0; +} diff --git a/src/leveldb/db/corruption_test.cc b/src/leveldb/db/corruption_test.cc new file mode 100644 index 0000000..96afc68 --- /dev/null +++ b/src/leveldb/db/corruption_test.cc @@ -0,0 +1,374 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/db.h" + +#include +#include +#include +#include +#include "leveldb/cache.h" +#include "leveldb/env.h" +#include "leveldb/table.h" +#include "leveldb/write_batch.h" +#include "db/db_impl.h" +#include "db/filename.h" +#include "db/log_format.h" +#include "db/version_set.h" +#include "util/logging.h" +#include "util/testharness.h" +#include "util/testutil.h" + +namespace leveldb { + +static const int kValueSize = 1000; + +class CorruptionTest { + public: + test::ErrorEnv env_; + std::string dbname_; + Cache* tiny_cache_; + Options options_; + DB* db_; + + CorruptionTest() { + tiny_cache_ = NewLRUCache(100); + options_.env = &env_; + options_.block_cache = tiny_cache_; + dbname_ = test::TmpDir() + "/db_test"; + DestroyDB(dbname_, options_); + + db_ = NULL; + options_.create_if_missing = true; + Reopen(); + options_.create_if_missing = false; + } + + ~CorruptionTest() { + delete db_; + DestroyDB(dbname_, Options()); + delete tiny_cache_; + } + + Status TryReopen() { + delete db_; + db_ = NULL; + return DB::Open(options_, dbname_, &db_); + } + + void Reopen() { + ASSERT_OK(TryReopen()); + } + + void RepairDB() { + delete db_; + db_ = NULL; + ASSERT_OK(::leveldb::RepairDB(dbname_, options_)); + } + + void Build(int n) { + std::string key_space, value_space; + WriteBatch batch; + for (int i = 0; i < n; i++) { + //if ((i % 100) == 0) fprintf(stderr, "@ %d of %d\n", i, n); + Slice key = Key(i, &key_space); + batch.Clear(); + batch.Put(key, Value(i, &value_space)); + WriteOptions options; + // Corrupt() doesn't work without this sync on windows; stat reports 0 for + // the file size. + if (i == n - 1) { + options.sync = true; + } + ASSERT_OK(db_->Write(options, &batch)); + } + } + + void Check(int min_expected, int max_expected) { + int next_expected = 0; + int missed = 0; + int bad_keys = 0; + int bad_values = 0; + int correct = 0; + std::string value_space; + Iterator* iter = db_->NewIterator(ReadOptions()); + for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { + uint64_t key; + Slice in(iter->key()); + if (in == "" || in == "~") { + // Ignore boundary keys. + continue; + } + if (!ConsumeDecimalNumber(&in, &key) || + !in.empty() || + key < next_expected) { + bad_keys++; + continue; + } + missed += (key - next_expected); + next_expected = key + 1; + if (iter->value() != Value(key, &value_space)) { + bad_values++; + } else { + correct++; + } + } + delete iter; + + fprintf(stderr, + "expected=%d..%d; got=%d; bad_keys=%d; bad_values=%d; missed=%d\n", + min_expected, max_expected, correct, bad_keys, bad_values, missed); + ASSERT_LE(min_expected, correct); + ASSERT_GE(max_expected, correct); + } + + void Corrupt(FileType filetype, int offset, int bytes_to_corrupt) { + // Pick file to corrupt + std::vector filenames; + ASSERT_OK(env_.GetChildren(dbname_, &filenames)); + uint64_t number; + FileType type; + std::string fname; + int picked_number = -1; + for (size_t i = 0; i < filenames.size(); i++) { + if (ParseFileName(filenames[i], &number, &type) && + type == filetype && + int(number) > picked_number) { // Pick latest file + fname = dbname_ + "/" + filenames[i]; + picked_number = number; + } + } + ASSERT_TRUE(!fname.empty()) << filetype; + + struct stat sbuf; + if (stat(fname.c_str(), &sbuf) != 0) { + const char* msg = strerror(errno); + ASSERT_TRUE(false) << fname << ": " << msg; + } + + if (offset < 0) { + // Relative to end of file; make it absolute + if (-offset > sbuf.st_size) { + offset = 0; + } else { + offset = sbuf.st_size + offset; + } + } + if (offset > sbuf.st_size) { + offset = sbuf.st_size; + } + if (offset + bytes_to_corrupt > sbuf.st_size) { + bytes_to_corrupt = sbuf.st_size - offset; + } + + // Do it + std::string contents; + Status s = ReadFileToString(Env::Default(), fname, &contents); + ASSERT_TRUE(s.ok()) << s.ToString(); + for (int i = 0; i < bytes_to_corrupt; i++) { + contents[i + offset] ^= 0x80; + } + s = WriteStringToFile(Env::Default(), contents, fname); + ASSERT_TRUE(s.ok()) << s.ToString(); + } + + int Property(const std::string& name) { + std::string property; + int result; + if (db_->GetProperty(name, &property) && + sscanf(property.c_str(), "%d", &result) == 1) { + return result; + } else { + return -1; + } + } + + // Return the ith key + Slice Key(int i, std::string* storage) { + char buf[100]; + snprintf(buf, sizeof(buf), "%016d", i); + storage->assign(buf, strlen(buf)); + return Slice(*storage); + } + + // Return the value to associate with the specified key + Slice Value(int k, std::string* storage) { + Random r(k); + return test::RandomString(&r, kValueSize, storage); + } +}; + +TEST(CorruptionTest, Recovery) { + Build(100); + Check(100, 100); + Corrupt(kLogFile, 19, 1); // WriteBatch tag for first record + Corrupt(kLogFile, log::kBlockSize + 1000, 1); // Somewhere in second block + Reopen(); + + // The 64 records in the first two log blocks are completely lost. + Check(36, 36); +} + +TEST(CorruptionTest, RecoverWriteError) { + env_.writable_file_error_ = true; + Status s = TryReopen(); + ASSERT_TRUE(!s.ok()); +} + +TEST(CorruptionTest, NewFileErrorDuringWrite) { + // Do enough writing to force minor compaction + env_.writable_file_error_ = true; + const int num = 3 + (Options().write_buffer_size / kValueSize); + std::string value_storage; + Status s; + for (int i = 0; s.ok() && i < num; i++) { + WriteBatch batch; + batch.Put("a", Value(100, &value_storage)); + s = db_->Write(WriteOptions(), &batch); + } + ASSERT_TRUE(!s.ok()); + ASSERT_GE(env_.num_writable_file_errors_, 1); + env_.writable_file_error_ = false; + Reopen(); +} + +TEST(CorruptionTest, TableFile) { + Build(100); + DBImpl* dbi = reinterpret_cast(db_); + dbi->TEST_CompactMemTable(); + dbi->TEST_CompactRange(0, NULL, NULL); + dbi->TEST_CompactRange(1, NULL, NULL); + + Corrupt(kTableFile, 100, 1); + Check(90, 99); +} + +TEST(CorruptionTest, TableFileRepair) { + options_.block_size = 2 * kValueSize; // Limit scope of corruption + options_.paranoid_checks = true; + Reopen(); + Build(100); + DBImpl* dbi = reinterpret_cast(db_); + dbi->TEST_CompactMemTable(); + dbi->TEST_CompactRange(0, NULL, NULL); + dbi->TEST_CompactRange(1, NULL, NULL); + + Corrupt(kTableFile, 100, 1); + RepairDB(); + Reopen(); + Check(95, 99); +} + +TEST(CorruptionTest, TableFileIndexData) { + Build(10000); // Enough to build multiple Tables + DBImpl* dbi = reinterpret_cast(db_); + dbi->TEST_CompactMemTable(); + + Corrupt(kTableFile, -2000, 500); + Reopen(); + Check(5000, 9999); +} + +TEST(CorruptionTest, MissingDescriptor) { + Build(1000); + RepairDB(); + Reopen(); + Check(1000, 1000); +} + +TEST(CorruptionTest, SequenceNumberRecovery) { + ASSERT_OK(db_->Put(WriteOptions(), "foo", "v1")); + ASSERT_OK(db_->Put(WriteOptions(), "foo", "v2")); + ASSERT_OK(db_->Put(WriteOptions(), "foo", "v3")); + ASSERT_OK(db_->Put(WriteOptions(), "foo", "v4")); + ASSERT_OK(db_->Put(WriteOptions(), "foo", "v5")); + RepairDB(); + Reopen(); + std::string v; + ASSERT_OK(db_->Get(ReadOptions(), "foo", &v)); + ASSERT_EQ("v5", v); + // Write something. If sequence number was not recovered properly, + // it will be hidden by an earlier write. + ASSERT_OK(db_->Put(WriteOptions(), "foo", "v6")); + ASSERT_OK(db_->Get(ReadOptions(), "foo", &v)); + ASSERT_EQ("v6", v); + Reopen(); + ASSERT_OK(db_->Get(ReadOptions(), "foo", &v)); + ASSERT_EQ("v6", v); +} + +TEST(CorruptionTest, CorruptedDescriptor) { + ASSERT_OK(db_->Put(WriteOptions(), "foo", "hello")); + DBImpl* dbi = reinterpret_cast(db_); + dbi->TEST_CompactMemTable(); + dbi->TEST_CompactRange(0, NULL, NULL); + + Corrupt(kDescriptorFile, 0, 1000); + Status s = TryReopen(); + ASSERT_TRUE(!s.ok()); + + RepairDB(); + Reopen(); + std::string v; + ASSERT_OK(db_->Get(ReadOptions(), "foo", &v)); + ASSERT_EQ("hello", v); +} + +TEST(CorruptionTest, CompactionInputError) { + Build(10); + DBImpl* dbi = reinterpret_cast(db_); + dbi->TEST_CompactMemTable(); + const int last = config::kMaxMemCompactLevel; + ASSERT_EQ(1, Property("leveldb.num-files-at-level" + NumberToString(last))); + + Corrupt(kTableFile, 100, 1); + Check(5, 9); + + // Force compactions by writing lots of values + Build(10000); + Check(10000, 10000); +} + +TEST(CorruptionTest, CompactionInputErrorParanoid) { + options_.paranoid_checks = true; + options_.write_buffer_size = 512 << 10; + Reopen(); + DBImpl* dbi = reinterpret_cast(db_); + + // Make multiple inputs so we need to compact. + for (int i = 0; i < 2; i++) { + Build(10); + dbi->TEST_CompactMemTable(); + Corrupt(kTableFile, 100, 1); + env_.SleepForMicroseconds(100000); + } + dbi->CompactRange(NULL, NULL); + + // Write must fail because of corrupted table + std::string tmp1, tmp2; + Status s = db_->Put(WriteOptions(), Key(5, &tmp1), Value(5, &tmp2)); + ASSERT_TRUE(!s.ok()) << "write did not fail in corrupted paranoid db"; +} + +TEST(CorruptionTest, UnrelatedKeys) { + Build(10); + DBImpl* dbi = reinterpret_cast(db_); + dbi->TEST_CompactMemTable(); + Corrupt(kTableFile, 100, 1); + + std::string tmp1, tmp2; + ASSERT_OK(db_->Put(WriteOptions(), Key(1000, &tmp1), Value(1000, &tmp2))); + std::string v; + ASSERT_OK(db_->Get(ReadOptions(), Key(1000, &tmp1), &v)); + ASSERT_EQ(Value(1000, &tmp2).ToString(), v); + dbi->TEST_CompactMemTable(); + ASSERT_OK(db_->Get(ReadOptions(), Key(1000, &tmp1), &v)); + ASSERT_EQ(Value(1000, &tmp2).ToString(), v); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/db/db_bench.cc b/src/leveldb/db/db_bench.cc new file mode 100644 index 0000000..fc46d89 --- /dev/null +++ b/src/leveldb/db/db_bench.cc @@ -0,0 +1,979 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include +#include +#include "db/db_impl.h" +#include "db/version_set.h" +#include "leveldb/cache.h" +#include "leveldb/db.h" +#include "leveldb/env.h" +#include "leveldb/write_batch.h" +#include "port/port.h" +#include "util/crc32c.h" +#include "util/histogram.h" +#include "util/mutexlock.h" +#include "util/random.h" +#include "util/testutil.h" + +// Comma-separated list of operations to run in the specified order +// Actual benchmarks: +// fillseq -- write N values in sequential key order in async mode +// fillrandom -- write N values in random key order in async mode +// overwrite -- overwrite N values in random key order in async mode +// fillsync -- write N/100 values in random key order in sync mode +// fill100K -- write N/1000 100K values in random order in async mode +// deleteseq -- delete N keys in sequential order +// deleterandom -- delete N keys in random order +// readseq -- read N times sequentially +// readreverse -- read N times in reverse order +// readrandom -- read N times in random order +// readmissing -- read N missing keys in random order +// readhot -- read N times in random order from 1% section of DB +// seekrandom -- N random seeks +// crc32c -- repeated crc32c of 4K of data +// acquireload -- load N*1000 times +// Meta operations: +// compact -- Compact the entire DB +// stats -- Print DB stats +// sstables -- Print sstable info +// heapprofile -- Dump a heap profile (if supported by this port) +static const char* FLAGS_benchmarks = + "fillseq," + "fillsync," + "fillrandom," + "overwrite," + "readrandom," + "readrandom," // Extra run to allow previous compactions to quiesce + "readseq," + "readreverse," + "compact," + "readrandom," + "readseq," + "readreverse," + "fill100K," + "crc32c," + "snappycomp," + "snappyuncomp," + "acquireload," + ; + +// Number of key/values to place in database +static int FLAGS_num = 1000000; + +// Number of read operations to do. If negative, do FLAGS_num reads. +static int FLAGS_reads = -1; + +// Number of concurrent threads to run. +static int FLAGS_threads = 1; + +// Size of each value +static int FLAGS_value_size = 100; + +// Arrange to generate values that shrink to this fraction of +// their original size after compression +static double FLAGS_compression_ratio = 0.5; + +// Print histogram of operation timings +static bool FLAGS_histogram = false; + +// Number of bytes to buffer in memtable before compacting +// (initialized to default value by "main") +static int FLAGS_write_buffer_size = 0; + +// Number of bytes to use as a cache of uncompressed data. +// Negative means use default settings. +static int FLAGS_cache_size = -1; + +// Maximum number of files to keep open at the same time (use default if == 0) +static int FLAGS_open_files = 0; + +// Bloom filter bits per key. +// Negative means use default settings. +static int FLAGS_bloom_bits = -1; + +// If true, do not destroy the existing database. If you set this +// flag and also specify a benchmark that wants a fresh database, that +// benchmark will fail. +static bool FLAGS_use_existing_db = false; + +// Use the db with the following name. +static const char* FLAGS_db = NULL; + +namespace leveldb { + +namespace { + +// Helper for quickly generating random data. +class RandomGenerator { + private: + std::string data_; + int pos_; + + public: + RandomGenerator() { + // We use a limited amount of data over and over again and ensure + // that it is larger than the compression window (32KB), and also + // large enough to serve all typical value sizes we want to write. + Random rnd(301); + std::string piece; + while (data_.size() < 1048576) { + // Add a short fragment that is as compressible as specified + // by FLAGS_compression_ratio. + test::CompressibleString(&rnd, FLAGS_compression_ratio, 100, &piece); + data_.append(piece); + } + pos_ = 0; + } + + Slice Generate(size_t len) { + if (pos_ + len > data_.size()) { + pos_ = 0; + assert(len < data_.size()); + } + pos_ += len; + return Slice(data_.data() + pos_ - len, len); + } +}; + +static Slice TrimSpace(Slice s) { + size_t start = 0; + while (start < s.size() && isspace(s[start])) { + start++; + } + size_t limit = s.size(); + while (limit > start && isspace(s[limit-1])) { + limit--; + } + return Slice(s.data() + start, limit - start); +} + +static void AppendWithSpace(std::string* str, Slice msg) { + if (msg.empty()) return; + if (!str->empty()) { + str->push_back(' '); + } + str->append(msg.data(), msg.size()); +} + +class Stats { + private: + double start_; + double finish_; + double seconds_; + int done_; + int next_report_; + int64_t bytes_; + double last_op_finish_; + Histogram hist_; + std::string message_; + + public: + Stats() { Start(); } + + void Start() { + next_report_ = 100; + last_op_finish_ = start_; + hist_.Clear(); + done_ = 0; + bytes_ = 0; + seconds_ = 0; + start_ = Env::Default()->NowMicros(); + finish_ = start_; + message_.clear(); + } + + void Merge(const Stats& other) { + hist_.Merge(other.hist_); + done_ += other.done_; + bytes_ += other.bytes_; + seconds_ += other.seconds_; + if (other.start_ < start_) start_ = other.start_; + if (other.finish_ > finish_) finish_ = other.finish_; + + // Just keep the messages from one thread + if (message_.empty()) message_ = other.message_; + } + + void Stop() { + finish_ = Env::Default()->NowMicros(); + seconds_ = (finish_ - start_) * 1e-6; + } + + void AddMessage(Slice msg) { + AppendWithSpace(&message_, msg); + } + + void FinishedSingleOp() { + if (FLAGS_histogram) { + double now = Env::Default()->NowMicros(); + double micros = now - last_op_finish_; + hist_.Add(micros); + if (micros > 20000) { + fprintf(stderr, "long op: %.1f micros%30s\r", micros, ""); + fflush(stderr); + } + last_op_finish_ = now; + } + + done_++; + if (done_ >= next_report_) { + if (next_report_ < 1000) next_report_ += 100; + else if (next_report_ < 5000) next_report_ += 500; + else if (next_report_ < 10000) next_report_ += 1000; + else if (next_report_ < 50000) next_report_ += 5000; + else if (next_report_ < 100000) next_report_ += 10000; + else if (next_report_ < 500000) next_report_ += 50000; + else next_report_ += 100000; + fprintf(stderr, "... finished %d ops%30s\r", done_, ""); + fflush(stderr); + } + } + + void AddBytes(int64_t n) { + bytes_ += n; + } + + void Report(const Slice& name) { + // Pretend at least one op was done in case we are running a benchmark + // that does not call FinishedSingleOp(). + if (done_ < 1) done_ = 1; + + std::string extra; + if (bytes_ > 0) { + // Rate is computed on actual elapsed time, not the sum of per-thread + // elapsed times. + double elapsed = (finish_ - start_) * 1e-6; + char rate[100]; + snprintf(rate, sizeof(rate), "%6.1f MB/s", + (bytes_ / 1048576.0) / elapsed); + extra = rate; + } + AppendWithSpace(&extra, message_); + + fprintf(stdout, "%-12s : %11.3f micros/op;%s%s\n", + name.ToString().c_str(), + seconds_ * 1e6 / done_, + (extra.empty() ? "" : " "), + extra.c_str()); + if (FLAGS_histogram) { + fprintf(stdout, "Microseconds per op:\n%s\n", hist_.ToString().c_str()); + } + fflush(stdout); + } +}; + +// State shared by all concurrent executions of the same benchmark. +struct SharedState { + port::Mutex mu; + port::CondVar cv; + int total; + + // Each thread goes through the following states: + // (1) initializing + // (2) waiting for others to be initialized + // (3) running + // (4) done + + int num_initialized; + int num_done; + bool start; + + SharedState() : cv(&mu) { } +}; + +// Per-thread state for concurrent executions of the same benchmark. +struct ThreadState { + int tid; // 0..n-1 when running in n threads + Random rand; // Has different seeds for different threads + Stats stats; + SharedState* shared; + + ThreadState(int index) + : tid(index), + rand(1000 + index) { + } +}; + +} // namespace + +class Benchmark { + private: + Cache* cache_; + const FilterPolicy* filter_policy_; + DB* db_; + int num_; + int value_size_; + int entries_per_batch_; + WriteOptions write_options_; + int reads_; + int heap_counter_; + + void PrintHeader() { + const int kKeySize = 16; + PrintEnvironment(); + fprintf(stdout, "Keys: %d bytes each\n", kKeySize); + fprintf(stdout, "Values: %d bytes each (%d bytes after compression)\n", + FLAGS_value_size, + static_cast(FLAGS_value_size * FLAGS_compression_ratio + 0.5)); + fprintf(stdout, "Entries: %d\n", num_); + fprintf(stdout, "RawSize: %.1f MB (estimated)\n", + ((static_cast(kKeySize + FLAGS_value_size) * num_) + / 1048576.0)); + fprintf(stdout, "FileSize: %.1f MB (estimated)\n", + (((kKeySize + FLAGS_value_size * FLAGS_compression_ratio) * num_) + / 1048576.0)); + PrintWarnings(); + fprintf(stdout, "------------------------------------------------\n"); + } + + void PrintWarnings() { +#if defined(__GNUC__) && !defined(__OPTIMIZE__) + fprintf(stdout, + "WARNING: Optimization is disabled: benchmarks unnecessarily slow\n" + ); +#endif +#ifndef NDEBUG + fprintf(stdout, + "WARNING: Assertions are enabled; benchmarks unnecessarily slow\n"); +#endif + + // See if snappy is working by attempting to compress a compressible string + const char text[] = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"; + std::string compressed; + if (!port::Snappy_Compress(text, sizeof(text), &compressed)) { + fprintf(stdout, "WARNING: Snappy compression is not enabled\n"); + } else if (compressed.size() >= sizeof(text)) { + fprintf(stdout, "WARNING: Snappy compression is not effective\n"); + } + } + + void PrintEnvironment() { + fprintf(stderr, "LevelDB: version %d.%d\n", + kMajorVersion, kMinorVersion); + +#if defined(__linux) + time_t now = time(NULL); + fprintf(stderr, "Date: %s", ctime(&now)); // ctime() adds newline + + FILE* cpuinfo = fopen("/proc/cpuinfo", "r"); + if (cpuinfo != NULL) { + char line[1000]; + int num_cpus = 0; + std::string cpu_type; + std::string cache_size; + while (fgets(line, sizeof(line), cpuinfo) != NULL) { + const char* sep = strchr(line, ':'); + if (sep == NULL) { + continue; + } + Slice key = TrimSpace(Slice(line, sep - 1 - line)); + Slice val = TrimSpace(Slice(sep + 1)); + if (key == "model name") { + ++num_cpus; + cpu_type = val.ToString(); + } else if (key == "cache size") { + cache_size = val.ToString(); + } + } + fclose(cpuinfo); + fprintf(stderr, "CPU: %d * %s\n", num_cpus, cpu_type.c_str()); + fprintf(stderr, "CPUCache: %s\n", cache_size.c_str()); + } +#endif + } + + public: + Benchmark() + : cache_(FLAGS_cache_size >= 0 ? NewLRUCache(FLAGS_cache_size) : NULL), + filter_policy_(FLAGS_bloom_bits >= 0 + ? NewBloomFilterPolicy(FLAGS_bloom_bits) + : NULL), + db_(NULL), + num_(FLAGS_num), + value_size_(FLAGS_value_size), + entries_per_batch_(1), + reads_(FLAGS_reads < 0 ? FLAGS_num : FLAGS_reads), + heap_counter_(0) { + std::vector files; + Env::Default()->GetChildren(FLAGS_db, &files); + for (size_t i = 0; i < files.size(); i++) { + if (Slice(files[i]).starts_with("heap-")) { + Env::Default()->DeleteFile(std::string(FLAGS_db) + "/" + files[i]); + } + } + if (!FLAGS_use_existing_db) { + DestroyDB(FLAGS_db, Options()); + } + } + + ~Benchmark() { + delete db_; + delete cache_; + delete filter_policy_; + } + + void Run() { + PrintHeader(); + Open(); + + const char* benchmarks = FLAGS_benchmarks; + while (benchmarks != NULL) { + const char* sep = strchr(benchmarks, ','); + Slice name; + if (sep == NULL) { + name = benchmarks; + benchmarks = NULL; + } else { + name = Slice(benchmarks, sep - benchmarks); + benchmarks = sep + 1; + } + + // Reset parameters that may be overriddden bwlow + num_ = FLAGS_num; + reads_ = (FLAGS_reads < 0 ? FLAGS_num : FLAGS_reads); + value_size_ = FLAGS_value_size; + entries_per_batch_ = 1; + write_options_ = WriteOptions(); + + void (Benchmark::*method)(ThreadState*) = NULL; + bool fresh_db = false; + int num_threads = FLAGS_threads; + + if (name == Slice("fillseq")) { + fresh_db = true; + method = &Benchmark::WriteSeq; + } else if (name == Slice("fillbatch")) { + fresh_db = true; + entries_per_batch_ = 1000; + method = &Benchmark::WriteSeq; + } else if (name == Slice("fillrandom")) { + fresh_db = true; + method = &Benchmark::WriteRandom; + } else if (name == Slice("overwrite")) { + fresh_db = false; + method = &Benchmark::WriteRandom; + } else if (name == Slice("fillsync")) { + fresh_db = true; + num_ /= 1000; + write_options_.sync = true; + method = &Benchmark::WriteRandom; + } else if (name == Slice("fill100K")) { + fresh_db = true; + num_ /= 1000; + value_size_ = 100 * 1000; + method = &Benchmark::WriteRandom; + } else if (name == Slice("readseq")) { + method = &Benchmark::ReadSequential; + } else if (name == Slice("readreverse")) { + method = &Benchmark::ReadReverse; + } else if (name == Slice("readrandom")) { + method = &Benchmark::ReadRandom; + } else if (name == Slice("readmissing")) { + method = &Benchmark::ReadMissing; + } else if (name == Slice("seekrandom")) { + method = &Benchmark::SeekRandom; + } else if (name == Slice("readhot")) { + method = &Benchmark::ReadHot; + } else if (name == Slice("readrandomsmall")) { + reads_ /= 1000; + method = &Benchmark::ReadRandom; + } else if (name == Slice("deleteseq")) { + method = &Benchmark::DeleteSeq; + } else if (name == Slice("deleterandom")) { + method = &Benchmark::DeleteRandom; + } else if (name == Slice("readwhilewriting")) { + num_threads++; // Add extra thread for writing + method = &Benchmark::ReadWhileWriting; + } else if (name == Slice("compact")) { + method = &Benchmark::Compact; + } else if (name == Slice("crc32c")) { + method = &Benchmark::Crc32c; + } else if (name == Slice("acquireload")) { + method = &Benchmark::AcquireLoad; + } else if (name == Slice("snappycomp")) { + method = &Benchmark::SnappyCompress; + } else if (name == Slice("snappyuncomp")) { + method = &Benchmark::SnappyUncompress; + } else if (name == Slice("heapprofile")) { + HeapProfile(); + } else if (name == Slice("stats")) { + PrintStats("leveldb.stats"); + } else if (name == Slice("sstables")) { + PrintStats("leveldb.sstables"); + } else { + if (name != Slice()) { // No error message for empty name + fprintf(stderr, "unknown benchmark '%s'\n", name.ToString().c_str()); + } + } + + if (fresh_db) { + if (FLAGS_use_existing_db) { + fprintf(stdout, "%-12s : skipped (--use_existing_db is true)\n", + name.ToString().c_str()); + method = NULL; + } else { + delete db_; + db_ = NULL; + DestroyDB(FLAGS_db, Options()); + Open(); + } + } + + if (method != NULL) { + RunBenchmark(num_threads, name, method); + } + } + } + + private: + struct ThreadArg { + Benchmark* bm; + SharedState* shared; + ThreadState* thread; + void (Benchmark::*method)(ThreadState*); + }; + + static void ThreadBody(void* v) { + ThreadArg* arg = reinterpret_cast(v); + SharedState* shared = arg->shared; + ThreadState* thread = arg->thread; + { + MutexLock l(&shared->mu); + shared->num_initialized++; + if (shared->num_initialized >= shared->total) { + shared->cv.SignalAll(); + } + while (!shared->start) { + shared->cv.Wait(); + } + } + + thread->stats.Start(); + (arg->bm->*(arg->method))(thread); + thread->stats.Stop(); + + { + MutexLock l(&shared->mu); + shared->num_done++; + if (shared->num_done >= shared->total) { + shared->cv.SignalAll(); + } + } + } + + void RunBenchmark(int n, Slice name, + void (Benchmark::*method)(ThreadState*)) { + SharedState shared; + shared.total = n; + shared.num_initialized = 0; + shared.num_done = 0; + shared.start = false; + + ThreadArg* arg = new ThreadArg[n]; + for (int i = 0; i < n; i++) { + arg[i].bm = this; + arg[i].method = method; + arg[i].shared = &shared; + arg[i].thread = new ThreadState(i); + arg[i].thread->shared = &shared; + Env::Default()->StartThread(ThreadBody, &arg[i]); + } + + shared.mu.Lock(); + while (shared.num_initialized < n) { + shared.cv.Wait(); + } + + shared.start = true; + shared.cv.SignalAll(); + while (shared.num_done < n) { + shared.cv.Wait(); + } + shared.mu.Unlock(); + + for (int i = 1; i < n; i++) { + arg[0].thread->stats.Merge(arg[i].thread->stats); + } + arg[0].thread->stats.Report(name); + + for (int i = 0; i < n; i++) { + delete arg[i].thread; + } + delete[] arg; + } + + void Crc32c(ThreadState* thread) { + // Checksum about 500MB of data total + const int size = 4096; + const char* label = "(4K per op)"; + std::string data(size, 'x'); + int64_t bytes = 0; + uint32_t crc = 0; + while (bytes < 500 * 1048576) { + crc = crc32c::Value(data.data(), size); + thread->stats.FinishedSingleOp(); + bytes += size; + } + // Print so result is not dead + fprintf(stderr, "... crc=0x%x\r", static_cast(crc)); + + thread->stats.AddBytes(bytes); + thread->stats.AddMessage(label); + } + + void AcquireLoad(ThreadState* thread) { + int dummy; + port::AtomicPointer ap(&dummy); + int count = 0; + void *ptr = NULL; + thread->stats.AddMessage("(each op is 1000 loads)"); + while (count < 100000) { + for (int i = 0; i < 1000; i++) { + ptr = ap.Acquire_Load(); + } + count++; + thread->stats.FinishedSingleOp(); + } + if (ptr == NULL) exit(1); // Disable unused variable warning. + } + + void SnappyCompress(ThreadState* thread) { + RandomGenerator gen; + Slice input = gen.Generate(Options().block_size); + int64_t bytes = 0; + int64_t produced = 0; + bool ok = true; + std::string compressed; + while (ok && bytes < 1024 * 1048576) { // Compress 1G + ok = port::Snappy_Compress(input.data(), input.size(), &compressed); + produced += compressed.size(); + bytes += input.size(); + thread->stats.FinishedSingleOp(); + } + + if (!ok) { + thread->stats.AddMessage("(snappy failure)"); + } else { + char buf[100]; + snprintf(buf, sizeof(buf), "(output: %.1f%%)", + (produced * 100.0) / bytes); + thread->stats.AddMessage(buf); + thread->stats.AddBytes(bytes); + } + } + + void SnappyUncompress(ThreadState* thread) { + RandomGenerator gen; + Slice input = gen.Generate(Options().block_size); + std::string compressed; + bool ok = port::Snappy_Compress(input.data(), input.size(), &compressed); + int64_t bytes = 0; + char* uncompressed = new char[input.size()]; + while (ok && bytes < 1024 * 1048576) { // Compress 1G + ok = port::Snappy_Uncompress(compressed.data(), compressed.size(), + uncompressed); + bytes += input.size(); + thread->stats.FinishedSingleOp(); + } + delete[] uncompressed; + + if (!ok) { + thread->stats.AddMessage("(snappy failure)"); + } else { + thread->stats.AddBytes(bytes); + } + } + + void Open() { + assert(db_ == NULL); + Options options; + options.create_if_missing = !FLAGS_use_existing_db; + options.block_cache = cache_; + options.write_buffer_size = FLAGS_write_buffer_size; + options.max_open_files = FLAGS_open_files; + options.filter_policy = filter_policy_; + Status s = DB::Open(options, FLAGS_db, &db_); + if (!s.ok()) { + fprintf(stderr, "open error: %s\n", s.ToString().c_str()); + exit(1); + } + } + + void WriteSeq(ThreadState* thread) { + DoWrite(thread, true); + } + + void WriteRandom(ThreadState* thread) { + DoWrite(thread, false); + } + + void DoWrite(ThreadState* thread, bool seq) { + if (num_ != FLAGS_num) { + char msg[100]; + snprintf(msg, sizeof(msg), "(%d ops)", num_); + thread->stats.AddMessage(msg); + } + + RandomGenerator gen; + WriteBatch batch; + Status s; + int64_t bytes = 0; + for (int i = 0; i < num_; i += entries_per_batch_) { + batch.Clear(); + for (int j = 0; j < entries_per_batch_; j++) { + const int k = seq ? i+j : (thread->rand.Next() % FLAGS_num); + char key[100]; + snprintf(key, sizeof(key), "%016d", k); + batch.Put(key, gen.Generate(value_size_)); + bytes += value_size_ + strlen(key); + thread->stats.FinishedSingleOp(); + } + s = db_->Write(write_options_, &batch); + if (!s.ok()) { + fprintf(stderr, "put error: %s\n", s.ToString().c_str()); + exit(1); + } + } + thread->stats.AddBytes(bytes); + } + + void ReadSequential(ThreadState* thread) { + Iterator* iter = db_->NewIterator(ReadOptions()); + int i = 0; + int64_t bytes = 0; + for (iter->SeekToFirst(); i < reads_ && iter->Valid(); iter->Next()) { + bytes += iter->key().size() + iter->value().size(); + thread->stats.FinishedSingleOp(); + ++i; + } + delete iter; + thread->stats.AddBytes(bytes); + } + + void ReadReverse(ThreadState* thread) { + Iterator* iter = db_->NewIterator(ReadOptions()); + int i = 0; + int64_t bytes = 0; + for (iter->SeekToLast(); i < reads_ && iter->Valid(); iter->Prev()) { + bytes += iter->key().size() + iter->value().size(); + thread->stats.FinishedSingleOp(); + ++i; + } + delete iter; + thread->stats.AddBytes(bytes); + } + + void ReadRandom(ThreadState* thread) { + ReadOptions options; + std::string value; + int found = 0; + for (int i = 0; i < reads_; i++) { + char key[100]; + const int k = thread->rand.Next() % FLAGS_num; + snprintf(key, sizeof(key), "%016d", k); + if (db_->Get(options, key, &value).ok()) { + found++; + } + thread->stats.FinishedSingleOp(); + } + char msg[100]; + snprintf(msg, sizeof(msg), "(%d of %d found)", found, num_); + thread->stats.AddMessage(msg); + } + + void ReadMissing(ThreadState* thread) { + ReadOptions options; + std::string value; + for (int i = 0; i < reads_; i++) { + char key[100]; + const int k = thread->rand.Next() % FLAGS_num; + snprintf(key, sizeof(key), "%016d.", k); + db_->Get(options, key, &value); + thread->stats.FinishedSingleOp(); + } + } + + void ReadHot(ThreadState* thread) { + ReadOptions options; + std::string value; + const int range = (FLAGS_num + 99) / 100; + for (int i = 0; i < reads_; i++) { + char key[100]; + const int k = thread->rand.Next() % range; + snprintf(key, sizeof(key), "%016d", k); + db_->Get(options, key, &value); + thread->stats.FinishedSingleOp(); + } + } + + void SeekRandom(ThreadState* thread) { + ReadOptions options; + std::string value; + int found = 0; + for (int i = 0; i < reads_; i++) { + Iterator* iter = db_->NewIterator(options); + char key[100]; + const int k = thread->rand.Next() % FLAGS_num; + snprintf(key, sizeof(key), "%016d", k); + iter->Seek(key); + if (iter->Valid() && iter->key() == key) found++; + delete iter; + thread->stats.FinishedSingleOp(); + } + char msg[100]; + snprintf(msg, sizeof(msg), "(%d of %d found)", found, num_); + thread->stats.AddMessage(msg); + } + + void DoDelete(ThreadState* thread, bool seq) { + RandomGenerator gen; + WriteBatch batch; + Status s; + for (int i = 0; i < num_; i += entries_per_batch_) { + batch.Clear(); + for (int j = 0; j < entries_per_batch_; j++) { + const int k = seq ? i+j : (thread->rand.Next() % FLAGS_num); + char key[100]; + snprintf(key, sizeof(key), "%016d", k); + batch.Delete(key); + thread->stats.FinishedSingleOp(); + } + s = db_->Write(write_options_, &batch); + if (!s.ok()) { + fprintf(stderr, "del error: %s\n", s.ToString().c_str()); + exit(1); + } + } + } + + void DeleteSeq(ThreadState* thread) { + DoDelete(thread, true); + } + + void DeleteRandom(ThreadState* thread) { + DoDelete(thread, false); + } + + void ReadWhileWriting(ThreadState* thread) { + if (thread->tid > 0) { + ReadRandom(thread); + } else { + // Special thread that keeps writing until other threads are done. + RandomGenerator gen; + while (true) { + { + MutexLock l(&thread->shared->mu); + if (thread->shared->num_done + 1 >= thread->shared->num_initialized) { + // Other threads have finished + break; + } + } + + const int k = thread->rand.Next() % FLAGS_num; + char key[100]; + snprintf(key, sizeof(key), "%016d", k); + Status s = db_->Put(write_options_, key, gen.Generate(value_size_)); + if (!s.ok()) { + fprintf(stderr, "put error: %s\n", s.ToString().c_str()); + exit(1); + } + } + + // Do not count any of the preceding work/delay in stats. + thread->stats.Start(); + } + } + + void Compact(ThreadState* thread) { + db_->CompactRange(NULL, NULL); + } + + void PrintStats(const char* key) { + std::string stats; + if (!db_->GetProperty(key, &stats)) { + stats = "(failed)"; + } + fprintf(stdout, "\n%s\n", stats.c_str()); + } + + static void WriteToFile(void* arg, const char* buf, int n) { + reinterpret_cast(arg)->Append(Slice(buf, n)); + } + + void HeapProfile() { + char fname[100]; + snprintf(fname, sizeof(fname), "%s/heap-%04d", FLAGS_db, ++heap_counter_); + WritableFile* file; + Status s = Env::Default()->NewWritableFile(fname, &file); + if (!s.ok()) { + fprintf(stderr, "%s\n", s.ToString().c_str()); + return; + } + bool ok = port::GetHeapProfile(WriteToFile, file); + delete file; + if (!ok) { + fprintf(stderr, "heap profiling not supported\n"); + Env::Default()->DeleteFile(fname); + } + } +}; + +} // namespace leveldb + +int main(int argc, char** argv) { + FLAGS_write_buffer_size = leveldb::Options().write_buffer_size; + FLAGS_open_files = leveldb::Options().max_open_files; + std::string default_db_path; + + for (int i = 1; i < argc; i++) { + double d; + int n; + char junk; + if (leveldb::Slice(argv[i]).starts_with("--benchmarks=")) { + FLAGS_benchmarks = argv[i] + strlen("--benchmarks="); + } else if (sscanf(argv[i], "--compression_ratio=%lf%c", &d, &junk) == 1) { + FLAGS_compression_ratio = d; + } else if (sscanf(argv[i], "--histogram=%d%c", &n, &junk) == 1 && + (n == 0 || n == 1)) { + FLAGS_histogram = n; + } else if (sscanf(argv[i], "--use_existing_db=%d%c", &n, &junk) == 1 && + (n == 0 || n == 1)) { + FLAGS_use_existing_db = n; + } else if (sscanf(argv[i], "--num=%d%c", &n, &junk) == 1) { + FLAGS_num = n; + } else if (sscanf(argv[i], "--reads=%d%c", &n, &junk) == 1) { + FLAGS_reads = n; + } else if (sscanf(argv[i], "--threads=%d%c", &n, &junk) == 1) { + FLAGS_threads = n; + } else if (sscanf(argv[i], "--value_size=%d%c", &n, &junk) == 1) { + FLAGS_value_size = n; + } else if (sscanf(argv[i], "--write_buffer_size=%d%c", &n, &junk) == 1) { + FLAGS_write_buffer_size = n; + } else if (sscanf(argv[i], "--cache_size=%d%c", &n, &junk) == 1) { + FLAGS_cache_size = n; + } else if (sscanf(argv[i], "--bloom_bits=%d%c", &n, &junk) == 1) { + FLAGS_bloom_bits = n; + } else if (sscanf(argv[i], "--open_files=%d%c", &n, &junk) == 1) { + FLAGS_open_files = n; + } else if (strncmp(argv[i], "--db=", 5) == 0) { + FLAGS_db = argv[i] + 5; + } else { + fprintf(stderr, "Invalid flag '%s'\n", argv[i]); + exit(1); + } + } + + // Choose a location for the test database if none given with --db= + if (FLAGS_db == NULL) { + leveldb::Env::Default()->GetTestDirectory(&default_db_path); + default_db_path += "/dbbench"; + FLAGS_db = default_db_path.c_str(); + } + + leveldb::Benchmark benchmark; + benchmark.Run(); + return 0; +} diff --git a/src/leveldb/db/db_impl.cc b/src/leveldb/db/db_impl.cc new file mode 100644 index 0000000..faf5e7d --- /dev/null +++ b/src/leveldb/db/db_impl.cc @@ -0,0 +1,1513 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/db_impl.h" + +#include +#include +#include +#include +#include +#include +#include "db/builder.h" +#include "db/db_iter.h" +#include "db/dbformat.h" +#include "db/filename.h" +#include "db/log_reader.h" +#include "db/log_writer.h" +#include "db/memtable.h" +#include "db/table_cache.h" +#include "db/version_set.h" +#include "db/write_batch_internal.h" +#include "leveldb/db.h" +#include "leveldb/env.h" +#include "leveldb/status.h" +#include "leveldb/table.h" +#include "leveldb/table_builder.h" +#include "port/port.h" +#include "table/block.h" +#include "table/merger.h" +#include "table/two_level_iterator.h" +#include "util/coding.h" +#include "util/logging.h" +#include "util/mutexlock.h" + +namespace leveldb { + +const int kNumNonTableCacheFiles = 10; + +// Information kept for every waiting writer +struct DBImpl::Writer { + Status status; + WriteBatch* batch; + bool sync; + bool done; + port::CondVar cv; + + explicit Writer(port::Mutex* mu) : cv(mu) { } +}; + +struct DBImpl::CompactionState { + Compaction* const compaction; + + // Sequence numbers < smallest_snapshot are not significant since we + // will never have to service a snapshot below smallest_snapshot. + // Therefore if we have seen a sequence number S <= smallest_snapshot, + // we can drop all entries for the same key with sequence numbers < S. + SequenceNumber smallest_snapshot; + + // Files produced by compaction + struct Output { + uint64_t number; + uint64_t file_size; + InternalKey smallest, largest; + }; + std::vector outputs; + + // State kept for output being generated + WritableFile* outfile; + TableBuilder* builder; + + uint64_t total_bytes; + + Output* current_output() { return &outputs[outputs.size()-1]; } + + explicit CompactionState(Compaction* c) + : compaction(c), + outfile(NULL), + builder(NULL), + total_bytes(0) { + } +}; + +// Fix user-supplied options to be reasonable +template +static void ClipToRange(T* ptr, V minvalue, V maxvalue) { + if (static_cast(*ptr) > maxvalue) *ptr = maxvalue; + if (static_cast(*ptr) < minvalue) *ptr = minvalue; +} +Options SanitizeOptions(const std::string& dbname, + const InternalKeyComparator* icmp, + const InternalFilterPolicy* ipolicy, + const Options& src) { + Options result = src; + result.comparator = icmp; + result.filter_policy = (src.filter_policy != NULL) ? ipolicy : NULL; + ClipToRange(&result.max_open_files, 64 + kNumNonTableCacheFiles, 50000); + ClipToRange(&result.write_buffer_size, 64<<10, 1<<30); + ClipToRange(&result.block_size, 1<<10, 4<<20); + if (result.info_log == NULL) { + // Open a log file in the same directory as the db + src.env->CreateDir(dbname); // In case it does not exist + src.env->RenameFile(InfoLogFileName(dbname), OldInfoLogFileName(dbname)); + Status s = src.env->NewLogger(InfoLogFileName(dbname), &result.info_log); + if (!s.ok()) { + // No place suitable for logging + result.info_log = NULL; + } + } + if (result.block_cache == NULL) { + result.block_cache = NewLRUCache(8 << 20); + } + return result; +} + +DBImpl::DBImpl(const Options& raw_options, const std::string& dbname) + : env_(raw_options.env), + internal_comparator_(raw_options.comparator), + internal_filter_policy_(raw_options.filter_policy), + options_(SanitizeOptions(dbname, &internal_comparator_, + &internal_filter_policy_, raw_options)), + owns_info_log_(options_.info_log != raw_options.info_log), + owns_cache_(options_.block_cache != raw_options.block_cache), + dbname_(dbname), + db_lock_(NULL), + shutting_down_(NULL), + bg_cv_(&mutex_), + mem_(new MemTable(internal_comparator_)), + imm_(NULL), + logfile_(NULL), + logfile_number_(0), + log_(NULL), + seed_(0), + tmp_batch_(new WriteBatch), + bg_compaction_scheduled_(false), + manual_compaction_(NULL) { + mem_->Ref(); + has_imm_.Release_Store(NULL); + + // Reserve ten files or so for other uses and give the rest to TableCache. + const int table_cache_size = options_.max_open_files - kNumNonTableCacheFiles; + table_cache_ = new TableCache(dbname_, &options_, table_cache_size); + + versions_ = new VersionSet(dbname_, &options_, table_cache_, + &internal_comparator_); +} + +DBImpl::~DBImpl() { + // Wait for background work to finish + mutex_.Lock(); + shutting_down_.Release_Store(this); // Any non-NULL value is ok + while (bg_compaction_scheduled_) { + bg_cv_.Wait(); + } + mutex_.Unlock(); + + if (db_lock_ != NULL) { + env_->UnlockFile(db_lock_); + } + + delete versions_; + if (mem_ != NULL) mem_->Unref(); + if (imm_ != NULL) imm_->Unref(); + delete tmp_batch_; + delete log_; + delete logfile_; + delete table_cache_; + + if (owns_info_log_) { + delete options_.info_log; + } + if (owns_cache_) { + delete options_.block_cache; + } +} + +Status DBImpl::NewDB() { + VersionEdit new_db; + new_db.SetComparatorName(user_comparator()->Name()); + new_db.SetLogNumber(0); + new_db.SetNextFile(2); + new_db.SetLastSequence(0); + + const std::string manifest = DescriptorFileName(dbname_, 1); + WritableFile* file; + Status s = env_->NewWritableFile(manifest, &file); + if (!s.ok()) { + return s; + } + { + log::Writer log(file); + std::string record; + new_db.EncodeTo(&record); + s = log.AddRecord(record); + if (s.ok()) { + s = file->Close(); + } + } + delete file; + if (s.ok()) { + // Make "CURRENT" file that points to the new manifest file. + s = SetCurrentFile(env_, dbname_, 1); + } else { + env_->DeleteFile(manifest); + } + return s; +} + +void DBImpl::MaybeIgnoreError(Status* s) const { + if (s->ok() || options_.paranoid_checks) { + // No change needed + } else { + Log(options_.info_log, "Ignoring error %s", s->ToString().c_str()); + *s = Status::OK(); + } +} + +void DBImpl::DeleteObsoleteFiles() { + if (!bg_error_.ok()) { + // After a background error, we don't know whether a new version may + // or may not have been committed, so we cannot safely garbage collect. + return; + } + + // Make a set of all of the live files + std::set live = pending_outputs_; + versions_->AddLiveFiles(&live); + + std::vector filenames; + env_->GetChildren(dbname_, &filenames); // Ignoring errors on purpose + uint64_t number; + FileType type; + for (size_t i = 0; i < filenames.size(); i++) { + if (ParseFileName(filenames[i], &number, &type)) { + bool keep = true; + switch (type) { + case kLogFile: + keep = ((number >= versions_->LogNumber()) || + (number == versions_->PrevLogNumber())); + break; + case kDescriptorFile: + // Keep my manifest file, and any newer incarnations' + // (in case there is a race that allows other incarnations) + keep = (number >= versions_->ManifestFileNumber()); + break; + case kTableFile: + keep = (live.find(number) != live.end()); + break; + case kTempFile: + // Any temp files that are currently being written to must + // be recorded in pending_outputs_, which is inserted into "live" + keep = (live.find(number) != live.end()); + break; + case kCurrentFile: + case kDBLockFile: + case kInfoLogFile: + keep = true; + break; + } + + if (!keep) { + if (type == kTableFile) { + table_cache_->Evict(number); + } + Log(options_.info_log, "Delete type=%d #%lld\n", + int(type), + static_cast(number)); + env_->DeleteFile(dbname_ + "/" + filenames[i]); + } + } + } +} + +Status DBImpl::Recover(VersionEdit* edit) { + mutex_.AssertHeld(); + + // Ignore error from CreateDir since the creation of the DB is + // committed only when the descriptor is created, and this directory + // may already exist from a previous failed creation attempt. + env_->CreateDir(dbname_); + assert(db_lock_ == NULL); + Status s = env_->LockFile(LockFileName(dbname_), &db_lock_); + if (!s.ok()) { + return s; + } + + if (!env_->FileExists(CurrentFileName(dbname_))) { + if (options_.create_if_missing) { + s = NewDB(); + if (!s.ok()) { + return s; + } + } else { + return Status::InvalidArgument( + dbname_, "does not exist (create_if_missing is false)"); + } + } else { + if (options_.error_if_exists) { + return Status::InvalidArgument( + dbname_, "exists (error_if_exists is true)"); + } + } + + s = versions_->Recover(); + if (s.ok()) { + SequenceNumber max_sequence(0); + + // Recover from all newer log files than the ones named in the + // descriptor (new log files may have been added by the previous + // incarnation without registering them in the descriptor). + // + // Note that PrevLogNumber() is no longer used, but we pay + // attention to it in case we are recovering a database + // produced by an older version of leveldb. + const uint64_t min_log = versions_->LogNumber(); + const uint64_t prev_log = versions_->PrevLogNumber(); + std::vector filenames; + s = env_->GetChildren(dbname_, &filenames); + if (!s.ok()) { + return s; + } + std::set expected; + versions_->AddLiveFiles(&expected); + uint64_t number; + FileType type; + std::vector logs; + for (size_t i = 0; i < filenames.size(); i++) { + if (ParseFileName(filenames[i], &number, &type)) { + expected.erase(number); + if (type == kLogFile && ((number >= min_log) || (number == prev_log))) + logs.push_back(number); + } + } + if (!expected.empty()) { + char buf[50]; + snprintf(buf, sizeof(buf), "%d missing files; e.g.", + static_cast(expected.size())); + return Status::Corruption(buf, TableFileName(dbname_, *(expected.begin()))); + } + + // Recover in the order in which the logs were generated + std::sort(logs.begin(), logs.end()); + for (size_t i = 0; i < logs.size(); i++) { + s = RecoverLogFile(logs[i], edit, &max_sequence); + + // The previous incarnation may not have written any MANIFEST + // records after allocating this log number. So we manually + // update the file number allocation counter in VersionSet. + versions_->MarkFileNumberUsed(logs[i]); + } + + if (s.ok()) { + if (versions_->LastSequence() < max_sequence) { + versions_->SetLastSequence(max_sequence); + } + } + } + + return s; +} + +Status DBImpl::RecoverLogFile(uint64_t log_number, + VersionEdit* edit, + SequenceNumber* max_sequence) { + struct LogReporter : public log::Reader::Reporter { + Env* env; + Logger* info_log; + const char* fname; + Status* status; // NULL if options_.paranoid_checks==false + virtual void Corruption(size_t bytes, const Status& s) { + Log(info_log, "%s%s: dropping %d bytes; %s", + (this->status == NULL ? "(ignoring error) " : ""), + fname, static_cast(bytes), s.ToString().c_str()); + if (this->status != NULL && this->status->ok()) *this->status = s; + } + }; + + mutex_.AssertHeld(); + + // Open the log file + std::string fname = LogFileName(dbname_, log_number); + SequentialFile* file; + Status status = env_->NewSequentialFile(fname, &file); + if (!status.ok()) { + MaybeIgnoreError(&status); + return status; + } + + // Create the log reader. + LogReporter reporter; + reporter.env = env_; + reporter.info_log = options_.info_log; + reporter.fname = fname.c_str(); + reporter.status = (options_.paranoid_checks ? &status : NULL); + // We intentially make log::Reader do checksumming even if + // paranoid_checks==false so that corruptions cause entire commits + // to be skipped instead of propagating bad information (like overly + // large sequence numbers). + log::Reader reader(file, &reporter, true/*checksum*/, + 0/*initial_offset*/); + Log(options_.info_log, "Recovering log #%llu", + (unsigned long long) log_number); + + // Read all the records and add to a memtable + std::string scratch; + Slice record; + WriteBatch batch; + MemTable* mem = NULL; + while (reader.ReadRecord(&record, &scratch) && + status.ok()) { + if (record.size() < 12) { + reporter.Corruption( + record.size(), Status::Corruption("log record too small")); + continue; + } + WriteBatchInternal::SetContents(&batch, record); + + if (mem == NULL) { + mem = new MemTable(internal_comparator_); + mem->Ref(); + } + status = WriteBatchInternal::InsertInto(&batch, mem); + MaybeIgnoreError(&status); + if (!status.ok()) { + break; + } + const SequenceNumber last_seq = + WriteBatchInternal::Sequence(&batch) + + WriteBatchInternal::Count(&batch) - 1; + if (last_seq > *max_sequence) { + *max_sequence = last_seq; + } + + if (mem->ApproximateMemoryUsage() > options_.write_buffer_size) { + status = WriteLevel0Table(mem, edit, NULL); + if (!status.ok()) { + // Reflect errors immediately so that conditions like full + // file-systems cause the DB::Open() to fail. + break; + } + mem->Unref(); + mem = NULL; + } + } + + if (status.ok() && mem != NULL) { + status = WriteLevel0Table(mem, edit, NULL); + // Reflect errors immediately so that conditions like full + // file-systems cause the DB::Open() to fail. + } + + if (mem != NULL) mem->Unref(); + delete file; + return status; +} + +Status DBImpl::WriteLevel0Table(MemTable* mem, VersionEdit* edit, + Version* base) { + mutex_.AssertHeld(); + const uint64_t start_micros = env_->NowMicros(); + FileMetaData meta; + meta.number = versions_->NewFileNumber(); + pending_outputs_.insert(meta.number); + Iterator* iter = mem->NewIterator(); + Log(options_.info_log, "Level-0 table #%llu: started", + (unsigned long long) meta.number); + + Status s; + { + mutex_.Unlock(); + s = BuildTable(dbname_, env_, options_, table_cache_, iter, &meta); + mutex_.Lock(); + } + + Log(options_.info_log, "Level-0 table #%llu: %lld bytes %s", + (unsigned long long) meta.number, + (unsigned long long) meta.file_size, + s.ToString().c_str()); + delete iter; + pending_outputs_.erase(meta.number); + + + // Note that if file_size is zero, the file has been deleted and + // should not be added to the manifest. + int level = 0; + if (s.ok() && meta.file_size > 0) { + const Slice min_user_key = meta.smallest.user_key(); + const Slice max_user_key = meta.largest.user_key(); + if (base != NULL) { + level = base->PickLevelForMemTableOutput(min_user_key, max_user_key); + } + edit->AddFile(level, meta.number, meta.file_size, + meta.smallest, meta.largest); + } + + CompactionStats stats; + stats.micros = env_->NowMicros() - start_micros; + stats.bytes_written = meta.file_size; + stats_[level].Add(stats); + return s; +} + +void DBImpl::CompactMemTable() { + mutex_.AssertHeld(); + assert(imm_ != NULL); + + // Save the contents of the memtable as a new Table + VersionEdit edit; + Version* base = versions_->current(); + base->Ref(); + Status s = WriteLevel0Table(imm_, &edit, base); + base->Unref(); + + if (s.ok() && shutting_down_.Acquire_Load()) { + s = Status::IOError("Deleting DB during memtable compaction"); + } + + // Replace immutable memtable with the generated Table + if (s.ok()) { + edit.SetPrevLogNumber(0); + edit.SetLogNumber(logfile_number_); // Earlier logs no longer needed + s = versions_->LogAndApply(&edit, &mutex_); + } + + if (s.ok()) { + // Commit to the new state + imm_->Unref(); + imm_ = NULL; + has_imm_.Release_Store(NULL); + DeleteObsoleteFiles(); + } else { + RecordBackgroundError(s); + } +} + +void DBImpl::CompactRange(const Slice* begin, const Slice* end) { + int max_level_with_files = 1; + { + MutexLock l(&mutex_); + Version* base = versions_->current(); + for (int level = 1; level < config::kNumLevels; level++) { + if (base->OverlapInLevel(level, begin, end)) { + max_level_with_files = level; + } + } + } + TEST_CompactMemTable(); // TODO(sanjay): Skip if memtable does not overlap + for (int level = 0; level < max_level_with_files; level++) { + TEST_CompactRange(level, begin, end); + } +} + +void DBImpl::TEST_CompactRange(int level, const Slice* begin,const Slice* end) { + assert(level >= 0); + assert(level + 1 < config::kNumLevels); + + InternalKey begin_storage, end_storage; + + ManualCompaction manual; + manual.level = level; + manual.done = false; + if (begin == NULL) { + manual.begin = NULL; + } else { + begin_storage = InternalKey(*begin, kMaxSequenceNumber, kValueTypeForSeek); + manual.begin = &begin_storage; + } + if (end == NULL) { + manual.end = NULL; + } else { + end_storage = InternalKey(*end, 0, static_cast(0)); + manual.end = &end_storage; + } + + MutexLock l(&mutex_); + while (!manual.done && !shutting_down_.Acquire_Load() && bg_error_.ok()) { + if (manual_compaction_ == NULL) { // Idle + manual_compaction_ = &manual; + MaybeScheduleCompaction(); + } else { // Running either my compaction or another compaction. + bg_cv_.Wait(); + } + } + if (manual_compaction_ == &manual) { + // Cancel my manual compaction since we aborted early for some reason. + manual_compaction_ = NULL; + } +} + +Status DBImpl::TEST_CompactMemTable() { + // NULL batch means just wait for earlier writes to be done + Status s = Write(WriteOptions(), NULL); + if (s.ok()) { + // Wait until the compaction completes + MutexLock l(&mutex_); + while (imm_ != NULL && bg_error_.ok()) { + bg_cv_.Wait(); + } + if (imm_ != NULL) { + s = bg_error_; + } + } + return s; +} + +void DBImpl::RecordBackgroundError(const Status& s) { + mutex_.AssertHeld(); + if (bg_error_.ok()) { + bg_error_ = s; + bg_cv_.SignalAll(); + } +} + +void DBImpl::MaybeScheduleCompaction() { + mutex_.AssertHeld(); + if (bg_compaction_scheduled_) { + // Already scheduled + } else if (shutting_down_.Acquire_Load()) { + // DB is being deleted; no more background compactions + } else if (!bg_error_.ok()) { + // Already got an error; no more changes + } else if (imm_ == NULL && + manual_compaction_ == NULL && + !versions_->NeedsCompaction()) { + // No work to be done + } else { + bg_compaction_scheduled_ = true; + env_->Schedule(&DBImpl::BGWork, this); + } +} + +void DBImpl::BGWork(void* db) { + reinterpret_cast(db)->BackgroundCall(); +} + +void DBImpl::BackgroundCall() { + MutexLock l(&mutex_); + assert(bg_compaction_scheduled_); + if (shutting_down_.Acquire_Load()) { + // No more background work when shutting down. + } else if (!bg_error_.ok()) { + // No more background work after a background error. + } else { + BackgroundCompaction(); + } + + bg_compaction_scheduled_ = false; + + // Previous compaction may have produced too many files in a level, + // so reschedule another compaction if needed. + MaybeScheduleCompaction(); + bg_cv_.SignalAll(); +} + +void DBImpl::BackgroundCompaction() { + mutex_.AssertHeld(); + + if (imm_ != NULL) { + CompactMemTable(); + return; + } + + Compaction* c; + bool is_manual = (manual_compaction_ != NULL); + InternalKey manual_end; + if (is_manual) { + ManualCompaction* m = manual_compaction_; + c = versions_->CompactRange(m->level, m->begin, m->end); + m->done = (c == NULL); + if (c != NULL) { + manual_end = c->input(0, c->num_input_files(0) - 1)->largest; + } + Log(options_.info_log, + "Manual compaction at level-%d from %s .. %s; will stop at %s\n", + m->level, + (m->begin ? m->begin->DebugString().c_str() : "(begin)"), + (m->end ? m->end->DebugString().c_str() : "(end)"), + (m->done ? "(end)" : manual_end.DebugString().c_str())); + } else { + c = versions_->PickCompaction(); + } + + Status status; + if (c == NULL) { + // Nothing to do + } else if (!is_manual && c->IsTrivialMove()) { + // Move file to next level + assert(c->num_input_files(0) == 1); + FileMetaData* f = c->input(0, 0); + c->edit()->DeleteFile(c->level(), f->number); + c->edit()->AddFile(c->level() + 1, f->number, f->file_size, + f->smallest, f->largest); + status = versions_->LogAndApply(c->edit(), &mutex_); + if (!status.ok()) { + RecordBackgroundError(status); + } + VersionSet::LevelSummaryStorage tmp; + Log(options_.info_log, "Moved #%lld to level-%d %lld bytes %s: %s\n", + static_cast(f->number), + c->level() + 1, + static_cast(f->file_size), + status.ToString().c_str(), + versions_->LevelSummary(&tmp)); + } else { + CompactionState* compact = new CompactionState(c); + status = DoCompactionWork(compact); + if (!status.ok()) { + RecordBackgroundError(status); + } + CleanupCompaction(compact); + c->ReleaseInputs(); + DeleteObsoleteFiles(); + } + delete c; + + if (status.ok()) { + // Done + } else if (shutting_down_.Acquire_Load()) { + // Ignore compaction errors found during shutting down + } else { + Log(options_.info_log, + "Compaction error: %s", status.ToString().c_str()); + } + + if (is_manual) { + ManualCompaction* m = manual_compaction_; + if (!status.ok()) { + m->done = true; + } + if (!m->done) { + // We only compacted part of the requested range. Update *m + // to the range that is left to be compacted. + m->tmp_storage = manual_end; + m->begin = &m->tmp_storage; + } + manual_compaction_ = NULL; + } +} + +void DBImpl::CleanupCompaction(CompactionState* compact) { + mutex_.AssertHeld(); + if (compact->builder != NULL) { + // May happen if we get a shutdown call in the middle of compaction + compact->builder->Abandon(); + delete compact->builder; + } else { + assert(compact->outfile == NULL); + } + delete compact->outfile; + for (size_t i = 0; i < compact->outputs.size(); i++) { + const CompactionState::Output& out = compact->outputs[i]; + pending_outputs_.erase(out.number); + } + delete compact; +} + +Status DBImpl::OpenCompactionOutputFile(CompactionState* compact) { + assert(compact != NULL); + assert(compact->builder == NULL); + uint64_t file_number; + { + mutex_.Lock(); + file_number = versions_->NewFileNumber(); + pending_outputs_.insert(file_number); + CompactionState::Output out; + out.number = file_number; + out.smallest.Clear(); + out.largest.Clear(); + compact->outputs.push_back(out); + mutex_.Unlock(); + } + + // Make the output file + std::string fname = TableFileName(dbname_, file_number); + Status s = env_->NewWritableFile(fname, &compact->outfile); + if (s.ok()) { + compact->builder = new TableBuilder(options_, compact->outfile); + } + return s; +} + +Status DBImpl::FinishCompactionOutputFile(CompactionState* compact, + Iterator* input) { + assert(compact != NULL); + assert(compact->outfile != NULL); + assert(compact->builder != NULL); + + const uint64_t output_number = compact->current_output()->number; + assert(output_number != 0); + + // Check for iterator errors + Status s = input->status(); + const uint64_t current_entries = compact->builder->NumEntries(); + if (s.ok()) { + s = compact->builder->Finish(); + } else { + compact->builder->Abandon(); + } + const uint64_t current_bytes = compact->builder->FileSize(); + compact->current_output()->file_size = current_bytes; + compact->total_bytes += current_bytes; + delete compact->builder; + compact->builder = NULL; + + // Finish and check for file errors + if (s.ok()) { + s = compact->outfile->Sync(); + } + if (s.ok()) { + s = compact->outfile->Close(); + } + delete compact->outfile; + compact->outfile = NULL; + + if (s.ok() && current_entries > 0) { + // Verify that the table is usable + Iterator* iter = table_cache_->NewIterator(ReadOptions(), + output_number, + current_bytes); + s = iter->status(); + delete iter; + if (s.ok()) { + Log(options_.info_log, + "Generated table #%llu: %lld keys, %lld bytes", + (unsigned long long) output_number, + (unsigned long long) current_entries, + (unsigned long long) current_bytes); + } + } + return s; +} + + +Status DBImpl::InstallCompactionResults(CompactionState* compact) { + mutex_.AssertHeld(); + Log(options_.info_log, "Compacted %d@%d + %d@%d files => %lld bytes", + compact->compaction->num_input_files(0), + compact->compaction->level(), + compact->compaction->num_input_files(1), + compact->compaction->level() + 1, + static_cast(compact->total_bytes)); + + // Add compaction outputs + compact->compaction->AddInputDeletions(compact->compaction->edit()); + const int level = compact->compaction->level(); + for (size_t i = 0; i < compact->outputs.size(); i++) { + const CompactionState::Output& out = compact->outputs[i]; + compact->compaction->edit()->AddFile( + level + 1, + out.number, out.file_size, out.smallest, out.largest); + } + return versions_->LogAndApply(compact->compaction->edit(), &mutex_); +} + +Status DBImpl::DoCompactionWork(CompactionState* compact) { + const uint64_t start_micros = env_->NowMicros(); + int64_t imm_micros = 0; // Micros spent doing imm_ compactions + + Log(options_.info_log, "Compacting %d@%d + %d@%d files", + compact->compaction->num_input_files(0), + compact->compaction->level(), + compact->compaction->num_input_files(1), + compact->compaction->level() + 1); + + assert(versions_->NumLevelFiles(compact->compaction->level()) > 0); + assert(compact->builder == NULL); + assert(compact->outfile == NULL); + if (snapshots_.empty()) { + compact->smallest_snapshot = versions_->LastSequence(); + } else { + compact->smallest_snapshot = snapshots_.oldest()->number_; + } + + // Release mutex while we're actually doing the compaction work + mutex_.Unlock(); + + Iterator* input = versions_->MakeInputIterator(compact->compaction); + input->SeekToFirst(); + Status status; + ParsedInternalKey ikey; + std::string current_user_key; + bool has_current_user_key = false; + SequenceNumber last_sequence_for_key = kMaxSequenceNumber; + for (; input->Valid() && !shutting_down_.Acquire_Load(); ) { + // Prioritize immutable compaction work + if (has_imm_.NoBarrier_Load() != NULL) { + const uint64_t imm_start = env_->NowMicros(); + mutex_.Lock(); + if (imm_ != NULL) { + CompactMemTable(); + bg_cv_.SignalAll(); // Wakeup MakeRoomForWrite() if necessary + } + mutex_.Unlock(); + imm_micros += (env_->NowMicros() - imm_start); + } + + Slice key = input->key(); + if (compact->compaction->ShouldStopBefore(key) && + compact->builder != NULL) { + status = FinishCompactionOutputFile(compact, input); + if (!status.ok()) { + break; + } + } + + // Handle key/value, add to state, etc. + bool drop = false; + if (!ParseInternalKey(key, &ikey)) { + // Do not hide error keys + current_user_key.clear(); + has_current_user_key = false; + last_sequence_for_key = kMaxSequenceNumber; + } else { + if (!has_current_user_key || + user_comparator()->Compare(ikey.user_key, + Slice(current_user_key)) != 0) { + // First occurrence of this user key + current_user_key.assign(ikey.user_key.data(), ikey.user_key.size()); + has_current_user_key = true; + last_sequence_for_key = kMaxSequenceNumber; + } + + if (last_sequence_for_key <= compact->smallest_snapshot) { + // Hidden by an newer entry for same user key + drop = true; // (A) + } else if (ikey.type == kTypeDeletion && + ikey.sequence <= compact->smallest_snapshot && + compact->compaction->IsBaseLevelForKey(ikey.user_key)) { + // For this user key: + // (1) there is no data in higher levels + // (2) data in lower levels will have larger sequence numbers + // (3) data in layers that are being compacted here and have + // smaller sequence numbers will be dropped in the next + // few iterations of this loop (by rule (A) above). + // Therefore this deletion marker is obsolete and can be dropped. + drop = true; + } + + last_sequence_for_key = ikey.sequence; + } +#if 0 + Log(options_.info_log, + " Compact: %s, seq %d, type: %d %d, drop: %d, is_base: %d, " + "%d smallest_snapshot: %d", + ikey.user_key.ToString().c_str(), + (int)ikey.sequence, ikey.type, kTypeValue, drop, + compact->compaction->IsBaseLevelForKey(ikey.user_key), + (int)last_sequence_for_key, (int)compact->smallest_snapshot); +#endif + + if (!drop) { + // Open output file if necessary + if (compact->builder == NULL) { + status = OpenCompactionOutputFile(compact); + if (!status.ok()) { + break; + } + } + if (compact->builder->NumEntries() == 0) { + compact->current_output()->smallest.DecodeFrom(key); + } + compact->current_output()->largest.DecodeFrom(key); + compact->builder->Add(key, input->value()); + + // Close output file if it is big enough + if (compact->builder->FileSize() >= + compact->compaction->MaxOutputFileSize()) { + status = FinishCompactionOutputFile(compact, input); + if (!status.ok()) { + break; + } + } + } + + input->Next(); + } + + if (status.ok() && shutting_down_.Acquire_Load()) { + status = Status::IOError("Deleting DB during compaction"); + } + if (status.ok() && compact->builder != NULL) { + status = FinishCompactionOutputFile(compact, input); + } + if (status.ok()) { + status = input->status(); + } + delete input; + input = NULL; + + CompactionStats stats; + stats.micros = env_->NowMicros() - start_micros - imm_micros; + for (int which = 0; which < 2; which++) { + for (int i = 0; i < compact->compaction->num_input_files(which); i++) { + stats.bytes_read += compact->compaction->input(which, i)->file_size; + } + } + for (size_t i = 0; i < compact->outputs.size(); i++) { + stats.bytes_written += compact->outputs[i].file_size; + } + + mutex_.Lock(); + stats_[compact->compaction->level() + 1].Add(stats); + + if (status.ok()) { + status = InstallCompactionResults(compact); + } + if (!status.ok()) { + RecordBackgroundError(status); + } + VersionSet::LevelSummaryStorage tmp; + Log(options_.info_log, + "compacted to: %s", versions_->LevelSummary(&tmp)); + return status; +} + +namespace { +struct IterState { + port::Mutex* mu; + Version* version; + MemTable* mem; + MemTable* imm; +}; + +static void CleanupIteratorState(void* arg1, void* arg2) { + IterState* state = reinterpret_cast(arg1); + state->mu->Lock(); + state->mem->Unref(); + if (state->imm != NULL) state->imm->Unref(); + state->version->Unref(); + state->mu->Unlock(); + delete state; +} +} // namespace + +Iterator* DBImpl::NewInternalIterator(const ReadOptions& options, + SequenceNumber* latest_snapshot, + uint32_t* seed) { + IterState* cleanup = new IterState; + mutex_.Lock(); + *latest_snapshot = versions_->LastSequence(); + + // Collect together all needed child iterators + std::vector list; + list.push_back(mem_->NewIterator()); + mem_->Ref(); + if (imm_ != NULL) { + list.push_back(imm_->NewIterator()); + imm_->Ref(); + } + versions_->current()->AddIterators(options, &list); + Iterator* internal_iter = + NewMergingIterator(&internal_comparator_, &list[0], list.size()); + versions_->current()->Ref(); + + cleanup->mu = &mutex_; + cleanup->mem = mem_; + cleanup->imm = imm_; + cleanup->version = versions_->current(); + internal_iter->RegisterCleanup(CleanupIteratorState, cleanup, NULL); + + *seed = ++seed_; + mutex_.Unlock(); + return internal_iter; +} + +Iterator* DBImpl::TEST_NewInternalIterator() { + SequenceNumber ignored; + uint32_t ignored_seed; + return NewInternalIterator(ReadOptions(), &ignored, &ignored_seed); +} + +int64_t DBImpl::TEST_MaxNextLevelOverlappingBytes() { + MutexLock l(&mutex_); + return versions_->MaxNextLevelOverlappingBytes(); +} + +Status DBImpl::Get(const ReadOptions& options, + const Slice& key, + std::string* value) { + Status s; + MutexLock l(&mutex_); + SequenceNumber snapshot; + if (options.snapshot != NULL) { + snapshot = reinterpret_cast(options.snapshot)->number_; + } else { + snapshot = versions_->LastSequence(); + } + + MemTable* mem = mem_; + MemTable* imm = imm_; + Version* current = versions_->current(); + mem->Ref(); + if (imm != NULL) imm->Ref(); + current->Ref(); + + bool have_stat_update = false; + Version::GetStats stats; + + // Unlock while reading from files and memtables + { + mutex_.Unlock(); + // First look in the memtable, then in the immutable memtable (if any). + LookupKey lkey(key, snapshot); + if (mem->Get(lkey, value, &s)) { + // Done + } else if (imm != NULL && imm->Get(lkey, value, &s)) { + // Done + } else { + s = current->Get(options, lkey, value, &stats); + have_stat_update = true; + } + mutex_.Lock(); + } + + if (have_stat_update && current->UpdateStats(stats)) { + MaybeScheduleCompaction(); + } + mem->Unref(); + if (imm != NULL) imm->Unref(); + current->Unref(); + return s; +} + +Iterator* DBImpl::NewIterator(const ReadOptions& options) { + SequenceNumber latest_snapshot; + uint32_t seed; + Iterator* iter = NewInternalIterator(options, &latest_snapshot, &seed); + return NewDBIterator( + this, user_comparator(), iter, + (options.snapshot != NULL + ? reinterpret_cast(options.snapshot)->number_ + : latest_snapshot), + seed); +} + +void DBImpl::RecordReadSample(Slice key) { + MutexLock l(&mutex_); + if (versions_->current()->RecordReadSample(key)) { + MaybeScheduleCompaction(); + } +} + +const Snapshot* DBImpl::GetSnapshot() { + MutexLock l(&mutex_); + return snapshots_.New(versions_->LastSequence()); +} + +void DBImpl::ReleaseSnapshot(const Snapshot* s) { + MutexLock l(&mutex_); + snapshots_.Delete(reinterpret_cast(s)); +} + +// Convenience methods +Status DBImpl::Put(const WriteOptions& o, const Slice& key, const Slice& val) { + return DB::Put(o, key, val); +} + +Status DBImpl::Delete(const WriteOptions& options, const Slice& key) { + return DB::Delete(options, key); +} + +Status DBImpl::Write(const WriteOptions& options, WriteBatch* my_batch) { + Writer w(&mutex_); + w.batch = my_batch; + w.sync = options.sync; + w.done = false; + + MutexLock l(&mutex_); + writers_.push_back(&w); + while (!w.done && &w != writers_.front()) { + w.cv.Wait(); + } + if (w.done) { + return w.status; + } + + // May temporarily unlock and wait. + Status status = MakeRoomForWrite(my_batch == NULL); + uint64_t last_sequence = versions_->LastSequence(); + Writer* last_writer = &w; + if (status.ok() && my_batch != NULL) { // NULL batch is for compactions + WriteBatch* updates = BuildBatchGroup(&last_writer); + WriteBatchInternal::SetSequence(updates, last_sequence + 1); + last_sequence += WriteBatchInternal::Count(updates); + + // Add to log and apply to memtable. We can release the lock + // during this phase since &w is currently responsible for logging + // and protects against concurrent loggers and concurrent writes + // into mem_. + { + mutex_.Unlock(); + status = log_->AddRecord(WriteBatchInternal::Contents(updates)); + bool sync_error = false; + if (status.ok() && options.sync) { + status = logfile_->Sync(); + if (!status.ok()) { + sync_error = true; + } + } + if (status.ok()) { + status = WriteBatchInternal::InsertInto(updates, mem_); + } + mutex_.Lock(); + if (sync_error) { + // The state of the log file is indeterminate: the log record we + // just added may or may not show up when the DB is re-opened. + // So we force the DB into a mode where all future writes fail. + RecordBackgroundError(status); + } + } + if (updates == tmp_batch_) tmp_batch_->Clear(); + + versions_->SetLastSequence(last_sequence); + } + + while (true) { + Writer* ready = writers_.front(); + writers_.pop_front(); + if (ready != &w) { + ready->status = status; + ready->done = true; + ready->cv.Signal(); + } + if (ready == last_writer) break; + } + + // Notify new head of write queue + if (!writers_.empty()) { + writers_.front()->cv.Signal(); + } + + return status; +} + +// REQUIRES: Writer list must be non-empty +// REQUIRES: First writer must have a non-NULL batch +WriteBatch* DBImpl::BuildBatchGroup(Writer** last_writer) { + assert(!writers_.empty()); + Writer* first = writers_.front(); + WriteBatch* result = first->batch; + assert(result != NULL); + + size_t size = WriteBatchInternal::ByteSize(first->batch); + + // Allow the group to grow up to a maximum size, but if the + // original write is small, limit the growth so we do not slow + // down the small write too much. + size_t max_size = 1 << 20; + if (size <= (128<<10)) { + max_size = size + (128<<10); + } + + *last_writer = first; + std::deque::iterator iter = writers_.begin(); + ++iter; // Advance past "first" + for (; iter != writers_.end(); ++iter) { + Writer* w = *iter; + if (w->sync && !first->sync) { + // Do not include a sync write into a batch handled by a non-sync write. + break; + } + + if (w->batch != NULL) { + size += WriteBatchInternal::ByteSize(w->batch); + if (size > max_size) { + // Do not make batch too big + break; + } + + // Append to *reuslt + if (result == first->batch) { + // Switch to temporary batch instead of disturbing caller's batch + result = tmp_batch_; + assert(WriteBatchInternal::Count(result) == 0); + WriteBatchInternal::Append(result, first->batch); + } + WriteBatchInternal::Append(result, w->batch); + } + *last_writer = w; + } + return result; +} + +// REQUIRES: mutex_ is held +// REQUIRES: this thread is currently at the front of the writer queue +Status DBImpl::MakeRoomForWrite(bool force) { + mutex_.AssertHeld(); + assert(!writers_.empty()); + bool allow_delay = !force; + Status s; + while (true) { + if (!bg_error_.ok()) { + // Yield previous error + s = bg_error_; + break; + } else if ( + allow_delay && + versions_->NumLevelFiles(0) >= config::kL0_SlowdownWritesTrigger) { + // We are getting close to hitting a hard limit on the number of + // L0 files. Rather than delaying a single write by several + // seconds when we hit the hard limit, start delaying each + // individual write by 1ms to reduce latency variance. Also, + // this delay hands over some CPU to the compaction thread in + // case it is sharing the same core as the writer. + mutex_.Unlock(); + env_->SleepForMicroseconds(1000); + allow_delay = false; // Do not delay a single write more than once + mutex_.Lock(); + } else if (!force && + (mem_->ApproximateMemoryUsage() <= options_.write_buffer_size)) { + // There is room in current memtable + break; + } else if (imm_ != NULL) { + // We have filled up the current memtable, but the previous + // one is still being compacted, so we wait. + Log(options_.info_log, "Current memtable full; waiting...\n"); + bg_cv_.Wait(); + } else if (versions_->NumLevelFiles(0) >= config::kL0_StopWritesTrigger) { + // There are too many level-0 files. + Log(options_.info_log, "Too many L0 files; waiting...\n"); + bg_cv_.Wait(); + } else { + // Attempt to switch to a new memtable and trigger compaction of old + assert(versions_->PrevLogNumber() == 0); + uint64_t new_log_number = versions_->NewFileNumber(); + WritableFile* lfile = NULL; + s = env_->NewWritableFile(LogFileName(dbname_, new_log_number), &lfile); + if (!s.ok()) { + // Avoid chewing through file number space in a tight loop. + versions_->ReuseFileNumber(new_log_number); + break; + } + delete log_; + delete logfile_; + logfile_ = lfile; + logfile_number_ = new_log_number; + log_ = new log::Writer(lfile); + imm_ = mem_; + has_imm_.Release_Store(imm_); + mem_ = new MemTable(internal_comparator_); + mem_->Ref(); + force = false; // Do not force another compaction if have room + MaybeScheduleCompaction(); + } + } + return s; +} + +bool DBImpl::GetProperty(const Slice& property, std::string* value) { + value->clear(); + + MutexLock l(&mutex_); + Slice in = property; + Slice prefix("leveldb."); + if (!in.starts_with(prefix)) return false; + in.remove_prefix(prefix.size()); + + if (in.starts_with("num-files-at-level")) { + in.remove_prefix(strlen("num-files-at-level")); + uint64_t level; + bool ok = ConsumeDecimalNumber(&in, &level) && in.empty(); + if (!ok || level >= config::kNumLevels) { + return false; + } else { + char buf[100]; + snprintf(buf, sizeof(buf), "%d", + versions_->NumLevelFiles(static_cast(level))); + *value = buf; + return true; + } + } else if (in == "stats") { + char buf[200]; + snprintf(buf, sizeof(buf), + " Compactions\n" + "Level Files Size(MB) Time(sec) Read(MB) Write(MB)\n" + "--------------------------------------------------\n" + ); + value->append(buf); + for (int level = 0; level < config::kNumLevels; level++) { + int files = versions_->NumLevelFiles(level); + if (stats_[level].micros > 0 || files > 0) { + snprintf( + buf, sizeof(buf), + "%3d %8d %8.0f %9.0f %8.0f %9.0f\n", + level, + files, + versions_->NumLevelBytes(level) / 1048576.0, + stats_[level].micros / 1e6, + stats_[level].bytes_read / 1048576.0, + stats_[level].bytes_written / 1048576.0); + value->append(buf); + } + } + return true; + } else if (in == "sstables") { + *value = versions_->current()->DebugString(); + return true; + } + + return false; +} + +void DBImpl::GetApproximateSizes( + const Range* range, int n, + uint64_t* sizes) { + // TODO(opt): better implementation + Version* v; + { + MutexLock l(&mutex_); + versions_->current()->Ref(); + v = versions_->current(); + } + + for (int i = 0; i < n; i++) { + // Convert user_key into a corresponding internal key. + InternalKey k1(range[i].start, kMaxSequenceNumber, kValueTypeForSeek); + InternalKey k2(range[i].limit, kMaxSequenceNumber, kValueTypeForSeek); + uint64_t start = versions_->ApproximateOffsetOf(v, k1); + uint64_t limit = versions_->ApproximateOffsetOf(v, k2); + sizes[i] = (limit >= start ? limit - start : 0); + } + + { + MutexLock l(&mutex_); + v->Unref(); + } +} + +// Default implementations of convenience methods that subclasses of DB +// can call if they wish +Status DB::Put(const WriteOptions& opt, const Slice& key, const Slice& value) { + WriteBatch batch; + batch.Put(key, value); + return Write(opt, &batch); +} + +Status DB::Delete(const WriteOptions& opt, const Slice& key) { + WriteBatch batch; + batch.Delete(key); + return Write(opt, &batch); +} + +DB::~DB() { } + +Status DB::Open(const Options& options, const std::string& dbname, + DB** dbptr) { + *dbptr = NULL; + + DBImpl* impl = new DBImpl(options, dbname); + impl->mutex_.Lock(); + VersionEdit edit; + Status s = impl->Recover(&edit); // Handles create_if_missing, error_if_exists + if (s.ok()) { + uint64_t new_log_number = impl->versions_->NewFileNumber(); + WritableFile* lfile; + s = options.env->NewWritableFile(LogFileName(dbname, new_log_number), + &lfile); + if (s.ok()) { + edit.SetLogNumber(new_log_number); + impl->logfile_ = lfile; + impl->logfile_number_ = new_log_number; + impl->log_ = new log::Writer(lfile); + s = impl->versions_->LogAndApply(&edit, &impl->mutex_); + } + if (s.ok()) { + impl->DeleteObsoleteFiles(); + impl->MaybeScheduleCompaction(); + } + } + impl->mutex_.Unlock(); + if (s.ok()) { + *dbptr = impl; + } else { + delete impl; + } + return s; +} + +Snapshot::~Snapshot() { +} + +Status DestroyDB(const std::string& dbname, const Options& options) { + Env* env = options.env; + std::vector filenames; + // Ignore error in case directory does not exist + env->GetChildren(dbname, &filenames); + if (filenames.empty()) { + return Status::OK(); + } + + FileLock* lock; + const std::string lockname = LockFileName(dbname); + Status result = env->LockFile(lockname, &lock); + if (result.ok()) { + uint64_t number; + FileType type; + for (size_t i = 0; i < filenames.size(); i++) { + if (ParseFileName(filenames[i], &number, &type) && + type != kDBLockFile) { // Lock file will be deleted at end + Status del = env->DeleteFile(dbname + "/" + filenames[i]); + if (result.ok() && !del.ok()) { + result = del; + } + } + } + env->UnlockFile(lock); // Ignore error since state is already gone + env->DeleteFile(lockname); + env->DeleteDir(dbname); // Ignore error in case dir contains other files + } + return result; +} + +} // namespace leveldb diff --git a/src/leveldb/db/db_impl.h b/src/leveldb/db/db_impl.h new file mode 100644 index 0000000..cfc9981 --- /dev/null +++ b/src/leveldb/db/db_impl.h @@ -0,0 +1,211 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_DB_DB_IMPL_H_ +#define STORAGE_LEVELDB_DB_DB_IMPL_H_ + +#include +#include +#include "db/dbformat.h" +#include "db/log_writer.h" +#include "db/snapshot.h" +#include "leveldb/db.h" +#include "leveldb/env.h" +#include "port/port.h" +#include "port/thread_annotations.h" + +namespace leveldb { + +class MemTable; +class TableCache; +class Version; +class VersionEdit; +class VersionSet; + +class DBImpl : public DB { + public: + DBImpl(const Options& options, const std::string& dbname); + virtual ~DBImpl(); + + // Implementations of the DB interface + virtual Status Put(const WriteOptions&, const Slice& key, const Slice& value); + virtual Status Delete(const WriteOptions&, const Slice& key); + virtual Status Write(const WriteOptions& options, WriteBatch* updates); + virtual Status Get(const ReadOptions& options, + const Slice& key, + std::string* value); + virtual Iterator* NewIterator(const ReadOptions&); + virtual const Snapshot* GetSnapshot(); + virtual void ReleaseSnapshot(const Snapshot* snapshot); + virtual bool GetProperty(const Slice& property, std::string* value); + virtual void GetApproximateSizes(const Range* range, int n, uint64_t* sizes); + virtual void CompactRange(const Slice* begin, const Slice* end); + + // Extra methods (for testing) that are not in the public DB interface + + // Compact any files in the named level that overlap [*begin,*end] + void TEST_CompactRange(int level, const Slice* begin, const Slice* end); + + // Force current memtable contents to be compacted. + Status TEST_CompactMemTable(); + + // Return an internal iterator over the current state of the database. + // The keys of this iterator are internal keys (see format.h). + // The returned iterator should be deleted when no longer needed. + Iterator* TEST_NewInternalIterator(); + + // Return the maximum overlapping data (in bytes) at next level for any + // file at a level >= 1. + int64_t TEST_MaxNextLevelOverlappingBytes(); + + // Record a sample of bytes read at the specified internal key. + // Samples are taken approximately once every config::kReadBytesPeriod + // bytes. + void RecordReadSample(Slice key); + + private: + friend class DB; + struct CompactionState; + struct Writer; + + Iterator* NewInternalIterator(const ReadOptions&, + SequenceNumber* latest_snapshot, + uint32_t* seed); + + Status NewDB(); + + // Recover the descriptor from persistent storage. May do a significant + // amount of work to recover recently logged updates. Any changes to + // be made to the descriptor are added to *edit. + Status Recover(VersionEdit* edit) EXCLUSIVE_LOCKS_REQUIRED(mutex_); + + void MaybeIgnoreError(Status* s) const; + + // Delete any unneeded files and stale in-memory entries. + void DeleteObsoleteFiles(); + + // Compact the in-memory write buffer to disk. Switches to a new + // log-file/memtable and writes a new descriptor iff successful. + // Errors are recorded in bg_error_. + void CompactMemTable() EXCLUSIVE_LOCKS_REQUIRED(mutex_); + + Status RecoverLogFile(uint64_t log_number, + VersionEdit* edit, + SequenceNumber* max_sequence) + EXCLUSIVE_LOCKS_REQUIRED(mutex_); + + Status WriteLevel0Table(MemTable* mem, VersionEdit* edit, Version* base) + EXCLUSIVE_LOCKS_REQUIRED(mutex_); + + Status MakeRoomForWrite(bool force /* compact even if there is room? */) + EXCLUSIVE_LOCKS_REQUIRED(mutex_); + WriteBatch* BuildBatchGroup(Writer** last_writer); + + void RecordBackgroundError(const Status& s); + + void MaybeScheduleCompaction() EXCLUSIVE_LOCKS_REQUIRED(mutex_); + static void BGWork(void* db); + void BackgroundCall(); + void BackgroundCompaction() EXCLUSIVE_LOCKS_REQUIRED(mutex_); + void CleanupCompaction(CompactionState* compact) + EXCLUSIVE_LOCKS_REQUIRED(mutex_); + Status DoCompactionWork(CompactionState* compact) + EXCLUSIVE_LOCKS_REQUIRED(mutex_); + + Status OpenCompactionOutputFile(CompactionState* compact); + Status FinishCompactionOutputFile(CompactionState* compact, Iterator* input); + Status InstallCompactionResults(CompactionState* compact) + EXCLUSIVE_LOCKS_REQUIRED(mutex_); + + // Constant after construction + Env* const env_; + const InternalKeyComparator internal_comparator_; + const InternalFilterPolicy internal_filter_policy_; + const Options options_; // options_.comparator == &internal_comparator_ + bool owns_info_log_; + bool owns_cache_; + const std::string dbname_; + + // table_cache_ provides its own synchronization + TableCache* table_cache_; + + // Lock over the persistent DB state. Non-NULL iff successfully acquired. + FileLock* db_lock_; + + // State below is protected by mutex_ + port::Mutex mutex_; + port::AtomicPointer shutting_down_; + port::CondVar bg_cv_; // Signalled when background work finishes + MemTable* mem_; + MemTable* imm_; // Memtable being compacted + port::AtomicPointer has_imm_; // So bg thread can detect non-NULL imm_ + WritableFile* logfile_; + uint64_t logfile_number_; + log::Writer* log_; + uint32_t seed_; // For sampling. + + // Queue of writers. + std::deque writers_; + WriteBatch* tmp_batch_; + + SnapshotList snapshots_; + + // Set of table files to protect from deletion because they are + // part of ongoing compactions. + std::set pending_outputs_; + + // Has a background compaction been scheduled or is running? + bool bg_compaction_scheduled_; + + // Information for a manual compaction + struct ManualCompaction { + int level; + bool done; + const InternalKey* begin; // NULL means beginning of key range + const InternalKey* end; // NULL means end of key range + InternalKey tmp_storage; // Used to keep track of compaction progress + }; + ManualCompaction* manual_compaction_; + + VersionSet* versions_; + + // Have we encountered a background error in paranoid mode? + Status bg_error_; + + // Per level compaction stats. stats_[level] stores the stats for + // compactions that produced data for the specified "level". + struct CompactionStats { + int64_t micros; + int64_t bytes_read; + int64_t bytes_written; + + CompactionStats() : micros(0), bytes_read(0), bytes_written(0) { } + + void Add(const CompactionStats& c) { + this->micros += c.micros; + this->bytes_read += c.bytes_read; + this->bytes_written += c.bytes_written; + } + }; + CompactionStats stats_[config::kNumLevels]; + + // No copying allowed + DBImpl(const DBImpl&); + void operator=(const DBImpl&); + + const Comparator* user_comparator() const { + return internal_comparator_.user_comparator(); + } +}; + +// Sanitize db options. The caller should delete result.info_log if +// it is not equal to src.info_log. +extern Options SanitizeOptions(const std::string& db, + const InternalKeyComparator* icmp, + const InternalFilterPolicy* ipolicy, + const Options& src); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_DB_IMPL_H_ diff --git a/src/leveldb/db/db_iter.cc b/src/leveldb/db/db_iter.cc new file mode 100644 index 0000000..3b2035e --- /dev/null +++ b/src/leveldb/db/db_iter.cc @@ -0,0 +1,317 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/db_iter.h" + +#include "db/filename.h" +#include "db/db_impl.h" +#include "db/dbformat.h" +#include "leveldb/env.h" +#include "leveldb/iterator.h" +#include "port/port.h" +#include "util/logging.h" +#include "util/mutexlock.h" +#include "util/random.h" + +namespace leveldb { + +#if 0 +static void DumpInternalIter(Iterator* iter) { + for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { + ParsedInternalKey k; + if (!ParseInternalKey(iter->key(), &k)) { + fprintf(stderr, "Corrupt '%s'\n", EscapeString(iter->key()).c_str()); + } else { + fprintf(stderr, "@ '%s'\n", k.DebugString().c_str()); + } + } +} +#endif + +namespace { + +// Memtables and sstables that make the DB representation contain +// (userkey,seq,type) => uservalue entries. DBIter +// combines multiple entries for the same userkey found in the DB +// representation into a single entry while accounting for sequence +// numbers, deletion markers, overwrites, etc. +class DBIter: public Iterator { + public: + // Which direction is the iterator currently moving? + // (1) When moving forward, the internal iterator is positioned at + // the exact entry that yields this->key(), this->value() + // (2) When moving backwards, the internal iterator is positioned + // just before all entries whose user key == this->key(). + enum Direction { + kForward, + kReverse + }; + + DBIter(DBImpl* db, const Comparator* cmp, Iterator* iter, SequenceNumber s, + uint32_t seed) + : db_(db), + user_comparator_(cmp), + iter_(iter), + sequence_(s), + direction_(kForward), + valid_(false), + rnd_(seed), + bytes_counter_(RandomPeriod()) { + } + virtual ~DBIter() { + delete iter_; + } + virtual bool Valid() const { return valid_; } + virtual Slice key() const { + assert(valid_); + return (direction_ == kForward) ? ExtractUserKey(iter_->key()) : saved_key_; + } + virtual Slice value() const { + assert(valid_); + return (direction_ == kForward) ? iter_->value() : saved_value_; + } + virtual Status status() const { + if (status_.ok()) { + return iter_->status(); + } else { + return status_; + } + } + + virtual void Next(); + virtual void Prev(); + virtual void Seek(const Slice& target); + virtual void SeekToFirst(); + virtual void SeekToLast(); + + private: + void FindNextUserEntry(bool skipping, std::string* skip); + void FindPrevUserEntry(); + bool ParseKey(ParsedInternalKey* key); + + inline void SaveKey(const Slice& k, std::string* dst) { + dst->assign(k.data(), k.size()); + } + + inline void ClearSavedValue() { + if (saved_value_.capacity() > 1048576) { + std::string empty; + swap(empty, saved_value_); + } else { + saved_value_.clear(); + } + } + + // Pick next gap with average value of config::kReadBytesPeriod. + ssize_t RandomPeriod() { + return rnd_.Uniform(2*config::kReadBytesPeriod); + } + + DBImpl* db_; + const Comparator* const user_comparator_; + Iterator* const iter_; + SequenceNumber const sequence_; + + Status status_; + std::string saved_key_; // == current key when direction_==kReverse + std::string saved_value_; // == current raw value when direction_==kReverse + Direction direction_; + bool valid_; + + Random rnd_; + ssize_t bytes_counter_; + + // No copying allowed + DBIter(const DBIter&); + void operator=(const DBIter&); +}; + +inline bool DBIter::ParseKey(ParsedInternalKey* ikey) { + Slice k = iter_->key(); + ssize_t n = k.size() + iter_->value().size(); + bytes_counter_ -= n; + while (bytes_counter_ < 0) { + bytes_counter_ += RandomPeriod(); + db_->RecordReadSample(k); + } + if (!ParseInternalKey(k, ikey)) { + status_ = Status::Corruption("corrupted internal key in DBIter"); + return false; + } else { + return true; + } +} + +void DBIter::Next() { + assert(valid_); + + if (direction_ == kReverse) { // Switch directions? + direction_ = kForward; + // iter_ is pointing just before the entries for this->key(), + // so advance into the range of entries for this->key() and then + // use the normal skipping code below. + if (!iter_->Valid()) { + iter_->SeekToFirst(); + } else { + iter_->Next(); + } + if (!iter_->Valid()) { + valid_ = false; + saved_key_.clear(); + return; + } + // saved_key_ already contains the key to skip past. + } else { + // Store in saved_key_ the current key so we skip it below. + SaveKey(ExtractUserKey(iter_->key()), &saved_key_); + } + + FindNextUserEntry(true, &saved_key_); +} + +void DBIter::FindNextUserEntry(bool skipping, std::string* skip) { + // Loop until we hit an acceptable entry to yield + assert(iter_->Valid()); + assert(direction_ == kForward); + do { + ParsedInternalKey ikey; + if (ParseKey(&ikey) && ikey.sequence <= sequence_) { + switch (ikey.type) { + case kTypeDeletion: + // Arrange to skip all upcoming entries for this key since + // they are hidden by this deletion. + SaveKey(ikey.user_key, skip); + skipping = true; + break; + case kTypeValue: + if (skipping && + user_comparator_->Compare(ikey.user_key, *skip) <= 0) { + // Entry hidden + } else { + valid_ = true; + saved_key_.clear(); + return; + } + break; + } + } + iter_->Next(); + } while (iter_->Valid()); + saved_key_.clear(); + valid_ = false; +} + +void DBIter::Prev() { + assert(valid_); + + if (direction_ == kForward) { // Switch directions? + // iter_ is pointing at the current entry. Scan backwards until + // the key changes so we can use the normal reverse scanning code. + assert(iter_->Valid()); // Otherwise valid_ would have been false + SaveKey(ExtractUserKey(iter_->key()), &saved_key_); + while (true) { + iter_->Prev(); + if (!iter_->Valid()) { + valid_ = false; + saved_key_.clear(); + ClearSavedValue(); + return; + } + if (user_comparator_->Compare(ExtractUserKey(iter_->key()), + saved_key_) < 0) { + break; + } + } + direction_ = kReverse; + } + + FindPrevUserEntry(); +} + +void DBIter::FindPrevUserEntry() { + assert(direction_ == kReverse); + + ValueType value_type = kTypeDeletion; + if (iter_->Valid()) { + do { + ParsedInternalKey ikey; + if (ParseKey(&ikey) && ikey.sequence <= sequence_) { + if ((value_type != kTypeDeletion) && + user_comparator_->Compare(ikey.user_key, saved_key_) < 0) { + // We encountered a non-deleted value in entries for previous keys, + break; + } + value_type = ikey.type; + if (value_type == kTypeDeletion) { + saved_key_.clear(); + ClearSavedValue(); + } else { + Slice raw_value = iter_->value(); + if (saved_value_.capacity() > raw_value.size() + 1048576) { + std::string empty; + swap(empty, saved_value_); + } + SaveKey(ExtractUserKey(iter_->key()), &saved_key_); + saved_value_.assign(raw_value.data(), raw_value.size()); + } + } + iter_->Prev(); + } while (iter_->Valid()); + } + + if (value_type == kTypeDeletion) { + // End + valid_ = false; + saved_key_.clear(); + ClearSavedValue(); + direction_ = kForward; + } else { + valid_ = true; + } +} + +void DBIter::Seek(const Slice& target) { + direction_ = kForward; + ClearSavedValue(); + saved_key_.clear(); + AppendInternalKey( + &saved_key_, ParsedInternalKey(target, sequence_, kValueTypeForSeek)); + iter_->Seek(saved_key_); + if (iter_->Valid()) { + FindNextUserEntry(false, &saved_key_ /* temporary storage */); + } else { + valid_ = false; + } +} + +void DBIter::SeekToFirst() { + direction_ = kForward; + ClearSavedValue(); + iter_->SeekToFirst(); + if (iter_->Valid()) { + FindNextUserEntry(false, &saved_key_ /* temporary storage */); + } else { + valid_ = false; + } +} + +void DBIter::SeekToLast() { + direction_ = kReverse; + ClearSavedValue(); + iter_->SeekToLast(); + FindPrevUserEntry(); +} + +} // anonymous namespace + +Iterator* NewDBIterator( + DBImpl* db, + const Comparator* user_key_comparator, + Iterator* internal_iter, + SequenceNumber sequence, + uint32_t seed) { + return new DBIter(db, user_key_comparator, internal_iter, sequence, seed); +} + +} // namespace leveldb diff --git a/src/leveldb/db/db_iter.h b/src/leveldb/db/db_iter.h new file mode 100644 index 0000000..04927e9 --- /dev/null +++ b/src/leveldb/db/db_iter.h @@ -0,0 +1,28 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_DB_DB_ITER_H_ +#define STORAGE_LEVELDB_DB_DB_ITER_H_ + +#include +#include "leveldb/db.h" +#include "db/dbformat.h" + +namespace leveldb { + +class DBImpl; + +// Return a new iterator that converts internal keys (yielded by +// "*internal_iter") that were live at the specified "sequence" number +// into appropriate user keys. +extern Iterator* NewDBIterator( + DBImpl* db, + const Comparator* user_key_comparator, + Iterator* internal_iter, + SequenceNumber sequence, + uint32_t seed); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_DB_ITER_H_ diff --git a/src/leveldb/db/db_test.cc b/src/leveldb/db/db_test.cc new file mode 100644 index 0000000..280b01c --- /dev/null +++ b/src/leveldb/db/db_test.cc @@ -0,0 +1,2128 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/db.h" +#include "leveldb/filter_policy.h" +#include "db/db_impl.h" +#include "db/filename.h" +#include "db/version_set.h" +#include "db/write_batch_internal.h" +#include "leveldb/cache.h" +#include "leveldb/env.h" +#include "leveldb/table.h" +#include "util/hash.h" +#include "util/logging.h" +#include "util/mutexlock.h" +#include "util/testharness.h" +#include "util/testutil.h" + +namespace leveldb { + +static std::string RandomString(Random* rnd, int len) { + std::string r; + test::RandomString(rnd, len, &r); + return r; +} + +namespace { +class AtomicCounter { + private: + port::Mutex mu_; + int count_; + public: + AtomicCounter() : count_(0) { } + void Increment() { + IncrementBy(1); + } + void IncrementBy(int count) { + MutexLock l(&mu_); + count_ += count; + } + int Read() { + MutexLock l(&mu_); + return count_; + } + void Reset() { + MutexLock l(&mu_); + count_ = 0; + } +}; + +void DelayMilliseconds(int millis) { + Env::Default()->SleepForMicroseconds(millis * 1000); +} +} + +// Special Env used to delay background operations +class SpecialEnv : public EnvWrapper { + public: + // sstable/log Sync() calls are blocked while this pointer is non-NULL. + port::AtomicPointer delay_data_sync_; + + // sstable/log Sync() calls return an error. + port::AtomicPointer data_sync_error_; + + // Simulate no-space errors while this pointer is non-NULL. + port::AtomicPointer no_space_; + + // Simulate non-writable file system while this pointer is non-NULL + port::AtomicPointer non_writable_; + + // Force sync of manifest files to fail while this pointer is non-NULL + port::AtomicPointer manifest_sync_error_; + + // Force write to manifest files to fail while this pointer is non-NULL + port::AtomicPointer manifest_write_error_; + + bool count_random_reads_; + AtomicCounter random_read_counter_; + + explicit SpecialEnv(Env* base) : EnvWrapper(base) { + delay_data_sync_.Release_Store(NULL); + data_sync_error_.Release_Store(NULL); + no_space_.Release_Store(NULL); + non_writable_.Release_Store(NULL); + count_random_reads_ = false; + manifest_sync_error_.Release_Store(NULL); + manifest_write_error_.Release_Store(NULL); + } + + Status NewWritableFile(const std::string& f, WritableFile** r) { + class DataFile : public WritableFile { + private: + SpecialEnv* env_; + WritableFile* base_; + + public: + DataFile(SpecialEnv* env, WritableFile* base) + : env_(env), + base_(base) { + } + ~DataFile() { delete base_; } + Status Append(const Slice& data) { + if (env_->no_space_.Acquire_Load() != NULL) { + // Drop writes on the floor + return Status::OK(); + } else { + return base_->Append(data); + } + } + Status Close() { return base_->Close(); } + Status Flush() { return base_->Flush(); } + Status Sync() { + if (env_->data_sync_error_.Acquire_Load() != NULL) { + return Status::IOError("simulated data sync error"); + } + while (env_->delay_data_sync_.Acquire_Load() != NULL) { + DelayMilliseconds(100); + } + return base_->Sync(); + } + }; + class ManifestFile : public WritableFile { + private: + SpecialEnv* env_; + WritableFile* base_; + public: + ManifestFile(SpecialEnv* env, WritableFile* b) : env_(env), base_(b) { } + ~ManifestFile() { delete base_; } + Status Append(const Slice& data) { + if (env_->manifest_write_error_.Acquire_Load() != NULL) { + return Status::IOError("simulated writer error"); + } else { + return base_->Append(data); + } + } + Status Close() { return base_->Close(); } + Status Flush() { return base_->Flush(); } + Status Sync() { + if (env_->manifest_sync_error_.Acquire_Load() != NULL) { + return Status::IOError("simulated sync error"); + } else { + return base_->Sync(); + } + } + }; + + if (non_writable_.Acquire_Load() != NULL) { + return Status::IOError("simulated write error"); + } + + Status s = target()->NewWritableFile(f, r); + if (s.ok()) { + if (strstr(f.c_str(), ".ldb") != NULL || + strstr(f.c_str(), ".log") != NULL) { + *r = new DataFile(this, *r); + } else if (strstr(f.c_str(), "MANIFEST") != NULL) { + *r = new ManifestFile(this, *r); + } + } + return s; + } + + Status NewRandomAccessFile(const std::string& f, RandomAccessFile** r) { + class CountingFile : public RandomAccessFile { + private: + RandomAccessFile* target_; + AtomicCounter* counter_; + public: + CountingFile(RandomAccessFile* target, AtomicCounter* counter) + : target_(target), counter_(counter) { + } + virtual ~CountingFile() { delete target_; } + virtual Status Read(uint64_t offset, size_t n, Slice* result, + char* scratch) const { + counter_->Increment(); + return target_->Read(offset, n, result, scratch); + } + }; + + Status s = target()->NewRandomAccessFile(f, r); + if (s.ok() && count_random_reads_) { + *r = new CountingFile(*r, &random_read_counter_); + } + return s; + } +}; + +class DBTest { + private: + const FilterPolicy* filter_policy_; + + // Sequence of option configurations to try + enum OptionConfig { + kDefault, + kFilter, + kUncompressed, + kEnd + }; + int option_config_; + + public: + std::string dbname_; + SpecialEnv* env_; + DB* db_; + + Options last_options_; + + DBTest() : option_config_(kDefault), + env_(new SpecialEnv(Env::Default())) { + filter_policy_ = NewBloomFilterPolicy(10); + dbname_ = test::TmpDir() + "/db_test"; + DestroyDB(dbname_, Options()); + db_ = NULL; + Reopen(); + } + + ~DBTest() { + delete db_; + DestroyDB(dbname_, Options()); + delete env_; + delete filter_policy_; + } + + // Switch to a fresh database with the next option configuration to + // test. Return false if there are no more configurations to test. + bool ChangeOptions() { + option_config_++; + if (option_config_ >= kEnd) { + return false; + } else { + DestroyAndReopen(); + return true; + } + } + + // Return the current option configuration. + Options CurrentOptions() { + Options options; + switch (option_config_) { + case kFilter: + options.filter_policy = filter_policy_; + break; + case kUncompressed: + options.compression = kNoCompression; + break; + default: + break; + } + return options; + } + + DBImpl* dbfull() { + return reinterpret_cast(db_); + } + + void Reopen(Options* options = NULL) { + ASSERT_OK(TryReopen(options)); + } + + void Close() { + delete db_; + db_ = NULL; + } + + void DestroyAndReopen(Options* options = NULL) { + delete db_; + db_ = NULL; + DestroyDB(dbname_, Options()); + ASSERT_OK(TryReopen(options)); + } + + Status TryReopen(Options* options) { + delete db_; + db_ = NULL; + Options opts; + if (options != NULL) { + opts = *options; + } else { + opts = CurrentOptions(); + opts.create_if_missing = true; + } + last_options_ = opts; + + return DB::Open(opts, dbname_, &db_); + } + + Status Put(const std::string& k, const std::string& v) { + return db_->Put(WriteOptions(), k, v); + } + + Status Delete(const std::string& k) { + return db_->Delete(WriteOptions(), k); + } + + std::string Get(const std::string& k, const Snapshot* snapshot = NULL) { + ReadOptions options; + options.snapshot = snapshot; + std::string result; + Status s = db_->Get(options, k, &result); + if (s.IsNotFound()) { + result = "NOT_FOUND"; + } else if (!s.ok()) { + result = s.ToString(); + } + return result; + } + + // Return a string that contains all key,value pairs in order, + // formatted like "(k1->v1)(k2->v2)". + std::string Contents() { + std::vector forward; + std::string result; + Iterator* iter = db_->NewIterator(ReadOptions()); + for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { + std::string s = IterStatus(iter); + result.push_back('('); + result.append(s); + result.push_back(')'); + forward.push_back(s); + } + + // Check reverse iteration results are the reverse of forward results + size_t matched = 0; + for (iter->SeekToLast(); iter->Valid(); iter->Prev()) { + ASSERT_LT(matched, forward.size()); + ASSERT_EQ(IterStatus(iter), forward[forward.size() - matched - 1]); + matched++; + } + ASSERT_EQ(matched, forward.size()); + + delete iter; + return result; + } + + std::string AllEntriesFor(const Slice& user_key) { + Iterator* iter = dbfull()->TEST_NewInternalIterator(); + InternalKey target(user_key, kMaxSequenceNumber, kTypeValue); + iter->Seek(target.Encode()); + std::string result; + if (!iter->status().ok()) { + result = iter->status().ToString(); + } else { + result = "[ "; + bool first = true; + while (iter->Valid()) { + ParsedInternalKey ikey; + if (!ParseInternalKey(iter->key(), &ikey)) { + result += "CORRUPTED"; + } else { + if (last_options_.comparator->Compare(ikey.user_key, user_key) != 0) { + break; + } + if (!first) { + result += ", "; + } + first = false; + switch (ikey.type) { + case kTypeValue: + result += iter->value().ToString(); + break; + case kTypeDeletion: + result += "DEL"; + break; + } + } + iter->Next(); + } + if (!first) { + result += " "; + } + result += "]"; + } + delete iter; + return result; + } + + int NumTableFilesAtLevel(int level) { + std::string property; + ASSERT_TRUE( + db_->GetProperty("leveldb.num-files-at-level" + NumberToString(level), + &property)); + return atoi(property.c_str()); + } + + int TotalTableFiles() { + int result = 0; + for (int level = 0; level < config::kNumLevels; level++) { + result += NumTableFilesAtLevel(level); + } + return result; + } + + // Return spread of files per level + std::string FilesPerLevel() { + std::string result; + int last_non_zero_offset = 0; + for (int level = 0; level < config::kNumLevels; level++) { + int f = NumTableFilesAtLevel(level); + char buf[100]; + snprintf(buf, sizeof(buf), "%s%d", (level ? "," : ""), f); + result += buf; + if (f > 0) { + last_non_zero_offset = result.size(); + } + } + result.resize(last_non_zero_offset); + return result; + } + + int CountFiles() { + std::vector files; + env_->GetChildren(dbname_, &files); + return static_cast(files.size()); + } + + uint64_t Size(const Slice& start, const Slice& limit) { + Range r(start, limit); + uint64_t size; + db_->GetApproximateSizes(&r, 1, &size); + return size; + } + + void Compact(const Slice& start, const Slice& limit) { + db_->CompactRange(&start, &limit); + } + + // Do n memtable compactions, each of which produces an sstable + // covering the range [small,large]. + void MakeTables(int n, const std::string& small, const std::string& large) { + for (int i = 0; i < n; i++) { + Put(small, "begin"); + Put(large, "end"); + dbfull()->TEST_CompactMemTable(); + } + } + + // Prevent pushing of new sstables into deeper levels by adding + // tables that cover a specified range to all levels. + void FillLevels(const std::string& smallest, const std::string& largest) { + MakeTables(config::kNumLevels, smallest, largest); + } + + void DumpFileCounts(const char* label) { + fprintf(stderr, "---\n%s:\n", label); + fprintf(stderr, "maxoverlap: %lld\n", + static_cast( + dbfull()->TEST_MaxNextLevelOverlappingBytes())); + for (int level = 0; level < config::kNumLevels; level++) { + int num = NumTableFilesAtLevel(level); + if (num > 0) { + fprintf(stderr, " level %3d : %d files\n", level, num); + } + } + } + + std::string DumpSSTableList() { + std::string property; + db_->GetProperty("leveldb.sstables", &property); + return property; + } + + std::string IterStatus(Iterator* iter) { + std::string result; + if (iter->Valid()) { + result = iter->key().ToString() + "->" + iter->value().ToString(); + } else { + result = "(invalid)"; + } + return result; + } + + bool DeleteAnSSTFile() { + std::vector filenames; + ASSERT_OK(env_->GetChildren(dbname_, &filenames)); + uint64_t number; + FileType type; + for (size_t i = 0; i < filenames.size(); i++) { + if (ParseFileName(filenames[i], &number, &type) && type == kTableFile) { + ASSERT_OK(env_->DeleteFile(TableFileName(dbname_, number))); + return true; + } + } + return false; + } + + // Returns number of files renamed. + int RenameLDBToSST() { + std::vector filenames; + ASSERT_OK(env_->GetChildren(dbname_, &filenames)); + uint64_t number; + FileType type; + int files_renamed = 0; + for (size_t i = 0; i < filenames.size(); i++) { + if (ParseFileName(filenames[i], &number, &type) && type == kTableFile) { + const std::string from = TableFileName(dbname_, number); + const std::string to = SSTTableFileName(dbname_, number); + ASSERT_OK(env_->RenameFile(from, to)); + files_renamed++; + } + } + return files_renamed; + } +}; + +TEST(DBTest, Empty) { + do { + ASSERT_TRUE(db_ != NULL); + ASSERT_EQ("NOT_FOUND", Get("foo")); + } while (ChangeOptions()); +} + +TEST(DBTest, ReadWrite) { + do { + ASSERT_OK(Put("foo", "v1")); + ASSERT_EQ("v1", Get("foo")); + ASSERT_OK(Put("bar", "v2")); + ASSERT_OK(Put("foo", "v3")); + ASSERT_EQ("v3", Get("foo")); + ASSERT_EQ("v2", Get("bar")); + } while (ChangeOptions()); +} + +TEST(DBTest, PutDeleteGet) { + do { + ASSERT_OK(db_->Put(WriteOptions(), "foo", "v1")); + ASSERT_EQ("v1", Get("foo")); + ASSERT_OK(db_->Put(WriteOptions(), "foo", "v2")); + ASSERT_EQ("v2", Get("foo")); + ASSERT_OK(db_->Delete(WriteOptions(), "foo")); + ASSERT_EQ("NOT_FOUND", Get("foo")); + } while (ChangeOptions()); +} + +TEST(DBTest, GetFromImmutableLayer) { + do { + Options options = CurrentOptions(); + options.env = env_; + options.write_buffer_size = 100000; // Small write buffer + Reopen(&options); + + ASSERT_OK(Put("foo", "v1")); + ASSERT_EQ("v1", Get("foo")); + + env_->delay_data_sync_.Release_Store(env_); // Block sync calls + Put("k1", std::string(100000, 'x')); // Fill memtable + Put("k2", std::string(100000, 'y')); // Trigger compaction + ASSERT_EQ("v1", Get("foo")); + env_->delay_data_sync_.Release_Store(NULL); // Release sync calls + } while (ChangeOptions()); +} + +TEST(DBTest, GetFromVersions) { + do { + ASSERT_OK(Put("foo", "v1")); + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ("v1", Get("foo")); + } while (ChangeOptions()); +} + +TEST(DBTest, GetSnapshot) { + do { + // Try with both a short key and a long key + for (int i = 0; i < 2; i++) { + std::string key = (i == 0) ? std::string("foo") : std::string(200, 'x'); + ASSERT_OK(Put(key, "v1")); + const Snapshot* s1 = db_->GetSnapshot(); + ASSERT_OK(Put(key, "v2")); + ASSERT_EQ("v2", Get(key)); + ASSERT_EQ("v1", Get(key, s1)); + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ("v2", Get(key)); + ASSERT_EQ("v1", Get(key, s1)); + db_->ReleaseSnapshot(s1); + } + } while (ChangeOptions()); +} + +TEST(DBTest, GetLevel0Ordering) { + do { + // Check that we process level-0 files in correct order. The code + // below generates two level-0 files where the earlier one comes + // before the later one in the level-0 file list since the earlier + // one has a smaller "smallest" key. + ASSERT_OK(Put("bar", "b")); + ASSERT_OK(Put("foo", "v1")); + dbfull()->TEST_CompactMemTable(); + ASSERT_OK(Put("foo", "v2")); + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ("v2", Get("foo")); + } while (ChangeOptions()); +} + +TEST(DBTest, GetOrderedByLevels) { + do { + ASSERT_OK(Put("foo", "v1")); + Compact("a", "z"); + ASSERT_EQ("v1", Get("foo")); + ASSERT_OK(Put("foo", "v2")); + ASSERT_EQ("v2", Get("foo")); + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ("v2", Get("foo")); + } while (ChangeOptions()); +} + +TEST(DBTest, GetPicksCorrectFile) { + do { + // Arrange to have multiple files in a non-level-0 level. + ASSERT_OK(Put("a", "va")); + Compact("a", "b"); + ASSERT_OK(Put("x", "vx")); + Compact("x", "y"); + ASSERT_OK(Put("f", "vf")); + Compact("f", "g"); + ASSERT_EQ("va", Get("a")); + ASSERT_EQ("vf", Get("f")); + ASSERT_EQ("vx", Get("x")); + } while (ChangeOptions()); +} + +TEST(DBTest, GetEncountersEmptyLevel) { + do { + // Arrange for the following to happen: + // * sstable A in level 0 + // * nothing in level 1 + // * sstable B in level 2 + // Then do enough Get() calls to arrange for an automatic compaction + // of sstable A. A bug would cause the compaction to be marked as + // occuring at level 1 (instead of the correct level 0). + + // Step 1: First place sstables in levels 0 and 2 + int compaction_count = 0; + while (NumTableFilesAtLevel(0) == 0 || + NumTableFilesAtLevel(2) == 0) { + ASSERT_LE(compaction_count, 100) << "could not fill levels 0 and 2"; + compaction_count++; + Put("a", "begin"); + Put("z", "end"); + dbfull()->TEST_CompactMemTable(); + } + + // Step 2: clear level 1 if necessary. + dbfull()->TEST_CompactRange(1, NULL, NULL); + ASSERT_EQ(NumTableFilesAtLevel(0), 1); + ASSERT_EQ(NumTableFilesAtLevel(1), 0); + ASSERT_EQ(NumTableFilesAtLevel(2), 1); + + // Step 3: read a bunch of times + for (int i = 0; i < 1000; i++) { + ASSERT_EQ("NOT_FOUND", Get("missing")); + } + + // Step 4: Wait for compaction to finish + DelayMilliseconds(1000); + + ASSERT_EQ(NumTableFilesAtLevel(0), 0); + } while (ChangeOptions()); +} + +TEST(DBTest, IterEmpty) { + Iterator* iter = db_->NewIterator(ReadOptions()); + + iter->SeekToFirst(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + iter->SeekToLast(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + iter->Seek("foo"); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + delete iter; +} + +TEST(DBTest, IterSingle) { + ASSERT_OK(Put("a", "va")); + Iterator* iter = db_->NewIterator(ReadOptions()); + + iter->SeekToFirst(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + iter->SeekToFirst(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + iter->SeekToLast(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + iter->SeekToLast(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + iter->Seek(""); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + iter->Seek("a"); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + iter->Seek("b"); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + delete iter; +} + +TEST(DBTest, IterMulti) { + ASSERT_OK(Put("a", "va")); + ASSERT_OK(Put("b", "vb")); + ASSERT_OK(Put("c", "vc")); + Iterator* iter = db_->NewIterator(ReadOptions()); + + iter->SeekToFirst(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "b->vb"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "c->vc"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + iter->SeekToFirst(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + iter->SeekToLast(); + ASSERT_EQ(IterStatus(iter), "c->vc"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "b->vb"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + iter->SeekToLast(); + ASSERT_EQ(IterStatus(iter), "c->vc"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + iter->Seek(""); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Seek("a"); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Seek("ax"); + ASSERT_EQ(IterStatus(iter), "b->vb"); + iter->Seek("b"); + ASSERT_EQ(IterStatus(iter), "b->vb"); + iter->Seek("z"); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + // Switch from reverse to forward + iter->SeekToLast(); + iter->Prev(); + iter->Prev(); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "b->vb"); + + // Switch from forward to reverse + iter->SeekToFirst(); + iter->Next(); + iter->Next(); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "b->vb"); + + // Make sure iter stays at snapshot + ASSERT_OK(Put("a", "va2")); + ASSERT_OK(Put("a2", "va3")); + ASSERT_OK(Put("b", "vb2")); + ASSERT_OK(Put("c", "vc2")); + ASSERT_OK(Delete("b")); + iter->SeekToFirst(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "b->vb"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "c->vc"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + iter->SeekToLast(); + ASSERT_EQ(IterStatus(iter), "c->vc"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "b->vb"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + delete iter; +} + +TEST(DBTest, IterSmallAndLargeMix) { + ASSERT_OK(Put("a", "va")); + ASSERT_OK(Put("b", std::string(100000, 'b'))); + ASSERT_OK(Put("c", "vc")); + ASSERT_OK(Put("d", std::string(100000, 'd'))); + ASSERT_OK(Put("e", std::string(100000, 'e'))); + + Iterator* iter = db_->NewIterator(ReadOptions()); + + iter->SeekToFirst(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "b->" + std::string(100000, 'b')); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "c->vc"); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "d->" + std::string(100000, 'd')); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "e->" + std::string(100000, 'e')); + iter->Next(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + iter->SeekToLast(); + ASSERT_EQ(IterStatus(iter), "e->" + std::string(100000, 'e')); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "d->" + std::string(100000, 'd')); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "c->vc"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "b->" + std::string(100000, 'b')); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "a->va"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "(invalid)"); + + delete iter; +} + +TEST(DBTest, IterMultiWithDelete) { + do { + ASSERT_OK(Put("a", "va")); + ASSERT_OK(Put("b", "vb")); + ASSERT_OK(Put("c", "vc")); + ASSERT_OK(Delete("b")); + ASSERT_EQ("NOT_FOUND", Get("b")); + + Iterator* iter = db_->NewIterator(ReadOptions()); + iter->Seek("c"); + ASSERT_EQ(IterStatus(iter), "c->vc"); + iter->Prev(); + ASSERT_EQ(IterStatus(iter), "a->va"); + delete iter; + } while (ChangeOptions()); +} + +TEST(DBTest, Recover) { + do { + ASSERT_OK(Put("foo", "v1")); + ASSERT_OK(Put("baz", "v5")); + + Reopen(); + ASSERT_EQ("v1", Get("foo")); + + ASSERT_EQ("v1", Get("foo")); + ASSERT_EQ("v5", Get("baz")); + ASSERT_OK(Put("bar", "v2")); + ASSERT_OK(Put("foo", "v3")); + + Reopen(); + ASSERT_EQ("v3", Get("foo")); + ASSERT_OK(Put("foo", "v4")); + ASSERT_EQ("v4", Get("foo")); + ASSERT_EQ("v2", Get("bar")); + ASSERT_EQ("v5", Get("baz")); + } while (ChangeOptions()); +} + +TEST(DBTest, RecoveryWithEmptyLog) { + do { + ASSERT_OK(Put("foo", "v1")); + ASSERT_OK(Put("foo", "v2")); + Reopen(); + Reopen(); + ASSERT_OK(Put("foo", "v3")); + Reopen(); + ASSERT_EQ("v3", Get("foo")); + } while (ChangeOptions()); +} + +// Check that writes done during a memtable compaction are recovered +// if the database is shutdown during the memtable compaction. +TEST(DBTest, RecoverDuringMemtableCompaction) { + do { + Options options = CurrentOptions(); + options.env = env_; + options.write_buffer_size = 1000000; + Reopen(&options); + + // Trigger a long memtable compaction and reopen the database during it + ASSERT_OK(Put("foo", "v1")); // Goes to 1st log file + ASSERT_OK(Put("big1", std::string(10000000, 'x'))); // Fills memtable + ASSERT_OK(Put("big2", std::string(1000, 'y'))); // Triggers compaction + ASSERT_OK(Put("bar", "v2")); // Goes to new log file + + Reopen(&options); + ASSERT_EQ("v1", Get("foo")); + ASSERT_EQ("v2", Get("bar")); + ASSERT_EQ(std::string(10000000, 'x'), Get("big1")); + ASSERT_EQ(std::string(1000, 'y'), Get("big2")); + } while (ChangeOptions()); +} + +static std::string Key(int i) { + char buf[100]; + snprintf(buf, sizeof(buf), "key%06d", i); + return std::string(buf); +} + +TEST(DBTest, MinorCompactionsHappen) { + Options options = CurrentOptions(); + options.write_buffer_size = 10000; + Reopen(&options); + + const int N = 500; + + int starting_num_tables = TotalTableFiles(); + for (int i = 0; i < N; i++) { + ASSERT_OK(Put(Key(i), Key(i) + std::string(1000, 'v'))); + } + int ending_num_tables = TotalTableFiles(); + ASSERT_GT(ending_num_tables, starting_num_tables); + + for (int i = 0; i < N; i++) { + ASSERT_EQ(Key(i) + std::string(1000, 'v'), Get(Key(i))); + } + + Reopen(); + + for (int i = 0; i < N; i++) { + ASSERT_EQ(Key(i) + std::string(1000, 'v'), Get(Key(i))); + } +} + +TEST(DBTest, RecoverWithLargeLog) { + { + Options options = CurrentOptions(); + Reopen(&options); + ASSERT_OK(Put("big1", std::string(200000, '1'))); + ASSERT_OK(Put("big2", std::string(200000, '2'))); + ASSERT_OK(Put("small3", std::string(10, '3'))); + ASSERT_OK(Put("small4", std::string(10, '4'))); + ASSERT_EQ(NumTableFilesAtLevel(0), 0); + } + + // Make sure that if we re-open with a small write buffer size that + // we flush table files in the middle of a large log file. + Options options = CurrentOptions(); + options.write_buffer_size = 100000; + Reopen(&options); + ASSERT_EQ(NumTableFilesAtLevel(0), 3); + ASSERT_EQ(std::string(200000, '1'), Get("big1")); + ASSERT_EQ(std::string(200000, '2'), Get("big2")); + ASSERT_EQ(std::string(10, '3'), Get("small3")); + ASSERT_EQ(std::string(10, '4'), Get("small4")); + ASSERT_GT(NumTableFilesAtLevel(0), 1); +} + +TEST(DBTest, CompactionsGenerateMultipleFiles) { + Options options = CurrentOptions(); + options.write_buffer_size = 100000000; // Large write buffer + Reopen(&options); + + Random rnd(301); + + // Write 8MB (80 values, each 100K) + ASSERT_EQ(NumTableFilesAtLevel(0), 0); + std::vector values; + for (int i = 0; i < 80; i++) { + values.push_back(RandomString(&rnd, 100000)); + ASSERT_OK(Put(Key(i), values[i])); + } + + // Reopening moves updates to level-0 + Reopen(&options); + dbfull()->TEST_CompactRange(0, NULL, NULL); + + ASSERT_EQ(NumTableFilesAtLevel(0), 0); + ASSERT_GT(NumTableFilesAtLevel(1), 1); + for (int i = 0; i < 80; i++) { + ASSERT_EQ(Get(Key(i)), values[i]); + } +} + +TEST(DBTest, RepeatedWritesToSameKey) { + Options options = CurrentOptions(); + options.env = env_; + options.write_buffer_size = 100000; // Small write buffer + Reopen(&options); + + // We must have at most one file per level except for level-0, + // which may have up to kL0_StopWritesTrigger files. + const int kMaxFiles = config::kNumLevels + config::kL0_StopWritesTrigger; + + Random rnd(301); + std::string value = RandomString(&rnd, 2 * options.write_buffer_size); + for (int i = 0; i < 5 * kMaxFiles; i++) { + Put("key", value); + ASSERT_LE(TotalTableFiles(), kMaxFiles); + fprintf(stderr, "after %d: %d files\n", int(i+1), TotalTableFiles()); + } +} + +TEST(DBTest, SparseMerge) { + Options options = CurrentOptions(); + options.compression = kNoCompression; + Reopen(&options); + + FillLevels("A", "Z"); + + // Suppose there is: + // small amount of data with prefix A + // large amount of data with prefix B + // small amount of data with prefix C + // and that recent updates have made small changes to all three prefixes. + // Check that we do not do a compaction that merges all of B in one shot. + const std::string value(1000, 'x'); + Put("A", "va"); + // Write approximately 100MB of "B" values + for (int i = 0; i < 100000; i++) { + char key[100]; + snprintf(key, sizeof(key), "B%010d", i); + Put(key, value); + } + Put("C", "vc"); + dbfull()->TEST_CompactMemTable(); + dbfull()->TEST_CompactRange(0, NULL, NULL); + + // Make sparse update + Put("A", "va2"); + Put("B100", "bvalue2"); + Put("C", "vc2"); + dbfull()->TEST_CompactMemTable(); + + // Compactions should not cause us to create a situation where + // a file overlaps too much data at the next level. + ASSERT_LE(dbfull()->TEST_MaxNextLevelOverlappingBytes(), 20*1048576); + dbfull()->TEST_CompactRange(0, NULL, NULL); + ASSERT_LE(dbfull()->TEST_MaxNextLevelOverlappingBytes(), 20*1048576); + dbfull()->TEST_CompactRange(1, NULL, NULL); + ASSERT_LE(dbfull()->TEST_MaxNextLevelOverlappingBytes(), 20*1048576); +} + +static bool Between(uint64_t val, uint64_t low, uint64_t high) { + bool result = (val >= low) && (val <= high); + if (!result) { + fprintf(stderr, "Value %llu is not in range [%llu, %llu]\n", + (unsigned long long)(val), + (unsigned long long)(low), + (unsigned long long)(high)); + } + return result; +} + +TEST(DBTest, ApproximateSizes) { + do { + Options options = CurrentOptions(); + options.write_buffer_size = 100000000; // Large write buffer + options.compression = kNoCompression; + DestroyAndReopen(); + + ASSERT_TRUE(Between(Size("", "xyz"), 0, 0)); + Reopen(&options); + ASSERT_TRUE(Between(Size("", "xyz"), 0, 0)); + + // Write 8MB (80 values, each 100K) + ASSERT_EQ(NumTableFilesAtLevel(0), 0); + const int N = 80; + static const int S1 = 100000; + static const int S2 = 105000; // Allow some expansion from metadata + Random rnd(301); + for (int i = 0; i < N; i++) { + ASSERT_OK(Put(Key(i), RandomString(&rnd, S1))); + } + + // 0 because GetApproximateSizes() does not account for memtable space + ASSERT_TRUE(Between(Size("", Key(50)), 0, 0)); + + // Check sizes across recovery by reopening a few times + for (int run = 0; run < 3; run++) { + Reopen(&options); + + for (int compact_start = 0; compact_start < N; compact_start += 10) { + for (int i = 0; i < N; i += 10) { + ASSERT_TRUE(Between(Size("", Key(i)), S1*i, S2*i)); + ASSERT_TRUE(Between(Size("", Key(i)+".suffix"), S1*(i+1), S2*(i+1))); + ASSERT_TRUE(Between(Size(Key(i), Key(i+10)), S1*10, S2*10)); + } + ASSERT_TRUE(Between(Size("", Key(50)), S1*50, S2*50)); + ASSERT_TRUE(Between(Size("", Key(50)+".suffix"), S1*50, S2*50)); + + std::string cstart_str = Key(compact_start); + std::string cend_str = Key(compact_start + 9); + Slice cstart = cstart_str; + Slice cend = cend_str; + dbfull()->TEST_CompactRange(0, &cstart, &cend); + } + + ASSERT_EQ(NumTableFilesAtLevel(0), 0); + ASSERT_GT(NumTableFilesAtLevel(1), 0); + } + } while (ChangeOptions()); +} + +TEST(DBTest, ApproximateSizes_MixOfSmallAndLarge) { + do { + Options options = CurrentOptions(); + options.compression = kNoCompression; + Reopen(); + + Random rnd(301); + std::string big1 = RandomString(&rnd, 100000); + ASSERT_OK(Put(Key(0), RandomString(&rnd, 10000))); + ASSERT_OK(Put(Key(1), RandomString(&rnd, 10000))); + ASSERT_OK(Put(Key(2), big1)); + ASSERT_OK(Put(Key(3), RandomString(&rnd, 10000))); + ASSERT_OK(Put(Key(4), big1)); + ASSERT_OK(Put(Key(5), RandomString(&rnd, 10000))); + ASSERT_OK(Put(Key(6), RandomString(&rnd, 300000))); + ASSERT_OK(Put(Key(7), RandomString(&rnd, 10000))); + + // Check sizes across recovery by reopening a few times + for (int run = 0; run < 3; run++) { + Reopen(&options); + + ASSERT_TRUE(Between(Size("", Key(0)), 0, 0)); + ASSERT_TRUE(Between(Size("", Key(1)), 10000, 11000)); + ASSERT_TRUE(Between(Size("", Key(2)), 20000, 21000)); + ASSERT_TRUE(Between(Size("", Key(3)), 120000, 121000)); + ASSERT_TRUE(Between(Size("", Key(4)), 130000, 131000)); + ASSERT_TRUE(Between(Size("", Key(5)), 230000, 231000)); + ASSERT_TRUE(Between(Size("", Key(6)), 240000, 241000)); + ASSERT_TRUE(Between(Size("", Key(7)), 540000, 541000)); + ASSERT_TRUE(Between(Size("", Key(8)), 550000, 560000)); + + ASSERT_TRUE(Between(Size(Key(3), Key(5)), 110000, 111000)); + + dbfull()->TEST_CompactRange(0, NULL, NULL); + } + } while (ChangeOptions()); +} + +TEST(DBTest, IteratorPinsRef) { + Put("foo", "hello"); + + // Get iterator that will yield the current contents of the DB. + Iterator* iter = db_->NewIterator(ReadOptions()); + + // Write to force compactions + Put("foo", "newvalue1"); + for (int i = 0; i < 100; i++) { + ASSERT_OK(Put(Key(i), Key(i) + std::string(100000, 'v'))); // 100K values + } + Put("foo", "newvalue2"); + + iter->SeekToFirst(); + ASSERT_TRUE(iter->Valid()); + ASSERT_EQ("foo", iter->key().ToString()); + ASSERT_EQ("hello", iter->value().ToString()); + iter->Next(); + ASSERT_TRUE(!iter->Valid()); + delete iter; +} + +TEST(DBTest, Snapshot) { + do { + Put("foo", "v1"); + const Snapshot* s1 = db_->GetSnapshot(); + Put("foo", "v2"); + const Snapshot* s2 = db_->GetSnapshot(); + Put("foo", "v3"); + const Snapshot* s3 = db_->GetSnapshot(); + + Put("foo", "v4"); + ASSERT_EQ("v1", Get("foo", s1)); + ASSERT_EQ("v2", Get("foo", s2)); + ASSERT_EQ("v3", Get("foo", s3)); + ASSERT_EQ("v4", Get("foo")); + + db_->ReleaseSnapshot(s3); + ASSERT_EQ("v1", Get("foo", s1)); + ASSERT_EQ("v2", Get("foo", s2)); + ASSERT_EQ("v4", Get("foo")); + + db_->ReleaseSnapshot(s1); + ASSERT_EQ("v2", Get("foo", s2)); + ASSERT_EQ("v4", Get("foo")); + + db_->ReleaseSnapshot(s2); + ASSERT_EQ("v4", Get("foo")); + } while (ChangeOptions()); +} + +TEST(DBTest, HiddenValuesAreRemoved) { + do { + Random rnd(301); + FillLevels("a", "z"); + + std::string big = RandomString(&rnd, 50000); + Put("foo", big); + Put("pastfoo", "v"); + const Snapshot* snapshot = db_->GetSnapshot(); + Put("foo", "tiny"); + Put("pastfoo2", "v2"); // Advance sequence number one more + + ASSERT_OK(dbfull()->TEST_CompactMemTable()); + ASSERT_GT(NumTableFilesAtLevel(0), 0); + + ASSERT_EQ(big, Get("foo", snapshot)); + ASSERT_TRUE(Between(Size("", "pastfoo"), 50000, 60000)); + db_->ReleaseSnapshot(snapshot); + ASSERT_EQ(AllEntriesFor("foo"), "[ tiny, " + big + " ]"); + Slice x("x"); + dbfull()->TEST_CompactRange(0, NULL, &x); + ASSERT_EQ(AllEntriesFor("foo"), "[ tiny ]"); + ASSERT_EQ(NumTableFilesAtLevel(0), 0); + ASSERT_GE(NumTableFilesAtLevel(1), 1); + dbfull()->TEST_CompactRange(1, NULL, &x); + ASSERT_EQ(AllEntriesFor("foo"), "[ tiny ]"); + + ASSERT_TRUE(Between(Size("", "pastfoo"), 0, 1000)); + } while (ChangeOptions()); +} + +TEST(DBTest, DeletionMarkers1) { + Put("foo", "v1"); + ASSERT_OK(dbfull()->TEST_CompactMemTable()); + const int last = config::kMaxMemCompactLevel; + ASSERT_EQ(NumTableFilesAtLevel(last), 1); // foo => v1 is now in last level + + // Place a table at level last-1 to prevent merging with preceding mutation + Put("a", "begin"); + Put("z", "end"); + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ(NumTableFilesAtLevel(last), 1); + ASSERT_EQ(NumTableFilesAtLevel(last-1), 1); + + Delete("foo"); + Put("foo", "v2"); + ASSERT_EQ(AllEntriesFor("foo"), "[ v2, DEL, v1 ]"); + ASSERT_OK(dbfull()->TEST_CompactMemTable()); // Moves to level last-2 + ASSERT_EQ(AllEntriesFor("foo"), "[ v2, DEL, v1 ]"); + Slice z("z"); + dbfull()->TEST_CompactRange(last-2, NULL, &z); + // DEL eliminated, but v1 remains because we aren't compacting that level + // (DEL can be eliminated because v2 hides v1). + ASSERT_EQ(AllEntriesFor("foo"), "[ v2, v1 ]"); + dbfull()->TEST_CompactRange(last-1, NULL, NULL); + // Merging last-1 w/ last, so we are the base level for "foo", so + // DEL is removed. (as is v1). + ASSERT_EQ(AllEntriesFor("foo"), "[ v2 ]"); +} + +TEST(DBTest, DeletionMarkers2) { + Put("foo", "v1"); + ASSERT_OK(dbfull()->TEST_CompactMemTable()); + const int last = config::kMaxMemCompactLevel; + ASSERT_EQ(NumTableFilesAtLevel(last), 1); // foo => v1 is now in last level + + // Place a table at level last-1 to prevent merging with preceding mutation + Put("a", "begin"); + Put("z", "end"); + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ(NumTableFilesAtLevel(last), 1); + ASSERT_EQ(NumTableFilesAtLevel(last-1), 1); + + Delete("foo"); + ASSERT_EQ(AllEntriesFor("foo"), "[ DEL, v1 ]"); + ASSERT_OK(dbfull()->TEST_CompactMemTable()); // Moves to level last-2 + ASSERT_EQ(AllEntriesFor("foo"), "[ DEL, v1 ]"); + dbfull()->TEST_CompactRange(last-2, NULL, NULL); + // DEL kept: "last" file overlaps + ASSERT_EQ(AllEntriesFor("foo"), "[ DEL, v1 ]"); + dbfull()->TEST_CompactRange(last-1, NULL, NULL); + // Merging last-1 w/ last, so we are the base level for "foo", so + // DEL is removed. (as is v1). + ASSERT_EQ(AllEntriesFor("foo"), "[ ]"); +} + +TEST(DBTest, OverlapInLevel0) { + do { + ASSERT_EQ(config::kMaxMemCompactLevel, 2) << "Fix test to match config"; + + // Fill levels 1 and 2 to disable the pushing of new memtables to levels > 0. + ASSERT_OK(Put("100", "v100")); + ASSERT_OK(Put("999", "v999")); + dbfull()->TEST_CompactMemTable(); + ASSERT_OK(Delete("100")); + ASSERT_OK(Delete("999")); + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ("0,1,1", FilesPerLevel()); + + // Make files spanning the following ranges in level-0: + // files[0] 200 .. 900 + // files[1] 300 .. 500 + // Note that files are sorted by smallest key. + ASSERT_OK(Put("300", "v300")); + ASSERT_OK(Put("500", "v500")); + dbfull()->TEST_CompactMemTable(); + ASSERT_OK(Put("200", "v200")); + ASSERT_OK(Put("600", "v600")); + ASSERT_OK(Put("900", "v900")); + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ("2,1,1", FilesPerLevel()); + + // Compact away the placeholder files we created initially + dbfull()->TEST_CompactRange(1, NULL, NULL); + dbfull()->TEST_CompactRange(2, NULL, NULL); + ASSERT_EQ("2", FilesPerLevel()); + + // Do a memtable compaction. Before bug-fix, the compaction would + // not detect the overlap with level-0 files and would incorrectly place + // the deletion in a deeper level. + ASSERT_OK(Delete("600")); + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ("3", FilesPerLevel()); + ASSERT_EQ("NOT_FOUND", Get("600")); + } while (ChangeOptions()); +} + +TEST(DBTest, L0_CompactionBug_Issue44_a) { + Reopen(); + ASSERT_OK(Put("b", "v")); + Reopen(); + ASSERT_OK(Delete("b")); + ASSERT_OK(Delete("a")); + Reopen(); + ASSERT_OK(Delete("a")); + Reopen(); + ASSERT_OK(Put("a", "v")); + Reopen(); + Reopen(); + ASSERT_EQ("(a->v)", Contents()); + DelayMilliseconds(1000); // Wait for compaction to finish + ASSERT_EQ("(a->v)", Contents()); +} + +TEST(DBTest, L0_CompactionBug_Issue44_b) { + Reopen(); + Put("",""); + Reopen(); + Delete("e"); + Put("",""); + Reopen(); + Put("c", "cv"); + Reopen(); + Put("",""); + Reopen(); + Put("",""); + DelayMilliseconds(1000); // Wait for compaction to finish + Reopen(); + Put("d","dv"); + Reopen(); + Put("",""); + Reopen(); + Delete("d"); + Delete("b"); + Reopen(); + ASSERT_EQ("(->)(c->cv)", Contents()); + DelayMilliseconds(1000); // Wait for compaction to finish + ASSERT_EQ("(->)(c->cv)", Contents()); +} + +TEST(DBTest, ComparatorCheck) { + class NewComparator : public Comparator { + public: + virtual const char* Name() const { return "leveldb.NewComparator"; } + virtual int Compare(const Slice& a, const Slice& b) const { + return BytewiseComparator()->Compare(a, b); + } + virtual void FindShortestSeparator(std::string* s, const Slice& l) const { + BytewiseComparator()->FindShortestSeparator(s, l); + } + virtual void FindShortSuccessor(std::string* key) const { + BytewiseComparator()->FindShortSuccessor(key); + } + }; + NewComparator cmp; + Options new_options = CurrentOptions(); + new_options.comparator = &cmp; + Status s = TryReopen(&new_options); + ASSERT_TRUE(!s.ok()); + ASSERT_TRUE(s.ToString().find("comparator") != std::string::npos) + << s.ToString(); +} + +TEST(DBTest, CustomComparator) { + class NumberComparator : public Comparator { + public: + virtual const char* Name() const { return "test.NumberComparator"; } + virtual int Compare(const Slice& a, const Slice& b) const { + return ToNumber(a) - ToNumber(b); + } + virtual void FindShortestSeparator(std::string* s, const Slice& l) const { + ToNumber(*s); // Check format + ToNumber(l); // Check format + } + virtual void FindShortSuccessor(std::string* key) const { + ToNumber(*key); // Check format + } + private: + static int ToNumber(const Slice& x) { + // Check that there are no extra characters. + ASSERT_TRUE(x.size() >= 2 && x[0] == '[' && x[x.size()-1] == ']') + << EscapeString(x); + int val; + char ignored; + ASSERT_TRUE(sscanf(x.ToString().c_str(), "[%i]%c", &val, &ignored) == 1) + << EscapeString(x); + return val; + } + }; + NumberComparator cmp; + Options new_options = CurrentOptions(); + new_options.create_if_missing = true; + new_options.comparator = &cmp; + new_options.filter_policy = NULL; // Cannot use bloom filters + new_options.write_buffer_size = 1000; // Compact more often + DestroyAndReopen(&new_options); + ASSERT_OK(Put("[10]", "ten")); + ASSERT_OK(Put("[0x14]", "twenty")); + for (int i = 0; i < 2; i++) { + ASSERT_EQ("ten", Get("[10]")); + ASSERT_EQ("ten", Get("[0xa]")); + ASSERT_EQ("twenty", Get("[20]")); + ASSERT_EQ("twenty", Get("[0x14]")); + ASSERT_EQ("NOT_FOUND", Get("[15]")); + ASSERT_EQ("NOT_FOUND", Get("[0xf]")); + Compact("[0]", "[9999]"); + } + + for (int run = 0; run < 2; run++) { + for (int i = 0; i < 1000; i++) { + char buf[100]; + snprintf(buf, sizeof(buf), "[%d]", i*10); + ASSERT_OK(Put(buf, buf)); + } + Compact("[0]", "[1000000]"); + } +} + +TEST(DBTest, ManualCompaction) { + ASSERT_EQ(config::kMaxMemCompactLevel, 2) + << "Need to update this test to match kMaxMemCompactLevel"; + + MakeTables(3, "p", "q"); + ASSERT_EQ("1,1,1", FilesPerLevel()); + + // Compaction range falls before files + Compact("", "c"); + ASSERT_EQ("1,1,1", FilesPerLevel()); + + // Compaction range falls after files + Compact("r", "z"); + ASSERT_EQ("1,1,1", FilesPerLevel()); + + // Compaction range overlaps files + Compact("p1", "p9"); + ASSERT_EQ("0,0,1", FilesPerLevel()); + + // Populate a different range + MakeTables(3, "c", "e"); + ASSERT_EQ("1,1,2", FilesPerLevel()); + + // Compact just the new range + Compact("b", "f"); + ASSERT_EQ("0,0,2", FilesPerLevel()); + + // Compact all + MakeTables(1, "a", "z"); + ASSERT_EQ("0,1,2", FilesPerLevel()); + db_->CompactRange(NULL, NULL); + ASSERT_EQ("0,0,1", FilesPerLevel()); +} + +TEST(DBTest, DBOpen_Options) { + std::string dbname = test::TmpDir() + "/db_options_test"; + DestroyDB(dbname, Options()); + + // Does not exist, and create_if_missing == false: error + DB* db = NULL; + Options opts; + opts.create_if_missing = false; + Status s = DB::Open(opts, dbname, &db); + ASSERT_TRUE(strstr(s.ToString().c_str(), "does not exist") != NULL); + ASSERT_TRUE(db == NULL); + + // Does not exist, and create_if_missing == true: OK + opts.create_if_missing = true; + s = DB::Open(opts, dbname, &db); + ASSERT_OK(s); + ASSERT_TRUE(db != NULL); + + delete db; + db = NULL; + + // Does exist, and error_if_exists == true: error + opts.create_if_missing = false; + opts.error_if_exists = true; + s = DB::Open(opts, dbname, &db); + ASSERT_TRUE(strstr(s.ToString().c_str(), "exists") != NULL); + ASSERT_TRUE(db == NULL); + + // Does exist, and error_if_exists == false: OK + opts.create_if_missing = true; + opts.error_if_exists = false; + s = DB::Open(opts, dbname, &db); + ASSERT_OK(s); + ASSERT_TRUE(db != NULL); + + delete db; + db = NULL; +} + +TEST(DBTest, Locking) { + DB* db2 = NULL; + Status s = DB::Open(CurrentOptions(), dbname_, &db2); + ASSERT_TRUE(!s.ok()) << "Locking did not prevent re-opening db"; +} + +// Check that number of files does not grow when we are out of space +TEST(DBTest, NoSpace) { + Options options = CurrentOptions(); + options.env = env_; + Reopen(&options); + + ASSERT_OK(Put("foo", "v1")); + ASSERT_EQ("v1", Get("foo")); + Compact("a", "z"); + const int num_files = CountFiles(); + env_->no_space_.Release_Store(env_); // Force out-of-space errors + for (int i = 0; i < 10; i++) { + for (int level = 0; level < config::kNumLevels-1; level++) { + dbfull()->TEST_CompactRange(level, NULL, NULL); + } + } + env_->no_space_.Release_Store(NULL); + ASSERT_LT(CountFiles(), num_files + 3); +} + +TEST(DBTest, NonWritableFileSystem) { + Options options = CurrentOptions(); + options.write_buffer_size = 1000; + options.env = env_; + Reopen(&options); + ASSERT_OK(Put("foo", "v1")); + env_->non_writable_.Release_Store(env_); // Force errors for new files + std::string big(100000, 'x'); + int errors = 0; + for (int i = 0; i < 20; i++) { + fprintf(stderr, "iter %d; errors %d\n", i, errors); + if (!Put("foo", big).ok()) { + errors++; + DelayMilliseconds(100); + } + } + ASSERT_GT(errors, 0); + env_->non_writable_.Release_Store(NULL); +} + +TEST(DBTest, WriteSyncError) { + // Check that log sync errors cause the DB to disallow future writes. + + // (a) Cause log sync calls to fail + Options options = CurrentOptions(); + options.env = env_; + Reopen(&options); + env_->data_sync_error_.Release_Store(env_); + + // (b) Normal write should succeed + WriteOptions w; + ASSERT_OK(db_->Put(w, "k1", "v1")); + ASSERT_EQ("v1", Get("k1")); + + // (c) Do a sync write; should fail + w.sync = true; + ASSERT_TRUE(!db_->Put(w, "k2", "v2").ok()); + ASSERT_EQ("v1", Get("k1")); + ASSERT_EQ("NOT_FOUND", Get("k2")); + + // (d) make sync behave normally + env_->data_sync_error_.Release_Store(NULL); + + // (e) Do a non-sync write; should fail + w.sync = false; + ASSERT_TRUE(!db_->Put(w, "k3", "v3").ok()); + ASSERT_EQ("v1", Get("k1")); + ASSERT_EQ("NOT_FOUND", Get("k2")); + ASSERT_EQ("NOT_FOUND", Get("k3")); +} + +TEST(DBTest, ManifestWriteError) { + // Test for the following problem: + // (a) Compaction produces file F + // (b) Log record containing F is written to MANIFEST file, but Sync() fails + // (c) GC deletes F + // (d) After reopening DB, reads fail since deleted F is named in log record + + // We iterate twice. In the second iteration, everything is the + // same except the log record never makes it to the MANIFEST file. + for (int iter = 0; iter < 2; iter++) { + port::AtomicPointer* error_type = (iter == 0) + ? &env_->manifest_sync_error_ + : &env_->manifest_write_error_; + + // Insert foo=>bar mapping + Options options = CurrentOptions(); + options.env = env_; + options.create_if_missing = true; + options.error_if_exists = false; + DestroyAndReopen(&options); + ASSERT_OK(Put("foo", "bar")); + ASSERT_EQ("bar", Get("foo")); + + // Memtable compaction (will succeed) + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ("bar", Get("foo")); + const int last = config::kMaxMemCompactLevel; + ASSERT_EQ(NumTableFilesAtLevel(last), 1); // foo=>bar is now in last level + + // Merging compaction (will fail) + error_type->Release_Store(env_); + dbfull()->TEST_CompactRange(last, NULL, NULL); // Should fail + ASSERT_EQ("bar", Get("foo")); + + // Recovery: should not lose data + error_type->Release_Store(NULL); + Reopen(&options); + ASSERT_EQ("bar", Get("foo")); + } +} + +TEST(DBTest, MissingSSTFile) { + ASSERT_OK(Put("foo", "bar")); + ASSERT_EQ("bar", Get("foo")); + + // Dump the memtable to disk. + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ("bar", Get("foo")); + + Close(); + ASSERT_TRUE(DeleteAnSSTFile()); + Options options = CurrentOptions(); + options.paranoid_checks = true; + Status s = TryReopen(&options); + ASSERT_TRUE(!s.ok()); + ASSERT_TRUE(s.ToString().find("issing") != std::string::npos) + << s.ToString(); +} + +TEST(DBTest, StillReadSST) { + ASSERT_OK(Put("foo", "bar")); + ASSERT_EQ("bar", Get("foo")); + + // Dump the memtable to disk. + dbfull()->TEST_CompactMemTable(); + ASSERT_EQ("bar", Get("foo")); + Close(); + ASSERT_GT(RenameLDBToSST(), 0); + Options options = CurrentOptions(); + options.paranoid_checks = true; + Status s = TryReopen(&options); + ASSERT_TRUE(s.ok()); + ASSERT_EQ("bar", Get("foo")); +} + +TEST(DBTest, FilesDeletedAfterCompaction) { + ASSERT_OK(Put("foo", "v2")); + Compact("a", "z"); + const int num_files = CountFiles(); + for (int i = 0; i < 10; i++) { + ASSERT_OK(Put("foo", "v2")); + Compact("a", "z"); + } + ASSERT_EQ(CountFiles(), num_files); +} + +TEST(DBTest, BloomFilter) { + env_->count_random_reads_ = true; + Options options = CurrentOptions(); + options.env = env_; + options.block_cache = NewLRUCache(0); // Prevent cache hits + options.filter_policy = NewBloomFilterPolicy(10); + Reopen(&options); + + // Populate multiple layers + const int N = 10000; + for (int i = 0; i < N; i++) { + ASSERT_OK(Put(Key(i), Key(i))); + } + Compact("a", "z"); + for (int i = 0; i < N; i += 100) { + ASSERT_OK(Put(Key(i), Key(i))); + } + dbfull()->TEST_CompactMemTable(); + + // Prevent auto compactions triggered by seeks + env_->delay_data_sync_.Release_Store(env_); + + // Lookup present keys. Should rarely read from small sstable. + env_->random_read_counter_.Reset(); + for (int i = 0; i < N; i++) { + ASSERT_EQ(Key(i), Get(Key(i))); + } + int reads = env_->random_read_counter_.Read(); + fprintf(stderr, "%d present => %d reads\n", N, reads); + ASSERT_GE(reads, N); + ASSERT_LE(reads, N + 2*N/100); + + // Lookup present keys. Should rarely read from either sstable. + env_->random_read_counter_.Reset(); + for (int i = 0; i < N; i++) { + ASSERT_EQ("NOT_FOUND", Get(Key(i) + ".missing")); + } + reads = env_->random_read_counter_.Read(); + fprintf(stderr, "%d missing => %d reads\n", N, reads); + ASSERT_LE(reads, 3*N/100); + + env_->delay_data_sync_.Release_Store(NULL); + Close(); + delete options.block_cache; + delete options.filter_policy; +} + +// Multi-threaded test: +namespace { + +static const int kNumThreads = 4; +static const int kTestSeconds = 10; +static const int kNumKeys = 1000; + +struct MTState { + DBTest* test; + port::AtomicPointer stop; + port::AtomicPointer counter[kNumThreads]; + port::AtomicPointer thread_done[kNumThreads]; +}; + +struct MTThread { + MTState* state; + int id; +}; + +static void MTThreadBody(void* arg) { + MTThread* t = reinterpret_cast(arg); + int id = t->id; + DB* db = t->state->test->db_; + uintptr_t counter = 0; + fprintf(stderr, "... starting thread %d\n", id); + Random rnd(1000 + id); + std::string value; + char valbuf[1500]; + while (t->state->stop.Acquire_Load() == NULL) { + t->state->counter[id].Release_Store(reinterpret_cast(counter)); + + int key = rnd.Uniform(kNumKeys); + char keybuf[20]; + snprintf(keybuf, sizeof(keybuf), "%016d", key); + + if (rnd.OneIn(2)) { + // Write values of the form . + // We add some padding for force compactions. + snprintf(valbuf, sizeof(valbuf), "%d.%d.%-1000d", + key, id, static_cast(counter)); + ASSERT_OK(db->Put(WriteOptions(), Slice(keybuf), Slice(valbuf))); + } else { + // Read a value and verify that it matches the pattern written above. + Status s = db->Get(ReadOptions(), Slice(keybuf), &value); + if (s.IsNotFound()) { + // Key has not yet been written + } else { + // Check that the writer thread counter is >= the counter in the value + ASSERT_OK(s); + int k, w, c; + ASSERT_EQ(3, sscanf(value.c_str(), "%d.%d.%d", &k, &w, &c)) << value; + ASSERT_EQ(k, key); + ASSERT_GE(w, 0); + ASSERT_LT(w, kNumThreads); + ASSERT_LE(static_cast(c), reinterpret_cast( + t->state->counter[w].Acquire_Load())); + } + } + counter++; + } + t->state->thread_done[id].Release_Store(t); + fprintf(stderr, "... stopping thread %d after %d ops\n", id, int(counter)); +} + +} // namespace + +TEST(DBTest, MultiThreaded) { + do { + // Initialize state + MTState mt; + mt.test = this; + mt.stop.Release_Store(0); + for (int id = 0; id < kNumThreads; id++) { + mt.counter[id].Release_Store(0); + mt.thread_done[id].Release_Store(0); + } + + // Start threads + MTThread thread[kNumThreads]; + for (int id = 0; id < kNumThreads; id++) { + thread[id].state = &mt; + thread[id].id = id; + env_->StartThread(MTThreadBody, &thread[id]); + } + + // Let them run for a while + DelayMilliseconds(kTestSeconds * 1000); + + // Stop the threads and wait for them to finish + mt.stop.Release_Store(&mt); + for (int id = 0; id < kNumThreads; id++) { + while (mt.thread_done[id].Acquire_Load() == NULL) { + DelayMilliseconds(100); + } + } + } while (ChangeOptions()); +} + +namespace { +typedef std::map KVMap; +} + +class ModelDB: public DB { + public: + class ModelSnapshot : public Snapshot { + public: + KVMap map_; + }; + + explicit ModelDB(const Options& options): options_(options) { } + ~ModelDB() { } + virtual Status Put(const WriteOptions& o, const Slice& k, const Slice& v) { + return DB::Put(o, k, v); + } + virtual Status Delete(const WriteOptions& o, const Slice& key) { + return DB::Delete(o, key); + } + virtual Status Get(const ReadOptions& options, + const Slice& key, std::string* value) { + assert(false); // Not implemented + return Status::NotFound(key); + } + virtual Iterator* NewIterator(const ReadOptions& options) { + if (options.snapshot == NULL) { + KVMap* saved = new KVMap; + *saved = map_; + return new ModelIter(saved, true); + } else { + const KVMap* snapshot_state = + &(reinterpret_cast(options.snapshot)->map_); + return new ModelIter(snapshot_state, false); + } + } + virtual const Snapshot* GetSnapshot() { + ModelSnapshot* snapshot = new ModelSnapshot; + snapshot->map_ = map_; + return snapshot; + } + + virtual void ReleaseSnapshot(const Snapshot* snapshot) { + delete reinterpret_cast(snapshot); + } + virtual Status Write(const WriteOptions& options, WriteBatch* batch) { + class Handler : public WriteBatch::Handler { + public: + KVMap* map_; + virtual void Put(const Slice& key, const Slice& value) { + (*map_)[key.ToString()] = value.ToString(); + } + virtual void Delete(const Slice& key) { + map_->erase(key.ToString()); + } + }; + Handler handler; + handler.map_ = &map_; + return batch->Iterate(&handler); + } + + virtual bool GetProperty(const Slice& property, std::string* value) { + return false; + } + virtual void GetApproximateSizes(const Range* r, int n, uint64_t* sizes) { + for (int i = 0; i < n; i++) { + sizes[i] = 0; + } + } + virtual void CompactRange(const Slice* start, const Slice* end) { + } + + private: + class ModelIter: public Iterator { + public: + ModelIter(const KVMap* map, bool owned) + : map_(map), owned_(owned), iter_(map_->end()) { + } + ~ModelIter() { + if (owned_) delete map_; + } + virtual bool Valid() const { return iter_ != map_->end(); } + virtual void SeekToFirst() { iter_ = map_->begin(); } + virtual void SeekToLast() { + if (map_->empty()) { + iter_ = map_->end(); + } else { + iter_ = map_->find(map_->rbegin()->first); + } + } + virtual void Seek(const Slice& k) { + iter_ = map_->lower_bound(k.ToString()); + } + virtual void Next() { ++iter_; } + virtual void Prev() { --iter_; } + virtual Slice key() const { return iter_->first; } + virtual Slice value() const { return iter_->second; } + virtual Status status() const { return Status::OK(); } + private: + const KVMap* const map_; + const bool owned_; // Do we own map_ + KVMap::const_iterator iter_; + }; + const Options options_; + KVMap map_; +}; + +static std::string RandomKey(Random* rnd) { + int len = (rnd->OneIn(3) + ? 1 // Short sometimes to encourage collisions + : (rnd->OneIn(100) ? rnd->Skewed(10) : rnd->Uniform(10))); + return test::RandomKey(rnd, len); +} + +static bool CompareIterators(int step, + DB* model, + DB* db, + const Snapshot* model_snap, + const Snapshot* db_snap) { + ReadOptions options; + options.snapshot = model_snap; + Iterator* miter = model->NewIterator(options); + options.snapshot = db_snap; + Iterator* dbiter = db->NewIterator(options); + bool ok = true; + int count = 0; + for (miter->SeekToFirst(), dbiter->SeekToFirst(); + ok && miter->Valid() && dbiter->Valid(); + miter->Next(), dbiter->Next()) { + count++; + if (miter->key().compare(dbiter->key()) != 0) { + fprintf(stderr, "step %d: Key mismatch: '%s' vs. '%s'\n", + step, + EscapeString(miter->key()).c_str(), + EscapeString(dbiter->key()).c_str()); + ok = false; + break; + } + + if (miter->value().compare(dbiter->value()) != 0) { + fprintf(stderr, "step %d: Value mismatch for key '%s': '%s' vs. '%s'\n", + step, + EscapeString(miter->key()).c_str(), + EscapeString(miter->value()).c_str(), + EscapeString(miter->value()).c_str()); + ok = false; + } + } + + if (ok) { + if (miter->Valid() != dbiter->Valid()) { + fprintf(stderr, "step %d: Mismatch at end of iterators: %d vs. %d\n", + step, miter->Valid(), dbiter->Valid()); + ok = false; + } + } + fprintf(stderr, "%d entries compared: ok=%d\n", count, ok); + delete miter; + delete dbiter; + return ok; +} + +TEST(DBTest, Randomized) { + Random rnd(test::RandomSeed()); + do { + ModelDB model(CurrentOptions()); + const int N = 10000; + const Snapshot* model_snap = NULL; + const Snapshot* db_snap = NULL; + std::string k, v; + for (int step = 0; step < N; step++) { + if (step % 100 == 0) { + fprintf(stderr, "Step %d of %d\n", step, N); + } + // TODO(sanjay): Test Get() works + int p = rnd.Uniform(100); + if (p < 45) { // Put + k = RandomKey(&rnd); + v = RandomString(&rnd, + rnd.OneIn(20) + ? 100 + rnd.Uniform(100) + : rnd.Uniform(8)); + ASSERT_OK(model.Put(WriteOptions(), k, v)); + ASSERT_OK(db_->Put(WriteOptions(), k, v)); + + } else if (p < 90) { // Delete + k = RandomKey(&rnd); + ASSERT_OK(model.Delete(WriteOptions(), k)); + ASSERT_OK(db_->Delete(WriteOptions(), k)); + + + } else { // Multi-element batch + WriteBatch b; + const int num = rnd.Uniform(8); + for (int i = 0; i < num; i++) { + if (i == 0 || !rnd.OneIn(10)) { + k = RandomKey(&rnd); + } else { + // Periodically re-use the same key from the previous iter, so + // we have multiple entries in the write batch for the same key + } + if (rnd.OneIn(2)) { + v = RandomString(&rnd, rnd.Uniform(10)); + b.Put(k, v); + } else { + b.Delete(k); + } + } + ASSERT_OK(model.Write(WriteOptions(), &b)); + ASSERT_OK(db_->Write(WriteOptions(), &b)); + } + + if ((step % 100) == 0) { + ASSERT_TRUE(CompareIterators(step, &model, db_, NULL, NULL)); + ASSERT_TRUE(CompareIterators(step, &model, db_, model_snap, db_snap)); + // Save a snapshot from each DB this time that we'll use next + // time we compare things, to make sure the current state is + // preserved with the snapshot + if (model_snap != NULL) model.ReleaseSnapshot(model_snap); + if (db_snap != NULL) db_->ReleaseSnapshot(db_snap); + + Reopen(); + ASSERT_TRUE(CompareIterators(step, &model, db_, NULL, NULL)); + + model_snap = model.GetSnapshot(); + db_snap = db_->GetSnapshot(); + } + } + if (model_snap != NULL) model.ReleaseSnapshot(model_snap); + if (db_snap != NULL) db_->ReleaseSnapshot(db_snap); + } while (ChangeOptions()); +} + +std::string MakeKey(unsigned int num) { + char buf[30]; + snprintf(buf, sizeof(buf), "%016u", num); + return std::string(buf); +} + +void BM_LogAndApply(int iters, int num_base_files) { + std::string dbname = test::TmpDir() + "/leveldb_test_benchmark"; + DestroyDB(dbname, Options()); + + DB* db = NULL; + Options opts; + opts.create_if_missing = true; + Status s = DB::Open(opts, dbname, &db); + ASSERT_OK(s); + ASSERT_TRUE(db != NULL); + + delete db; + db = NULL; + + Env* env = Env::Default(); + + port::Mutex mu; + MutexLock l(&mu); + + InternalKeyComparator cmp(BytewiseComparator()); + Options options; + VersionSet vset(dbname, &options, NULL, &cmp); + ASSERT_OK(vset.Recover()); + VersionEdit vbase; + uint64_t fnum = 1; + for (int i = 0; i < num_base_files; i++) { + InternalKey start(MakeKey(2*fnum), 1, kTypeValue); + InternalKey limit(MakeKey(2*fnum+1), 1, kTypeDeletion); + vbase.AddFile(2, fnum++, 1 /* file size */, start, limit); + } + ASSERT_OK(vset.LogAndApply(&vbase, &mu)); + + uint64_t start_micros = env->NowMicros(); + + for (int i = 0; i < iters; i++) { + VersionEdit vedit; + vedit.DeleteFile(2, fnum); + InternalKey start(MakeKey(2*fnum), 1, kTypeValue); + InternalKey limit(MakeKey(2*fnum+1), 1, kTypeDeletion); + vedit.AddFile(2, fnum++, 1 /* file size */, start, limit); + vset.LogAndApply(&vedit, &mu); + } + uint64_t stop_micros = env->NowMicros(); + unsigned int us = stop_micros - start_micros; + char buf[16]; + snprintf(buf, sizeof(buf), "%d", num_base_files); + fprintf(stderr, + "BM_LogAndApply/%-6s %8d iters : %9u us (%7.0f us / iter)\n", + buf, iters, us, ((float)us) / iters); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + if (argc > 1 && std::string(argv[1]) == "--benchmark") { + leveldb::BM_LogAndApply(1000, 1); + leveldb::BM_LogAndApply(1000, 100); + leveldb::BM_LogAndApply(1000, 10000); + leveldb::BM_LogAndApply(100, 100000); + return 0; + } + + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/db/dbformat.cc b/src/leveldb/db/dbformat.cc new file mode 100644 index 0000000..20a7ca4 --- /dev/null +++ b/src/leveldb/db/dbformat.cc @@ -0,0 +1,140 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include "db/dbformat.h" +#include "port/port.h" +#include "util/coding.h" + +namespace leveldb { + +static uint64_t PackSequenceAndType(uint64_t seq, ValueType t) { + assert(seq <= kMaxSequenceNumber); + assert(t <= kValueTypeForSeek); + return (seq << 8) | t; +} + +void AppendInternalKey(std::string* result, const ParsedInternalKey& key) { + result->append(key.user_key.data(), key.user_key.size()); + PutFixed64(result, PackSequenceAndType(key.sequence, key.type)); +} + +std::string ParsedInternalKey::DebugString() const { + char buf[50]; + snprintf(buf, sizeof(buf), "' @ %llu : %d", + (unsigned long long) sequence, + int(type)); + std::string result = "'"; + result += EscapeString(user_key.ToString()); + result += buf; + return result; +} + +std::string InternalKey::DebugString() const { + std::string result; + ParsedInternalKey parsed; + if (ParseInternalKey(rep_, &parsed)) { + result = parsed.DebugString(); + } else { + result = "(bad)"; + result.append(EscapeString(rep_)); + } + return result; +} + +const char* InternalKeyComparator::Name() const { + return "leveldb.InternalKeyComparator"; +} + +int InternalKeyComparator::Compare(const Slice& akey, const Slice& bkey) const { + // Order by: + // increasing user key (according to user-supplied comparator) + // decreasing sequence number + // decreasing type (though sequence# should be enough to disambiguate) + int r = user_comparator_->Compare(ExtractUserKey(akey), ExtractUserKey(bkey)); + if (r == 0) { + const uint64_t anum = DecodeFixed64(akey.data() + akey.size() - 8); + const uint64_t bnum = DecodeFixed64(bkey.data() + bkey.size() - 8); + if (anum > bnum) { + r = -1; + } else if (anum < bnum) { + r = +1; + } + } + return r; +} + +void InternalKeyComparator::FindShortestSeparator( + std::string* start, + const Slice& limit) const { + // Attempt to shorten the user portion of the key + Slice user_start = ExtractUserKey(*start); + Slice user_limit = ExtractUserKey(limit); + std::string tmp(user_start.data(), user_start.size()); + user_comparator_->FindShortestSeparator(&tmp, user_limit); + if (tmp.size() < user_start.size() && + user_comparator_->Compare(user_start, tmp) < 0) { + // User key has become shorter physically, but larger logically. + // Tack on the earliest possible number to the shortened user key. + PutFixed64(&tmp, PackSequenceAndType(kMaxSequenceNumber,kValueTypeForSeek)); + assert(this->Compare(*start, tmp) < 0); + assert(this->Compare(tmp, limit) < 0); + start->swap(tmp); + } +} + +void InternalKeyComparator::FindShortSuccessor(std::string* key) const { + Slice user_key = ExtractUserKey(*key); + std::string tmp(user_key.data(), user_key.size()); + user_comparator_->FindShortSuccessor(&tmp); + if (tmp.size() < user_key.size() && + user_comparator_->Compare(user_key, tmp) < 0) { + // User key has become shorter physically, but larger logically. + // Tack on the earliest possible number to the shortened user key. + PutFixed64(&tmp, PackSequenceAndType(kMaxSequenceNumber,kValueTypeForSeek)); + assert(this->Compare(*key, tmp) < 0); + key->swap(tmp); + } +} + +const char* InternalFilterPolicy::Name() const { + return user_policy_->Name(); +} + +void InternalFilterPolicy::CreateFilter(const Slice* keys, int n, + std::string* dst) const { + // We rely on the fact that the code in table.cc does not mind us + // adjusting keys[]. + Slice* mkey = const_cast(keys); + for (int i = 0; i < n; i++) { + mkey[i] = ExtractUserKey(keys[i]); + // TODO(sanjay): Suppress dups? + } + user_policy_->CreateFilter(keys, n, dst); +} + +bool InternalFilterPolicy::KeyMayMatch(const Slice& key, const Slice& f) const { + return user_policy_->KeyMayMatch(ExtractUserKey(key), f); +} + +LookupKey::LookupKey(const Slice& user_key, SequenceNumber s) { + size_t usize = user_key.size(); + size_t needed = usize + 13; // A conservative estimate + char* dst; + if (needed <= sizeof(space_)) { + dst = space_; + } else { + dst = new char[needed]; + } + start_ = dst; + dst = EncodeVarint32(dst, usize + 8); + kstart_ = dst; + memcpy(dst, user_key.data(), usize); + dst += usize; + EncodeFixed64(dst, PackSequenceAndType(s, kValueTypeForSeek)); + dst += 8; + end_ = dst; +} + +} // namespace leveldb diff --git a/src/leveldb/db/dbformat.h b/src/leveldb/db/dbformat.h new file mode 100644 index 0000000..5d8a032 --- /dev/null +++ b/src/leveldb/db/dbformat.h @@ -0,0 +1,230 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_DB_FORMAT_H_ +#define STORAGE_LEVELDB_DB_FORMAT_H_ + +#include +#include "leveldb/comparator.h" +#include "leveldb/db.h" +#include "leveldb/filter_policy.h" +#include "leveldb/slice.h" +#include "leveldb/table_builder.h" +#include "util/coding.h" +#include "util/logging.h" + +namespace leveldb { + +// Grouping of constants. We may want to make some of these +// parameters set via options. +namespace config { +static const int kNumLevels = 7; + +// Level-0 compaction is started when we hit this many files. +static const int kL0_CompactionTrigger = 4; + +// Soft limit on number of level-0 files. We slow down writes at this point. +static const int kL0_SlowdownWritesTrigger = 8; + +// Maximum number of level-0 files. We stop writes at this point. +static const int kL0_StopWritesTrigger = 12; + +// Maximum level to which a new compacted memtable is pushed if it +// does not create overlap. We try to push to level 2 to avoid the +// relatively expensive level 0=>1 compactions and to avoid some +// expensive manifest file operations. We do not push all the way to +// the largest level since that can generate a lot of wasted disk +// space if the same key space is being repeatedly overwritten. +static const int kMaxMemCompactLevel = 2; + +// Approximate gap in bytes between samples of data read during iteration. +static const int kReadBytesPeriod = 1048576; + +} // namespace config + +class InternalKey; + +// Value types encoded as the last component of internal keys. +// DO NOT CHANGE THESE ENUM VALUES: they are embedded in the on-disk +// data structures. +enum ValueType { + kTypeDeletion = 0x0, + kTypeValue = 0x1 +}; +// kValueTypeForSeek defines the ValueType that should be passed when +// constructing a ParsedInternalKey object for seeking to a particular +// sequence number (since we sort sequence numbers in decreasing order +// and the value type is embedded as the low 8 bits in the sequence +// number in internal keys, we need to use the highest-numbered +// ValueType, not the lowest). +static const ValueType kValueTypeForSeek = kTypeValue; + +typedef uint64_t SequenceNumber; + +// We leave eight bits empty at the bottom so a type and sequence# +// can be packed together into 64-bits. +static const SequenceNumber kMaxSequenceNumber = + ((0x1ull << 56) - 1); + +struct ParsedInternalKey { + Slice user_key; + SequenceNumber sequence; + ValueType type; + + ParsedInternalKey() { } // Intentionally left uninitialized (for speed) + ParsedInternalKey(const Slice& u, const SequenceNumber& seq, ValueType t) + : user_key(u), sequence(seq), type(t) { } + std::string DebugString() const; +}; + +// Return the length of the encoding of "key". +inline size_t InternalKeyEncodingLength(const ParsedInternalKey& key) { + return key.user_key.size() + 8; +} + +// Append the serialization of "key" to *result. +extern void AppendInternalKey(std::string* result, + const ParsedInternalKey& key); + +// Attempt to parse an internal key from "internal_key". On success, +// stores the parsed data in "*result", and returns true. +// +// On error, returns false, leaves "*result" in an undefined state. +extern bool ParseInternalKey(const Slice& internal_key, + ParsedInternalKey* result); + +// Returns the user key portion of an internal key. +inline Slice ExtractUserKey(const Slice& internal_key) { + assert(internal_key.size() >= 8); + return Slice(internal_key.data(), internal_key.size() - 8); +} + +inline ValueType ExtractValueType(const Slice& internal_key) { + assert(internal_key.size() >= 8); + const size_t n = internal_key.size(); + uint64_t num = DecodeFixed64(internal_key.data() + n - 8); + unsigned char c = num & 0xff; + return static_cast(c); +} + +// A comparator for internal keys that uses a specified comparator for +// the user key portion and breaks ties by decreasing sequence number. +class InternalKeyComparator : public Comparator { + private: + const Comparator* user_comparator_; + public: + explicit InternalKeyComparator(const Comparator* c) : user_comparator_(c) { } + virtual const char* Name() const; + virtual int Compare(const Slice& a, const Slice& b) const; + virtual void FindShortestSeparator( + std::string* start, + const Slice& limit) const; + virtual void FindShortSuccessor(std::string* key) const; + + const Comparator* user_comparator() const { return user_comparator_; } + + int Compare(const InternalKey& a, const InternalKey& b) const; +}; + +// Filter policy wrapper that converts from internal keys to user keys +class InternalFilterPolicy : public FilterPolicy { + private: + const FilterPolicy* const user_policy_; + public: + explicit InternalFilterPolicy(const FilterPolicy* p) : user_policy_(p) { } + virtual const char* Name() const; + virtual void CreateFilter(const Slice* keys, int n, std::string* dst) const; + virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const; +}; + +// Modules in this directory should keep internal keys wrapped inside +// the following class instead of plain strings so that we do not +// incorrectly use string comparisons instead of an InternalKeyComparator. +class InternalKey { + private: + std::string rep_; + public: + InternalKey() { } // Leave rep_ as empty to indicate it is invalid + InternalKey(const Slice& user_key, SequenceNumber s, ValueType t) { + AppendInternalKey(&rep_, ParsedInternalKey(user_key, s, t)); + } + + void DecodeFrom(const Slice& s) { rep_.assign(s.data(), s.size()); } + Slice Encode() const { + assert(!rep_.empty()); + return rep_; + } + + Slice user_key() const { return ExtractUserKey(rep_); } + + void SetFrom(const ParsedInternalKey& p) { + rep_.clear(); + AppendInternalKey(&rep_, p); + } + + void Clear() { rep_.clear(); } + + std::string DebugString() const; +}; + +inline int InternalKeyComparator::Compare( + const InternalKey& a, const InternalKey& b) const { + return Compare(a.Encode(), b.Encode()); +} + +inline bool ParseInternalKey(const Slice& internal_key, + ParsedInternalKey* result) { + const size_t n = internal_key.size(); + if (n < 8) return false; + uint64_t num = DecodeFixed64(internal_key.data() + n - 8); + unsigned char c = num & 0xff; + result->sequence = num >> 8; + result->type = static_cast(c); + result->user_key = Slice(internal_key.data(), n - 8); + return (c <= static_cast(kTypeValue)); +} + +// A helper class useful for DBImpl::Get() +class LookupKey { + public: + // Initialize *this for looking up user_key at a snapshot with + // the specified sequence number. + LookupKey(const Slice& user_key, SequenceNumber sequence); + + ~LookupKey(); + + // Return a key suitable for lookup in a MemTable. + Slice memtable_key() const { return Slice(start_, end_ - start_); } + + // Return an internal key (suitable for passing to an internal iterator) + Slice internal_key() const { return Slice(kstart_, end_ - kstart_); } + + // Return the user key + Slice user_key() const { return Slice(kstart_, end_ - kstart_ - 8); } + + private: + // We construct a char array of the form: + // klength varint32 <-- start_ + // userkey char[klength] <-- kstart_ + // tag uint64 + // <-- end_ + // The array is a suitable MemTable key. + // The suffix starting with "userkey" can be used as an InternalKey. + const char* start_; + const char* kstart_; + const char* end_; + char space_[200]; // Avoid allocation for short keys + + // No copying allowed + LookupKey(const LookupKey&); + void operator=(const LookupKey&); +}; + +inline LookupKey::~LookupKey() { + if (start_ != space_) delete[] start_; +} + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_FORMAT_H_ diff --git a/src/leveldb/db/dbformat_test.cc b/src/leveldb/db/dbformat_test.cc new file mode 100644 index 0000000..5d82f5d --- /dev/null +++ b/src/leveldb/db/dbformat_test.cc @@ -0,0 +1,112 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/dbformat.h" +#include "util/logging.h" +#include "util/testharness.h" + +namespace leveldb { + +static std::string IKey(const std::string& user_key, + uint64_t seq, + ValueType vt) { + std::string encoded; + AppendInternalKey(&encoded, ParsedInternalKey(user_key, seq, vt)); + return encoded; +} + +static std::string Shorten(const std::string& s, const std::string& l) { + std::string result = s; + InternalKeyComparator(BytewiseComparator()).FindShortestSeparator(&result, l); + return result; +} + +static std::string ShortSuccessor(const std::string& s) { + std::string result = s; + InternalKeyComparator(BytewiseComparator()).FindShortSuccessor(&result); + return result; +} + +static void TestKey(const std::string& key, + uint64_t seq, + ValueType vt) { + std::string encoded = IKey(key, seq, vt); + + Slice in(encoded); + ParsedInternalKey decoded("", 0, kTypeValue); + + ASSERT_TRUE(ParseInternalKey(in, &decoded)); + ASSERT_EQ(key, decoded.user_key.ToString()); + ASSERT_EQ(seq, decoded.sequence); + ASSERT_EQ(vt, decoded.type); + + ASSERT_TRUE(!ParseInternalKey(Slice("bar"), &decoded)); +} + +class FormatTest { }; + +TEST(FormatTest, InternalKey_EncodeDecode) { + const char* keys[] = { "", "k", "hello", "longggggggggggggggggggggg" }; + const uint64_t seq[] = { + 1, 2, 3, + (1ull << 8) - 1, 1ull << 8, (1ull << 8) + 1, + (1ull << 16) - 1, 1ull << 16, (1ull << 16) + 1, + (1ull << 32) - 1, 1ull << 32, (1ull << 32) + 1 + }; + for (int k = 0; k < sizeof(keys) / sizeof(keys[0]); k++) { + for (int s = 0; s < sizeof(seq) / sizeof(seq[0]); s++) { + TestKey(keys[k], seq[s], kTypeValue); + TestKey("hello", 1, kTypeDeletion); + } + } +} + +TEST(FormatTest, InternalKeyShortSeparator) { + // When user keys are same + ASSERT_EQ(IKey("foo", 100, kTypeValue), + Shorten(IKey("foo", 100, kTypeValue), + IKey("foo", 99, kTypeValue))); + ASSERT_EQ(IKey("foo", 100, kTypeValue), + Shorten(IKey("foo", 100, kTypeValue), + IKey("foo", 101, kTypeValue))); + ASSERT_EQ(IKey("foo", 100, kTypeValue), + Shorten(IKey("foo", 100, kTypeValue), + IKey("foo", 100, kTypeValue))); + ASSERT_EQ(IKey("foo", 100, kTypeValue), + Shorten(IKey("foo", 100, kTypeValue), + IKey("foo", 100, kTypeDeletion))); + + // When user keys are misordered + ASSERT_EQ(IKey("foo", 100, kTypeValue), + Shorten(IKey("foo", 100, kTypeValue), + IKey("bar", 99, kTypeValue))); + + // When user keys are different, but correctly ordered + ASSERT_EQ(IKey("g", kMaxSequenceNumber, kValueTypeForSeek), + Shorten(IKey("foo", 100, kTypeValue), + IKey("hello", 200, kTypeValue))); + + // When start user key is prefix of limit user key + ASSERT_EQ(IKey("foo", 100, kTypeValue), + Shorten(IKey("foo", 100, kTypeValue), + IKey("foobar", 200, kTypeValue))); + + // When limit user key is prefix of start user key + ASSERT_EQ(IKey("foobar", 100, kTypeValue), + Shorten(IKey("foobar", 100, kTypeValue), + IKey("foo", 200, kTypeValue))); +} + +TEST(FormatTest, InternalKeyShortestSuccessor) { + ASSERT_EQ(IKey("g", kMaxSequenceNumber, kValueTypeForSeek), + ShortSuccessor(IKey("foo", 100, kTypeValue))); + ASSERT_EQ(IKey("\xff\xff", 100, kTypeValue), + ShortSuccessor(IKey("\xff\xff", 100, kTypeValue))); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/db/filename.cc b/src/leveldb/db/filename.cc new file mode 100644 index 0000000..27d7506 --- /dev/null +++ b/src/leveldb/db/filename.cc @@ -0,0 +1,149 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include +#include "db/filename.h" +#include "db/dbformat.h" +#include "leveldb/env.h" +#include "util/logging.h" + +namespace leveldb { + +// A utility routine: write "data" to the named file and Sync() it. +extern Status WriteStringToFileSync(Env* env, const Slice& data, + const std::string& fname); + +static std::string MakeFileName(const std::string& name, uint64_t number, + const char* suffix) { + char buf[100]; + snprintf(buf, sizeof(buf), "/%06llu.%s", + static_cast(number), + suffix); + return name + buf; +} + +std::string LogFileName(const std::string& name, uint64_t number) { + assert(number > 0); + return MakeFileName(name, number, "log"); +} + +// TableFileName returns the filenames we usually write to, while +// SSTTableFileName returns the alternative filenames we also try to read from +// for backward compatibility. For now, swap them around. +// TODO: when compatibility is no longer necessary, swap them back +// (TableFileName to use "ldb" and SSTTableFileName to use "sst"). +std::string TableFileName(const std::string& name, uint64_t number) { + assert(number > 0); + return MakeFileName(name, number, "sst"); +} + +std::string SSTTableFileName(const std::string& name, uint64_t number) { + assert(number > 0); + return MakeFileName(name, number, "ldb"); +} + +std::string DescriptorFileName(const std::string& dbname, uint64_t number) { + assert(number > 0); + char buf[100]; + snprintf(buf, sizeof(buf), "/MANIFEST-%06llu", + static_cast(number)); + return dbname + buf; +} + +std::string CurrentFileName(const std::string& dbname) { + return dbname + "/CURRENT"; +} + +std::string LockFileName(const std::string& dbname) { + return dbname + "/LOCK"; +} + +std::string TempFileName(const std::string& dbname, uint64_t number) { + assert(number > 0); + return MakeFileName(dbname, number, "dbtmp"); +} + +std::string InfoLogFileName(const std::string& dbname) { + return dbname + "/LOG"; +} + +// Return the name of the old info log file for "dbname". +std::string OldInfoLogFileName(const std::string& dbname) { + return dbname + "/LOG.old"; +} + + +// Owned filenames have the form: +// dbname/CURRENT +// dbname/LOCK +// dbname/LOG +// dbname/LOG.old +// dbname/MANIFEST-[0-9]+ +// dbname/[0-9]+.(log|sst|ldb) +bool ParseFileName(const std::string& fname, + uint64_t* number, + FileType* type) { + Slice rest(fname); + if (rest == "CURRENT") { + *number = 0; + *type = kCurrentFile; + } else if (rest == "LOCK") { + *number = 0; + *type = kDBLockFile; + } else if (rest == "LOG" || rest == "LOG.old") { + *number = 0; + *type = kInfoLogFile; + } else if (rest.starts_with("MANIFEST-")) { + rest.remove_prefix(strlen("MANIFEST-")); + uint64_t num; + if (!ConsumeDecimalNumber(&rest, &num)) { + return false; + } + if (!rest.empty()) { + return false; + } + *type = kDescriptorFile; + *number = num; + } else { + // Avoid strtoull() to keep filename format independent of the + // current locale + uint64_t num; + if (!ConsumeDecimalNumber(&rest, &num)) { + return false; + } + Slice suffix = rest; + if (suffix == Slice(".log")) { + *type = kLogFile; + } else if (suffix == Slice(".sst") || suffix == Slice(".ldb")) { + *type = kTableFile; + } else if (suffix == Slice(".dbtmp")) { + *type = kTempFile; + } else { + return false; + } + *number = num; + } + return true; +} + +Status SetCurrentFile(Env* env, const std::string& dbname, + uint64_t descriptor_number) { + // Remove leading "dbname/" and add newline to manifest file name + std::string manifest = DescriptorFileName(dbname, descriptor_number); + Slice contents = manifest; + assert(contents.starts_with(dbname + "/")); + contents.remove_prefix(dbname.size() + 1); + std::string tmp = TempFileName(dbname, descriptor_number); + Status s = WriteStringToFileSync(env, contents.ToString() + "\n", tmp); + if (s.ok()) { + s = env->RenameFile(tmp, CurrentFileName(dbname)); + } + if (!s.ok()) { + env->DeleteFile(tmp); + } + return s; +} + +} // namespace leveldb diff --git a/src/leveldb/db/filename.h b/src/leveldb/db/filename.h new file mode 100644 index 0000000..87a7526 --- /dev/null +++ b/src/leveldb/db/filename.h @@ -0,0 +1,85 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// File names used by DB code + +#ifndef STORAGE_LEVELDB_DB_FILENAME_H_ +#define STORAGE_LEVELDB_DB_FILENAME_H_ + +#include +#include +#include "leveldb/slice.h" +#include "leveldb/status.h" +#include "port/port.h" + +namespace leveldb { + +class Env; + +enum FileType { + kLogFile, + kDBLockFile, + kTableFile, + kDescriptorFile, + kCurrentFile, + kTempFile, + kInfoLogFile // Either the current one, or an old one +}; + +// Return the name of the log file with the specified number +// in the db named by "dbname". The result will be prefixed with +// "dbname". +extern std::string LogFileName(const std::string& dbname, uint64_t number); + +// Return the name of the sstable with the specified number +// in the db named by "dbname". The result will be prefixed with +// "dbname". +extern std::string TableFileName(const std::string& dbname, uint64_t number); + +// Return the legacy file name for an sstable with the specified number +// in the db named by "dbname". The result will be prefixed with +// "dbname". +extern std::string SSTTableFileName(const std::string& dbname, uint64_t number); + +// Return the name of the descriptor file for the db named by +// "dbname" and the specified incarnation number. The result will be +// prefixed with "dbname". +extern std::string DescriptorFileName(const std::string& dbname, + uint64_t number); + +// Return the name of the current file. This file contains the name +// of the current manifest file. The result will be prefixed with +// "dbname". +extern std::string CurrentFileName(const std::string& dbname); + +// Return the name of the lock file for the db named by +// "dbname". The result will be prefixed with "dbname". +extern std::string LockFileName(const std::string& dbname); + +// Return the name of a temporary file owned by the db named "dbname". +// The result will be prefixed with "dbname". +extern std::string TempFileName(const std::string& dbname, uint64_t number); + +// Return the name of the info log file for "dbname". +extern std::string InfoLogFileName(const std::string& dbname); + +// Return the name of the old info log file for "dbname". +extern std::string OldInfoLogFileName(const std::string& dbname); + +// If filename is a leveldb file, store the type of the file in *type. +// The number encoded in the filename is stored in *number. If the +// filename was successfully parsed, returns true. Else return false. +extern bool ParseFileName(const std::string& filename, + uint64_t* number, + FileType* type); + +// Make the CURRENT file point to the descriptor file with the +// specified number. +extern Status SetCurrentFile(Env* env, const std::string& dbname, + uint64_t descriptor_number); + + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_FILENAME_H_ diff --git a/src/leveldb/db/filename_test.cc b/src/leveldb/db/filename_test.cc new file mode 100644 index 0000000..a32556d --- /dev/null +++ b/src/leveldb/db/filename_test.cc @@ -0,0 +1,123 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/filename.h" + +#include "db/dbformat.h" +#include "port/port.h" +#include "util/logging.h" +#include "util/testharness.h" + +namespace leveldb { + +class FileNameTest { }; + +TEST(FileNameTest, Parse) { + Slice db; + FileType type; + uint64_t number; + + // Successful parses + static struct { + const char* fname; + uint64_t number; + FileType type; + } cases[] = { + { "100.log", 100, kLogFile }, + { "0.log", 0, kLogFile }, + { "0.sst", 0, kTableFile }, + { "0.ldb", 0, kTableFile }, + { "CURRENT", 0, kCurrentFile }, + { "LOCK", 0, kDBLockFile }, + { "MANIFEST-2", 2, kDescriptorFile }, + { "MANIFEST-7", 7, kDescriptorFile }, + { "LOG", 0, kInfoLogFile }, + { "LOG.old", 0, kInfoLogFile }, + { "18446744073709551615.log", 18446744073709551615ull, kLogFile }, + }; + for (int i = 0; i < sizeof(cases) / sizeof(cases[0]); i++) { + std::string f = cases[i].fname; + ASSERT_TRUE(ParseFileName(f, &number, &type)) << f; + ASSERT_EQ(cases[i].type, type) << f; + ASSERT_EQ(cases[i].number, number) << f; + } + + // Errors + static const char* errors[] = { + "", + "foo", + "foo-dx-100.log", + ".log", + "", + "manifest", + "CURREN", + "CURRENTX", + "MANIFES", + "MANIFEST", + "MANIFEST-", + "XMANIFEST-3", + "MANIFEST-3x", + "LOC", + "LOCKx", + "LO", + "LOGx", + "18446744073709551616.log", + "184467440737095516150.log", + "100", + "100.", + "100.lop" + }; + for (int i = 0; i < sizeof(errors) / sizeof(errors[0]); i++) { + std::string f = errors[i]; + ASSERT_TRUE(!ParseFileName(f, &number, &type)) << f; + } +} + +TEST(FileNameTest, Construction) { + uint64_t number; + FileType type; + std::string fname; + + fname = CurrentFileName("foo"); + ASSERT_EQ("foo/", std::string(fname.data(), 4)); + ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type)); + ASSERT_EQ(0, number); + ASSERT_EQ(kCurrentFile, type); + + fname = LockFileName("foo"); + ASSERT_EQ("foo/", std::string(fname.data(), 4)); + ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type)); + ASSERT_EQ(0, number); + ASSERT_EQ(kDBLockFile, type); + + fname = LogFileName("foo", 192); + ASSERT_EQ("foo/", std::string(fname.data(), 4)); + ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type)); + ASSERT_EQ(192, number); + ASSERT_EQ(kLogFile, type); + + fname = TableFileName("bar", 200); + ASSERT_EQ("bar/", std::string(fname.data(), 4)); + ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type)); + ASSERT_EQ(200, number); + ASSERT_EQ(kTableFile, type); + + fname = DescriptorFileName("bar", 100); + ASSERT_EQ("bar/", std::string(fname.data(), 4)); + ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type)); + ASSERT_EQ(100, number); + ASSERT_EQ(kDescriptorFile, type); + + fname = TempFileName("tmp", 999); + ASSERT_EQ("tmp/", std::string(fname.data(), 4)); + ASSERT_TRUE(ParseFileName(fname.c_str() + 4, &number, &type)); + ASSERT_EQ(999, number); + ASSERT_EQ(kTempFile, type); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/db/leveldb_main.cc b/src/leveldb/db/leveldb_main.cc new file mode 100644 index 0000000..995d761 --- /dev/null +++ b/src/leveldb/db/leveldb_main.cc @@ -0,0 +1,238 @@ +// Copyright (c) 2012 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include "db/dbformat.h" +#include "db/filename.h" +#include "db/log_reader.h" +#include "db/version_edit.h" +#include "db/write_batch_internal.h" +#include "leveldb/env.h" +#include "leveldb/iterator.h" +#include "leveldb/options.h" +#include "leveldb/status.h" +#include "leveldb/table.h" +#include "leveldb/write_batch.h" +#include "util/logging.h" + +namespace leveldb { + +namespace { + +bool GuessType(const std::string& fname, FileType* type) { + size_t pos = fname.rfind('/'); + std::string basename; + if (pos == std::string::npos) { + basename = fname; + } else { + basename = std::string(fname.data() + pos + 1, fname.size() - pos - 1); + } + uint64_t ignored; + return ParseFileName(basename, &ignored, type); +} + +// Notified when log reader encounters corruption. +class CorruptionReporter : public log::Reader::Reporter { + public: + virtual void Corruption(size_t bytes, const Status& status) { + printf("corruption: %d bytes; %s\n", + static_cast(bytes), + status.ToString().c_str()); + } +}; + +// Print contents of a log file. (*func)() is called on every record. +bool PrintLogContents(Env* env, const std::string& fname, + void (*func)(Slice)) { + SequentialFile* file; + Status s = env->NewSequentialFile(fname, &file); + if (!s.ok()) { + fprintf(stderr, "%s\n", s.ToString().c_str()); + return false; + } + CorruptionReporter reporter; + log::Reader reader(file, &reporter, true, 0); + Slice record; + std::string scratch; + while (reader.ReadRecord(&record, &scratch)) { + printf("--- offset %llu; ", + static_cast(reader.LastRecordOffset())); + (*func)(record); + } + delete file; + return true; +} + +// Called on every item found in a WriteBatch. +class WriteBatchItemPrinter : public WriteBatch::Handler { + public: + uint64_t offset_; + uint64_t sequence_; + + virtual void Put(const Slice& key, const Slice& value) { + printf(" put '%s' '%s'\n", + EscapeString(key).c_str(), + EscapeString(value).c_str()); + } + virtual void Delete(const Slice& key) { + printf(" del '%s'\n", + EscapeString(key).c_str()); + } +}; + + +// Called on every log record (each one of which is a WriteBatch) +// found in a kLogFile. +static void WriteBatchPrinter(Slice record) { + if (record.size() < 12) { + printf("log record length %d is too small\n", + static_cast(record.size())); + return; + } + WriteBatch batch; + WriteBatchInternal::SetContents(&batch, record); + printf("sequence %llu\n", + static_cast(WriteBatchInternal::Sequence(&batch))); + WriteBatchItemPrinter batch_item_printer; + Status s = batch.Iterate(&batch_item_printer); + if (!s.ok()) { + printf(" error: %s\n", s.ToString().c_str()); + } +} + +bool DumpLog(Env* env, const std::string& fname) { + return PrintLogContents(env, fname, WriteBatchPrinter); +} + +// Called on every log record (each one of which is a WriteBatch) +// found in a kDescriptorFile. +static void VersionEditPrinter(Slice record) { + VersionEdit edit; + Status s = edit.DecodeFrom(record); + if (!s.ok()) { + printf("%s\n", s.ToString().c_str()); + return; + } + printf("%s", edit.DebugString().c_str()); +} + +bool DumpDescriptor(Env* env, const std::string& fname) { + return PrintLogContents(env, fname, VersionEditPrinter); +} + +bool DumpTable(Env* env, const std::string& fname) { + uint64_t file_size; + RandomAccessFile* file = NULL; + Table* table = NULL; + Status s = env->GetFileSize(fname, &file_size); + if (s.ok()) { + s = env->NewRandomAccessFile(fname, &file); + } + if (s.ok()) { + // We use the default comparator, which may or may not match the + // comparator used in this database. However this should not cause + // problems since we only use Table operations that do not require + // any comparisons. In particular, we do not call Seek or Prev. + s = Table::Open(Options(), file, file_size, &table); + } + if (!s.ok()) { + fprintf(stderr, "%s\n", s.ToString().c_str()); + delete table; + delete file; + return false; + } + + ReadOptions ro; + ro.fill_cache = false; + Iterator* iter = table->NewIterator(ro); + for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { + ParsedInternalKey key; + if (!ParseInternalKey(iter->key(), &key)) { + printf("badkey '%s' => '%s'\n", + EscapeString(iter->key()).c_str(), + EscapeString(iter->value()).c_str()); + } else { + char kbuf[20]; + const char* type; + if (key.type == kTypeDeletion) { + type = "del"; + } else if (key.type == kTypeValue) { + type = "val"; + } else { + snprintf(kbuf, sizeof(kbuf), "%d", static_cast(key.type)); + type = kbuf; + } + printf("'%s' @ %8llu : %s => '%s'\n", + EscapeString(key.user_key).c_str(), + static_cast(key.sequence), + type, + EscapeString(iter->value()).c_str()); + } + } + s = iter->status(); + if (!s.ok()) { + printf("iterator error: %s\n", s.ToString().c_str()); + } + + delete iter; + delete table; + delete file; + return true; +} + +bool DumpFile(Env* env, const std::string& fname) { + FileType ftype; + if (!GuessType(fname, &ftype)) { + fprintf(stderr, "%s: unknown file type\n", fname.c_str()); + return false; + } + switch (ftype) { + case kLogFile: return DumpLog(env, fname); + case kDescriptorFile: return DumpDescriptor(env, fname); + case kTableFile: return DumpTable(env, fname); + + default: { + fprintf(stderr, "%s: not a dump-able file type\n", fname.c_str()); + break; + } + } + return false; +} + +bool HandleDumpCommand(Env* env, char** files, int num) { + bool ok = true; + for (int i = 0; i < num; i++) { + ok &= DumpFile(env, files[i]); + } + return ok; +} + +} +} // namespace leveldb + +static void Usage() { + fprintf( + stderr, + "Usage: leveldbutil command...\n" + " dump files... -- dump contents of specified files\n" + ); +} + +int main(int argc, char** argv) { + leveldb::Env* env = leveldb::Env::Default(); + bool ok = true; + if (argc < 2) { + Usage(); + ok = false; + } else { + std::string command = argv[1]; + if (command == "dump") { + ok = leveldb::HandleDumpCommand(env, argv+2, argc-2); + } else { + Usage(); + ok = false; + } + } + return (ok ? 0 : 1); +} diff --git a/src/leveldb/db/log_format.h b/src/leveldb/db/log_format.h new file mode 100644 index 0000000..2690cb9 --- /dev/null +++ b/src/leveldb/db/log_format.h @@ -0,0 +1,35 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// Log format information shared by reader and writer. +// See ../doc/log_format.txt for more detail. + +#ifndef STORAGE_LEVELDB_DB_LOG_FORMAT_H_ +#define STORAGE_LEVELDB_DB_LOG_FORMAT_H_ + +namespace leveldb { +namespace log { + +enum RecordType { + // Zero is reserved for preallocated files + kZeroType = 0, + + kFullType = 1, + + // For fragments + kFirstType = 2, + kMiddleType = 3, + kLastType = 4 +}; +static const int kMaxRecordType = kLastType; + +static const int kBlockSize = 32768; + +// Header is checksum (4 bytes), type (1 byte), length (2 bytes). +static const int kHeaderSize = 4 + 1 + 2; + +} // namespace log +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_LOG_FORMAT_H_ diff --git a/src/leveldb/db/log_reader.cc b/src/leveldb/db/log_reader.cc new file mode 100644 index 0000000..b35f115 --- /dev/null +++ b/src/leveldb/db/log_reader.cc @@ -0,0 +1,259 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/log_reader.h" + +#include +#include "leveldb/env.h" +#include "util/coding.h" +#include "util/crc32c.h" + +namespace leveldb { +namespace log { + +Reader::Reporter::~Reporter() { +} + +Reader::Reader(SequentialFile* file, Reporter* reporter, bool checksum, + uint64_t initial_offset) + : file_(file), + reporter_(reporter), + checksum_(checksum), + backing_store_(new char[kBlockSize]), + buffer_(), + eof_(false), + last_record_offset_(0), + end_of_buffer_offset_(0), + initial_offset_(initial_offset) { +} + +Reader::~Reader() { + delete[] backing_store_; +} + +bool Reader::SkipToInitialBlock() { + size_t offset_in_block = initial_offset_ % kBlockSize; + uint64_t block_start_location = initial_offset_ - offset_in_block; + + // Don't search a block if we'd be in the trailer + if (offset_in_block > kBlockSize - 6) { + offset_in_block = 0; + block_start_location += kBlockSize; + } + + end_of_buffer_offset_ = block_start_location; + + // Skip to start of first block that can contain the initial record + if (block_start_location > 0) { + Status skip_status = file_->Skip(block_start_location); + if (!skip_status.ok()) { + ReportDrop(block_start_location, skip_status); + return false; + } + } + + return true; +} + +bool Reader::ReadRecord(Slice* record, std::string* scratch) { + if (last_record_offset_ < initial_offset_) { + if (!SkipToInitialBlock()) { + return false; + } + } + + scratch->clear(); + record->clear(); + bool in_fragmented_record = false; + // Record offset of the logical record that we're reading + // 0 is a dummy value to make compilers happy + uint64_t prospective_record_offset = 0; + + Slice fragment; + while (true) { + uint64_t physical_record_offset = end_of_buffer_offset_ - buffer_.size(); + const unsigned int record_type = ReadPhysicalRecord(&fragment); + switch (record_type) { + case kFullType: + if (in_fragmented_record) { + // Handle bug in earlier versions of log::Writer where + // it could emit an empty kFirstType record at the tail end + // of a block followed by a kFullType or kFirstType record + // at the beginning of the next block. + if (scratch->empty()) { + in_fragmented_record = false; + } else { + ReportCorruption(scratch->size(), "partial record without end(1)"); + } + } + prospective_record_offset = physical_record_offset; + scratch->clear(); + *record = fragment; + last_record_offset_ = prospective_record_offset; + return true; + + case kFirstType: + if (in_fragmented_record) { + // Handle bug in earlier versions of log::Writer where + // it could emit an empty kFirstType record at the tail end + // of a block followed by a kFullType or kFirstType record + // at the beginning of the next block. + if (scratch->empty()) { + in_fragmented_record = false; + } else { + ReportCorruption(scratch->size(), "partial record without end(2)"); + } + } + prospective_record_offset = physical_record_offset; + scratch->assign(fragment.data(), fragment.size()); + in_fragmented_record = true; + break; + + case kMiddleType: + if (!in_fragmented_record) { + ReportCorruption(fragment.size(), + "missing start of fragmented record(1)"); + } else { + scratch->append(fragment.data(), fragment.size()); + } + break; + + case kLastType: + if (!in_fragmented_record) { + ReportCorruption(fragment.size(), + "missing start of fragmented record(2)"); + } else { + scratch->append(fragment.data(), fragment.size()); + *record = Slice(*scratch); + last_record_offset_ = prospective_record_offset; + return true; + } + break; + + case kEof: + if (in_fragmented_record) { + ReportCorruption(scratch->size(), "partial record without end(3)"); + scratch->clear(); + } + return false; + + case kBadRecord: + if (in_fragmented_record) { + ReportCorruption(scratch->size(), "error in middle of record"); + in_fragmented_record = false; + scratch->clear(); + } + break; + + default: { + char buf[40]; + snprintf(buf, sizeof(buf), "unknown record type %u", record_type); + ReportCorruption( + (fragment.size() + (in_fragmented_record ? scratch->size() : 0)), + buf); + in_fragmented_record = false; + scratch->clear(); + break; + } + } + } + return false; +} + +uint64_t Reader::LastRecordOffset() { + return last_record_offset_; +} + +void Reader::ReportCorruption(size_t bytes, const char* reason) { + ReportDrop(bytes, Status::Corruption(reason)); +} + +void Reader::ReportDrop(size_t bytes, const Status& reason) { + if (reporter_ != NULL && + end_of_buffer_offset_ - buffer_.size() - bytes >= initial_offset_) { + reporter_->Corruption(bytes, reason); + } +} + +unsigned int Reader::ReadPhysicalRecord(Slice* result) { + while (true) { + if (buffer_.size() < kHeaderSize) { + if (!eof_) { + // Last read was a full read, so this is a trailer to skip + buffer_.clear(); + Status status = file_->Read(kBlockSize, &buffer_, backing_store_); + end_of_buffer_offset_ += buffer_.size(); + if (!status.ok()) { + buffer_.clear(); + ReportDrop(kBlockSize, status); + eof_ = true; + return kEof; + } else if (buffer_.size() < kBlockSize) { + eof_ = true; + } + continue; + } else if (buffer_.size() == 0) { + // End of file + return kEof; + } else { + size_t drop_size = buffer_.size(); + buffer_.clear(); + ReportCorruption(drop_size, "truncated record at end of file"); + return kEof; + } + } + + // Parse the header + const char* header = buffer_.data(); + const uint32_t a = static_cast(header[4]) & 0xff; + const uint32_t b = static_cast(header[5]) & 0xff; + const unsigned int type = header[6]; + const uint32_t length = a | (b << 8); + if (kHeaderSize + length > buffer_.size()) { + size_t drop_size = buffer_.size(); + buffer_.clear(); + ReportCorruption(drop_size, "bad record length"); + return kBadRecord; + } + + if (type == kZeroType && length == 0) { + // Skip zero length record without reporting any drops since + // such records are produced by the mmap based writing code in + // env_posix.cc that preallocates file regions. + buffer_.clear(); + return kBadRecord; + } + + // Check crc + if (checksum_) { + uint32_t expected_crc = crc32c::Unmask(DecodeFixed32(header)); + uint32_t actual_crc = crc32c::Value(header + 6, 1 + length); + if (actual_crc != expected_crc) { + // Drop the rest of the buffer since "length" itself may have + // been corrupted and if we trust it, we could find some + // fragment of a real log record that just happens to look + // like a valid log record. + size_t drop_size = buffer_.size(); + buffer_.clear(); + ReportCorruption(drop_size, "checksum mismatch"); + return kBadRecord; + } + } + + buffer_.remove_prefix(kHeaderSize + length); + + // Skip physical record that started before initial_offset_ + if (end_of_buffer_offset_ - buffer_.size() - kHeaderSize - length < + initial_offset_) { + result->clear(); + return kBadRecord; + } + + *result = Slice(header + kHeaderSize, length); + return type; + } +} + +} // namespace log +} // namespace leveldb diff --git a/src/leveldb/db/log_reader.h b/src/leveldb/db/log_reader.h new file mode 100644 index 0000000..82d4bee --- /dev/null +++ b/src/leveldb/db/log_reader.h @@ -0,0 +1,108 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_DB_LOG_READER_H_ +#define STORAGE_LEVELDB_DB_LOG_READER_H_ + +#include + +#include "db/log_format.h" +#include "leveldb/slice.h" +#include "leveldb/status.h" + +namespace leveldb { + +class SequentialFile; + +namespace log { + +class Reader { + public: + // Interface for reporting errors. + class Reporter { + public: + virtual ~Reporter(); + + // Some corruption was detected. "size" is the approximate number + // of bytes dropped due to the corruption. + virtual void Corruption(size_t bytes, const Status& status) = 0; + }; + + // Create a reader that will return log records from "*file". + // "*file" must remain live while this Reader is in use. + // + // If "reporter" is non-NULL, it is notified whenever some data is + // dropped due to a detected corruption. "*reporter" must remain + // live while this Reader is in use. + // + // If "checksum" is true, verify checksums if available. + // + // The Reader will start reading at the first record located at physical + // position >= initial_offset within the file. + Reader(SequentialFile* file, Reporter* reporter, bool checksum, + uint64_t initial_offset); + + ~Reader(); + + // Read the next record into *record. Returns true if read + // successfully, false if we hit end of the input. May use + // "*scratch" as temporary storage. The contents filled in *record + // will only be valid until the next mutating operation on this + // reader or the next mutation to *scratch. + bool ReadRecord(Slice* record, std::string* scratch); + + // Returns the physical offset of the last record returned by ReadRecord. + // + // Undefined before the first call to ReadRecord. + uint64_t LastRecordOffset(); + + private: + SequentialFile* const file_; + Reporter* const reporter_; + bool const checksum_; + char* const backing_store_; + Slice buffer_; + bool eof_; // Last Read() indicated EOF by returning < kBlockSize + + // Offset of the last record returned by ReadRecord. + uint64_t last_record_offset_; + // Offset of the first location past the end of buffer_. + uint64_t end_of_buffer_offset_; + + // Offset at which to start looking for the first record to return + uint64_t const initial_offset_; + + // Extend record types with the following special values + enum { + kEof = kMaxRecordType + 1, + // Returned whenever we find an invalid physical record. + // Currently there are three situations in which this happens: + // * The record has an invalid CRC (ReadPhysicalRecord reports a drop) + // * The record is a 0-length record (No drop is reported) + // * The record is below constructor's initial_offset (No drop is reported) + kBadRecord = kMaxRecordType + 2 + }; + + // Skips all blocks that are completely before "initial_offset_". + // + // Returns true on success. Handles reporting. + bool SkipToInitialBlock(); + + // Return type, or one of the preceding special values + unsigned int ReadPhysicalRecord(Slice* result); + + // Reports dropped bytes to the reporter. + // buffer_ must be updated to remove the dropped bytes prior to invocation. + void ReportCorruption(size_t bytes, const char* reason); + void ReportDrop(size_t bytes, const Status& reason); + + // No copying allowed + Reader(const Reader&); + void operator=(const Reader&); +}; + +} // namespace log +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_LOG_READER_H_ diff --git a/src/leveldb/db/log_test.cc b/src/leveldb/db/log_test.cc new file mode 100644 index 0000000..4c5cf87 --- /dev/null +++ b/src/leveldb/db/log_test.cc @@ -0,0 +1,500 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/log_reader.h" +#include "db/log_writer.h" +#include "leveldb/env.h" +#include "util/coding.h" +#include "util/crc32c.h" +#include "util/random.h" +#include "util/testharness.h" + +namespace leveldb { +namespace log { + +// Construct a string of the specified length made out of the supplied +// partial string. +static std::string BigString(const std::string& partial_string, size_t n) { + std::string result; + while (result.size() < n) { + result.append(partial_string); + } + result.resize(n); + return result; +} + +// Construct a string from a number +static std::string NumberString(int n) { + char buf[50]; + snprintf(buf, sizeof(buf), "%d.", n); + return std::string(buf); +} + +// Return a skewed potentially long string +static std::string RandomSkewedString(int i, Random* rnd) { + return BigString(NumberString(i), rnd->Skewed(17)); +} + +class LogTest { + private: + class StringDest : public WritableFile { + public: + std::string contents_; + + virtual Status Close() { return Status::OK(); } + virtual Status Flush() { return Status::OK(); } + virtual Status Sync() { return Status::OK(); } + virtual Status Append(const Slice& slice) { + contents_.append(slice.data(), slice.size()); + return Status::OK(); + } + }; + + class StringSource : public SequentialFile { + public: + Slice contents_; + bool force_error_; + bool returned_partial_; + StringSource() : force_error_(false), returned_partial_(false) { } + + virtual Status Read(size_t n, Slice* result, char* scratch) { + ASSERT_TRUE(!returned_partial_) << "must not Read() after eof/error"; + + if (force_error_) { + force_error_ = false; + returned_partial_ = true; + return Status::Corruption("read error"); + } + + if (contents_.size() < n) { + n = contents_.size(); + returned_partial_ = true; + } + *result = Slice(contents_.data(), n); + contents_.remove_prefix(n); + return Status::OK(); + } + + virtual Status Skip(uint64_t n) { + if (n > contents_.size()) { + contents_.clear(); + return Status::NotFound("in-memory file skipepd past end"); + } + + contents_.remove_prefix(n); + + return Status::OK(); + } + }; + + class ReportCollector : public Reader::Reporter { + public: + size_t dropped_bytes_; + std::string message_; + + ReportCollector() : dropped_bytes_(0) { } + virtual void Corruption(size_t bytes, const Status& status) { + dropped_bytes_ += bytes; + message_.append(status.ToString()); + } + }; + + StringDest dest_; + StringSource source_; + ReportCollector report_; + bool reading_; + Writer writer_; + Reader reader_; + + // Record metadata for testing initial offset functionality + static size_t initial_offset_record_sizes_[]; + static uint64_t initial_offset_last_record_offsets_[]; + + public: + LogTest() : reading_(false), + writer_(&dest_), + reader_(&source_, &report_, true/*checksum*/, + 0/*initial_offset*/) { + } + + void Write(const std::string& msg) { + ASSERT_TRUE(!reading_) << "Write() after starting to read"; + writer_.AddRecord(Slice(msg)); + } + + size_t WrittenBytes() const { + return dest_.contents_.size(); + } + + std::string Read() { + if (!reading_) { + reading_ = true; + source_.contents_ = Slice(dest_.contents_); + } + std::string scratch; + Slice record; + if (reader_.ReadRecord(&record, &scratch)) { + return record.ToString(); + } else { + return "EOF"; + } + } + + void IncrementByte(int offset, int delta) { + dest_.contents_[offset] += delta; + } + + void SetByte(int offset, char new_byte) { + dest_.contents_[offset] = new_byte; + } + + void ShrinkSize(int bytes) { + dest_.contents_.resize(dest_.contents_.size() - bytes); + } + + void FixChecksum(int header_offset, int len) { + // Compute crc of type/len/data + uint32_t crc = crc32c::Value(&dest_.contents_[header_offset+6], 1 + len); + crc = crc32c::Mask(crc); + EncodeFixed32(&dest_.contents_[header_offset], crc); + } + + void ForceError() { + source_.force_error_ = true; + } + + size_t DroppedBytes() const { + return report_.dropped_bytes_; + } + + std::string ReportMessage() const { + return report_.message_; + } + + // Returns OK iff recorded error message contains "msg" + std::string MatchError(const std::string& msg) const { + if (report_.message_.find(msg) == std::string::npos) { + return report_.message_; + } else { + return "OK"; + } + } + + void WriteInitialOffsetLog() { + for (int i = 0; i < 4; i++) { + std::string record(initial_offset_record_sizes_[i], + static_cast('a' + i)); + Write(record); + } + } + + void CheckOffsetPastEndReturnsNoRecords(uint64_t offset_past_end) { + WriteInitialOffsetLog(); + reading_ = true; + source_.contents_ = Slice(dest_.contents_); + Reader* offset_reader = new Reader(&source_, &report_, true/*checksum*/, + WrittenBytes() + offset_past_end); + Slice record; + std::string scratch; + ASSERT_TRUE(!offset_reader->ReadRecord(&record, &scratch)); + delete offset_reader; + } + + void CheckInitialOffsetRecord(uint64_t initial_offset, + int expected_record_offset) { + WriteInitialOffsetLog(); + reading_ = true; + source_.contents_ = Slice(dest_.contents_); + Reader* offset_reader = new Reader(&source_, &report_, true/*checksum*/, + initial_offset); + Slice record; + std::string scratch; + ASSERT_TRUE(offset_reader->ReadRecord(&record, &scratch)); + ASSERT_EQ(initial_offset_record_sizes_[expected_record_offset], + record.size()); + ASSERT_EQ(initial_offset_last_record_offsets_[expected_record_offset], + offset_reader->LastRecordOffset()); + ASSERT_EQ((char)('a' + expected_record_offset), record.data()[0]); + delete offset_reader; + } + +}; + +size_t LogTest::initial_offset_record_sizes_[] = + {10000, // Two sizable records in first block + 10000, + 2 * log::kBlockSize - 1000, // Span three blocks + 1}; + +uint64_t LogTest::initial_offset_last_record_offsets_[] = + {0, + kHeaderSize + 10000, + 2 * (kHeaderSize + 10000), + 2 * (kHeaderSize + 10000) + + (2 * log::kBlockSize - 1000) + 3 * kHeaderSize}; + + +TEST(LogTest, Empty) { + ASSERT_EQ("EOF", Read()); +} + +TEST(LogTest, ReadWrite) { + Write("foo"); + Write("bar"); + Write(""); + Write("xxxx"); + ASSERT_EQ("foo", Read()); + ASSERT_EQ("bar", Read()); + ASSERT_EQ("", Read()); + ASSERT_EQ("xxxx", Read()); + ASSERT_EQ("EOF", Read()); + ASSERT_EQ("EOF", Read()); // Make sure reads at eof work +} + +TEST(LogTest, ManyBlocks) { + for (int i = 0; i < 100000; i++) { + Write(NumberString(i)); + } + for (int i = 0; i < 100000; i++) { + ASSERT_EQ(NumberString(i), Read()); + } + ASSERT_EQ("EOF", Read()); +} + +TEST(LogTest, Fragmentation) { + Write("small"); + Write(BigString("medium", 50000)); + Write(BigString("large", 100000)); + ASSERT_EQ("small", Read()); + ASSERT_EQ(BigString("medium", 50000), Read()); + ASSERT_EQ(BigString("large", 100000), Read()); + ASSERT_EQ("EOF", Read()); +} + +TEST(LogTest, MarginalTrailer) { + // Make a trailer that is exactly the same length as an empty record. + const int n = kBlockSize - 2*kHeaderSize; + Write(BigString("foo", n)); + ASSERT_EQ(kBlockSize - kHeaderSize, WrittenBytes()); + Write(""); + Write("bar"); + ASSERT_EQ(BigString("foo", n), Read()); + ASSERT_EQ("", Read()); + ASSERT_EQ("bar", Read()); + ASSERT_EQ("EOF", Read()); +} + +TEST(LogTest, MarginalTrailer2) { + // Make a trailer that is exactly the same length as an empty record. + const int n = kBlockSize - 2*kHeaderSize; + Write(BigString("foo", n)); + ASSERT_EQ(kBlockSize - kHeaderSize, WrittenBytes()); + Write("bar"); + ASSERT_EQ(BigString("foo", n), Read()); + ASSERT_EQ("bar", Read()); + ASSERT_EQ("EOF", Read()); + ASSERT_EQ(0, DroppedBytes()); + ASSERT_EQ("", ReportMessage()); +} + +TEST(LogTest, ShortTrailer) { + const int n = kBlockSize - 2*kHeaderSize + 4; + Write(BigString("foo", n)); + ASSERT_EQ(kBlockSize - kHeaderSize + 4, WrittenBytes()); + Write(""); + Write("bar"); + ASSERT_EQ(BigString("foo", n), Read()); + ASSERT_EQ("", Read()); + ASSERT_EQ("bar", Read()); + ASSERT_EQ("EOF", Read()); +} + +TEST(LogTest, AlignedEof) { + const int n = kBlockSize - 2*kHeaderSize + 4; + Write(BigString("foo", n)); + ASSERT_EQ(kBlockSize - kHeaderSize + 4, WrittenBytes()); + ASSERT_EQ(BigString("foo", n), Read()); + ASSERT_EQ("EOF", Read()); +} + +TEST(LogTest, RandomRead) { + const int N = 500; + Random write_rnd(301); + for (int i = 0; i < N; i++) { + Write(RandomSkewedString(i, &write_rnd)); + } + Random read_rnd(301); + for (int i = 0; i < N; i++) { + ASSERT_EQ(RandomSkewedString(i, &read_rnd), Read()); + } + ASSERT_EQ("EOF", Read()); +} + +// Tests of all the error paths in log_reader.cc follow: + +TEST(LogTest, ReadError) { + Write("foo"); + ForceError(); + ASSERT_EQ("EOF", Read()); + ASSERT_EQ(kBlockSize, DroppedBytes()); + ASSERT_EQ("OK", MatchError("read error")); +} + +TEST(LogTest, BadRecordType) { + Write("foo"); + // Type is stored in header[6] + IncrementByte(6, 100); + FixChecksum(0, 3); + ASSERT_EQ("EOF", Read()); + ASSERT_EQ(3, DroppedBytes()); + ASSERT_EQ("OK", MatchError("unknown record type")); +} + +TEST(LogTest, TruncatedTrailingRecord) { + Write("foo"); + ShrinkSize(4); // Drop all payload as well as a header byte + ASSERT_EQ("EOF", Read()); + ASSERT_EQ(kHeaderSize - 1, DroppedBytes()); + ASSERT_EQ("OK", MatchError("truncated record at end of file")); +} + +TEST(LogTest, BadLength) { + Write("foo"); + ShrinkSize(1); + ASSERT_EQ("EOF", Read()); + ASSERT_EQ(kHeaderSize + 2, DroppedBytes()); + ASSERT_EQ("OK", MatchError("bad record length")); +} + +TEST(LogTest, ChecksumMismatch) { + Write("foo"); + IncrementByte(0, 10); + ASSERT_EQ("EOF", Read()); + ASSERT_EQ(10, DroppedBytes()); + ASSERT_EQ("OK", MatchError("checksum mismatch")); +} + +TEST(LogTest, UnexpectedMiddleType) { + Write("foo"); + SetByte(6, kMiddleType); + FixChecksum(0, 3); + ASSERT_EQ("EOF", Read()); + ASSERT_EQ(3, DroppedBytes()); + ASSERT_EQ("OK", MatchError("missing start")); +} + +TEST(LogTest, UnexpectedLastType) { + Write("foo"); + SetByte(6, kLastType); + FixChecksum(0, 3); + ASSERT_EQ("EOF", Read()); + ASSERT_EQ(3, DroppedBytes()); + ASSERT_EQ("OK", MatchError("missing start")); +} + +TEST(LogTest, UnexpectedFullType) { + Write("foo"); + Write("bar"); + SetByte(6, kFirstType); + FixChecksum(0, 3); + ASSERT_EQ("bar", Read()); + ASSERT_EQ("EOF", Read()); + ASSERT_EQ(3, DroppedBytes()); + ASSERT_EQ("OK", MatchError("partial record without end")); +} + +TEST(LogTest, UnexpectedFirstType) { + Write("foo"); + Write(BigString("bar", 100000)); + SetByte(6, kFirstType); + FixChecksum(0, 3); + ASSERT_EQ(BigString("bar", 100000), Read()); + ASSERT_EQ("EOF", Read()); + ASSERT_EQ(3, DroppedBytes()); + ASSERT_EQ("OK", MatchError("partial record without end")); +} + +TEST(LogTest, ErrorJoinsRecords) { + // Consider two fragmented records: + // first(R1) last(R1) first(R2) last(R2) + // where the middle two fragments disappear. We do not want + // first(R1),last(R2) to get joined and returned as a valid record. + + // Write records that span two blocks + Write(BigString("foo", kBlockSize)); + Write(BigString("bar", kBlockSize)); + Write("correct"); + + // Wipe the middle block + for (int offset = kBlockSize; offset < 2*kBlockSize; offset++) { + SetByte(offset, 'x'); + } + + ASSERT_EQ("correct", Read()); + ASSERT_EQ("EOF", Read()); + const int dropped = DroppedBytes(); + ASSERT_LE(dropped, 2*kBlockSize + 100); + ASSERT_GE(dropped, 2*kBlockSize); +} + +TEST(LogTest, ReadStart) { + CheckInitialOffsetRecord(0, 0); +} + +TEST(LogTest, ReadSecondOneOff) { + CheckInitialOffsetRecord(1, 1); +} + +TEST(LogTest, ReadSecondTenThousand) { + CheckInitialOffsetRecord(10000, 1); +} + +TEST(LogTest, ReadSecondStart) { + CheckInitialOffsetRecord(10007, 1); +} + +TEST(LogTest, ReadThirdOneOff) { + CheckInitialOffsetRecord(10008, 2); +} + +TEST(LogTest, ReadThirdStart) { + CheckInitialOffsetRecord(20014, 2); +} + +TEST(LogTest, ReadFourthOneOff) { + CheckInitialOffsetRecord(20015, 3); +} + +TEST(LogTest, ReadFourthFirstBlockTrailer) { + CheckInitialOffsetRecord(log::kBlockSize - 4, 3); +} + +TEST(LogTest, ReadFourthMiddleBlock) { + CheckInitialOffsetRecord(log::kBlockSize + 1, 3); +} + +TEST(LogTest, ReadFourthLastBlock) { + CheckInitialOffsetRecord(2 * log::kBlockSize + 1, 3); +} + +TEST(LogTest, ReadFourthStart) { + CheckInitialOffsetRecord( + 2 * (kHeaderSize + 1000) + (2 * log::kBlockSize - 1000) + 3 * kHeaderSize, + 3); +} + +TEST(LogTest, ReadEnd) { + CheckOffsetPastEndReturnsNoRecords(0); +} + +TEST(LogTest, ReadPastEnd) { + CheckOffsetPastEndReturnsNoRecords(5); +} + +} // namespace log +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/db/log_writer.cc b/src/leveldb/db/log_writer.cc new file mode 100644 index 0000000..2da99ac --- /dev/null +++ b/src/leveldb/db/log_writer.cc @@ -0,0 +1,103 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/log_writer.h" + +#include +#include "leveldb/env.h" +#include "util/coding.h" +#include "util/crc32c.h" + +namespace leveldb { +namespace log { + +Writer::Writer(WritableFile* dest) + : dest_(dest), + block_offset_(0) { + for (int i = 0; i <= kMaxRecordType; i++) { + char t = static_cast(i); + type_crc_[i] = crc32c::Value(&t, 1); + } +} + +Writer::~Writer() { +} + +Status Writer::AddRecord(const Slice& slice) { + const char* ptr = slice.data(); + size_t left = slice.size(); + + // Fragment the record if necessary and emit it. Note that if slice + // is empty, we still want to iterate once to emit a single + // zero-length record + Status s; + bool begin = true; + do { + const int leftover = kBlockSize - block_offset_; + assert(leftover >= 0); + if (leftover < kHeaderSize) { + // Switch to a new block + if (leftover > 0) { + // Fill the trailer (literal below relies on kHeaderSize being 7) + assert(kHeaderSize == 7); + dest_->Append(Slice("\x00\x00\x00\x00\x00\x00", leftover)); + } + block_offset_ = 0; + } + + // Invariant: we never leave < kHeaderSize bytes in a block. + assert(kBlockSize - block_offset_ - kHeaderSize >= 0); + + const size_t avail = kBlockSize - block_offset_ - kHeaderSize; + const size_t fragment_length = (left < avail) ? left : avail; + + RecordType type; + const bool end = (left == fragment_length); + if (begin && end) { + type = kFullType; + } else if (begin) { + type = kFirstType; + } else if (end) { + type = kLastType; + } else { + type = kMiddleType; + } + + s = EmitPhysicalRecord(type, ptr, fragment_length); + ptr += fragment_length; + left -= fragment_length; + begin = false; + } while (s.ok() && left > 0); + return s; +} + +Status Writer::EmitPhysicalRecord(RecordType t, const char* ptr, size_t n) { + assert(n <= 0xffff); // Must fit in two bytes + assert(block_offset_ + kHeaderSize + n <= kBlockSize); + + // Format the header + char buf[kHeaderSize]; + buf[4] = static_cast(n & 0xff); + buf[5] = static_cast(n >> 8); + buf[6] = static_cast(t); + + // Compute the crc of the record type and the payload. + uint32_t crc = crc32c::Extend(type_crc_[t], ptr, n); + crc = crc32c::Mask(crc); // Adjust for storage + EncodeFixed32(buf, crc); + + // Write the header and the payload + Status s = dest_->Append(Slice(buf, kHeaderSize)); + if (s.ok()) { + s = dest_->Append(Slice(ptr, n)); + if (s.ok()) { + s = dest_->Flush(); + } + } + block_offset_ += kHeaderSize + n; + return s; +} + +} // namespace log +} // namespace leveldb diff --git a/src/leveldb/db/log_writer.h b/src/leveldb/db/log_writer.h new file mode 100644 index 0000000..a3a954d --- /dev/null +++ b/src/leveldb/db/log_writer.h @@ -0,0 +1,48 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_DB_LOG_WRITER_H_ +#define STORAGE_LEVELDB_DB_LOG_WRITER_H_ + +#include +#include "db/log_format.h" +#include "leveldb/slice.h" +#include "leveldb/status.h" + +namespace leveldb { + +class WritableFile; + +namespace log { + +class Writer { + public: + // Create a writer that will append data to "*dest". + // "*dest" must be initially empty. + // "*dest" must remain live while this Writer is in use. + explicit Writer(WritableFile* dest); + ~Writer(); + + Status AddRecord(const Slice& slice); + + private: + WritableFile* dest_; + int block_offset_; // Current offset in block + + // crc32c values for all supported record types. These are + // pre-computed to reduce the overhead of computing the crc of the + // record type stored in the header. + uint32_t type_crc_[kMaxRecordType + 1]; + + Status EmitPhysicalRecord(RecordType type, const char* ptr, size_t length); + + // No copying allowed + Writer(const Writer&); + void operator=(const Writer&); +}; + +} // namespace log +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_LOG_WRITER_H_ diff --git a/src/leveldb/db/memtable.cc b/src/leveldb/db/memtable.cc new file mode 100644 index 0000000..bfec0a7 --- /dev/null +++ b/src/leveldb/db/memtable.cc @@ -0,0 +1,145 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/memtable.h" +#include "db/dbformat.h" +#include "leveldb/comparator.h" +#include "leveldb/env.h" +#include "leveldb/iterator.h" +#include "util/coding.h" + +namespace leveldb { + +static Slice GetLengthPrefixedSlice(const char* data) { + uint32_t len; + const char* p = data; + p = GetVarint32Ptr(p, p + 5, &len); // +5: we assume "p" is not corrupted + return Slice(p, len); +} + +MemTable::MemTable(const InternalKeyComparator& cmp) + : comparator_(cmp), + refs_(0), + table_(comparator_, &arena_) { +} + +MemTable::~MemTable() { + assert(refs_ == 0); +} + +size_t MemTable::ApproximateMemoryUsage() { return arena_.MemoryUsage(); } + +int MemTable::KeyComparator::operator()(const char* aptr, const char* bptr) + const { + // Internal keys are encoded as length-prefixed strings. + Slice a = GetLengthPrefixedSlice(aptr); + Slice b = GetLengthPrefixedSlice(bptr); + return comparator.Compare(a, b); +} + +// Encode a suitable internal key target for "target" and return it. +// Uses *scratch as scratch space, and the returned pointer will point +// into this scratch space. +static const char* EncodeKey(std::string* scratch, const Slice& target) { + scratch->clear(); + PutVarint32(scratch, target.size()); + scratch->append(target.data(), target.size()); + return scratch->data(); +} + +class MemTableIterator: public Iterator { + public: + explicit MemTableIterator(MemTable::Table* table) : iter_(table) { } + + virtual bool Valid() const { return iter_.Valid(); } + virtual void Seek(const Slice& k) { iter_.Seek(EncodeKey(&tmp_, k)); } + virtual void SeekToFirst() { iter_.SeekToFirst(); } + virtual void SeekToLast() { iter_.SeekToLast(); } + virtual void Next() { iter_.Next(); } + virtual void Prev() { iter_.Prev(); } + virtual Slice key() const { return GetLengthPrefixedSlice(iter_.key()); } + virtual Slice value() const { + Slice key_slice = GetLengthPrefixedSlice(iter_.key()); + return GetLengthPrefixedSlice(key_slice.data() + key_slice.size()); + } + + virtual Status status() const { return Status::OK(); } + + private: + MemTable::Table::Iterator iter_; + std::string tmp_; // For passing to EncodeKey + + // No copying allowed + MemTableIterator(const MemTableIterator&); + void operator=(const MemTableIterator&); +}; + +Iterator* MemTable::NewIterator() { + return new MemTableIterator(&table_); +} + +void MemTable::Add(SequenceNumber s, ValueType type, + const Slice& key, + const Slice& value) { + // Format of an entry is concatenation of: + // key_size : varint32 of internal_key.size() + // key bytes : char[internal_key.size()] + // value_size : varint32 of value.size() + // value bytes : char[value.size()] + size_t key_size = key.size(); + size_t val_size = value.size(); + size_t internal_key_size = key_size + 8; + const size_t encoded_len = + VarintLength(internal_key_size) + internal_key_size + + VarintLength(val_size) + val_size; + char* buf = arena_.Allocate(encoded_len); + char* p = EncodeVarint32(buf, internal_key_size); + memcpy(p, key.data(), key_size); + p += key_size; + EncodeFixed64(p, (s << 8) | type); + p += 8; + p = EncodeVarint32(p, val_size); + memcpy(p, value.data(), val_size); + assert((p + val_size) - buf == encoded_len); + table_.Insert(buf); +} + +bool MemTable::Get(const LookupKey& key, std::string* value, Status* s) { + Slice memkey = key.memtable_key(); + Table::Iterator iter(&table_); + iter.Seek(memkey.data()); + if (iter.Valid()) { + // entry format is: + // klength varint32 + // userkey char[klength] + // tag uint64 + // vlength varint32 + // value char[vlength] + // Check that it belongs to same user key. We do not check the + // sequence number since the Seek() call above should have skipped + // all entries with overly large sequence numbers. + const char* entry = iter.key(); + uint32_t key_length; + const char* key_ptr = GetVarint32Ptr(entry, entry+5, &key_length); + if (comparator_.comparator.user_comparator()->Compare( + Slice(key_ptr, key_length - 8), + key.user_key()) == 0) { + // Correct user key + const uint64_t tag = DecodeFixed64(key_ptr + key_length - 8); + switch (static_cast(tag & 0xff)) { + case kTypeValue: { + Slice v = GetLengthPrefixedSlice(key_ptr + key_length); + value->assign(v.data(), v.size()); + return true; + } + case kTypeDeletion: + *s = Status::NotFound(Slice()); + return true; + } + } + } + return false; +} + +} // namespace leveldb diff --git a/src/leveldb/db/memtable.h b/src/leveldb/db/memtable.h new file mode 100644 index 0000000..92e90bb --- /dev/null +++ b/src/leveldb/db/memtable.h @@ -0,0 +1,91 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_DB_MEMTABLE_H_ +#define STORAGE_LEVELDB_DB_MEMTABLE_H_ + +#include +#include "leveldb/db.h" +#include "db/dbformat.h" +#include "db/skiplist.h" +#include "util/arena.h" + +namespace leveldb { + +class InternalKeyComparator; +class Mutex; +class MemTableIterator; + +class MemTable { + public: + // MemTables are reference counted. The initial reference count + // is zero and the caller must call Ref() at least once. + explicit MemTable(const InternalKeyComparator& comparator); + + // Increase reference count. + void Ref() { ++refs_; } + + // Drop reference count. Delete if no more references exist. + void Unref() { + --refs_; + assert(refs_ >= 0); + if (refs_ <= 0) { + delete this; + } + } + + // Returns an estimate of the number of bytes of data in use by this + // data structure. + // + // REQUIRES: external synchronization to prevent simultaneous + // operations on the same MemTable. + size_t ApproximateMemoryUsage(); + + // Return an iterator that yields the contents of the memtable. + // + // The caller must ensure that the underlying MemTable remains live + // while the returned iterator is live. The keys returned by this + // iterator are internal keys encoded by AppendInternalKey in the + // db/format.{h,cc} module. + Iterator* NewIterator(); + + // Add an entry into memtable that maps key to value at the + // specified sequence number and with the specified type. + // Typically value will be empty if type==kTypeDeletion. + void Add(SequenceNumber seq, ValueType type, + const Slice& key, + const Slice& value); + + // If memtable contains a value for key, store it in *value and return true. + // If memtable contains a deletion for key, store a NotFound() error + // in *status and return true. + // Else, return false. + bool Get(const LookupKey& key, std::string* value, Status* s); + + private: + ~MemTable(); // Private since only Unref() should be used to delete it + + struct KeyComparator { + const InternalKeyComparator comparator; + explicit KeyComparator(const InternalKeyComparator& c) : comparator(c) { } + int operator()(const char* a, const char* b) const; + }; + friend class MemTableIterator; + friend class MemTableBackwardIterator; + + typedef SkipList Table; + + KeyComparator comparator_; + int refs_; + Arena arena_; + Table table_; + + // No copying allowed + MemTable(const MemTable&); + void operator=(const MemTable&); +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_MEMTABLE_H_ diff --git a/src/leveldb/db/repair.cc b/src/leveldb/db/repair.cc new file mode 100644 index 0000000..96c9b37 --- /dev/null +++ b/src/leveldb/db/repair.cc @@ -0,0 +1,462 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// We recover the contents of the descriptor from the other files we find. +// (1) Any log files are first converted to tables +// (2) We scan every table to compute +// (a) smallest/largest for the table +// (b) largest sequence number in the table +// (3) We generate descriptor contents: +// - log number is set to zero +// - next-file-number is set to 1 + largest file number we found +// - last-sequence-number is set to largest sequence# found across +// all tables (see 2c) +// - compaction pointers are cleared +// - every table file is added at level 0 +// +// Possible optimization 1: +// (a) Compute total size and use to pick appropriate max-level M +// (b) Sort tables by largest sequence# in the table +// (c) For each table: if it overlaps earlier table, place in level-0, +// else place in level-M. +// Possible optimization 2: +// Store per-table metadata (smallest, largest, largest-seq#, ...) +// in the table's meta section to speed up ScanTable. + +#include "db/builder.h" +#include "db/db_impl.h" +#include "db/dbformat.h" +#include "db/filename.h" +#include "db/log_reader.h" +#include "db/log_writer.h" +#include "db/memtable.h" +#include "db/table_cache.h" +#include "db/version_edit.h" +#include "db/write_batch_internal.h" +#include "leveldb/comparator.h" +#include "leveldb/db.h" +#include "leveldb/env.h" + +namespace leveldb { + +namespace { + +class Repairer { + public: + Repairer(const std::string& dbname, const Options& options) + : dbname_(dbname), + env_(options.env), + icmp_(options.comparator), + ipolicy_(options.filter_policy), + options_(SanitizeOptions(dbname, &icmp_, &ipolicy_, options)), + owns_info_log_(options_.info_log != options.info_log), + owns_cache_(options_.block_cache != options.block_cache), + next_file_number_(1) { + // TableCache can be small since we expect each table to be opened once. + table_cache_ = new TableCache(dbname_, &options_, 10); + } + + ~Repairer() { + delete table_cache_; + if (owns_info_log_) { + delete options_.info_log; + } + if (owns_cache_) { + delete options_.block_cache; + } + } + + Status Run() { + Status status = FindFiles(); + if (status.ok()) { + ConvertLogFilesToTables(); + ExtractMetaData(); + status = WriteDescriptor(); + } + if (status.ok()) { + unsigned long long bytes = 0; + for (size_t i = 0; i < tables_.size(); i++) { + bytes += tables_[i].meta.file_size; + } + Log(options_.info_log, + "**** Repaired leveldb %s; " + "recovered %d files; %llu bytes. " + "Some data may have been lost. " + "****", + dbname_.c_str(), + static_cast(tables_.size()), + bytes); + } + return status; + } + + private: + struct TableInfo { + FileMetaData meta; + SequenceNumber max_sequence; + }; + + std::string const dbname_; + Env* const env_; + InternalKeyComparator const icmp_; + InternalFilterPolicy const ipolicy_; + Options const options_; + bool owns_info_log_; + bool owns_cache_; + TableCache* table_cache_; + VersionEdit edit_; + + std::vector manifests_; + std::vector table_numbers_; + std::vector logs_; + std::vector tables_; + uint64_t next_file_number_; + + Status FindFiles() { + std::vector filenames; + Status status = env_->GetChildren(dbname_, &filenames); + if (!status.ok()) { + return status; + } + if (filenames.empty()) { + return Status::IOError(dbname_, "repair found no files"); + } + + uint64_t number; + FileType type; + for (size_t i = 0; i < filenames.size(); i++) { + if (ParseFileName(filenames[i], &number, &type)) { + if (type == kDescriptorFile) { + manifests_.push_back(filenames[i]); + } else { + if (number + 1 > next_file_number_) { + next_file_number_ = number + 1; + } + if (type == kLogFile) { + logs_.push_back(number); + } else if (type == kTableFile) { + table_numbers_.push_back(number); + } else { + // Ignore other files + } + } + } + } + return status; + } + + void ConvertLogFilesToTables() { + for (size_t i = 0; i < logs_.size(); i++) { + std::string logname = LogFileName(dbname_, logs_[i]); + Status status = ConvertLogToTable(logs_[i]); + if (!status.ok()) { + Log(options_.info_log, "Log #%llu: ignoring conversion error: %s", + (unsigned long long) logs_[i], + status.ToString().c_str()); + } + ArchiveFile(logname); + } + } + + Status ConvertLogToTable(uint64_t log) { + struct LogReporter : public log::Reader::Reporter { + Env* env; + Logger* info_log; + uint64_t lognum; + virtual void Corruption(size_t bytes, const Status& s) { + // We print error messages for corruption, but continue repairing. + Log(info_log, "Log #%llu: dropping %d bytes; %s", + (unsigned long long) lognum, + static_cast(bytes), + s.ToString().c_str()); + } + }; + + // Open the log file + std::string logname = LogFileName(dbname_, log); + SequentialFile* lfile; + Status status = env_->NewSequentialFile(logname, &lfile); + if (!status.ok()) { + return status; + } + + // Create the log reader. + LogReporter reporter; + reporter.env = env_; + reporter.info_log = options_.info_log; + reporter.lognum = log; + // We intentially make log::Reader do checksumming so that + // corruptions cause entire commits to be skipped instead of + // propagating bad information (like overly large sequence + // numbers). + log::Reader reader(lfile, &reporter, false/*do not checksum*/, + 0/*initial_offset*/); + + // Read all the records and add to a memtable + std::string scratch; + Slice record; + WriteBatch batch; + MemTable* mem = new MemTable(icmp_); + mem->Ref(); + int counter = 0; + while (reader.ReadRecord(&record, &scratch)) { + if (record.size() < 12) { + reporter.Corruption( + record.size(), Status::Corruption("log record too small")); + continue; + } + WriteBatchInternal::SetContents(&batch, record); + status = WriteBatchInternal::InsertInto(&batch, mem); + if (status.ok()) { + counter += WriteBatchInternal::Count(&batch); + } else { + Log(options_.info_log, "Log #%llu: ignoring %s", + (unsigned long long) log, + status.ToString().c_str()); + status = Status::OK(); // Keep going with rest of file + } + } + delete lfile; + + // Do not record a version edit for this conversion to a Table + // since ExtractMetaData() will also generate edits. + FileMetaData meta; + meta.number = next_file_number_++; + Iterator* iter = mem->NewIterator(); + status = BuildTable(dbname_, env_, options_, table_cache_, iter, &meta); + delete iter; + mem->Unref(); + mem = NULL; + if (status.ok()) { + if (meta.file_size > 0) { + table_numbers_.push_back(meta.number); + } + } + Log(options_.info_log, "Log #%llu: %d ops saved to Table #%llu %s", + (unsigned long long) log, + counter, + (unsigned long long) meta.number, + status.ToString().c_str()); + return status; + } + + void ExtractMetaData() { + std::vector kept; + for (size_t i = 0; i < table_numbers_.size(); i++) { + ScanTable(table_numbers_[i]); + } + } + + Iterator* NewTableIterator(const FileMetaData& meta) { + // Same as compaction iterators: if paranoid_checks are on, turn + // on checksum verification. + ReadOptions r; + r.verify_checksums = options_.paranoid_checks; + return table_cache_->NewIterator(r, meta.number, meta.file_size); + } + + void ScanTable(uint64_t number) { + TableInfo t; + t.meta.number = number; + std::string fname = TableFileName(dbname_, number); + Status status = env_->GetFileSize(fname, &t.meta.file_size); + if (!status.ok()) { + // Try alternate file name. + fname = SSTTableFileName(dbname_, number); + Status s2 = env_->GetFileSize(fname, &t.meta.file_size); + if (s2.ok()) { + status = Status::OK(); + } + } + if (!status.ok()) { + ArchiveFile(TableFileName(dbname_, number)); + ArchiveFile(SSTTableFileName(dbname_, number)); + Log(options_.info_log, "Table #%llu: dropped: %s", + (unsigned long long) t.meta.number, + status.ToString().c_str()); + return; + } + + // Extract metadata by scanning through table. + int counter = 0; + Iterator* iter = NewTableIterator(t.meta); + bool empty = true; + ParsedInternalKey parsed; + t.max_sequence = 0; + for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { + Slice key = iter->key(); + if (!ParseInternalKey(key, &parsed)) { + Log(options_.info_log, "Table #%llu: unparsable key %s", + (unsigned long long) t.meta.number, + EscapeString(key).c_str()); + continue; + } + + counter++; + if (empty) { + empty = false; + t.meta.smallest.DecodeFrom(key); + } + t.meta.largest.DecodeFrom(key); + if (parsed.sequence > t.max_sequence) { + t.max_sequence = parsed.sequence; + } + } + if (!iter->status().ok()) { + status = iter->status(); + } + delete iter; + Log(options_.info_log, "Table #%llu: %d entries %s", + (unsigned long long) t.meta.number, + counter, + status.ToString().c_str()); + + if (status.ok()) { + tables_.push_back(t); + } else { + RepairTable(fname, t); // RepairTable archives input file. + } + } + + void RepairTable(const std::string& src, TableInfo t) { + // We will copy src contents to a new table and then rename the + // new table over the source. + + // Create builder. + std::string copy = TableFileName(dbname_, next_file_number_++); + WritableFile* file; + Status s = env_->NewWritableFile(copy, &file); + if (!s.ok()) { + return; + } + TableBuilder* builder = new TableBuilder(options_, file); + + // Copy data. + Iterator* iter = NewTableIterator(t.meta); + int counter = 0; + for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { + builder->Add(iter->key(), iter->value()); + counter++; + } + delete iter; + + ArchiveFile(src); + if (counter == 0) { + builder->Abandon(); // Nothing to save + } else { + s = builder->Finish(); + if (s.ok()) { + t.meta.file_size = builder->FileSize(); + } + } + delete builder; + builder = NULL; + + if (s.ok()) { + s = file->Close(); + } + delete file; + file = NULL; + + if (counter > 0 && s.ok()) { + std::string orig = TableFileName(dbname_, t.meta.number); + s = env_->RenameFile(copy, orig); + if (s.ok()) { + Log(options_.info_log, "Table #%llu: %d entries repaired", + (unsigned long long) t.meta.number, counter); + tables_.push_back(t); + } + } + if (!s.ok()) { + env_->DeleteFile(copy); + } + } + + Status WriteDescriptor() { + std::string tmp = TempFileName(dbname_, 1); + WritableFile* file; + Status status = env_->NewWritableFile(tmp, &file); + if (!status.ok()) { + return status; + } + + SequenceNumber max_sequence = 0; + for (size_t i = 0; i < tables_.size(); i++) { + if (max_sequence < tables_[i].max_sequence) { + max_sequence = tables_[i].max_sequence; + } + } + + edit_.SetComparatorName(icmp_.user_comparator()->Name()); + edit_.SetLogNumber(0); + edit_.SetNextFile(next_file_number_); + edit_.SetLastSequence(max_sequence); + + for (size_t i = 0; i < tables_.size(); i++) { + // TODO(opt): separate out into multiple levels + const TableInfo& t = tables_[i]; + edit_.AddFile(0, t.meta.number, t.meta.file_size, + t.meta.smallest, t.meta.largest); + } + + //fprintf(stderr, "NewDescriptor:\n%s\n", edit_.DebugString().c_str()); + { + log::Writer log(file); + std::string record; + edit_.EncodeTo(&record); + status = log.AddRecord(record); + } + if (status.ok()) { + status = file->Close(); + } + delete file; + file = NULL; + + if (!status.ok()) { + env_->DeleteFile(tmp); + } else { + // Discard older manifests + for (size_t i = 0; i < manifests_.size(); i++) { + ArchiveFile(dbname_ + "/" + manifests_[i]); + } + + // Install new manifest + status = env_->RenameFile(tmp, DescriptorFileName(dbname_, 1)); + if (status.ok()) { + status = SetCurrentFile(env_, dbname_, 1); + } else { + env_->DeleteFile(tmp); + } + } + return status; + } + + void ArchiveFile(const std::string& fname) { + // Move into another directory. E.g., for + // dir/foo + // rename to + // dir/lost/foo + const char* slash = strrchr(fname.c_str(), '/'); + std::string new_dir; + if (slash != NULL) { + new_dir.assign(fname.data(), slash - fname.data()); + } + new_dir.append("/lost"); + env_->CreateDir(new_dir); // Ignore error + std::string new_file = new_dir; + new_file.append("/"); + new_file.append((slash == NULL) ? fname.c_str() : slash + 1); + Status s = env_->RenameFile(fname, new_file); + Log(options_.info_log, "Archiving %s: %s\n", + fname.c_str(), s.ToString().c_str()); + } +}; +} // namespace + +Status RepairDB(const std::string& dbname, const Options& options) { + Repairer repairer(dbname, options); + return repairer.Run(); +} + +} // namespace leveldb diff --git a/src/leveldb/db/skiplist.h b/src/leveldb/db/skiplist.h new file mode 100644 index 0000000..af85be6 --- /dev/null +++ b/src/leveldb/db/skiplist.h @@ -0,0 +1,379 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// Thread safety +// ------------- +// +// Writes require external synchronization, most likely a mutex. +// Reads require a guarantee that the SkipList will not be destroyed +// while the read is in progress. Apart from that, reads progress +// without any internal locking or synchronization. +// +// Invariants: +// +// (1) Allocated nodes are never deleted until the SkipList is +// destroyed. This is trivially guaranteed by the code since we +// never delete any skip list nodes. +// +// (2) The contents of a Node except for the next/prev pointers are +// immutable after the Node has been linked into the SkipList. +// Only Insert() modifies the list, and it is careful to initialize +// a node and use release-stores to publish the nodes in one or +// more lists. +// +// ... prev vs. next pointer ordering ... + +#include +#include +#include "port/port.h" +#include "util/arena.h" +#include "util/random.h" + +namespace leveldb { + +class Arena; + +template +class SkipList { + private: + struct Node; + + public: + // Create a new SkipList object that will use "cmp" for comparing keys, + // and will allocate memory using "*arena". Objects allocated in the arena + // must remain allocated for the lifetime of the skiplist object. + explicit SkipList(Comparator cmp, Arena* arena); + + // Insert key into the list. + // REQUIRES: nothing that compares equal to key is currently in the list. + void Insert(const Key& key); + + // Returns true iff an entry that compares equal to key is in the list. + bool Contains(const Key& key) const; + + // Iteration over the contents of a skip list + class Iterator { + public: + // Initialize an iterator over the specified list. + // The returned iterator is not valid. + explicit Iterator(const SkipList* list); + + // Returns true iff the iterator is positioned at a valid node. + bool Valid() const; + + // Returns the key at the current position. + // REQUIRES: Valid() + const Key& key() const; + + // Advances to the next position. + // REQUIRES: Valid() + void Next(); + + // Advances to the previous position. + // REQUIRES: Valid() + void Prev(); + + // Advance to the first entry with a key >= target + void Seek(const Key& target); + + // Position at the first entry in list. + // Final state of iterator is Valid() iff list is not empty. + void SeekToFirst(); + + // Position at the last entry in list. + // Final state of iterator is Valid() iff list is not empty. + void SeekToLast(); + + private: + const SkipList* list_; + Node* node_; + // Intentionally copyable + }; + + private: + enum { kMaxHeight = 12 }; + + // Immutable after construction + Comparator const compare_; + Arena* const arena_; // Arena used for allocations of nodes + + Node* const head_; + + // Modified only by Insert(). Read racily by readers, but stale + // values are ok. + port::AtomicPointer max_height_; // Height of the entire list + + inline int GetMaxHeight() const { + return static_cast( + reinterpret_cast(max_height_.NoBarrier_Load())); + } + + // Read/written only by Insert(). + Random rnd_; + + Node* NewNode(const Key& key, int height); + int RandomHeight(); + bool Equal(const Key& a, const Key& b) const { return (compare_(a, b) == 0); } + + // Return true if key is greater than the data stored in "n" + bool KeyIsAfterNode(const Key& key, Node* n) const; + + // Return the earliest node that comes at or after key. + // Return NULL if there is no such node. + // + // If prev is non-NULL, fills prev[level] with pointer to previous + // node at "level" for every level in [0..max_height_-1]. + Node* FindGreaterOrEqual(const Key& key, Node** prev) const; + + // Return the latest node with a key < key. + // Return head_ if there is no such node. + Node* FindLessThan(const Key& key) const; + + // Return the last node in the list. + // Return head_ if list is empty. + Node* FindLast() const; + + // No copying allowed + SkipList(const SkipList&); + void operator=(const SkipList&); +}; + +// Implementation details follow +template +struct SkipList::Node { + explicit Node(const Key& k) : key(k) { } + + Key const key; + + // Accessors/mutators for links. Wrapped in methods so we can + // add the appropriate barriers as necessary. + Node* Next(int n) { + assert(n >= 0); + // Use an 'acquire load' so that we observe a fully initialized + // version of the returned Node. + return reinterpret_cast(next_[n].Acquire_Load()); + } + void SetNext(int n, Node* x) { + assert(n >= 0); + // Use a 'release store' so that anybody who reads through this + // pointer observes a fully initialized version of the inserted node. + next_[n].Release_Store(x); + } + + // No-barrier variants that can be safely used in a few locations. + Node* NoBarrier_Next(int n) { + assert(n >= 0); + return reinterpret_cast(next_[n].NoBarrier_Load()); + } + void NoBarrier_SetNext(int n, Node* x) { + assert(n >= 0); + next_[n].NoBarrier_Store(x); + } + + private: + // Array of length equal to the node height. next_[0] is lowest level link. + port::AtomicPointer next_[1]; +}; + +template +typename SkipList::Node* +SkipList::NewNode(const Key& key, int height) { + char* mem = arena_->AllocateAligned( + sizeof(Node) + sizeof(port::AtomicPointer) * (height - 1)); + return new (mem) Node(key); +} + +template +inline SkipList::Iterator::Iterator(const SkipList* list) { + list_ = list; + node_ = NULL; +} + +template +inline bool SkipList::Iterator::Valid() const { + return node_ != NULL; +} + +template +inline const Key& SkipList::Iterator::key() const { + assert(Valid()); + return node_->key; +} + +template +inline void SkipList::Iterator::Next() { + assert(Valid()); + node_ = node_->Next(0); +} + +template +inline void SkipList::Iterator::Prev() { + // Instead of using explicit "prev" links, we just search for the + // last node that falls before key. + assert(Valid()); + node_ = list_->FindLessThan(node_->key); + if (node_ == list_->head_) { + node_ = NULL; + } +} + +template +inline void SkipList::Iterator::Seek(const Key& target) { + node_ = list_->FindGreaterOrEqual(target, NULL); +} + +template +inline void SkipList::Iterator::SeekToFirst() { + node_ = list_->head_->Next(0); +} + +template +inline void SkipList::Iterator::SeekToLast() { + node_ = list_->FindLast(); + if (node_ == list_->head_) { + node_ = NULL; + } +} + +template +int SkipList::RandomHeight() { + // Increase height with probability 1 in kBranching + static const unsigned int kBranching = 4; + int height = 1; + while (height < kMaxHeight && ((rnd_.Next() % kBranching) == 0)) { + height++; + } + assert(height > 0); + assert(height <= kMaxHeight); + return height; +} + +template +bool SkipList::KeyIsAfterNode(const Key& key, Node* n) const { + // NULL n is considered infinite + return (n != NULL) && (compare_(n->key, key) < 0); +} + +template +typename SkipList::Node* SkipList::FindGreaterOrEqual(const Key& key, Node** prev) + const { + Node* x = head_; + int level = GetMaxHeight() - 1; + while (true) { + Node* next = x->Next(level); + if (KeyIsAfterNode(key, next)) { + // Keep searching in this list + x = next; + } else { + if (prev != NULL) prev[level] = x; + if (level == 0) { + return next; + } else { + // Switch to next list + level--; + } + } + } +} + +template +typename SkipList::Node* +SkipList::FindLessThan(const Key& key) const { + Node* x = head_; + int level = GetMaxHeight() - 1; + while (true) { + assert(x == head_ || compare_(x->key, key) < 0); + Node* next = x->Next(level); + if (next == NULL || compare_(next->key, key) >= 0) { + if (level == 0) { + return x; + } else { + // Switch to next list + level--; + } + } else { + x = next; + } + } +} + +template +typename SkipList::Node* SkipList::FindLast() + const { + Node* x = head_; + int level = GetMaxHeight() - 1; + while (true) { + Node* next = x->Next(level); + if (next == NULL) { + if (level == 0) { + return x; + } else { + // Switch to next list + level--; + } + } else { + x = next; + } + } +} + +template +SkipList::SkipList(Comparator cmp, Arena* arena) + : compare_(cmp), + arena_(arena), + head_(NewNode(0 /* any key will do */, kMaxHeight)), + max_height_(reinterpret_cast(1)), + rnd_(0xdeadbeef) { + for (int i = 0; i < kMaxHeight; i++) { + head_->SetNext(i, NULL); + } +} + +template +void SkipList::Insert(const Key& key) { + // TODO(opt): We can use a barrier-free variant of FindGreaterOrEqual() + // here since Insert() is externally synchronized. + Node* prev[kMaxHeight]; + Node* x = FindGreaterOrEqual(key, prev); + + // Our data structure does not allow duplicate insertion + assert(x == NULL || !Equal(key, x->key)); + + int height = RandomHeight(); + if (height > GetMaxHeight()) { + for (int i = GetMaxHeight(); i < height; i++) { + prev[i] = head_; + } + //fprintf(stderr, "Change height from %d to %d\n", max_height_, height); + + // It is ok to mutate max_height_ without any synchronization + // with concurrent readers. A concurrent reader that observes + // the new value of max_height_ will see either the old value of + // new level pointers from head_ (NULL), or a new value set in + // the loop below. In the former case the reader will + // immediately drop to the next level since NULL sorts after all + // keys. In the latter case the reader will use the new node. + max_height_.NoBarrier_Store(reinterpret_cast(height)); + } + + x = NewNode(key, height); + for (int i = 0; i < height; i++) { + // NoBarrier_SetNext() suffices since we will add a barrier when + // we publish a pointer to "x" in prev[i]. + x->NoBarrier_SetNext(i, prev[i]->NoBarrier_Next(i)); + prev[i]->SetNext(i, x); + } +} + +template +bool SkipList::Contains(const Key& key) const { + Node* x = FindGreaterOrEqual(key, NULL); + if (x != NULL && Equal(key, x->key)) { + return true; + } else { + return false; + } +} + +} // namespace leveldb diff --git a/src/leveldb/db/skiplist_test.cc b/src/leveldb/db/skiplist_test.cc new file mode 100644 index 0000000..c78f4b4 --- /dev/null +++ b/src/leveldb/db/skiplist_test.cc @@ -0,0 +1,378 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/skiplist.h" +#include +#include "leveldb/env.h" +#include "util/arena.h" +#include "util/hash.h" +#include "util/random.h" +#include "util/testharness.h" + +namespace leveldb { + +typedef uint64_t Key; + +struct Comparator { + int operator()(const Key& a, const Key& b) const { + if (a < b) { + return -1; + } else if (a > b) { + return +1; + } else { + return 0; + } + } +}; + +class SkipTest { }; + +TEST(SkipTest, Empty) { + Arena arena; + Comparator cmp; + SkipList list(cmp, &arena); + ASSERT_TRUE(!list.Contains(10)); + + SkipList::Iterator iter(&list); + ASSERT_TRUE(!iter.Valid()); + iter.SeekToFirst(); + ASSERT_TRUE(!iter.Valid()); + iter.Seek(100); + ASSERT_TRUE(!iter.Valid()); + iter.SeekToLast(); + ASSERT_TRUE(!iter.Valid()); +} + +TEST(SkipTest, InsertAndLookup) { + const int N = 2000; + const int R = 5000; + Random rnd(1000); + std::set keys; + Arena arena; + Comparator cmp; + SkipList list(cmp, &arena); + for (int i = 0; i < N; i++) { + Key key = rnd.Next() % R; + if (keys.insert(key).second) { + list.Insert(key); + } + } + + for (int i = 0; i < R; i++) { + if (list.Contains(i)) { + ASSERT_EQ(keys.count(i), 1); + } else { + ASSERT_EQ(keys.count(i), 0); + } + } + + // Simple iterator tests + { + SkipList::Iterator iter(&list); + ASSERT_TRUE(!iter.Valid()); + + iter.Seek(0); + ASSERT_TRUE(iter.Valid()); + ASSERT_EQ(*(keys.begin()), iter.key()); + + iter.SeekToFirst(); + ASSERT_TRUE(iter.Valid()); + ASSERT_EQ(*(keys.begin()), iter.key()); + + iter.SeekToLast(); + ASSERT_TRUE(iter.Valid()); + ASSERT_EQ(*(keys.rbegin()), iter.key()); + } + + // Forward iteration test + for (int i = 0; i < R; i++) { + SkipList::Iterator iter(&list); + iter.Seek(i); + + // Compare against model iterator + std::set::iterator model_iter = keys.lower_bound(i); + for (int j = 0; j < 3; j++) { + if (model_iter == keys.end()) { + ASSERT_TRUE(!iter.Valid()); + break; + } else { + ASSERT_TRUE(iter.Valid()); + ASSERT_EQ(*model_iter, iter.key()); + ++model_iter; + iter.Next(); + } + } + } + + // Backward iteration test + { + SkipList::Iterator iter(&list); + iter.SeekToLast(); + + // Compare against model iterator + for (std::set::reverse_iterator model_iter = keys.rbegin(); + model_iter != keys.rend(); + ++model_iter) { + ASSERT_TRUE(iter.Valid()); + ASSERT_EQ(*model_iter, iter.key()); + iter.Prev(); + } + ASSERT_TRUE(!iter.Valid()); + } +} + +// We want to make sure that with a single writer and multiple +// concurrent readers (with no synchronization other than when a +// reader's iterator is created), the reader always observes all the +// data that was present in the skip list when the iterator was +// constructor. Because insertions are happening concurrently, we may +// also observe new values that were inserted since the iterator was +// constructed, but we should never miss any values that were present +// at iterator construction time. +// +// We generate multi-part keys: +// +// where: +// key is in range [0..K-1] +// gen is a generation number for key +// hash is hash(key,gen) +// +// The insertion code picks a random key, sets gen to be 1 + the last +// generation number inserted for that key, and sets hash to Hash(key,gen). +// +// At the beginning of a read, we snapshot the last inserted +// generation number for each key. We then iterate, including random +// calls to Next() and Seek(). For every key we encounter, we +// check that it is either expected given the initial snapshot or has +// been concurrently added since the iterator started. +class ConcurrentTest { + private: + static const uint32_t K = 4; + + static uint64_t key(Key key) { return (key >> 40); } + static uint64_t gen(Key key) { return (key >> 8) & 0xffffffffu; } + static uint64_t hash(Key key) { return key & 0xff; } + + static uint64_t HashNumbers(uint64_t k, uint64_t g) { + uint64_t data[2] = { k, g }; + return Hash(reinterpret_cast(data), sizeof(data), 0); + } + + static Key MakeKey(uint64_t k, uint64_t g) { + assert(sizeof(Key) == sizeof(uint64_t)); + assert(k <= K); // We sometimes pass K to seek to the end of the skiplist + assert(g <= 0xffffffffu); + return ((k << 40) | (g << 8) | (HashNumbers(k, g) & 0xff)); + } + + static bool IsValidKey(Key k) { + return hash(k) == (HashNumbers(key(k), gen(k)) & 0xff); + } + + static Key RandomTarget(Random* rnd) { + switch (rnd->Next() % 10) { + case 0: + // Seek to beginning + return MakeKey(0, 0); + case 1: + // Seek to end + return MakeKey(K, 0); + default: + // Seek to middle + return MakeKey(rnd->Next() % K, 0); + } + } + + // Per-key generation + struct State { + port::AtomicPointer generation[K]; + void Set(int k, intptr_t v) { + generation[k].Release_Store(reinterpret_cast(v)); + } + intptr_t Get(int k) { + return reinterpret_cast(generation[k].Acquire_Load()); + } + + State() { + for (int k = 0; k < K; k++) { + Set(k, 0); + } + } + }; + + // Current state of the test + State current_; + + Arena arena_; + + // SkipList is not protected by mu_. We just use a single writer + // thread to modify it. + SkipList list_; + + public: + ConcurrentTest() : list_(Comparator(), &arena_) { } + + // REQUIRES: External synchronization + void WriteStep(Random* rnd) { + const uint32_t k = rnd->Next() % K; + const intptr_t g = current_.Get(k) + 1; + const Key key = MakeKey(k, g); + list_.Insert(key); + current_.Set(k, g); + } + + void ReadStep(Random* rnd) { + // Remember the initial committed state of the skiplist. + State initial_state; + for (int k = 0; k < K; k++) { + initial_state.Set(k, current_.Get(k)); + } + + Key pos = RandomTarget(rnd); + SkipList::Iterator iter(&list_); + iter.Seek(pos); + while (true) { + Key current; + if (!iter.Valid()) { + current = MakeKey(K, 0); + } else { + current = iter.key(); + ASSERT_TRUE(IsValidKey(current)) << current; + } + ASSERT_LE(pos, current) << "should not go backwards"; + + // Verify that everything in [pos,current) was not present in + // initial_state. + while (pos < current) { + ASSERT_LT(key(pos), K) << pos; + + // Note that generation 0 is never inserted, so it is ok if + // <*,0,*> is missing. + ASSERT_TRUE((gen(pos) == 0) || + (gen(pos) > initial_state.Get(key(pos))) + ) << "key: " << key(pos) + << "; gen: " << gen(pos) + << "; initgen: " + << initial_state.Get(key(pos)); + + // Advance to next key in the valid key space + if (key(pos) < key(current)) { + pos = MakeKey(key(pos) + 1, 0); + } else { + pos = MakeKey(key(pos), gen(pos) + 1); + } + } + + if (!iter.Valid()) { + break; + } + + if (rnd->Next() % 2) { + iter.Next(); + pos = MakeKey(key(pos), gen(pos) + 1); + } else { + Key new_target = RandomTarget(rnd); + if (new_target > pos) { + pos = new_target; + iter.Seek(new_target); + } + } + } + } +}; +const uint32_t ConcurrentTest::K; + +// Simple test that does single-threaded testing of the ConcurrentTest +// scaffolding. +TEST(SkipTest, ConcurrentWithoutThreads) { + ConcurrentTest test; + Random rnd(test::RandomSeed()); + for (int i = 0; i < 10000; i++) { + test.ReadStep(&rnd); + test.WriteStep(&rnd); + } +} + +class TestState { + public: + ConcurrentTest t_; + int seed_; + port::AtomicPointer quit_flag_; + + enum ReaderState { + STARTING, + RUNNING, + DONE + }; + + explicit TestState(int s) + : seed_(s), + quit_flag_(NULL), + state_(STARTING), + state_cv_(&mu_) {} + + void Wait(ReaderState s) { + mu_.Lock(); + while (state_ != s) { + state_cv_.Wait(); + } + mu_.Unlock(); + } + + void Change(ReaderState s) { + mu_.Lock(); + state_ = s; + state_cv_.Signal(); + mu_.Unlock(); + } + + private: + port::Mutex mu_; + ReaderState state_; + port::CondVar state_cv_; +}; + +static void ConcurrentReader(void* arg) { + TestState* state = reinterpret_cast(arg); + Random rnd(state->seed_); + int64_t reads = 0; + state->Change(TestState::RUNNING); + while (!state->quit_flag_.Acquire_Load()) { + state->t_.ReadStep(&rnd); + ++reads; + } + state->Change(TestState::DONE); +} + +static void RunConcurrent(int run) { + const int seed = test::RandomSeed() + (run * 100); + Random rnd(seed); + const int N = 1000; + const int kSize = 1000; + for (int i = 0; i < N; i++) { + if ((i % 100) == 0) { + fprintf(stderr, "Run %d of %d\n", i, N); + } + TestState state(seed + 1); + Env::Default()->Schedule(ConcurrentReader, &state); + state.Wait(TestState::RUNNING); + for (int i = 0; i < kSize; i++) { + state.t_.WriteStep(&rnd); + } + state.quit_flag_.Release_Store(&state); // Any non-NULL arg will do + state.Wait(TestState::DONE); + } +} + +TEST(SkipTest, Concurrent1) { RunConcurrent(1); } +TEST(SkipTest, Concurrent2) { RunConcurrent(2); } +TEST(SkipTest, Concurrent3) { RunConcurrent(3); } +TEST(SkipTest, Concurrent4) { RunConcurrent(4); } +TEST(SkipTest, Concurrent5) { RunConcurrent(5); } + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/db/snapshot.h b/src/leveldb/db/snapshot.h new file mode 100644 index 0000000..e7f8fd2 --- /dev/null +++ b/src/leveldb/db/snapshot.h @@ -0,0 +1,66 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_DB_SNAPSHOT_H_ +#define STORAGE_LEVELDB_DB_SNAPSHOT_H_ + +#include "leveldb/db.h" + +namespace leveldb { + +class SnapshotList; + +// Snapshots are kept in a doubly-linked list in the DB. +// Each SnapshotImpl corresponds to a particular sequence number. +class SnapshotImpl : public Snapshot { + public: + SequenceNumber number_; // const after creation + + private: + friend class SnapshotList; + + // SnapshotImpl is kept in a doubly-linked circular list + SnapshotImpl* prev_; + SnapshotImpl* next_; + + SnapshotList* list_; // just for sanity checks +}; + +class SnapshotList { + public: + SnapshotList() { + list_.prev_ = &list_; + list_.next_ = &list_; + } + + bool empty() const { return list_.next_ == &list_; } + SnapshotImpl* oldest() const { assert(!empty()); return list_.next_; } + SnapshotImpl* newest() const { assert(!empty()); return list_.prev_; } + + const SnapshotImpl* New(SequenceNumber seq) { + SnapshotImpl* s = new SnapshotImpl; + s->number_ = seq; + s->list_ = this; + s->next_ = &list_; + s->prev_ = list_.prev_; + s->prev_->next_ = s; + s->next_->prev_ = s; + return s; + } + + void Delete(const SnapshotImpl* s) { + assert(s->list_ == this); + s->prev_->next_ = s->next_; + s->next_->prev_ = s->prev_; + delete s; + } + + private: + // Dummy head of doubly-linked list of snapshots + SnapshotImpl list_; +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_SNAPSHOT_H_ diff --git a/src/leveldb/db/table_cache.cc b/src/leveldb/db/table_cache.cc new file mode 100644 index 0000000..e3d82cd --- /dev/null +++ b/src/leveldb/db/table_cache.cc @@ -0,0 +1,127 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/table_cache.h" + +#include "db/filename.h" +#include "leveldb/env.h" +#include "leveldb/table.h" +#include "util/coding.h" + +namespace leveldb { + +struct TableAndFile { + RandomAccessFile* file; + Table* table; +}; + +static void DeleteEntry(const Slice& key, void* value) { + TableAndFile* tf = reinterpret_cast(value); + delete tf->table; + delete tf->file; + delete tf; +} + +static void UnrefEntry(void* arg1, void* arg2) { + Cache* cache = reinterpret_cast(arg1); + Cache::Handle* h = reinterpret_cast(arg2); + cache->Release(h); +} + +TableCache::TableCache(const std::string& dbname, + const Options* options, + int entries) + : env_(options->env), + dbname_(dbname), + options_(options), + cache_(NewLRUCache(entries)) { +} + +TableCache::~TableCache() { + delete cache_; +} + +Status TableCache::FindTable(uint64_t file_number, uint64_t file_size, + Cache::Handle** handle) { + Status s; + char buf[sizeof(file_number)]; + EncodeFixed64(buf, file_number); + Slice key(buf, sizeof(buf)); + *handle = cache_->Lookup(key); + if (*handle == NULL) { + std::string fname = TableFileName(dbname_, file_number); + RandomAccessFile* file = NULL; + Table* table = NULL; + s = env_->NewRandomAccessFile(fname, &file); + if (!s.ok()) { + std::string old_fname = SSTTableFileName(dbname_, file_number); + if (env_->NewRandomAccessFile(old_fname, &file).ok()) { + s = Status::OK(); + } + } + if (s.ok()) { + s = Table::Open(*options_, file, file_size, &table); + } + + if (!s.ok()) { + assert(table == NULL); + delete file; + // We do not cache error results so that if the error is transient, + // or somebody repairs the file, we recover automatically. + } else { + TableAndFile* tf = new TableAndFile; + tf->file = file; + tf->table = table; + *handle = cache_->Insert(key, tf, 1, &DeleteEntry); + } + } + return s; +} + +Iterator* TableCache::NewIterator(const ReadOptions& options, + uint64_t file_number, + uint64_t file_size, + Table** tableptr) { + if (tableptr != NULL) { + *tableptr = NULL; + } + + Cache::Handle* handle = NULL; + Status s = FindTable(file_number, file_size, &handle); + if (!s.ok()) { + return NewErrorIterator(s); + } + + Table* table = reinterpret_cast(cache_->Value(handle))->table; + Iterator* result = table->NewIterator(options); + result->RegisterCleanup(&UnrefEntry, cache_, handle); + if (tableptr != NULL) { + *tableptr = table; + } + return result; +} + +Status TableCache::Get(const ReadOptions& options, + uint64_t file_number, + uint64_t file_size, + const Slice& k, + void* arg, + void (*saver)(void*, const Slice&, const Slice&)) { + Cache::Handle* handle = NULL; + Status s = FindTable(file_number, file_size, &handle); + if (s.ok()) { + Table* t = reinterpret_cast(cache_->Value(handle))->table; + s = t->InternalGet(options, k, arg, saver); + cache_->Release(handle); + } + return s; +} + +void TableCache::Evict(uint64_t file_number) { + char buf[sizeof(file_number)]; + EncodeFixed64(buf, file_number); + cache_->Erase(Slice(buf, sizeof(buf))); +} + +} // namespace leveldb diff --git a/src/leveldb/db/table_cache.h b/src/leveldb/db/table_cache.h new file mode 100644 index 0000000..8cf4aaf --- /dev/null +++ b/src/leveldb/db/table_cache.h @@ -0,0 +1,61 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// Thread-safe (provides internal synchronization) + +#ifndef STORAGE_LEVELDB_DB_TABLE_CACHE_H_ +#define STORAGE_LEVELDB_DB_TABLE_CACHE_H_ + +#include +#include +#include "db/dbformat.h" +#include "leveldb/cache.h" +#include "leveldb/table.h" +#include "port/port.h" + +namespace leveldb { + +class Env; + +class TableCache { + public: + TableCache(const std::string& dbname, const Options* options, int entries); + ~TableCache(); + + // Return an iterator for the specified file number (the corresponding + // file length must be exactly "file_size" bytes). If "tableptr" is + // non-NULL, also sets "*tableptr" to point to the Table object + // underlying the returned iterator, or NULL if no Table object underlies + // the returned iterator. The returned "*tableptr" object is owned by + // the cache and should not be deleted, and is valid for as long as the + // returned iterator is live. + Iterator* NewIterator(const ReadOptions& options, + uint64_t file_number, + uint64_t file_size, + Table** tableptr = NULL); + + // If a seek to internal key "k" in specified file finds an entry, + // call (*handle_result)(arg, found_key, found_value). + Status Get(const ReadOptions& options, + uint64_t file_number, + uint64_t file_size, + const Slice& k, + void* arg, + void (*handle_result)(void*, const Slice&, const Slice&)); + + // Evict any entry for the specified file number + void Evict(uint64_t file_number); + + private: + Env* const env_; + const std::string dbname_; + const Options* options_; + Cache* cache_; + + Status FindTable(uint64_t file_number, uint64_t file_size, Cache::Handle**); +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_TABLE_CACHE_H_ diff --git a/src/leveldb/db/version_edit.cc b/src/leveldb/db/version_edit.cc new file mode 100644 index 0000000..f10a2d5 --- /dev/null +++ b/src/leveldb/db/version_edit.cc @@ -0,0 +1,266 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/version_edit.h" + +#include "db/version_set.h" +#include "util/coding.h" + +namespace leveldb { + +// Tag numbers for serialized VersionEdit. These numbers are written to +// disk and should not be changed. +enum Tag { + kComparator = 1, + kLogNumber = 2, + kNextFileNumber = 3, + kLastSequence = 4, + kCompactPointer = 5, + kDeletedFile = 6, + kNewFile = 7, + // 8 was used for large value refs + kPrevLogNumber = 9 +}; + +void VersionEdit::Clear() { + comparator_.clear(); + log_number_ = 0; + prev_log_number_ = 0; + last_sequence_ = 0; + next_file_number_ = 0; + has_comparator_ = false; + has_log_number_ = false; + has_prev_log_number_ = false; + has_next_file_number_ = false; + has_last_sequence_ = false; + deleted_files_.clear(); + new_files_.clear(); +} + +void VersionEdit::EncodeTo(std::string* dst) const { + if (has_comparator_) { + PutVarint32(dst, kComparator); + PutLengthPrefixedSlice(dst, comparator_); + } + if (has_log_number_) { + PutVarint32(dst, kLogNumber); + PutVarint64(dst, log_number_); + } + if (has_prev_log_number_) { + PutVarint32(dst, kPrevLogNumber); + PutVarint64(dst, prev_log_number_); + } + if (has_next_file_number_) { + PutVarint32(dst, kNextFileNumber); + PutVarint64(dst, next_file_number_); + } + if (has_last_sequence_) { + PutVarint32(dst, kLastSequence); + PutVarint64(dst, last_sequence_); + } + + for (size_t i = 0; i < compact_pointers_.size(); i++) { + PutVarint32(dst, kCompactPointer); + PutVarint32(dst, compact_pointers_[i].first); // level + PutLengthPrefixedSlice(dst, compact_pointers_[i].second.Encode()); + } + + for (DeletedFileSet::const_iterator iter = deleted_files_.begin(); + iter != deleted_files_.end(); + ++iter) { + PutVarint32(dst, kDeletedFile); + PutVarint32(dst, iter->first); // level + PutVarint64(dst, iter->second); // file number + } + + for (size_t i = 0; i < new_files_.size(); i++) { + const FileMetaData& f = new_files_[i].second; + PutVarint32(dst, kNewFile); + PutVarint32(dst, new_files_[i].first); // level + PutVarint64(dst, f.number); + PutVarint64(dst, f.file_size); + PutLengthPrefixedSlice(dst, f.smallest.Encode()); + PutLengthPrefixedSlice(dst, f.largest.Encode()); + } +} + +static bool GetInternalKey(Slice* input, InternalKey* dst) { + Slice str; + if (GetLengthPrefixedSlice(input, &str)) { + dst->DecodeFrom(str); + return true; + } else { + return false; + } +} + +static bool GetLevel(Slice* input, int* level) { + uint32_t v; + if (GetVarint32(input, &v) && + v < config::kNumLevels) { + *level = v; + return true; + } else { + return false; + } +} + +Status VersionEdit::DecodeFrom(const Slice& src) { + Clear(); + Slice input = src; + const char* msg = NULL; + uint32_t tag; + + // Temporary storage for parsing + int level; + uint64_t number; + FileMetaData f; + Slice str; + InternalKey key; + + while (msg == NULL && GetVarint32(&input, &tag)) { + switch (tag) { + case kComparator: + if (GetLengthPrefixedSlice(&input, &str)) { + comparator_ = str.ToString(); + has_comparator_ = true; + } else { + msg = "comparator name"; + } + break; + + case kLogNumber: + if (GetVarint64(&input, &log_number_)) { + has_log_number_ = true; + } else { + msg = "log number"; + } + break; + + case kPrevLogNumber: + if (GetVarint64(&input, &prev_log_number_)) { + has_prev_log_number_ = true; + } else { + msg = "previous log number"; + } + break; + + case kNextFileNumber: + if (GetVarint64(&input, &next_file_number_)) { + has_next_file_number_ = true; + } else { + msg = "next file number"; + } + break; + + case kLastSequence: + if (GetVarint64(&input, &last_sequence_)) { + has_last_sequence_ = true; + } else { + msg = "last sequence number"; + } + break; + + case kCompactPointer: + if (GetLevel(&input, &level) && + GetInternalKey(&input, &key)) { + compact_pointers_.push_back(std::make_pair(level, key)); + } else { + msg = "compaction pointer"; + } + break; + + case kDeletedFile: + if (GetLevel(&input, &level) && + GetVarint64(&input, &number)) { + deleted_files_.insert(std::make_pair(level, number)); + } else { + msg = "deleted file"; + } + break; + + case kNewFile: + if (GetLevel(&input, &level) && + GetVarint64(&input, &f.number) && + GetVarint64(&input, &f.file_size) && + GetInternalKey(&input, &f.smallest) && + GetInternalKey(&input, &f.largest)) { + new_files_.push_back(std::make_pair(level, f)); + } else { + msg = "new-file entry"; + } + break; + + default: + msg = "unknown tag"; + break; + } + } + + if (msg == NULL && !input.empty()) { + msg = "invalid tag"; + } + + Status result; + if (msg != NULL) { + result = Status::Corruption("VersionEdit", msg); + } + return result; +} + +std::string VersionEdit::DebugString() const { + std::string r; + r.append("VersionEdit {"); + if (has_comparator_) { + r.append("\n Comparator: "); + r.append(comparator_); + } + if (has_log_number_) { + r.append("\n LogNumber: "); + AppendNumberTo(&r, log_number_); + } + if (has_prev_log_number_) { + r.append("\n PrevLogNumber: "); + AppendNumberTo(&r, prev_log_number_); + } + if (has_next_file_number_) { + r.append("\n NextFile: "); + AppendNumberTo(&r, next_file_number_); + } + if (has_last_sequence_) { + r.append("\n LastSeq: "); + AppendNumberTo(&r, last_sequence_); + } + for (size_t i = 0; i < compact_pointers_.size(); i++) { + r.append("\n CompactPointer: "); + AppendNumberTo(&r, compact_pointers_[i].first); + r.append(" "); + r.append(compact_pointers_[i].second.DebugString()); + } + for (DeletedFileSet::const_iterator iter = deleted_files_.begin(); + iter != deleted_files_.end(); + ++iter) { + r.append("\n DeleteFile: "); + AppendNumberTo(&r, iter->first); + r.append(" "); + AppendNumberTo(&r, iter->second); + } + for (size_t i = 0; i < new_files_.size(); i++) { + const FileMetaData& f = new_files_[i].second; + r.append("\n AddFile: "); + AppendNumberTo(&r, new_files_[i].first); + r.append(" "); + AppendNumberTo(&r, f.number); + r.append(" "); + AppendNumberTo(&r, f.file_size); + r.append(" "); + r.append(f.smallest.DebugString()); + r.append(" .. "); + r.append(f.largest.DebugString()); + } + r.append("\n}\n"); + return r; +} + +} // namespace leveldb diff --git a/src/leveldb/db/version_edit.h b/src/leveldb/db/version_edit.h new file mode 100644 index 0000000..eaef77b --- /dev/null +++ b/src/leveldb/db/version_edit.h @@ -0,0 +1,107 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_DB_VERSION_EDIT_H_ +#define STORAGE_LEVELDB_DB_VERSION_EDIT_H_ + +#include +#include +#include +#include "db/dbformat.h" + +namespace leveldb { + +class VersionSet; + +struct FileMetaData { + int refs; + int allowed_seeks; // Seeks allowed until compaction + uint64_t number; + uint64_t file_size; // File size in bytes + InternalKey smallest; // Smallest internal key served by table + InternalKey largest; // Largest internal key served by table + + FileMetaData() : refs(0), allowed_seeks(1 << 30), file_size(0) { } +}; + +class VersionEdit { + public: + VersionEdit() { Clear(); } + ~VersionEdit() { } + + void Clear(); + + void SetComparatorName(const Slice& name) { + has_comparator_ = true; + comparator_ = name.ToString(); + } + void SetLogNumber(uint64_t num) { + has_log_number_ = true; + log_number_ = num; + } + void SetPrevLogNumber(uint64_t num) { + has_prev_log_number_ = true; + prev_log_number_ = num; + } + void SetNextFile(uint64_t num) { + has_next_file_number_ = true; + next_file_number_ = num; + } + void SetLastSequence(SequenceNumber seq) { + has_last_sequence_ = true; + last_sequence_ = seq; + } + void SetCompactPointer(int level, const InternalKey& key) { + compact_pointers_.push_back(std::make_pair(level, key)); + } + + // Add the specified file at the specified number. + // REQUIRES: This version has not been saved (see VersionSet::SaveTo) + // REQUIRES: "smallest" and "largest" are smallest and largest keys in file + void AddFile(int level, uint64_t file, + uint64_t file_size, + const InternalKey& smallest, + const InternalKey& largest) { + FileMetaData f; + f.number = file; + f.file_size = file_size; + f.smallest = smallest; + f.largest = largest; + new_files_.push_back(std::make_pair(level, f)); + } + + // Delete the specified "file" from the specified "level". + void DeleteFile(int level, uint64_t file) { + deleted_files_.insert(std::make_pair(level, file)); + } + + void EncodeTo(std::string* dst) const; + Status DecodeFrom(const Slice& src); + + std::string DebugString() const; + + private: + friend class VersionSet; + + typedef std::set< std::pair > DeletedFileSet; + + std::string comparator_; + uint64_t log_number_; + uint64_t prev_log_number_; + uint64_t next_file_number_; + SequenceNumber last_sequence_; + bool has_comparator_; + bool has_log_number_; + bool has_prev_log_number_; + bool has_next_file_number_; + bool has_last_sequence_; + + std::vector< std::pair > compact_pointers_; + DeletedFileSet deleted_files_; + std::vector< std::pair > new_files_; +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_VERSION_EDIT_H_ diff --git a/src/leveldb/db/version_edit_test.cc b/src/leveldb/db/version_edit_test.cc new file mode 100644 index 0000000..280310b --- /dev/null +++ b/src/leveldb/db/version_edit_test.cc @@ -0,0 +1,46 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/version_edit.h" +#include "util/testharness.h" + +namespace leveldb { + +static void TestEncodeDecode(const VersionEdit& edit) { + std::string encoded, encoded2; + edit.EncodeTo(&encoded); + VersionEdit parsed; + Status s = parsed.DecodeFrom(encoded); + ASSERT_TRUE(s.ok()) << s.ToString(); + parsed.EncodeTo(&encoded2); + ASSERT_EQ(encoded, encoded2); +} + +class VersionEditTest { }; + +TEST(VersionEditTest, EncodeDecode) { + static const uint64_t kBig = 1ull << 50; + + VersionEdit edit; + for (int i = 0; i < 4; i++) { + TestEncodeDecode(edit); + edit.AddFile(3, kBig + 300 + i, kBig + 400 + i, + InternalKey("foo", kBig + 500 + i, kTypeValue), + InternalKey("zoo", kBig + 600 + i, kTypeDeletion)); + edit.DeleteFile(4, kBig + 700 + i); + edit.SetCompactPointer(i, InternalKey("x", kBig + 900 + i, kTypeValue)); + } + + edit.SetComparatorName("foo"); + edit.SetLogNumber(kBig + 100); + edit.SetNextFile(kBig + 200); + edit.SetLastSequence(kBig + 1000); + TestEncodeDecode(edit); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/db/version_set.cc b/src/leveldb/db/version_set.cc new file mode 100644 index 0000000..517edd3 --- /dev/null +++ b/src/leveldb/db/version_set.cc @@ -0,0 +1,1498 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/version_set.h" + +#include +#include +#include "db/filename.h" +#include "db/log_reader.h" +#include "db/log_writer.h" +#include "db/memtable.h" +#include "db/table_cache.h" +#include "leveldb/env.h" +#include "leveldb/table_builder.h" +#include "table/merger.h" +#include "table/two_level_iterator.h" +#include "util/coding.h" +#include "util/logging.h" + +namespace leveldb { + +static const int kTargetFileSize = 2 * 1048576; + +// Maximum bytes of overlaps in grandparent (i.e., level+2) before we +// stop building a single file in a level->level+1 compaction. +static const int64_t kMaxGrandParentOverlapBytes = 10 * kTargetFileSize; + +// Maximum number of bytes in all compacted files. We avoid expanding +// the lower level file set of a compaction if it would make the +// total compaction cover more than this many bytes. +static const int64_t kExpandedCompactionByteSizeLimit = 25 * kTargetFileSize; + +static double MaxBytesForLevel(int level) { + // Note: the result for level zero is not really used since we set + // the level-0 compaction threshold based on number of files. + double result = 10 * 1048576.0; // Result for both level-0 and level-1 + while (level > 1) { + result *= 10; + level--; + } + return result; +} + +static uint64_t MaxFileSizeForLevel(int level) { + return kTargetFileSize; // We could vary per level to reduce number of files? +} + +static int64_t TotalFileSize(const std::vector& files) { + int64_t sum = 0; + for (size_t i = 0; i < files.size(); i++) { + sum += files[i]->file_size; + } + return sum; +} + +namespace { +std::string IntSetToString(const std::set& s) { + std::string result = "{"; + for (std::set::const_iterator it = s.begin(); + it != s.end(); + ++it) { + result += (result.size() > 1) ? "," : ""; + result += NumberToString(*it); + } + result += "}"; + return result; +} +} // namespace + +Version::~Version() { + assert(refs_ == 0); + + // Remove from linked list + prev_->next_ = next_; + next_->prev_ = prev_; + + // Drop references to files + for (int level = 0; level < config::kNumLevels; level++) { + for (size_t i = 0; i < files_[level].size(); i++) { + FileMetaData* f = files_[level][i]; + assert(f->refs > 0); + f->refs--; + if (f->refs <= 0) { + delete f; + } + } + } +} + +int FindFile(const InternalKeyComparator& icmp, + const std::vector& files, + const Slice& key) { + uint32_t left = 0; + uint32_t right = files.size(); + while (left < right) { + uint32_t mid = (left + right) / 2; + const FileMetaData* f = files[mid]; + if (icmp.InternalKeyComparator::Compare(f->largest.Encode(), key) < 0) { + // Key at "mid.largest" is < "target". Therefore all + // files at or before "mid" are uninteresting. + left = mid + 1; + } else { + // Key at "mid.largest" is >= "target". Therefore all files + // after "mid" are uninteresting. + right = mid; + } + } + return right; +} + +static bool AfterFile(const Comparator* ucmp, + const Slice* user_key, const FileMetaData* f) { + // NULL user_key occurs before all keys and is therefore never after *f + return (user_key != NULL && + ucmp->Compare(*user_key, f->largest.user_key()) > 0); +} + +static bool BeforeFile(const Comparator* ucmp, + const Slice* user_key, const FileMetaData* f) { + // NULL user_key occurs after all keys and is therefore never before *f + return (user_key != NULL && + ucmp->Compare(*user_key, f->smallest.user_key()) < 0); +} + +bool SomeFileOverlapsRange( + const InternalKeyComparator& icmp, + bool disjoint_sorted_files, + const std::vector& files, + const Slice* smallest_user_key, + const Slice* largest_user_key) { + const Comparator* ucmp = icmp.user_comparator(); + if (!disjoint_sorted_files) { + // Need to check against all files + for (size_t i = 0; i < files.size(); i++) { + const FileMetaData* f = files[i]; + if (AfterFile(ucmp, smallest_user_key, f) || + BeforeFile(ucmp, largest_user_key, f)) { + // No overlap + } else { + return true; // Overlap + } + } + return false; + } + + // Binary search over file list + uint32_t index = 0; + if (smallest_user_key != NULL) { + // Find the earliest possible internal key for smallest_user_key + InternalKey small(*smallest_user_key, kMaxSequenceNumber,kValueTypeForSeek); + index = FindFile(icmp, files, small.Encode()); + } + + if (index >= files.size()) { + // beginning of range is after all files, so no overlap. + return false; + } + + return !BeforeFile(ucmp, largest_user_key, files[index]); +} + +// An internal iterator. For a given version/level pair, yields +// information about the files in the level. For a given entry, key() +// is the largest key that occurs in the file, and value() is an +// 16-byte value containing the file number and file size, both +// encoded using EncodeFixed64. +class Version::LevelFileNumIterator : public Iterator { + public: + LevelFileNumIterator(const InternalKeyComparator& icmp, + const std::vector* flist) + : icmp_(icmp), + flist_(flist), + index_(flist->size()) { // Marks as invalid + } + virtual bool Valid() const { + return index_ < flist_->size(); + } + virtual void Seek(const Slice& target) { + index_ = FindFile(icmp_, *flist_, target); + } + virtual void SeekToFirst() { index_ = 0; } + virtual void SeekToLast() { + index_ = flist_->empty() ? 0 : flist_->size() - 1; + } + virtual void Next() { + assert(Valid()); + index_++; + } + virtual void Prev() { + assert(Valid()); + if (index_ == 0) { + index_ = flist_->size(); // Marks as invalid + } else { + index_--; + } + } + Slice key() const { + assert(Valid()); + return (*flist_)[index_]->largest.Encode(); + } + Slice value() const { + assert(Valid()); + EncodeFixed64(value_buf_, (*flist_)[index_]->number); + EncodeFixed64(value_buf_+8, (*flist_)[index_]->file_size); + return Slice(value_buf_, sizeof(value_buf_)); + } + virtual Status status() const { return Status::OK(); } + private: + const InternalKeyComparator icmp_; + const std::vector* const flist_; + uint32_t index_; + + // Backing store for value(). Holds the file number and size. + mutable char value_buf_[16]; +}; + +static Iterator* GetFileIterator(void* arg, + const ReadOptions& options, + const Slice& file_value) { + TableCache* cache = reinterpret_cast(arg); + if (file_value.size() != 16) { + return NewErrorIterator( + Status::Corruption("FileReader invoked with unexpected value")); + } else { + return cache->NewIterator(options, + DecodeFixed64(file_value.data()), + DecodeFixed64(file_value.data() + 8)); + } +} + +Iterator* Version::NewConcatenatingIterator(const ReadOptions& options, + int level) const { + return NewTwoLevelIterator( + new LevelFileNumIterator(vset_->icmp_, &files_[level]), + &GetFileIterator, vset_->table_cache_, options); +} + +void Version::AddIterators(const ReadOptions& options, + std::vector* iters) { + // Merge all level zero files together since they may overlap + for (size_t i = 0; i < files_[0].size(); i++) { + iters->push_back( + vset_->table_cache_->NewIterator( + options, files_[0][i]->number, files_[0][i]->file_size)); + } + + // For levels > 0, we can use a concatenating iterator that sequentially + // walks through the non-overlapping files in the level, opening them + // lazily. + for (int level = 1; level < config::kNumLevels; level++) { + if (!files_[level].empty()) { + iters->push_back(NewConcatenatingIterator(options, level)); + } + } +} + +// Callback from TableCache::Get() +namespace { +enum SaverState { + kNotFound, + kFound, + kDeleted, + kCorrupt, +}; +struct Saver { + SaverState state; + const Comparator* ucmp; + Slice user_key; + std::string* value; +}; +} +static void SaveValue(void* arg, const Slice& ikey, const Slice& v) { + Saver* s = reinterpret_cast(arg); + ParsedInternalKey parsed_key; + if (!ParseInternalKey(ikey, &parsed_key)) { + s->state = kCorrupt; + } else { + if (s->ucmp->Compare(parsed_key.user_key, s->user_key) == 0) { + s->state = (parsed_key.type == kTypeValue) ? kFound : kDeleted; + if (s->state == kFound) { + s->value->assign(v.data(), v.size()); + } + } + } +} + +static bool NewestFirst(FileMetaData* a, FileMetaData* b) { + return a->number > b->number; +} + +void Version::ForEachOverlapping(Slice user_key, Slice internal_key, + void* arg, + bool (*func)(void*, int, FileMetaData*)) { + // TODO(sanjay): Change Version::Get() to use this function. + const Comparator* ucmp = vset_->icmp_.user_comparator(); + + // Search level-0 in order from newest to oldest. + std::vector tmp; + tmp.reserve(files_[0].size()); + for (uint32_t i = 0; i < files_[0].size(); i++) { + FileMetaData* f = files_[0][i]; + if (ucmp->Compare(user_key, f->smallest.user_key()) >= 0 && + ucmp->Compare(user_key, f->largest.user_key()) <= 0) { + tmp.push_back(f); + } + } + if (!tmp.empty()) { + std::sort(tmp.begin(), tmp.end(), NewestFirst); + for (uint32_t i = 0; i < tmp.size(); i++) { + if (!(*func)(arg, 0, tmp[i])) { + return; + } + } + } + + // Search other levels. + for (int level = 1; level < config::kNumLevels; level++) { + size_t num_files = files_[level].size(); + if (num_files == 0) continue; + + // Binary search to find earliest index whose largest key >= internal_key. + uint32_t index = FindFile(vset_->icmp_, files_[level], internal_key); + if (index < num_files) { + FileMetaData* f = files_[level][index]; + if (ucmp->Compare(user_key, f->smallest.user_key()) < 0) { + // All of "f" is past any data for user_key + } else { + if (!(*func)(arg, level, f)) { + return; + } + } + } + } +} + +Status Version::Get(const ReadOptions& options, + const LookupKey& k, + std::string* value, + GetStats* stats) { + Slice ikey = k.internal_key(); + Slice user_key = k.user_key(); + const Comparator* ucmp = vset_->icmp_.user_comparator(); + Status s; + + stats->seek_file = NULL; + stats->seek_file_level = -1; + FileMetaData* last_file_read = NULL; + int last_file_read_level = -1; + + // We can search level-by-level since entries never hop across + // levels. Therefore we are guaranteed that if we find data + // in an smaller level, later levels are irrelevant. + std::vector tmp; + FileMetaData* tmp2; + for (int level = 0; level < config::kNumLevels; level++) { + size_t num_files = files_[level].size(); + if (num_files == 0) continue; + + // Get the list of files to search in this level + FileMetaData* const* files = &files_[level][0]; + if (level == 0) { + // Level-0 files may overlap each other. Find all files that + // overlap user_key and process them in order from newest to oldest. + tmp.reserve(num_files); + for (uint32_t i = 0; i < num_files; i++) { + FileMetaData* f = files[i]; + if (ucmp->Compare(user_key, f->smallest.user_key()) >= 0 && + ucmp->Compare(user_key, f->largest.user_key()) <= 0) { + tmp.push_back(f); + } + } + if (tmp.empty()) continue; + + std::sort(tmp.begin(), tmp.end(), NewestFirst); + files = &tmp[0]; + num_files = tmp.size(); + } else { + // Binary search to find earliest index whose largest key >= ikey. + uint32_t index = FindFile(vset_->icmp_, files_[level], ikey); + if (index >= num_files) { + files = NULL; + num_files = 0; + } else { + tmp2 = files[index]; + if (ucmp->Compare(user_key, tmp2->smallest.user_key()) < 0) { + // All of "tmp2" is past any data for user_key + files = NULL; + num_files = 0; + } else { + files = &tmp2; + num_files = 1; + } + } + } + + for (uint32_t i = 0; i < num_files; ++i) { + if (last_file_read != NULL && stats->seek_file == NULL) { + // We have had more than one seek for this read. Charge the 1st file. + stats->seek_file = last_file_read; + stats->seek_file_level = last_file_read_level; + } + + FileMetaData* f = files[i]; + last_file_read = f; + last_file_read_level = level; + + Saver saver; + saver.state = kNotFound; + saver.ucmp = ucmp; + saver.user_key = user_key; + saver.value = value; + s = vset_->table_cache_->Get(options, f->number, f->file_size, + ikey, &saver, SaveValue); + if (!s.ok()) { + return s; + } + switch (saver.state) { + case kNotFound: + break; // Keep searching in other files + case kFound: + return s; + case kDeleted: + s = Status::NotFound(Slice()); // Use empty error message for speed + return s; + case kCorrupt: + s = Status::Corruption("corrupted key for ", user_key); + return s; + } + } + } + + return Status::NotFound(Slice()); // Use an empty error message for speed +} + +bool Version::UpdateStats(const GetStats& stats) { + FileMetaData* f = stats.seek_file; + if (f != NULL) { + f->allowed_seeks--; + if (f->allowed_seeks <= 0 && file_to_compact_ == NULL) { + file_to_compact_ = f; + file_to_compact_level_ = stats.seek_file_level; + return true; + } + } + return false; +} + +bool Version::RecordReadSample(Slice internal_key) { + ParsedInternalKey ikey; + if (!ParseInternalKey(internal_key, &ikey)) { + return false; + } + + struct State { + GetStats stats; // Holds first matching file + int matches; + + static bool Match(void* arg, int level, FileMetaData* f) { + State* state = reinterpret_cast(arg); + state->matches++; + if (state->matches == 1) { + // Remember first match. + state->stats.seek_file = f; + state->stats.seek_file_level = level; + } + // We can stop iterating once we have a second match. + return state->matches < 2; + } + }; + + State state; + state.matches = 0; + ForEachOverlapping(ikey.user_key, internal_key, &state, &State::Match); + + // Must have at least two matches since we want to merge across + // files. But what if we have a single file that contains many + // overwrites and deletions? Should we have another mechanism for + // finding such files? + if (state.matches >= 2) { + // 1MB cost is about 1 seek (see comment in Builder::Apply). + return UpdateStats(state.stats); + } + return false; +} + +void Version::Ref() { + ++refs_; +} + +void Version::Unref() { + assert(this != &vset_->dummy_versions_); + assert(refs_ >= 1); + --refs_; + if (refs_ == 0) { + delete this; + } +} + +bool Version::OverlapInLevel(int level, + const Slice* smallest_user_key, + const Slice* largest_user_key) { + return SomeFileOverlapsRange(vset_->icmp_, (level > 0), files_[level], + smallest_user_key, largest_user_key); +} + +int Version::PickLevelForMemTableOutput( + const Slice& smallest_user_key, + const Slice& largest_user_key) { + int level = 0; + if (!OverlapInLevel(0, &smallest_user_key, &largest_user_key)) { + // Push to next level if there is no overlap in next level, + // and the #bytes overlapping in the level after that are limited. + InternalKey start(smallest_user_key, kMaxSequenceNumber, kValueTypeForSeek); + InternalKey limit(largest_user_key, 0, static_cast(0)); + std::vector overlaps; + while (level < config::kMaxMemCompactLevel) { + if (OverlapInLevel(level + 1, &smallest_user_key, &largest_user_key)) { + break; + } + if (level + 2 < config::kNumLevels) { + // Check that file does not overlap too many grandparent bytes. + GetOverlappingInputs(level + 2, &start, &limit, &overlaps); + const int64_t sum = TotalFileSize(overlaps); + if (sum > kMaxGrandParentOverlapBytes) { + break; + } + } + level++; + } + } + return level; +} + +// Store in "*inputs" all files in "level" that overlap [begin,end] +void Version::GetOverlappingInputs( + int level, + const InternalKey* begin, + const InternalKey* end, + std::vector* inputs) { + assert(level >= 0); + assert(level < config::kNumLevels); + inputs->clear(); + Slice user_begin, user_end; + if (begin != NULL) { + user_begin = begin->user_key(); + } + if (end != NULL) { + user_end = end->user_key(); + } + const Comparator* user_cmp = vset_->icmp_.user_comparator(); + for (size_t i = 0; i < files_[level].size(); ) { + FileMetaData* f = files_[level][i++]; + const Slice file_start = f->smallest.user_key(); + const Slice file_limit = f->largest.user_key(); + if (begin != NULL && user_cmp->Compare(file_limit, user_begin) < 0) { + // "f" is completely before specified range; skip it + } else if (end != NULL && user_cmp->Compare(file_start, user_end) > 0) { + // "f" is completely after specified range; skip it + } else { + inputs->push_back(f); + if (level == 0) { + // Level-0 files may overlap each other. So check if the newly + // added file has expanded the range. If so, restart search. + if (begin != NULL && user_cmp->Compare(file_start, user_begin) < 0) { + user_begin = file_start; + inputs->clear(); + i = 0; + } else if (end != NULL && user_cmp->Compare(file_limit, user_end) > 0) { + user_end = file_limit; + inputs->clear(); + i = 0; + } + } + } + } +} + +std::string Version::DebugString() const { + std::string r; + for (int level = 0; level < config::kNumLevels; level++) { + // E.g., + // --- level 1 --- + // 17:123['a' .. 'd'] + // 20:43['e' .. 'g'] + r.append("--- level "); + AppendNumberTo(&r, level); + r.append(" ---\n"); + const std::vector& files = files_[level]; + for (size_t i = 0; i < files.size(); i++) { + r.push_back(' '); + AppendNumberTo(&r, files[i]->number); + r.push_back(':'); + AppendNumberTo(&r, files[i]->file_size); + r.append("["); + r.append(files[i]->smallest.DebugString()); + r.append(" .. "); + r.append(files[i]->largest.DebugString()); + r.append("]\n"); + } + } + return r; +} + +// A helper class so we can efficiently apply a whole sequence +// of edits to a particular state without creating intermediate +// Versions that contain full copies of the intermediate state. +class VersionSet::Builder { + private: + // Helper to sort by v->files_[file_number].smallest + struct BySmallestKey { + const InternalKeyComparator* internal_comparator; + + bool operator()(FileMetaData* f1, FileMetaData* f2) const { + int r = internal_comparator->Compare(f1->smallest, f2->smallest); + if (r != 0) { + return (r < 0); + } else { + // Break ties by file number + return (f1->number < f2->number); + } + } + }; + + typedef std::set FileSet; + struct LevelState { + std::set deleted_files; + FileSet* added_files; + }; + + VersionSet* vset_; + Version* base_; + LevelState levels_[config::kNumLevels]; + + public: + // Initialize a builder with the files from *base and other info from *vset + Builder(VersionSet* vset, Version* base) + : vset_(vset), + base_(base) { + base_->Ref(); + BySmallestKey cmp; + cmp.internal_comparator = &vset_->icmp_; + for (int level = 0; level < config::kNumLevels; level++) { + levels_[level].added_files = new FileSet(cmp); + } + } + + ~Builder() { + for (int level = 0; level < config::kNumLevels; level++) { + const FileSet* added = levels_[level].added_files; + std::vector to_unref; + to_unref.reserve(added->size()); + for (FileSet::const_iterator it = added->begin(); + it != added->end(); ++it) { + to_unref.push_back(*it); + } + delete added; + for (uint32_t i = 0; i < to_unref.size(); i++) { + FileMetaData* f = to_unref[i]; + f->refs--; + if (f->refs <= 0) { + delete f; + } + } + } + base_->Unref(); + } + + // Apply all of the edits in *edit to the current state. + void Apply(VersionEdit* edit) { + // Update compaction pointers + for (size_t i = 0; i < edit->compact_pointers_.size(); i++) { + const int level = edit->compact_pointers_[i].first; + vset_->compact_pointer_[level] = + edit->compact_pointers_[i].second.Encode().ToString(); + } + + // Delete files + const VersionEdit::DeletedFileSet& del = edit->deleted_files_; + for (VersionEdit::DeletedFileSet::const_iterator iter = del.begin(); + iter != del.end(); + ++iter) { + const int level = iter->first; + const uint64_t number = iter->second; + levels_[level].deleted_files.insert(number); + } + + // Add new files + for (size_t i = 0; i < edit->new_files_.size(); i++) { + const int level = edit->new_files_[i].first; + FileMetaData* f = new FileMetaData(edit->new_files_[i].second); + f->refs = 1; + + // We arrange to automatically compact this file after + // a certain number of seeks. Let's assume: + // (1) One seek costs 10ms + // (2) Writing or reading 1MB costs 10ms (100MB/s) + // (3) A compaction of 1MB does 25MB of IO: + // 1MB read from this level + // 10-12MB read from next level (boundaries may be misaligned) + // 10-12MB written to next level + // This implies that 25 seeks cost the same as the compaction + // of 1MB of data. I.e., one seek costs approximately the + // same as the compaction of 40KB of data. We are a little + // conservative and allow approximately one seek for every 16KB + // of data before triggering a compaction. + f->allowed_seeks = (f->file_size / 16384); + if (f->allowed_seeks < 100) f->allowed_seeks = 100; + + levels_[level].deleted_files.erase(f->number); + levels_[level].added_files->insert(f); + } + } + + // Save the current state in *v. + void SaveTo(Version* v) { + BySmallestKey cmp; + cmp.internal_comparator = &vset_->icmp_; + for (int level = 0; level < config::kNumLevels; level++) { + // Merge the set of added files with the set of pre-existing files. + // Drop any deleted files. Store the result in *v. + const std::vector& base_files = base_->files_[level]; + std::vector::const_iterator base_iter = base_files.begin(); + std::vector::const_iterator base_end = base_files.end(); + const FileSet* added = levels_[level].added_files; + v->files_[level].reserve(base_files.size() + added->size()); + for (FileSet::const_iterator added_iter = added->begin(); + added_iter != added->end(); + ++added_iter) { + // Add all smaller files listed in base_ + for (std::vector::const_iterator bpos + = std::upper_bound(base_iter, base_end, *added_iter, cmp); + base_iter != bpos; + ++base_iter) { + MaybeAddFile(v, level, *base_iter); + } + + MaybeAddFile(v, level, *added_iter); + } + + // Add remaining base files + for (; base_iter != base_end; ++base_iter) { + MaybeAddFile(v, level, *base_iter); + } + +#ifndef NDEBUG + // Make sure there is no overlap in levels > 0 + if (level > 0) { + for (uint32_t i = 1; i < v->files_[level].size(); i++) { + const InternalKey& prev_end = v->files_[level][i-1]->largest; + const InternalKey& this_begin = v->files_[level][i]->smallest; + if (vset_->icmp_.Compare(prev_end, this_begin) >= 0) { + fprintf(stderr, "overlapping ranges in same level %s vs. %s\n", + prev_end.DebugString().c_str(), + this_begin.DebugString().c_str()); + abort(); + } + } + } +#endif + } + } + + void MaybeAddFile(Version* v, int level, FileMetaData* f) { + if (levels_[level].deleted_files.count(f->number) > 0) { + // File is deleted: do nothing + } else { + std::vector* files = &v->files_[level]; + if (level > 0 && !files->empty()) { + // Must not overlap + assert(vset_->icmp_.Compare((*files)[files->size()-1]->largest, + f->smallest) < 0); + } + f->refs++; + files->push_back(f); + } + } +}; + +VersionSet::VersionSet(const std::string& dbname, + const Options* options, + TableCache* table_cache, + const InternalKeyComparator* cmp) + : env_(options->env), + dbname_(dbname), + options_(options), + table_cache_(table_cache), + icmp_(*cmp), + next_file_number_(2), + manifest_file_number_(0), // Filled by Recover() + last_sequence_(0), + log_number_(0), + prev_log_number_(0), + descriptor_file_(NULL), + descriptor_log_(NULL), + dummy_versions_(this), + current_(NULL) { + AppendVersion(new Version(this)); +} + +VersionSet::~VersionSet() { + current_->Unref(); + assert(dummy_versions_.next_ == &dummy_versions_); // List must be empty + delete descriptor_log_; + delete descriptor_file_; +} + +void VersionSet::AppendVersion(Version* v) { + // Make "v" current + assert(v->refs_ == 0); + assert(v != current_); + if (current_ != NULL) { + current_->Unref(); + } + current_ = v; + v->Ref(); + + // Append to linked list + v->prev_ = dummy_versions_.prev_; + v->next_ = &dummy_versions_; + v->prev_->next_ = v; + v->next_->prev_ = v; +} + +Status VersionSet::LogAndApply(VersionEdit* edit, port::Mutex* mu) { + if (edit->has_log_number_) { + assert(edit->log_number_ >= log_number_); + assert(edit->log_number_ < next_file_number_); + } else { + edit->SetLogNumber(log_number_); + } + + if (!edit->has_prev_log_number_) { + edit->SetPrevLogNumber(prev_log_number_); + } + + edit->SetNextFile(next_file_number_); + edit->SetLastSequence(last_sequence_); + + Version* v = new Version(this); + { + Builder builder(this, current_); + builder.Apply(edit); + builder.SaveTo(v); + } + Finalize(v); + + // Initialize new descriptor log file if necessary by creating + // a temporary file that contains a snapshot of the current version. + std::string new_manifest_file; + Status s; + if (descriptor_log_ == NULL) { + // No reason to unlock *mu here since we only hit this path in the + // first call to LogAndApply (when opening the database). + assert(descriptor_file_ == NULL); + new_manifest_file = DescriptorFileName(dbname_, manifest_file_number_); + edit->SetNextFile(next_file_number_); + s = env_->NewWritableFile(new_manifest_file, &descriptor_file_); + if (s.ok()) { + descriptor_log_ = new log::Writer(descriptor_file_); + s = WriteSnapshot(descriptor_log_); + } + } + + // Unlock during expensive MANIFEST log write + { + mu->Unlock(); + + // Write new record to MANIFEST log + if (s.ok()) { + std::string record; + edit->EncodeTo(&record); + s = descriptor_log_->AddRecord(record); + if (s.ok()) { + s = descriptor_file_->Sync(); + } + if (!s.ok()) { + Log(options_->info_log, "MANIFEST write: %s\n", s.ToString().c_str()); + } + } + + // If we just created a new descriptor file, install it by writing a + // new CURRENT file that points to it. + if (s.ok() && !new_manifest_file.empty()) { + s = SetCurrentFile(env_, dbname_, manifest_file_number_); + } + + mu->Lock(); + } + + // Install the new version + if (s.ok()) { + AppendVersion(v); + log_number_ = edit->log_number_; + prev_log_number_ = edit->prev_log_number_; + } else { + delete v; + if (!new_manifest_file.empty()) { + delete descriptor_log_; + delete descriptor_file_; + descriptor_log_ = NULL; + descriptor_file_ = NULL; + env_->DeleteFile(new_manifest_file); + } + } + + return s; +} + +Status VersionSet::Recover() { + struct LogReporter : public log::Reader::Reporter { + Status* status; + virtual void Corruption(size_t bytes, const Status& s) { + if (this->status->ok()) *this->status = s; + } + }; + + // Read "CURRENT" file, which contains a pointer to the current manifest file + std::string current; + Status s = ReadFileToString(env_, CurrentFileName(dbname_), ¤t); + if (!s.ok()) { + return s; + } + if (current.empty() || current[current.size()-1] != '\n') { + return Status::Corruption("CURRENT file does not end with newline"); + } + current.resize(current.size() - 1); + + std::string dscname = dbname_ + "/" + current; + SequentialFile* file; + s = env_->NewSequentialFile(dscname, &file); + if (!s.ok()) { + return s; + } + + bool have_log_number = false; + bool have_prev_log_number = false; + bool have_next_file = false; + bool have_last_sequence = false; + uint64_t next_file = 0; + uint64_t last_sequence = 0; + uint64_t log_number = 0; + uint64_t prev_log_number = 0; + Builder builder(this, current_); + + { + LogReporter reporter; + reporter.status = &s; + log::Reader reader(file, &reporter, true/*checksum*/, 0/*initial_offset*/); + Slice record; + std::string scratch; + while (reader.ReadRecord(&record, &scratch) && s.ok()) { + VersionEdit edit; + s = edit.DecodeFrom(record); + if (s.ok()) { + if (edit.has_comparator_ && + edit.comparator_ != icmp_.user_comparator()->Name()) { + s = Status::InvalidArgument( + edit.comparator_ + " does not match existing comparator ", + icmp_.user_comparator()->Name()); + } + } + + if (s.ok()) { + builder.Apply(&edit); + } + + if (edit.has_log_number_) { + log_number = edit.log_number_; + have_log_number = true; + } + + if (edit.has_prev_log_number_) { + prev_log_number = edit.prev_log_number_; + have_prev_log_number = true; + } + + if (edit.has_next_file_number_) { + next_file = edit.next_file_number_; + have_next_file = true; + } + + if (edit.has_last_sequence_) { + last_sequence = edit.last_sequence_; + have_last_sequence = true; + } + } + } + delete file; + file = NULL; + + if (s.ok()) { + if (!have_next_file) { + s = Status::Corruption("no meta-nextfile entry in descriptor"); + } else if (!have_log_number) { + s = Status::Corruption("no meta-lognumber entry in descriptor"); + } else if (!have_last_sequence) { + s = Status::Corruption("no last-sequence-number entry in descriptor"); + } + + if (!have_prev_log_number) { + prev_log_number = 0; + } + + MarkFileNumberUsed(prev_log_number); + MarkFileNumberUsed(log_number); + } + + if (s.ok()) { + Version* v = new Version(this); + builder.SaveTo(v); + // Install recovered version + Finalize(v); + AppendVersion(v); + manifest_file_number_ = next_file; + next_file_number_ = next_file + 1; + last_sequence_ = last_sequence; + log_number_ = log_number; + prev_log_number_ = prev_log_number; + } + + return s; +} + +void VersionSet::MarkFileNumberUsed(uint64_t number) { + if (next_file_number_ <= number) { + next_file_number_ = number + 1; + } +} + +void VersionSet::Finalize(Version* v) { + // Precomputed best level for next compaction + int best_level = -1; + double best_score = -1; + + for (int level = 0; level < config::kNumLevels-1; level++) { + double score; + if (level == 0) { + // We treat level-0 specially by bounding the number of files + // instead of number of bytes for two reasons: + // + // (1) With larger write-buffer sizes, it is nice not to do too + // many level-0 compactions. + // + // (2) The files in level-0 are merged on every read and + // therefore we wish to avoid too many files when the individual + // file size is small (perhaps because of a small write-buffer + // setting, or very high compression ratios, or lots of + // overwrites/deletions). + score = v->files_[level].size() / + static_cast(config::kL0_CompactionTrigger); + } else { + // Compute the ratio of current size to size limit. + const uint64_t level_bytes = TotalFileSize(v->files_[level]); + score = static_cast(level_bytes) / MaxBytesForLevel(level); + } + + if (score > best_score) { + best_level = level; + best_score = score; + } + } + + v->compaction_level_ = best_level; + v->compaction_score_ = best_score; +} + +Status VersionSet::WriteSnapshot(log::Writer* log) { + // TODO: Break up into multiple records to reduce memory usage on recovery? + + // Save metadata + VersionEdit edit; + edit.SetComparatorName(icmp_.user_comparator()->Name()); + + // Save compaction pointers + for (int level = 0; level < config::kNumLevels; level++) { + if (!compact_pointer_[level].empty()) { + InternalKey key; + key.DecodeFrom(compact_pointer_[level]); + edit.SetCompactPointer(level, key); + } + } + + // Save files + for (int level = 0; level < config::kNumLevels; level++) { + const std::vector& files = current_->files_[level]; + for (size_t i = 0; i < files.size(); i++) { + const FileMetaData* f = files[i]; + edit.AddFile(level, f->number, f->file_size, f->smallest, f->largest); + } + } + + std::string record; + edit.EncodeTo(&record); + return log->AddRecord(record); +} + +int VersionSet::NumLevelFiles(int level) const { + assert(level >= 0); + assert(level < config::kNumLevels); + return current_->files_[level].size(); +} + +const char* VersionSet::LevelSummary(LevelSummaryStorage* scratch) const { + // Update code if kNumLevels changes + assert(config::kNumLevels == 7); + snprintf(scratch->buffer, sizeof(scratch->buffer), + "files[ %d %d %d %d %d %d %d ]", + int(current_->files_[0].size()), + int(current_->files_[1].size()), + int(current_->files_[2].size()), + int(current_->files_[3].size()), + int(current_->files_[4].size()), + int(current_->files_[5].size()), + int(current_->files_[6].size())); + return scratch->buffer; +} + +uint64_t VersionSet::ApproximateOffsetOf(Version* v, const InternalKey& ikey) { + uint64_t result = 0; + for (int level = 0; level < config::kNumLevels; level++) { + const std::vector& files = v->files_[level]; + for (size_t i = 0; i < files.size(); i++) { + if (icmp_.Compare(files[i]->largest, ikey) <= 0) { + // Entire file is before "ikey", so just add the file size + result += files[i]->file_size; + } else if (icmp_.Compare(files[i]->smallest, ikey) > 0) { + // Entire file is after "ikey", so ignore + if (level > 0) { + // Files other than level 0 are sorted by meta->smallest, so + // no further files in this level will contain data for + // "ikey". + break; + } + } else { + // "ikey" falls in the range for this table. Add the + // approximate offset of "ikey" within the table. + Table* tableptr; + Iterator* iter = table_cache_->NewIterator( + ReadOptions(), files[i]->number, files[i]->file_size, &tableptr); + if (tableptr != NULL) { + result += tableptr->ApproximateOffsetOf(ikey.Encode()); + } + delete iter; + } + } + } + return result; +} + +void VersionSet::AddLiveFiles(std::set* live) { + for (Version* v = dummy_versions_.next_; + v != &dummy_versions_; + v = v->next_) { + for (int level = 0; level < config::kNumLevels; level++) { + const std::vector& files = v->files_[level]; + for (size_t i = 0; i < files.size(); i++) { + live->insert(files[i]->number); + } + } + } +} + +int64_t VersionSet::NumLevelBytes(int level) const { + assert(level >= 0); + assert(level < config::kNumLevels); + return TotalFileSize(current_->files_[level]); +} + +int64_t VersionSet::MaxNextLevelOverlappingBytes() { + int64_t result = 0; + std::vector overlaps; + for (int level = 1; level < config::kNumLevels - 1; level++) { + for (size_t i = 0; i < current_->files_[level].size(); i++) { + const FileMetaData* f = current_->files_[level][i]; + current_->GetOverlappingInputs(level+1, &f->smallest, &f->largest, + &overlaps); + const int64_t sum = TotalFileSize(overlaps); + if (sum > result) { + result = sum; + } + } + } + return result; +} + +// Stores the minimal range that covers all entries in inputs in +// *smallest, *largest. +// REQUIRES: inputs is not empty +void VersionSet::GetRange(const std::vector& inputs, + InternalKey* smallest, + InternalKey* largest) { + assert(!inputs.empty()); + smallest->Clear(); + largest->Clear(); + for (size_t i = 0; i < inputs.size(); i++) { + FileMetaData* f = inputs[i]; + if (i == 0) { + *smallest = f->smallest; + *largest = f->largest; + } else { + if (icmp_.Compare(f->smallest, *smallest) < 0) { + *smallest = f->smallest; + } + if (icmp_.Compare(f->largest, *largest) > 0) { + *largest = f->largest; + } + } + } +} + +// Stores the minimal range that covers all entries in inputs1 and inputs2 +// in *smallest, *largest. +// REQUIRES: inputs is not empty +void VersionSet::GetRange2(const std::vector& inputs1, + const std::vector& inputs2, + InternalKey* smallest, + InternalKey* largest) { + std::vector all = inputs1; + all.insert(all.end(), inputs2.begin(), inputs2.end()); + GetRange(all, smallest, largest); +} + +Iterator* VersionSet::MakeInputIterator(Compaction* c) { + ReadOptions options; + options.verify_checksums = options_->paranoid_checks; + options.fill_cache = false; + + // Level-0 files have to be merged together. For other levels, + // we will make a concatenating iterator per level. + // TODO(opt): use concatenating iterator for level-0 if there is no overlap + const int space = (c->level() == 0 ? c->inputs_[0].size() + 1 : 2); + Iterator** list = new Iterator*[space]; + int num = 0; + for (int which = 0; which < 2; which++) { + if (!c->inputs_[which].empty()) { + if (c->level() + which == 0) { + const std::vector& files = c->inputs_[which]; + for (size_t i = 0; i < files.size(); i++) { + list[num++] = table_cache_->NewIterator( + options, files[i]->number, files[i]->file_size); + } + } else { + // Create concatenating iterator for the files from this level + list[num++] = NewTwoLevelIterator( + new Version::LevelFileNumIterator(icmp_, &c->inputs_[which]), + &GetFileIterator, table_cache_, options); + } + } + } + assert(num <= space); + Iterator* result = NewMergingIterator(&icmp_, list, num); + delete[] list; + return result; +} + +Compaction* VersionSet::PickCompaction() { + Compaction* c; + int level; + + // We prefer compactions triggered by too much data in a level over + // the compactions triggered by seeks. + const bool size_compaction = (current_->compaction_score_ >= 1); + const bool seek_compaction = (current_->file_to_compact_ != NULL); + if (size_compaction) { + level = current_->compaction_level_; + assert(level >= 0); + assert(level+1 < config::kNumLevels); + c = new Compaction(level); + + // Pick the first file that comes after compact_pointer_[level] + for (size_t i = 0; i < current_->files_[level].size(); i++) { + FileMetaData* f = current_->files_[level][i]; + if (compact_pointer_[level].empty() || + icmp_.Compare(f->largest.Encode(), compact_pointer_[level]) > 0) { + c->inputs_[0].push_back(f); + break; + } + } + if (c->inputs_[0].empty()) { + // Wrap-around to the beginning of the key space + c->inputs_[0].push_back(current_->files_[level][0]); + } + } else if (seek_compaction) { + level = current_->file_to_compact_level_; + c = new Compaction(level); + c->inputs_[0].push_back(current_->file_to_compact_); + } else { + return NULL; + } + + c->input_version_ = current_; + c->input_version_->Ref(); + + // Files in level 0 may overlap each other, so pick up all overlapping ones + if (level == 0) { + InternalKey smallest, largest; + GetRange(c->inputs_[0], &smallest, &largest); + // Note that the next call will discard the file we placed in + // c->inputs_[0] earlier and replace it with an overlapping set + // which will include the picked file. + current_->GetOverlappingInputs(0, &smallest, &largest, &c->inputs_[0]); + assert(!c->inputs_[0].empty()); + } + + SetupOtherInputs(c); + + return c; +} + +void VersionSet::SetupOtherInputs(Compaction* c) { + const int level = c->level(); + InternalKey smallest, largest; + GetRange(c->inputs_[0], &smallest, &largest); + + current_->GetOverlappingInputs(level+1, &smallest, &largest, &c->inputs_[1]); + + // Get entire range covered by compaction + InternalKey all_start, all_limit; + GetRange2(c->inputs_[0], c->inputs_[1], &all_start, &all_limit); + + // See if we can grow the number of inputs in "level" without + // changing the number of "level+1" files we pick up. + if (!c->inputs_[1].empty()) { + std::vector expanded0; + current_->GetOverlappingInputs(level, &all_start, &all_limit, &expanded0); + const int64_t inputs0_size = TotalFileSize(c->inputs_[0]); + const int64_t inputs1_size = TotalFileSize(c->inputs_[1]); + const int64_t expanded0_size = TotalFileSize(expanded0); + if (expanded0.size() > c->inputs_[0].size() && + inputs1_size + expanded0_size < kExpandedCompactionByteSizeLimit) { + InternalKey new_start, new_limit; + GetRange(expanded0, &new_start, &new_limit); + std::vector expanded1; + current_->GetOverlappingInputs(level+1, &new_start, &new_limit, + &expanded1); + if (expanded1.size() == c->inputs_[1].size()) { + Log(options_->info_log, + "Expanding@%d %d+%d (%ld+%ld bytes) to %d+%d (%ld+%ld bytes)\n", + level, + int(c->inputs_[0].size()), + int(c->inputs_[1].size()), + long(inputs0_size), long(inputs1_size), + int(expanded0.size()), + int(expanded1.size()), + long(expanded0_size), long(inputs1_size)); + smallest = new_start; + largest = new_limit; + c->inputs_[0] = expanded0; + c->inputs_[1] = expanded1; + GetRange2(c->inputs_[0], c->inputs_[1], &all_start, &all_limit); + } + } + } + + // Compute the set of grandparent files that overlap this compaction + // (parent == level+1; grandparent == level+2) + if (level + 2 < config::kNumLevels) { + current_->GetOverlappingInputs(level + 2, &all_start, &all_limit, + &c->grandparents_); + } + + if (false) { + Log(options_->info_log, "Compacting %d '%s' .. '%s'", + level, + smallest.DebugString().c_str(), + largest.DebugString().c_str()); + } + + // Update the place where we will do the next compaction for this level. + // We update this immediately instead of waiting for the VersionEdit + // to be applied so that if the compaction fails, we will try a different + // key range next time. + compact_pointer_[level] = largest.Encode().ToString(); + c->edit_.SetCompactPointer(level, largest); +} + +Compaction* VersionSet::CompactRange( + int level, + const InternalKey* begin, + const InternalKey* end) { + std::vector inputs; + current_->GetOverlappingInputs(level, begin, end, &inputs); + if (inputs.empty()) { + return NULL; + } + + // Avoid compacting too much in one shot in case the range is large. + // But we cannot do this for level-0 since level-0 files can overlap + // and we must not pick one file and drop another older file if the + // two files overlap. + if (level > 0) { + const uint64_t limit = MaxFileSizeForLevel(level); + uint64_t total = 0; + for (size_t i = 0; i < inputs.size(); i++) { + uint64_t s = inputs[i]->file_size; + total += s; + if (total >= limit) { + inputs.resize(i + 1); + break; + } + } + } + + Compaction* c = new Compaction(level); + c->input_version_ = current_; + c->input_version_->Ref(); + c->inputs_[0] = inputs; + SetupOtherInputs(c); + return c; +} + +Compaction::Compaction(int level) + : level_(level), + max_output_file_size_(MaxFileSizeForLevel(level)), + input_version_(NULL), + grandparent_index_(0), + seen_key_(false), + overlapped_bytes_(0) { + for (int i = 0; i < config::kNumLevels; i++) { + level_ptrs_[i] = 0; + } +} + +Compaction::~Compaction() { + if (input_version_ != NULL) { + input_version_->Unref(); + } +} + +bool Compaction::IsTrivialMove() const { + // Avoid a move if there is lots of overlapping grandparent data. + // Otherwise, the move could create a parent file that will require + // a very expensive merge later on. + return (num_input_files(0) == 1 && + num_input_files(1) == 0 && + TotalFileSize(grandparents_) <= kMaxGrandParentOverlapBytes); +} + +void Compaction::AddInputDeletions(VersionEdit* edit) { + for (int which = 0; which < 2; which++) { + for (size_t i = 0; i < inputs_[which].size(); i++) { + edit->DeleteFile(level_ + which, inputs_[which][i]->number); + } + } +} + +bool Compaction::IsBaseLevelForKey(const Slice& user_key) { + // Maybe use binary search to find right entry instead of linear search? + const Comparator* user_cmp = input_version_->vset_->icmp_.user_comparator(); + for (int lvl = level_ + 2; lvl < config::kNumLevels; lvl++) { + const std::vector& files = input_version_->files_[lvl]; + for (; level_ptrs_[lvl] < files.size(); ) { + FileMetaData* f = files[level_ptrs_[lvl]]; + if (user_cmp->Compare(user_key, f->largest.user_key()) <= 0) { + // We've advanced far enough + if (user_cmp->Compare(user_key, f->smallest.user_key()) >= 0) { + // Key falls in this file's range, so definitely not base level + return false; + } + break; + } + level_ptrs_[lvl]++; + } + } + return true; +} + +bool Compaction::ShouldStopBefore(const Slice& internal_key) { + // Scan to find earliest grandparent file that contains key. + const InternalKeyComparator* icmp = &input_version_->vset_->icmp_; + while (grandparent_index_ < grandparents_.size() && + icmp->Compare(internal_key, + grandparents_[grandparent_index_]->largest.Encode()) > 0) { + if (seen_key_) { + overlapped_bytes_ += grandparents_[grandparent_index_]->file_size; + } + grandparent_index_++; + } + seen_key_ = true; + + if (overlapped_bytes_ > kMaxGrandParentOverlapBytes) { + // Too much overlap for current output; start new output + overlapped_bytes_ = 0; + return true; + } else { + return false; + } +} + +void Compaction::ReleaseInputs() { + if (input_version_ != NULL) { + input_version_->Unref(); + input_version_ = NULL; + } +} + +} // namespace leveldb diff --git a/src/leveldb/db/version_set.h b/src/leveldb/db/version_set.h new file mode 100644 index 0000000..8dc14b8 --- /dev/null +++ b/src/leveldb/db/version_set.h @@ -0,0 +1,396 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// The representation of a DBImpl consists of a set of Versions. The +// newest version is called "current". Older versions may be kept +// around to provide a consistent view to live iterators. +// +// Each Version keeps track of a set of Table files per level. The +// entire set of versions is maintained in a VersionSet. +// +// Version,VersionSet are thread-compatible, but require external +// synchronization on all accesses. + +#ifndef STORAGE_LEVELDB_DB_VERSION_SET_H_ +#define STORAGE_LEVELDB_DB_VERSION_SET_H_ + +#include +#include +#include +#include "db/dbformat.h" +#include "db/version_edit.h" +#include "port/port.h" +#include "port/thread_annotations.h" + +namespace leveldb { + +namespace log { class Writer; } + +class Compaction; +class Iterator; +class MemTable; +class TableBuilder; +class TableCache; +class Version; +class VersionSet; +class WritableFile; + +// Return the smallest index i such that files[i]->largest >= key. +// Return files.size() if there is no such file. +// REQUIRES: "files" contains a sorted list of non-overlapping files. +extern int FindFile(const InternalKeyComparator& icmp, + const std::vector& files, + const Slice& key); + +// Returns true iff some file in "files" overlaps the user key range +// [*smallest,*largest]. +// smallest==NULL represents a key smaller than all keys in the DB. +// largest==NULL represents a key largest than all keys in the DB. +// REQUIRES: If disjoint_sorted_files, files[] contains disjoint ranges +// in sorted order. +extern bool SomeFileOverlapsRange( + const InternalKeyComparator& icmp, + bool disjoint_sorted_files, + const std::vector& files, + const Slice* smallest_user_key, + const Slice* largest_user_key); + +class Version { + public: + // Append to *iters a sequence of iterators that will + // yield the contents of this Version when merged together. + // REQUIRES: This version has been saved (see VersionSet::SaveTo) + void AddIterators(const ReadOptions&, std::vector* iters); + + // Lookup the value for key. If found, store it in *val and + // return OK. Else return a non-OK status. Fills *stats. + // REQUIRES: lock is not held + struct GetStats { + FileMetaData* seek_file; + int seek_file_level; + }; + Status Get(const ReadOptions&, const LookupKey& key, std::string* val, + GetStats* stats); + + // Adds "stats" into the current state. Returns true if a new + // compaction may need to be triggered, false otherwise. + // REQUIRES: lock is held + bool UpdateStats(const GetStats& stats); + + // Record a sample of bytes read at the specified internal key. + // Samples are taken approximately once every config::kReadBytesPeriod + // bytes. Returns true if a new compaction may need to be triggered. + // REQUIRES: lock is held + bool RecordReadSample(Slice key); + + // Reference count management (so Versions do not disappear out from + // under live iterators) + void Ref(); + void Unref(); + + void GetOverlappingInputs( + int level, + const InternalKey* begin, // NULL means before all keys + const InternalKey* end, // NULL means after all keys + std::vector* inputs); + + // Returns true iff some file in the specified level overlaps + // some part of [*smallest_user_key,*largest_user_key]. + // smallest_user_key==NULL represents a key smaller than all keys in the DB. + // largest_user_key==NULL represents a key largest than all keys in the DB. + bool OverlapInLevel(int level, + const Slice* smallest_user_key, + const Slice* largest_user_key); + + // Return the level at which we should place a new memtable compaction + // result that covers the range [smallest_user_key,largest_user_key]. + int PickLevelForMemTableOutput(const Slice& smallest_user_key, + const Slice& largest_user_key); + + int NumFiles(int level) const { return files_[level].size(); } + + // Return a human readable string that describes this version's contents. + std::string DebugString() const; + + private: + friend class Compaction; + friend class VersionSet; + + class LevelFileNumIterator; + Iterator* NewConcatenatingIterator(const ReadOptions&, int level) const; + + // Call func(arg, level, f) for every file that overlaps user_key in + // order from newest to oldest. If an invocation of func returns + // false, makes no more calls. + // + // REQUIRES: user portion of internal_key == user_key. + void ForEachOverlapping(Slice user_key, Slice internal_key, + void* arg, + bool (*func)(void*, int, FileMetaData*)); + + VersionSet* vset_; // VersionSet to which this Version belongs + Version* next_; // Next version in linked list + Version* prev_; // Previous version in linked list + int refs_; // Number of live refs to this version + + // List of files per level + std::vector files_[config::kNumLevels]; + + // Next file to compact based on seek stats. + FileMetaData* file_to_compact_; + int file_to_compact_level_; + + // Level that should be compacted next and its compaction score. + // Score < 1 means compaction is not strictly needed. These fields + // are initialized by Finalize(). + double compaction_score_; + int compaction_level_; + + explicit Version(VersionSet* vset) + : vset_(vset), next_(this), prev_(this), refs_(0), + file_to_compact_(NULL), + file_to_compact_level_(-1), + compaction_score_(-1), + compaction_level_(-1) { + } + + ~Version(); + + // No copying allowed + Version(const Version&); + void operator=(const Version&); +}; + +class VersionSet { + public: + VersionSet(const std::string& dbname, + const Options* options, + TableCache* table_cache, + const InternalKeyComparator*); + ~VersionSet(); + + // Apply *edit to the current version to form a new descriptor that + // is both saved to persistent state and installed as the new + // current version. Will release *mu while actually writing to the file. + // REQUIRES: *mu is held on entry. + // REQUIRES: no other thread concurrently calls LogAndApply() + Status LogAndApply(VersionEdit* edit, port::Mutex* mu) + EXCLUSIVE_LOCKS_REQUIRED(mu); + + // Recover the last saved descriptor from persistent storage. + Status Recover(); + + // Return the current version. + Version* current() const { return current_; } + + // Return the current manifest file number + uint64_t ManifestFileNumber() const { return manifest_file_number_; } + + // Allocate and return a new file number + uint64_t NewFileNumber() { return next_file_number_++; } + + // Arrange to reuse "file_number" unless a newer file number has + // already been allocated. + // REQUIRES: "file_number" was returned by a call to NewFileNumber(). + void ReuseFileNumber(uint64_t file_number) { + if (next_file_number_ == file_number + 1) { + next_file_number_ = file_number; + } + } + + // Return the number of Table files at the specified level. + int NumLevelFiles(int level) const; + + // Return the combined file size of all files at the specified level. + int64_t NumLevelBytes(int level) const; + + // Return the last sequence number. + uint64_t LastSequence() const { return last_sequence_; } + + // Set the last sequence number to s. + void SetLastSequence(uint64_t s) { + assert(s >= last_sequence_); + last_sequence_ = s; + } + + // Mark the specified file number as used. + void MarkFileNumberUsed(uint64_t number); + + // Return the current log file number. + uint64_t LogNumber() const { return log_number_; } + + // Return the log file number for the log file that is currently + // being compacted, or zero if there is no such log file. + uint64_t PrevLogNumber() const { return prev_log_number_; } + + // Pick level and inputs for a new compaction. + // Returns NULL if there is no compaction to be done. + // Otherwise returns a pointer to a heap-allocated object that + // describes the compaction. Caller should delete the result. + Compaction* PickCompaction(); + + // Return a compaction object for compacting the range [begin,end] in + // the specified level. Returns NULL if there is nothing in that + // level that overlaps the specified range. Caller should delete + // the result. + Compaction* CompactRange( + int level, + const InternalKey* begin, + const InternalKey* end); + + // Return the maximum overlapping data (in bytes) at next level for any + // file at a level >= 1. + int64_t MaxNextLevelOverlappingBytes(); + + // Create an iterator that reads over the compaction inputs for "*c". + // The caller should delete the iterator when no longer needed. + Iterator* MakeInputIterator(Compaction* c); + + // Returns true iff some level needs a compaction. + bool NeedsCompaction() const { + Version* v = current_; + return (v->compaction_score_ >= 1) || (v->file_to_compact_ != NULL); + } + + // Add all files listed in any live version to *live. + // May also mutate some internal state. + void AddLiveFiles(std::set* live); + + // Return the approximate offset in the database of the data for + // "key" as of version "v". + uint64_t ApproximateOffsetOf(Version* v, const InternalKey& key); + + // Return a human-readable short (single-line) summary of the number + // of files per level. Uses *scratch as backing store. + struct LevelSummaryStorage { + char buffer[100]; + }; + const char* LevelSummary(LevelSummaryStorage* scratch) const; + + private: + class Builder; + + friend class Compaction; + friend class Version; + + void Finalize(Version* v); + + void GetRange(const std::vector& inputs, + InternalKey* smallest, + InternalKey* largest); + + void GetRange2(const std::vector& inputs1, + const std::vector& inputs2, + InternalKey* smallest, + InternalKey* largest); + + void SetupOtherInputs(Compaction* c); + + // Save current contents to *log + Status WriteSnapshot(log::Writer* log); + + void AppendVersion(Version* v); + + Env* const env_; + const std::string dbname_; + const Options* const options_; + TableCache* const table_cache_; + const InternalKeyComparator icmp_; + uint64_t next_file_number_; + uint64_t manifest_file_number_; + uint64_t last_sequence_; + uint64_t log_number_; + uint64_t prev_log_number_; // 0 or backing store for memtable being compacted + + // Opened lazily + WritableFile* descriptor_file_; + log::Writer* descriptor_log_; + Version dummy_versions_; // Head of circular doubly-linked list of versions. + Version* current_; // == dummy_versions_.prev_ + + // Per-level key at which the next compaction at that level should start. + // Either an empty string, or a valid InternalKey. + std::string compact_pointer_[config::kNumLevels]; + + // No copying allowed + VersionSet(const VersionSet&); + void operator=(const VersionSet&); +}; + +// A Compaction encapsulates information about a compaction. +class Compaction { + public: + ~Compaction(); + + // Return the level that is being compacted. Inputs from "level" + // and "level+1" will be merged to produce a set of "level+1" files. + int level() const { return level_; } + + // Return the object that holds the edits to the descriptor done + // by this compaction. + VersionEdit* edit() { return &edit_; } + + // "which" must be either 0 or 1 + int num_input_files(int which) const { return inputs_[which].size(); } + + // Return the ith input file at "level()+which" ("which" must be 0 or 1). + FileMetaData* input(int which, int i) const { return inputs_[which][i]; } + + // Maximum size of files to build during this compaction. + uint64_t MaxOutputFileSize() const { return max_output_file_size_; } + + // Is this a trivial compaction that can be implemented by just + // moving a single input file to the next level (no merging or splitting) + bool IsTrivialMove() const; + + // Add all inputs to this compaction as delete operations to *edit. + void AddInputDeletions(VersionEdit* edit); + + // Returns true if the information we have available guarantees that + // the compaction is producing data in "level+1" for which no data exists + // in levels greater than "level+1". + bool IsBaseLevelForKey(const Slice& user_key); + + // Returns true iff we should stop building the current output + // before processing "internal_key". + bool ShouldStopBefore(const Slice& internal_key); + + // Release the input version for the compaction, once the compaction + // is successful. + void ReleaseInputs(); + + private: + friend class Version; + friend class VersionSet; + + explicit Compaction(int level); + + int level_; + uint64_t max_output_file_size_; + Version* input_version_; + VersionEdit edit_; + + // Each compaction reads inputs from "level_" and "level_+1" + std::vector inputs_[2]; // The two sets of inputs + + // State used to check for number of of overlapping grandparent files + // (parent == level_ + 1, grandparent == level_ + 2) + std::vector grandparents_; + size_t grandparent_index_; // Index in grandparent_starts_ + bool seen_key_; // Some output key has been seen + int64_t overlapped_bytes_; // Bytes of overlap between current output + // and grandparent files + + // State for implementing IsBaseLevelForKey + + // level_ptrs_ holds indices into input_version_->levels_: our state + // is that we are positioned at one of the file ranges for each + // higher level than the ones involved in this compaction (i.e. for + // all L >= level_ + 2). + size_t level_ptrs_[config::kNumLevels]; +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_DB_VERSION_SET_H_ diff --git a/src/leveldb/db/version_set_test.cc b/src/leveldb/db/version_set_test.cc new file mode 100644 index 0000000..501e34d --- /dev/null +++ b/src/leveldb/db/version_set_test.cc @@ -0,0 +1,179 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "db/version_set.h" +#include "util/logging.h" +#include "util/testharness.h" +#include "util/testutil.h" + +namespace leveldb { + +class FindFileTest { + public: + std::vector files_; + bool disjoint_sorted_files_; + + FindFileTest() : disjoint_sorted_files_(true) { } + + ~FindFileTest() { + for (int i = 0; i < files_.size(); i++) { + delete files_[i]; + } + } + + void Add(const char* smallest, const char* largest, + SequenceNumber smallest_seq = 100, + SequenceNumber largest_seq = 100) { + FileMetaData* f = new FileMetaData; + f->number = files_.size() + 1; + f->smallest = InternalKey(smallest, smallest_seq, kTypeValue); + f->largest = InternalKey(largest, largest_seq, kTypeValue); + files_.push_back(f); + } + + int Find(const char* key) { + InternalKey target(key, 100, kTypeValue); + InternalKeyComparator cmp(BytewiseComparator()); + return FindFile(cmp, files_, target.Encode()); + } + + bool Overlaps(const char* smallest, const char* largest) { + InternalKeyComparator cmp(BytewiseComparator()); + Slice s(smallest != NULL ? smallest : ""); + Slice l(largest != NULL ? largest : ""); + return SomeFileOverlapsRange(cmp, disjoint_sorted_files_, files_, + (smallest != NULL ? &s : NULL), + (largest != NULL ? &l : NULL)); + } +}; + +TEST(FindFileTest, Empty) { + ASSERT_EQ(0, Find("foo")); + ASSERT_TRUE(! Overlaps("a", "z")); + ASSERT_TRUE(! Overlaps(NULL, "z")); + ASSERT_TRUE(! Overlaps("a", NULL)); + ASSERT_TRUE(! Overlaps(NULL, NULL)); +} + +TEST(FindFileTest, Single) { + Add("p", "q"); + ASSERT_EQ(0, Find("a")); + ASSERT_EQ(0, Find("p")); + ASSERT_EQ(0, Find("p1")); + ASSERT_EQ(0, Find("q")); + ASSERT_EQ(1, Find("q1")); + ASSERT_EQ(1, Find("z")); + + ASSERT_TRUE(! Overlaps("a", "b")); + ASSERT_TRUE(! Overlaps("z1", "z2")); + ASSERT_TRUE(Overlaps("a", "p")); + ASSERT_TRUE(Overlaps("a", "q")); + ASSERT_TRUE(Overlaps("a", "z")); + ASSERT_TRUE(Overlaps("p", "p1")); + ASSERT_TRUE(Overlaps("p", "q")); + ASSERT_TRUE(Overlaps("p", "z")); + ASSERT_TRUE(Overlaps("p1", "p2")); + ASSERT_TRUE(Overlaps("p1", "z")); + ASSERT_TRUE(Overlaps("q", "q")); + ASSERT_TRUE(Overlaps("q", "q1")); + + ASSERT_TRUE(! Overlaps(NULL, "j")); + ASSERT_TRUE(! Overlaps("r", NULL)); + ASSERT_TRUE(Overlaps(NULL, "p")); + ASSERT_TRUE(Overlaps(NULL, "p1")); + ASSERT_TRUE(Overlaps("q", NULL)); + ASSERT_TRUE(Overlaps(NULL, NULL)); +} + + +TEST(FindFileTest, Multiple) { + Add("150", "200"); + Add("200", "250"); + Add("300", "350"); + Add("400", "450"); + ASSERT_EQ(0, Find("100")); + ASSERT_EQ(0, Find("150")); + ASSERT_EQ(0, Find("151")); + ASSERT_EQ(0, Find("199")); + ASSERT_EQ(0, Find("200")); + ASSERT_EQ(1, Find("201")); + ASSERT_EQ(1, Find("249")); + ASSERT_EQ(1, Find("250")); + ASSERT_EQ(2, Find("251")); + ASSERT_EQ(2, Find("299")); + ASSERT_EQ(2, Find("300")); + ASSERT_EQ(2, Find("349")); + ASSERT_EQ(2, Find("350")); + ASSERT_EQ(3, Find("351")); + ASSERT_EQ(3, Find("400")); + ASSERT_EQ(3, Find("450")); + ASSERT_EQ(4, Find("451")); + + ASSERT_TRUE(! Overlaps("100", "149")); + ASSERT_TRUE(! Overlaps("251", "299")); + ASSERT_TRUE(! Overlaps("451", "500")); + ASSERT_TRUE(! Overlaps("351", "399")); + + ASSERT_TRUE(Overlaps("100", "150")); + ASSERT_TRUE(Overlaps("100", "200")); + ASSERT_TRUE(Overlaps("100", "300")); + ASSERT_TRUE(Overlaps("100", "400")); + ASSERT_TRUE(Overlaps("100", "500")); + ASSERT_TRUE(Overlaps("375", "400")); + ASSERT_TRUE(Overlaps("450", "450")); + ASSERT_TRUE(Overlaps("450", "500")); +} + +TEST(FindFileTest, MultipleNullBoundaries) { + Add("150", "200"); + Add("200", "250"); + Add("300", "350"); + Add("400", "450"); + ASSERT_TRUE(! Overlaps(NULL, "149")); + ASSERT_TRUE(! Overlaps("451", NULL)); + ASSERT_TRUE(Overlaps(NULL, NULL)); + ASSERT_TRUE(Overlaps(NULL, "150")); + ASSERT_TRUE(Overlaps(NULL, "199")); + ASSERT_TRUE(Overlaps(NULL, "200")); + ASSERT_TRUE(Overlaps(NULL, "201")); + ASSERT_TRUE(Overlaps(NULL, "400")); + ASSERT_TRUE(Overlaps(NULL, "800")); + ASSERT_TRUE(Overlaps("100", NULL)); + ASSERT_TRUE(Overlaps("200", NULL)); + ASSERT_TRUE(Overlaps("449", NULL)); + ASSERT_TRUE(Overlaps("450", NULL)); +} + +TEST(FindFileTest, OverlapSequenceChecks) { + Add("200", "200", 5000, 3000); + ASSERT_TRUE(! Overlaps("199", "199")); + ASSERT_TRUE(! Overlaps("201", "300")); + ASSERT_TRUE(Overlaps("200", "200")); + ASSERT_TRUE(Overlaps("190", "200")); + ASSERT_TRUE(Overlaps("200", "210")); +} + +TEST(FindFileTest, OverlappingFiles) { + Add("150", "600"); + Add("400", "500"); + disjoint_sorted_files_ = false; + ASSERT_TRUE(! Overlaps("100", "149")); + ASSERT_TRUE(! Overlaps("601", "700")); + ASSERT_TRUE(Overlaps("100", "150")); + ASSERT_TRUE(Overlaps("100", "200")); + ASSERT_TRUE(Overlaps("100", "300")); + ASSERT_TRUE(Overlaps("100", "400")); + ASSERT_TRUE(Overlaps("100", "500")); + ASSERT_TRUE(Overlaps("375", "400")); + ASSERT_TRUE(Overlaps("450", "450")); + ASSERT_TRUE(Overlaps("450", "500")); + ASSERT_TRUE(Overlaps("450", "700")); + ASSERT_TRUE(Overlaps("600", "700")); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/db/write_batch.cc b/src/leveldb/db/write_batch.cc new file mode 100644 index 0000000..33f4a42 --- /dev/null +++ b/src/leveldb/db/write_batch.cc @@ -0,0 +1,147 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// WriteBatch::rep_ := +// sequence: fixed64 +// count: fixed32 +// data: record[count] +// record := +// kTypeValue varstring varstring | +// kTypeDeletion varstring +// varstring := +// len: varint32 +// data: uint8[len] + +#include "leveldb/write_batch.h" + +#include "leveldb/db.h" +#include "db/dbformat.h" +#include "db/memtable.h" +#include "db/write_batch_internal.h" +#include "util/coding.h" + +namespace leveldb { + +// WriteBatch header has an 8-byte sequence number followed by a 4-byte count. +static const size_t kHeader = 12; + +WriteBatch::WriteBatch() { + Clear(); +} + +WriteBatch::~WriteBatch() { } + +WriteBatch::Handler::~Handler() { } + +void WriteBatch::Clear() { + rep_.clear(); + rep_.resize(kHeader); +} + +Status WriteBatch::Iterate(Handler* handler) const { + Slice input(rep_); + if (input.size() < kHeader) { + return Status::Corruption("malformed WriteBatch (too small)"); + } + + input.remove_prefix(kHeader); + Slice key, value; + int found = 0; + while (!input.empty()) { + found++; + char tag = input[0]; + input.remove_prefix(1); + switch (tag) { + case kTypeValue: + if (GetLengthPrefixedSlice(&input, &key) && + GetLengthPrefixedSlice(&input, &value)) { + handler->Put(key, value); + } else { + return Status::Corruption("bad WriteBatch Put"); + } + break; + case kTypeDeletion: + if (GetLengthPrefixedSlice(&input, &key)) { + handler->Delete(key); + } else { + return Status::Corruption("bad WriteBatch Delete"); + } + break; + default: + return Status::Corruption("unknown WriteBatch tag"); + } + } + if (found != WriteBatchInternal::Count(this)) { + return Status::Corruption("WriteBatch has wrong count"); + } else { + return Status::OK(); + } +} + +int WriteBatchInternal::Count(const WriteBatch* b) { + return DecodeFixed32(b->rep_.data() + 8); +} + +void WriteBatchInternal::SetCount(WriteBatch* b, int n) { + EncodeFixed32(&b->rep_[8], n); +} + +SequenceNumber WriteBatchInternal::Sequence(const WriteBatch* b) { + return SequenceNumber(DecodeFixed64(b->rep_.data())); +} + +void WriteBatchInternal::SetSequence(WriteBatch* b, SequenceNumber seq) { + EncodeFixed64(&b->rep_[0], seq); +} + +void WriteBatch::Put(const Slice& key, const Slice& value) { + WriteBatchInternal::SetCount(this, WriteBatchInternal::Count(this) + 1); + rep_.push_back(static_cast(kTypeValue)); + PutLengthPrefixedSlice(&rep_, key); + PutLengthPrefixedSlice(&rep_, value); +} + +void WriteBatch::Delete(const Slice& key) { + WriteBatchInternal::SetCount(this, WriteBatchInternal::Count(this) + 1); + rep_.push_back(static_cast(kTypeDeletion)); + PutLengthPrefixedSlice(&rep_, key); +} + +namespace { +class MemTableInserter : public WriteBatch::Handler { + public: + SequenceNumber sequence_; + MemTable* mem_; + + virtual void Put(const Slice& key, const Slice& value) { + mem_->Add(sequence_, kTypeValue, key, value); + sequence_++; + } + virtual void Delete(const Slice& key) { + mem_->Add(sequence_, kTypeDeletion, key, Slice()); + sequence_++; + } +}; +} // namespace + +Status WriteBatchInternal::InsertInto(const WriteBatch* b, + MemTable* memtable) { + MemTableInserter inserter; + inserter.sequence_ = WriteBatchInternal::Sequence(b); + inserter.mem_ = memtable; + return b->Iterate(&inserter); +} + +void WriteBatchInternal::SetContents(WriteBatch* b, const Slice& contents) { + assert(contents.size() >= kHeader); + b->rep_.assign(contents.data(), contents.size()); +} + +void WriteBatchInternal::Append(WriteBatch* dst, const WriteBatch* src) { + SetCount(dst, Count(dst) + Count(src)); + assert(src->rep_.size() >= kHeader); + dst->rep_.append(src->rep_.data() + kHeader, src->rep_.size() - kHeader); +} + +} // namespace leveldb diff --git a/src/leveldb/db/write_batch_internal.h b/src/leveldb/db/write_batch_internal.h new file mode 100644 index 0000000..4423a7f --- /dev/null +++ b/src/leveldb/db/write_batch_internal.h @@ -0,0 +1,49 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_DB_WRITE_BATCH_INTERNAL_H_ +#define STORAGE_LEVELDB_DB_WRITE_BATCH_INTERNAL_H_ + +#include "leveldb/write_batch.h" + +namespace leveldb { + +class MemTable; + +// WriteBatchInternal provides static methods for manipulating a +// WriteBatch that we don't want in the public WriteBatch interface. +class WriteBatchInternal { + public: + // Return the number of entries in the batch. + static int Count(const WriteBatch* batch); + + // Set the count for the number of entries in the batch. + static void SetCount(WriteBatch* batch, int n); + + // Return the seqeunce number for the start of this batch. + static SequenceNumber Sequence(const WriteBatch* batch); + + // Store the specified number as the seqeunce number for the start of + // this batch. + static void SetSequence(WriteBatch* batch, SequenceNumber seq); + + static Slice Contents(const WriteBatch* batch) { + return Slice(batch->rep_); + } + + static size_t ByteSize(const WriteBatch* batch) { + return batch->rep_.size(); + } + + static void SetContents(WriteBatch* batch, const Slice& contents); + + static Status InsertInto(const WriteBatch* batch, MemTable* memtable); + + static void Append(WriteBatch* dst, const WriteBatch* src); +}; + +} // namespace leveldb + + +#endif // STORAGE_LEVELDB_DB_WRITE_BATCH_INTERNAL_H_ diff --git a/src/leveldb/db/write_batch_test.cc b/src/leveldb/db/write_batch_test.cc new file mode 100644 index 0000000..9064e3d --- /dev/null +++ b/src/leveldb/db/write_batch_test.cc @@ -0,0 +1,120 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/db.h" + +#include "db/memtable.h" +#include "db/write_batch_internal.h" +#include "leveldb/env.h" +#include "util/logging.h" +#include "util/testharness.h" + +namespace leveldb { + +static std::string PrintContents(WriteBatch* b) { + InternalKeyComparator cmp(BytewiseComparator()); + MemTable* mem = new MemTable(cmp); + mem->Ref(); + std::string state; + Status s = WriteBatchInternal::InsertInto(b, mem); + int count = 0; + Iterator* iter = mem->NewIterator(); + for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { + ParsedInternalKey ikey; + ASSERT_TRUE(ParseInternalKey(iter->key(), &ikey)); + switch (ikey.type) { + case kTypeValue: + state.append("Put("); + state.append(ikey.user_key.ToString()); + state.append(", "); + state.append(iter->value().ToString()); + state.append(")"); + count++; + break; + case kTypeDeletion: + state.append("Delete("); + state.append(ikey.user_key.ToString()); + state.append(")"); + count++; + break; + } + state.append("@"); + state.append(NumberToString(ikey.sequence)); + } + delete iter; + if (!s.ok()) { + state.append("ParseError()"); + } else if (count != WriteBatchInternal::Count(b)) { + state.append("CountMismatch()"); + } + mem->Unref(); + return state; +} + +class WriteBatchTest { }; + +TEST(WriteBatchTest, Empty) { + WriteBatch batch; + ASSERT_EQ("", PrintContents(&batch)); + ASSERT_EQ(0, WriteBatchInternal::Count(&batch)); +} + +TEST(WriteBatchTest, Multiple) { + WriteBatch batch; + batch.Put(Slice("foo"), Slice("bar")); + batch.Delete(Slice("box")); + batch.Put(Slice("baz"), Slice("boo")); + WriteBatchInternal::SetSequence(&batch, 100); + ASSERT_EQ(100, WriteBatchInternal::Sequence(&batch)); + ASSERT_EQ(3, WriteBatchInternal::Count(&batch)); + ASSERT_EQ("Put(baz, boo)@102" + "Delete(box)@101" + "Put(foo, bar)@100", + PrintContents(&batch)); +} + +TEST(WriteBatchTest, Corruption) { + WriteBatch batch; + batch.Put(Slice("foo"), Slice("bar")); + batch.Delete(Slice("box")); + WriteBatchInternal::SetSequence(&batch, 200); + Slice contents = WriteBatchInternal::Contents(&batch); + WriteBatchInternal::SetContents(&batch, + Slice(contents.data(),contents.size()-1)); + ASSERT_EQ("Put(foo, bar)@200" + "ParseError()", + PrintContents(&batch)); +} + +TEST(WriteBatchTest, Append) { + WriteBatch b1, b2; + WriteBatchInternal::SetSequence(&b1, 200); + WriteBatchInternal::SetSequence(&b2, 300); + WriteBatchInternal::Append(&b1, &b2); + ASSERT_EQ("", + PrintContents(&b1)); + b2.Put("a", "va"); + WriteBatchInternal::Append(&b1, &b2); + ASSERT_EQ("Put(a, va)@200", + PrintContents(&b1)); + b2.Clear(); + b2.Put("b", "vb"); + WriteBatchInternal::Append(&b1, &b2); + ASSERT_EQ("Put(a, va)@200" + "Put(b, vb)@201", + PrintContents(&b1)); + b2.Delete("foo"); + WriteBatchInternal::Append(&b1, &b2); + ASSERT_EQ("Put(a, va)@200" + "Put(b, vb)@202" + "Put(b, vb)@201" + "Delete(foo)@203", + PrintContents(&b1)); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/doc/bench/db_bench_sqlite3.cc b/src/leveldb/doc/bench/db_bench_sqlite3.cc new file mode 100644 index 0000000..e63aaa8 --- /dev/null +++ b/src/leveldb/doc/bench/db_bench_sqlite3.cc @@ -0,0 +1,718 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include +#include +#include "util/histogram.h" +#include "util/random.h" +#include "util/testutil.h" + +// Comma-separated list of operations to run in the specified order +// Actual benchmarks: +// +// fillseq -- write N values in sequential key order in async mode +// fillseqsync -- write N/100 values in sequential key order in sync mode +// fillseqbatch -- batch write N values in sequential key order in async mode +// fillrandom -- write N values in random key order in async mode +// fillrandsync -- write N/100 values in random key order in sync mode +// fillrandbatch -- batch write N values in sequential key order in async mode +// overwrite -- overwrite N values in random key order in async mode +// fillrand100K -- write N/1000 100K values in random order in async mode +// fillseq100K -- write N/1000 100K values in sequential order in async mode +// readseq -- read N times sequentially +// readrandom -- read N times in random order +// readrand100K -- read N/1000 100K values in sequential order in async mode +static const char* FLAGS_benchmarks = + "fillseq," + "fillseqsync," + "fillseqbatch," + "fillrandom," + "fillrandsync," + "fillrandbatch," + "overwrite," + "overwritebatch," + "readrandom," + "readseq," + "fillrand100K," + "fillseq100K," + "readseq," + "readrand100K," + ; + +// Number of key/values to place in database +static int FLAGS_num = 1000000; + +// Number of read operations to do. If negative, do FLAGS_num reads. +static int FLAGS_reads = -1; + +// Size of each value +static int FLAGS_value_size = 100; + +// Print histogram of operation timings +static bool FLAGS_histogram = false; + +// Arrange to generate values that shrink to this fraction of +// their original size after compression +static double FLAGS_compression_ratio = 0.5; + +// Page size. Default 1 KB. +static int FLAGS_page_size = 1024; + +// Number of pages. +// Default cache size = FLAGS_page_size * FLAGS_num_pages = 4 MB. +static int FLAGS_num_pages = 4096; + +// If true, do not destroy the existing database. If you set this +// flag and also specify a benchmark that wants a fresh database, that +// benchmark will fail. +static bool FLAGS_use_existing_db = false; + +// If true, we allow batch writes to occur +static bool FLAGS_transaction = true; + +// If true, we enable Write-Ahead Logging +static bool FLAGS_WAL_enabled = true; + +// Use the db with the following name. +static const char* FLAGS_db = NULL; + +inline +static void ExecErrorCheck(int status, char *err_msg) { + if (status != SQLITE_OK) { + fprintf(stderr, "SQL error: %s\n", err_msg); + sqlite3_free(err_msg); + exit(1); + } +} + +inline +static void StepErrorCheck(int status) { + if (status != SQLITE_DONE) { + fprintf(stderr, "SQL step error: status = %d\n", status); + exit(1); + } +} + +inline +static void ErrorCheck(int status) { + if (status != SQLITE_OK) { + fprintf(stderr, "sqlite3 error: status = %d\n", status); + exit(1); + } +} + +inline +static void WalCheckpoint(sqlite3* db_) { + // Flush all writes to disk + if (FLAGS_WAL_enabled) { + sqlite3_wal_checkpoint_v2(db_, NULL, SQLITE_CHECKPOINT_FULL, NULL, NULL); + } +} + +namespace leveldb { + +// Helper for quickly generating random data. +namespace { +class RandomGenerator { + private: + std::string data_; + int pos_; + + public: + RandomGenerator() { + // We use a limited amount of data over and over again and ensure + // that it is larger than the compression window (32KB), and also + // large enough to serve all typical value sizes we want to write. + Random rnd(301); + std::string piece; + while (data_.size() < 1048576) { + // Add a short fragment that is as compressible as specified + // by FLAGS_compression_ratio. + test::CompressibleString(&rnd, FLAGS_compression_ratio, 100, &piece); + data_.append(piece); + } + pos_ = 0; + } + + Slice Generate(int len) { + if (pos_ + len > data_.size()) { + pos_ = 0; + assert(len < data_.size()); + } + pos_ += len; + return Slice(data_.data() + pos_ - len, len); + } +}; + +static Slice TrimSpace(Slice s) { + int start = 0; + while (start < s.size() && isspace(s[start])) { + start++; + } + int limit = s.size(); + while (limit > start && isspace(s[limit-1])) { + limit--; + } + return Slice(s.data() + start, limit - start); +} + +} // namespace + +class Benchmark { + private: + sqlite3* db_; + int db_num_; + int num_; + int reads_; + double start_; + double last_op_finish_; + int64_t bytes_; + std::string message_; + Histogram hist_; + RandomGenerator gen_; + Random rand_; + + // State kept for progress messages + int done_; + int next_report_; // When to report next + + void PrintHeader() { + const int kKeySize = 16; + PrintEnvironment(); + fprintf(stdout, "Keys: %d bytes each\n", kKeySize); + fprintf(stdout, "Values: %d bytes each\n", FLAGS_value_size); + fprintf(stdout, "Entries: %d\n", num_); + fprintf(stdout, "RawSize: %.1f MB (estimated)\n", + ((static_cast(kKeySize + FLAGS_value_size) * num_) + / 1048576.0)); + PrintWarnings(); + fprintf(stdout, "------------------------------------------------\n"); + } + + void PrintWarnings() { +#if defined(__GNUC__) && !defined(__OPTIMIZE__) + fprintf(stdout, + "WARNING: Optimization is disabled: benchmarks unnecessarily slow\n" + ); +#endif +#ifndef NDEBUG + fprintf(stdout, + "WARNING: Assertions are enabled; benchmarks unnecessarily slow\n"); +#endif + } + + void PrintEnvironment() { + fprintf(stderr, "SQLite: version %s\n", SQLITE_VERSION); + +#if defined(__linux) + time_t now = time(NULL); + fprintf(stderr, "Date: %s", ctime(&now)); // ctime() adds newline + + FILE* cpuinfo = fopen("/proc/cpuinfo", "r"); + if (cpuinfo != NULL) { + char line[1000]; + int num_cpus = 0; + std::string cpu_type; + std::string cache_size; + while (fgets(line, sizeof(line), cpuinfo) != NULL) { + const char* sep = strchr(line, ':'); + if (sep == NULL) { + continue; + } + Slice key = TrimSpace(Slice(line, sep - 1 - line)); + Slice val = TrimSpace(Slice(sep + 1)); + if (key == "model name") { + ++num_cpus; + cpu_type = val.ToString(); + } else if (key == "cache size") { + cache_size = val.ToString(); + } + } + fclose(cpuinfo); + fprintf(stderr, "CPU: %d * %s\n", num_cpus, cpu_type.c_str()); + fprintf(stderr, "CPUCache: %s\n", cache_size.c_str()); + } +#endif + } + + void Start() { + start_ = Env::Default()->NowMicros() * 1e-6; + bytes_ = 0; + message_.clear(); + last_op_finish_ = start_; + hist_.Clear(); + done_ = 0; + next_report_ = 100; + } + + void FinishedSingleOp() { + if (FLAGS_histogram) { + double now = Env::Default()->NowMicros() * 1e-6; + double micros = (now - last_op_finish_) * 1e6; + hist_.Add(micros); + if (micros > 20000) { + fprintf(stderr, "long op: %.1f micros%30s\r", micros, ""); + fflush(stderr); + } + last_op_finish_ = now; + } + + done_++; + if (done_ >= next_report_) { + if (next_report_ < 1000) next_report_ += 100; + else if (next_report_ < 5000) next_report_ += 500; + else if (next_report_ < 10000) next_report_ += 1000; + else if (next_report_ < 50000) next_report_ += 5000; + else if (next_report_ < 100000) next_report_ += 10000; + else if (next_report_ < 500000) next_report_ += 50000; + else next_report_ += 100000; + fprintf(stderr, "... finished %d ops%30s\r", done_, ""); + fflush(stderr); + } + } + + void Stop(const Slice& name) { + double finish = Env::Default()->NowMicros() * 1e-6; + + // Pretend at least one op was done in case we are running a benchmark + // that does not call FinishedSingleOp(). + if (done_ < 1) done_ = 1; + + if (bytes_ > 0) { + char rate[100]; + snprintf(rate, sizeof(rate), "%6.1f MB/s", + (bytes_ / 1048576.0) / (finish - start_)); + if (!message_.empty()) { + message_ = std::string(rate) + " " + message_; + } else { + message_ = rate; + } + } + + fprintf(stdout, "%-12s : %11.3f micros/op;%s%s\n", + name.ToString().c_str(), + (finish - start_) * 1e6 / done_, + (message_.empty() ? "" : " "), + message_.c_str()); + if (FLAGS_histogram) { + fprintf(stdout, "Microseconds per op:\n%s\n", hist_.ToString().c_str()); + } + fflush(stdout); + } + + public: + enum Order { + SEQUENTIAL, + RANDOM + }; + enum DBState { + FRESH, + EXISTING + }; + + Benchmark() + : db_(NULL), + db_num_(0), + num_(FLAGS_num), + reads_(FLAGS_reads < 0 ? FLAGS_num : FLAGS_reads), + bytes_(0), + rand_(301) { + std::vector files; + std::string test_dir; + Env::Default()->GetTestDirectory(&test_dir); + Env::Default()->GetChildren(test_dir, &files); + if (!FLAGS_use_existing_db) { + for (int i = 0; i < files.size(); i++) { + if (Slice(files[i]).starts_with("dbbench_sqlite3")) { + std::string file_name(test_dir); + file_name += "/"; + file_name += files[i]; + Env::Default()->DeleteFile(file_name.c_str()); + } + } + } + } + + ~Benchmark() { + int status = sqlite3_close(db_); + ErrorCheck(status); + } + + void Run() { + PrintHeader(); + Open(); + + const char* benchmarks = FLAGS_benchmarks; + while (benchmarks != NULL) { + const char* sep = strchr(benchmarks, ','); + Slice name; + if (sep == NULL) { + name = benchmarks; + benchmarks = NULL; + } else { + name = Slice(benchmarks, sep - benchmarks); + benchmarks = sep + 1; + } + + bytes_ = 0; + Start(); + + bool known = true; + bool write_sync = false; + if (name == Slice("fillseq")) { + Write(write_sync, SEQUENTIAL, FRESH, num_, FLAGS_value_size, 1); + WalCheckpoint(db_); + } else if (name == Slice("fillseqbatch")) { + Write(write_sync, SEQUENTIAL, FRESH, num_, FLAGS_value_size, 1000); + WalCheckpoint(db_); + } else if (name == Slice("fillrandom")) { + Write(write_sync, RANDOM, FRESH, num_, FLAGS_value_size, 1); + WalCheckpoint(db_); + } else if (name == Slice("fillrandbatch")) { + Write(write_sync, RANDOM, FRESH, num_, FLAGS_value_size, 1000); + WalCheckpoint(db_); + } else if (name == Slice("overwrite")) { + Write(write_sync, RANDOM, EXISTING, num_, FLAGS_value_size, 1); + WalCheckpoint(db_); + } else if (name == Slice("overwritebatch")) { + Write(write_sync, RANDOM, EXISTING, num_, FLAGS_value_size, 1000); + WalCheckpoint(db_); + } else if (name == Slice("fillrandsync")) { + write_sync = true; + Write(write_sync, RANDOM, FRESH, num_ / 100, FLAGS_value_size, 1); + WalCheckpoint(db_); + } else if (name == Slice("fillseqsync")) { + write_sync = true; + Write(write_sync, SEQUENTIAL, FRESH, num_ / 100, FLAGS_value_size, 1); + WalCheckpoint(db_); + } else if (name == Slice("fillrand100K")) { + Write(write_sync, RANDOM, FRESH, num_ / 1000, 100 * 1000, 1); + WalCheckpoint(db_); + } else if (name == Slice("fillseq100K")) { + Write(write_sync, SEQUENTIAL, FRESH, num_ / 1000, 100 * 1000, 1); + WalCheckpoint(db_); + } else if (name == Slice("readseq")) { + ReadSequential(); + } else if (name == Slice("readrandom")) { + Read(RANDOM, 1); + } else if (name == Slice("readrand100K")) { + int n = reads_; + reads_ /= 1000; + Read(RANDOM, 1); + reads_ = n; + } else { + known = false; + if (name != Slice()) { // No error message for empty name + fprintf(stderr, "unknown benchmark '%s'\n", name.ToString().c_str()); + } + } + if (known) { + Stop(name); + } + } + } + + void Open() { + assert(db_ == NULL); + + int status; + char file_name[100]; + char* err_msg = NULL; + db_num_++; + + // Open database + std::string tmp_dir; + Env::Default()->GetTestDirectory(&tmp_dir); + snprintf(file_name, sizeof(file_name), + "%s/dbbench_sqlite3-%d.db", + tmp_dir.c_str(), + db_num_); + status = sqlite3_open(file_name, &db_); + if (status) { + fprintf(stderr, "open error: %s\n", sqlite3_errmsg(db_)); + exit(1); + } + + // Change SQLite cache size + char cache_size[100]; + snprintf(cache_size, sizeof(cache_size), "PRAGMA cache_size = %d", + FLAGS_num_pages); + status = sqlite3_exec(db_, cache_size, NULL, NULL, &err_msg); + ExecErrorCheck(status, err_msg); + + // FLAGS_page_size is defaulted to 1024 + if (FLAGS_page_size != 1024) { + char page_size[100]; + snprintf(page_size, sizeof(page_size), "PRAGMA page_size = %d", + FLAGS_page_size); + status = sqlite3_exec(db_, page_size, NULL, NULL, &err_msg); + ExecErrorCheck(status, err_msg); + } + + // Change journal mode to WAL if WAL enabled flag is on + if (FLAGS_WAL_enabled) { + std::string WAL_stmt = "PRAGMA journal_mode = WAL"; + + // LevelDB's default cache size is a combined 4 MB + std::string WAL_checkpoint = "PRAGMA wal_autocheckpoint = 4096"; + status = sqlite3_exec(db_, WAL_stmt.c_str(), NULL, NULL, &err_msg); + ExecErrorCheck(status, err_msg); + status = sqlite3_exec(db_, WAL_checkpoint.c_str(), NULL, NULL, &err_msg); + ExecErrorCheck(status, err_msg); + } + + // Change locking mode to exclusive and create tables/index for database + std::string locking_stmt = "PRAGMA locking_mode = EXCLUSIVE"; + std::string create_stmt = + "CREATE TABLE test (key blob, value blob, PRIMARY KEY(key))"; + std::string stmt_array[] = { locking_stmt, create_stmt }; + int stmt_array_length = sizeof(stmt_array) / sizeof(std::string); + for (int i = 0; i < stmt_array_length; i++) { + status = sqlite3_exec(db_, stmt_array[i].c_str(), NULL, NULL, &err_msg); + ExecErrorCheck(status, err_msg); + } + } + + void Write(bool write_sync, Order order, DBState state, + int num_entries, int value_size, int entries_per_batch) { + // Create new database if state == FRESH + if (state == FRESH) { + if (FLAGS_use_existing_db) { + message_ = "skipping (--use_existing_db is true)"; + return; + } + sqlite3_close(db_); + db_ = NULL; + Open(); + Start(); + } + + if (num_entries != num_) { + char msg[100]; + snprintf(msg, sizeof(msg), "(%d ops)", num_entries); + message_ = msg; + } + + char* err_msg = NULL; + int status; + + sqlite3_stmt *replace_stmt, *begin_trans_stmt, *end_trans_stmt; + std::string replace_str = "REPLACE INTO test (key, value) VALUES (?, ?)"; + std::string begin_trans_str = "BEGIN TRANSACTION;"; + std::string end_trans_str = "END TRANSACTION;"; + + // Check for synchronous flag in options + std::string sync_stmt = (write_sync) ? "PRAGMA synchronous = FULL" : + "PRAGMA synchronous = OFF"; + status = sqlite3_exec(db_, sync_stmt.c_str(), NULL, NULL, &err_msg); + ExecErrorCheck(status, err_msg); + + // Preparing sqlite3 statements + status = sqlite3_prepare_v2(db_, replace_str.c_str(), -1, + &replace_stmt, NULL); + ErrorCheck(status); + status = sqlite3_prepare_v2(db_, begin_trans_str.c_str(), -1, + &begin_trans_stmt, NULL); + ErrorCheck(status); + status = sqlite3_prepare_v2(db_, end_trans_str.c_str(), -1, + &end_trans_stmt, NULL); + ErrorCheck(status); + + bool transaction = (entries_per_batch > 1); + for (int i = 0; i < num_entries; i += entries_per_batch) { + // Begin write transaction + if (FLAGS_transaction && transaction) { + status = sqlite3_step(begin_trans_stmt); + StepErrorCheck(status); + status = sqlite3_reset(begin_trans_stmt); + ErrorCheck(status); + } + + // Create and execute SQL statements + for (int j = 0; j < entries_per_batch; j++) { + const char* value = gen_.Generate(value_size).data(); + + // Create values for key-value pair + const int k = (order == SEQUENTIAL) ? i + j : + (rand_.Next() % num_entries); + char key[100]; + snprintf(key, sizeof(key), "%016d", k); + + // Bind KV values into replace_stmt + status = sqlite3_bind_blob(replace_stmt, 1, key, 16, SQLITE_STATIC); + ErrorCheck(status); + status = sqlite3_bind_blob(replace_stmt, 2, value, + value_size, SQLITE_STATIC); + ErrorCheck(status); + + // Execute replace_stmt + bytes_ += value_size + strlen(key); + status = sqlite3_step(replace_stmt); + StepErrorCheck(status); + + // Reset SQLite statement for another use + status = sqlite3_clear_bindings(replace_stmt); + ErrorCheck(status); + status = sqlite3_reset(replace_stmt); + ErrorCheck(status); + + FinishedSingleOp(); + } + + // End write transaction + if (FLAGS_transaction && transaction) { + status = sqlite3_step(end_trans_stmt); + StepErrorCheck(status); + status = sqlite3_reset(end_trans_stmt); + ErrorCheck(status); + } + } + + status = sqlite3_finalize(replace_stmt); + ErrorCheck(status); + status = sqlite3_finalize(begin_trans_stmt); + ErrorCheck(status); + status = sqlite3_finalize(end_trans_stmt); + ErrorCheck(status); + } + + void Read(Order order, int entries_per_batch) { + int status; + sqlite3_stmt *read_stmt, *begin_trans_stmt, *end_trans_stmt; + + std::string read_str = "SELECT * FROM test WHERE key = ?"; + std::string begin_trans_str = "BEGIN TRANSACTION;"; + std::string end_trans_str = "END TRANSACTION;"; + + // Preparing sqlite3 statements + status = sqlite3_prepare_v2(db_, begin_trans_str.c_str(), -1, + &begin_trans_stmt, NULL); + ErrorCheck(status); + status = sqlite3_prepare_v2(db_, end_trans_str.c_str(), -1, + &end_trans_stmt, NULL); + ErrorCheck(status); + status = sqlite3_prepare_v2(db_, read_str.c_str(), -1, &read_stmt, NULL); + ErrorCheck(status); + + bool transaction = (entries_per_batch > 1); + for (int i = 0; i < reads_; i += entries_per_batch) { + // Begin read transaction + if (FLAGS_transaction && transaction) { + status = sqlite3_step(begin_trans_stmt); + StepErrorCheck(status); + status = sqlite3_reset(begin_trans_stmt); + ErrorCheck(status); + } + + // Create and execute SQL statements + for (int j = 0; j < entries_per_batch; j++) { + // Create key value + char key[100]; + int k = (order == SEQUENTIAL) ? i + j : (rand_.Next() % reads_); + snprintf(key, sizeof(key), "%016d", k); + + // Bind key value into read_stmt + status = sqlite3_bind_blob(read_stmt, 1, key, 16, SQLITE_STATIC); + ErrorCheck(status); + + // Execute read statement + while ((status = sqlite3_step(read_stmt)) == SQLITE_ROW) {} + StepErrorCheck(status); + + // Reset SQLite statement for another use + status = sqlite3_clear_bindings(read_stmt); + ErrorCheck(status); + status = sqlite3_reset(read_stmt); + ErrorCheck(status); + FinishedSingleOp(); + } + + // End read transaction + if (FLAGS_transaction && transaction) { + status = sqlite3_step(end_trans_stmt); + StepErrorCheck(status); + status = sqlite3_reset(end_trans_stmt); + ErrorCheck(status); + } + } + + status = sqlite3_finalize(read_stmt); + ErrorCheck(status); + status = sqlite3_finalize(begin_trans_stmt); + ErrorCheck(status); + status = sqlite3_finalize(end_trans_stmt); + ErrorCheck(status); + } + + void ReadSequential() { + int status; + sqlite3_stmt *pStmt; + std::string read_str = "SELECT * FROM test ORDER BY key"; + + status = sqlite3_prepare_v2(db_, read_str.c_str(), -1, &pStmt, NULL); + ErrorCheck(status); + for (int i = 0; i < reads_ && SQLITE_ROW == sqlite3_step(pStmt); i++) { + bytes_ += sqlite3_column_bytes(pStmt, 1) + sqlite3_column_bytes(pStmt, 2); + FinishedSingleOp(); + } + + status = sqlite3_finalize(pStmt); + ErrorCheck(status); + } + +}; + +} // namespace leveldb + +int main(int argc, char** argv) { + std::string default_db_path; + for (int i = 1; i < argc; i++) { + double d; + int n; + char junk; + if (leveldb::Slice(argv[i]).starts_with("--benchmarks=")) { + FLAGS_benchmarks = argv[i] + strlen("--benchmarks="); + } else if (sscanf(argv[i], "--histogram=%d%c", &n, &junk) == 1 && + (n == 0 || n == 1)) { + FLAGS_histogram = n; + } else if (sscanf(argv[i], "--compression_ratio=%lf%c", &d, &junk) == 1) { + FLAGS_compression_ratio = d; + } else if (sscanf(argv[i], "--use_existing_db=%d%c", &n, &junk) == 1 && + (n == 0 || n == 1)) { + FLAGS_use_existing_db = n; + } else if (sscanf(argv[i], "--num=%d%c", &n, &junk) == 1) { + FLAGS_num = n; + } else if (sscanf(argv[i], "--reads=%d%c", &n, &junk) == 1) { + FLAGS_reads = n; + } else if (sscanf(argv[i], "--value_size=%d%c", &n, &junk) == 1) { + FLAGS_value_size = n; + } else if (leveldb::Slice(argv[i]) == leveldb::Slice("--no_transaction")) { + FLAGS_transaction = false; + } else if (sscanf(argv[i], "--page_size=%d%c", &n, &junk) == 1) { + FLAGS_page_size = n; + } else if (sscanf(argv[i], "--num_pages=%d%c", &n, &junk) == 1) { + FLAGS_num_pages = n; + } else if (sscanf(argv[i], "--WAL_enabled=%d%c", &n, &junk) == 1 && + (n == 0 || n == 1)) { + FLAGS_WAL_enabled = n; + } else if (strncmp(argv[i], "--db=", 5) == 0) { + FLAGS_db = argv[i] + 5; + } else { + fprintf(stderr, "Invalid flag '%s'\n", argv[i]); + exit(1); + } + } + + // Choose a location for the test database if none given with --db= + if (FLAGS_db == NULL) { + leveldb::Env::Default()->GetTestDirectory(&default_db_path); + default_db_path += "/dbbench"; + FLAGS_db = default_db_path.c_str(); + } + + leveldb::Benchmark benchmark; + benchmark.Run(); + return 0; +} diff --git a/src/leveldb/doc/bench/db_bench_tree_db.cc b/src/leveldb/doc/bench/db_bench_tree_db.cc new file mode 100644 index 0000000..ed86f03 --- /dev/null +++ b/src/leveldb/doc/bench/db_bench_tree_db.cc @@ -0,0 +1,528 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include +#include +#include "util/histogram.h" +#include "util/random.h" +#include "util/testutil.h" + +// Comma-separated list of operations to run in the specified order +// Actual benchmarks: +// +// fillseq -- write N values in sequential key order in async mode +// fillrandom -- write N values in random key order in async mode +// overwrite -- overwrite N values in random key order in async mode +// fillseqsync -- write N/100 values in sequential key order in sync mode +// fillrandsync -- write N/100 values in random key order in sync mode +// fillrand100K -- write N/1000 100K values in random order in async mode +// fillseq100K -- write N/1000 100K values in seq order in async mode +// readseq -- read N times sequentially +// readseq100K -- read N/1000 100K values in sequential order in async mode +// readrand100K -- read N/1000 100K values in sequential order in async mode +// readrandom -- read N times in random order +static const char* FLAGS_benchmarks = + "fillseq," + "fillseqsync," + "fillrandsync," + "fillrandom," + "overwrite," + "readrandom," + "readseq," + "fillrand100K," + "fillseq100K," + "readseq100K," + "readrand100K," + ; + +// Number of key/values to place in database +static int FLAGS_num = 1000000; + +// Number of read operations to do. If negative, do FLAGS_num reads. +static int FLAGS_reads = -1; + +// Size of each value +static int FLAGS_value_size = 100; + +// Arrange to generate values that shrink to this fraction of +// their original size after compression +static double FLAGS_compression_ratio = 0.5; + +// Print histogram of operation timings +static bool FLAGS_histogram = false; + +// Cache size. Default 4 MB +static int FLAGS_cache_size = 4194304; + +// Page size. Default 1 KB +static int FLAGS_page_size = 1024; + +// If true, do not destroy the existing database. If you set this +// flag and also specify a benchmark that wants a fresh database, that +// benchmark will fail. +static bool FLAGS_use_existing_db = false; + +// Compression flag. If true, compression is on. If false, compression +// is off. +static bool FLAGS_compression = true; + +// Use the db with the following name. +static const char* FLAGS_db = NULL; + +inline +static void DBSynchronize(kyotocabinet::TreeDB* db_) +{ + // Synchronize will flush writes to disk + if (!db_->synchronize()) { + fprintf(stderr, "synchronize error: %s\n", db_->error().name()); + } +} + +namespace leveldb { + +// Helper for quickly generating random data. +namespace { +class RandomGenerator { + private: + std::string data_; + int pos_; + + public: + RandomGenerator() { + // We use a limited amount of data over and over again and ensure + // that it is larger than the compression window (32KB), and also + // large enough to serve all typical value sizes we want to write. + Random rnd(301); + std::string piece; + while (data_.size() < 1048576) { + // Add a short fragment that is as compressible as specified + // by FLAGS_compression_ratio. + test::CompressibleString(&rnd, FLAGS_compression_ratio, 100, &piece); + data_.append(piece); + } + pos_ = 0; + } + + Slice Generate(int len) { + if (pos_ + len > data_.size()) { + pos_ = 0; + assert(len < data_.size()); + } + pos_ += len; + return Slice(data_.data() + pos_ - len, len); + } +}; + +static Slice TrimSpace(Slice s) { + int start = 0; + while (start < s.size() && isspace(s[start])) { + start++; + } + int limit = s.size(); + while (limit > start && isspace(s[limit-1])) { + limit--; + } + return Slice(s.data() + start, limit - start); +} + +} // namespace + +class Benchmark { + private: + kyotocabinet::TreeDB* db_; + int db_num_; + int num_; + int reads_; + double start_; + double last_op_finish_; + int64_t bytes_; + std::string message_; + Histogram hist_; + RandomGenerator gen_; + Random rand_; + kyotocabinet::LZOCompressor comp_; + + // State kept for progress messages + int done_; + int next_report_; // When to report next + + void PrintHeader() { + const int kKeySize = 16; + PrintEnvironment(); + fprintf(stdout, "Keys: %d bytes each\n", kKeySize); + fprintf(stdout, "Values: %d bytes each (%d bytes after compression)\n", + FLAGS_value_size, + static_cast(FLAGS_value_size * FLAGS_compression_ratio + 0.5)); + fprintf(stdout, "Entries: %d\n", num_); + fprintf(stdout, "RawSize: %.1f MB (estimated)\n", + ((static_cast(kKeySize + FLAGS_value_size) * num_) + / 1048576.0)); + fprintf(stdout, "FileSize: %.1f MB (estimated)\n", + (((kKeySize + FLAGS_value_size * FLAGS_compression_ratio) * num_) + / 1048576.0)); + PrintWarnings(); + fprintf(stdout, "------------------------------------------------\n"); + } + + void PrintWarnings() { +#if defined(__GNUC__) && !defined(__OPTIMIZE__) + fprintf(stdout, + "WARNING: Optimization is disabled: benchmarks unnecessarily slow\n" + ); +#endif +#ifndef NDEBUG + fprintf(stdout, + "WARNING: Assertions are enabled; benchmarks unnecessarily slow\n"); +#endif + } + + void PrintEnvironment() { + fprintf(stderr, "Kyoto Cabinet: version %s, lib ver %d, lib rev %d\n", + kyotocabinet::VERSION, kyotocabinet::LIBVER, kyotocabinet::LIBREV); + +#if defined(__linux) + time_t now = time(NULL); + fprintf(stderr, "Date: %s", ctime(&now)); // ctime() adds newline + + FILE* cpuinfo = fopen("/proc/cpuinfo", "r"); + if (cpuinfo != NULL) { + char line[1000]; + int num_cpus = 0; + std::string cpu_type; + std::string cache_size; + while (fgets(line, sizeof(line), cpuinfo) != NULL) { + const char* sep = strchr(line, ':'); + if (sep == NULL) { + continue; + } + Slice key = TrimSpace(Slice(line, sep - 1 - line)); + Slice val = TrimSpace(Slice(sep + 1)); + if (key == "model name") { + ++num_cpus; + cpu_type = val.ToString(); + } else if (key == "cache size") { + cache_size = val.ToString(); + } + } + fclose(cpuinfo); + fprintf(stderr, "CPU: %d * %s\n", num_cpus, cpu_type.c_str()); + fprintf(stderr, "CPUCache: %s\n", cache_size.c_str()); + } +#endif + } + + void Start() { + start_ = Env::Default()->NowMicros() * 1e-6; + bytes_ = 0; + message_.clear(); + last_op_finish_ = start_; + hist_.Clear(); + done_ = 0; + next_report_ = 100; + } + + void FinishedSingleOp() { + if (FLAGS_histogram) { + double now = Env::Default()->NowMicros() * 1e-6; + double micros = (now - last_op_finish_) * 1e6; + hist_.Add(micros); + if (micros > 20000) { + fprintf(stderr, "long op: %.1f micros%30s\r", micros, ""); + fflush(stderr); + } + last_op_finish_ = now; + } + + done_++; + if (done_ >= next_report_) { + if (next_report_ < 1000) next_report_ += 100; + else if (next_report_ < 5000) next_report_ += 500; + else if (next_report_ < 10000) next_report_ += 1000; + else if (next_report_ < 50000) next_report_ += 5000; + else if (next_report_ < 100000) next_report_ += 10000; + else if (next_report_ < 500000) next_report_ += 50000; + else next_report_ += 100000; + fprintf(stderr, "... finished %d ops%30s\r", done_, ""); + fflush(stderr); + } + } + + void Stop(const Slice& name) { + double finish = Env::Default()->NowMicros() * 1e-6; + + // Pretend at least one op was done in case we are running a benchmark + // that does not call FinishedSingleOp(). + if (done_ < 1) done_ = 1; + + if (bytes_ > 0) { + char rate[100]; + snprintf(rate, sizeof(rate), "%6.1f MB/s", + (bytes_ / 1048576.0) / (finish - start_)); + if (!message_.empty()) { + message_ = std::string(rate) + " " + message_; + } else { + message_ = rate; + } + } + + fprintf(stdout, "%-12s : %11.3f micros/op;%s%s\n", + name.ToString().c_str(), + (finish - start_) * 1e6 / done_, + (message_.empty() ? "" : " "), + message_.c_str()); + if (FLAGS_histogram) { + fprintf(stdout, "Microseconds per op:\n%s\n", hist_.ToString().c_str()); + } + fflush(stdout); + } + + public: + enum Order { + SEQUENTIAL, + RANDOM + }; + enum DBState { + FRESH, + EXISTING + }; + + Benchmark() + : db_(NULL), + num_(FLAGS_num), + reads_(FLAGS_reads < 0 ? FLAGS_num : FLAGS_reads), + bytes_(0), + rand_(301) { + std::vector files; + std::string test_dir; + Env::Default()->GetTestDirectory(&test_dir); + Env::Default()->GetChildren(test_dir.c_str(), &files); + if (!FLAGS_use_existing_db) { + for (int i = 0; i < files.size(); i++) { + if (Slice(files[i]).starts_with("dbbench_polyDB")) { + std::string file_name(test_dir); + file_name += "/"; + file_name += files[i]; + Env::Default()->DeleteFile(file_name.c_str()); + } + } + } + } + + ~Benchmark() { + if (!db_->close()) { + fprintf(stderr, "close error: %s\n", db_->error().name()); + } + } + + void Run() { + PrintHeader(); + Open(false); + + const char* benchmarks = FLAGS_benchmarks; + while (benchmarks != NULL) { + const char* sep = strchr(benchmarks, ','); + Slice name; + if (sep == NULL) { + name = benchmarks; + benchmarks = NULL; + } else { + name = Slice(benchmarks, sep - benchmarks); + benchmarks = sep + 1; + } + + Start(); + + bool known = true; + bool write_sync = false; + if (name == Slice("fillseq")) { + Write(write_sync, SEQUENTIAL, FRESH, num_, FLAGS_value_size, 1); + + } else if (name == Slice("fillrandom")) { + Write(write_sync, RANDOM, FRESH, num_, FLAGS_value_size, 1); + DBSynchronize(db_); + } else if (name == Slice("overwrite")) { + Write(write_sync, RANDOM, EXISTING, num_, FLAGS_value_size, 1); + DBSynchronize(db_); + } else if (name == Slice("fillrandsync")) { + write_sync = true; + Write(write_sync, RANDOM, FRESH, num_ / 100, FLAGS_value_size, 1); + DBSynchronize(db_); + } else if (name == Slice("fillseqsync")) { + write_sync = true; + Write(write_sync, SEQUENTIAL, FRESH, num_ / 100, FLAGS_value_size, 1); + DBSynchronize(db_); + } else if (name == Slice("fillrand100K")) { + Write(write_sync, RANDOM, FRESH, num_ / 1000, 100 * 1000, 1); + DBSynchronize(db_); + } else if (name == Slice("fillseq100K")) { + Write(write_sync, SEQUENTIAL, FRESH, num_ / 1000, 100 * 1000, 1); + DBSynchronize(db_); + } else if (name == Slice("readseq")) { + ReadSequential(); + } else if (name == Slice("readrandom")) { + ReadRandom(); + } else if (name == Slice("readrand100K")) { + int n = reads_; + reads_ /= 1000; + ReadRandom(); + reads_ = n; + } else if (name == Slice("readseq100K")) { + int n = reads_; + reads_ /= 1000; + ReadSequential(); + reads_ = n; + } else { + known = false; + if (name != Slice()) { // No error message for empty name + fprintf(stderr, "unknown benchmark '%s'\n", name.ToString().c_str()); + } + } + if (known) { + Stop(name); + } + } + } + + private: + void Open(bool sync) { + assert(db_ == NULL); + + // Initialize db_ + db_ = new kyotocabinet::TreeDB(); + char file_name[100]; + db_num_++; + std::string test_dir; + Env::Default()->GetTestDirectory(&test_dir); + snprintf(file_name, sizeof(file_name), + "%s/dbbench_polyDB-%d.kct", + test_dir.c_str(), + db_num_); + + // Create tuning options and open the database + int open_options = kyotocabinet::PolyDB::OWRITER | + kyotocabinet::PolyDB::OCREATE; + int tune_options = kyotocabinet::TreeDB::TSMALL | + kyotocabinet::TreeDB::TLINEAR; + if (FLAGS_compression) { + tune_options |= kyotocabinet::TreeDB::TCOMPRESS; + db_->tune_compressor(&comp_); + } + db_->tune_options(tune_options); + db_->tune_page_cache(FLAGS_cache_size); + db_->tune_page(FLAGS_page_size); + db_->tune_map(256LL<<20); + if (sync) { + open_options |= kyotocabinet::PolyDB::OAUTOSYNC; + } + if (!db_->open(file_name, open_options)) { + fprintf(stderr, "open error: %s\n", db_->error().name()); + } + } + + void Write(bool sync, Order order, DBState state, + int num_entries, int value_size, int entries_per_batch) { + // Create new database if state == FRESH + if (state == FRESH) { + if (FLAGS_use_existing_db) { + message_ = "skipping (--use_existing_db is true)"; + return; + } + delete db_; + db_ = NULL; + Open(sync); + Start(); // Do not count time taken to destroy/open + } + + if (num_entries != num_) { + char msg[100]; + snprintf(msg, sizeof(msg), "(%d ops)", num_entries); + message_ = msg; + } + + // Write to database + for (int i = 0; i < num_entries; i++) + { + const int k = (order == SEQUENTIAL) ? i : (rand_.Next() % num_entries); + char key[100]; + snprintf(key, sizeof(key), "%016d", k); + bytes_ += value_size + strlen(key); + std::string cpp_key = key; + if (!db_->set(cpp_key, gen_.Generate(value_size).ToString())) { + fprintf(stderr, "set error: %s\n", db_->error().name()); + } + FinishedSingleOp(); + } + } + + void ReadSequential() { + kyotocabinet::DB::Cursor* cur = db_->cursor(); + cur->jump(); + std::string ckey, cvalue; + while (cur->get(&ckey, &cvalue, true)) { + bytes_ += ckey.size() + cvalue.size(); + FinishedSingleOp(); + } + delete cur; + } + + void ReadRandom() { + std::string value; + for (int i = 0; i < reads_; i++) { + char key[100]; + const int k = rand_.Next() % reads_; + snprintf(key, sizeof(key), "%016d", k); + db_->get(key, &value); + FinishedSingleOp(); + } + } +}; + +} // namespace leveldb + +int main(int argc, char** argv) { + std::string default_db_path; + for (int i = 1; i < argc; i++) { + double d; + int n; + char junk; + if (leveldb::Slice(argv[i]).starts_with("--benchmarks=")) { + FLAGS_benchmarks = argv[i] + strlen("--benchmarks="); + } else if (sscanf(argv[i], "--compression_ratio=%lf%c", &d, &junk) == 1) { + FLAGS_compression_ratio = d; + } else if (sscanf(argv[i], "--histogram=%d%c", &n, &junk) == 1 && + (n == 0 || n == 1)) { + FLAGS_histogram = n; + } else if (sscanf(argv[i], "--num=%d%c", &n, &junk) == 1) { + FLAGS_num = n; + } else if (sscanf(argv[i], "--reads=%d%c", &n, &junk) == 1) { + FLAGS_reads = n; + } else if (sscanf(argv[i], "--value_size=%d%c", &n, &junk) == 1) { + FLAGS_value_size = n; + } else if (sscanf(argv[i], "--cache_size=%d%c", &n, &junk) == 1) { + FLAGS_cache_size = n; + } else if (sscanf(argv[i], "--page_size=%d%c", &n, &junk) == 1) { + FLAGS_page_size = n; + } else if (sscanf(argv[i], "--compression=%d%c", &n, &junk) == 1 && + (n == 0 || n == 1)) { + FLAGS_compression = (n == 1) ? true : false; + } else if (strncmp(argv[i], "--db=", 5) == 0) { + FLAGS_db = argv[i] + 5; + } else { + fprintf(stderr, "Invalid flag '%s'\n", argv[i]); + exit(1); + } + } + + // Choose a location for the test database if none given with --db= + if (FLAGS_db == NULL) { + leveldb::Env::Default()->GetTestDirectory(&default_db_path); + default_db_path += "/dbbench"; + FLAGS_db = default_db_path.c_str(); + } + + leveldb::Benchmark benchmark; + benchmark.Run(); + return 0; +} diff --git a/src/leveldb/doc/benchmark.html b/src/leveldb/doc/benchmark.html new file mode 100644 index 0000000..c463977 --- /dev/null +++ b/src/leveldb/doc/benchmark.html @@ -0,0 +1,459 @@ + + + +LevelDB Benchmarks + + + + +

LevelDB Benchmarks

+

Google, July 2011

+
+ +

In order to test LevelDB's performance, we benchmark it against other well-established database implementations. We compare LevelDB (revision 39) against SQLite3 (version 3.7.6.3) and Kyoto Cabinet's (version 1.2.67) TreeDB (a B+Tree based key-value store). We would like to acknowledge Scott Hess and Mikio Hirabayashi for their suggestions and contributions to the SQLite3 and Kyoto Cabinet benchmarks, respectively.

+ +

Benchmarks were all performed on a six-core Intel(R) Xeon(R) CPU X5650 @ 2.67GHz, with 12288 KB of total L3 cache and 12 GB of DDR3 RAM at 1333 MHz. (Note that LevelDB uses at most two CPUs since the benchmarks are single threaded: one to run the benchmark, and one for background compactions.) We ran the benchmarks on two machines (with identical processors), one with an Ext3 file system and one with an Ext4 file system. The machine with the Ext3 file system has a SATA Hitachi HDS721050CLA362 hard drive. The machine with the Ext4 file system has a SATA Samsung HD502HJ hard drive. Both hard drives spin at 7200 RPM and have hard drive write-caching enabled (using `hdparm -W 1 [device]`). The numbers reported below are the median of three measurements.

+ +

Benchmark Source Code

+

We wrote benchmark tools for SQLite and Kyoto TreeDB based on LevelDB's db_bench. The code for each of the benchmarks resides here:

+ + +

Custom Build Specifications

+
    +
  • LevelDB: LevelDB was compiled with the tcmalloc library and the Snappy compression library (revision 33). Assertions were disabled.
  • +
  • TreeDB: TreeDB was compiled using the LZO compression library (version 2.03). Furthermore, we enabled the TSMALL and TLINEAR options when opening the database in order to reduce the footprint of each record.
  • +
  • SQLite: We tuned SQLite's performance, by setting its locking mode to exclusive. We also enabled SQLite's write-ahead logging.
  • +
+ +

1. Baseline Performance

+

This section gives the baseline performance of all the +databases. Following sections show how performance changes as various +parameters are varied. For the baseline:

+
    +
  • Each database is allowed 4 MB of cache memory.
  • +
  • Databases are opened in asynchronous write mode. + (LevelDB's sync option, TreeDB's OAUTOSYNC option, and + SQLite3's synchronous options are all turned off). I.e., + every write is pushed to the operating system, but the + benchmark does not wait for the write to reach the disk.
  • +
  • Keys are 16 bytes each.
  • +
  • Value are 100 bytes each (with enough redundancy so that + a simple compressor shrinks them to 50% of their original + size).
  • +
  • Sequential reads/writes traverse the key space in increasing order.
  • +
  • Random reads/writes traverse the key space in random order.
  • +
+ +

A. Sequential Reads

+ + + + + + + + + + +
LevelDB4,030,000 ops/sec
 
Kyoto TreeDB1,010,000 ops/sec
 
SQLite3383,000 ops/sec
 
+

B. Random Reads

+ + + + + + + + + + +
LevelDB129,000 ops/sec
 
Kyoto TreeDB151,000 ops/sec
 
SQLite3134,000 ops/sec
 
+

C. Sequential Writes

+ + + + + + + + + + +
LevelDB779,000 ops/sec
 
Kyoto TreeDB342,000 ops/sec
 
SQLite348,600 ops/sec
 
+

D. Random Writes

+ + + + + + + + + + +
LevelDB164,000 ops/sec
 
Kyoto TreeDB88,500 ops/sec
 
SQLite39,860 ops/sec
 
+ +

LevelDB outperforms both SQLite3 and TreeDB in sequential and random write operations and sequential read operations. Kyoto Cabinet has the fastest random read operations.

+ +

2. Write Performance under Different Configurations

+

A. Large Values

+

For this benchmark, we start with an empty database, and write 100,000 byte values (~50% compressible). To keep the benchmark running time reasonable, we stop after writing 1000 values.

+

Sequential Writes

+ + + + + + + + + + +
LevelDB1,100 ops/sec
 
Kyoto TreeDB1,000 ops/sec
 
SQLite31,600 ops/sec
 
+

Random Writes

+ + + + + + + + + + +
LevelDB480 ops/sec
 
Kyoto TreeDB1,100 ops/sec
 
SQLite31,600 ops/sec
 
+

LevelDB doesn't perform as well with large values of 100,000 bytes each. This is because LevelDB writes keys and values at least twice: first time to the transaction log, and second time (during a compaction) to a sorted file. +With larger values, LevelDB's per-operation efficiency is swamped by the +cost of extra copies of large values.

+

B. Batch Writes

+

A batch write is a set of writes that are applied atomically to the underlying database. A single batch of N writes may be significantly faster than N individual writes. The following benchmark writes one thousand batches where each batch contains one thousand 100-byte values. TreeDB does not support batch writes and is omitted from this benchmark.

+

Sequential Writes

+ + + + + + + + + +
LevelDB840,000 entries/sec
 
(1.08x baseline)
SQLite3124,000 entries/sec
 
(2.55x baseline)
+

Random Writes

+ + + + + + + + + +
LevelDB221,000 entries/sec
 
(1.35x baseline)
SQLite322,000 entries/sec
 
(2.23x baseline)
+ +

Because of the way LevelDB persistent storage is organized, batches of +random writes are not much slower (only a factor of 4x) than batches +of sequential writes.

+ +

C. Synchronous Writes

+

In the following benchmark, we enable the synchronous writing modes +of all of the databases. Since this change significantly slows down the +benchmark, we stop after 10,000 writes. For synchronous write tests, we've +disabled hard drive write-caching (using `hdparm -W 0 [device]`).

+
    +
  • For LevelDB, we set WriteOptions.sync = true.
  • +
  • In TreeDB, we enabled TreeDB's OAUTOSYNC option.
  • +
  • For SQLite3, we set "PRAGMA synchronous = FULL".
  • +
+

Sequential Writes

+ + + + + + + + + + + + + +
LevelDB100 ops/sec
 
(0.003x baseline)
Kyoto TreeDB7 ops/sec
 
(0.0004x baseline)
SQLite388 ops/sec
 
(0.002x baseline)
+

Random Writes

+ + + + + + + + + + + + + +
LevelDB100 ops/sec
 
(0.015x baseline)
Kyoto TreeDB8 ops/sec
 
(0.001x baseline)
SQLite388 ops/sec
 
(0.009x baseline)
+ +

Also see the ext4 performance numbers below +since synchronous writes behave significantly differently +on ext3 and ext4.

+ +

D. Turning Compression Off

+ +

In the baseline measurements, LevelDB and TreeDB were using +light-weight compression +(Snappy for LevelDB, +and LZO for +TreeDB). SQLite3, by default does not use compression. The +experiments below show what happens when compression is disabled in +all of the databases (the SQLite3 numbers are just a copy of +its baseline measurements):

+ +

Sequential Writes

+ + + + + + + + + + + + + +
LevelDB594,000 ops/sec
 
(0.76x baseline)
Kyoto TreeDB485,000 ops/sec
 
(1.42x baseline)
SQLite348,600 ops/sec
 
(1.00x baseline)
+

Random Writes

+ + + + + + + + + + + + + +
LevelDB135,000 ops/sec
 
(0.82x baseline)
Kyoto TreeDB159,000 ops/sec
 
(1.80x baseline)
SQLite39,860 ops/sec
 
(1.00x baseline)
+ +

LevelDB's write performance is better with compression than without +since compression decreases the amount of data that has to be written +to disk. Therefore LevelDB users can leave compression enabled in +most scenarios without having worry about a tradeoff between space +usage and performance. TreeDB's performance on the other hand is +better without compression than with compression. Presumably this is +because TreeDB's compression library (LZO) is more expensive than +LevelDB's compression library (Snappy).

+ +

E. Using More Memory

+

We increased the overall cache size for each database to 128 MB. For LevelDB, we partitioned 128 MB into a 120 MB write buffer and 8 MB of cache (up from 2 MB of write buffer and 2 MB of cache). For SQLite3, we kept the page size at 1024 bytes, but increased the number of pages to 131,072 (up from 4096). For TreeDB, we also kept the page size at 1024 bytes, but increased the cache size to 128 MB (up from 4 MB).

+

Sequential Writes

+ + + + + + + + + + + + + +
LevelDB812,000 ops/sec
 
(1.04x baseline)
Kyoto TreeDB321,000 ops/sec
 
(0.94x baseline)
SQLite348,500 ops/sec
 
(1.00x baseline)
+

Random Writes

+ + + + + + + + + + + + + +
LevelDB355,000 ops/sec
 
(2.16x baseline)
Kyoto TreeDB284,000 ops/sec
 
(3.21x baseline)
SQLite39,670 ops/sec
 
(0.98x baseline)
+ +

SQLite's performance does not change substantially when compared to +the baseline, but the random write performance for both LevelDB and +TreeDB increases significantly. LevelDB's performance improves +because a larger write buffer reduces the need to merge sorted files +(since it creates a smaller number of larger sorted files). TreeDB's +performance goes up because the entire database is available in memory +for fast in-place updates.

+ +

3. Read Performance under Different Configurations

+

A. Larger Caches

+

We increased the overall memory usage to 128 MB for each database. +For LevelDB, we allocated 8 MB to LevelDB's write buffer and 120 MB +to LevelDB's cache. The other databases don't differentiate between a +write buffer and a cache, so we simply set their cache size to 128 +MB.

+

Sequential Reads

+ + + + + + + + + + + + + +
LevelDB5,210,000 ops/sec
 
(1.29x baseline)
Kyoto TreeDB1,070,000 ops/sec
 
(1.06x baseline)
SQLite3609,000 ops/sec
 
(1.59x baseline)
+ +

Random Reads

+ + + + + + + + + + + + + +
LevelDB190,000 ops/sec
 
(1.47x baseline)
Kyoto TreeDB463,000 ops/sec
 
(3.07x baseline)
SQLite3186,000 ops/sec
 
(1.39x baseline)
+ +

As expected, the read performance of all of the databases increases +when the caches are enlarged. In particular, TreeDB seems to make +very effective use of a cache that is large enough to hold the entire +database.

+ +

B. No Compression Reads

+

For this benchmark, we populated a database with 1 million entries consisting of 16 byte keys and 100 byte values. We compiled LevelDB and Kyoto Cabinet without compression support, so results that are read out from the database are already uncompressed. We've listed the SQLite3 baseline read performance as a point of comparison.

+

Sequential Reads

+ + + + + + + + + + + + + +
LevelDB4,880,000 ops/sec
 
(1.21x baseline)
Kyoto TreeDB1,230,000 ops/sec
 
(3.60x baseline)
SQLite3383,000 ops/sec
 
(1.00x baseline)
+

Random Reads

+ + + + + + + + + + + + + +
LevelDB149,000 ops/sec
 
(1.16x baseline)
Kyoto TreeDB175,000 ops/sec
 
(1.16x baseline)
SQLite3134,000 ops/sec
 
(1.00x baseline)
+ +

Performance of both LevelDB and TreeDB improves a small amount when +compression is disabled. Note however that under different workloads, +performance may very well be better with compression if it allows more +of the working set to fit in memory.

+ +

Note about Ext4 Filesystems

+

The preceding numbers are for an ext3 file system. Synchronous writes are much slower under ext4 (LevelDB drops to ~31 writes / second and TreeDB drops to ~5 writes / second; SQLite3's synchronous writes do not noticeably drop) due to ext4's different handling of fsync / msync calls. Even LevelDB's asynchronous write performance drops somewhat since it spreads its storage across multiple files and issues fsync calls when switching to a new file.

+ +

Acknowledgements

+

Jeff Dean and Sanjay Ghemawat wrote LevelDB. Kevin Tseng wrote and compiled these benchmarks. Mikio Hirabayashi, Scott Hess, and Gabor Cselle provided help and advice.

+ + diff --git a/src/leveldb/doc/doc.css b/src/leveldb/doc/doc.css new file mode 100644 index 0000000..700c564 --- /dev/null +++ b/src/leveldb/doc/doc.css @@ -0,0 +1,89 @@ +body { + margin-left: 0.5in; + margin-right: 0.5in; + background: white; + color: black; +} + +h1 { + margin-left: -0.2in; + font-size: 14pt; +} +h2 { + margin-left: -0in; + font-size: 12pt; +} +h3 { + margin-left: -0in; +} +h4 { + margin-left: -0in; +} +hr { + margin-left: -0in; +} + +/* Definition lists: definition term bold */ +dt { + font-weight: bold; +} + +address { + text-align: center; +} +code,samp,var { + color: blue; +} +kbd { + color: #600000; +} +div.note p { + float: right; + width: 3in; + margin-right: 0%; + padding: 1px; + border: 2px solid #6060a0; + background-color: #fffff0; +} + +ul { + margin-top: -0em; + margin-bottom: -0em; +} + +ol { + margin-top: -0em; + margin-bottom: -0em; +} + +UL.nobullets { + list-style-type: none; + list-style-image: none; + margin-left: -1em; +} + +p { + margin: 1em 0 1em 0; + padding: 0 0 0 0; +} + +pre { + line-height: 1.3em; + padding: 0.4em 0 0.8em 0; + margin: 0 0 0 0; + border: 0 0 0 0; + color: blue; +} + +.datatable { + margin-left: auto; + margin-right: auto; + margin-top: 2em; + margin-bottom: 2em; + border: 1px solid; +} + +.datatable td,th { + padding: 0 0.5em 0 0.5em; + text-align: right; +} diff --git a/src/leveldb/doc/impl.html b/src/leveldb/doc/impl.html new file mode 100644 index 0000000..28817fe --- /dev/null +++ b/src/leveldb/doc/impl.html @@ -0,0 +1,213 @@ + + + + +Leveldb file layout and compactions + + + + +

Files

+ +The implementation of leveldb is similar in spirit to the +representation of a single + +Bigtable tablet (section 5.3). +However the organization of the files that make up the representation +is somewhat different and is explained below. + +

+Each database is represented by a set of files stored in a directory. +There are several different types of files as documented below: +

+

Log files

+

+A log file (*.log) stores a sequence of recent updates. Each update +is appended to the current log file. When the log file reaches a +pre-determined size (approximately 4MB by default), it is converted +to a sorted table (see below) and a new log file is created for future +updates. +

+A copy of the current log file is kept in an in-memory structure (the +memtable). This copy is consulted on every read so that read +operations reflect all logged updates. +

+

Sorted tables

+

+A sorted table (*.sst) stores a sequence of entries sorted by key. +Each entry is either a value for the key, or a deletion marker for the +key. (Deletion markers are kept around to hide obsolete values +present in older sorted tables). +

+The set of sorted tables are organized into a sequence of levels. The +sorted table generated from a log file is placed in a special young +level (also called level-0). When the number of young files exceeds a +certain threshold (currently four), all of the young files are merged +together with all of the overlapping level-1 files to produce a +sequence of new level-1 files (we create a new level-1 file for every +2MB of data.) +

+Files in the young level may contain overlapping keys. However files +in other levels have distinct non-overlapping key ranges. Consider +level number L where L >= 1. When the combined size of files in +level-L exceeds (10^L) MB (i.e., 10MB for level-1, 100MB for level-2, +...), one file in level-L, and all of the overlapping files in +level-(L+1) are merged to form a set of new files for level-(L+1). +These merges have the effect of gradually migrating new updates from +the young level to the largest level using only bulk reads and writes +(i.e., minimizing expensive seeks). + +

Manifest

+

+A MANIFEST file lists the set of sorted tables that make up each +level, the corresponding key ranges, and other important metadata. +A new MANIFEST file (with a new number embedded in the file name) +is created whenever the database is reopened. The MANIFEST file is +formatted as a log, and changes made to the serving state (as files +are added or removed) are appended to this log. +

+

Current

+

+CURRENT is a simple text file that contains the name of the latest +MANIFEST file. +

+

Info logs

+

+Informational messages are printed to files named LOG and LOG.old. +

+

Others

+

+Other files used for miscellaneous purposes may also be present +(LOCK, *.dbtmp). + +

Level 0

+When the log file grows above a certain size (1MB by default): +
    +
  • Create a brand new memtable and log file and direct future updates here +
  • In the background: +
      +
    • Write the contents of the previous memtable to an sstable +
    • Discard the memtable +
    • Delete the old log file and the old memtable +
    • Add the new sstable to the young (level-0) level. +
    +
+ +

Compactions

+ +

+When the size of level L exceeds its limit, we compact it in a +background thread. The compaction picks a file from level L and all +overlapping files from the next level L+1. Note that if a level-L +file overlaps only part of a level-(L+1) file, the entire file at +level-(L+1) is used as an input to the compaction and will be +discarded after the compaction. Aside: because level-0 is special +(files in it may overlap each other), we treat compactions from +level-0 to level-1 specially: a level-0 compaction may pick more than +one level-0 file in case some of these files overlap each other. + +

+A compaction merges the contents of the picked files to produce a +sequence of level-(L+1) files. We switch to producing a new +level-(L+1) file after the current output file has reached the target +file size (2MB). We also switch to a new output file when the key +range of the current output file has grown enough to overlap more then +ten level-(L+2) files. This last rule ensures that a later compaction +of a level-(L+1) file will not pick up too much data from level-(L+2). + +

+The old files are discarded and the new files are added to the serving +state. + +

+Compactions for a particular level rotate through the key space. In +more detail, for each level L, we remember the ending key of the last +compaction at level L. The next compaction for level L will pick the +first file that starts after this key (wrapping around to the +beginning of the key space if there is no such file). + +

+Compactions drop overwritten values. They also drop deletion markers +if there are no higher numbered levels that contain a file whose range +overlaps the current key. + +

Timing

+ +Level-0 compactions will read up to four 1MB files from level-0, and +at worst all the level-1 files (10MB). I.e., we will read 14MB and +write 14MB. + +

+Other than the special level-0 compactions, we will pick one 2MB file +from level L. In the worst case, this will overlap ~ 12 files from +level L+1 (10 because level-(L+1) is ten times the size of level-L, +and another two at the boundaries since the file ranges at level-L +will usually not be aligned with the file ranges at level-L+1). The +compaction will therefore read 26MB and write 26MB. Assuming a disk +IO rate of 100MB/s (ballpark range for modern drives), the worst +compaction cost will be approximately 0.5 second. + +

+If we throttle the background writing to something small, say 10% of +the full 100MB/s speed, a compaction may take up to 5 seconds. If the +user is writing at 10MB/s, we might build up lots of level-0 files +(~50 to hold the 5*10MB). This may signficantly increase the cost of +reads due to the overhead of merging more files together on every +read. + +

+Solution 1: To reduce this problem, we might want to increase the log +switching threshold when the number of level-0 files is large. Though +the downside is that the larger this threshold, the more memory we will +need to hold the corresponding memtable. + +

+Solution 2: We might want to decrease write rate artificially when the +number of level-0 files goes up. + +

+Solution 3: We work on reducing the cost of very wide merges. +Perhaps most of the level-0 files will have their blocks sitting +uncompressed in the cache and we will only need to worry about the +O(N) complexity in the merging iterator. + +

Number of files

+ +Instead of always making 2MB files, we could make larger files for +larger levels to reduce the total file count, though at the expense of +more bursty compactions. Alternatively, we could shard the set of +files into multiple directories. + +

+An experiment on an ext3 filesystem on Feb 04, 2011 shows +the following timings to do 100K file opens in directories with +varying number of files: + + + + + +
Files in directoryMicroseconds to open a file
10009
1000010
10000016
+So maybe even the sharding is not necessary on modern filesystems? + +

Recovery

+ +
    +
  • Read CURRENT to find name of the latest committed MANIFEST +
  • Read the named MANIFEST file +
  • Clean up stale files +
  • We could open all sstables here, but it is probably better to be lazy... +
  • Convert log chunk to a new level-0 sstable +
  • Start directing new writes to a new log file with recovered sequence# +
+ +

Garbage collection of files

+ +DeleteObsoleteFiles() is called at the end of every +compaction and at the end of recovery. It finds the names of all +files in the database. It deletes all log files that are not the +current log file. It deletes all table files that are not referenced +from some level and are not the output of an active compaction. + + + diff --git a/src/leveldb/doc/index.html b/src/leveldb/doc/index.html new file mode 100644 index 0000000..3ed0ed9 --- /dev/null +++ b/src/leveldb/doc/index.html @@ -0,0 +1,549 @@ + + + + +Leveldb + + + +

Leveldb

+
Jeff Dean, Sanjay Ghemawat
+

+The leveldb library provides a persistent key value store. Keys and +values are arbitrary byte arrays. The keys are ordered within the key +value store according to a user-specified comparator function. + +

+

Opening A Database

+

+A leveldb database has a name which corresponds to a file system +directory. All of the contents of database are stored in this +directory. The following example shows how to open a database, +creating it if necessary: +

+

+  #include <assert>
+  #include "leveldb/db.h"
+
+  leveldb::DB* db;
+  leveldb::Options options;
+  options.create_if_missing = true;
+  leveldb::Status status = leveldb::DB::Open(options, "/tmp/testdb", &db);
+  assert(status.ok());
+  ...
+
+If you want to raise an error if the database already exists, add +the following line before the leveldb::DB::Open call: +
+  options.error_if_exists = true;
+
+

Status

+

+You may have noticed the leveldb::Status type above. Values of this +type are returned by most functions in leveldb that may encounter an +error. You can check if such a result is ok, and also print an +associated error message: +

+

+   leveldb::Status s = ...;
+   if (!s.ok()) cerr << s.ToString() << endl;
+
+

Closing A Database

+

+When you are done with a database, just delete the database object. +Example: +

+

+  ... open the db as described above ...
+  ... do something with db ...
+  delete db;
+
+

Reads And Writes

+

+The database provides Put, Delete, and Get methods to +modify/query the database. For example, the following code +moves the value stored under key1 to key2. +

+  std::string value;
+  leveldb::Status s = db->Get(leveldb::ReadOptions(), key1, &value);
+  if (s.ok()) s = db->Put(leveldb::WriteOptions(), key2, value);
+  if (s.ok()) s = db->Delete(leveldb::WriteOptions(), key1);
+
+ +

Atomic Updates

+

+Note that if the process dies after the Put of key2 but before the +delete of key1, the same value may be left stored under multiple keys. +Such problems can be avoided by using the WriteBatch class to +atomically apply a set of updates: +

+

+  #include "leveldb/write_batch.h"
+  ...
+  std::string value;
+  leveldb::Status s = db->Get(leveldb::ReadOptions(), key1, &value);
+  if (s.ok()) {
+    leveldb::WriteBatch batch;
+    batch.Delete(key1);
+    batch.Put(key2, value);
+    s = db->Write(leveldb::WriteOptions(), &batch);
+  }
+
+The WriteBatch holds a sequence of edits to be made to the database, +and these edits within the batch are applied in order. Note that we +called Delete before Put so that if key1 is identical to key2, +we do not end up erroneously dropping the value entirely. +

+Apart from its atomicity benefits, WriteBatch may also be used to +speed up bulk updates by placing lots of individual mutations into the +same batch. + +

Synchronous Writes

+By default, each write to leveldb is asynchronous: it +returns after pushing the write from the process into the operating +system. The transfer from operating system memory to the underlying +persistent storage happens asynchronously. The sync flag +can be turned on for a particular write to make the write operation +not return until the data being written has been pushed all the way to +persistent storage. (On Posix systems, this is implemented by calling +either fsync(...) or fdatasync(...) or +msync(..., MS_SYNC) before the write operation returns.) +
+  leveldb::WriteOptions write_options;
+  write_options.sync = true;
+  db->Put(write_options, ...);
+
+Asynchronous writes are often more than a thousand times as fast as +synchronous writes. The downside of asynchronous writes is that a +crash of the machine may cause the last few updates to be lost. Note +that a crash of just the writing process (i.e., not a reboot) will not +cause any loss since even when sync is false, an update +is pushed from the process memory into the operating system before it +is considered done. + +

+Asynchronous writes can often be used safely. For example, when +loading a large amount of data into the database you can handle lost +updates by restarting the bulk load after a crash. A hybrid scheme is +also possible where every Nth write is synchronous, and in the event +of a crash, the bulk load is restarted just after the last synchronous +write finished by the previous run. (The synchronous write can update +a marker that describes where to restart on a crash.) + +

+WriteBatch provides an alternative to asynchronous writes. +Multiple updates may be placed in the same WriteBatch and +applied together using a synchronous write (i.e., +write_options.sync is set to true). The extra cost of +the synchronous write will be amortized across all of the writes in +the batch. + +

+

Concurrency

+

+A database may only be opened by one process at a time. +The leveldb implementation acquires a lock from the +operating system to prevent misuse. Within a single process, the +same leveldb::DB object may be safely shared by multiple +concurrent threads. I.e., different threads may write into or fetch +iterators or call Get on the same database without any +external synchronization (the leveldb implementation will +automatically do the required synchronization). However other objects +(like Iterator and WriteBatch) may require external synchronization. +If two threads share such an object, they must protect access to it +using their own locking protocol. More details are available in +the public header files. +

+

Iteration

+

+The following example demonstrates how to print all key,value pairs +in a database. +

+

+  leveldb::Iterator* it = db->NewIterator(leveldb::ReadOptions());
+  for (it->SeekToFirst(); it->Valid(); it->Next()) {
+    cout << it->key().ToString() << ": "  << it->value().ToString() << endl;
+  }
+  assert(it->status().ok());  // Check for any errors found during the scan
+  delete it;
+
+The following variation shows how to process just the keys in the +range [start,limit): +

+

+  for (it->Seek(start);
+       it->Valid() && it->key().ToString() < limit;
+       it->Next()) {
+    ...
+  }
+
+You can also process entries in reverse order. (Caveat: reverse +iteration may be somewhat slower than forward iteration.) +

+

+  for (it->SeekToLast(); it->Valid(); it->Prev()) {
+    ...
+  }
+
+

Snapshots

+

+Snapshots provide consistent read-only views over the entire state of +the key-value store. ReadOptions::snapshot may be non-NULL to indicate +that a read should operate on a particular version of the DB state. +If ReadOptions::snapshot is NULL, the read will operate on an +implicit snapshot of the current state. +

+Snapshots are created by the DB::GetSnapshot() method: +

+

+  leveldb::ReadOptions options;
+  options.snapshot = db->GetSnapshot();
+  ... apply some updates to db ...
+  leveldb::Iterator* iter = db->NewIterator(options);
+  ... read using iter to view the state when the snapshot was created ...
+  delete iter;
+  db->ReleaseSnapshot(options.snapshot);
+
+Note that when a snapshot is no longer needed, it should be released +using the DB::ReleaseSnapshot interface. This allows the +implementation to get rid of state that was being maintained just to +support reading as of that snapshot. +

Slice

+

+The return value of the it->key() and it->value() calls above +are instances of the leveldb::Slice type. Slice is a simple +structure that contains a length and a pointer to an external byte +array. Returning a Slice is a cheaper alternative to returning a +std::string since we do not need to copy potentially large keys and +values. In addition, leveldb methods do not return null-terminated +C-style strings since leveldb keys and values are allowed to +contain '\0' bytes. +

+C++ strings and null-terminated C-style strings can be easily converted +to a Slice: +

+

+   leveldb::Slice s1 = "hello";
+
+   std::string str("world");
+   leveldb::Slice s2 = str;
+
+A Slice can be easily converted back to a C++ string: +
+   std::string str = s1.ToString();
+   assert(str == std::string("hello"));
+
+Be careful when using Slices since it is up to the caller to ensure that +the external byte array into which the Slice points remains live while +the Slice is in use. For example, the following is buggy: +

+

+   leveldb::Slice slice;
+   if (...) {
+     std::string str = ...;
+     slice = str;
+   }
+   Use(slice);
+
+When the if statement goes out of scope, str will be destroyed and the +backing storage for slice will disappear. +

+

Comparators

+

+The preceding examples used the default ordering function for key, +which orders bytes lexicographically. You can however supply a custom +comparator when opening a database. For example, suppose each +database key consists of two numbers and we should sort by the first +number, breaking ties by the second number. First, define a proper +subclass of leveldb::Comparator that expresses these rules: +

+

+  class TwoPartComparator : public leveldb::Comparator {
+   public:
+    // Three-way comparison function:
+    //   if a < b: negative result
+    //   if a > b: positive result
+    //   else: zero result
+    int Compare(const leveldb::Slice& a, const leveldb::Slice& b) const {
+      int a1, a2, b1, b2;
+      ParseKey(a, &a1, &a2);
+      ParseKey(b, &b1, &b2);
+      if (a1 < b1) return -1;
+      if (a1 > b1) return +1;
+      if (a2 < b2) return -1;
+      if (a2 > b2) return +1;
+      return 0;
+    }
+
+    // Ignore the following methods for now:
+    const char* Name() const { return "TwoPartComparator"; }
+    void FindShortestSeparator(std::string*, const leveldb::Slice&) const { }
+    void FindShortSuccessor(std::string*) const { }
+  };
+
+Now create a database using this custom comparator: +

+

+  TwoPartComparator cmp;
+  leveldb::DB* db;
+  leveldb::Options options;
+  options.create_if_missing = true;
+  options.comparator = &cmp;
+  leveldb::Status status = leveldb::DB::Open(options, "/tmp/testdb", &db);
+  ...
+
+

Backwards compatibility

+

+The result of the comparator's Name method is attached to the +database when it is created, and is checked on every subsequent +database open. If the name changes, the leveldb::DB::Open call will +fail. Therefore, change the name if and only if the new key format +and comparison function are incompatible with existing databases, and +it is ok to discard the contents of all existing databases. +

+You can however still gradually evolve your key format over time with +a little bit of pre-planning. For example, you could store a version +number at the end of each key (one byte should suffice for most uses). +When you wish to switch to a new key format (e.g., adding an optional +third part to the keys processed by TwoPartComparator), +(a) keep the same comparator name (b) increment the version number +for new keys (c) change the comparator function so it uses the +version numbers found in the keys to decide how to interpret them. +

+

Performance

+

+Performance can be tuned by changing the default values of the +types defined in include/leveldb/options.h. + +

+

Block size

+

+leveldb groups adjacent keys together into the same block and such a +block is the unit of transfer to and from persistent storage. The +default block size is approximately 4096 uncompressed bytes. +Applications that mostly do bulk scans over the contents of the +database may wish to increase this size. Applications that do a lot +of point reads of small values may wish to switch to a smaller block +size if performance measurements indicate an improvement. There isn't +much benefit in using blocks smaller than one kilobyte, or larger than +a few megabytes. Also note that compression will be more effective +with larger block sizes. +

+

Compression

+

+Each block is individually compressed before being written to +persistent storage. Compression is on by default since the default +compression method is very fast, and is automatically disabled for +uncompressible data. In rare cases, applications may want to disable +compression entirely, but should only do so if benchmarks show a +performance improvement: +

+

+  leveldb::Options options;
+  options.compression = leveldb::kNoCompression;
+  ... leveldb::DB::Open(options, name, ...) ....
+
+

Cache

+

+The contents of the database are stored in a set of files in the +filesystem and each file stores a sequence of compressed blocks. If +options.cache is non-NULL, it is used to cache frequently used +uncompressed block contents. +

+

+  #include "leveldb/cache.h"
+
+  leveldb::Options options;
+  options.cache = leveldb::NewLRUCache(100 * 1048576);  // 100MB cache
+  leveldb::DB* db;
+  leveldb::DB::Open(options, name, &db);
+  ... use the db ...
+  delete db
+  delete options.cache;
+
+Note that the cache holds uncompressed data, and therefore it should +be sized according to application level data sizes, without any +reduction from compression. (Caching of compressed blocks is left to +the operating system buffer cache, or any custom Env +implementation provided by the client.) +

+When performing a bulk read, the application may wish to disable +caching so that the data processed by the bulk read does not end up +displacing most of the cached contents. A per-iterator option can be +used to achieve this: +

+

+  leveldb::ReadOptions options;
+  options.fill_cache = false;
+  leveldb::Iterator* it = db->NewIterator(options);
+  for (it->SeekToFirst(); it->Valid(); it->Next()) {
+    ...
+  }
+
+

Key Layout

+

+Note that the unit of disk transfer and caching is a block. Adjacent +keys (according to the database sort order) will usually be placed in +the same block. Therefore the application can improve its performance +by placing keys that are accessed together near each other and placing +infrequently used keys in a separate region of the key space. +

+For example, suppose we are implementing a simple file system on top +of leveldb. The types of entries we might wish to store are: +

+

+   filename -> permission-bits, length, list of file_block_ids
+   file_block_id -> data
+
+We might want to prefix filename keys with one letter (say '/') and the +file_block_id keys with a different letter (say '0') so that scans +over just the metadata do not force us to fetch and cache bulky file +contents. +

+

Filters

+

+Because of the way leveldb data is organized on disk, +a single Get() call may involve multiple reads from disk. +The optional FilterPolicy mechanism can be used to reduce +the number of disk reads substantially. +

+   leveldb::Options options;
+   options.filter_policy = NewBloomFilterPolicy(10);
+   leveldb::DB* db;
+   leveldb::DB::Open(options, "/tmp/testdb", &db);
+   ... use the database ...
+   delete db;
+   delete options.filter_policy;
+
+The preceding code associates a +Bloom filter +based filtering policy with the database. Bloom filter based +filtering relies on keeping some number of bits of data in memory per +key (in this case 10 bits per key since that is the argument we passed +to NewBloomFilterPolicy). This filter will reduce the number of unnecessary +disk reads needed for Get() calls by a factor of +approximately a 100. Increasing the bits per key will lead to a +larger reduction at the cost of more memory usage. We recommend that +applications whose working set does not fit in memory and that do a +lot of random reads set a filter policy. +

+If you are using a custom comparator, you should ensure that the filter +policy you are using is compatible with your comparator. For example, +consider a comparator that ignores trailing spaces when comparing keys. +NewBloomFilterPolicy must not be used with such a comparator. +Instead, the application should provide a custom filter policy that +also ignores trailing spaces. For example: +

+  class CustomFilterPolicy : public leveldb::FilterPolicy {
+   private:
+    FilterPolicy* builtin_policy_;
+   public:
+    CustomFilterPolicy() : builtin_policy_(NewBloomFilterPolicy(10)) { }
+    ~CustomFilterPolicy() { delete builtin_policy_; }
+
+    const char* Name() const { return "IgnoreTrailingSpacesFilter"; }
+
+    void CreateFilter(const Slice* keys, int n, std::string* dst) const {
+      // Use builtin bloom filter code after removing trailing spaces
+      std::vector<Slice> trimmed(n);
+      for (int i = 0; i < n; i++) {
+        trimmed[i] = RemoveTrailingSpaces(keys[i]);
+      }
+      return builtin_policy_->CreateFilter(&trimmed[i], n, dst);
+    }
+
+    bool KeyMayMatch(const Slice& key, const Slice& filter) const {
+      // Use builtin bloom filter code after removing trailing spaces
+      return builtin_policy_->KeyMayMatch(RemoveTrailingSpaces(key), filter);
+    }
+  };
+
+

+Advanced applications may provide a filter policy that does not use +a bloom filter but uses some other mechanism for summarizing a set +of keys. See leveldb/filter_policy.h for detail. +

+

Checksums

+

+leveldb associates checksums with all data it stores in the file system. +There are two separate controls provided over how aggressively these +checksums are verified: +

+

    +
  • ReadOptions::verify_checksums may be set to true to force + checksum verification of all data that is read from the file system on + behalf of a particular read. By default, no such verification is + done. +

    +

  • Options::paranoid_checks may be set to true before opening a + database to make the database implementation raise an error as soon as + it detects an internal corruption. Depending on which portion of the + database has been corrupted, the error may be raised when the database + is opened, or later by another database operation. By default, + paranoid checking is off so that the database can be used even if + parts of its persistent storage have been corrupted. +

    + If a database is corrupted (perhaps it cannot be opened when + paranoid checking is turned on), the leveldb::RepairDB function + may be used to recover as much of the data as possible +

    +

+

Approximate Sizes

+

+The GetApproximateSizes method can used to get the approximate +number of bytes of file system space used by one or more key ranges. +

+

+   leveldb::Range ranges[2];
+   ranges[0] = leveldb::Range("a", "c");
+   ranges[1] = leveldb::Range("x", "z");
+   uint64_t sizes[2];
+   leveldb::Status s = db->GetApproximateSizes(ranges, 2, sizes);
+
+The preceding call will set sizes[0] to the approximate number of +bytes of file system space used by the key range [a..c) and +sizes[1] to the approximate number of bytes used by the key range +[x..z). +

+

Environment

+

+All file operations (and other operating system calls) issued by the +leveldb implementation are routed through a leveldb::Env object. +Sophisticated clients may wish to provide their own Env +implementation to get better control. For example, an application may +introduce artificial delays in the file IO paths to limit the impact +of leveldb on other activities in the system. +

+

+  class SlowEnv : public leveldb::Env {
+    .. implementation of the Env interface ...
+  };
+
+  SlowEnv env;
+  leveldb::Options options;
+  options.env = &env;
+  Status s = leveldb::DB::Open(options, ...);
+
+

Porting

+

+leveldb may be ported to a new platform by providing platform +specific implementations of the types/methods/functions exported by +leveldb/port/port.h. See leveldb/port/port_example.h for more +details. +

+In addition, the new platform may need a new default leveldb::Env +implementation. See leveldb/util/env_posix.h for an example. + +

Other Information

+ +

+Details about the leveldb implementation may be found in +the following documents: +

+ + + diff --git a/src/leveldb/doc/log_format.txt b/src/leveldb/doc/log_format.txt new file mode 100644 index 0000000..5228f62 --- /dev/null +++ b/src/leveldb/doc/log_format.txt @@ -0,0 +1,75 @@ +The log file contents are a sequence of 32KB blocks. The only +exception is that the tail of the file may contain a partial block. + +Each block consists of a sequence of records: + block := record* trailer? + record := + checksum: uint32 // crc32c of type and data[] ; little-endian + length: uint16 // little-endian + type: uint8 // One of FULL, FIRST, MIDDLE, LAST + data: uint8[length] + +A record never starts within the last six bytes of a block (since it +won't fit). Any leftover bytes here form the trailer, which must +consist entirely of zero bytes and must be skipped by readers. + +Aside: if exactly seven bytes are left in the current block, and a new +non-zero length record is added, the writer must emit a FIRST record +(which contains zero bytes of user data) to fill up the trailing seven +bytes of the block and then emit all of the user data in subsequent +blocks. + +More types may be added in the future. Some Readers may skip record +types they do not understand, others may report that some data was +skipped. + +FULL == 1 +FIRST == 2 +MIDDLE == 3 +LAST == 4 + +The FULL record contains the contents of an entire user record. + +FIRST, MIDDLE, LAST are types used for user records that have been +split into multiple fragments (typically because of block boundaries). +FIRST is the type of the first fragment of a user record, LAST is the +type of the last fragment of a user record, and MID is the type of all +interior fragments of a user record. + +Example: consider a sequence of user records: + A: length 1000 + B: length 97270 + C: length 8000 +A will be stored as a FULL record in the first block. + +B will be split into three fragments: first fragment occupies the rest +of the first block, second fragment occupies the entirety of the +second block, and the third fragment occupies a prefix of the third +block. This will leave six bytes free in the third block, which will +be left empty as the trailer. + +C will be stored as a FULL record in the fourth block. + +=================== + +Some benefits over the recordio format: + +(1) We do not need any heuristics for resyncing - just go to next +block boundary and scan. If there is a corruption, skip to the next +block. As a side-benefit, we do not get confused when part of the +contents of one log file are embedded as a record inside another log +file. + +(2) Splitting at approximate boundaries (e.g., for mapreduce) is +simple: find the next block boundary and skip records until we +hit a FULL or FIRST record. + +(3) We do not need extra buffering for large records. + +Some downsides compared to recordio format: + +(1) No packing of tiny records. This could be fixed by adding a new +record type, so it is a shortcoming of the current implementation, +not necessarily the format. + +(2) No compression. Again, this could be fixed by adding new record types. diff --git a/src/leveldb/doc/table_format.txt b/src/leveldb/doc/table_format.txt new file mode 100644 index 0000000..ca8f9b4 --- /dev/null +++ b/src/leveldb/doc/table_format.txt @@ -0,0 +1,104 @@ +File format +=========== + + + [data block 1] + [data block 2] + ... + [data block N] + [meta block 1] + ... + [meta block K] + [metaindex block] + [index block] + [Footer] (fixed size; starts at file_size - sizeof(Footer)) + + +The file contains internal pointers. Each such pointer is called +a BlockHandle and contains the following information: + offset: varint64 + size: varint64 +See https://developers.google.com/protocol-buffers/docs/encoding#varints +for an explanation of varint64 format. + +(1) The sequence of key/value pairs in the file are stored in sorted +order and partitioned into a sequence of data blocks. These blocks +come one after another at the beginning of the file. Each data block +is formatted according to the code in block_builder.cc, and then +optionally compressed. + +(2) After the data blocks we store a bunch of meta blocks. The +supported meta block types are described below. More meta block types +may be added in the future. Each meta block is again formatted using +block_builder.cc and then optionally compressed. + +(3) A "metaindex" block. It contains one entry for every other meta +block where the key is the name of the meta block and the value is a +BlockHandle pointing to that meta block. + +(4) An "index" block. This block contains one entry per data block, +where the key is a string >= last key in that data block and before +the first key in the successive data block. The value is the +BlockHandle for the data block. + +(6) At the very end of the file is a fixed length footer that contains +the BlockHandle of the metaindex and index blocks as well as a magic number. + metaindex_handle: char[p]; // Block handle for metaindex + index_handle: char[q]; // Block handle for index + padding: char[40-p-q]; // zeroed bytes to make fixed length + // (40==2*BlockHandle::kMaxEncodedLength) + magic: fixed64; // == 0xdb4775248b80fb57 (little-endian) + +"filter" Meta Block +------------------- + +If a "FilterPolicy" was specified when the database was opened, a +filter block is stored in each table. The "metaindex" block contains +an entry that maps from "filter." to the BlockHandle for the filter +block where "" is the string returned by the filter policy's +"Name()" method. + +The filter block stores a sequence of filters, where filter i contains +the output of FilterPolicy::CreateFilter() on all keys that are stored +in a block whose file offset falls within the range + + [ i*base ... (i+1)*base-1 ] + +Currently, "base" is 2KB. So for example, if blocks X and Y start in +the range [ 0KB .. 2KB-1 ], all of the keys in X and Y will be +converted to a filter by calling FilterPolicy::CreateFilter(), and the +resulting filter will be stored as the first filter in the filter +block. + +The filter block is formatted as follows: + + [filter 0] + [filter 1] + [filter 2] + ... + [filter N-1] + + [offset of filter 0] : 4 bytes + [offset of filter 1] : 4 bytes + [offset of filter 2] : 4 bytes + ... + [offset of filter N-1] : 4 bytes + + [offset of beginning of offset array] : 4 bytes + lg(base) : 1 byte + +The offset array at the end of the filter block allows efficient +mapping from a data block offset to the corresponding filter. + +"stats" Meta Block +------------------ + +This meta block contains a bunch of stats. The key is the name +of the statistic. The value contains the statistic. +TODO(postrelease): record following stats. + data size + index size + key size (uncompressed) + value size (uncompressed) + number of entries + number of data blocks diff --git a/src/leveldb/helpers/memenv/memenv.cc b/src/leveldb/helpers/memenv/memenv.cc new file mode 100644 index 0000000..5879de1 --- /dev/null +++ b/src/leveldb/helpers/memenv/memenv.cc @@ -0,0 +1,384 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "helpers/memenv/memenv.h" + +#include "leveldb/env.h" +#include "leveldb/status.h" +#include "port/port.h" +#include "util/mutexlock.h" +#include +#include +#include +#include + +namespace leveldb { + +namespace { + +class FileState { + public: + // FileStates are reference counted. The initial reference count is zero + // and the caller must call Ref() at least once. + FileState() : refs_(0), size_(0) {} + + // Increase the reference count. + void Ref() { + MutexLock lock(&refs_mutex_); + ++refs_; + } + + // Decrease the reference count. Delete if this is the last reference. + void Unref() { + bool do_delete = false; + + { + MutexLock lock(&refs_mutex_); + --refs_; + assert(refs_ >= 0); + if (refs_ <= 0) { + do_delete = true; + } + } + + if (do_delete) { + delete this; + } + } + + uint64_t Size() const { return size_; } + + Status Read(uint64_t offset, size_t n, Slice* result, char* scratch) const { + if (offset > size_) { + return Status::IOError("Offset greater than file size."); + } + const uint64_t available = size_ - offset; + if (n > available) { + n = available; + } + if (n == 0) { + *result = Slice(); + return Status::OK(); + } + + size_t block = offset / kBlockSize; + size_t block_offset = offset % kBlockSize; + + if (n <= kBlockSize - block_offset) { + // The requested bytes are all in the first block. + *result = Slice(blocks_[block] + block_offset, n); + return Status::OK(); + } + + size_t bytes_to_copy = n; + char* dst = scratch; + + while (bytes_to_copy > 0) { + size_t avail = kBlockSize - block_offset; + if (avail > bytes_to_copy) { + avail = bytes_to_copy; + } + memcpy(dst, blocks_[block] + block_offset, avail); + + bytes_to_copy -= avail; + dst += avail; + block++; + block_offset = 0; + } + + *result = Slice(scratch, n); + return Status::OK(); + } + + Status Append(const Slice& data) { + const char* src = data.data(); + size_t src_len = data.size(); + + while (src_len > 0) { + size_t avail; + size_t offset = size_ % kBlockSize; + + if (offset != 0) { + // There is some room in the last block. + avail = kBlockSize - offset; + } else { + // No room in the last block; push new one. + blocks_.push_back(new char[kBlockSize]); + avail = kBlockSize; + } + + if (avail > src_len) { + avail = src_len; + } + memcpy(blocks_.back() + offset, src, avail); + src_len -= avail; + src += avail; + size_ += avail; + } + + return Status::OK(); + } + + private: + // Private since only Unref() should be used to delete it. + ~FileState() { + for (std::vector::iterator i = blocks_.begin(); i != blocks_.end(); + ++i) { + delete [] *i; + } + } + + // No copying allowed. + FileState(const FileState&); + void operator=(const FileState&); + + port::Mutex refs_mutex_; + int refs_; // Protected by refs_mutex_; + + // The following fields are not protected by any mutex. They are only mutable + // while the file is being written, and concurrent access is not allowed + // to writable files. + std::vector blocks_; + uint64_t size_; + + enum { kBlockSize = 8 * 1024 }; +}; + +class SequentialFileImpl : public SequentialFile { + public: + explicit SequentialFileImpl(FileState* file) : file_(file), pos_(0) { + file_->Ref(); + } + + ~SequentialFileImpl() { + file_->Unref(); + } + + virtual Status Read(size_t n, Slice* result, char* scratch) { + Status s = file_->Read(pos_, n, result, scratch); + if (s.ok()) { + pos_ += result->size(); + } + return s; + } + + virtual Status Skip(uint64_t n) { + if (pos_ > file_->Size()) { + return Status::IOError("pos_ > file_->Size()"); + } + const size_t available = file_->Size() - pos_; + if (n > available) { + n = available; + } + pos_ += n; + return Status::OK(); + } + + private: + FileState* file_; + size_t pos_; +}; + +class RandomAccessFileImpl : public RandomAccessFile { + public: + explicit RandomAccessFileImpl(FileState* file) : file_(file) { + file_->Ref(); + } + + ~RandomAccessFileImpl() { + file_->Unref(); + } + + virtual Status Read(uint64_t offset, size_t n, Slice* result, + char* scratch) const { + return file_->Read(offset, n, result, scratch); + } + + private: + FileState* file_; +}; + +class WritableFileImpl : public WritableFile { + public: + WritableFileImpl(FileState* file) : file_(file) { + file_->Ref(); + } + + ~WritableFileImpl() { + file_->Unref(); + } + + virtual Status Append(const Slice& data) { + return file_->Append(data); + } + + virtual Status Close() { return Status::OK(); } + virtual Status Flush() { return Status::OK(); } + virtual Status Sync() { return Status::OK(); } + + private: + FileState* file_; +}; + +class NoOpLogger : public Logger { + public: + virtual void Logv(const char* format, va_list ap) { } +}; + +class InMemoryEnv : public EnvWrapper { + public: + explicit InMemoryEnv(Env* base_env) : EnvWrapper(base_env) { } + + virtual ~InMemoryEnv() { + for (FileSystem::iterator i = file_map_.begin(); i != file_map_.end(); ++i){ + i->second->Unref(); + } + } + + // Partial implementation of the Env interface. + virtual Status NewSequentialFile(const std::string& fname, + SequentialFile** result) { + MutexLock lock(&mutex_); + if (file_map_.find(fname) == file_map_.end()) { + *result = NULL; + return Status::IOError(fname, "File not found"); + } + + *result = new SequentialFileImpl(file_map_[fname]); + return Status::OK(); + } + + virtual Status NewRandomAccessFile(const std::string& fname, + RandomAccessFile** result) { + MutexLock lock(&mutex_); + if (file_map_.find(fname) == file_map_.end()) { + *result = NULL; + return Status::IOError(fname, "File not found"); + } + + *result = new RandomAccessFileImpl(file_map_[fname]); + return Status::OK(); + } + + virtual Status NewWritableFile(const std::string& fname, + WritableFile** result) { + MutexLock lock(&mutex_); + if (file_map_.find(fname) != file_map_.end()) { + DeleteFileInternal(fname); + } + + FileState* file = new FileState(); + file->Ref(); + file_map_[fname] = file; + + *result = new WritableFileImpl(file); + return Status::OK(); + } + + virtual bool FileExists(const std::string& fname) { + MutexLock lock(&mutex_); + return file_map_.find(fname) != file_map_.end(); + } + + virtual Status GetChildren(const std::string& dir, + std::vector* result) { + MutexLock lock(&mutex_); + result->clear(); + + for (FileSystem::iterator i = file_map_.begin(); i != file_map_.end(); ++i){ + const std::string& filename = i->first; + + if (filename.size() >= dir.size() + 1 && filename[dir.size()] == '/' && + Slice(filename).starts_with(Slice(dir))) { + result->push_back(filename.substr(dir.size() + 1)); + } + } + + return Status::OK(); + } + + void DeleteFileInternal(const std::string& fname) { + if (file_map_.find(fname) == file_map_.end()) { + return; + } + + file_map_[fname]->Unref(); + file_map_.erase(fname); + } + + virtual Status DeleteFile(const std::string& fname) { + MutexLock lock(&mutex_); + if (file_map_.find(fname) == file_map_.end()) { + return Status::IOError(fname, "File not found"); + } + + DeleteFileInternal(fname); + return Status::OK(); + } + + virtual Status CreateDir(const std::string& dirname) { + return Status::OK(); + } + + virtual Status DeleteDir(const std::string& dirname) { + return Status::OK(); + } + + virtual Status GetFileSize(const std::string& fname, uint64_t* file_size) { + MutexLock lock(&mutex_); + if (file_map_.find(fname) == file_map_.end()) { + return Status::IOError(fname, "File not found"); + } + + *file_size = file_map_[fname]->Size(); + return Status::OK(); + } + + virtual Status RenameFile(const std::string& src, + const std::string& target) { + MutexLock lock(&mutex_); + if (file_map_.find(src) == file_map_.end()) { + return Status::IOError(src, "File not found"); + } + + DeleteFileInternal(target); + file_map_[target] = file_map_[src]; + file_map_.erase(src); + return Status::OK(); + } + + virtual Status LockFile(const std::string& fname, FileLock** lock) { + *lock = new FileLock; + return Status::OK(); + } + + virtual Status UnlockFile(FileLock* lock) { + delete lock; + return Status::OK(); + } + + virtual Status GetTestDirectory(std::string* path) { + *path = "/test"; + return Status::OK(); + } + + virtual Status NewLogger(const std::string& fname, Logger** result) { + *result = new NoOpLogger; + return Status::OK(); + } + + private: + // Map from filenames to FileState objects, representing a simple file system. + typedef std::map FileSystem; + port::Mutex mutex_; + FileSystem file_map_; // Protected by mutex_. +}; + +} // namespace + +Env* NewMemEnv(Env* base_env) { + return new InMemoryEnv(base_env); +} + +} // namespace leveldb diff --git a/src/leveldb/helpers/memenv/memenv.h b/src/leveldb/helpers/memenv/memenv.h new file mode 100644 index 0000000..03b88de --- /dev/null +++ b/src/leveldb/helpers/memenv/memenv.h @@ -0,0 +1,20 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H_ +#define STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H_ + +namespace leveldb { + +class Env; + +// Returns a new environment that stores its data in memory and delegates +// all non-file-storage tasks to base_env. The caller must delete the result +// when it is no longer needed. +// *base_env must remain live while the result is in use. +Env* NewMemEnv(Env* base_env); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H_ diff --git a/src/leveldb/helpers/memenv/memenv_test.cc b/src/leveldb/helpers/memenv/memenv_test.cc new file mode 100644 index 0000000..a44310f --- /dev/null +++ b/src/leveldb/helpers/memenv/memenv_test.cc @@ -0,0 +1,232 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "helpers/memenv/memenv.h" + +#include "db/db_impl.h" +#include "leveldb/db.h" +#include "leveldb/env.h" +#include "util/testharness.h" +#include +#include + +namespace leveldb { + +class MemEnvTest { + public: + Env* env_; + + MemEnvTest() + : env_(NewMemEnv(Env::Default())) { + } + ~MemEnvTest() { + delete env_; + } +}; + +TEST(MemEnvTest, Basics) { + uint64_t file_size; + WritableFile* writable_file; + std::vector children; + + ASSERT_OK(env_->CreateDir("/dir")); + + // Check that the directory is empty. + ASSERT_TRUE(!env_->FileExists("/dir/non_existent")); + ASSERT_TRUE(!env_->GetFileSize("/dir/non_existent", &file_size).ok()); + ASSERT_OK(env_->GetChildren("/dir", &children)); + ASSERT_EQ(0, children.size()); + + // Create a file. + ASSERT_OK(env_->NewWritableFile("/dir/f", &writable_file)); + delete writable_file; + + // Check that the file exists. + ASSERT_TRUE(env_->FileExists("/dir/f")); + ASSERT_OK(env_->GetFileSize("/dir/f", &file_size)); + ASSERT_EQ(0, file_size); + ASSERT_OK(env_->GetChildren("/dir", &children)); + ASSERT_EQ(1, children.size()); + ASSERT_EQ("f", children[0]); + + // Write to the file. + ASSERT_OK(env_->NewWritableFile("/dir/f", &writable_file)); + ASSERT_OK(writable_file->Append("abc")); + delete writable_file; + + // Check for expected size. + ASSERT_OK(env_->GetFileSize("/dir/f", &file_size)); + ASSERT_EQ(3, file_size); + + // Check that renaming works. + ASSERT_TRUE(!env_->RenameFile("/dir/non_existent", "/dir/g").ok()); + ASSERT_OK(env_->RenameFile("/dir/f", "/dir/g")); + ASSERT_TRUE(!env_->FileExists("/dir/f")); + ASSERT_TRUE(env_->FileExists("/dir/g")); + ASSERT_OK(env_->GetFileSize("/dir/g", &file_size)); + ASSERT_EQ(3, file_size); + + // Check that opening non-existent file fails. + SequentialFile* seq_file; + RandomAccessFile* rand_file; + ASSERT_TRUE(!env_->NewSequentialFile("/dir/non_existent", &seq_file).ok()); + ASSERT_TRUE(!seq_file); + ASSERT_TRUE(!env_->NewRandomAccessFile("/dir/non_existent", &rand_file).ok()); + ASSERT_TRUE(!rand_file); + + // Check that deleting works. + ASSERT_TRUE(!env_->DeleteFile("/dir/non_existent").ok()); + ASSERT_OK(env_->DeleteFile("/dir/g")); + ASSERT_TRUE(!env_->FileExists("/dir/g")); + ASSERT_OK(env_->GetChildren("/dir", &children)); + ASSERT_EQ(0, children.size()); + ASSERT_OK(env_->DeleteDir("/dir")); +} + +TEST(MemEnvTest, ReadWrite) { + WritableFile* writable_file; + SequentialFile* seq_file; + RandomAccessFile* rand_file; + Slice result; + char scratch[100]; + + ASSERT_OK(env_->CreateDir("/dir")); + + ASSERT_OK(env_->NewWritableFile("/dir/f", &writable_file)); + ASSERT_OK(writable_file->Append("hello ")); + ASSERT_OK(writable_file->Append("world")); + delete writable_file; + + // Read sequentially. + ASSERT_OK(env_->NewSequentialFile("/dir/f", &seq_file)); + ASSERT_OK(seq_file->Read(5, &result, scratch)); // Read "hello". + ASSERT_EQ(0, result.compare("hello")); + ASSERT_OK(seq_file->Skip(1)); + ASSERT_OK(seq_file->Read(1000, &result, scratch)); // Read "world". + ASSERT_EQ(0, result.compare("world")); + ASSERT_OK(seq_file->Read(1000, &result, scratch)); // Try reading past EOF. + ASSERT_EQ(0, result.size()); + ASSERT_OK(seq_file->Skip(100)); // Try to skip past end of file. + ASSERT_OK(seq_file->Read(1000, &result, scratch)); + ASSERT_EQ(0, result.size()); + delete seq_file; + + // Random reads. + ASSERT_OK(env_->NewRandomAccessFile("/dir/f", &rand_file)); + ASSERT_OK(rand_file->Read(6, 5, &result, scratch)); // Read "world". + ASSERT_EQ(0, result.compare("world")); + ASSERT_OK(rand_file->Read(0, 5, &result, scratch)); // Read "hello". + ASSERT_EQ(0, result.compare("hello")); + ASSERT_OK(rand_file->Read(10, 100, &result, scratch)); // Read "d". + ASSERT_EQ(0, result.compare("d")); + + // Too high offset. + ASSERT_TRUE(!rand_file->Read(1000, 5, &result, scratch).ok()); + delete rand_file; +} + +TEST(MemEnvTest, Locks) { + FileLock* lock; + + // These are no-ops, but we test they return success. + ASSERT_OK(env_->LockFile("some file", &lock)); + ASSERT_OK(env_->UnlockFile(lock)); +} + +TEST(MemEnvTest, Misc) { + std::string test_dir; + ASSERT_OK(env_->GetTestDirectory(&test_dir)); + ASSERT_TRUE(!test_dir.empty()); + + WritableFile* writable_file; + ASSERT_OK(env_->NewWritableFile("/a/b", &writable_file)); + + // These are no-ops, but we test they return success. + ASSERT_OK(writable_file->Sync()); + ASSERT_OK(writable_file->Flush()); + ASSERT_OK(writable_file->Close()); + delete writable_file; +} + +TEST(MemEnvTest, LargeWrite) { + const size_t kWriteSize = 300 * 1024; + char* scratch = new char[kWriteSize * 2]; + + std::string write_data; + for (size_t i = 0; i < kWriteSize; ++i) { + write_data.append(1, static_cast(i)); + } + + WritableFile* writable_file; + ASSERT_OK(env_->NewWritableFile("/dir/f", &writable_file)); + ASSERT_OK(writable_file->Append("foo")); + ASSERT_OK(writable_file->Append(write_data)); + delete writable_file; + + SequentialFile* seq_file; + Slice result; + ASSERT_OK(env_->NewSequentialFile("/dir/f", &seq_file)); + ASSERT_OK(seq_file->Read(3, &result, scratch)); // Read "foo". + ASSERT_EQ(0, result.compare("foo")); + + size_t read = 0; + std::string read_data; + while (read < kWriteSize) { + ASSERT_OK(seq_file->Read(kWriteSize - read, &result, scratch)); + read_data.append(result.data(), result.size()); + read += result.size(); + } + ASSERT_TRUE(write_data == read_data); + delete seq_file; + delete [] scratch; +} + +TEST(MemEnvTest, DBTest) { + Options options; + options.create_if_missing = true; + options.env = env_; + DB* db; + + const Slice keys[] = {Slice("aaa"), Slice("bbb"), Slice("ccc")}; + const Slice vals[] = {Slice("foo"), Slice("bar"), Slice("baz")}; + + ASSERT_OK(DB::Open(options, "/dir/db", &db)); + for (size_t i = 0; i < 3; ++i) { + ASSERT_OK(db->Put(WriteOptions(), keys[i], vals[i])); + } + + for (size_t i = 0; i < 3; ++i) { + std::string res; + ASSERT_OK(db->Get(ReadOptions(), keys[i], &res)); + ASSERT_TRUE(res == vals[i]); + } + + Iterator* iterator = db->NewIterator(ReadOptions()); + iterator->SeekToFirst(); + for (size_t i = 0; i < 3; ++i) { + ASSERT_TRUE(iterator->Valid()); + ASSERT_TRUE(keys[i] == iterator->key()); + ASSERT_TRUE(vals[i] == iterator->value()); + iterator->Next(); + } + ASSERT_TRUE(!iterator->Valid()); + delete iterator; + + DBImpl* dbi = reinterpret_cast(db); + ASSERT_OK(dbi->TEST_CompactMemTable()); + + for (size_t i = 0; i < 3; ++i) { + std::string res; + ASSERT_OK(db->Get(ReadOptions(), keys[i], &res)); + ASSERT_TRUE(res == vals[i]); + } + + delete db; +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/include/leveldb/c.h b/src/leveldb/include/leveldb/c.h new file mode 100644 index 0000000..1fa5886 --- /dev/null +++ b/src/leveldb/include/leveldb/c.h @@ -0,0 +1,291 @@ +/* Copyright (c) 2011 The LevelDB Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. See the AUTHORS file for names of contributors. + + C bindings for leveldb. May be useful as a stable ABI that can be + used by programs that keep leveldb in a shared library, or for + a JNI api. + + Does not support: + . getters for the option types + . custom comparators that implement key shortening + . capturing post-write-snapshot + . custom iter, db, env, cache implementations using just the C bindings + + Some conventions: + + (1) We expose just opaque struct pointers and functions to clients. + This allows us to change internal representations without having to + recompile clients. + + (2) For simplicity, there is no equivalent to the Slice type. Instead, + the caller has to pass the pointer and length as separate + arguments. + + (3) Errors are represented by a null-terminated c string. NULL + means no error. All operations that can raise an error are passed + a "char** errptr" as the last argument. One of the following must + be true on entry: + *errptr == NULL + *errptr points to a malloc()ed null-terminated error message + (On Windows, *errptr must have been malloc()-ed by this library.) + On success, a leveldb routine leaves *errptr unchanged. + On failure, leveldb frees the old value of *errptr and + set *errptr to a malloc()ed error message. + + (4) Bools have the type unsigned char (0 == false; rest == true) + + (5) All of the pointer arguments must be non-NULL. +*/ + +#ifndef STORAGE_LEVELDB_INCLUDE_C_H_ +#define STORAGE_LEVELDB_INCLUDE_C_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +/* Exported types */ + +typedef struct leveldb_t leveldb_t; +typedef struct leveldb_cache_t leveldb_cache_t; +typedef struct leveldb_comparator_t leveldb_comparator_t; +typedef struct leveldb_env_t leveldb_env_t; +typedef struct leveldb_filelock_t leveldb_filelock_t; +typedef struct leveldb_filterpolicy_t leveldb_filterpolicy_t; +typedef struct leveldb_iterator_t leveldb_iterator_t; +typedef struct leveldb_logger_t leveldb_logger_t; +typedef struct leveldb_options_t leveldb_options_t; +typedef struct leveldb_randomfile_t leveldb_randomfile_t; +typedef struct leveldb_readoptions_t leveldb_readoptions_t; +typedef struct leveldb_seqfile_t leveldb_seqfile_t; +typedef struct leveldb_snapshot_t leveldb_snapshot_t; +typedef struct leveldb_writablefile_t leveldb_writablefile_t; +typedef struct leveldb_writebatch_t leveldb_writebatch_t; +typedef struct leveldb_writeoptions_t leveldb_writeoptions_t; + +/* DB operations */ + +extern leveldb_t* leveldb_open( + const leveldb_options_t* options, + const char* name, + char** errptr); + +extern void leveldb_close(leveldb_t* db); + +extern void leveldb_put( + leveldb_t* db, + const leveldb_writeoptions_t* options, + const char* key, size_t keylen, + const char* val, size_t vallen, + char** errptr); + +extern void leveldb_delete( + leveldb_t* db, + const leveldb_writeoptions_t* options, + const char* key, size_t keylen, + char** errptr); + +extern void leveldb_write( + leveldb_t* db, + const leveldb_writeoptions_t* options, + leveldb_writebatch_t* batch, + char** errptr); + +/* Returns NULL if not found. A malloc()ed array otherwise. + Stores the length of the array in *vallen. */ +extern char* leveldb_get( + leveldb_t* db, + const leveldb_readoptions_t* options, + const char* key, size_t keylen, + size_t* vallen, + char** errptr); + +extern leveldb_iterator_t* leveldb_create_iterator( + leveldb_t* db, + const leveldb_readoptions_t* options); + +extern const leveldb_snapshot_t* leveldb_create_snapshot( + leveldb_t* db); + +extern void leveldb_release_snapshot( + leveldb_t* db, + const leveldb_snapshot_t* snapshot); + +/* Returns NULL if property name is unknown. + Else returns a pointer to a malloc()-ed null-terminated value. */ +extern char* leveldb_property_value( + leveldb_t* db, + const char* propname); + +extern void leveldb_approximate_sizes( + leveldb_t* db, + int num_ranges, + const char* const* range_start_key, const size_t* range_start_key_len, + const char* const* range_limit_key, const size_t* range_limit_key_len, + uint64_t* sizes); + +extern void leveldb_compact_range( + leveldb_t* db, + const char* start_key, size_t start_key_len, + const char* limit_key, size_t limit_key_len); + +/* Management operations */ + +extern void leveldb_destroy_db( + const leveldb_options_t* options, + const char* name, + char** errptr); + +extern void leveldb_repair_db( + const leveldb_options_t* options, + const char* name, + char** errptr); + +/* Iterator */ + +extern void leveldb_iter_destroy(leveldb_iterator_t*); +extern unsigned char leveldb_iter_valid(const leveldb_iterator_t*); +extern void leveldb_iter_seek_to_first(leveldb_iterator_t*); +extern void leveldb_iter_seek_to_last(leveldb_iterator_t*); +extern void leveldb_iter_seek(leveldb_iterator_t*, const char* k, size_t klen); +extern void leveldb_iter_next(leveldb_iterator_t*); +extern void leveldb_iter_prev(leveldb_iterator_t*); +extern const char* leveldb_iter_key(const leveldb_iterator_t*, size_t* klen); +extern const char* leveldb_iter_value(const leveldb_iterator_t*, size_t* vlen); +extern void leveldb_iter_get_error(const leveldb_iterator_t*, char** errptr); + +/* Write batch */ + +extern leveldb_writebatch_t* leveldb_writebatch_create(); +extern void leveldb_writebatch_destroy(leveldb_writebatch_t*); +extern void leveldb_writebatch_clear(leveldb_writebatch_t*); +extern void leveldb_writebatch_put( + leveldb_writebatch_t*, + const char* key, size_t klen, + const char* val, size_t vlen); +extern void leveldb_writebatch_delete( + leveldb_writebatch_t*, + const char* key, size_t klen); +extern void leveldb_writebatch_iterate( + leveldb_writebatch_t*, + void* state, + void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen), + void (*deleted)(void*, const char* k, size_t klen)); + +/* Options */ + +extern leveldb_options_t* leveldb_options_create(); +extern void leveldb_options_destroy(leveldb_options_t*); +extern void leveldb_options_set_comparator( + leveldb_options_t*, + leveldb_comparator_t*); +extern void leveldb_options_set_filter_policy( + leveldb_options_t*, + leveldb_filterpolicy_t*); +extern void leveldb_options_set_create_if_missing( + leveldb_options_t*, unsigned char); +extern void leveldb_options_set_error_if_exists( + leveldb_options_t*, unsigned char); +extern void leveldb_options_set_paranoid_checks( + leveldb_options_t*, unsigned char); +extern void leveldb_options_set_env(leveldb_options_t*, leveldb_env_t*); +extern void leveldb_options_set_info_log(leveldb_options_t*, leveldb_logger_t*); +extern void leveldb_options_set_write_buffer_size(leveldb_options_t*, size_t); +extern void leveldb_options_set_max_open_files(leveldb_options_t*, int); +extern void leveldb_options_set_cache(leveldb_options_t*, leveldb_cache_t*); +extern void leveldb_options_set_block_size(leveldb_options_t*, size_t); +extern void leveldb_options_set_block_restart_interval(leveldb_options_t*, int); + +enum { + leveldb_no_compression = 0, + leveldb_snappy_compression = 1 +}; +extern void leveldb_options_set_compression(leveldb_options_t*, int); + +/* Comparator */ + +extern leveldb_comparator_t* leveldb_comparator_create( + void* state, + void (*destructor)(void*), + int (*compare)( + void*, + const char* a, size_t alen, + const char* b, size_t blen), + const char* (*name)(void*)); +extern void leveldb_comparator_destroy(leveldb_comparator_t*); + +/* Filter policy */ + +extern leveldb_filterpolicy_t* leveldb_filterpolicy_create( + void* state, + void (*destructor)(void*), + char* (*create_filter)( + void*, + const char* const* key_array, const size_t* key_length_array, + int num_keys, + size_t* filter_length), + unsigned char (*key_may_match)( + void*, + const char* key, size_t length, + const char* filter, size_t filter_length), + const char* (*name)(void*)); +extern void leveldb_filterpolicy_destroy(leveldb_filterpolicy_t*); + +extern leveldb_filterpolicy_t* leveldb_filterpolicy_create_bloom( + int bits_per_key); + +/* Read options */ + +extern leveldb_readoptions_t* leveldb_readoptions_create(); +extern void leveldb_readoptions_destroy(leveldb_readoptions_t*); +extern void leveldb_readoptions_set_verify_checksums( + leveldb_readoptions_t*, + unsigned char); +extern void leveldb_readoptions_set_fill_cache( + leveldb_readoptions_t*, unsigned char); +extern void leveldb_readoptions_set_snapshot( + leveldb_readoptions_t*, + const leveldb_snapshot_t*); + +/* Write options */ + +extern leveldb_writeoptions_t* leveldb_writeoptions_create(); +extern void leveldb_writeoptions_destroy(leveldb_writeoptions_t*); +extern void leveldb_writeoptions_set_sync( + leveldb_writeoptions_t*, unsigned char); + +/* Cache */ + +extern leveldb_cache_t* leveldb_cache_create_lru(size_t capacity); +extern void leveldb_cache_destroy(leveldb_cache_t* cache); + +/* Env */ + +extern leveldb_env_t* leveldb_create_default_env(); +extern void leveldb_env_destroy(leveldb_env_t*); + +/* Utility */ + +/* Calls free(ptr). + REQUIRES: ptr was malloc()-ed and returned by one of the routines + in this file. Note that in certain cases (typically on Windows), you + may need to call this routine instead of free(ptr) to dispose of + malloc()-ed memory returned by this library. */ +extern void leveldb_free(void* ptr); + +/* Return the major version number for this release. */ +extern int leveldb_major_version(); + +/* Return the minor version number for this release. */ +extern int leveldb_minor_version(); + +#ifdef __cplusplus +} /* end extern "C" */ +#endif + +#endif /* STORAGE_LEVELDB_INCLUDE_C_H_ */ diff --git a/src/leveldb/include/leveldb/cache.h b/src/leveldb/include/leveldb/cache.h new file mode 100644 index 0000000..5e3b476 --- /dev/null +++ b/src/leveldb/include/leveldb/cache.h @@ -0,0 +1,99 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// A Cache is an interface that maps keys to values. It has internal +// synchronization and may be safely accessed concurrently from +// multiple threads. It may automatically evict entries to make room +// for new entries. Values have a specified charge against the cache +// capacity. For example, a cache where the values are variable +// length strings, may use the length of the string as the charge for +// the string. +// +// A builtin cache implementation with a least-recently-used eviction +// policy is provided. Clients may use their own implementations if +// they want something more sophisticated (like scan-resistance, a +// custom eviction policy, variable cache sizing, etc.) + +#ifndef STORAGE_LEVELDB_INCLUDE_CACHE_H_ +#define STORAGE_LEVELDB_INCLUDE_CACHE_H_ + +#include +#include "leveldb/slice.h" + +namespace leveldb { + +class Cache; + +// Create a new cache with a fixed size capacity. This implementation +// of Cache uses a least-recently-used eviction policy. +extern Cache* NewLRUCache(size_t capacity); + +class Cache { + public: + Cache() { } + + // Destroys all existing entries by calling the "deleter" + // function that was passed to the constructor. + virtual ~Cache(); + + // Opaque handle to an entry stored in the cache. + struct Handle { }; + + // Insert a mapping from key->value into the cache and assign it + // the specified charge against the total cache capacity. + // + // Returns a handle that corresponds to the mapping. The caller + // must call this->Release(handle) when the returned mapping is no + // longer needed. + // + // When the inserted entry is no longer needed, the key and + // value will be passed to "deleter". + virtual Handle* Insert(const Slice& key, void* value, size_t charge, + void (*deleter)(const Slice& key, void* value)) = 0; + + // If the cache has no mapping for "key", returns NULL. + // + // Else return a handle that corresponds to the mapping. The caller + // must call this->Release(handle) when the returned mapping is no + // longer needed. + virtual Handle* Lookup(const Slice& key) = 0; + + // Release a mapping returned by a previous Lookup(). + // REQUIRES: handle must not have been released yet. + // REQUIRES: handle must have been returned by a method on *this. + virtual void Release(Handle* handle) = 0; + + // Return the value encapsulated in a handle returned by a + // successful Lookup(). + // REQUIRES: handle must not have been released yet. + // REQUIRES: handle must have been returned by a method on *this. + virtual void* Value(Handle* handle) = 0; + + // If the cache contains entry for key, erase it. Note that the + // underlying entry will be kept around until all existing handles + // to it have been released. + virtual void Erase(const Slice& key) = 0; + + // Return a new numeric id. May be used by multiple clients who are + // sharing the same cache to partition the key space. Typically the + // client will allocate a new id at startup and prepend the id to + // its cache keys. + virtual uint64_t NewId() = 0; + + private: + void LRU_Remove(Handle* e); + void LRU_Append(Handle* e); + void Unref(Handle* e); + + struct Rep; + Rep* rep_; + + // No copying allowed + Cache(const Cache&); + void operator=(const Cache&); +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_CACHE_H_ diff --git a/src/leveldb/include/leveldb/comparator.h b/src/leveldb/include/leveldb/comparator.h new file mode 100644 index 0000000..556b984 --- /dev/null +++ b/src/leveldb/include/leveldb/comparator.h @@ -0,0 +1,63 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_ +#define STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_ + +#include + +namespace leveldb { + +class Slice; + +// A Comparator object provides a total order across slices that are +// used as keys in an sstable or a database. A Comparator implementation +// must be thread-safe since leveldb may invoke its methods concurrently +// from multiple threads. +class Comparator { + public: + virtual ~Comparator(); + + // Three-way comparison. Returns value: + // < 0 iff "a" < "b", + // == 0 iff "a" == "b", + // > 0 iff "a" > "b" + virtual int Compare(const Slice& a, const Slice& b) const = 0; + + // The name of the comparator. Used to check for comparator + // mismatches (i.e., a DB created with one comparator is + // accessed using a different comparator. + // + // The client of this package should switch to a new name whenever + // the comparator implementation changes in a way that will cause + // the relative ordering of any two keys to change. + // + // Names starting with "leveldb." are reserved and should not be used + // by any clients of this package. + virtual const char* Name() const = 0; + + // Advanced functions: these are used to reduce the space requirements + // for internal data structures like index blocks. + + // If *start < limit, changes *start to a short string in [start,limit). + // Simple comparator implementations may return with *start unchanged, + // i.e., an implementation of this method that does nothing is correct. + virtual void FindShortestSeparator( + std::string* start, + const Slice& limit) const = 0; + + // Changes *key to a short string >= *key. + // Simple comparator implementations may return with *key unchanged, + // i.e., an implementation of this method that does nothing is correct. + virtual void FindShortSuccessor(std::string* key) const = 0; +}; + +// Return a builtin comparator that uses lexicographic byte-wise +// ordering. The result remains the property of this module and +// must not be deleted. +extern const Comparator* BytewiseComparator(); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_INCLUDE_COMPARATOR_H_ diff --git a/src/leveldb/include/leveldb/db.h b/src/leveldb/include/leveldb/db.h new file mode 100644 index 0000000..5ffb29d --- /dev/null +++ b/src/leveldb/include/leveldb/db.h @@ -0,0 +1,161 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_INCLUDE_DB_H_ +#define STORAGE_LEVELDB_INCLUDE_DB_H_ + +#include +#include +#include "leveldb/iterator.h" +#include "leveldb/options.h" + +namespace leveldb { + +// Update Makefile if you change these +static const int kMajorVersion = 1; +static const int kMinorVersion = 15; + +struct Options; +struct ReadOptions; +struct WriteOptions; +class WriteBatch; + +// Abstract handle to particular state of a DB. +// A Snapshot is an immutable object and can therefore be safely +// accessed from multiple threads without any external synchronization. +class Snapshot { + protected: + virtual ~Snapshot(); +}; + +// A range of keys +struct Range { + Slice start; // Included in the range + Slice limit; // Not included in the range + + Range() { } + Range(const Slice& s, const Slice& l) : start(s), limit(l) { } +}; + +// A DB is a persistent ordered map from keys to values. +// A DB is safe for concurrent access from multiple threads without +// any external synchronization. +class DB { + public: + // Open the database with the specified "name". + // Stores a pointer to a heap-allocated database in *dbptr and returns + // OK on success. + // Stores NULL in *dbptr and returns a non-OK status on error. + // Caller should delete *dbptr when it is no longer needed. + static Status Open(const Options& options, + const std::string& name, + DB** dbptr); + + DB() { } + virtual ~DB(); + + // Set the database entry for "key" to "value". Returns OK on success, + // and a non-OK status on error. + // Note: consider setting options.sync = true. + virtual Status Put(const WriteOptions& options, + const Slice& key, + const Slice& value) = 0; + + // Remove the database entry (if any) for "key". Returns OK on + // success, and a non-OK status on error. It is not an error if "key" + // did not exist in the database. + // Note: consider setting options.sync = true. + virtual Status Delete(const WriteOptions& options, const Slice& key) = 0; + + // Apply the specified updates to the database. + // Returns OK on success, non-OK on failure. + // Note: consider setting options.sync = true. + virtual Status Write(const WriteOptions& options, WriteBatch* updates) = 0; + + // If the database contains an entry for "key" store the + // corresponding value in *value and return OK. + // + // If there is no entry for "key" leave *value unchanged and return + // a status for which Status::IsNotFound() returns true. + // + // May return some other Status on an error. + virtual Status Get(const ReadOptions& options, + const Slice& key, std::string* value) = 0; + + // Return a heap-allocated iterator over the contents of the database. + // The result of NewIterator() is initially invalid (caller must + // call one of the Seek methods on the iterator before using it). + // + // Caller should delete the iterator when it is no longer needed. + // The returned iterator should be deleted before this db is deleted. + virtual Iterator* NewIterator(const ReadOptions& options) = 0; + + // Return a handle to the current DB state. Iterators created with + // this handle will all observe a stable snapshot of the current DB + // state. The caller must call ReleaseSnapshot(result) when the + // snapshot is no longer needed. + virtual const Snapshot* GetSnapshot() = 0; + + // Release a previously acquired snapshot. The caller must not + // use "snapshot" after this call. + virtual void ReleaseSnapshot(const Snapshot* snapshot) = 0; + + // DB implementations can export properties about their state + // via this method. If "property" is a valid property understood by this + // DB implementation, fills "*value" with its current value and returns + // true. Otherwise returns false. + // + // + // Valid property names include: + // + // "leveldb.num-files-at-level" - return the number of files at level , + // where is an ASCII representation of a level number (e.g. "0"). + // "leveldb.stats" - returns a multi-line string that describes statistics + // about the internal operation of the DB. + // "leveldb.sstables" - returns a multi-line string that describes all + // of the sstables that make up the db contents. + virtual bool GetProperty(const Slice& property, std::string* value) = 0; + + // For each i in [0,n-1], store in "sizes[i]", the approximate + // file system space used by keys in "[range[i].start .. range[i].limit)". + // + // Note that the returned sizes measure file system space usage, so + // if the user data compresses by a factor of ten, the returned + // sizes will be one-tenth the size of the corresponding user data size. + // + // The results may not include the sizes of recently written data. + virtual void GetApproximateSizes(const Range* range, int n, + uint64_t* sizes) = 0; + + // Compact the underlying storage for the key range [*begin,*end]. + // In particular, deleted and overwritten versions are discarded, + // and the data is rearranged to reduce the cost of operations + // needed to access the data. This operation should typically only + // be invoked by users who understand the underlying implementation. + // + // begin==NULL is treated as a key before all keys in the database. + // end==NULL is treated as a key after all keys in the database. + // Therefore the following call will compact the entire database: + // db->CompactRange(NULL, NULL); + virtual void CompactRange(const Slice* begin, const Slice* end) = 0; + + private: + // No copying allowed + DB(const DB&); + void operator=(const DB&); +}; + +// Destroy the contents of the specified database. +// Be very careful using this method. +Status DestroyDB(const std::string& name, const Options& options); + +// If a DB cannot be opened, you may attempt to call this method to +// resurrect as much of the contents of the database as possible. +// Some data may be lost, so be careful when calling this function +// on a database that contains important information. +Status RepairDB(const std::string& dbname, const Options& options); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_INCLUDE_DB_H_ diff --git a/src/leveldb/include/leveldb/env.h b/src/leveldb/include/leveldb/env.h new file mode 100644 index 0000000..b2072d0 --- /dev/null +++ b/src/leveldb/include/leveldb/env.h @@ -0,0 +1,333 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// An Env is an interface used by the leveldb implementation to access +// operating system functionality like the filesystem etc. Callers +// may wish to provide a custom Env object when opening a database to +// get fine gain control; e.g., to rate limit file system operations. +// +// All Env implementations are safe for concurrent access from +// multiple threads without any external synchronization. + +#ifndef STORAGE_LEVELDB_INCLUDE_ENV_H_ +#define STORAGE_LEVELDB_INCLUDE_ENV_H_ + +#include +#include +#include +#include +#include "leveldb/status.h" + +namespace leveldb { + +class FileLock; +class Logger; +class RandomAccessFile; +class SequentialFile; +class Slice; +class WritableFile; + +class Env { + public: + Env() { } + virtual ~Env(); + + // Return a default environment suitable for the current operating + // system. Sophisticated users may wish to provide their own Env + // implementation instead of relying on this default environment. + // + // The result of Default() belongs to leveldb and must never be deleted. + static Env* Default(); + + // Create a brand new sequentially-readable file with the specified name. + // On success, stores a pointer to the new file in *result and returns OK. + // On failure stores NULL in *result and returns non-OK. If the file does + // not exist, returns a non-OK status. + // + // The returned file will only be accessed by one thread at a time. + virtual Status NewSequentialFile(const std::string& fname, + SequentialFile** result) = 0; + + // Create a brand new random access read-only file with the + // specified name. On success, stores a pointer to the new file in + // *result and returns OK. On failure stores NULL in *result and + // returns non-OK. If the file does not exist, returns a non-OK + // status. + // + // The returned file may be concurrently accessed by multiple threads. + virtual Status NewRandomAccessFile(const std::string& fname, + RandomAccessFile** result) = 0; + + // Create an object that writes to a new file with the specified + // name. Deletes any existing file with the same name and creates a + // new file. On success, stores a pointer to the new file in + // *result and returns OK. On failure stores NULL in *result and + // returns non-OK. + // + // The returned file will only be accessed by one thread at a time. + virtual Status NewWritableFile(const std::string& fname, + WritableFile** result) = 0; + + // Returns true iff the named file exists. + virtual bool FileExists(const std::string& fname) = 0; + + // Store in *result the names of the children of the specified directory. + // The names are relative to "dir". + // Original contents of *results are dropped. + virtual Status GetChildren(const std::string& dir, + std::vector* result) = 0; + + // Delete the named file. + virtual Status DeleteFile(const std::string& fname) = 0; + + // Create the specified directory. + virtual Status CreateDir(const std::string& dirname) = 0; + + // Delete the specified directory. + virtual Status DeleteDir(const std::string& dirname) = 0; + + // Store the size of fname in *file_size. + virtual Status GetFileSize(const std::string& fname, uint64_t* file_size) = 0; + + // Rename file src to target. + virtual Status RenameFile(const std::string& src, + const std::string& target) = 0; + + // Lock the specified file. Used to prevent concurrent access to + // the same db by multiple processes. On failure, stores NULL in + // *lock and returns non-OK. + // + // On success, stores a pointer to the object that represents the + // acquired lock in *lock and returns OK. The caller should call + // UnlockFile(*lock) to release the lock. If the process exits, + // the lock will be automatically released. + // + // If somebody else already holds the lock, finishes immediately + // with a failure. I.e., this call does not wait for existing locks + // to go away. + // + // May create the named file if it does not already exist. + virtual Status LockFile(const std::string& fname, FileLock** lock) = 0; + + // Release the lock acquired by a previous successful call to LockFile. + // REQUIRES: lock was returned by a successful LockFile() call + // REQUIRES: lock has not already been unlocked. + virtual Status UnlockFile(FileLock* lock) = 0; + + // Arrange to run "(*function)(arg)" once in a background thread. + // + // "function" may run in an unspecified thread. Multiple functions + // added to the same Env may run concurrently in different threads. + // I.e., the caller may not assume that background work items are + // serialized. + virtual void Schedule( + void (*function)(void* arg), + void* arg) = 0; + + // Start a new thread, invoking "function(arg)" within the new thread. + // When "function(arg)" returns, the thread will be destroyed. + virtual void StartThread(void (*function)(void* arg), void* arg) = 0; + + // *path is set to a temporary directory that can be used for testing. It may + // or many not have just been created. The directory may or may not differ + // between runs of the same process, but subsequent calls will return the + // same directory. + virtual Status GetTestDirectory(std::string* path) = 0; + + // Create and return a log file for storing informational messages. + virtual Status NewLogger(const std::string& fname, Logger** result) = 0; + + // Returns the number of micro-seconds since some fixed point in time. Only + // useful for computing deltas of time. + virtual uint64_t NowMicros() = 0; + + // Sleep/delay the thread for the perscribed number of micro-seconds. + virtual void SleepForMicroseconds(int micros) = 0; + + private: + // No copying allowed + Env(const Env&); + void operator=(const Env&); +}; + +// A file abstraction for reading sequentially through a file +class SequentialFile { + public: + SequentialFile() { } + virtual ~SequentialFile(); + + // Read up to "n" bytes from the file. "scratch[0..n-1]" may be + // written by this routine. Sets "*result" to the data that was + // read (including if fewer than "n" bytes were successfully read). + // May set "*result" to point at data in "scratch[0..n-1]", so + // "scratch[0..n-1]" must be live when "*result" is used. + // If an error was encountered, returns a non-OK status. + // + // REQUIRES: External synchronization + virtual Status Read(size_t n, Slice* result, char* scratch) = 0; + + // Skip "n" bytes from the file. This is guaranteed to be no + // slower that reading the same data, but may be faster. + // + // If end of file is reached, skipping will stop at the end of the + // file, and Skip will return OK. + // + // REQUIRES: External synchronization + virtual Status Skip(uint64_t n) = 0; + + private: + // No copying allowed + SequentialFile(const SequentialFile&); + void operator=(const SequentialFile&); +}; + +// A file abstraction for randomly reading the contents of a file. +class RandomAccessFile { + public: + RandomAccessFile() { } + virtual ~RandomAccessFile(); + + // Read up to "n" bytes from the file starting at "offset". + // "scratch[0..n-1]" may be written by this routine. Sets "*result" + // to the data that was read (including if fewer than "n" bytes were + // successfully read). May set "*result" to point at data in + // "scratch[0..n-1]", so "scratch[0..n-1]" must be live when + // "*result" is used. If an error was encountered, returns a non-OK + // status. + // + // Safe for concurrent use by multiple threads. + virtual Status Read(uint64_t offset, size_t n, Slice* result, + char* scratch) const = 0; + + private: + // No copying allowed + RandomAccessFile(const RandomAccessFile&); + void operator=(const RandomAccessFile&); +}; + +// A file abstraction for sequential writing. The implementation +// must provide buffering since callers may append small fragments +// at a time to the file. +class WritableFile { + public: + WritableFile() { } + virtual ~WritableFile(); + + virtual Status Append(const Slice& data) = 0; + virtual Status Close() = 0; + virtual Status Flush() = 0; + virtual Status Sync() = 0; + + private: + // No copying allowed + WritableFile(const WritableFile&); + void operator=(const WritableFile&); +}; + +// An interface for writing log messages. +class Logger { + public: + Logger() { } + virtual ~Logger(); + + // Write an entry to the log file with the specified format. + virtual void Logv(const char* format, va_list ap) = 0; + + private: + // No copying allowed + Logger(const Logger&); + void operator=(const Logger&); +}; + + +// Identifies a locked file. +class FileLock { + public: + FileLock() { } + virtual ~FileLock(); + private: + // No copying allowed + FileLock(const FileLock&); + void operator=(const FileLock&); +}; + +// Log the specified data to *info_log if info_log is non-NULL. +extern void Log(Logger* info_log, const char* format, ...) +# if defined(__GNUC__) || defined(__clang__) + __attribute__((__format__ (__printf__, 2, 3))) +# endif + ; + +// A utility routine: write "data" to the named file. +extern Status WriteStringToFile(Env* env, const Slice& data, + const std::string& fname); + +// A utility routine: read contents of named file into *data +extern Status ReadFileToString(Env* env, const std::string& fname, + std::string* data); + +// An implementation of Env that forwards all calls to another Env. +// May be useful to clients who wish to override just part of the +// functionality of another Env. +class EnvWrapper : public Env { + public: + // Initialize an EnvWrapper that delegates all calls to *t + explicit EnvWrapper(Env* t) : target_(t) { } + virtual ~EnvWrapper(); + + // Return the target to which this Env forwards all calls + Env* target() const { return target_; } + + // The following text is boilerplate that forwards all methods to target() + Status NewSequentialFile(const std::string& f, SequentialFile** r) { + return target_->NewSequentialFile(f, r); + } + Status NewRandomAccessFile(const std::string& f, RandomAccessFile** r) { + return target_->NewRandomAccessFile(f, r); + } + Status NewWritableFile(const std::string& f, WritableFile** r) { + return target_->NewWritableFile(f, r); + } + bool FileExists(const std::string& f) { return target_->FileExists(f); } + Status GetChildren(const std::string& dir, std::vector* r) { + return target_->GetChildren(dir, r); + } + Status DeleteFile(const std::string& f) { return target_->DeleteFile(f); } + Status CreateDir(const std::string& d) { return target_->CreateDir(d); } + Status DeleteDir(const std::string& d) { return target_->DeleteDir(d); } + Status GetFileSize(const std::string& f, uint64_t* s) { + return target_->GetFileSize(f, s); + } + Status RenameFile(const std::string& s, const std::string& t) { + return target_->RenameFile(s, t); + } + Status LockFile(const std::string& f, FileLock** l) { + return target_->LockFile(f, l); + } + Status UnlockFile(FileLock* l) { return target_->UnlockFile(l); } + void Schedule(void (*f)(void*), void* a) { + return target_->Schedule(f, a); + } + void StartThread(void (*f)(void*), void* a) { + return target_->StartThread(f, a); + } + virtual Status GetTestDirectory(std::string* path) { + return target_->GetTestDirectory(path); + } + virtual Status NewLogger(const std::string& fname, Logger** result) { + return target_->NewLogger(fname, result); + } + uint64_t NowMicros() { + return target_->NowMicros(); + } + void SleepForMicroseconds(int micros) { + target_->SleepForMicroseconds(micros); + } + private: + Env* target_; +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_INCLUDE_ENV_H_ diff --git a/src/leveldb/include/leveldb/filter_policy.h b/src/leveldb/include/leveldb/filter_policy.h new file mode 100644 index 0000000..1fba080 --- /dev/null +++ b/src/leveldb/include/leveldb/filter_policy.h @@ -0,0 +1,70 @@ +// Copyright (c) 2012 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// A database can be configured with a custom FilterPolicy object. +// This object is responsible for creating a small filter from a set +// of keys. These filters are stored in leveldb and are consulted +// automatically by leveldb to decide whether or not to read some +// information from disk. In many cases, a filter can cut down the +// number of disk seeks form a handful to a single disk seek per +// DB::Get() call. +// +// Most people will want to use the builtin bloom filter support (see +// NewBloomFilterPolicy() below). + +#ifndef STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_ +#define STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_ + +#include + +namespace leveldb { + +class Slice; + +class FilterPolicy { + public: + virtual ~FilterPolicy(); + + // Return the name of this policy. Note that if the filter encoding + // changes in an incompatible way, the name returned by this method + // must be changed. Otherwise, old incompatible filters may be + // passed to methods of this type. + virtual const char* Name() const = 0; + + // keys[0,n-1] contains a list of keys (potentially with duplicates) + // that are ordered according to the user supplied comparator. + // Append a filter that summarizes keys[0,n-1] to *dst. + // + // Warning: do not change the initial contents of *dst. Instead, + // append the newly constructed filter to *dst. + virtual void CreateFilter(const Slice* keys, int n, std::string* dst) + const = 0; + + // "filter" contains the data appended by a preceding call to + // CreateFilter() on this class. This method must return true if + // the key was in the list of keys passed to CreateFilter(). + // This method may return true or false if the key was not on the + // list, but it should aim to return false with a high probability. + virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const = 0; +}; + +// Return a new filter policy that uses a bloom filter with approximately +// the specified number of bits per key. A good value for bits_per_key +// is 10, which yields a filter with ~ 1% false positive rate. +// +// Callers must delete the result after any database that is using the +// result has been closed. +// +// Note: if you are using a custom comparator that ignores some parts +// of the keys being compared, you must not use NewBloomFilterPolicy() +// and must provide your own FilterPolicy that also ignores the +// corresponding parts of the keys. For example, if the comparator +// ignores trailing spaces, it would be incorrect to use a +// FilterPolicy (like NewBloomFilterPolicy) that does not ignore +// trailing spaces in keys. +extern const FilterPolicy* NewBloomFilterPolicy(int bits_per_key); + +} + +#endif // STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_ diff --git a/src/leveldb/include/leveldb/iterator.h b/src/leveldb/include/leveldb/iterator.h new file mode 100644 index 0000000..ad543eb --- /dev/null +++ b/src/leveldb/include/leveldb/iterator.h @@ -0,0 +1,100 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// An iterator yields a sequence of key/value pairs from a source. +// The following class defines the interface. Multiple implementations +// are provided by this library. In particular, iterators are provided +// to access the contents of a Table or a DB. +// +// Multiple threads can invoke const methods on an Iterator without +// external synchronization, but if any of the threads may call a +// non-const method, all threads accessing the same Iterator must use +// external synchronization. + +#ifndef STORAGE_LEVELDB_INCLUDE_ITERATOR_H_ +#define STORAGE_LEVELDB_INCLUDE_ITERATOR_H_ + +#include "leveldb/slice.h" +#include "leveldb/status.h" + +namespace leveldb { + +class Iterator { + public: + Iterator(); + virtual ~Iterator(); + + // An iterator is either positioned at a key/value pair, or + // not valid. This method returns true iff the iterator is valid. + virtual bool Valid() const = 0; + + // Position at the first key in the source. The iterator is Valid() + // after this call iff the source is not empty. + virtual void SeekToFirst() = 0; + + // Position at the last key in the source. The iterator is + // Valid() after this call iff the source is not empty. + virtual void SeekToLast() = 0; + + // Position at the first key in the source that at or past target + // The iterator is Valid() after this call iff the source contains + // an entry that comes at or past target. + virtual void Seek(const Slice& target) = 0; + + // Moves to the next entry in the source. After this call, Valid() is + // true iff the iterator was not positioned at the last entry in the source. + // REQUIRES: Valid() + virtual void Next() = 0; + + // Moves to the previous entry in the source. After this call, Valid() is + // true iff the iterator was not positioned at the first entry in source. + // REQUIRES: Valid() + virtual void Prev() = 0; + + // Return the key for the current entry. The underlying storage for + // the returned slice is valid only until the next modification of + // the iterator. + // REQUIRES: Valid() + virtual Slice key() const = 0; + + // Return the value for the current entry. The underlying storage for + // the returned slice is valid only until the next modification of + // the iterator. + // REQUIRES: !AtEnd() && !AtStart() + virtual Slice value() const = 0; + + // If an error has occurred, return it. Else return an ok status. + virtual Status status() const = 0; + + // Clients are allowed to register function/arg1/arg2 triples that + // will be invoked when this iterator is destroyed. + // + // Note that unlike all of the preceding methods, this method is + // not abstract and therefore clients should not override it. + typedef void (*CleanupFunction)(void* arg1, void* arg2); + void RegisterCleanup(CleanupFunction function, void* arg1, void* arg2); + + private: + struct Cleanup { + CleanupFunction function; + void* arg1; + void* arg2; + Cleanup* next; + }; + Cleanup cleanup_; + + // No copying allowed + Iterator(const Iterator&); + void operator=(const Iterator&); +}; + +// Return an empty iterator (yields nothing). +extern Iterator* NewEmptyIterator(); + +// Return an empty iterator with the specified status. +extern Iterator* NewErrorIterator(const Status& status); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_INCLUDE_ITERATOR_H_ diff --git a/src/leveldb/include/leveldb/options.h b/src/leveldb/include/leveldb/options.h new file mode 100644 index 0000000..fdda718 --- /dev/null +++ b/src/leveldb/include/leveldb/options.h @@ -0,0 +1,195 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_INCLUDE_OPTIONS_H_ +#define STORAGE_LEVELDB_INCLUDE_OPTIONS_H_ + +#include + +namespace leveldb { + +class Cache; +class Comparator; +class Env; +class FilterPolicy; +class Logger; +class Snapshot; + +// DB contents are stored in a set of blocks, each of which holds a +// sequence of key,value pairs. Each block may be compressed before +// being stored in a file. The following enum describes which +// compression method (if any) is used to compress a block. +enum CompressionType { + // NOTE: do not change the values of existing entries, as these are + // part of the persistent format on disk. + kNoCompression = 0x0, + kSnappyCompression = 0x1 +}; + +// Options to control the behavior of a database (passed to DB::Open) +struct Options { + // ------------------- + // Parameters that affect behavior + + // Comparator used to define the order of keys in the table. + // Default: a comparator that uses lexicographic byte-wise ordering + // + // REQUIRES: The client must ensure that the comparator supplied + // here has the same name and orders keys *exactly* the same as the + // comparator provided to previous open calls on the same DB. + const Comparator* comparator; + + // If true, the database will be created if it is missing. + // Default: false + bool create_if_missing; + + // If true, an error is raised if the database already exists. + // Default: false + bool error_if_exists; + + // If true, the implementation will do aggressive checking of the + // data it is processing and will stop early if it detects any + // errors. This may have unforeseen ramifications: for example, a + // corruption of one DB entry may cause a large number of entries to + // become unreadable or for the entire DB to become unopenable. + // Default: false + bool paranoid_checks; + + // Use the specified object to interact with the environment, + // e.g. to read/write files, schedule background work, etc. + // Default: Env::Default() + Env* env; + + // Any internal progress/error information generated by the db will + // be written to info_log if it is non-NULL, or to a file stored + // in the same directory as the DB contents if info_log is NULL. + // Default: NULL + Logger* info_log; + + // ------------------- + // Parameters that affect performance + + // Amount of data to build up in memory (backed by an unsorted log + // on disk) before converting to a sorted on-disk file. + // + // Larger values increase performance, especially during bulk loads. + // Up to two write buffers may be held in memory at the same time, + // so you may wish to adjust this parameter to control memory usage. + // Also, a larger write buffer will result in a longer recovery time + // the next time the database is opened. + // + // Default: 4MB + size_t write_buffer_size; + + // Number of open files that can be used by the DB. You may need to + // increase this if your database has a large working set (budget + // one open file per 2MB of working set). + // + // Default: 1000 + int max_open_files; + + // Control over blocks (user data is stored in a set of blocks, and + // a block is the unit of reading from disk). + + // If non-NULL, use the specified cache for blocks. + // If NULL, leveldb will automatically create and use an 8MB internal cache. + // Default: NULL + Cache* block_cache; + + // Approximate size of user data packed per block. Note that the + // block size specified here corresponds to uncompressed data. The + // actual size of the unit read from disk may be smaller if + // compression is enabled. This parameter can be changed dynamically. + // + // Default: 4K + size_t block_size; + + // Number of keys between restart points for delta encoding of keys. + // This parameter can be changed dynamically. Most clients should + // leave this parameter alone. + // + // Default: 16 + int block_restart_interval; + + // Compress blocks using the specified compression algorithm. This + // parameter can be changed dynamically. + // + // Default: kSnappyCompression, which gives lightweight but fast + // compression. + // + // Typical speeds of kSnappyCompression on an Intel(R) Core(TM)2 2.4GHz: + // ~200-500MB/s compression + // ~400-800MB/s decompression + // Note that these speeds are significantly faster than most + // persistent storage speeds, and therefore it is typically never + // worth switching to kNoCompression. Even if the input data is + // incompressible, the kSnappyCompression implementation will + // efficiently detect that and will switch to uncompressed mode. + CompressionType compression; + + // If non-NULL, use the specified filter policy to reduce disk reads. + // Many applications will benefit from passing the result of + // NewBloomFilterPolicy() here. + // + // Default: NULL + const FilterPolicy* filter_policy; + + // Create an Options object with default values for all fields. + Options(); +}; + +// Options that control read operations +struct ReadOptions { + // If true, all data read from underlying storage will be + // verified against corresponding checksums. + // Default: false + bool verify_checksums; + + // Should the data read for this iteration be cached in memory? + // Callers may wish to set this field to false for bulk scans. + // Default: true + bool fill_cache; + + // If "snapshot" is non-NULL, read as of the supplied snapshot + // (which must belong to the DB that is being read and which must + // not have been released). If "snapshot" is NULL, use an impliicit + // snapshot of the state at the beginning of this read operation. + // Default: NULL + const Snapshot* snapshot; + + ReadOptions() + : verify_checksums(false), + fill_cache(true), + snapshot(NULL) { + } +}; + +// Options that control write operations +struct WriteOptions { + // If true, the write will be flushed from the operating system + // buffer cache (by calling WritableFile::Sync()) before the write + // is considered complete. If this flag is true, writes will be + // slower. + // + // If this flag is false, and the machine crashes, some recent + // writes may be lost. Note that if it is just the process that + // crashes (i.e., the machine does not reboot), no writes will be + // lost even if sync==false. + // + // In other words, a DB write with sync==false has similar + // crash semantics as the "write()" system call. A DB write + // with sync==true has similar crash semantics to a "write()" + // system call followed by "fsync()". + // + // Default: false + bool sync; + + WriteOptions() + : sync(false) { + } +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_INCLUDE_OPTIONS_H_ diff --git a/src/leveldb/include/leveldb/slice.h b/src/leveldb/include/leveldb/slice.h new file mode 100644 index 0000000..74ea8fa --- /dev/null +++ b/src/leveldb/include/leveldb/slice.h @@ -0,0 +1,109 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// Slice is a simple structure containing a pointer into some external +// storage and a size. The user of a Slice must ensure that the slice +// is not used after the corresponding external storage has been +// deallocated. +// +// Multiple threads can invoke const methods on a Slice without +// external synchronization, but if any of the threads may call a +// non-const method, all threads accessing the same Slice must use +// external synchronization. + +#ifndef STORAGE_LEVELDB_INCLUDE_SLICE_H_ +#define STORAGE_LEVELDB_INCLUDE_SLICE_H_ + +#include +#include +#include +#include + +namespace leveldb { + +class Slice { + public: + // Create an empty slice. + Slice() : data_(""), size_(0) { } + + // Create a slice that refers to d[0,n-1]. + Slice(const char* d, size_t n) : data_(d), size_(n) { } + + // Create a slice that refers to the contents of "s" + Slice(const std::string& s) : data_(s.data()), size_(s.size()) { } + + // Create a slice that refers to s[0,strlen(s)-1] + Slice(const char* s) : data_(s), size_(strlen(s)) { } + + // Return a pointer to the beginning of the referenced data + const char* data() const { return data_; } + + // Return the length (in bytes) of the referenced data + size_t size() const { return size_; } + + // Return true iff the length of the referenced data is zero + bool empty() const { return size_ == 0; } + + // Return the ith byte in the referenced data. + // REQUIRES: n < size() + char operator[](size_t n) const { + assert(n < size()); + return data_[n]; + } + + // Change this slice to refer to an empty array + void clear() { data_ = ""; size_ = 0; } + + // Drop the first "n" bytes from this slice. + void remove_prefix(size_t n) { + assert(n <= size()); + data_ += n; + size_ -= n; + } + + // Return a string that contains the copy of the referenced data. + std::string ToString() const { return std::string(data_, size_); } + + // Three-way comparison. Returns value: + // < 0 iff "*this" < "b", + // == 0 iff "*this" == "b", + // > 0 iff "*this" > "b" + int compare(const Slice& b) const; + + // Return true iff "x" is a prefix of "*this" + bool starts_with(const Slice& x) const { + return ((size_ >= x.size_) && + (memcmp(data_, x.data_, x.size_) == 0)); + } + + private: + const char* data_; + size_t size_; + + // Intentionally copyable +}; + +inline bool operator==(const Slice& x, const Slice& y) { + return ((x.size() == y.size()) && + (memcmp(x.data(), y.data(), x.size()) == 0)); +} + +inline bool operator!=(const Slice& x, const Slice& y) { + return !(x == y); +} + +inline int Slice::compare(const Slice& b) const { + const int min_len = (size_ < b.size_) ? size_ : b.size_; + int r = memcmp(data_, b.data_, min_len); + if (r == 0) { + if (size_ < b.size_) r = -1; + else if (size_ > b.size_) r = +1; + } + return r; +} + +} // namespace leveldb + + +#endif // STORAGE_LEVELDB_INCLUDE_SLICE_H_ diff --git a/src/leveldb/include/leveldb/status.h b/src/leveldb/include/leveldb/status.h new file mode 100644 index 0000000..11dbd4b --- /dev/null +++ b/src/leveldb/include/leveldb/status.h @@ -0,0 +1,106 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// A Status encapsulates the result of an operation. It may indicate success, +// or it may indicate an error with an associated error message. +// +// Multiple threads can invoke const methods on a Status without +// external synchronization, but if any of the threads may call a +// non-const method, all threads accessing the same Status must use +// external synchronization. + +#ifndef STORAGE_LEVELDB_INCLUDE_STATUS_H_ +#define STORAGE_LEVELDB_INCLUDE_STATUS_H_ + +#include +#include "leveldb/slice.h" + +namespace leveldb { + +class Status { + public: + // Create a success status. + Status() : state_(NULL) { } + ~Status() { delete[] state_; } + + // Copy the specified status. + Status(const Status& s); + void operator=(const Status& s); + + // Return a success status. + static Status OK() { return Status(); } + + // Return error status of an appropriate type. + static Status NotFound(const Slice& msg, const Slice& msg2 = Slice()) { + return Status(kNotFound, msg, msg2); + } + static Status Corruption(const Slice& msg, const Slice& msg2 = Slice()) { + return Status(kCorruption, msg, msg2); + } + static Status NotSupported(const Slice& msg, const Slice& msg2 = Slice()) { + return Status(kNotSupported, msg, msg2); + } + static Status InvalidArgument(const Slice& msg, const Slice& msg2 = Slice()) { + return Status(kInvalidArgument, msg, msg2); + } + static Status IOError(const Slice& msg, const Slice& msg2 = Slice()) { + return Status(kIOError, msg, msg2); + } + + // Returns true iff the status indicates success. + bool ok() const { return (state_ == NULL); } + + // Returns true iff the status indicates a NotFound error. + bool IsNotFound() const { return code() == kNotFound; } + + // Returns true iff the status indicates a Corruption error. + bool IsCorruption() const { return code() == kCorruption; } + + // Returns true iff the status indicates an IOError. + bool IsIOError() const { return code() == kIOError; } + + // Return a string representation of this status suitable for printing. + // Returns the string "OK" for success. + std::string ToString() const; + + private: + // OK status has a NULL state_. Otherwise, state_ is a new[] array + // of the following form: + // state_[0..3] == length of message + // state_[4] == code + // state_[5..] == message + const char* state_; + + enum Code { + kOk = 0, + kNotFound = 1, + kCorruption = 2, + kNotSupported = 3, + kInvalidArgument = 4, + kIOError = 5 + }; + + Code code() const { + return (state_ == NULL) ? kOk : static_cast(state_[4]); + } + + Status(Code code, const Slice& msg, const Slice& msg2); + static const char* CopyState(const char* s); +}; + +inline Status::Status(const Status& s) { + state_ = (s.state_ == NULL) ? NULL : CopyState(s.state_); +} +inline void Status::operator=(const Status& s) { + // The following condition catches both aliasing (when this == &s), + // and the common case where both s and *this are ok. + if (state_ != s.state_) { + delete[] state_; + state_ = (s.state_ == NULL) ? NULL : CopyState(s.state_); + } +} + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_INCLUDE_STATUS_H_ diff --git a/src/leveldb/include/leveldb/table.h b/src/leveldb/include/leveldb/table.h new file mode 100644 index 0000000..a9746c3 --- /dev/null +++ b/src/leveldb/include/leveldb/table.h @@ -0,0 +1,85 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_H_ +#define STORAGE_LEVELDB_INCLUDE_TABLE_H_ + +#include +#include "leveldb/iterator.h" + +namespace leveldb { + +class Block; +class BlockHandle; +class Footer; +struct Options; +class RandomAccessFile; +struct ReadOptions; +class TableCache; + +// A Table is a sorted map from strings to strings. Tables are +// immutable and persistent. A Table may be safely accessed from +// multiple threads without external synchronization. +class Table { + public: + // Attempt to open the table that is stored in bytes [0..file_size) + // of "file", and read the metadata entries necessary to allow + // retrieving data from the table. + // + // If successful, returns ok and sets "*table" to the newly opened + // table. The client should delete "*table" when no longer needed. + // If there was an error while initializing the table, sets "*table" + // to NULL and returns a non-ok status. Does not take ownership of + // "*source", but the client must ensure that "source" remains live + // for the duration of the returned table's lifetime. + // + // *file must remain live while this Table is in use. + static Status Open(const Options& options, + RandomAccessFile* file, + uint64_t file_size, + Table** table); + + ~Table(); + + // Returns a new iterator over the table contents. + // The result of NewIterator() is initially invalid (caller must + // call one of the Seek methods on the iterator before using it). + Iterator* NewIterator(const ReadOptions&) const; + + // Given a key, return an approximate byte offset in the file where + // the data for that key begins (or would begin if the key were + // present in the file). The returned value is in terms of file + // bytes, and so includes effects like compression of the underlying data. + // E.g., the approximate offset of the last key in the table will + // be close to the file length. + uint64_t ApproximateOffsetOf(const Slice& key) const; + + private: + struct Rep; + Rep* rep_; + + explicit Table(Rep* rep) { rep_ = rep; } + static Iterator* BlockReader(void*, const ReadOptions&, const Slice&); + + // Calls (*handle_result)(arg, ...) with the entry found after a call + // to Seek(key). May not make such a call if filter policy says + // that key is not present. + friend class TableCache; + Status InternalGet( + const ReadOptions&, const Slice& key, + void* arg, + void (*handle_result)(void* arg, const Slice& k, const Slice& v)); + + + void ReadMeta(const Footer& footer); + void ReadFilter(const Slice& filter_handle_value); + + // No copying allowed + Table(const Table&); + void operator=(const Table&); +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_INCLUDE_TABLE_H_ diff --git a/src/leveldb/include/leveldb/table_builder.h b/src/leveldb/include/leveldb/table_builder.h new file mode 100644 index 0000000..5fd1dc7 --- /dev/null +++ b/src/leveldb/include/leveldb/table_builder.h @@ -0,0 +1,92 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// TableBuilder provides the interface used to build a Table +// (an immutable and sorted map from keys to values). +// +// Multiple threads can invoke const methods on a TableBuilder without +// external synchronization, but if any of the threads may call a +// non-const method, all threads accessing the same TableBuilder must use +// external synchronization. + +#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_ +#define STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_ + +#include +#include "leveldb/options.h" +#include "leveldb/status.h" + +namespace leveldb { + +class BlockBuilder; +class BlockHandle; +class WritableFile; + +class TableBuilder { + public: + // Create a builder that will store the contents of the table it is + // building in *file. Does not close the file. It is up to the + // caller to close the file after calling Finish(). + TableBuilder(const Options& options, WritableFile* file); + + // REQUIRES: Either Finish() or Abandon() has been called. + ~TableBuilder(); + + // Change the options used by this builder. Note: only some of the + // option fields can be changed after construction. If a field is + // not allowed to change dynamically and its value in the structure + // passed to the constructor is different from its value in the + // structure passed to this method, this method will return an error + // without changing any fields. + Status ChangeOptions(const Options& options); + + // Add key,value to the table being constructed. + // REQUIRES: key is after any previously added key according to comparator. + // REQUIRES: Finish(), Abandon() have not been called + void Add(const Slice& key, const Slice& value); + + // Advanced operation: flush any buffered key/value pairs to file. + // Can be used to ensure that two adjacent entries never live in + // the same data block. Most clients should not need to use this method. + // REQUIRES: Finish(), Abandon() have not been called + void Flush(); + + // Return non-ok iff some error has been detected. + Status status() const; + + // Finish building the table. Stops using the file passed to the + // constructor after this function returns. + // REQUIRES: Finish(), Abandon() have not been called + Status Finish(); + + // Indicate that the contents of this builder should be abandoned. Stops + // using the file passed to the constructor after this function returns. + // If the caller is not going to call Finish(), it must call Abandon() + // before destroying this builder. + // REQUIRES: Finish(), Abandon() have not been called + void Abandon(); + + // Number of calls to Add() so far. + uint64_t NumEntries() const; + + // Size of the file generated so far. If invoked after a successful + // Finish() call, returns the size of the final generated file. + uint64_t FileSize() const; + + private: + bool ok() const { return status().ok(); } + void WriteBlock(BlockBuilder* block, BlockHandle* handle); + void WriteRawBlock(const Slice& data, CompressionType, BlockHandle* handle); + + struct Rep; + Rep* rep_; + + // No copying allowed + TableBuilder(const TableBuilder&); + void operator=(const TableBuilder&); +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_ diff --git a/src/leveldb/include/leveldb/write_batch.h b/src/leveldb/include/leveldb/write_batch.h new file mode 100644 index 0000000..ee9aab6 --- /dev/null +++ b/src/leveldb/include/leveldb/write_batch.h @@ -0,0 +1,64 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// WriteBatch holds a collection of updates to apply atomically to a DB. +// +// The updates are applied in the order in which they are added +// to the WriteBatch. For example, the value of "key" will be "v3" +// after the following batch is written: +// +// batch.Put("key", "v1"); +// batch.Delete("key"); +// batch.Put("key", "v2"); +// batch.Put("key", "v3"); +// +// Multiple threads can invoke const methods on a WriteBatch without +// external synchronization, but if any of the threads may call a +// non-const method, all threads accessing the same WriteBatch must use +// external synchronization. + +#ifndef STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_ +#define STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_ + +#include +#include "leveldb/status.h" + +namespace leveldb { + +class Slice; + +class WriteBatch { + public: + WriteBatch(); + ~WriteBatch(); + + // Store the mapping "key->value" in the database. + void Put(const Slice& key, const Slice& value); + + // If the database contains a mapping for "key", erase it. Else do nothing. + void Delete(const Slice& key); + + // Clear all updates buffered in this batch. + void Clear(); + + // Support for iterating over the contents of a batch. + class Handler { + public: + virtual ~Handler(); + virtual void Put(const Slice& key, const Slice& value) = 0; + virtual void Delete(const Slice& key) = 0; + }; + Status Iterate(Handler* handler) const; + + private: + friend class WriteBatchInternal; + + std::string rep_; // See comment in write_batch.cc for the format of rep_ + + // Intentionally copyable +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_ diff --git a/src/leveldb/issues/issue178_test.cc b/src/leveldb/issues/issue178_test.cc new file mode 100644 index 0000000..1b1cf8b --- /dev/null +++ b/src/leveldb/issues/issue178_test.cc @@ -0,0 +1,92 @@ +// Copyright (c) 2013 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +// Test for issue 178: a manual compaction causes deleted data to reappear. +#include +#include +#include + +#include "leveldb/db.h" +#include "leveldb/write_batch.h" +#include "util/testharness.h" + +namespace { + +const int kNumKeys = 1100000; + +std::string Key1(int i) { + char buf[100]; + snprintf(buf, sizeof(buf), "my_key_%d", i); + return buf; +} + +std::string Key2(int i) { + return Key1(i) + "_xxx"; +} + +class Issue178 { }; + +TEST(Issue178, Test) { + // Get rid of any state from an old run. + std::string dbpath = leveldb::test::TmpDir() + "/leveldb_cbug_test"; + DestroyDB(dbpath, leveldb::Options()); + + // Open database. Disable compression since it affects the creation + // of layers and the code below is trying to test against a very + // specific scenario. + leveldb::DB* db; + leveldb::Options db_options; + db_options.create_if_missing = true; + db_options.compression = leveldb::kNoCompression; + ASSERT_OK(leveldb::DB::Open(db_options, dbpath, &db)); + + // create first key range + leveldb::WriteBatch batch; + for (size_t i = 0; i < kNumKeys; i++) { + batch.Put(Key1(i), "value for range 1 key"); + } + ASSERT_OK(db->Write(leveldb::WriteOptions(), &batch)); + + // create second key range + batch.Clear(); + for (size_t i = 0; i < kNumKeys; i++) { + batch.Put(Key2(i), "value for range 2 key"); + } + ASSERT_OK(db->Write(leveldb::WriteOptions(), &batch)); + + // delete second key range + batch.Clear(); + for (size_t i = 0; i < kNumKeys; i++) { + batch.Delete(Key2(i)); + } + ASSERT_OK(db->Write(leveldb::WriteOptions(), &batch)); + + // compact database + std::string start_key = Key1(0); + std::string end_key = Key1(kNumKeys - 1); + leveldb::Slice least(start_key.data(), start_key.size()); + leveldb::Slice greatest(end_key.data(), end_key.size()); + + // commenting out the line below causes the example to work correctly + db->CompactRange(&least, &greatest); + + // count the keys + leveldb::Iterator* iter = db->NewIterator(leveldb::ReadOptions()); + size_t num_keys = 0; + for (iter->SeekToFirst(); iter->Valid(); iter->Next()) { + num_keys++; + } + delete iter; + ASSERT_EQ(kNumKeys, num_keys) << "Bad number of keys"; + + // close database + delete db; + DestroyDB(dbpath, leveldb::Options()); +} + +} // anonymous namespace + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/issues/issue200_test.cc b/src/leveldb/issues/issue200_test.cc new file mode 100644 index 0000000..1cec79f --- /dev/null +++ b/src/leveldb/issues/issue200_test.cc @@ -0,0 +1,59 @@ +// Copyright (c) 2013 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +// Test for issue 200: when iterator switches direction from backward +// to forward, the current key can be yielded unexpectedly if a new +// mutation has been added just before the current key. + +#include "leveldb/db.h" +#include "util/testharness.h" + +namespace leveldb { + +class Issue200 { }; + +TEST(Issue200, Test) { + // Get rid of any state from an old run. + std::string dbpath = test::TmpDir() + "/leveldb_issue200_test"; + DestroyDB(dbpath, Options()); + + DB *db; + Options options; + options.create_if_missing = true; + ASSERT_OK(DB::Open(options, dbpath, &db)); + + WriteOptions write_options; + ASSERT_OK(db->Put(write_options, "1", "b")); + ASSERT_OK(db->Put(write_options, "2", "c")); + ASSERT_OK(db->Put(write_options, "3", "d")); + ASSERT_OK(db->Put(write_options, "4", "e")); + ASSERT_OK(db->Put(write_options, "5", "f")); + + ReadOptions read_options; + Iterator *iter = db->NewIterator(read_options); + + // Add an element that should not be reflected in the iterator. + ASSERT_OK(db->Put(write_options, "25", "cd")); + + iter->Seek("5"); + ASSERT_EQ(iter->key().ToString(), "5"); + iter->Prev(); + ASSERT_EQ(iter->key().ToString(), "4"); + iter->Prev(); + ASSERT_EQ(iter->key().ToString(), "3"); + iter->Next(); + ASSERT_EQ(iter->key().ToString(), "4"); + iter->Next(); + ASSERT_EQ(iter->key().ToString(), "5"); + + delete iter; + delete db; + DestroyDB(dbpath, options); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/port/README b/src/leveldb/port/README new file mode 100644 index 0000000..422563e --- /dev/null +++ b/src/leveldb/port/README @@ -0,0 +1,10 @@ +This directory contains interfaces and implementations that isolate the +rest of the package from platform details. + +Code in the rest of the package includes "port.h" from this directory. +"port.h" in turn includes a platform specific "port_.h" file +that provides the platform specific implementation. + +See port_posix.h for an example of what must be provided in a platform +specific header file. + diff --git a/src/leveldb/port/atomic_pointer.h b/src/leveldb/port/atomic_pointer.h new file mode 100644 index 0000000..a9866b2 --- /dev/null +++ b/src/leveldb/port/atomic_pointer.h @@ -0,0 +1,224 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +// AtomicPointer provides storage for a lock-free pointer. +// Platform-dependent implementation of AtomicPointer: +// - If the platform provides a cheap barrier, we use it with raw pointers +// - If cstdatomic is present (on newer versions of gcc, it is), we use +// a cstdatomic-based AtomicPointer. However we prefer the memory +// barrier based version, because at least on a gcc 4.4 32-bit build +// on linux, we have encountered a buggy +// implementation. Also, some implementations are much +// slower than a memory-barrier based implementation (~16ns for +// based acquire-load vs. ~1ns for a barrier based +// acquire-load). +// This code is based on atomicops-internals-* in Google's perftools: +// http://code.google.com/p/google-perftools/source/browse/#svn%2Ftrunk%2Fsrc%2Fbase + +#ifndef PORT_ATOMIC_POINTER_H_ +#define PORT_ATOMIC_POINTER_H_ + +#include +#ifdef LEVELDB_CSTDATOMIC_PRESENT +#include +#endif +#ifdef OS_WIN +#include +#endif +#ifdef OS_MACOSX +#include +#endif + +#if defined(_M_X64) || defined(__x86_64__) +#define ARCH_CPU_X86_FAMILY 1 +#elif defined(_M_IX86) || defined(__i386__) || defined(__i386) +#define ARCH_CPU_X86_FAMILY 1 +#elif defined(__ARMEL__) +#define ARCH_CPU_ARM_FAMILY 1 +#elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__) +#define ARCH_CPU_PPC_FAMILY 1 +#endif + +namespace leveldb { +namespace port { + +// Define MemoryBarrier() if available +// Windows on x86 +#if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY) +// windows.h already provides a MemoryBarrier(void) macro +// http://msdn.microsoft.com/en-us/library/ms684208(v=vs.85).aspx +#define LEVELDB_HAVE_MEMORY_BARRIER + +// Mac OS +#elif defined(OS_MACOSX) +inline void MemoryBarrier() { + OSMemoryBarrier(); +} +#define LEVELDB_HAVE_MEMORY_BARRIER + +// Gcc on x86 +#elif defined(ARCH_CPU_X86_FAMILY) && defined(__GNUC__) +inline void MemoryBarrier() { + // See http://gcc.gnu.org/ml/gcc/2003-04/msg01180.html for a discussion on + // this idiom. Also see http://en.wikipedia.org/wiki/Memory_ordering. + __asm__ __volatile__("" : : : "memory"); +} +#define LEVELDB_HAVE_MEMORY_BARRIER + +// Sun Studio +#elif defined(ARCH_CPU_X86_FAMILY) && defined(__SUNPRO_CC) +inline void MemoryBarrier() { + // See http://gcc.gnu.org/ml/gcc/2003-04/msg01180.html for a discussion on + // this idiom. Also see http://en.wikipedia.org/wiki/Memory_ordering. + asm volatile("" : : : "memory"); +} +#define LEVELDB_HAVE_MEMORY_BARRIER + +// ARM Linux +#elif defined(ARCH_CPU_ARM_FAMILY) && defined(__linux__) +typedef void (*LinuxKernelMemoryBarrierFunc)(void); +// The Linux ARM kernel provides a highly optimized device-specific memory +// barrier function at a fixed memory address that is mapped in every +// user-level process. +// +// This beats using CPU-specific instructions which are, on single-core +// devices, un-necessary and very costly (e.g. ARMv7-A "dmb" takes more +// than 180ns on a Cortex-A8 like the one on a Nexus One). Benchmarking +// shows that the extra function call cost is completely negligible on +// multi-core devices. +// +inline void MemoryBarrier() { + (*(LinuxKernelMemoryBarrierFunc)0xffff0fa0)(); +} +#define LEVELDB_HAVE_MEMORY_BARRIER + +// PPC +#elif defined(ARCH_CPU_PPC_FAMILY) && defined(__GNUC__) +inline void MemoryBarrier() { + // TODO for some powerpc expert: is there a cheaper suitable variant? + // Perhaps by having separate barriers for acquire and release ops. + asm volatile("sync" : : : "memory"); +} +#define LEVELDB_HAVE_MEMORY_BARRIER + +#endif + +// AtomicPointer built using platform-specific MemoryBarrier() +#if defined(LEVELDB_HAVE_MEMORY_BARRIER) +class AtomicPointer { + private: + void* rep_; + public: + AtomicPointer() { } + explicit AtomicPointer(void* p) : rep_(p) {} + inline void* NoBarrier_Load() const { return rep_; } + inline void NoBarrier_Store(void* v) { rep_ = v; } + inline void* Acquire_Load() const { + void* result = rep_; + MemoryBarrier(); + return result; + } + inline void Release_Store(void* v) { + MemoryBarrier(); + rep_ = v; + } +}; + +// AtomicPointer based on +#elif defined(LEVELDB_CSTDATOMIC_PRESENT) +class AtomicPointer { + private: + std::atomic rep_; + public: + AtomicPointer() { } + explicit AtomicPointer(void* v) : rep_(v) { } + inline void* Acquire_Load() const { + return rep_.load(std::memory_order_acquire); + } + inline void Release_Store(void* v) { + rep_.store(v, std::memory_order_release); + } + inline void* NoBarrier_Load() const { + return rep_.load(std::memory_order_relaxed); + } + inline void NoBarrier_Store(void* v) { + rep_.store(v, std::memory_order_relaxed); + } +}; + +// Atomic pointer based on sparc memory barriers +#elif defined(__sparcv9) && defined(__GNUC__) +class AtomicPointer { + private: + void* rep_; + public: + AtomicPointer() { } + explicit AtomicPointer(void* v) : rep_(v) { } + inline void* Acquire_Load() const { + void* val; + __asm__ __volatile__ ( + "ldx [%[rep_]], %[val] \n\t" + "membar #LoadLoad|#LoadStore \n\t" + : [val] "=r" (val) + : [rep_] "r" (&rep_) + : "memory"); + return val; + } + inline void Release_Store(void* v) { + __asm__ __volatile__ ( + "membar #LoadStore|#StoreStore \n\t" + "stx %[v], [%[rep_]] \n\t" + : + : [rep_] "r" (&rep_), [v] "r" (v) + : "memory"); + } + inline void* NoBarrier_Load() const { return rep_; } + inline void NoBarrier_Store(void* v) { rep_ = v; } +}; + +// Atomic pointer based on ia64 acq/rel +#elif defined(__ia64) && defined(__GNUC__) +class AtomicPointer { + private: + void* rep_; + public: + AtomicPointer() { } + explicit AtomicPointer(void* v) : rep_(v) { } + inline void* Acquire_Load() const { + void* val ; + __asm__ __volatile__ ( + "ld8.acq %[val] = [%[rep_]] \n\t" + : [val] "=r" (val) + : [rep_] "r" (&rep_) + : "memory" + ); + return val; + } + inline void Release_Store(void* v) { + __asm__ __volatile__ ( + "st8.rel [%[rep_]] = %[v] \n\t" + : + : [rep_] "r" (&rep_), [v] "r" (v) + : "memory" + ); + } + inline void* NoBarrier_Load() const { return rep_; } + inline void NoBarrier_Store(void* v) { rep_ = v; } +}; + +// We have neither MemoryBarrier(), nor +#else +#error Please implement AtomicPointer for this platform. + +#endif + +#undef LEVELDB_HAVE_MEMORY_BARRIER +#undef ARCH_CPU_X86_FAMILY +#undef ARCH_CPU_ARM_FAMILY +#undef ARCH_CPU_PPC_FAMILY + +} // namespace port +} // namespace leveldb + +#endif // PORT_ATOMIC_POINTER_H_ diff --git a/src/leveldb/port/port.h b/src/leveldb/port/port.h new file mode 100644 index 0000000..4baafa8 --- /dev/null +++ b/src/leveldb/port/port.h @@ -0,0 +1,21 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_PORT_PORT_H_ +#define STORAGE_LEVELDB_PORT_PORT_H_ + +#include + +// Include the appropriate platform specific file below. If you are +// porting to a new platform, see "port_example.h" for documentation +// of what the new port_.h file must provide. +#if defined(LEVELDB_PLATFORM_POSIX) +# include "port/port_posix.h" +#elif defined(LEVELDB_PLATFORM_CHROMIUM) +# include "port/port_chromium.h" +#elif defined(LEVELDB_PLATFORM_WINDOWS) +# include "port/port_win.h" +#endif + +#endif // STORAGE_LEVELDB_PORT_PORT_H_ diff --git a/src/leveldb/port/port_example.h b/src/leveldb/port/port_example.h new file mode 100644 index 0000000..ab9e489 --- /dev/null +++ b/src/leveldb/port/port_example.h @@ -0,0 +1,135 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// This file contains the specification, but not the implementations, +// of the types/operations/etc. that should be defined by a platform +// specific port_.h file. Use this file as a reference for +// how to port this package to a new platform. + +#ifndef STORAGE_LEVELDB_PORT_PORT_EXAMPLE_H_ +#define STORAGE_LEVELDB_PORT_PORT_EXAMPLE_H_ + +namespace leveldb { +namespace port { + +// TODO(jorlow): Many of these belong more in the environment class rather than +// here. We should try moving them and see if it affects perf. + +// The following boolean constant must be true on a little-endian machine +// and false otherwise. +static const bool kLittleEndian = true /* or some other expression */; + +// ------------------ Threading ------------------- + +// A Mutex represents an exclusive lock. +class Mutex { + public: + Mutex(); + ~Mutex(); + + // Lock the mutex. Waits until other lockers have exited. + // Will deadlock if the mutex is already locked by this thread. + void Lock(); + + // Unlock the mutex. + // REQUIRES: This mutex was locked by this thread. + void Unlock(); + + // Optionally crash if this thread does not hold this mutex. + // The implementation must be fast, especially if NDEBUG is + // defined. The implementation is allowed to skip all checks. + void AssertHeld(); +}; + +class CondVar { + public: + explicit CondVar(Mutex* mu); + ~CondVar(); + + // Atomically release *mu and block on this condition variable until + // either a call to SignalAll(), or a call to Signal() that picks + // this thread to wakeup. + // REQUIRES: this thread holds *mu + void Wait(); + + // If there are some threads waiting, wake up at least one of them. + void Signal(); + + // Wake up all waiting threads. + void SignallAll(); +}; + +// Thread-safe initialization. +// Used as follows: +// static port::OnceType init_control = LEVELDB_ONCE_INIT; +// static void Initializer() { ... do something ...; } +// ... +// port::InitOnce(&init_control, &Initializer); +typedef intptr_t OnceType; +#define LEVELDB_ONCE_INIT 0 +extern void InitOnce(port::OnceType*, void (*initializer)()); + +// A type that holds a pointer that can be read or written atomically +// (i.e., without word-tearing.) +class AtomicPointer { + private: + intptr_t rep_; + public: + // Initialize to arbitrary value + AtomicPointer(); + + // Initialize to hold v + explicit AtomicPointer(void* v) : rep_(v) { } + + // Read and return the stored pointer with the guarantee that no + // later memory access (read or write) by this thread can be + // reordered ahead of this read. + void* Acquire_Load() const; + + // Set v as the stored pointer with the guarantee that no earlier + // memory access (read or write) by this thread can be reordered + // after this store. + void Release_Store(void* v); + + // Read the stored pointer with no ordering guarantees. + void* NoBarrier_Load() const; + + // Set va as the stored pointer with no ordering guarantees. + void NoBarrier_Store(void* v); +}; + +// ------------------ Compression ------------------- + +// Store the snappy compression of "input[0,input_length-1]" in *output. +// Returns false if snappy is not supported by this port. +extern bool Snappy_Compress(const char* input, size_t input_length, + std::string* output); + +// If input[0,input_length-1] looks like a valid snappy compressed +// buffer, store the size of the uncompressed data in *result and +// return true. Else return false. +extern bool Snappy_GetUncompressedLength(const char* input, size_t length, + size_t* result); + +// Attempt to snappy uncompress input[0,input_length-1] into *output. +// Returns true if successful, false if the input is invalid lightweight +// compressed data. +// +// REQUIRES: at least the first "n" bytes of output[] must be writable +// where "n" is the result of a successful call to +// Snappy_GetUncompressedLength. +extern bool Snappy_Uncompress(const char* input_data, size_t input_length, + char* output); + +// ------------------ Miscellaneous ------------------- + +// If heap profiling is not supported, returns false. +// Else repeatedly calls (*func)(arg, data, n) and then returns true. +// The concatenation of all "data[0,n-1]" fragments is the heap profile. +extern bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg); + +} // namespace port +} // namespace leveldb + +#endif // STORAGE_LEVELDB_PORT_PORT_EXAMPLE_H_ diff --git a/src/leveldb/port/port_posix.cc b/src/leveldb/port/port_posix.cc new file mode 100644 index 0000000..5ba127a --- /dev/null +++ b/src/leveldb/port/port_posix.cc @@ -0,0 +1,54 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "port/port_posix.h" + +#include +#include +#include +#include "util/logging.h" + +namespace leveldb { +namespace port { + +static void PthreadCall(const char* label, int result) { + if (result != 0) { + fprintf(stderr, "pthread %s: %s\n", label, strerror(result)); + abort(); + } +} + +Mutex::Mutex() { PthreadCall("init mutex", pthread_mutex_init(&mu_, NULL)); } + +Mutex::~Mutex() { PthreadCall("destroy mutex", pthread_mutex_destroy(&mu_)); } + +void Mutex::Lock() { PthreadCall("lock", pthread_mutex_lock(&mu_)); } + +void Mutex::Unlock() { PthreadCall("unlock", pthread_mutex_unlock(&mu_)); } + +CondVar::CondVar(Mutex* mu) + : mu_(mu) { + PthreadCall("init cv", pthread_cond_init(&cv_, NULL)); +} + +CondVar::~CondVar() { PthreadCall("destroy cv", pthread_cond_destroy(&cv_)); } + +void CondVar::Wait() { + PthreadCall("wait", pthread_cond_wait(&cv_, &mu_->mu_)); +} + +void CondVar::Signal() { + PthreadCall("signal", pthread_cond_signal(&cv_)); +} + +void CondVar::SignalAll() { + PthreadCall("broadcast", pthread_cond_broadcast(&cv_)); +} + +void InitOnce(OnceType* once, void (*initializer)()) { + PthreadCall("once", pthread_once(once, initializer)); +} + +} // namespace port +} // namespace leveldb diff --git a/src/leveldb/port/port_posix.h b/src/leveldb/port/port_posix.h new file mode 100644 index 0000000..21c845e --- /dev/null +++ b/src/leveldb/port/port_posix.h @@ -0,0 +1,161 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// See port_example.h for documentation for the following types/functions. + +#ifndef STORAGE_LEVELDB_PORT_PORT_POSIX_H_ +#define STORAGE_LEVELDB_PORT_PORT_POSIX_H_ + +#undef PLATFORM_IS_LITTLE_ENDIAN +#if defined(OS_MACOSX) + #include + #if defined(__DARWIN_LITTLE_ENDIAN) && defined(__DARWIN_BYTE_ORDER) + #define PLATFORM_IS_LITTLE_ENDIAN \ + (__DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN) + #endif +#elif defined(OS_SOLARIS) + #include + #ifdef _LITTLE_ENDIAN + #define PLATFORM_IS_LITTLE_ENDIAN true + #else + #define PLATFORM_IS_LITTLE_ENDIAN false + #endif +#elif defined(OS_FREEBSD) + #include + #include + #define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN) +#elif defined(OS_OPENBSD) || defined(OS_NETBSD) ||\ + defined(OS_DRAGONFLYBSD) + #include + #include +#elif defined(OS_HPUX) + #define PLATFORM_IS_LITTLE_ENDIAN false +#elif defined(OS_ANDROID) + // Due to a bug in the NDK x86 definition, + // _BYTE_ORDER must be used instead of __BYTE_ORDER on Android. + // See http://code.google.com/p/android/issues/detail?id=39824 + #include + #define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN) +#else + #include +#endif + +#include +#ifdef SNAPPY +#include +#endif +#include +#include +#include "port/atomic_pointer.h" + +#ifndef PLATFORM_IS_LITTLE_ENDIAN +#define PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN) +#endif + +#if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\ + defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\ + defined(OS_ANDROID) || defined(OS_HPUX) +// Use fread/fwrite/fflush on platforms without _unlocked variants +#define fread_unlocked fread +#define fwrite_unlocked fwrite +#define fflush_unlocked fflush +#endif + +#if defined(OS_FREEBSD) ||\ + defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) +// Use fsync() on platforms without fdatasync() +#define fdatasync fsync +#endif + +#if defined(OS_MACOSX) +#define fdatasync(fd) fcntl(fd, F_FULLFSYNC, 0) +#endif + +#if defined(OS_ANDROID) && __ANDROID_API__ < 9 +// fdatasync() was only introduced in API level 9 on Android. Use fsync() +// when targetting older platforms. +#define fdatasync fsync +#endif + +namespace leveldb { +namespace port { + +static const bool kLittleEndian = PLATFORM_IS_LITTLE_ENDIAN; +#undef PLATFORM_IS_LITTLE_ENDIAN + +class CondVar; + +class Mutex { + public: + Mutex(); + ~Mutex(); + + void Lock(); + void Unlock(); + void AssertHeld() { } + + private: + friend class CondVar; + pthread_mutex_t mu_; + + // No copying + Mutex(const Mutex&); + void operator=(const Mutex&); +}; + +class CondVar { + public: + explicit CondVar(Mutex* mu); + ~CondVar(); + void Wait(); + void Signal(); + void SignalAll(); + private: + pthread_cond_t cv_; + Mutex* mu_; +}; + +typedef pthread_once_t OnceType; +#define LEVELDB_ONCE_INIT PTHREAD_ONCE_INIT +extern void InitOnce(OnceType* once, void (*initializer)()); + +inline bool Snappy_Compress(const char* input, size_t length, + ::std::string* output) { +#ifdef SNAPPY + output->resize(snappy::MaxCompressedLength(length)); + size_t outlen; + snappy::RawCompress(input, length, &(*output)[0], &outlen); + output->resize(outlen); + return true; +#endif + + return false; +} + +inline bool Snappy_GetUncompressedLength(const char* input, size_t length, + size_t* result) { +#ifdef SNAPPY + return snappy::GetUncompressedLength(input, length, result); +#else + return false; +#endif +} + +inline bool Snappy_Uncompress(const char* input, size_t length, + char* output) { +#ifdef SNAPPY + return snappy::RawUncompress(input, length, output); +#else + return false; +#endif +} + +inline bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg) { + return false; +} + +} // namespace port +} // namespace leveldb + +#endif // STORAGE_LEVELDB_PORT_PORT_POSIX_H_ diff --git a/src/leveldb/port/port_win.cc b/src/leveldb/port/port_win.cc new file mode 100644 index 0000000..1b0f060 --- /dev/null +++ b/src/leveldb/port/port_win.cc @@ -0,0 +1,147 @@ +// LevelDB Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// See port_example.h for documentation for the following types/functions. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of the University of California, Berkeley nor the +// names of its contributors may be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#include "port/port_win.h" + +#include +#include + +namespace leveldb { +namespace port { + +Mutex::Mutex() : + cs_(NULL) { + assert(!cs_); + cs_ = static_cast(new CRITICAL_SECTION()); + ::InitializeCriticalSection(static_cast(cs_)); + assert(cs_); +} + +Mutex::~Mutex() { + assert(cs_); + ::DeleteCriticalSection(static_cast(cs_)); + delete static_cast(cs_); + cs_ = NULL; + assert(!cs_); +} + +void Mutex::Lock() { + assert(cs_); + ::EnterCriticalSection(static_cast(cs_)); +} + +void Mutex::Unlock() { + assert(cs_); + ::LeaveCriticalSection(static_cast(cs_)); +} + +void Mutex::AssertHeld() { + assert(cs_); + assert(1); +} + +CondVar::CondVar(Mutex* mu) : + waiting_(0), + mu_(mu), + sem1_(::CreateSemaphore(NULL, 0, 10000, NULL)), + sem2_(::CreateSemaphore(NULL, 0, 10000, NULL)) { + assert(mu_); +} + +CondVar::~CondVar() { + ::CloseHandle(sem1_); + ::CloseHandle(sem2_); +} + +void CondVar::Wait() { + mu_->AssertHeld(); + + wait_mtx_.Lock(); + ++waiting_; + wait_mtx_.Unlock(); + + mu_->Unlock(); + + // initiate handshake + ::WaitForSingleObject(sem1_, INFINITE); + ::ReleaseSemaphore(sem2_, 1, NULL); + mu_->Lock(); +} + +void CondVar::Signal() { + wait_mtx_.Lock(); + if (waiting_ > 0) { + --waiting_; + + // finalize handshake + ::ReleaseSemaphore(sem1_, 1, NULL); + ::WaitForSingleObject(sem2_, INFINITE); + } + wait_mtx_.Unlock(); +} + +void CondVar::SignalAll() { + wait_mtx_.Lock(); + ::ReleaseSemaphore(sem1_, waiting_, NULL); + while(waiting_ > 0) { + --waiting_; + ::WaitForSingleObject(sem2_, INFINITE); + } + wait_mtx_.Unlock(); +} + +AtomicPointer::AtomicPointer(void* v) { + Release_Store(v); +} + +void InitOnce(OnceType* once, void (*initializer)()) { + once->InitOnce(initializer); +} + +void* AtomicPointer::Acquire_Load() const { + void * p = NULL; + InterlockedExchangePointer(&p, rep_); + return p; +} + +void AtomicPointer::Release_Store(void* v) { + InterlockedExchangePointer(&rep_, v); +} + +void* AtomicPointer::NoBarrier_Load() const { + return rep_; +} + +void AtomicPointer::NoBarrier_Store(void* v) { + rep_ = v; +} + +} +} diff --git a/src/leveldb/port/port_win.h b/src/leveldb/port/port_win.h new file mode 100644 index 0000000..45bf2f0 --- /dev/null +++ b/src/leveldb/port/port_win.h @@ -0,0 +1,174 @@ +// LevelDB Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// See port_example.h for documentation for the following types/functions. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of the University of California, Berkeley nor the +// names of its contributors may be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#ifndef STORAGE_LEVELDB_PORT_PORT_WIN_H_ +#define STORAGE_LEVELDB_PORT_PORT_WIN_H_ + +#ifdef _MSC_VER +#define snprintf _snprintf +#define close _close +#define fread_unlocked _fread_nolock +#endif + +#include +#include +#ifdef SNAPPY +#include +#endif + +namespace leveldb { +namespace port { + +// Windows is little endian (for now :p) +static const bool kLittleEndian = true; + +class CondVar; + +class Mutex { + public: + Mutex(); + ~Mutex(); + + void Lock(); + void Unlock(); + void AssertHeld(); + + private: + friend class CondVar; + // critical sections are more efficient than mutexes + // but they are not recursive and can only be used to synchronize threads within the same process + // we use opaque void * to avoid including windows.h in port_win.h + void * cs_; + + // No copying + Mutex(const Mutex&); + void operator=(const Mutex&); +}; + +// the Win32 API offers a dependable condition variable mechanism, but only starting with +// Windows 2008 and Vista +// no matter what we will implement our own condition variable with a semaphore +// implementation as described in a paper written by Andrew D. Birrell in 2003 +class CondVar { + public: + explicit CondVar(Mutex* mu); + ~CondVar(); + void Wait(); + void Signal(); + void SignalAll(); + private: + Mutex* mu_; + + Mutex wait_mtx_; + long waiting_; + + void * sem1_; + void * sem2_; + + +}; + +class OnceType { +public: +// OnceType() : init_(false) {} + OnceType(const OnceType &once) : init_(once.init_) {} + OnceType(bool f) : init_(f) {} + void InitOnce(void (*initializer)()) { + mutex_.Lock(); + if (!init_) { + init_ = true; + initializer(); + } + mutex_.Unlock(); + } + +private: + bool init_; + Mutex mutex_; +}; + +#define LEVELDB_ONCE_INIT false +extern void InitOnce(port::OnceType*, void (*initializer)()); + +// Storage for a lock-free pointer +class AtomicPointer { + private: + void * rep_; + public: + AtomicPointer() : rep_(NULL) { } + explicit AtomicPointer(void* v); + void* Acquire_Load() const; + + void Release_Store(void* v); + + void* NoBarrier_Load() const; + + void NoBarrier_Store(void* v); +}; + +inline bool Snappy_Compress(const char* input, size_t length, + ::std::string* output) { +#ifdef SNAPPY + output->resize(snappy::MaxCompressedLength(length)); + size_t outlen; + snappy::RawCompress(input, length, &(*output)[0], &outlen); + output->resize(outlen); + return true; +#endif + + return false; +} + +inline bool Snappy_GetUncompressedLength(const char* input, size_t length, + size_t* result) { +#ifdef SNAPPY + return snappy::GetUncompressedLength(input, length, result); +#else + return false; +#endif +} + +inline bool Snappy_Uncompress(const char* input, size_t length, + char* output) { +#ifdef SNAPPY + return snappy::RawUncompress(input, length, output); +#else + return false; +#endif +} + +inline bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg) { + return false; +} + +} +} + +#endif // STORAGE_LEVELDB_PORT_PORT_WIN_H_ diff --git a/src/leveldb/port/thread_annotations.h b/src/leveldb/port/thread_annotations.h new file mode 100644 index 0000000..6f9b6a7 --- /dev/null +++ b/src/leveldb/port/thread_annotations.h @@ -0,0 +1,59 @@ +// Copyright (c) 2012 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_PORT_THREAD_ANNOTATIONS_H + +// Some environments provide custom macros to aid in static thread-safety +// analysis. Provide empty definitions of such macros unless they are already +// defined. + +#ifndef EXCLUSIVE_LOCKS_REQUIRED +#define EXCLUSIVE_LOCKS_REQUIRED(...) +#endif + +#ifndef SHARED_LOCKS_REQUIRED +#define SHARED_LOCKS_REQUIRED(...) +#endif + +#ifndef LOCKS_EXCLUDED +#define LOCKS_EXCLUDED(...) +#endif + +#ifndef LOCK_RETURNED +#define LOCK_RETURNED(x) +#endif + +#ifndef LOCKABLE +#define LOCKABLE +#endif + +#ifndef SCOPED_LOCKABLE +#define SCOPED_LOCKABLE +#endif + +#ifndef EXCLUSIVE_LOCK_FUNCTION +#define EXCLUSIVE_LOCK_FUNCTION(...) +#endif + +#ifndef SHARED_LOCK_FUNCTION +#define SHARED_LOCK_FUNCTION(...) +#endif + +#ifndef EXCLUSIVE_TRYLOCK_FUNCTION +#define EXCLUSIVE_TRYLOCK_FUNCTION(...) +#endif + +#ifndef SHARED_TRYLOCK_FUNCTION +#define SHARED_TRYLOCK_FUNCTION(...) +#endif + +#ifndef UNLOCK_FUNCTION +#define UNLOCK_FUNCTION(...) +#endif + +#ifndef NO_THREAD_SAFETY_ANALYSIS +#define NO_THREAD_SAFETY_ANALYSIS +#endif + +#endif // STORAGE_LEVELDB_PORT_THREAD_ANNOTATIONS_H diff --git a/src/leveldb/port/win/stdint.h b/src/leveldb/port/win/stdint.h new file mode 100644 index 0000000..39edd0d --- /dev/null +++ b/src/leveldb/port/win/stdint.h @@ -0,0 +1,24 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +// MSVC didn't ship with this file until the 2010 version. + +#ifndef STORAGE_LEVELDB_PORT_WIN_STDINT_H_ +#define STORAGE_LEVELDB_PORT_WIN_STDINT_H_ + +#if !defined(_MSC_VER) +#error This file should only be included when compiling with MSVC. +#endif + +// Define C99 equivalent types. +typedef signed char int8_t; +typedef signed short int16_t; +typedef signed int int32_t; +typedef signed long long int64_t; +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +typedef unsigned long long uint64_t; + +#endif // STORAGE_LEVELDB_PORT_WIN_STDINT_H_ diff --git a/src/leveldb/table/block.cc b/src/leveldb/table/block.cc new file mode 100644 index 0000000..79ea9d9 --- /dev/null +++ b/src/leveldb/table/block.cc @@ -0,0 +1,268 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// Decodes the blocks generated by block_builder.cc. + +#include "table/block.h" + +#include +#include +#include "leveldb/comparator.h" +#include "table/format.h" +#include "util/coding.h" +#include "util/logging.h" + +namespace leveldb { + +inline uint32_t Block::NumRestarts() const { + assert(size_ >= sizeof(uint32_t)); + return DecodeFixed32(data_ + size_ - sizeof(uint32_t)); +} + +Block::Block(const BlockContents& contents) + : data_(contents.data.data()), + size_(contents.data.size()), + owned_(contents.heap_allocated) { + if (size_ < sizeof(uint32_t)) { + size_ = 0; // Error marker + } else { + size_t max_restarts_allowed = (size_-sizeof(uint32_t)) / sizeof(uint32_t); + if (NumRestarts() > max_restarts_allowed) { + // The size is too small for NumRestarts() + size_ = 0; + } else { + restart_offset_ = size_ - (1 + NumRestarts()) * sizeof(uint32_t); + } + } +} + +Block::~Block() { + if (owned_) { + delete[] data_; + } +} + +// Helper routine: decode the next block entry starting at "p", +// storing the number of shared key bytes, non_shared key bytes, +// and the length of the value in "*shared", "*non_shared", and +// "*value_length", respectively. Will not derefence past "limit". +// +// If any errors are detected, returns NULL. Otherwise, returns a +// pointer to the key delta (just past the three decoded values). +static inline const char* DecodeEntry(const char* p, const char* limit, + uint32_t* shared, + uint32_t* non_shared, + uint32_t* value_length) { + if (limit - p < 3) return NULL; + *shared = reinterpret_cast(p)[0]; + *non_shared = reinterpret_cast(p)[1]; + *value_length = reinterpret_cast(p)[2]; + if ((*shared | *non_shared | *value_length) < 128) { + // Fast path: all three values are encoded in one byte each + p += 3; + } else { + if ((p = GetVarint32Ptr(p, limit, shared)) == NULL) return NULL; + if ((p = GetVarint32Ptr(p, limit, non_shared)) == NULL) return NULL; + if ((p = GetVarint32Ptr(p, limit, value_length)) == NULL) return NULL; + } + + if (static_cast(limit - p) < (*non_shared + *value_length)) { + return NULL; + } + return p; +} + +class Block::Iter : public Iterator { + private: + const Comparator* const comparator_; + const char* const data_; // underlying block contents + uint32_t const restarts_; // Offset of restart array (list of fixed32) + uint32_t const num_restarts_; // Number of uint32_t entries in restart array + + // current_ is offset in data_ of current entry. >= restarts_ if !Valid + uint32_t current_; + uint32_t restart_index_; // Index of restart block in which current_ falls + std::string key_; + Slice value_; + Status status_; + + inline int Compare(const Slice& a, const Slice& b) const { + return comparator_->Compare(a, b); + } + + // Return the offset in data_ just past the end of the current entry. + inline uint32_t NextEntryOffset() const { + return (value_.data() + value_.size()) - data_; + } + + uint32_t GetRestartPoint(uint32_t index) { + assert(index < num_restarts_); + return DecodeFixed32(data_ + restarts_ + index * sizeof(uint32_t)); + } + + void SeekToRestartPoint(uint32_t index) { + key_.clear(); + restart_index_ = index; + // current_ will be fixed by ParseNextKey(); + + // ParseNextKey() starts at the end of value_, so set value_ accordingly + uint32_t offset = GetRestartPoint(index); + value_ = Slice(data_ + offset, 0); + } + + public: + Iter(const Comparator* comparator, + const char* data, + uint32_t restarts, + uint32_t num_restarts) + : comparator_(comparator), + data_(data), + restarts_(restarts), + num_restarts_(num_restarts), + current_(restarts_), + restart_index_(num_restarts_) { + assert(num_restarts_ > 0); + } + + virtual bool Valid() const { return current_ < restarts_; } + virtual Status status() const { return status_; } + virtual Slice key() const { + assert(Valid()); + return key_; + } + virtual Slice value() const { + assert(Valid()); + return value_; + } + + virtual void Next() { + assert(Valid()); + ParseNextKey(); + } + + virtual void Prev() { + assert(Valid()); + + // Scan backwards to a restart point before current_ + const uint32_t original = current_; + while (GetRestartPoint(restart_index_) >= original) { + if (restart_index_ == 0) { + // No more entries + current_ = restarts_; + restart_index_ = num_restarts_; + return; + } + restart_index_--; + } + + SeekToRestartPoint(restart_index_); + do { + // Loop until end of current entry hits the start of original entry + } while (ParseNextKey() && NextEntryOffset() < original); + } + + virtual void Seek(const Slice& target) { + // Binary search in restart array to find the last restart point + // with a key < target + uint32_t left = 0; + uint32_t right = num_restarts_ - 1; + while (left < right) { + uint32_t mid = (left + right + 1) / 2; + uint32_t region_offset = GetRestartPoint(mid); + uint32_t shared, non_shared, value_length; + const char* key_ptr = DecodeEntry(data_ + region_offset, + data_ + restarts_, + &shared, &non_shared, &value_length); + if (key_ptr == NULL || (shared != 0)) { + CorruptionError(); + return; + } + Slice mid_key(key_ptr, non_shared); + if (Compare(mid_key, target) < 0) { + // Key at "mid" is smaller than "target". Therefore all + // blocks before "mid" are uninteresting. + left = mid; + } else { + // Key at "mid" is >= "target". Therefore all blocks at or + // after "mid" are uninteresting. + right = mid - 1; + } + } + + // Linear search (within restart block) for first key >= target + SeekToRestartPoint(left); + while (true) { + if (!ParseNextKey()) { + return; + } + if (Compare(key_, target) >= 0) { + return; + } + } + } + + virtual void SeekToFirst() { + SeekToRestartPoint(0); + ParseNextKey(); + } + + virtual void SeekToLast() { + SeekToRestartPoint(num_restarts_ - 1); + while (ParseNextKey() && NextEntryOffset() < restarts_) { + // Keep skipping + } + } + + private: + void CorruptionError() { + current_ = restarts_; + restart_index_ = num_restarts_; + status_ = Status::Corruption("bad entry in block"); + key_.clear(); + value_.clear(); + } + + bool ParseNextKey() { + current_ = NextEntryOffset(); + const char* p = data_ + current_; + const char* limit = data_ + restarts_; // Restarts come right after data + if (p >= limit) { + // No more entries to return. Mark as invalid. + current_ = restarts_; + restart_index_ = num_restarts_; + return false; + } + + // Decode next entry + uint32_t shared, non_shared, value_length; + p = DecodeEntry(p, limit, &shared, &non_shared, &value_length); + if (p == NULL || key_.size() < shared) { + CorruptionError(); + return false; + } else { + key_.resize(shared); + key_.append(p, non_shared); + value_ = Slice(p + non_shared, value_length); + while (restart_index_ + 1 < num_restarts_ && + GetRestartPoint(restart_index_ + 1) < current_) { + ++restart_index_; + } + return true; + } + } +}; + +Iterator* Block::NewIterator(const Comparator* cmp) { + if (size_ < sizeof(uint32_t)) { + return NewErrorIterator(Status::Corruption("bad block contents")); + } + const uint32_t num_restarts = NumRestarts(); + if (num_restarts == 0) { + return NewEmptyIterator(); + } else { + return new Iter(cmp, data_, restart_offset_, num_restarts); + } +} + +} // namespace leveldb diff --git a/src/leveldb/table/block.h b/src/leveldb/table/block.h new file mode 100644 index 0000000..2493eb9 --- /dev/null +++ b/src/leveldb/table/block.h @@ -0,0 +1,44 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_TABLE_BLOCK_H_ +#define STORAGE_LEVELDB_TABLE_BLOCK_H_ + +#include +#include +#include "leveldb/iterator.h" + +namespace leveldb { + +struct BlockContents; +class Comparator; + +class Block { + public: + // Initialize the block with the specified contents. + explicit Block(const BlockContents& contents); + + ~Block(); + + size_t size() const { return size_; } + Iterator* NewIterator(const Comparator* comparator); + + private: + uint32_t NumRestarts() const; + + const char* data_; + size_t size_; + uint32_t restart_offset_; // Offset in data_ of restart array + bool owned_; // Block owns data_[] + + // No copying allowed + Block(const Block&); + void operator=(const Block&); + + class Iter; +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_TABLE_BLOCK_H_ diff --git a/src/leveldb/table/block_builder.cc b/src/leveldb/table/block_builder.cc new file mode 100644 index 0000000..db660cd --- /dev/null +++ b/src/leveldb/table/block_builder.cc @@ -0,0 +1,109 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// BlockBuilder generates blocks where keys are prefix-compressed: +// +// When we store a key, we drop the prefix shared with the previous +// string. This helps reduce the space requirement significantly. +// Furthermore, once every K keys, we do not apply the prefix +// compression and store the entire key. We call this a "restart +// point". The tail end of the block stores the offsets of all of the +// restart points, and can be used to do a binary search when looking +// for a particular key. Values are stored as-is (without compression) +// immediately following the corresponding key. +// +// An entry for a particular key-value pair has the form: +// shared_bytes: varint32 +// unshared_bytes: varint32 +// value_length: varint32 +// key_delta: char[unshared_bytes] +// value: char[value_length] +// shared_bytes == 0 for restart points. +// +// The trailer of the block has the form: +// restarts: uint32[num_restarts] +// num_restarts: uint32 +// restarts[i] contains the offset within the block of the ith restart point. + +#include "table/block_builder.h" + +#include +#include +#include "leveldb/comparator.h" +#include "leveldb/table_builder.h" +#include "util/coding.h" + +namespace leveldb { + +BlockBuilder::BlockBuilder(const Options* options) + : options_(options), + restarts_(), + counter_(0), + finished_(false) { + assert(options->block_restart_interval >= 1); + restarts_.push_back(0); // First restart point is at offset 0 +} + +void BlockBuilder::Reset() { + buffer_.clear(); + restarts_.clear(); + restarts_.push_back(0); // First restart point is at offset 0 + counter_ = 0; + finished_ = false; + last_key_.clear(); +} + +size_t BlockBuilder::CurrentSizeEstimate() const { + return (buffer_.size() + // Raw data buffer + restarts_.size() * sizeof(uint32_t) + // Restart array + sizeof(uint32_t)); // Restart array length +} + +Slice BlockBuilder::Finish() { + // Append restart array + for (size_t i = 0; i < restarts_.size(); i++) { + PutFixed32(&buffer_, restarts_[i]); + } + PutFixed32(&buffer_, restarts_.size()); + finished_ = true; + return Slice(buffer_); +} + +void BlockBuilder::Add(const Slice& key, const Slice& value) { + Slice last_key_piece(last_key_); + assert(!finished_); + assert(counter_ <= options_->block_restart_interval); + assert(buffer_.empty() // No values yet? + || options_->comparator->Compare(key, last_key_piece) > 0); + size_t shared = 0; + if (counter_ < options_->block_restart_interval) { + // See how much sharing to do with previous string + const size_t min_length = std::min(last_key_piece.size(), key.size()); + while ((shared < min_length) && (last_key_piece[shared] == key[shared])) { + shared++; + } + } else { + // Restart compression + restarts_.push_back(buffer_.size()); + counter_ = 0; + } + const size_t non_shared = key.size() - shared; + + // Add "" to buffer_ + PutVarint32(&buffer_, shared); + PutVarint32(&buffer_, non_shared); + PutVarint32(&buffer_, value.size()); + + // Add string delta to buffer_ followed by value + buffer_.append(key.data() + shared, non_shared); + buffer_.append(value.data(), value.size()); + + // Update state + last_key_.resize(shared); + last_key_.append(key.data() + shared, non_shared); + assert(Slice(last_key_) == key); + counter_++; +} + +} // namespace leveldb diff --git a/src/leveldb/table/block_builder.h b/src/leveldb/table/block_builder.h new file mode 100644 index 0000000..5b545bd --- /dev/null +++ b/src/leveldb/table/block_builder.h @@ -0,0 +1,57 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_TABLE_BLOCK_BUILDER_H_ +#define STORAGE_LEVELDB_TABLE_BLOCK_BUILDER_H_ + +#include + +#include +#include "leveldb/slice.h" + +namespace leveldb { + +struct Options; + +class BlockBuilder { + public: + explicit BlockBuilder(const Options* options); + + // Reset the contents as if the BlockBuilder was just constructed. + void Reset(); + + // REQUIRES: Finish() has not been callled since the last call to Reset(). + // REQUIRES: key is larger than any previously added key + void Add(const Slice& key, const Slice& value); + + // Finish building the block and return a slice that refers to the + // block contents. The returned slice will remain valid for the + // lifetime of this builder or until Reset() is called. + Slice Finish(); + + // Returns an estimate of the current (uncompressed) size of the block + // we are building. + size_t CurrentSizeEstimate() const; + + // Return true iff no entries have been added since the last Reset() + bool empty() const { + return buffer_.empty(); + } + + private: + const Options* options_; + std::string buffer_; // Destination buffer + std::vector restarts_; // Restart points + int counter_; // Number of entries emitted since restart + bool finished_; // Has Finish() been called? + std::string last_key_; + + // No copying allowed + BlockBuilder(const BlockBuilder&); + void operator=(const BlockBuilder&); +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_TABLE_BLOCK_BUILDER_H_ diff --git a/src/leveldb/table/filter_block.cc b/src/leveldb/table/filter_block.cc new file mode 100644 index 0000000..203e15c --- /dev/null +++ b/src/leveldb/table/filter_block.cc @@ -0,0 +1,111 @@ +// Copyright (c) 2012 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "table/filter_block.h" + +#include "leveldb/filter_policy.h" +#include "util/coding.h" + +namespace leveldb { + +// See doc/table_format.txt for an explanation of the filter block format. + +// Generate new filter every 2KB of data +static const size_t kFilterBaseLg = 11; +static const size_t kFilterBase = 1 << kFilterBaseLg; + +FilterBlockBuilder::FilterBlockBuilder(const FilterPolicy* policy) + : policy_(policy) { +} + +void FilterBlockBuilder::StartBlock(uint64_t block_offset) { + uint64_t filter_index = (block_offset / kFilterBase); + assert(filter_index >= filter_offsets_.size()); + while (filter_index > filter_offsets_.size()) { + GenerateFilter(); + } +} + +void FilterBlockBuilder::AddKey(const Slice& key) { + Slice k = key; + start_.push_back(keys_.size()); + keys_.append(k.data(), k.size()); +} + +Slice FilterBlockBuilder::Finish() { + if (!start_.empty()) { + GenerateFilter(); + } + + // Append array of per-filter offsets + const uint32_t array_offset = result_.size(); + for (size_t i = 0; i < filter_offsets_.size(); i++) { + PutFixed32(&result_, filter_offsets_[i]); + } + + PutFixed32(&result_, array_offset); + result_.push_back(kFilterBaseLg); // Save encoding parameter in result + return Slice(result_); +} + +void FilterBlockBuilder::GenerateFilter() { + const size_t num_keys = start_.size(); + if (num_keys == 0) { + // Fast path if there are no keys for this filter + filter_offsets_.push_back(result_.size()); + return; + } + + // Make list of keys from flattened key structure + start_.push_back(keys_.size()); // Simplify length computation + tmp_keys_.resize(num_keys); + for (size_t i = 0; i < num_keys; i++) { + const char* base = keys_.data() + start_[i]; + size_t length = start_[i+1] - start_[i]; + tmp_keys_[i] = Slice(base, length); + } + + // Generate filter for current set of keys and append to result_. + filter_offsets_.push_back(result_.size()); + policy_->CreateFilter(&tmp_keys_[0], num_keys, &result_); + + tmp_keys_.clear(); + keys_.clear(); + start_.clear(); +} + +FilterBlockReader::FilterBlockReader(const FilterPolicy* policy, + const Slice& contents) + : policy_(policy), + data_(NULL), + offset_(NULL), + num_(0), + base_lg_(0) { + size_t n = contents.size(); + if (n < 5) return; // 1 byte for base_lg_ and 4 for start of offset array + base_lg_ = contents[n-1]; + uint32_t last_word = DecodeFixed32(contents.data() + n - 5); + if (last_word > n - 5) return; + data_ = contents.data(); + offset_ = data_ + last_word; + num_ = (n - 5 - last_word) / 4; +} + +bool FilterBlockReader::KeyMayMatch(uint64_t block_offset, const Slice& key) { + uint64_t index = block_offset >> base_lg_; + if (index < num_) { + uint32_t start = DecodeFixed32(offset_ + index*4); + uint32_t limit = DecodeFixed32(offset_ + index*4 + 4); + if (start <= limit && limit <= (offset_ - data_)) { + Slice filter = Slice(data_ + start, limit - start); + return policy_->KeyMayMatch(key, filter); + } else if (start == limit) { + // Empty filters do not match any keys + return false; + } + } + return true; // Errors are treated as potential matches +} + +} diff --git a/src/leveldb/table/filter_block.h b/src/leveldb/table/filter_block.h new file mode 100644 index 0000000..c67d010 --- /dev/null +++ b/src/leveldb/table/filter_block.h @@ -0,0 +1,68 @@ +// Copyright (c) 2012 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// A filter block is stored near the end of a Table file. It contains +// filters (e.g., bloom filters) for all data blocks in the table combined +// into a single filter block. + +#ifndef STORAGE_LEVELDB_TABLE_FILTER_BLOCK_H_ +#define STORAGE_LEVELDB_TABLE_FILTER_BLOCK_H_ + +#include +#include +#include +#include +#include "leveldb/slice.h" +#include "util/hash.h" + +namespace leveldb { + +class FilterPolicy; + +// A FilterBlockBuilder is used to construct all of the filters for a +// particular Table. It generates a single string which is stored as +// a special block in the Table. +// +// The sequence of calls to FilterBlockBuilder must match the regexp: +// (StartBlock AddKey*)* Finish +class FilterBlockBuilder { + public: + explicit FilterBlockBuilder(const FilterPolicy*); + + void StartBlock(uint64_t block_offset); + void AddKey(const Slice& key); + Slice Finish(); + + private: + void GenerateFilter(); + + const FilterPolicy* policy_; + std::string keys_; // Flattened key contents + std::vector start_; // Starting index in keys_ of each key + std::string result_; // Filter data computed so far + std::vector tmp_keys_; // policy_->CreateFilter() argument + std::vector filter_offsets_; + + // No copying allowed + FilterBlockBuilder(const FilterBlockBuilder&); + void operator=(const FilterBlockBuilder&); +}; + +class FilterBlockReader { + public: + // REQUIRES: "contents" and *policy must stay live while *this is live. + FilterBlockReader(const FilterPolicy* policy, const Slice& contents); + bool KeyMayMatch(uint64_t block_offset, const Slice& key); + + private: + const FilterPolicy* policy_; + const char* data_; // Pointer to filter data (at block-start) + const char* offset_; // Pointer to beginning of offset array (at block-end) + size_t num_; // Number of entries in offset array + size_t base_lg_; // Encoding parameter (see kFilterBaseLg in .cc file) +}; + +} + +#endif // STORAGE_LEVELDB_TABLE_FILTER_BLOCK_H_ diff --git a/src/leveldb/table/filter_block_test.cc b/src/leveldb/table/filter_block_test.cc new file mode 100644 index 0000000..8c4a474 --- /dev/null +++ b/src/leveldb/table/filter_block_test.cc @@ -0,0 +1,128 @@ +// Copyright (c) 2012 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "table/filter_block.h" + +#include "leveldb/filter_policy.h" +#include "util/coding.h" +#include "util/hash.h" +#include "util/logging.h" +#include "util/testharness.h" +#include "util/testutil.h" + +namespace leveldb { + +// For testing: emit an array with one hash value per key +class TestHashFilter : public FilterPolicy { + public: + virtual const char* Name() const { + return "TestHashFilter"; + } + + virtual void CreateFilter(const Slice* keys, int n, std::string* dst) const { + for (int i = 0; i < n; i++) { + uint32_t h = Hash(keys[i].data(), keys[i].size(), 1); + PutFixed32(dst, h); + } + } + + virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const { + uint32_t h = Hash(key.data(), key.size(), 1); + for (size_t i = 0; i + 4 <= filter.size(); i += 4) { + if (h == DecodeFixed32(filter.data() + i)) { + return true; + } + } + return false; + } +}; + +class FilterBlockTest { + public: + TestHashFilter policy_; +}; + +TEST(FilterBlockTest, EmptyBuilder) { + FilterBlockBuilder builder(&policy_); + Slice block = builder.Finish(); + ASSERT_EQ("\\x00\\x00\\x00\\x00\\x0b", EscapeString(block)); + FilterBlockReader reader(&policy_, block); + ASSERT_TRUE(reader.KeyMayMatch(0, "foo")); + ASSERT_TRUE(reader.KeyMayMatch(100000, "foo")); +} + +TEST(FilterBlockTest, SingleChunk) { + FilterBlockBuilder builder(&policy_); + builder.StartBlock(100); + builder.AddKey("foo"); + builder.AddKey("bar"); + builder.AddKey("box"); + builder.StartBlock(200); + builder.AddKey("box"); + builder.StartBlock(300); + builder.AddKey("hello"); + Slice block = builder.Finish(); + FilterBlockReader reader(&policy_, block); + ASSERT_TRUE(reader.KeyMayMatch(100, "foo")); + ASSERT_TRUE(reader.KeyMayMatch(100, "bar")); + ASSERT_TRUE(reader.KeyMayMatch(100, "box")); + ASSERT_TRUE(reader.KeyMayMatch(100, "hello")); + ASSERT_TRUE(reader.KeyMayMatch(100, "foo")); + ASSERT_TRUE(! reader.KeyMayMatch(100, "missing")); + ASSERT_TRUE(! reader.KeyMayMatch(100, "other")); +} + +TEST(FilterBlockTest, MultiChunk) { + FilterBlockBuilder builder(&policy_); + + // First filter + builder.StartBlock(0); + builder.AddKey("foo"); + builder.StartBlock(2000); + builder.AddKey("bar"); + + // Second filter + builder.StartBlock(3100); + builder.AddKey("box"); + + // Third filter is empty + + // Last filter + builder.StartBlock(9000); + builder.AddKey("box"); + builder.AddKey("hello"); + + Slice block = builder.Finish(); + FilterBlockReader reader(&policy_, block); + + // Check first filter + ASSERT_TRUE(reader.KeyMayMatch(0, "foo")); + ASSERT_TRUE(reader.KeyMayMatch(2000, "bar")); + ASSERT_TRUE(! reader.KeyMayMatch(0, "box")); + ASSERT_TRUE(! reader.KeyMayMatch(0, "hello")); + + // Check second filter + ASSERT_TRUE(reader.KeyMayMatch(3100, "box")); + ASSERT_TRUE(! reader.KeyMayMatch(3100, "foo")); + ASSERT_TRUE(! reader.KeyMayMatch(3100, "bar")); + ASSERT_TRUE(! reader.KeyMayMatch(3100, "hello")); + + // Check third filter (empty) + ASSERT_TRUE(! reader.KeyMayMatch(4100, "foo")); + ASSERT_TRUE(! reader.KeyMayMatch(4100, "bar")); + ASSERT_TRUE(! reader.KeyMayMatch(4100, "box")); + ASSERT_TRUE(! reader.KeyMayMatch(4100, "hello")); + + // Check last filter + ASSERT_TRUE(reader.KeyMayMatch(9000, "box")); + ASSERT_TRUE(reader.KeyMayMatch(9000, "hello")); + ASSERT_TRUE(! reader.KeyMayMatch(9000, "foo")); + ASSERT_TRUE(! reader.KeyMayMatch(9000, "bar")); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/table/format.cc b/src/leveldb/table/format.cc new file mode 100644 index 0000000..cda1dec --- /dev/null +++ b/src/leveldb/table/format.cc @@ -0,0 +1,145 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "table/format.h" + +#include "leveldb/env.h" +#include "port/port.h" +#include "table/block.h" +#include "util/coding.h" +#include "util/crc32c.h" + +namespace leveldb { + +void BlockHandle::EncodeTo(std::string* dst) const { + // Sanity check that all fields have been set + assert(offset_ != ~static_cast(0)); + assert(size_ != ~static_cast(0)); + PutVarint64(dst, offset_); + PutVarint64(dst, size_); +} + +Status BlockHandle::DecodeFrom(Slice* input) { + if (GetVarint64(input, &offset_) && + GetVarint64(input, &size_)) { + return Status::OK(); + } else { + return Status::Corruption("bad block handle"); + } +} + +void Footer::EncodeTo(std::string* dst) const { +#ifndef NDEBUG + const size_t original_size = dst->size(); +#endif + metaindex_handle_.EncodeTo(dst); + index_handle_.EncodeTo(dst); + dst->resize(2 * BlockHandle::kMaxEncodedLength); // Padding + PutFixed32(dst, static_cast(kTableMagicNumber & 0xffffffffu)); + PutFixed32(dst, static_cast(kTableMagicNumber >> 32)); + assert(dst->size() == original_size + kEncodedLength); +} + +Status Footer::DecodeFrom(Slice* input) { + const char* magic_ptr = input->data() + kEncodedLength - 8; + const uint32_t magic_lo = DecodeFixed32(magic_ptr); + const uint32_t magic_hi = DecodeFixed32(magic_ptr + 4); + const uint64_t magic = ((static_cast(magic_hi) << 32) | + (static_cast(magic_lo))); + if (magic != kTableMagicNumber) { + return Status::InvalidArgument("not an sstable (bad magic number)"); + } + + Status result = metaindex_handle_.DecodeFrom(input); + if (result.ok()) { + result = index_handle_.DecodeFrom(input); + } + if (result.ok()) { + // We skip over any leftover data (just padding for now) in "input" + const char* end = magic_ptr + 8; + *input = Slice(end, input->data() + input->size() - end); + } + return result; +} + +Status ReadBlock(RandomAccessFile* file, + const ReadOptions& options, + const BlockHandle& handle, + BlockContents* result) { + result->data = Slice(); + result->cachable = false; + result->heap_allocated = false; + + // Read the block contents as well as the type/crc footer. + // See table_builder.cc for the code that built this structure. + size_t n = static_cast(handle.size()); + char* buf = new char[n + kBlockTrailerSize]; + Slice contents; + Status s = file->Read(handle.offset(), n + kBlockTrailerSize, &contents, buf); + if (!s.ok()) { + delete[] buf; + return s; + } + if (contents.size() != n + kBlockTrailerSize) { + delete[] buf; + return Status::Corruption("truncated block read"); + } + + // Check the crc of the type and the block contents + const char* data = contents.data(); // Pointer to where Read put the data + if (options.verify_checksums) { + const uint32_t crc = crc32c::Unmask(DecodeFixed32(data + n + 1)); + const uint32_t actual = crc32c::Value(data, n + 1); + if (actual != crc) { + delete[] buf; + s = Status::Corruption("block checksum mismatch"); + return s; + } + } + + switch (data[n]) { + case kNoCompression: + if (data != buf) { + // File implementation gave us pointer to some other data. + // Use it directly under the assumption that it will be live + // while the file is open. + delete[] buf; + result->data = Slice(data, n); + result->heap_allocated = false; + result->cachable = false; // Do not double-cache + } else { + result->data = Slice(buf, n); + result->heap_allocated = true; + result->cachable = true; + } + + // Ok + break; + case kSnappyCompression: { + size_t ulength = 0; + if (!port::Snappy_GetUncompressedLength(data, n, &ulength)) { + delete[] buf; + return Status::Corruption("corrupted compressed block contents"); + } + char* ubuf = new char[ulength]; + if (!port::Snappy_Uncompress(data, n, ubuf)) { + delete[] buf; + delete[] ubuf; + return Status::Corruption("corrupted compressed block contents"); + } + delete[] buf; + result->data = Slice(ubuf, ulength); + result->heap_allocated = true; + result->cachable = true; + break; + } + default: + delete[] buf; + return Status::Corruption("bad block type"); + } + + return Status::OK(); +} + +} // namespace leveldb diff --git a/src/leveldb/table/format.h b/src/leveldb/table/format.h new file mode 100644 index 0000000..6c0b80c --- /dev/null +++ b/src/leveldb/table/format.h @@ -0,0 +1,108 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_TABLE_FORMAT_H_ +#define STORAGE_LEVELDB_TABLE_FORMAT_H_ + +#include +#include +#include "leveldb/slice.h" +#include "leveldb/status.h" +#include "leveldb/table_builder.h" + +namespace leveldb { + +class Block; +class RandomAccessFile; +struct ReadOptions; + +// BlockHandle is a pointer to the extent of a file that stores a data +// block or a meta block. +class BlockHandle { + public: + BlockHandle(); + + // The offset of the block in the file. + uint64_t offset() const { return offset_; } + void set_offset(uint64_t offset) { offset_ = offset; } + + // The size of the stored block + uint64_t size() const { return size_; } + void set_size(uint64_t size) { size_ = size; } + + void EncodeTo(std::string* dst) const; + Status DecodeFrom(Slice* input); + + // Maximum encoding length of a BlockHandle + enum { kMaxEncodedLength = 10 + 10 }; + + private: + uint64_t offset_; + uint64_t size_; +}; + +// Footer encapsulates the fixed information stored at the tail +// end of every table file. +class Footer { + public: + Footer() { } + + // The block handle for the metaindex block of the table + const BlockHandle& metaindex_handle() const { return metaindex_handle_; } + void set_metaindex_handle(const BlockHandle& h) { metaindex_handle_ = h; } + + // The block handle for the index block of the table + const BlockHandle& index_handle() const { + return index_handle_; + } + void set_index_handle(const BlockHandle& h) { + index_handle_ = h; + } + + void EncodeTo(std::string* dst) const; + Status DecodeFrom(Slice* input); + + // Encoded length of a Footer. Note that the serialization of a + // Footer will always occupy exactly this many bytes. It consists + // of two block handles and a magic number. + enum { + kEncodedLength = 2*BlockHandle::kMaxEncodedLength + 8 + }; + + private: + BlockHandle metaindex_handle_; + BlockHandle index_handle_; +}; + +// kTableMagicNumber was picked by running +// echo http://code.google.com/p/leveldb/ | sha1sum +// and taking the leading 64 bits. +static const uint64_t kTableMagicNumber = 0xdb4775248b80fb57ull; + +// 1-byte type + 32-bit crc +static const size_t kBlockTrailerSize = 5; + +struct BlockContents { + Slice data; // Actual contents of data + bool cachable; // True iff data can be cached + bool heap_allocated; // True iff caller should delete[] data.data() +}; + +// Read the block identified by "handle" from "file". On failure +// return non-OK. On success fill *result and return OK. +extern Status ReadBlock(RandomAccessFile* file, + const ReadOptions& options, + const BlockHandle& handle, + BlockContents* result); + +// Implementation details follow. Clients should ignore, + +inline BlockHandle::BlockHandle() + : offset_(~static_cast(0)), + size_(~static_cast(0)) { +} + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_TABLE_FORMAT_H_ diff --git a/src/leveldb/table/iterator.cc b/src/leveldb/table/iterator.cc new file mode 100644 index 0000000..3d1c87f --- /dev/null +++ b/src/leveldb/table/iterator.cc @@ -0,0 +1,67 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/iterator.h" + +namespace leveldb { + +Iterator::Iterator() { + cleanup_.function = NULL; + cleanup_.next = NULL; +} + +Iterator::~Iterator() { + if (cleanup_.function != NULL) { + (*cleanup_.function)(cleanup_.arg1, cleanup_.arg2); + for (Cleanup* c = cleanup_.next; c != NULL; ) { + (*c->function)(c->arg1, c->arg2); + Cleanup* next = c->next; + delete c; + c = next; + } + } +} + +void Iterator::RegisterCleanup(CleanupFunction func, void* arg1, void* arg2) { + assert(func != NULL); + Cleanup* c; + if (cleanup_.function == NULL) { + c = &cleanup_; + } else { + c = new Cleanup; + c->next = cleanup_.next; + cleanup_.next = c; + } + c->function = func; + c->arg1 = arg1; + c->arg2 = arg2; +} + +namespace { +class EmptyIterator : public Iterator { + public: + EmptyIterator(const Status& s) : status_(s) { } + virtual bool Valid() const { return false; } + virtual void Seek(const Slice& target) { } + virtual void SeekToFirst() { } + virtual void SeekToLast() { } + virtual void Next() { assert(false); } + virtual void Prev() { assert(false); } + Slice key() const { assert(false); return Slice(); } + Slice value() const { assert(false); return Slice(); } + virtual Status status() const { return status_; } + private: + Status status_; +}; +} // namespace + +Iterator* NewEmptyIterator() { + return new EmptyIterator(Status::OK()); +} + +Iterator* NewErrorIterator(const Status& status) { + return new EmptyIterator(status); +} + +} // namespace leveldb diff --git a/src/leveldb/table/iterator_wrapper.h b/src/leveldb/table/iterator_wrapper.h new file mode 100644 index 0000000..9e16b3d --- /dev/null +++ b/src/leveldb/table/iterator_wrapper.h @@ -0,0 +1,63 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_TABLE_ITERATOR_WRAPPER_H_ +#define STORAGE_LEVELDB_TABLE_ITERATOR_WRAPPER_H_ + +namespace leveldb { + +// A internal wrapper class with an interface similar to Iterator that +// caches the valid() and key() results for an underlying iterator. +// This can help avoid virtual function calls and also gives better +// cache locality. +class IteratorWrapper { + public: + IteratorWrapper(): iter_(NULL), valid_(false) { } + explicit IteratorWrapper(Iterator* iter): iter_(NULL) { + Set(iter); + } + ~IteratorWrapper() { delete iter_; } + Iterator* iter() const { return iter_; } + + // Takes ownership of "iter" and will delete it when destroyed, or + // when Set() is invoked again. + void Set(Iterator* iter) { + delete iter_; + iter_ = iter; + if (iter_ == NULL) { + valid_ = false; + } else { + Update(); + } + } + + + // Iterator interface methods + bool Valid() const { return valid_; } + Slice key() const { assert(Valid()); return key_; } + Slice value() const { assert(Valid()); return iter_->value(); } + // Methods below require iter() != NULL + Status status() const { assert(iter_); return iter_->status(); } + void Next() { assert(iter_); iter_->Next(); Update(); } + void Prev() { assert(iter_); iter_->Prev(); Update(); } + void Seek(const Slice& k) { assert(iter_); iter_->Seek(k); Update(); } + void SeekToFirst() { assert(iter_); iter_->SeekToFirst(); Update(); } + void SeekToLast() { assert(iter_); iter_->SeekToLast(); Update(); } + + private: + void Update() { + valid_ = iter_->Valid(); + if (valid_) { + key_ = iter_->key(); + } + } + + Iterator* iter_; + bool valid_; + Slice key_; +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_TABLE_ITERATOR_WRAPPER_H_ diff --git a/src/leveldb/table/merger.cc b/src/leveldb/table/merger.cc new file mode 100644 index 0000000..2dde4dc --- /dev/null +++ b/src/leveldb/table/merger.cc @@ -0,0 +1,197 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "table/merger.h" + +#include "leveldb/comparator.h" +#include "leveldb/iterator.h" +#include "table/iterator_wrapper.h" + +namespace leveldb { + +namespace { +class MergingIterator : public Iterator { + public: + MergingIterator(const Comparator* comparator, Iterator** children, int n) + : comparator_(comparator), + children_(new IteratorWrapper[n]), + n_(n), + current_(NULL), + direction_(kForward) { + for (int i = 0; i < n; i++) { + children_[i].Set(children[i]); + } + } + + virtual ~MergingIterator() { + delete[] children_; + } + + virtual bool Valid() const { + return (current_ != NULL); + } + + virtual void SeekToFirst() { + for (int i = 0; i < n_; i++) { + children_[i].SeekToFirst(); + } + FindSmallest(); + direction_ = kForward; + } + + virtual void SeekToLast() { + for (int i = 0; i < n_; i++) { + children_[i].SeekToLast(); + } + FindLargest(); + direction_ = kReverse; + } + + virtual void Seek(const Slice& target) { + for (int i = 0; i < n_; i++) { + children_[i].Seek(target); + } + FindSmallest(); + direction_ = kForward; + } + + virtual void Next() { + assert(Valid()); + + // Ensure that all children are positioned after key(). + // If we are moving in the forward direction, it is already + // true for all of the non-current_ children since current_ is + // the smallest child and key() == current_->key(). Otherwise, + // we explicitly position the non-current_ children. + if (direction_ != kForward) { + for (int i = 0; i < n_; i++) { + IteratorWrapper* child = &children_[i]; + if (child != current_) { + child->Seek(key()); + if (child->Valid() && + comparator_->Compare(key(), child->key()) == 0) { + child->Next(); + } + } + } + direction_ = kForward; + } + + current_->Next(); + FindSmallest(); + } + + virtual void Prev() { + assert(Valid()); + + // Ensure that all children are positioned before key(). + // If we are moving in the reverse direction, it is already + // true for all of the non-current_ children since current_ is + // the largest child and key() == current_->key(). Otherwise, + // we explicitly position the non-current_ children. + if (direction_ != kReverse) { + for (int i = 0; i < n_; i++) { + IteratorWrapper* child = &children_[i]; + if (child != current_) { + child->Seek(key()); + if (child->Valid()) { + // Child is at first entry >= key(). Step back one to be < key() + child->Prev(); + } else { + // Child has no entries >= key(). Position at last entry. + child->SeekToLast(); + } + } + } + direction_ = kReverse; + } + + current_->Prev(); + FindLargest(); + } + + virtual Slice key() const { + assert(Valid()); + return current_->key(); + } + + virtual Slice value() const { + assert(Valid()); + return current_->value(); + } + + virtual Status status() const { + Status status; + for (int i = 0; i < n_; i++) { + status = children_[i].status(); + if (!status.ok()) { + break; + } + } + return status; + } + + private: + void FindSmallest(); + void FindLargest(); + + // We might want to use a heap in case there are lots of children. + // For now we use a simple array since we expect a very small number + // of children in leveldb. + const Comparator* comparator_; + IteratorWrapper* children_; + int n_; + IteratorWrapper* current_; + + // Which direction is the iterator moving? + enum Direction { + kForward, + kReverse + }; + Direction direction_; +}; + +void MergingIterator::FindSmallest() { + IteratorWrapper* smallest = NULL; + for (int i = 0; i < n_; i++) { + IteratorWrapper* child = &children_[i]; + if (child->Valid()) { + if (smallest == NULL) { + smallest = child; + } else if (comparator_->Compare(child->key(), smallest->key()) < 0) { + smallest = child; + } + } + } + current_ = smallest; +} + +void MergingIterator::FindLargest() { + IteratorWrapper* largest = NULL; + for (int i = n_-1; i >= 0; i--) { + IteratorWrapper* child = &children_[i]; + if (child->Valid()) { + if (largest == NULL) { + largest = child; + } else if (comparator_->Compare(child->key(), largest->key()) > 0) { + largest = child; + } + } + } + current_ = largest; +} +} // namespace + +Iterator* NewMergingIterator(const Comparator* cmp, Iterator** list, int n) { + assert(n >= 0); + if (n == 0) { + return NewEmptyIterator(); + } else if (n == 1) { + return list[0]; + } else { + return new MergingIterator(cmp, list, n); + } +} + +} // namespace leveldb diff --git a/src/leveldb/table/merger.h b/src/leveldb/table/merger.h new file mode 100644 index 0000000..91ddd80 --- /dev/null +++ b/src/leveldb/table/merger.h @@ -0,0 +1,26 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_TABLE_MERGER_H_ +#define STORAGE_LEVELDB_TABLE_MERGER_H_ + +namespace leveldb { + +class Comparator; +class Iterator; + +// Return an iterator that provided the union of the data in +// children[0,n-1]. Takes ownership of the child iterators and +// will delete them when the result iterator is deleted. +// +// The result does no duplicate suppression. I.e., if a particular +// key is present in K child iterators, it will be yielded K times. +// +// REQUIRES: n >= 0 +extern Iterator* NewMergingIterator( + const Comparator* comparator, Iterator** children, int n); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_TABLE_MERGER_H_ diff --git a/src/leveldb/table/table.cc b/src/leveldb/table/table.cc new file mode 100644 index 0000000..71c1756 --- /dev/null +++ b/src/leveldb/table/table.cc @@ -0,0 +1,275 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/table.h" + +#include "leveldb/cache.h" +#include "leveldb/comparator.h" +#include "leveldb/env.h" +#include "leveldb/filter_policy.h" +#include "leveldb/options.h" +#include "table/block.h" +#include "table/filter_block.h" +#include "table/format.h" +#include "table/two_level_iterator.h" +#include "util/coding.h" + +namespace leveldb { + +struct Table::Rep { + ~Rep() { + delete filter; + delete [] filter_data; + delete index_block; + } + + Options options; + Status status; + RandomAccessFile* file; + uint64_t cache_id; + FilterBlockReader* filter; + const char* filter_data; + + BlockHandle metaindex_handle; // Handle to metaindex_block: saved from footer + Block* index_block; +}; + +Status Table::Open(const Options& options, + RandomAccessFile* file, + uint64_t size, + Table** table) { + *table = NULL; + if (size < Footer::kEncodedLength) { + return Status::InvalidArgument("file is too short to be an sstable"); + } + + char footer_space[Footer::kEncodedLength]; + Slice footer_input; + Status s = file->Read(size - Footer::kEncodedLength, Footer::kEncodedLength, + &footer_input, footer_space); + if (!s.ok()) return s; + + Footer footer; + s = footer.DecodeFrom(&footer_input); + if (!s.ok()) return s; + + // Read the index block + BlockContents contents; + Block* index_block = NULL; + if (s.ok()) { + s = ReadBlock(file, ReadOptions(), footer.index_handle(), &contents); + if (s.ok()) { + index_block = new Block(contents); + } + } + + if (s.ok()) { + // We've successfully read the footer and the index block: we're + // ready to serve requests. + Rep* rep = new Table::Rep; + rep->options = options; + rep->file = file; + rep->metaindex_handle = footer.metaindex_handle(); + rep->index_block = index_block; + rep->cache_id = (options.block_cache ? options.block_cache->NewId() : 0); + rep->filter_data = NULL; + rep->filter = NULL; + *table = new Table(rep); + (*table)->ReadMeta(footer); + } else { + if (index_block) delete index_block; + } + + return s; +} + +void Table::ReadMeta(const Footer& footer) { + if (rep_->options.filter_policy == NULL) { + return; // Do not need any metadata + } + + // TODO(sanjay): Skip this if footer.metaindex_handle() size indicates + // it is an empty block. + ReadOptions opt; + BlockContents contents; + if (!ReadBlock(rep_->file, opt, footer.metaindex_handle(), &contents).ok()) { + // Do not propagate errors since meta info is not needed for operation + return; + } + Block* meta = new Block(contents); + + Iterator* iter = meta->NewIterator(BytewiseComparator()); + std::string key = "filter."; + key.append(rep_->options.filter_policy->Name()); + iter->Seek(key); + if (iter->Valid() && iter->key() == Slice(key)) { + ReadFilter(iter->value()); + } + delete iter; + delete meta; +} + +void Table::ReadFilter(const Slice& filter_handle_value) { + Slice v = filter_handle_value; + BlockHandle filter_handle; + if (!filter_handle.DecodeFrom(&v).ok()) { + return; + } + + // We might want to unify with ReadBlock() if we start + // requiring checksum verification in Table::Open. + ReadOptions opt; + BlockContents block; + if (!ReadBlock(rep_->file, opt, filter_handle, &block).ok()) { + return; + } + if (block.heap_allocated) { + rep_->filter_data = block.data.data(); // Will need to delete later + } + rep_->filter = new FilterBlockReader(rep_->options.filter_policy, block.data); +} + +Table::~Table() { + delete rep_; +} + +static void DeleteBlock(void* arg, void* ignored) { + delete reinterpret_cast(arg); +} + +static void DeleteCachedBlock(const Slice& key, void* value) { + Block* block = reinterpret_cast(value); + delete block; +} + +static void ReleaseBlock(void* arg, void* h) { + Cache* cache = reinterpret_cast(arg); + Cache::Handle* handle = reinterpret_cast(h); + cache->Release(handle); +} + +// Convert an index iterator value (i.e., an encoded BlockHandle) +// into an iterator over the contents of the corresponding block. +Iterator* Table::BlockReader(void* arg, + const ReadOptions& options, + const Slice& index_value) { + Table* table = reinterpret_cast(arg); + Cache* block_cache = table->rep_->options.block_cache; + Block* block = NULL; + Cache::Handle* cache_handle = NULL; + + BlockHandle handle; + Slice input = index_value; + Status s = handle.DecodeFrom(&input); + // We intentionally allow extra stuff in index_value so that we + // can add more features in the future. + + if (s.ok()) { + BlockContents contents; + if (block_cache != NULL) { + char cache_key_buffer[16]; + EncodeFixed64(cache_key_buffer, table->rep_->cache_id); + EncodeFixed64(cache_key_buffer+8, handle.offset()); + Slice key(cache_key_buffer, sizeof(cache_key_buffer)); + cache_handle = block_cache->Lookup(key); + if (cache_handle != NULL) { + block = reinterpret_cast(block_cache->Value(cache_handle)); + } else { + s = ReadBlock(table->rep_->file, options, handle, &contents); + if (s.ok()) { + block = new Block(contents); + if (contents.cachable && options.fill_cache) { + cache_handle = block_cache->Insert( + key, block, block->size(), &DeleteCachedBlock); + } + } + } + } else { + s = ReadBlock(table->rep_->file, options, handle, &contents); + if (s.ok()) { + block = new Block(contents); + } + } + } + + Iterator* iter; + if (block != NULL) { + iter = block->NewIterator(table->rep_->options.comparator); + if (cache_handle == NULL) { + iter->RegisterCleanup(&DeleteBlock, block, NULL); + } else { + iter->RegisterCleanup(&ReleaseBlock, block_cache, cache_handle); + } + } else { + iter = NewErrorIterator(s); + } + return iter; +} + +Iterator* Table::NewIterator(const ReadOptions& options) const { + return NewTwoLevelIterator( + rep_->index_block->NewIterator(rep_->options.comparator), + &Table::BlockReader, const_cast(this), options); +} + +Status Table::InternalGet(const ReadOptions& options, const Slice& k, + void* arg, + void (*saver)(void*, const Slice&, const Slice&)) { + Status s; + Iterator* iiter = rep_->index_block->NewIterator(rep_->options.comparator); + iiter->Seek(k); + if (iiter->Valid()) { + Slice handle_value = iiter->value(); + FilterBlockReader* filter = rep_->filter; + BlockHandle handle; + if (filter != NULL && + handle.DecodeFrom(&handle_value).ok() && + !filter->KeyMayMatch(handle.offset(), k)) { + // Not found + } else { + Iterator* block_iter = BlockReader(this, options, iiter->value()); + block_iter->Seek(k); + if (block_iter->Valid()) { + (*saver)(arg, block_iter->key(), block_iter->value()); + } + s = block_iter->status(); + delete block_iter; + } + } + if (s.ok()) { + s = iiter->status(); + } + delete iiter; + return s; +} + + +uint64_t Table::ApproximateOffsetOf(const Slice& key) const { + Iterator* index_iter = + rep_->index_block->NewIterator(rep_->options.comparator); + index_iter->Seek(key); + uint64_t result; + if (index_iter->Valid()) { + BlockHandle handle; + Slice input = index_iter->value(); + Status s = handle.DecodeFrom(&input); + if (s.ok()) { + result = handle.offset(); + } else { + // Strange: we can't decode the block handle in the index block. + // We'll just return the offset of the metaindex block, which is + // close to the whole file size for this case. + result = rep_->metaindex_handle.offset(); + } + } else { + // key is past the last key in the file. Approximate the offset + // by returning the offset of the metaindex block (which is + // right near the end of the file). + result = rep_->metaindex_handle.offset(); + } + delete index_iter; + return result; +} + +} // namespace leveldb diff --git a/src/leveldb/table/table_builder.cc b/src/leveldb/table/table_builder.cc new file mode 100644 index 0000000..62002c8 --- /dev/null +++ b/src/leveldb/table/table_builder.cc @@ -0,0 +1,270 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/table_builder.h" + +#include +#include "leveldb/comparator.h" +#include "leveldb/env.h" +#include "leveldb/filter_policy.h" +#include "leveldb/options.h" +#include "table/block_builder.h" +#include "table/filter_block.h" +#include "table/format.h" +#include "util/coding.h" +#include "util/crc32c.h" + +namespace leveldb { + +struct TableBuilder::Rep { + Options options; + Options index_block_options; + WritableFile* file; + uint64_t offset; + Status status; + BlockBuilder data_block; + BlockBuilder index_block; + std::string last_key; + int64_t num_entries; + bool closed; // Either Finish() or Abandon() has been called. + FilterBlockBuilder* filter_block; + + // We do not emit the index entry for a block until we have seen the + // first key for the next data block. This allows us to use shorter + // keys in the index block. For example, consider a block boundary + // between the keys "the quick brown fox" and "the who". We can use + // "the r" as the key for the index block entry since it is >= all + // entries in the first block and < all entries in subsequent + // blocks. + // + // Invariant: r->pending_index_entry is true only if data_block is empty. + bool pending_index_entry; + BlockHandle pending_handle; // Handle to add to index block + + std::string compressed_output; + + Rep(const Options& opt, WritableFile* f) + : options(opt), + index_block_options(opt), + file(f), + offset(0), + data_block(&options), + index_block(&index_block_options), + num_entries(0), + closed(false), + filter_block(opt.filter_policy == NULL ? NULL + : new FilterBlockBuilder(opt.filter_policy)), + pending_index_entry(false) { + index_block_options.block_restart_interval = 1; + } +}; + +TableBuilder::TableBuilder(const Options& options, WritableFile* file) + : rep_(new Rep(options, file)) { + if (rep_->filter_block != NULL) { + rep_->filter_block->StartBlock(0); + } +} + +TableBuilder::~TableBuilder() { + assert(rep_->closed); // Catch errors where caller forgot to call Finish() + delete rep_->filter_block; + delete rep_; +} + +Status TableBuilder::ChangeOptions(const Options& options) { + // Note: if more fields are added to Options, update + // this function to catch changes that should not be allowed to + // change in the middle of building a Table. + if (options.comparator != rep_->options.comparator) { + return Status::InvalidArgument("changing comparator while building table"); + } + + // Note that any live BlockBuilders point to rep_->options and therefore + // will automatically pick up the updated options. + rep_->options = options; + rep_->index_block_options = options; + rep_->index_block_options.block_restart_interval = 1; + return Status::OK(); +} + +void TableBuilder::Add(const Slice& key, const Slice& value) { + Rep* r = rep_; + assert(!r->closed); + if (!ok()) return; + if (r->num_entries > 0) { + assert(r->options.comparator->Compare(key, Slice(r->last_key)) > 0); + } + + if (r->pending_index_entry) { + assert(r->data_block.empty()); + r->options.comparator->FindShortestSeparator(&r->last_key, key); + std::string handle_encoding; + r->pending_handle.EncodeTo(&handle_encoding); + r->index_block.Add(r->last_key, Slice(handle_encoding)); + r->pending_index_entry = false; + } + + if (r->filter_block != NULL) { + r->filter_block->AddKey(key); + } + + r->last_key.assign(key.data(), key.size()); + r->num_entries++; + r->data_block.Add(key, value); + + const size_t estimated_block_size = r->data_block.CurrentSizeEstimate(); + if (estimated_block_size >= r->options.block_size) { + Flush(); + } +} + +void TableBuilder::Flush() { + Rep* r = rep_; + assert(!r->closed); + if (!ok()) return; + if (r->data_block.empty()) return; + assert(!r->pending_index_entry); + WriteBlock(&r->data_block, &r->pending_handle); + if (ok()) { + r->pending_index_entry = true; + r->status = r->file->Flush(); + } + if (r->filter_block != NULL) { + r->filter_block->StartBlock(r->offset); + } +} + +void TableBuilder::WriteBlock(BlockBuilder* block, BlockHandle* handle) { + // File format contains a sequence of blocks where each block has: + // block_data: uint8[n] + // type: uint8 + // crc: uint32 + assert(ok()); + Rep* r = rep_; + Slice raw = block->Finish(); + + Slice block_contents; + CompressionType type = r->options.compression; + // TODO(postrelease): Support more compression options: zlib? + switch (type) { + case kNoCompression: + block_contents = raw; + break; + + case kSnappyCompression: { + std::string* compressed = &r->compressed_output; + if (port::Snappy_Compress(raw.data(), raw.size(), compressed) && + compressed->size() < raw.size() - (raw.size() / 8u)) { + block_contents = *compressed; + } else { + // Snappy not supported, or compressed less than 12.5%, so just + // store uncompressed form + block_contents = raw; + type = kNoCompression; + } + break; + } + } + WriteRawBlock(block_contents, type, handle); + r->compressed_output.clear(); + block->Reset(); +} + +void TableBuilder::WriteRawBlock(const Slice& block_contents, + CompressionType type, + BlockHandle* handle) { + Rep* r = rep_; + handle->set_offset(r->offset); + handle->set_size(block_contents.size()); + r->status = r->file->Append(block_contents); + if (r->status.ok()) { + char trailer[kBlockTrailerSize]; + trailer[0] = type; + uint32_t crc = crc32c::Value(block_contents.data(), block_contents.size()); + crc = crc32c::Extend(crc, trailer, 1); // Extend crc to cover block type + EncodeFixed32(trailer+1, crc32c::Mask(crc)); + r->status = r->file->Append(Slice(trailer, kBlockTrailerSize)); + if (r->status.ok()) { + r->offset += block_contents.size() + kBlockTrailerSize; + } + } +} + +Status TableBuilder::status() const { + return rep_->status; +} + +Status TableBuilder::Finish() { + Rep* r = rep_; + Flush(); + assert(!r->closed); + r->closed = true; + + BlockHandle filter_block_handle, metaindex_block_handle, index_block_handle; + + // Write filter block + if (ok() && r->filter_block != NULL) { + WriteRawBlock(r->filter_block->Finish(), kNoCompression, + &filter_block_handle); + } + + // Write metaindex block + if (ok()) { + BlockBuilder meta_index_block(&r->options); + if (r->filter_block != NULL) { + // Add mapping from "filter.Name" to location of filter data + std::string key = "filter."; + key.append(r->options.filter_policy->Name()); + std::string handle_encoding; + filter_block_handle.EncodeTo(&handle_encoding); + meta_index_block.Add(key, handle_encoding); + } + + // TODO(postrelease): Add stats and other meta blocks + WriteBlock(&meta_index_block, &metaindex_block_handle); + } + + // Write index block + if (ok()) { + if (r->pending_index_entry) { + r->options.comparator->FindShortSuccessor(&r->last_key); + std::string handle_encoding; + r->pending_handle.EncodeTo(&handle_encoding); + r->index_block.Add(r->last_key, Slice(handle_encoding)); + r->pending_index_entry = false; + } + WriteBlock(&r->index_block, &index_block_handle); + } + + // Write footer + if (ok()) { + Footer footer; + footer.set_metaindex_handle(metaindex_block_handle); + footer.set_index_handle(index_block_handle); + std::string footer_encoding; + footer.EncodeTo(&footer_encoding); + r->status = r->file->Append(footer_encoding); + if (r->status.ok()) { + r->offset += footer_encoding.size(); + } + } + return r->status; +} + +void TableBuilder::Abandon() { + Rep* r = rep_; + assert(!r->closed); + r->closed = true; +} + +uint64_t TableBuilder::NumEntries() const { + return rep_->num_entries; +} + +uint64_t TableBuilder::FileSize() const { + return rep_->offset; +} + +} // namespace leveldb diff --git a/src/leveldb/table/table_test.cc b/src/leveldb/table/table_test.cc new file mode 100644 index 0000000..c723bf8 --- /dev/null +++ b/src/leveldb/table/table_test.cc @@ -0,0 +1,868 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/table.h" + +#include +#include +#include "db/dbformat.h" +#include "db/memtable.h" +#include "db/write_batch_internal.h" +#include "leveldb/db.h" +#include "leveldb/env.h" +#include "leveldb/iterator.h" +#include "leveldb/table_builder.h" +#include "table/block.h" +#include "table/block_builder.h" +#include "table/format.h" +#include "util/random.h" +#include "util/testharness.h" +#include "util/testutil.h" + +namespace leveldb { + +// Return reverse of "key". +// Used to test non-lexicographic comparators. +static std::string Reverse(const Slice& key) { + std::string str(key.ToString()); + std::string rev(""); + for (std::string::reverse_iterator rit = str.rbegin(); + rit != str.rend(); ++rit) { + rev.push_back(*rit); + } + return rev; +} + +namespace { +class ReverseKeyComparator : public Comparator { + public: + virtual const char* Name() const { + return "leveldb.ReverseBytewiseComparator"; + } + + virtual int Compare(const Slice& a, const Slice& b) const { + return BytewiseComparator()->Compare(Reverse(a), Reverse(b)); + } + + virtual void FindShortestSeparator( + std::string* start, + const Slice& limit) const { + std::string s = Reverse(*start); + std::string l = Reverse(limit); + BytewiseComparator()->FindShortestSeparator(&s, l); + *start = Reverse(s); + } + + virtual void FindShortSuccessor(std::string* key) const { + std::string s = Reverse(*key); + BytewiseComparator()->FindShortSuccessor(&s); + *key = Reverse(s); + } +}; +} // namespace +static ReverseKeyComparator reverse_key_comparator; + +static void Increment(const Comparator* cmp, std::string* key) { + if (cmp == BytewiseComparator()) { + key->push_back('\0'); + } else { + assert(cmp == &reverse_key_comparator); + std::string rev = Reverse(*key); + rev.push_back('\0'); + *key = Reverse(rev); + } +} + +// An STL comparator that uses a Comparator +namespace { +struct STLLessThan { + const Comparator* cmp; + + STLLessThan() : cmp(BytewiseComparator()) { } + STLLessThan(const Comparator* c) : cmp(c) { } + bool operator()(const std::string& a, const std::string& b) const { + return cmp->Compare(Slice(a), Slice(b)) < 0; + } +}; +} // namespace + +class StringSink: public WritableFile { + public: + ~StringSink() { } + + const std::string& contents() const { return contents_; } + + virtual Status Close() { return Status::OK(); } + virtual Status Flush() { return Status::OK(); } + virtual Status Sync() { return Status::OK(); } + + virtual Status Append(const Slice& data) { + contents_.append(data.data(), data.size()); + return Status::OK(); + } + + private: + std::string contents_; +}; + + +class StringSource: public RandomAccessFile { + public: + StringSource(const Slice& contents) + : contents_(contents.data(), contents.size()) { + } + + virtual ~StringSource() { } + + uint64_t Size() const { return contents_.size(); } + + virtual Status Read(uint64_t offset, size_t n, Slice* result, + char* scratch) const { + if (offset > contents_.size()) { + return Status::InvalidArgument("invalid Read offset"); + } + if (offset + n > contents_.size()) { + n = contents_.size() - offset; + } + memcpy(scratch, &contents_[offset], n); + *result = Slice(scratch, n); + return Status::OK(); + } + + private: + std::string contents_; +}; + +typedef std::map KVMap; + +// Helper class for tests to unify the interface between +// BlockBuilder/TableBuilder and Block/Table. +class Constructor { + public: + explicit Constructor(const Comparator* cmp) : data_(STLLessThan(cmp)) { } + virtual ~Constructor() { } + + void Add(const std::string& key, const Slice& value) { + data_[key] = value.ToString(); + } + + // Finish constructing the data structure with all the keys that have + // been added so far. Returns the keys in sorted order in "*keys" + // and stores the key/value pairs in "*kvmap" + void Finish(const Options& options, + std::vector* keys, + KVMap* kvmap) { + *kvmap = data_; + keys->clear(); + for (KVMap::const_iterator it = data_.begin(); + it != data_.end(); + ++it) { + keys->push_back(it->first); + } + data_.clear(); + Status s = FinishImpl(options, *kvmap); + ASSERT_TRUE(s.ok()) << s.ToString(); + } + + // Construct the data structure from the data in "data" + virtual Status FinishImpl(const Options& options, const KVMap& data) = 0; + + virtual Iterator* NewIterator() const = 0; + + virtual const KVMap& data() { return data_; } + + virtual DB* db() const { return NULL; } // Overridden in DBConstructor + + private: + KVMap data_; +}; + +class BlockConstructor: public Constructor { + public: + explicit BlockConstructor(const Comparator* cmp) + : Constructor(cmp), + comparator_(cmp), + block_(NULL) { } + ~BlockConstructor() { + delete block_; + } + virtual Status FinishImpl(const Options& options, const KVMap& data) { + delete block_; + block_ = NULL; + BlockBuilder builder(&options); + + for (KVMap::const_iterator it = data.begin(); + it != data.end(); + ++it) { + builder.Add(it->first, it->second); + } + // Open the block + data_ = builder.Finish().ToString(); + BlockContents contents; + contents.data = data_; + contents.cachable = false; + contents.heap_allocated = false; + block_ = new Block(contents); + return Status::OK(); + } + virtual Iterator* NewIterator() const { + return block_->NewIterator(comparator_); + } + + private: + const Comparator* comparator_; + std::string data_; + Block* block_; + + BlockConstructor(); +}; + +class TableConstructor: public Constructor { + public: + TableConstructor(const Comparator* cmp) + : Constructor(cmp), + source_(NULL), table_(NULL) { + } + ~TableConstructor() { + Reset(); + } + virtual Status FinishImpl(const Options& options, const KVMap& data) { + Reset(); + StringSink sink; + TableBuilder builder(options, &sink); + + for (KVMap::const_iterator it = data.begin(); + it != data.end(); + ++it) { + builder.Add(it->first, it->second); + ASSERT_TRUE(builder.status().ok()); + } + Status s = builder.Finish(); + ASSERT_TRUE(s.ok()) << s.ToString(); + + ASSERT_EQ(sink.contents().size(), builder.FileSize()); + + // Open the table + source_ = new StringSource(sink.contents()); + Options table_options; + table_options.comparator = options.comparator; + return Table::Open(table_options, source_, sink.contents().size(), &table_); + } + + virtual Iterator* NewIterator() const { + return table_->NewIterator(ReadOptions()); + } + + uint64_t ApproximateOffsetOf(const Slice& key) const { + return table_->ApproximateOffsetOf(key); + } + + private: + void Reset() { + delete table_; + delete source_; + table_ = NULL; + source_ = NULL; + } + + StringSource* source_; + Table* table_; + + TableConstructor(); +}; + +// A helper class that converts internal format keys into user keys +class KeyConvertingIterator: public Iterator { + public: + explicit KeyConvertingIterator(Iterator* iter) : iter_(iter) { } + virtual ~KeyConvertingIterator() { delete iter_; } + virtual bool Valid() const { return iter_->Valid(); } + virtual void Seek(const Slice& target) { + ParsedInternalKey ikey(target, kMaxSequenceNumber, kTypeValue); + std::string encoded; + AppendInternalKey(&encoded, ikey); + iter_->Seek(encoded); + } + virtual void SeekToFirst() { iter_->SeekToFirst(); } + virtual void SeekToLast() { iter_->SeekToLast(); } + virtual void Next() { iter_->Next(); } + virtual void Prev() { iter_->Prev(); } + + virtual Slice key() const { + assert(Valid()); + ParsedInternalKey key; + if (!ParseInternalKey(iter_->key(), &key)) { + status_ = Status::Corruption("malformed internal key"); + return Slice("corrupted key"); + } + return key.user_key; + } + + virtual Slice value() const { return iter_->value(); } + virtual Status status() const { + return status_.ok() ? iter_->status() : status_; + } + + private: + mutable Status status_; + Iterator* iter_; + + // No copying allowed + KeyConvertingIterator(const KeyConvertingIterator&); + void operator=(const KeyConvertingIterator&); +}; + +class MemTableConstructor: public Constructor { + public: + explicit MemTableConstructor(const Comparator* cmp) + : Constructor(cmp), + internal_comparator_(cmp) { + memtable_ = new MemTable(internal_comparator_); + memtable_->Ref(); + } + ~MemTableConstructor() { + memtable_->Unref(); + } + virtual Status FinishImpl(const Options& options, const KVMap& data) { + memtable_->Unref(); + memtable_ = new MemTable(internal_comparator_); + memtable_->Ref(); + int seq = 1; + for (KVMap::const_iterator it = data.begin(); + it != data.end(); + ++it) { + memtable_->Add(seq, kTypeValue, it->first, it->second); + seq++; + } + return Status::OK(); + } + virtual Iterator* NewIterator() const { + return new KeyConvertingIterator(memtable_->NewIterator()); + } + + private: + InternalKeyComparator internal_comparator_; + MemTable* memtable_; +}; + +class DBConstructor: public Constructor { + public: + explicit DBConstructor(const Comparator* cmp) + : Constructor(cmp), + comparator_(cmp) { + db_ = NULL; + NewDB(); + } + ~DBConstructor() { + delete db_; + } + virtual Status FinishImpl(const Options& options, const KVMap& data) { + delete db_; + db_ = NULL; + NewDB(); + for (KVMap::const_iterator it = data.begin(); + it != data.end(); + ++it) { + WriteBatch batch; + batch.Put(it->first, it->second); + ASSERT_TRUE(db_->Write(WriteOptions(), &batch).ok()); + } + return Status::OK(); + } + virtual Iterator* NewIterator() const { + return db_->NewIterator(ReadOptions()); + } + + virtual DB* db() const { return db_; } + + private: + void NewDB() { + std::string name = test::TmpDir() + "/table_testdb"; + + Options options; + options.comparator = comparator_; + Status status = DestroyDB(name, options); + ASSERT_TRUE(status.ok()) << status.ToString(); + + options.create_if_missing = true; + options.error_if_exists = true; + options.write_buffer_size = 10000; // Something small to force merging + status = DB::Open(options, name, &db_); + ASSERT_TRUE(status.ok()) << status.ToString(); + } + + const Comparator* comparator_; + DB* db_; +}; + +enum TestType { + TABLE_TEST, + BLOCK_TEST, + MEMTABLE_TEST, + DB_TEST +}; + +struct TestArgs { + TestType type; + bool reverse_compare; + int restart_interval; +}; + +static const TestArgs kTestArgList[] = { + { TABLE_TEST, false, 16 }, + { TABLE_TEST, false, 1 }, + { TABLE_TEST, false, 1024 }, + { TABLE_TEST, true, 16 }, + { TABLE_TEST, true, 1 }, + { TABLE_TEST, true, 1024 }, + + { BLOCK_TEST, false, 16 }, + { BLOCK_TEST, false, 1 }, + { BLOCK_TEST, false, 1024 }, + { BLOCK_TEST, true, 16 }, + { BLOCK_TEST, true, 1 }, + { BLOCK_TEST, true, 1024 }, + + // Restart interval does not matter for memtables + { MEMTABLE_TEST, false, 16 }, + { MEMTABLE_TEST, true, 16 }, + + // Do not bother with restart interval variations for DB + { DB_TEST, false, 16 }, + { DB_TEST, true, 16 }, +}; +static const int kNumTestArgs = sizeof(kTestArgList) / sizeof(kTestArgList[0]); + +class Harness { + public: + Harness() : constructor_(NULL) { } + + void Init(const TestArgs& args) { + delete constructor_; + constructor_ = NULL; + options_ = Options(); + + options_.block_restart_interval = args.restart_interval; + // Use shorter block size for tests to exercise block boundary + // conditions more. + options_.block_size = 256; + if (args.reverse_compare) { + options_.comparator = &reverse_key_comparator; + } + switch (args.type) { + case TABLE_TEST: + constructor_ = new TableConstructor(options_.comparator); + break; + case BLOCK_TEST: + constructor_ = new BlockConstructor(options_.comparator); + break; + case MEMTABLE_TEST: + constructor_ = new MemTableConstructor(options_.comparator); + break; + case DB_TEST: + constructor_ = new DBConstructor(options_.comparator); + break; + } + } + + ~Harness() { + delete constructor_; + } + + void Add(const std::string& key, const std::string& value) { + constructor_->Add(key, value); + } + + void Test(Random* rnd) { + std::vector keys; + KVMap data; + constructor_->Finish(options_, &keys, &data); + + TestForwardScan(keys, data); + TestBackwardScan(keys, data); + TestRandomAccess(rnd, keys, data); + } + + void TestForwardScan(const std::vector& keys, + const KVMap& data) { + Iterator* iter = constructor_->NewIterator(); + ASSERT_TRUE(!iter->Valid()); + iter->SeekToFirst(); + for (KVMap::const_iterator model_iter = data.begin(); + model_iter != data.end(); + ++model_iter) { + ASSERT_EQ(ToString(data, model_iter), ToString(iter)); + iter->Next(); + } + ASSERT_TRUE(!iter->Valid()); + delete iter; + } + + void TestBackwardScan(const std::vector& keys, + const KVMap& data) { + Iterator* iter = constructor_->NewIterator(); + ASSERT_TRUE(!iter->Valid()); + iter->SeekToLast(); + for (KVMap::const_reverse_iterator model_iter = data.rbegin(); + model_iter != data.rend(); + ++model_iter) { + ASSERT_EQ(ToString(data, model_iter), ToString(iter)); + iter->Prev(); + } + ASSERT_TRUE(!iter->Valid()); + delete iter; + } + + void TestRandomAccess(Random* rnd, + const std::vector& keys, + const KVMap& data) { + static const bool kVerbose = false; + Iterator* iter = constructor_->NewIterator(); + ASSERT_TRUE(!iter->Valid()); + KVMap::const_iterator model_iter = data.begin(); + if (kVerbose) fprintf(stderr, "---\n"); + for (int i = 0; i < 200; i++) { + const int toss = rnd->Uniform(5); + switch (toss) { + case 0: { + if (iter->Valid()) { + if (kVerbose) fprintf(stderr, "Next\n"); + iter->Next(); + ++model_iter; + ASSERT_EQ(ToString(data, model_iter), ToString(iter)); + } + break; + } + + case 1: { + if (kVerbose) fprintf(stderr, "SeekToFirst\n"); + iter->SeekToFirst(); + model_iter = data.begin(); + ASSERT_EQ(ToString(data, model_iter), ToString(iter)); + break; + } + + case 2: { + std::string key = PickRandomKey(rnd, keys); + model_iter = data.lower_bound(key); + if (kVerbose) fprintf(stderr, "Seek '%s'\n", + EscapeString(key).c_str()); + iter->Seek(Slice(key)); + ASSERT_EQ(ToString(data, model_iter), ToString(iter)); + break; + } + + case 3: { + if (iter->Valid()) { + if (kVerbose) fprintf(stderr, "Prev\n"); + iter->Prev(); + if (model_iter == data.begin()) { + model_iter = data.end(); // Wrap around to invalid value + } else { + --model_iter; + } + ASSERT_EQ(ToString(data, model_iter), ToString(iter)); + } + break; + } + + case 4: { + if (kVerbose) fprintf(stderr, "SeekToLast\n"); + iter->SeekToLast(); + if (keys.empty()) { + model_iter = data.end(); + } else { + std::string last = data.rbegin()->first; + model_iter = data.lower_bound(last); + } + ASSERT_EQ(ToString(data, model_iter), ToString(iter)); + break; + } + } + } + delete iter; + } + + std::string ToString(const KVMap& data, const KVMap::const_iterator& it) { + if (it == data.end()) { + return "END"; + } else { + return "'" + it->first + "->" + it->second + "'"; + } + } + + std::string ToString(const KVMap& data, + const KVMap::const_reverse_iterator& it) { + if (it == data.rend()) { + return "END"; + } else { + return "'" + it->first + "->" + it->second + "'"; + } + } + + std::string ToString(const Iterator* it) { + if (!it->Valid()) { + return "END"; + } else { + return "'" + it->key().ToString() + "->" + it->value().ToString() + "'"; + } + } + + std::string PickRandomKey(Random* rnd, const std::vector& keys) { + if (keys.empty()) { + return "foo"; + } else { + const int index = rnd->Uniform(keys.size()); + std::string result = keys[index]; + switch (rnd->Uniform(3)) { + case 0: + // Return an existing key + break; + case 1: { + // Attempt to return something smaller than an existing key + if (result.size() > 0 && result[result.size()-1] > '\0') { + result[result.size()-1]--; + } + break; + } + case 2: { + // Return something larger than an existing key + Increment(options_.comparator, &result); + break; + } + } + return result; + } + } + + // Returns NULL if not running against a DB + DB* db() const { return constructor_->db(); } + + private: + Options options_; + Constructor* constructor_; +}; + +// Test empty table/block. +TEST(Harness, Empty) { + for (int i = 0; i < kNumTestArgs; i++) { + Init(kTestArgList[i]); + Random rnd(test::RandomSeed() + 1); + Test(&rnd); + } +} + +// Special test for a block with no restart entries. The C++ leveldb +// code never generates such blocks, but the Java version of leveldb +// seems to. +TEST(Harness, ZeroRestartPointsInBlock) { + char data[sizeof(uint32_t)]; + memset(data, 0, sizeof(data)); + BlockContents contents; + contents.data = Slice(data, sizeof(data)); + contents.cachable = false; + contents.heap_allocated = false; + Block block(contents); + Iterator* iter = block.NewIterator(BytewiseComparator()); + iter->SeekToFirst(); + ASSERT_TRUE(!iter->Valid()); + iter->SeekToLast(); + ASSERT_TRUE(!iter->Valid()); + iter->Seek("foo"); + ASSERT_TRUE(!iter->Valid()); + delete iter; +} + +// Test the empty key +TEST(Harness, SimpleEmptyKey) { + for (int i = 0; i < kNumTestArgs; i++) { + Init(kTestArgList[i]); + Random rnd(test::RandomSeed() + 1); + Add("", "v"); + Test(&rnd); + } +} + +TEST(Harness, SimpleSingle) { + for (int i = 0; i < kNumTestArgs; i++) { + Init(kTestArgList[i]); + Random rnd(test::RandomSeed() + 2); + Add("abc", "v"); + Test(&rnd); + } +} + +TEST(Harness, SimpleMulti) { + for (int i = 0; i < kNumTestArgs; i++) { + Init(kTestArgList[i]); + Random rnd(test::RandomSeed() + 3); + Add("abc", "v"); + Add("abcd", "v"); + Add("ac", "v2"); + Test(&rnd); + } +} + +TEST(Harness, SimpleSpecialKey) { + for (int i = 0; i < kNumTestArgs; i++) { + Init(kTestArgList[i]); + Random rnd(test::RandomSeed() + 4); + Add("\xff\xff", "v3"); + Test(&rnd); + } +} + +TEST(Harness, Randomized) { + for (int i = 0; i < kNumTestArgs; i++) { + Init(kTestArgList[i]); + Random rnd(test::RandomSeed() + 5); + for (int num_entries = 0; num_entries < 2000; + num_entries += (num_entries < 50 ? 1 : 200)) { + if ((num_entries % 10) == 0) { + fprintf(stderr, "case %d of %d: num_entries = %d\n", + (i + 1), int(kNumTestArgs), num_entries); + } + for (int e = 0; e < num_entries; e++) { + std::string v; + Add(test::RandomKey(&rnd, rnd.Skewed(4)), + test::RandomString(&rnd, rnd.Skewed(5), &v).ToString()); + } + Test(&rnd); + } + } +} + +TEST(Harness, RandomizedLongDB) { + Random rnd(test::RandomSeed()); + TestArgs args = { DB_TEST, false, 16 }; + Init(args); + int num_entries = 100000; + for (int e = 0; e < num_entries; e++) { + std::string v; + Add(test::RandomKey(&rnd, rnd.Skewed(4)), + test::RandomString(&rnd, rnd.Skewed(5), &v).ToString()); + } + Test(&rnd); + + // We must have created enough data to force merging + int files = 0; + for (int level = 0; level < config::kNumLevels; level++) { + std::string value; + char name[100]; + snprintf(name, sizeof(name), "leveldb.num-files-at-level%d", level); + ASSERT_TRUE(db()->GetProperty(name, &value)); + files += atoi(value.c_str()); + } + ASSERT_GT(files, 0); +} + +class MemTableTest { }; + +TEST(MemTableTest, Simple) { + InternalKeyComparator cmp(BytewiseComparator()); + MemTable* memtable = new MemTable(cmp); + memtable->Ref(); + WriteBatch batch; + WriteBatchInternal::SetSequence(&batch, 100); + batch.Put(std::string("k1"), std::string("v1")); + batch.Put(std::string("k2"), std::string("v2")); + batch.Put(std::string("k3"), std::string("v3")); + batch.Put(std::string("largekey"), std::string("vlarge")); + ASSERT_TRUE(WriteBatchInternal::InsertInto(&batch, memtable).ok()); + + Iterator* iter = memtable->NewIterator(); + iter->SeekToFirst(); + while (iter->Valid()) { + fprintf(stderr, "key: '%s' -> '%s'\n", + iter->key().ToString().c_str(), + iter->value().ToString().c_str()); + iter->Next(); + } + + delete iter; + memtable->Unref(); +} + +static bool Between(uint64_t val, uint64_t low, uint64_t high) { + bool result = (val >= low) && (val <= high); + if (!result) { + fprintf(stderr, "Value %llu is not in range [%llu, %llu]\n", + (unsigned long long)(val), + (unsigned long long)(low), + (unsigned long long)(high)); + } + return result; +} + +class TableTest { }; + +TEST(TableTest, ApproximateOffsetOfPlain) { + TableConstructor c(BytewiseComparator()); + c.Add("k01", "hello"); + c.Add("k02", "hello2"); + c.Add("k03", std::string(10000, 'x')); + c.Add("k04", std::string(200000, 'x')); + c.Add("k05", std::string(300000, 'x')); + c.Add("k06", "hello3"); + c.Add("k07", std::string(100000, 'x')); + std::vector keys; + KVMap kvmap; + Options options; + options.block_size = 1024; + options.compression = kNoCompression; + c.Finish(options, &keys, &kvmap); + + ASSERT_TRUE(Between(c.ApproximateOffsetOf("abc"), 0, 0)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k01"), 0, 0)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k01a"), 0, 0)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k02"), 0, 0)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"), 0, 0)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"), 10000, 11000)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04a"), 210000, 211000)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k05"), 210000, 211000)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k06"), 510000, 511000)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k07"), 510000, 511000)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"), 610000, 612000)); + +} + +static bool SnappyCompressionSupported() { + std::string out; + Slice in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; + return port::Snappy_Compress(in.data(), in.size(), &out); +} + +TEST(TableTest, ApproximateOffsetOfCompressed) { + if (!SnappyCompressionSupported()) { + fprintf(stderr, "skipping compression tests\n"); + return; + } + + Random rnd(301); + TableConstructor c(BytewiseComparator()); + std::string tmp; + c.Add("k01", "hello"); + c.Add("k02", test::CompressibleString(&rnd, 0.25, 10000, &tmp)); + c.Add("k03", "hello3"); + c.Add("k04", test::CompressibleString(&rnd, 0.25, 10000, &tmp)); + std::vector keys; + KVMap kvmap; + Options options; + options.block_size = 1024; + options.compression = kSnappyCompression; + c.Finish(options, &keys, &kvmap); + + ASSERT_TRUE(Between(c.ApproximateOffsetOf("abc"), 0, 0)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k01"), 0, 0)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k02"), 0, 0)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"), 2000, 3000)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"), 2000, 3000)); + ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"), 4000, 6000)); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/table/two_level_iterator.cc b/src/leveldb/table/two_level_iterator.cc new file mode 100644 index 0000000..7822eba --- /dev/null +++ b/src/leveldb/table/two_level_iterator.cc @@ -0,0 +1,182 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "table/two_level_iterator.h" + +#include "leveldb/table.h" +#include "table/block.h" +#include "table/format.h" +#include "table/iterator_wrapper.h" + +namespace leveldb { + +namespace { + +typedef Iterator* (*BlockFunction)(void*, const ReadOptions&, const Slice&); + +class TwoLevelIterator: public Iterator { + public: + TwoLevelIterator( + Iterator* index_iter, + BlockFunction block_function, + void* arg, + const ReadOptions& options); + + virtual ~TwoLevelIterator(); + + virtual void Seek(const Slice& target); + virtual void SeekToFirst(); + virtual void SeekToLast(); + virtual void Next(); + virtual void Prev(); + + virtual bool Valid() const { + return data_iter_.Valid(); + } + virtual Slice key() const { + assert(Valid()); + return data_iter_.key(); + } + virtual Slice value() const { + assert(Valid()); + return data_iter_.value(); + } + virtual Status status() const { + // It'd be nice if status() returned a const Status& instead of a Status + if (!index_iter_.status().ok()) { + return index_iter_.status(); + } else if (data_iter_.iter() != NULL && !data_iter_.status().ok()) { + return data_iter_.status(); + } else { + return status_; + } + } + + private: + void SaveError(const Status& s) { + if (status_.ok() && !s.ok()) status_ = s; + } + void SkipEmptyDataBlocksForward(); + void SkipEmptyDataBlocksBackward(); + void SetDataIterator(Iterator* data_iter); + void InitDataBlock(); + + BlockFunction block_function_; + void* arg_; + const ReadOptions options_; + Status status_; + IteratorWrapper index_iter_; + IteratorWrapper data_iter_; // May be NULL + // If data_iter_ is non-NULL, then "data_block_handle_" holds the + // "index_value" passed to block_function_ to create the data_iter_. + std::string data_block_handle_; +}; + +TwoLevelIterator::TwoLevelIterator( + Iterator* index_iter, + BlockFunction block_function, + void* arg, + const ReadOptions& options) + : block_function_(block_function), + arg_(arg), + options_(options), + index_iter_(index_iter), + data_iter_(NULL) { +} + +TwoLevelIterator::~TwoLevelIterator() { +} + +void TwoLevelIterator::Seek(const Slice& target) { + index_iter_.Seek(target); + InitDataBlock(); + if (data_iter_.iter() != NULL) data_iter_.Seek(target); + SkipEmptyDataBlocksForward(); +} + +void TwoLevelIterator::SeekToFirst() { + index_iter_.SeekToFirst(); + InitDataBlock(); + if (data_iter_.iter() != NULL) data_iter_.SeekToFirst(); + SkipEmptyDataBlocksForward(); +} + +void TwoLevelIterator::SeekToLast() { + index_iter_.SeekToLast(); + InitDataBlock(); + if (data_iter_.iter() != NULL) data_iter_.SeekToLast(); + SkipEmptyDataBlocksBackward(); +} + +void TwoLevelIterator::Next() { + assert(Valid()); + data_iter_.Next(); + SkipEmptyDataBlocksForward(); +} + +void TwoLevelIterator::Prev() { + assert(Valid()); + data_iter_.Prev(); + SkipEmptyDataBlocksBackward(); +} + + +void TwoLevelIterator::SkipEmptyDataBlocksForward() { + while (data_iter_.iter() == NULL || !data_iter_.Valid()) { + // Move to next block + if (!index_iter_.Valid()) { + SetDataIterator(NULL); + return; + } + index_iter_.Next(); + InitDataBlock(); + if (data_iter_.iter() != NULL) data_iter_.SeekToFirst(); + } +} + +void TwoLevelIterator::SkipEmptyDataBlocksBackward() { + while (data_iter_.iter() == NULL || !data_iter_.Valid()) { + // Move to next block + if (!index_iter_.Valid()) { + SetDataIterator(NULL); + return; + } + index_iter_.Prev(); + InitDataBlock(); + if (data_iter_.iter() != NULL) data_iter_.SeekToLast(); + } +} + +void TwoLevelIterator::SetDataIterator(Iterator* data_iter) { + if (data_iter_.iter() != NULL) SaveError(data_iter_.status()); + data_iter_.Set(data_iter); +} + +void TwoLevelIterator::InitDataBlock() { + if (!index_iter_.Valid()) { + SetDataIterator(NULL); + } else { + Slice handle = index_iter_.value(); + if (data_iter_.iter() != NULL && handle.compare(data_block_handle_) == 0) { + // data_iter_ is already constructed with this iterator, so + // no need to change anything + } else { + Iterator* iter = (*block_function_)(arg_, options_, handle); + data_block_handle_.assign(handle.data(), handle.size()); + SetDataIterator(iter); + } + } +} + +} // namespace + +Iterator* NewTwoLevelIterator( + Iterator* index_iter, + BlockFunction block_function, + void* arg, + const ReadOptions& options) { + return new TwoLevelIterator(index_iter, block_function, arg, options); +} + +} // namespace leveldb diff --git a/src/leveldb/table/two_level_iterator.h b/src/leveldb/table/two_level_iterator.h new file mode 100644 index 0000000..629ca34 --- /dev/null +++ b/src/leveldb/table/two_level_iterator.h @@ -0,0 +1,34 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_TABLE_TWO_LEVEL_ITERATOR_H_ +#define STORAGE_LEVELDB_TABLE_TWO_LEVEL_ITERATOR_H_ + +#include "leveldb/iterator.h" + +namespace leveldb { + +struct ReadOptions; + +// Return a new two level iterator. A two-level iterator contains an +// index iterator whose values point to a sequence of blocks where +// each block is itself a sequence of key,value pairs. The returned +// two-level iterator yields the concatenation of all key/value pairs +// in the sequence of blocks. Takes ownership of "index_iter" and +// will delete it when no longer needed. +// +// Uses a supplied function to convert an index_iter value into +// an iterator over the contents of the corresponding block. +extern Iterator* NewTwoLevelIterator( + Iterator* index_iter, + Iterator* (*block_function)( + void* arg, + const ReadOptions& options, + const Slice& index_value), + void* arg, + const ReadOptions& options); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_TABLE_TWO_LEVEL_ITERATOR_H_ diff --git a/src/leveldb/util/arena.cc b/src/leveldb/util/arena.cc new file mode 100644 index 0000000..9367f71 --- /dev/null +++ b/src/leveldb/util/arena.cc @@ -0,0 +1,68 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "util/arena.h" +#include + +namespace leveldb { + +static const int kBlockSize = 4096; + +Arena::Arena() { + blocks_memory_ = 0; + alloc_ptr_ = NULL; // First allocation will allocate a block + alloc_bytes_remaining_ = 0; +} + +Arena::~Arena() { + for (size_t i = 0; i < blocks_.size(); i++) { + delete[] blocks_[i]; + } +} + +char* Arena::AllocateFallback(size_t bytes) { + if (bytes > kBlockSize / 4) { + // Object is more than a quarter of our block size. Allocate it separately + // to avoid wasting too much space in leftover bytes. + char* result = AllocateNewBlock(bytes); + return result; + } + + // We waste the remaining space in the current block. + alloc_ptr_ = AllocateNewBlock(kBlockSize); + alloc_bytes_remaining_ = kBlockSize; + + char* result = alloc_ptr_; + alloc_ptr_ += bytes; + alloc_bytes_remaining_ -= bytes; + return result; +} + +char* Arena::AllocateAligned(size_t bytes) { + const int align = (sizeof(void*) > 8) ? sizeof(void*) : 8; + assert((align & (align-1)) == 0); // Pointer size should be a power of 2 + size_t current_mod = reinterpret_cast(alloc_ptr_) & (align-1); + size_t slop = (current_mod == 0 ? 0 : align - current_mod); + size_t needed = bytes + slop; + char* result; + if (needed <= alloc_bytes_remaining_) { + result = alloc_ptr_ + slop; + alloc_ptr_ += needed; + alloc_bytes_remaining_ -= needed; + } else { + // AllocateFallback always returned aligned memory + result = AllocateFallback(bytes); + } + assert((reinterpret_cast(result) & (align-1)) == 0); + return result; +} + +char* Arena::AllocateNewBlock(size_t block_bytes) { + char* result = new char[block_bytes]; + blocks_memory_ += block_bytes; + blocks_.push_back(result); + return result; +} + +} // namespace leveldb diff --git a/src/leveldb/util/arena.h b/src/leveldb/util/arena.h new file mode 100644 index 0000000..73bbf1c --- /dev/null +++ b/src/leveldb/util/arena.h @@ -0,0 +1,68 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_UTIL_ARENA_H_ +#define STORAGE_LEVELDB_UTIL_ARENA_H_ + +#include +#include +#include +#include + +namespace leveldb { + +class Arena { + public: + Arena(); + ~Arena(); + + // Return a pointer to a newly allocated memory block of "bytes" bytes. + char* Allocate(size_t bytes); + + // Allocate memory with the normal alignment guarantees provided by malloc + char* AllocateAligned(size_t bytes); + + // Returns an estimate of the total memory usage of data allocated + // by the arena (including space allocated but not yet used for user + // allocations). + size_t MemoryUsage() const { + return blocks_memory_ + blocks_.capacity() * sizeof(char*); + } + + private: + char* AllocateFallback(size_t bytes); + char* AllocateNewBlock(size_t block_bytes); + + // Allocation state + char* alloc_ptr_; + size_t alloc_bytes_remaining_; + + // Array of new[] allocated memory blocks + std::vector blocks_; + + // Bytes of memory in blocks allocated so far + size_t blocks_memory_; + + // No copying allowed + Arena(const Arena&); + void operator=(const Arena&); +}; + +inline char* Arena::Allocate(size_t bytes) { + // The semantics of what to return are a bit messy if we allow + // 0-byte allocations, so we disallow them here (we don't need + // them for our internal use). + assert(bytes > 0); + if (bytes <= alloc_bytes_remaining_) { + char* result = alloc_ptr_; + alloc_ptr_ += bytes; + alloc_bytes_remaining_ -= bytes; + return result; + } + return AllocateFallback(bytes); +} + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_ARENA_H_ diff --git a/src/leveldb/util/arena_test.cc b/src/leveldb/util/arena_test.cc new file mode 100644 index 0000000..58e870e --- /dev/null +++ b/src/leveldb/util/arena_test.cc @@ -0,0 +1,68 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "util/arena.h" + +#include "util/random.h" +#include "util/testharness.h" + +namespace leveldb { + +class ArenaTest { }; + +TEST(ArenaTest, Empty) { + Arena arena; +} + +TEST(ArenaTest, Simple) { + std::vector > allocated; + Arena arena; + const int N = 100000; + size_t bytes = 0; + Random rnd(301); + for (int i = 0; i < N; i++) { + size_t s; + if (i % (N / 10) == 0) { + s = i; + } else { + s = rnd.OneIn(4000) ? rnd.Uniform(6000) : + (rnd.OneIn(10) ? rnd.Uniform(100) : rnd.Uniform(20)); + } + if (s == 0) { + // Our arena disallows size 0 allocations. + s = 1; + } + char* r; + if (rnd.OneIn(10)) { + r = arena.AllocateAligned(s); + } else { + r = arena.Allocate(s); + } + + for (size_t b = 0; b < s; b++) { + // Fill the "i"th allocation with a known bit pattern + r[b] = i % 256; + } + bytes += s; + allocated.push_back(std::make_pair(s, r)); + ASSERT_GE(arena.MemoryUsage(), bytes); + if (i > N/10) { + ASSERT_LE(arena.MemoryUsage(), bytes * 1.10); + } + } + for (size_t i = 0; i < allocated.size(); i++) { + size_t num_bytes = allocated[i].first; + const char* p = allocated[i].second; + for (size_t b = 0; b < num_bytes; b++) { + // Check the "i"th allocation for the known bit pattern + ASSERT_EQ(int(p[b]) & 0xff, i % 256); + } + } +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/util/bloom.cc b/src/leveldb/util/bloom.cc new file mode 100644 index 0000000..d7941cd --- /dev/null +++ b/src/leveldb/util/bloom.cc @@ -0,0 +1,95 @@ +// Copyright (c) 2012 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/filter_policy.h" + +#include "leveldb/slice.h" +#include "util/hash.h" + +namespace leveldb { + +namespace { +static uint32_t BloomHash(const Slice& key) { + return Hash(key.data(), key.size(), 0xbc9f1d34); +} + +class BloomFilterPolicy : public FilterPolicy { + private: + size_t bits_per_key_; + size_t k_; + + public: + explicit BloomFilterPolicy(int bits_per_key) + : bits_per_key_(bits_per_key) { + // We intentionally round down to reduce probing cost a little bit + k_ = static_cast(bits_per_key * 0.69); // 0.69 =~ ln(2) + if (k_ < 1) k_ = 1; + if (k_ > 30) k_ = 30; + } + + virtual const char* Name() const { + return "leveldb.BuiltinBloomFilter"; + } + + virtual void CreateFilter(const Slice* keys, int n, std::string* dst) const { + // Compute bloom filter size (in both bits and bytes) + size_t bits = n * bits_per_key_; + + // For small n, we can see a very high false positive rate. Fix it + // by enforcing a minimum bloom filter length. + if (bits < 64) bits = 64; + + size_t bytes = (bits + 7) / 8; + bits = bytes * 8; + + const size_t init_size = dst->size(); + dst->resize(init_size + bytes, 0); + dst->push_back(static_cast(k_)); // Remember # of probes in filter + char* array = &(*dst)[init_size]; + for (size_t i = 0; i < n; i++) { + // Use double-hashing to generate a sequence of hash values. + // See analysis in [Kirsch,Mitzenmacher 2006]. + uint32_t h = BloomHash(keys[i]); + const uint32_t delta = (h >> 17) | (h << 15); // Rotate right 17 bits + for (size_t j = 0; j < k_; j++) { + const uint32_t bitpos = h % bits; + array[bitpos/8] |= (1 << (bitpos % 8)); + h += delta; + } + } + } + + virtual bool KeyMayMatch(const Slice& key, const Slice& bloom_filter) const { + const size_t len = bloom_filter.size(); + if (len < 2) return false; + + const char* array = bloom_filter.data(); + const size_t bits = (len - 1) * 8; + + // Use the encoded k so that we can read filters generated by + // bloom filters created using different parameters. + const size_t k = array[len-1]; + if (k > 30) { + // Reserved for potentially new encodings for short bloom filters. + // Consider it a match. + return true; + } + + uint32_t h = BloomHash(key); + const uint32_t delta = (h >> 17) | (h << 15); // Rotate right 17 bits + for (size_t j = 0; j < k; j++) { + const uint32_t bitpos = h % bits; + if ((array[bitpos/8] & (1 << (bitpos % 8))) == 0) return false; + h += delta; + } + return true; + } +}; +} + +const FilterPolicy* NewBloomFilterPolicy(int bits_per_key) { + return new BloomFilterPolicy(bits_per_key); +} + +} // namespace leveldb diff --git a/src/leveldb/util/bloom_test.cc b/src/leveldb/util/bloom_test.cc new file mode 100644 index 0000000..77fb1b3 --- /dev/null +++ b/src/leveldb/util/bloom_test.cc @@ -0,0 +1,161 @@ +// Copyright (c) 2012 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/filter_policy.h" + +#include "util/coding.h" +#include "util/logging.h" +#include "util/testharness.h" +#include "util/testutil.h" + +namespace leveldb { + +static const int kVerbose = 1; + +static Slice Key(int i, char* buffer) { + EncodeFixed32(buffer, i); + return Slice(buffer, sizeof(uint32_t)); +} + +class BloomTest { + private: + const FilterPolicy* policy_; + std::string filter_; + std::vector keys_; + + public: + BloomTest() : policy_(NewBloomFilterPolicy(10)) { } + + ~BloomTest() { + delete policy_; + } + + void Reset() { + keys_.clear(); + filter_.clear(); + } + + void Add(const Slice& s) { + keys_.push_back(s.ToString()); + } + + void Build() { + std::vector key_slices; + for (size_t i = 0; i < keys_.size(); i++) { + key_slices.push_back(Slice(keys_[i])); + } + filter_.clear(); + policy_->CreateFilter(&key_slices[0], key_slices.size(), &filter_); + keys_.clear(); + if (kVerbose >= 2) DumpFilter(); + } + + size_t FilterSize() const { + return filter_.size(); + } + + void DumpFilter() { + fprintf(stderr, "F("); + for (size_t i = 0; i+1 < filter_.size(); i++) { + const unsigned int c = static_cast(filter_[i]); + for (int j = 0; j < 8; j++) { + fprintf(stderr, "%c", (c & (1 <KeyMayMatch(s, filter_); + } + + double FalsePositiveRate() { + char buffer[sizeof(int)]; + int result = 0; + for (int i = 0; i < 10000; i++) { + if (Matches(Key(i + 1000000000, buffer))) { + result++; + } + } + return result / 10000.0; + } +}; + +TEST(BloomTest, EmptyFilter) { + ASSERT_TRUE(! Matches("hello")); + ASSERT_TRUE(! Matches("world")); +} + +TEST(BloomTest, Small) { + Add("hello"); + Add("world"); + ASSERT_TRUE(Matches("hello")); + ASSERT_TRUE(Matches("world")); + ASSERT_TRUE(! Matches("x")); + ASSERT_TRUE(! Matches("foo")); +} + +static int NextLength(int length) { + if (length < 10) { + length += 1; + } else if (length < 100) { + length += 10; + } else if (length < 1000) { + length += 100; + } else { + length += 1000; + } + return length; +} + +TEST(BloomTest, VaryingLengths) { + char buffer[sizeof(int)]; + + // Count number of filters that significantly exceed the false positive rate + int mediocre_filters = 0; + int good_filters = 0; + + for (int length = 1; length <= 10000; length = NextLength(length)) { + Reset(); + for (int i = 0; i < length; i++) { + Add(Key(i, buffer)); + } + Build(); + + ASSERT_LE(FilterSize(), static_cast((length * 10 / 8) + 40)) + << length; + + // All added keys must match + for (int i = 0; i < length; i++) { + ASSERT_TRUE(Matches(Key(i, buffer))) + << "Length " << length << "; key " << i; + } + + // Check false positive rate + double rate = FalsePositiveRate(); + if (kVerbose >= 1) { + fprintf(stderr, "False positives: %5.2f%% @ length = %6d ; bytes = %6d\n", + rate*100.0, length, static_cast(FilterSize())); + } + ASSERT_LE(rate, 0.02); // Must not be over 2% + if (rate > 0.0125) mediocre_filters++; // Allowed, but not too often + else good_filters++; + } + if (kVerbose >= 1) { + fprintf(stderr, "Filters: %d good, %d mediocre\n", + good_filters, mediocre_filters); + } + ASSERT_LE(mediocre_filters, good_filters/5); +} + +// Different bits-per-byte + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/util/cache.cc b/src/leveldb/util/cache.cc new file mode 100644 index 0000000..8b197bc --- /dev/null +++ b/src/leveldb/util/cache.cc @@ -0,0 +1,325 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include +#include + +#include "leveldb/cache.h" +#include "port/port.h" +#include "util/hash.h" +#include "util/mutexlock.h" + +namespace leveldb { + +Cache::~Cache() { +} + +namespace { + +// LRU cache implementation + +// An entry is a variable length heap-allocated structure. Entries +// are kept in a circular doubly linked list ordered by access time. +struct LRUHandle { + void* value; + void (*deleter)(const Slice&, void* value); + LRUHandle* next_hash; + LRUHandle* next; + LRUHandle* prev; + size_t charge; // TODO(opt): Only allow uint32_t? + size_t key_length; + uint32_t refs; + uint32_t hash; // Hash of key(); used for fast sharding and comparisons + char key_data[1]; // Beginning of key + + Slice key() const { + // For cheaper lookups, we allow a temporary Handle object + // to store a pointer to a key in "value". + if (next == this) { + return *(reinterpret_cast(value)); + } else { + return Slice(key_data, key_length); + } + } +}; + +// We provide our own simple hash table since it removes a whole bunch +// of porting hacks and is also faster than some of the built-in hash +// table implementations in some of the compiler/runtime combinations +// we have tested. E.g., readrandom speeds up by ~5% over the g++ +// 4.4.3's builtin hashtable. +class HandleTable { + public: + HandleTable() : length_(0), elems_(0), list_(NULL) { Resize(); } + ~HandleTable() { delete[] list_; } + + LRUHandle* Lookup(const Slice& key, uint32_t hash) { + return *FindPointer(key, hash); + } + + LRUHandle* Insert(LRUHandle* h) { + LRUHandle** ptr = FindPointer(h->key(), h->hash); + LRUHandle* old = *ptr; + h->next_hash = (old == NULL ? NULL : old->next_hash); + *ptr = h; + if (old == NULL) { + ++elems_; + if (elems_ > length_) { + // Since each cache entry is fairly large, we aim for a small + // average linked list length (<= 1). + Resize(); + } + } + return old; + } + + LRUHandle* Remove(const Slice& key, uint32_t hash) { + LRUHandle** ptr = FindPointer(key, hash); + LRUHandle* result = *ptr; + if (result != NULL) { + *ptr = result->next_hash; + --elems_; + } + return result; + } + + private: + // The table consists of an array of buckets where each bucket is + // a linked list of cache entries that hash into the bucket. + uint32_t length_; + uint32_t elems_; + LRUHandle** list_; + + // Return a pointer to slot that points to a cache entry that + // matches key/hash. If there is no such cache entry, return a + // pointer to the trailing slot in the corresponding linked list. + LRUHandle** FindPointer(const Slice& key, uint32_t hash) { + LRUHandle** ptr = &list_[hash & (length_ - 1)]; + while (*ptr != NULL && + ((*ptr)->hash != hash || key != (*ptr)->key())) { + ptr = &(*ptr)->next_hash; + } + return ptr; + } + + void Resize() { + uint32_t new_length = 4; + while (new_length < elems_) { + new_length *= 2; + } + LRUHandle** new_list = new LRUHandle*[new_length]; + memset(new_list, 0, sizeof(new_list[0]) * new_length); + uint32_t count = 0; + for (uint32_t i = 0; i < length_; i++) { + LRUHandle* h = list_[i]; + while (h != NULL) { + LRUHandle* next = h->next_hash; + uint32_t hash = h->hash; + LRUHandle** ptr = &new_list[hash & (new_length - 1)]; + h->next_hash = *ptr; + *ptr = h; + h = next; + count++; + } + } + assert(elems_ == count); + delete[] list_; + list_ = new_list; + length_ = new_length; + } +}; + +// A single shard of sharded cache. +class LRUCache { + public: + LRUCache(); + ~LRUCache(); + + // Separate from constructor so caller can easily make an array of LRUCache + void SetCapacity(size_t capacity) { capacity_ = capacity; } + + // Like Cache methods, but with an extra "hash" parameter. + Cache::Handle* Insert(const Slice& key, uint32_t hash, + void* value, size_t charge, + void (*deleter)(const Slice& key, void* value)); + Cache::Handle* Lookup(const Slice& key, uint32_t hash); + void Release(Cache::Handle* handle); + void Erase(const Slice& key, uint32_t hash); + + private: + void LRU_Remove(LRUHandle* e); + void LRU_Append(LRUHandle* e); + void Unref(LRUHandle* e); + + // Initialized before use. + size_t capacity_; + + // mutex_ protects the following state. + port::Mutex mutex_; + size_t usage_; + + // Dummy head of LRU list. + // lru.prev is newest entry, lru.next is oldest entry. + LRUHandle lru_; + + HandleTable table_; +}; + +LRUCache::LRUCache() + : usage_(0) { + // Make empty circular linked list + lru_.next = &lru_; + lru_.prev = &lru_; +} + +LRUCache::~LRUCache() { + for (LRUHandle* e = lru_.next; e != &lru_; ) { + LRUHandle* next = e->next; + assert(e->refs == 1); // Error if caller has an unreleased handle + Unref(e); + e = next; + } +} + +void LRUCache::Unref(LRUHandle* e) { + assert(e->refs > 0); + e->refs--; + if (e->refs <= 0) { + usage_ -= e->charge; + (*e->deleter)(e->key(), e->value); + free(e); + } +} + +void LRUCache::LRU_Remove(LRUHandle* e) { + e->next->prev = e->prev; + e->prev->next = e->next; +} + +void LRUCache::LRU_Append(LRUHandle* e) { + // Make "e" newest entry by inserting just before lru_ + e->next = &lru_; + e->prev = lru_.prev; + e->prev->next = e; + e->next->prev = e; +} + +Cache::Handle* LRUCache::Lookup(const Slice& key, uint32_t hash) { + MutexLock l(&mutex_); + LRUHandle* e = table_.Lookup(key, hash); + if (e != NULL) { + e->refs++; + LRU_Remove(e); + LRU_Append(e); + } + return reinterpret_cast(e); +} + +void LRUCache::Release(Cache::Handle* handle) { + MutexLock l(&mutex_); + Unref(reinterpret_cast(handle)); +} + +Cache::Handle* LRUCache::Insert( + const Slice& key, uint32_t hash, void* value, size_t charge, + void (*deleter)(const Slice& key, void* value)) { + MutexLock l(&mutex_); + + LRUHandle* e = reinterpret_cast( + malloc(sizeof(LRUHandle)-1 + key.size())); + e->value = value; + e->deleter = deleter; + e->charge = charge; + e->key_length = key.size(); + e->hash = hash; + e->refs = 2; // One from LRUCache, one for the returned handle + memcpy(e->key_data, key.data(), key.size()); + LRU_Append(e); + usage_ += charge; + + LRUHandle* old = table_.Insert(e); + if (old != NULL) { + LRU_Remove(old); + Unref(old); + } + + while (usage_ > capacity_ && lru_.next != &lru_) { + LRUHandle* old = lru_.next; + LRU_Remove(old); + table_.Remove(old->key(), old->hash); + Unref(old); + } + + return reinterpret_cast(e); +} + +void LRUCache::Erase(const Slice& key, uint32_t hash) { + MutexLock l(&mutex_); + LRUHandle* e = table_.Remove(key, hash); + if (e != NULL) { + LRU_Remove(e); + Unref(e); + } +} + +static const int kNumShardBits = 4; +static const int kNumShards = 1 << kNumShardBits; + +class ShardedLRUCache : public Cache { + private: + LRUCache shard_[kNumShards]; + port::Mutex id_mutex_; + uint64_t last_id_; + + static inline uint32_t HashSlice(const Slice& s) { + return Hash(s.data(), s.size(), 0); + } + + static uint32_t Shard(uint32_t hash) { + return hash >> (32 - kNumShardBits); + } + + public: + explicit ShardedLRUCache(size_t capacity) + : last_id_(0) { + const size_t per_shard = (capacity + (kNumShards - 1)) / kNumShards; + for (int s = 0; s < kNumShards; s++) { + shard_[s].SetCapacity(per_shard); + } + } + virtual ~ShardedLRUCache() { } + virtual Handle* Insert(const Slice& key, void* value, size_t charge, + void (*deleter)(const Slice& key, void* value)) { + const uint32_t hash = HashSlice(key); + return shard_[Shard(hash)].Insert(key, hash, value, charge, deleter); + } + virtual Handle* Lookup(const Slice& key) { + const uint32_t hash = HashSlice(key); + return shard_[Shard(hash)].Lookup(key, hash); + } + virtual void Release(Handle* handle) { + LRUHandle* h = reinterpret_cast(handle); + shard_[Shard(h->hash)].Release(handle); + } + virtual void Erase(const Slice& key) { + const uint32_t hash = HashSlice(key); + shard_[Shard(hash)].Erase(key, hash); + } + virtual void* Value(Handle* handle) { + return reinterpret_cast(handle)->value; + } + virtual uint64_t NewId() { + MutexLock l(&id_mutex_); + return ++(last_id_); + } +}; + +} // end anonymous namespace + +Cache* NewLRUCache(size_t capacity) { + return new ShardedLRUCache(capacity); +} + +} // namespace leveldb diff --git a/src/leveldb/util/cache_test.cc b/src/leveldb/util/cache_test.cc new file mode 100644 index 0000000..4371671 --- /dev/null +++ b/src/leveldb/util/cache_test.cc @@ -0,0 +1,186 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/cache.h" + +#include +#include "util/coding.h" +#include "util/testharness.h" + +namespace leveldb { + +// Conversions between numeric keys/values and the types expected by Cache. +static std::string EncodeKey(int k) { + std::string result; + PutFixed32(&result, k); + return result; +} +static int DecodeKey(const Slice& k) { + assert(k.size() == 4); + return DecodeFixed32(k.data()); +} +static void* EncodeValue(uintptr_t v) { return reinterpret_cast(v); } +static int DecodeValue(void* v) { return reinterpret_cast(v); } + +class CacheTest { + public: + static CacheTest* current_; + + static void Deleter(const Slice& key, void* v) { + current_->deleted_keys_.push_back(DecodeKey(key)); + current_->deleted_values_.push_back(DecodeValue(v)); + } + + static const int kCacheSize = 1000; + std::vector deleted_keys_; + std::vector deleted_values_; + Cache* cache_; + + CacheTest() : cache_(NewLRUCache(kCacheSize)) { + current_ = this; + } + + ~CacheTest() { + delete cache_; + } + + int Lookup(int key) { + Cache::Handle* handle = cache_->Lookup(EncodeKey(key)); + const int r = (handle == NULL) ? -1 : DecodeValue(cache_->Value(handle)); + if (handle != NULL) { + cache_->Release(handle); + } + return r; + } + + void Insert(int key, int value, int charge = 1) { + cache_->Release(cache_->Insert(EncodeKey(key), EncodeValue(value), charge, + &CacheTest::Deleter)); + } + + void Erase(int key) { + cache_->Erase(EncodeKey(key)); + } +}; +CacheTest* CacheTest::current_; + +TEST(CacheTest, HitAndMiss) { + ASSERT_EQ(-1, Lookup(100)); + + Insert(100, 101); + ASSERT_EQ(101, Lookup(100)); + ASSERT_EQ(-1, Lookup(200)); + ASSERT_EQ(-1, Lookup(300)); + + Insert(200, 201); + ASSERT_EQ(101, Lookup(100)); + ASSERT_EQ(201, Lookup(200)); + ASSERT_EQ(-1, Lookup(300)); + + Insert(100, 102); + ASSERT_EQ(102, Lookup(100)); + ASSERT_EQ(201, Lookup(200)); + ASSERT_EQ(-1, Lookup(300)); + + ASSERT_EQ(1, deleted_keys_.size()); + ASSERT_EQ(100, deleted_keys_[0]); + ASSERT_EQ(101, deleted_values_[0]); +} + +TEST(CacheTest, Erase) { + Erase(200); + ASSERT_EQ(0, deleted_keys_.size()); + + Insert(100, 101); + Insert(200, 201); + Erase(100); + ASSERT_EQ(-1, Lookup(100)); + ASSERT_EQ(201, Lookup(200)); + ASSERT_EQ(1, deleted_keys_.size()); + ASSERT_EQ(100, deleted_keys_[0]); + ASSERT_EQ(101, deleted_values_[0]); + + Erase(100); + ASSERT_EQ(-1, Lookup(100)); + ASSERT_EQ(201, Lookup(200)); + ASSERT_EQ(1, deleted_keys_.size()); +} + +TEST(CacheTest, EntriesArePinned) { + Insert(100, 101); + Cache::Handle* h1 = cache_->Lookup(EncodeKey(100)); + ASSERT_EQ(101, DecodeValue(cache_->Value(h1))); + + Insert(100, 102); + Cache::Handle* h2 = cache_->Lookup(EncodeKey(100)); + ASSERT_EQ(102, DecodeValue(cache_->Value(h2))); + ASSERT_EQ(0, deleted_keys_.size()); + + cache_->Release(h1); + ASSERT_EQ(1, deleted_keys_.size()); + ASSERT_EQ(100, deleted_keys_[0]); + ASSERT_EQ(101, deleted_values_[0]); + + Erase(100); + ASSERT_EQ(-1, Lookup(100)); + ASSERT_EQ(1, deleted_keys_.size()); + + cache_->Release(h2); + ASSERT_EQ(2, deleted_keys_.size()); + ASSERT_EQ(100, deleted_keys_[1]); + ASSERT_EQ(102, deleted_values_[1]); +} + +TEST(CacheTest, EvictionPolicy) { + Insert(100, 101); + Insert(200, 201); + + // Frequently used entry must be kept around + for (int i = 0; i < kCacheSize + 100; i++) { + Insert(1000+i, 2000+i); + ASSERT_EQ(2000+i, Lookup(1000+i)); + ASSERT_EQ(101, Lookup(100)); + } + ASSERT_EQ(101, Lookup(100)); + ASSERT_EQ(-1, Lookup(200)); +} + +TEST(CacheTest, HeavyEntries) { + // Add a bunch of light and heavy entries and then count the combined + // size of items still in the cache, which must be approximately the + // same as the total capacity. + const int kLight = 1; + const int kHeavy = 10; + int added = 0; + int index = 0; + while (added < 2*kCacheSize) { + const int weight = (index & 1) ? kLight : kHeavy; + Insert(index, 1000+index, weight); + added += weight; + index++; + } + + int cached_weight = 0; + for (int i = 0; i < index; i++) { + const int weight = (i & 1 ? kLight : kHeavy); + int r = Lookup(i); + if (r >= 0) { + cached_weight += weight; + ASSERT_EQ(1000+i, r); + } + } + ASSERT_LE(cached_weight, kCacheSize + kCacheSize/10); +} + +TEST(CacheTest, NewId) { + uint64_t a = cache_->NewId(); + uint64_t b = cache_->NewId(); + ASSERT_NE(a, b); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/util/coding.cc b/src/leveldb/util/coding.cc new file mode 100644 index 0000000..21e3186 --- /dev/null +++ b/src/leveldb/util/coding.cc @@ -0,0 +1,194 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "util/coding.h" + +namespace leveldb { + +void EncodeFixed32(char* buf, uint32_t value) { + if (port::kLittleEndian) { + memcpy(buf, &value, sizeof(value)); + } else { + buf[0] = value & 0xff; + buf[1] = (value >> 8) & 0xff; + buf[2] = (value >> 16) & 0xff; + buf[3] = (value >> 24) & 0xff; + } +} + +void EncodeFixed64(char* buf, uint64_t value) { + if (port::kLittleEndian) { + memcpy(buf, &value, sizeof(value)); + } else { + buf[0] = value & 0xff; + buf[1] = (value >> 8) & 0xff; + buf[2] = (value >> 16) & 0xff; + buf[3] = (value >> 24) & 0xff; + buf[4] = (value >> 32) & 0xff; + buf[5] = (value >> 40) & 0xff; + buf[6] = (value >> 48) & 0xff; + buf[7] = (value >> 56) & 0xff; + } +} + +void PutFixed32(std::string* dst, uint32_t value) { + char buf[sizeof(value)]; + EncodeFixed32(buf, value); + dst->append(buf, sizeof(buf)); +} + +void PutFixed64(std::string* dst, uint64_t value) { + char buf[sizeof(value)]; + EncodeFixed64(buf, value); + dst->append(buf, sizeof(buf)); +} + +char* EncodeVarint32(char* dst, uint32_t v) { + // Operate on characters as unsigneds + unsigned char* ptr = reinterpret_cast(dst); + static const int B = 128; + if (v < (1<<7)) { + *(ptr++) = v; + } else if (v < (1<<14)) { + *(ptr++) = v | B; + *(ptr++) = v>>7; + } else if (v < (1<<21)) { + *(ptr++) = v | B; + *(ptr++) = (v>>7) | B; + *(ptr++) = v>>14; + } else if (v < (1<<28)) { + *(ptr++) = v | B; + *(ptr++) = (v>>7) | B; + *(ptr++) = (v>>14) | B; + *(ptr++) = v>>21; + } else { + *(ptr++) = v | B; + *(ptr++) = (v>>7) | B; + *(ptr++) = (v>>14) | B; + *(ptr++) = (v>>21) | B; + *(ptr++) = v>>28; + } + return reinterpret_cast(ptr); +} + +void PutVarint32(std::string* dst, uint32_t v) { + char buf[5]; + char* ptr = EncodeVarint32(buf, v); + dst->append(buf, ptr - buf); +} + +char* EncodeVarint64(char* dst, uint64_t v) { + static const int B = 128; + unsigned char* ptr = reinterpret_cast(dst); + while (v >= B) { + *(ptr++) = (v & (B-1)) | B; + v >>= 7; + } + *(ptr++) = static_cast(v); + return reinterpret_cast(ptr); +} + +void PutVarint64(std::string* dst, uint64_t v) { + char buf[10]; + char* ptr = EncodeVarint64(buf, v); + dst->append(buf, ptr - buf); +} + +void PutLengthPrefixedSlice(std::string* dst, const Slice& value) { + PutVarint32(dst, value.size()); + dst->append(value.data(), value.size()); +} + +int VarintLength(uint64_t v) { + int len = 1; + while (v >= 128) { + v >>= 7; + len++; + } + return len; +} + +const char* GetVarint32PtrFallback(const char* p, + const char* limit, + uint32_t* value) { + uint32_t result = 0; + for (uint32_t shift = 0; shift <= 28 && p < limit; shift += 7) { + uint32_t byte = *(reinterpret_cast(p)); + p++; + if (byte & 128) { + // More bytes are present + result |= ((byte & 127) << shift); + } else { + result |= (byte << shift); + *value = result; + return reinterpret_cast(p); + } + } + return NULL; +} + +bool GetVarint32(Slice* input, uint32_t* value) { + const char* p = input->data(); + const char* limit = p + input->size(); + const char* q = GetVarint32Ptr(p, limit, value); + if (q == NULL) { + return false; + } else { + *input = Slice(q, limit - q); + return true; + } +} + +const char* GetVarint64Ptr(const char* p, const char* limit, uint64_t* value) { + uint64_t result = 0; + for (uint32_t shift = 0; shift <= 63 && p < limit; shift += 7) { + uint64_t byte = *(reinterpret_cast(p)); + p++; + if (byte & 128) { + // More bytes are present + result |= ((byte & 127) << shift); + } else { + result |= (byte << shift); + *value = result; + return reinterpret_cast(p); + } + } + return NULL; +} + +bool GetVarint64(Slice* input, uint64_t* value) { + const char* p = input->data(); + const char* limit = p + input->size(); + const char* q = GetVarint64Ptr(p, limit, value); + if (q == NULL) { + return false; + } else { + *input = Slice(q, limit - q); + return true; + } +} + +const char* GetLengthPrefixedSlice(const char* p, const char* limit, + Slice* result) { + uint32_t len; + p = GetVarint32Ptr(p, limit, &len); + if (p == NULL) return NULL; + if (p + len > limit) return NULL; + *result = Slice(p, len); + return p + len; +} + +bool GetLengthPrefixedSlice(Slice* input, Slice* result) { + uint32_t len; + if (GetVarint32(input, &len) && + input->size() >= len) { + *result = Slice(input->data(), len); + input->remove_prefix(len); + return true; + } else { + return false; + } +} + +} // namespace leveldb diff --git a/src/leveldb/util/coding.h b/src/leveldb/util/coding.h new file mode 100644 index 0000000..3993c4a --- /dev/null +++ b/src/leveldb/util/coding.h @@ -0,0 +1,104 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// Endian-neutral encoding: +// * Fixed-length numbers are encoded with least-significant byte first +// * In addition we support variable length "varint" encoding +// * Strings are encoded prefixed by their length in varint format + +#ifndef STORAGE_LEVELDB_UTIL_CODING_H_ +#define STORAGE_LEVELDB_UTIL_CODING_H_ + +#include +#include +#include +#include "leveldb/slice.h" +#include "port/port.h" + +namespace leveldb { + +// Standard Put... routines append to a string +extern void PutFixed32(std::string* dst, uint32_t value); +extern void PutFixed64(std::string* dst, uint64_t value); +extern void PutVarint32(std::string* dst, uint32_t value); +extern void PutVarint64(std::string* dst, uint64_t value); +extern void PutLengthPrefixedSlice(std::string* dst, const Slice& value); + +// Standard Get... routines parse a value from the beginning of a Slice +// and advance the slice past the parsed value. +extern bool GetVarint32(Slice* input, uint32_t* value); +extern bool GetVarint64(Slice* input, uint64_t* value); +extern bool GetLengthPrefixedSlice(Slice* input, Slice* result); + +// Pointer-based variants of GetVarint... These either store a value +// in *v and return a pointer just past the parsed value, or return +// NULL on error. These routines only look at bytes in the range +// [p..limit-1] +extern const char* GetVarint32Ptr(const char* p,const char* limit, uint32_t* v); +extern const char* GetVarint64Ptr(const char* p,const char* limit, uint64_t* v); + +// Returns the length of the varint32 or varint64 encoding of "v" +extern int VarintLength(uint64_t v); + +// Lower-level versions of Put... that write directly into a character buffer +// REQUIRES: dst has enough space for the value being written +extern void EncodeFixed32(char* dst, uint32_t value); +extern void EncodeFixed64(char* dst, uint64_t value); + +// Lower-level versions of Put... that write directly into a character buffer +// and return a pointer just past the last byte written. +// REQUIRES: dst has enough space for the value being written +extern char* EncodeVarint32(char* dst, uint32_t value); +extern char* EncodeVarint64(char* dst, uint64_t value); + +// Lower-level versions of Get... that read directly from a character buffer +// without any bounds checking. + +inline uint32_t DecodeFixed32(const char* ptr) { + if (port::kLittleEndian) { + // Load the raw bytes + uint32_t result; + memcpy(&result, ptr, sizeof(result)); // gcc optimizes this to a plain load + return result; + } else { + return ((static_cast(static_cast(ptr[0]))) + | (static_cast(static_cast(ptr[1])) << 8) + | (static_cast(static_cast(ptr[2])) << 16) + | (static_cast(static_cast(ptr[3])) << 24)); + } +} + +inline uint64_t DecodeFixed64(const char* ptr) { + if (port::kLittleEndian) { + // Load the raw bytes + uint64_t result; + memcpy(&result, ptr, sizeof(result)); // gcc optimizes this to a plain load + return result; + } else { + uint64_t lo = DecodeFixed32(ptr); + uint64_t hi = DecodeFixed32(ptr + 4); + return (hi << 32) | lo; + } +} + +// Internal routine for use by fallback path of GetVarint32Ptr +extern const char* GetVarint32PtrFallback(const char* p, + const char* limit, + uint32_t* value); +inline const char* GetVarint32Ptr(const char* p, + const char* limit, + uint32_t* value) { + if (p < limit) { + uint32_t result = *(reinterpret_cast(p)); + if ((result & 128) == 0) { + *value = result; + return p + 1; + } + } + return GetVarint32PtrFallback(p, limit, value); +} + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_CODING_H_ diff --git a/src/leveldb/util/coding_test.cc b/src/leveldb/util/coding_test.cc new file mode 100644 index 0000000..521541e --- /dev/null +++ b/src/leveldb/util/coding_test.cc @@ -0,0 +1,196 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "util/coding.h" + +#include "util/testharness.h" + +namespace leveldb { + +class Coding { }; + +TEST(Coding, Fixed32) { + std::string s; + for (uint32_t v = 0; v < 100000; v++) { + PutFixed32(&s, v); + } + + const char* p = s.data(); + for (uint32_t v = 0; v < 100000; v++) { + uint32_t actual = DecodeFixed32(p); + ASSERT_EQ(v, actual); + p += sizeof(uint32_t); + } +} + +TEST(Coding, Fixed64) { + std::string s; + for (int power = 0; power <= 63; power++) { + uint64_t v = static_cast(1) << power; + PutFixed64(&s, v - 1); + PutFixed64(&s, v + 0); + PutFixed64(&s, v + 1); + } + + const char* p = s.data(); + for (int power = 0; power <= 63; power++) { + uint64_t v = static_cast(1) << power; + uint64_t actual; + actual = DecodeFixed64(p); + ASSERT_EQ(v-1, actual); + p += sizeof(uint64_t); + + actual = DecodeFixed64(p); + ASSERT_EQ(v+0, actual); + p += sizeof(uint64_t); + + actual = DecodeFixed64(p); + ASSERT_EQ(v+1, actual); + p += sizeof(uint64_t); + } +} + +// Test that encoding routines generate little-endian encodings +TEST(Coding, EncodingOutput) { + std::string dst; + PutFixed32(&dst, 0x04030201); + ASSERT_EQ(4, dst.size()); + ASSERT_EQ(0x01, static_cast(dst[0])); + ASSERT_EQ(0x02, static_cast(dst[1])); + ASSERT_EQ(0x03, static_cast(dst[2])); + ASSERT_EQ(0x04, static_cast(dst[3])); + + dst.clear(); + PutFixed64(&dst, 0x0807060504030201ull); + ASSERT_EQ(8, dst.size()); + ASSERT_EQ(0x01, static_cast(dst[0])); + ASSERT_EQ(0x02, static_cast(dst[1])); + ASSERT_EQ(0x03, static_cast(dst[2])); + ASSERT_EQ(0x04, static_cast(dst[3])); + ASSERT_EQ(0x05, static_cast(dst[4])); + ASSERT_EQ(0x06, static_cast(dst[5])); + ASSERT_EQ(0x07, static_cast(dst[6])); + ASSERT_EQ(0x08, static_cast(dst[7])); +} + +TEST(Coding, Varint32) { + std::string s; + for (uint32_t i = 0; i < (32 * 32); i++) { + uint32_t v = (i / 32) << (i % 32); + PutVarint32(&s, v); + } + + const char* p = s.data(); + const char* limit = p + s.size(); + for (uint32_t i = 0; i < (32 * 32); i++) { + uint32_t expected = (i / 32) << (i % 32); + uint32_t actual; + const char* start = p; + p = GetVarint32Ptr(p, limit, &actual); + ASSERT_TRUE(p != NULL); + ASSERT_EQ(expected, actual); + ASSERT_EQ(VarintLength(actual), p - start); + } + ASSERT_EQ(p, s.data() + s.size()); +} + +TEST(Coding, Varint64) { + // Construct the list of values to check + std::vector values; + // Some special values + values.push_back(0); + values.push_back(100); + values.push_back(~static_cast(0)); + values.push_back(~static_cast(0) - 1); + for (uint32_t k = 0; k < 64; k++) { + // Test values near powers of two + const uint64_t power = 1ull << k; + values.push_back(power); + values.push_back(power-1); + values.push_back(power+1); + } + + std::string s; + for (size_t i = 0; i < values.size(); i++) { + PutVarint64(&s, values[i]); + } + + const char* p = s.data(); + const char* limit = p + s.size(); + for (size_t i = 0; i < values.size(); i++) { + ASSERT_TRUE(p < limit); + uint64_t actual; + const char* start = p; + p = GetVarint64Ptr(p, limit, &actual); + ASSERT_TRUE(p != NULL); + ASSERT_EQ(values[i], actual); + ASSERT_EQ(VarintLength(actual), p - start); + } + ASSERT_EQ(p, limit); + +} + +TEST(Coding, Varint32Overflow) { + uint32_t result; + std::string input("\x81\x82\x83\x84\x85\x11"); + ASSERT_TRUE(GetVarint32Ptr(input.data(), input.data() + input.size(), &result) + == NULL); +} + +TEST(Coding, Varint32Truncation) { + uint32_t large_value = (1u << 31) + 100; + std::string s; + PutVarint32(&s, large_value); + uint32_t result; + for (size_t len = 0; len < s.size() - 1; len++) { + ASSERT_TRUE(GetVarint32Ptr(s.data(), s.data() + len, &result) == NULL); + } + ASSERT_TRUE(GetVarint32Ptr(s.data(), s.data() + s.size(), &result) != NULL); + ASSERT_EQ(large_value, result); +} + +TEST(Coding, Varint64Overflow) { + uint64_t result; + std::string input("\x81\x82\x83\x84\x85\x81\x82\x83\x84\x85\x11"); + ASSERT_TRUE(GetVarint64Ptr(input.data(), input.data() + input.size(), &result) + == NULL); +} + +TEST(Coding, Varint64Truncation) { + uint64_t large_value = (1ull << 63) + 100ull; + std::string s; + PutVarint64(&s, large_value); + uint64_t result; + for (size_t len = 0; len < s.size() - 1; len++) { + ASSERT_TRUE(GetVarint64Ptr(s.data(), s.data() + len, &result) == NULL); + } + ASSERT_TRUE(GetVarint64Ptr(s.data(), s.data() + s.size(), &result) != NULL); + ASSERT_EQ(large_value, result); +} + +TEST(Coding, Strings) { + std::string s; + PutLengthPrefixedSlice(&s, Slice("")); + PutLengthPrefixedSlice(&s, Slice("foo")); + PutLengthPrefixedSlice(&s, Slice("bar")); + PutLengthPrefixedSlice(&s, Slice(std::string(200, 'x'))); + + Slice input(s); + Slice v; + ASSERT_TRUE(GetLengthPrefixedSlice(&input, &v)); + ASSERT_EQ("", v.ToString()); + ASSERT_TRUE(GetLengthPrefixedSlice(&input, &v)); + ASSERT_EQ("foo", v.ToString()); + ASSERT_TRUE(GetLengthPrefixedSlice(&input, &v)); + ASSERT_EQ("bar", v.ToString()); + ASSERT_TRUE(GetLengthPrefixedSlice(&input, &v)); + ASSERT_EQ(std::string(200, 'x'), v.ToString()); + ASSERT_EQ("", input.ToString()); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/util/comparator.cc b/src/leveldb/util/comparator.cc new file mode 100644 index 0000000..4b7b572 --- /dev/null +++ b/src/leveldb/util/comparator.cc @@ -0,0 +1,81 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include +#include "leveldb/comparator.h" +#include "leveldb/slice.h" +#include "port/port.h" +#include "util/logging.h" + +namespace leveldb { + +Comparator::~Comparator() { } + +namespace { +class BytewiseComparatorImpl : public Comparator { + public: + BytewiseComparatorImpl() { } + + virtual const char* Name() const { + return "leveldb.BytewiseComparator"; + } + + virtual int Compare(const Slice& a, const Slice& b) const { + return a.compare(b); + } + + virtual void FindShortestSeparator( + std::string* start, + const Slice& limit) const { + // Find length of common prefix + size_t min_length = std::min(start->size(), limit.size()); + size_t diff_index = 0; + while ((diff_index < min_length) && + ((*start)[diff_index] == limit[diff_index])) { + diff_index++; + } + + if (diff_index >= min_length) { + // Do not shorten if one string is a prefix of the other + } else { + uint8_t diff_byte = static_cast((*start)[diff_index]); + if (diff_byte < static_cast(0xff) && + diff_byte + 1 < static_cast(limit[diff_index])) { + (*start)[diff_index]++; + start->resize(diff_index + 1); + assert(Compare(*start, limit) < 0); + } + } + } + + virtual void FindShortSuccessor(std::string* key) const { + // Find first character that can be incremented + size_t n = key->size(); + for (size_t i = 0; i < n; i++) { + const uint8_t byte = (*key)[i]; + if (byte != static_cast(0xff)) { + (*key)[i] = byte + 1; + key->resize(i+1); + return; + } + } + // *key is a run of 0xffs. Leave it alone. + } +}; +} // namespace + +static port::OnceType once = LEVELDB_ONCE_INIT; +static const Comparator* bytewise; + +static void InitModule() { + bytewise = new BytewiseComparatorImpl; +} + +const Comparator* BytewiseComparator() { + port::InitOnce(&once, InitModule); + return bytewise; +} + +} // namespace leveldb diff --git a/src/leveldb/util/crc32c.cc b/src/leveldb/util/crc32c.cc new file mode 100644 index 0000000..6db9e77 --- /dev/null +++ b/src/leveldb/util/crc32c.cc @@ -0,0 +1,332 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// A portable implementation of crc32c, optimized to handle +// four bytes at a time. + +#include "util/crc32c.h" + +#include +#include "util/coding.h" + +namespace leveldb { +namespace crc32c { + +static const uint32_t table0_[256] = { + 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, + 0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb, + 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b, + 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, + 0x105ec76f, 0xe235446c, 0xf165b798, 0x030e349b, + 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384, + 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54, + 0x5d1d08bf, 0xaf768bbc, 0xbc267848, 0x4e4dfb4b, + 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a, + 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35, + 0xaa64d611, 0x580f5512, 0x4b5fa6e6, 0xb93425e5, + 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa, + 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45, + 0xf779deae, 0x05125dad, 0x1642ae59, 0xe4292d5a, + 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a, + 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595, + 0x417b1dbc, 0xb3109ebf, 0xa0406d4b, 0x522bee48, + 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957, + 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687, + 0x0c38d26c, 0xfe53516f, 0xed03a29b, 0x1f682198, + 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927, + 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38, + 0xdbfc821c, 0x2997011f, 0x3ac7f2eb, 0xc8ac71e8, + 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7, + 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096, + 0xa65c047d, 0x5437877e, 0x4767748a, 0xb50cf789, + 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859, + 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46, + 0x7198540d, 0x83f3d70e, 0x90a324fa, 0x62c8a7f9, + 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6, + 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36, + 0x3cdb9bdd, 0xceb018de, 0xdde0eb2a, 0x2f8b6829, + 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c, + 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93, + 0x082f63b7, 0xfa44e0b4, 0xe9141340, 0x1b7f9043, + 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c, + 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3, + 0x55326b08, 0xa759e80b, 0xb4091bff, 0x466298fc, + 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c, + 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033, + 0xa24bb5a6, 0x502036a5, 0x4370c551, 0xb11b4652, + 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d, + 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d, + 0xef087a76, 0x1d63f975, 0x0e330a81, 0xfc588982, + 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d, + 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622, + 0x38cc2a06, 0xcaa7a905, 0xd9f75af1, 0x2b9cd9f2, + 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed, + 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530, + 0x0417b1db, 0xf67c32d8, 0xe52cc12c, 0x1747422f, + 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff, + 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0, + 0xd3d3e1ab, 0x21b862a8, 0x32e8915c, 0xc083125f, + 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540, + 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90, + 0x9e902e7b, 0x6cfbad78, 0x7fab5e8c, 0x8dc0dd8f, + 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee, + 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1, + 0x69e9f0d5, 0x9b8273d6, 0x88d28022, 0x7ab90321, + 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e, + 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81, + 0x34f4f86a, 0xc69f7b69, 0xd5cf889d, 0x27a40b9e, + 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e, + 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351 +}; +static const uint32_t table1_[256] = { + 0x00000000, 0x13a29877, 0x274530ee, 0x34e7a899, + 0x4e8a61dc, 0x5d28f9ab, 0x69cf5132, 0x7a6dc945, + 0x9d14c3b8, 0x8eb65bcf, 0xba51f356, 0xa9f36b21, + 0xd39ea264, 0xc03c3a13, 0xf4db928a, 0xe7790afd, + 0x3fc5f181, 0x2c6769f6, 0x1880c16f, 0x0b225918, + 0x714f905d, 0x62ed082a, 0x560aa0b3, 0x45a838c4, + 0xa2d13239, 0xb173aa4e, 0x859402d7, 0x96369aa0, + 0xec5b53e5, 0xfff9cb92, 0xcb1e630b, 0xd8bcfb7c, + 0x7f8be302, 0x6c297b75, 0x58ced3ec, 0x4b6c4b9b, + 0x310182de, 0x22a31aa9, 0x1644b230, 0x05e62a47, + 0xe29f20ba, 0xf13db8cd, 0xc5da1054, 0xd6788823, + 0xac154166, 0xbfb7d911, 0x8b507188, 0x98f2e9ff, + 0x404e1283, 0x53ec8af4, 0x670b226d, 0x74a9ba1a, + 0x0ec4735f, 0x1d66eb28, 0x298143b1, 0x3a23dbc6, + 0xdd5ad13b, 0xcef8494c, 0xfa1fe1d5, 0xe9bd79a2, + 0x93d0b0e7, 0x80722890, 0xb4958009, 0xa737187e, + 0xff17c604, 0xecb55e73, 0xd852f6ea, 0xcbf06e9d, + 0xb19da7d8, 0xa23f3faf, 0x96d89736, 0x857a0f41, + 0x620305bc, 0x71a19dcb, 0x45463552, 0x56e4ad25, + 0x2c896460, 0x3f2bfc17, 0x0bcc548e, 0x186eccf9, + 0xc0d23785, 0xd370aff2, 0xe797076b, 0xf4359f1c, + 0x8e585659, 0x9dface2e, 0xa91d66b7, 0xbabffec0, + 0x5dc6f43d, 0x4e646c4a, 0x7a83c4d3, 0x69215ca4, + 0x134c95e1, 0x00ee0d96, 0x3409a50f, 0x27ab3d78, + 0x809c2506, 0x933ebd71, 0xa7d915e8, 0xb47b8d9f, + 0xce1644da, 0xddb4dcad, 0xe9537434, 0xfaf1ec43, + 0x1d88e6be, 0x0e2a7ec9, 0x3acdd650, 0x296f4e27, + 0x53028762, 0x40a01f15, 0x7447b78c, 0x67e52ffb, + 0xbf59d487, 0xacfb4cf0, 0x981ce469, 0x8bbe7c1e, + 0xf1d3b55b, 0xe2712d2c, 0xd69685b5, 0xc5341dc2, + 0x224d173f, 0x31ef8f48, 0x050827d1, 0x16aabfa6, + 0x6cc776e3, 0x7f65ee94, 0x4b82460d, 0x5820de7a, + 0xfbc3faf9, 0xe861628e, 0xdc86ca17, 0xcf245260, + 0xb5499b25, 0xa6eb0352, 0x920cabcb, 0x81ae33bc, + 0x66d73941, 0x7575a136, 0x419209af, 0x523091d8, + 0x285d589d, 0x3bffc0ea, 0x0f186873, 0x1cbaf004, + 0xc4060b78, 0xd7a4930f, 0xe3433b96, 0xf0e1a3e1, + 0x8a8c6aa4, 0x992ef2d3, 0xadc95a4a, 0xbe6bc23d, + 0x5912c8c0, 0x4ab050b7, 0x7e57f82e, 0x6df56059, + 0x1798a91c, 0x043a316b, 0x30dd99f2, 0x237f0185, + 0x844819fb, 0x97ea818c, 0xa30d2915, 0xb0afb162, + 0xcac27827, 0xd960e050, 0xed8748c9, 0xfe25d0be, + 0x195cda43, 0x0afe4234, 0x3e19eaad, 0x2dbb72da, + 0x57d6bb9f, 0x447423e8, 0x70938b71, 0x63311306, + 0xbb8de87a, 0xa82f700d, 0x9cc8d894, 0x8f6a40e3, + 0xf50789a6, 0xe6a511d1, 0xd242b948, 0xc1e0213f, + 0x26992bc2, 0x353bb3b5, 0x01dc1b2c, 0x127e835b, + 0x68134a1e, 0x7bb1d269, 0x4f567af0, 0x5cf4e287, + 0x04d43cfd, 0x1776a48a, 0x23910c13, 0x30339464, + 0x4a5e5d21, 0x59fcc556, 0x6d1b6dcf, 0x7eb9f5b8, + 0x99c0ff45, 0x8a626732, 0xbe85cfab, 0xad2757dc, + 0xd74a9e99, 0xc4e806ee, 0xf00fae77, 0xe3ad3600, + 0x3b11cd7c, 0x28b3550b, 0x1c54fd92, 0x0ff665e5, + 0x759baca0, 0x663934d7, 0x52de9c4e, 0x417c0439, + 0xa6050ec4, 0xb5a796b3, 0x81403e2a, 0x92e2a65d, + 0xe88f6f18, 0xfb2df76f, 0xcfca5ff6, 0xdc68c781, + 0x7b5fdfff, 0x68fd4788, 0x5c1aef11, 0x4fb87766, + 0x35d5be23, 0x26772654, 0x12908ecd, 0x013216ba, + 0xe64b1c47, 0xf5e98430, 0xc10e2ca9, 0xd2acb4de, + 0xa8c17d9b, 0xbb63e5ec, 0x8f844d75, 0x9c26d502, + 0x449a2e7e, 0x5738b609, 0x63df1e90, 0x707d86e7, + 0x0a104fa2, 0x19b2d7d5, 0x2d557f4c, 0x3ef7e73b, + 0xd98eedc6, 0xca2c75b1, 0xfecbdd28, 0xed69455f, + 0x97048c1a, 0x84a6146d, 0xb041bcf4, 0xa3e32483 +}; +static const uint32_t table2_[256] = { + 0x00000000, 0xa541927e, 0x4f6f520d, 0xea2ec073, + 0x9edea41a, 0x3b9f3664, 0xd1b1f617, 0x74f06469, + 0x38513ec5, 0x9d10acbb, 0x773e6cc8, 0xd27ffeb6, + 0xa68f9adf, 0x03ce08a1, 0xe9e0c8d2, 0x4ca15aac, + 0x70a27d8a, 0xd5e3eff4, 0x3fcd2f87, 0x9a8cbdf9, + 0xee7cd990, 0x4b3d4bee, 0xa1138b9d, 0x045219e3, + 0x48f3434f, 0xedb2d131, 0x079c1142, 0xa2dd833c, + 0xd62de755, 0x736c752b, 0x9942b558, 0x3c032726, + 0xe144fb14, 0x4405696a, 0xae2ba919, 0x0b6a3b67, + 0x7f9a5f0e, 0xdadbcd70, 0x30f50d03, 0x95b49f7d, + 0xd915c5d1, 0x7c5457af, 0x967a97dc, 0x333b05a2, + 0x47cb61cb, 0xe28af3b5, 0x08a433c6, 0xade5a1b8, + 0x91e6869e, 0x34a714e0, 0xde89d493, 0x7bc846ed, + 0x0f382284, 0xaa79b0fa, 0x40577089, 0xe516e2f7, + 0xa9b7b85b, 0x0cf62a25, 0xe6d8ea56, 0x43997828, + 0x37691c41, 0x92288e3f, 0x78064e4c, 0xdd47dc32, + 0xc76580d9, 0x622412a7, 0x880ad2d4, 0x2d4b40aa, + 0x59bb24c3, 0xfcfab6bd, 0x16d476ce, 0xb395e4b0, + 0xff34be1c, 0x5a752c62, 0xb05bec11, 0x151a7e6f, + 0x61ea1a06, 0xc4ab8878, 0x2e85480b, 0x8bc4da75, + 0xb7c7fd53, 0x12866f2d, 0xf8a8af5e, 0x5de93d20, + 0x29195949, 0x8c58cb37, 0x66760b44, 0xc337993a, + 0x8f96c396, 0x2ad751e8, 0xc0f9919b, 0x65b803e5, + 0x1148678c, 0xb409f5f2, 0x5e273581, 0xfb66a7ff, + 0x26217bcd, 0x8360e9b3, 0x694e29c0, 0xcc0fbbbe, + 0xb8ffdfd7, 0x1dbe4da9, 0xf7908dda, 0x52d11fa4, + 0x1e704508, 0xbb31d776, 0x511f1705, 0xf45e857b, + 0x80aee112, 0x25ef736c, 0xcfc1b31f, 0x6a802161, + 0x56830647, 0xf3c29439, 0x19ec544a, 0xbcadc634, + 0xc85da25d, 0x6d1c3023, 0x8732f050, 0x2273622e, + 0x6ed23882, 0xcb93aafc, 0x21bd6a8f, 0x84fcf8f1, + 0xf00c9c98, 0x554d0ee6, 0xbf63ce95, 0x1a225ceb, + 0x8b277743, 0x2e66e53d, 0xc448254e, 0x6109b730, + 0x15f9d359, 0xb0b84127, 0x5a968154, 0xffd7132a, + 0xb3764986, 0x1637dbf8, 0xfc191b8b, 0x595889f5, + 0x2da8ed9c, 0x88e97fe2, 0x62c7bf91, 0xc7862def, + 0xfb850ac9, 0x5ec498b7, 0xb4ea58c4, 0x11abcaba, + 0x655baed3, 0xc01a3cad, 0x2a34fcde, 0x8f756ea0, + 0xc3d4340c, 0x6695a672, 0x8cbb6601, 0x29faf47f, + 0x5d0a9016, 0xf84b0268, 0x1265c21b, 0xb7245065, + 0x6a638c57, 0xcf221e29, 0x250cde5a, 0x804d4c24, + 0xf4bd284d, 0x51fcba33, 0xbbd27a40, 0x1e93e83e, + 0x5232b292, 0xf77320ec, 0x1d5de09f, 0xb81c72e1, + 0xccec1688, 0x69ad84f6, 0x83834485, 0x26c2d6fb, + 0x1ac1f1dd, 0xbf8063a3, 0x55aea3d0, 0xf0ef31ae, + 0x841f55c7, 0x215ec7b9, 0xcb7007ca, 0x6e3195b4, + 0x2290cf18, 0x87d15d66, 0x6dff9d15, 0xc8be0f6b, + 0xbc4e6b02, 0x190ff97c, 0xf321390f, 0x5660ab71, + 0x4c42f79a, 0xe90365e4, 0x032da597, 0xa66c37e9, + 0xd29c5380, 0x77ddc1fe, 0x9df3018d, 0x38b293f3, + 0x7413c95f, 0xd1525b21, 0x3b7c9b52, 0x9e3d092c, + 0xeacd6d45, 0x4f8cff3b, 0xa5a23f48, 0x00e3ad36, + 0x3ce08a10, 0x99a1186e, 0x738fd81d, 0xd6ce4a63, + 0xa23e2e0a, 0x077fbc74, 0xed517c07, 0x4810ee79, + 0x04b1b4d5, 0xa1f026ab, 0x4bdee6d8, 0xee9f74a6, + 0x9a6f10cf, 0x3f2e82b1, 0xd50042c2, 0x7041d0bc, + 0xad060c8e, 0x08479ef0, 0xe2695e83, 0x4728ccfd, + 0x33d8a894, 0x96993aea, 0x7cb7fa99, 0xd9f668e7, + 0x9557324b, 0x3016a035, 0xda386046, 0x7f79f238, + 0x0b899651, 0xaec8042f, 0x44e6c45c, 0xe1a75622, + 0xdda47104, 0x78e5e37a, 0x92cb2309, 0x378ab177, + 0x437ad51e, 0xe63b4760, 0x0c158713, 0xa954156d, + 0xe5f54fc1, 0x40b4ddbf, 0xaa9a1dcc, 0x0fdb8fb2, + 0x7b2bebdb, 0xde6a79a5, 0x3444b9d6, 0x91052ba8 +}; +static const uint32_t table3_[256] = { + 0x00000000, 0xdd45aab8, 0xbf672381, 0x62228939, + 0x7b2231f3, 0xa6679b4b, 0xc4451272, 0x1900b8ca, + 0xf64463e6, 0x2b01c95e, 0x49234067, 0x9466eadf, + 0x8d665215, 0x5023f8ad, 0x32017194, 0xef44db2c, + 0xe964b13d, 0x34211b85, 0x560392bc, 0x8b463804, + 0x924680ce, 0x4f032a76, 0x2d21a34f, 0xf06409f7, + 0x1f20d2db, 0xc2657863, 0xa047f15a, 0x7d025be2, + 0x6402e328, 0xb9474990, 0xdb65c0a9, 0x06206a11, + 0xd725148b, 0x0a60be33, 0x6842370a, 0xb5079db2, + 0xac072578, 0x71428fc0, 0x136006f9, 0xce25ac41, + 0x2161776d, 0xfc24ddd5, 0x9e0654ec, 0x4343fe54, + 0x5a43469e, 0x8706ec26, 0xe524651f, 0x3861cfa7, + 0x3e41a5b6, 0xe3040f0e, 0x81268637, 0x5c632c8f, + 0x45639445, 0x98263efd, 0xfa04b7c4, 0x27411d7c, + 0xc805c650, 0x15406ce8, 0x7762e5d1, 0xaa274f69, + 0xb327f7a3, 0x6e625d1b, 0x0c40d422, 0xd1057e9a, + 0xaba65fe7, 0x76e3f55f, 0x14c17c66, 0xc984d6de, + 0xd0846e14, 0x0dc1c4ac, 0x6fe34d95, 0xb2a6e72d, + 0x5de23c01, 0x80a796b9, 0xe2851f80, 0x3fc0b538, + 0x26c00df2, 0xfb85a74a, 0x99a72e73, 0x44e284cb, + 0x42c2eeda, 0x9f874462, 0xfda5cd5b, 0x20e067e3, + 0x39e0df29, 0xe4a57591, 0x8687fca8, 0x5bc25610, + 0xb4868d3c, 0x69c32784, 0x0be1aebd, 0xd6a40405, + 0xcfa4bccf, 0x12e11677, 0x70c39f4e, 0xad8635f6, + 0x7c834b6c, 0xa1c6e1d4, 0xc3e468ed, 0x1ea1c255, + 0x07a17a9f, 0xdae4d027, 0xb8c6591e, 0x6583f3a6, + 0x8ac7288a, 0x57828232, 0x35a00b0b, 0xe8e5a1b3, + 0xf1e51979, 0x2ca0b3c1, 0x4e823af8, 0x93c79040, + 0x95e7fa51, 0x48a250e9, 0x2a80d9d0, 0xf7c57368, + 0xeec5cba2, 0x3380611a, 0x51a2e823, 0x8ce7429b, + 0x63a399b7, 0xbee6330f, 0xdcc4ba36, 0x0181108e, + 0x1881a844, 0xc5c402fc, 0xa7e68bc5, 0x7aa3217d, + 0x52a0c93f, 0x8fe56387, 0xedc7eabe, 0x30824006, + 0x2982f8cc, 0xf4c75274, 0x96e5db4d, 0x4ba071f5, + 0xa4e4aad9, 0x79a10061, 0x1b838958, 0xc6c623e0, + 0xdfc69b2a, 0x02833192, 0x60a1b8ab, 0xbde41213, + 0xbbc47802, 0x6681d2ba, 0x04a35b83, 0xd9e6f13b, + 0xc0e649f1, 0x1da3e349, 0x7f816a70, 0xa2c4c0c8, + 0x4d801be4, 0x90c5b15c, 0xf2e73865, 0x2fa292dd, + 0x36a22a17, 0xebe780af, 0x89c50996, 0x5480a32e, + 0x8585ddb4, 0x58c0770c, 0x3ae2fe35, 0xe7a7548d, + 0xfea7ec47, 0x23e246ff, 0x41c0cfc6, 0x9c85657e, + 0x73c1be52, 0xae8414ea, 0xcca69dd3, 0x11e3376b, + 0x08e38fa1, 0xd5a62519, 0xb784ac20, 0x6ac10698, + 0x6ce16c89, 0xb1a4c631, 0xd3864f08, 0x0ec3e5b0, + 0x17c35d7a, 0xca86f7c2, 0xa8a47efb, 0x75e1d443, + 0x9aa50f6f, 0x47e0a5d7, 0x25c22cee, 0xf8878656, + 0xe1873e9c, 0x3cc29424, 0x5ee01d1d, 0x83a5b7a5, + 0xf90696d8, 0x24433c60, 0x4661b559, 0x9b241fe1, + 0x8224a72b, 0x5f610d93, 0x3d4384aa, 0xe0062e12, + 0x0f42f53e, 0xd2075f86, 0xb025d6bf, 0x6d607c07, + 0x7460c4cd, 0xa9256e75, 0xcb07e74c, 0x16424df4, + 0x106227e5, 0xcd278d5d, 0xaf050464, 0x7240aedc, + 0x6b401616, 0xb605bcae, 0xd4273597, 0x09629f2f, + 0xe6264403, 0x3b63eebb, 0x59416782, 0x8404cd3a, + 0x9d0475f0, 0x4041df48, 0x22635671, 0xff26fcc9, + 0x2e238253, 0xf36628eb, 0x9144a1d2, 0x4c010b6a, + 0x5501b3a0, 0x88441918, 0xea669021, 0x37233a99, + 0xd867e1b5, 0x05224b0d, 0x6700c234, 0xba45688c, + 0xa345d046, 0x7e007afe, 0x1c22f3c7, 0xc167597f, + 0xc747336e, 0x1a0299d6, 0x782010ef, 0xa565ba57, + 0xbc65029d, 0x6120a825, 0x0302211c, 0xde478ba4, + 0x31035088, 0xec46fa30, 0x8e647309, 0x5321d9b1, + 0x4a21617b, 0x9764cbc3, 0xf54642fa, 0x2803e842 +}; + +// Used to fetch a naturally-aligned 32-bit word in little endian byte-order +static inline uint32_t LE_LOAD32(const uint8_t *p) { + return DecodeFixed32(reinterpret_cast(p)); +} + +uint32_t Extend(uint32_t crc, const char* buf, size_t size) { + const uint8_t *p = reinterpret_cast(buf); + const uint8_t *e = p + size; + uint32_t l = crc ^ 0xffffffffu; + +#define STEP1 do { \ + int c = (l & 0xff) ^ *p++; \ + l = table0_[c] ^ (l >> 8); \ +} while (0) +#define STEP4 do { \ + uint32_t c = l ^ LE_LOAD32(p); \ + p += 4; \ + l = table3_[c & 0xff] ^ \ + table2_[(c >> 8) & 0xff] ^ \ + table1_[(c >> 16) & 0xff] ^ \ + table0_[c >> 24]; \ +} while (0) + + // Point x at first 4-byte aligned byte in string. This might be + // just past the end of the string. + const uintptr_t pval = reinterpret_cast(p); + const uint8_t* x = reinterpret_cast(((pval + 3) >> 2) << 2); + if (x <= e) { + // Process bytes until finished or p is 4-byte aligned + while (p != x) { + STEP1; + } + } + // Process bytes 16 at a time + while ((e-p) >= 16) { + STEP4; STEP4; STEP4; STEP4; + } + // Process bytes 4 at a time + while ((e-p) >= 4) { + STEP4; + } + // Process the last few bytes + while (p != e) { + STEP1; + } +#undef STEP4 +#undef STEP1 + return l ^ 0xffffffffu; +} + +} // namespace crc32c +} // namespace leveldb diff --git a/src/leveldb/util/crc32c.h b/src/leveldb/util/crc32c.h new file mode 100644 index 0000000..1d7e5c0 --- /dev/null +++ b/src/leveldb/util/crc32c.h @@ -0,0 +1,45 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_UTIL_CRC32C_H_ +#define STORAGE_LEVELDB_UTIL_CRC32C_H_ + +#include +#include + +namespace leveldb { +namespace crc32c { + +// Return the crc32c of concat(A, data[0,n-1]) where init_crc is the +// crc32c of some string A. Extend() is often used to maintain the +// crc32c of a stream of data. +extern uint32_t Extend(uint32_t init_crc, const char* data, size_t n); + +// Return the crc32c of data[0,n-1] +inline uint32_t Value(const char* data, size_t n) { + return Extend(0, data, n); +} + +static const uint32_t kMaskDelta = 0xa282ead8ul; + +// Return a masked representation of crc. +// +// Motivation: it is problematic to compute the CRC of a string that +// contains embedded CRCs. Therefore we recommend that CRCs stored +// somewhere (e.g., in files) should be masked before being stored. +inline uint32_t Mask(uint32_t crc) { + // Rotate right by 15 bits and add a constant. + return ((crc >> 15) | (crc << 17)) + kMaskDelta; +} + +// Return the crc whose masked representation is masked_crc. +inline uint32_t Unmask(uint32_t masked_crc) { + uint32_t rot = masked_crc - kMaskDelta; + return ((rot >> 17) | (rot << 15)); +} + +} // namespace crc32c +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_CRC32C_H_ diff --git a/src/leveldb/util/crc32c_test.cc b/src/leveldb/util/crc32c_test.cc new file mode 100644 index 0000000..4b957ee --- /dev/null +++ b/src/leveldb/util/crc32c_test.cc @@ -0,0 +1,72 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "util/crc32c.h" +#include "util/testharness.h" + +namespace leveldb { +namespace crc32c { + +class CRC { }; + +TEST(CRC, StandardResults) { + // From rfc3720 section B.4. + char buf[32]; + + memset(buf, 0, sizeof(buf)); + ASSERT_EQ(0x8a9136aa, Value(buf, sizeof(buf))); + + memset(buf, 0xff, sizeof(buf)); + ASSERT_EQ(0x62a8ab43, Value(buf, sizeof(buf))); + + for (int i = 0; i < 32; i++) { + buf[i] = i; + } + ASSERT_EQ(0x46dd794e, Value(buf, sizeof(buf))); + + for (int i = 0; i < 32; i++) { + buf[i] = 31 - i; + } + ASSERT_EQ(0x113fdb5c, Value(buf, sizeof(buf))); + + unsigned char data[48] = { + 0x01, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x14, + 0x00, 0x00, 0x00, 0x18, + 0x28, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + }; + ASSERT_EQ(0xd9963a56, Value(reinterpret_cast(data), sizeof(data))); +} + +TEST(CRC, Values) { + ASSERT_NE(Value("a", 1), Value("foo", 3)); +} + +TEST(CRC, Extend) { + ASSERT_EQ(Value("hello world", 11), + Extend(Value("hello ", 6), "world", 5)); +} + +TEST(CRC, Mask) { + uint32_t crc = Value("foo", 3); + ASSERT_NE(crc, Mask(crc)); + ASSERT_NE(crc, Mask(Mask(crc))); + ASSERT_EQ(crc, Unmask(Mask(crc))); + ASSERT_EQ(crc, Unmask(Unmask(Mask(Mask(crc))))); +} + +} // namespace crc32c +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/util/env.cc b/src/leveldb/util/env.cc new file mode 100644 index 0000000..c2600e9 --- /dev/null +++ b/src/leveldb/util/env.cc @@ -0,0 +1,96 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/env.h" + +namespace leveldb { + +Env::~Env() { +} + +SequentialFile::~SequentialFile() { +} + +RandomAccessFile::~RandomAccessFile() { +} + +WritableFile::~WritableFile() { +} + +Logger::~Logger() { +} + +FileLock::~FileLock() { +} + +void Log(Logger* info_log, const char* format, ...) { + if (info_log != NULL) { + va_list ap; + va_start(ap, format); + info_log->Logv(format, ap); + va_end(ap); + } +} + +static Status DoWriteStringToFile(Env* env, const Slice& data, + const std::string& fname, + bool should_sync) { + WritableFile* file; + Status s = env->NewWritableFile(fname, &file); + if (!s.ok()) { + return s; + } + s = file->Append(data); + if (s.ok() && should_sync) { + s = file->Sync(); + } + if (s.ok()) { + s = file->Close(); + } + delete file; // Will auto-close if we did not close above + if (!s.ok()) { + env->DeleteFile(fname); + } + return s; +} + +Status WriteStringToFile(Env* env, const Slice& data, + const std::string& fname) { + return DoWriteStringToFile(env, data, fname, false); +} + +Status WriteStringToFileSync(Env* env, const Slice& data, + const std::string& fname) { + return DoWriteStringToFile(env, data, fname, true); +} + +Status ReadFileToString(Env* env, const std::string& fname, std::string* data) { + data->clear(); + SequentialFile* file; + Status s = env->NewSequentialFile(fname, &file); + if (!s.ok()) { + return s; + } + static const int kBufferSize = 8192; + char* space = new char[kBufferSize]; + while (true) { + Slice fragment; + s = file->Read(kBufferSize, &fragment, space); + if (!s.ok()) { + break; + } + data->append(fragment.data(), fragment.size()); + if (fragment.empty()) { + break; + } + } + delete[] space; + delete file; + return s; +} + +EnvWrapper::~EnvWrapper() { +} + +} // namespace leveldb diff --git a/src/leveldb/util/env_posix.cc b/src/leveldb/util/env_posix.cc new file mode 100644 index 0000000..93eadb1 --- /dev/null +++ b/src/leveldb/util/env_posix.cc @@ -0,0 +1,610 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +#if !defined(LEVELDB_PLATFORM_WINDOWS) + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(LEVELDB_PLATFORM_ANDROID) +#include +#endif +#include "leveldb/env.h" +#include "leveldb/slice.h" +#include "port/port.h" +#include "util/logging.h" +#include "util/mutexlock.h" +#include "util/posix_logger.h" + +namespace leveldb { + +namespace { + +static Status IOError(const std::string& context, int err_number) { + return Status::IOError(context, strerror(err_number)); +} + +class PosixSequentialFile: public SequentialFile { + private: + std::string filename_; + FILE* file_; + + public: + PosixSequentialFile(const std::string& fname, FILE* f) + : filename_(fname), file_(f) { } + virtual ~PosixSequentialFile() { fclose(file_); } + + virtual Status Read(size_t n, Slice* result, char* scratch) { + Status s; + size_t r = fread_unlocked(scratch, 1, n, file_); + *result = Slice(scratch, r); + if (r < n) { + if (feof(file_)) { + // We leave status as ok if we hit the end of the file + } else { + // A partial read with an error: return a non-ok status + s = IOError(filename_, errno); + } + } + return s; + } + + virtual Status Skip(uint64_t n) { + if (fseek(file_, n, SEEK_CUR)) { + return IOError(filename_, errno); + } + return Status::OK(); + } +}; + +// pread() based random-access +class PosixRandomAccessFile: public RandomAccessFile { + private: + std::string filename_; + int fd_; + + public: + PosixRandomAccessFile(const std::string& fname, int fd) + : filename_(fname), fd_(fd) { } + virtual ~PosixRandomAccessFile() { close(fd_); } + + virtual Status Read(uint64_t offset, size_t n, Slice* result, + char* scratch) const { + Status s; + ssize_t r = pread(fd_, scratch, n, static_cast(offset)); + *result = Slice(scratch, (r < 0) ? 0 : r); + if (r < 0) { + // An error: return a non-ok status + s = IOError(filename_, errno); + } + return s; + } +}; + +// Helper class to limit mmap file usage so that we do not end up +// running out virtual memory or running into kernel performance +// problems for very large databases. +class MmapLimiter { + public: + // Up to 1000 mmaps for 64-bit binaries; none for smaller pointer sizes. + MmapLimiter() { + SetAllowed(sizeof(void*) >= 8 ? 1000 : 0); + } + + // If another mmap slot is available, acquire it and return true. + // Else return false. + bool Acquire() { + if (GetAllowed() <= 0) { + return false; + } + MutexLock l(&mu_); + intptr_t x = GetAllowed(); + if (x <= 0) { + return false; + } else { + SetAllowed(x - 1); + return true; + } + } + + // Release a slot acquired by a previous call to Acquire() that returned true. + void Release() { + MutexLock l(&mu_); + SetAllowed(GetAllowed() + 1); + } + + private: + port::Mutex mu_; + port::AtomicPointer allowed_; + + intptr_t GetAllowed() const { + return reinterpret_cast(allowed_.Acquire_Load()); + } + + // REQUIRES: mu_ must be held + void SetAllowed(intptr_t v) { + allowed_.Release_Store(reinterpret_cast(v)); + } + + MmapLimiter(const MmapLimiter&); + void operator=(const MmapLimiter&); +}; + +// mmap() based random-access +class PosixMmapReadableFile: public RandomAccessFile { + private: + std::string filename_; + void* mmapped_region_; + size_t length_; + MmapLimiter* limiter_; + + public: + // base[0,length-1] contains the mmapped contents of the file. + PosixMmapReadableFile(const std::string& fname, void* base, size_t length, + MmapLimiter* limiter) + : filename_(fname), mmapped_region_(base), length_(length), + limiter_(limiter) { + } + + virtual ~PosixMmapReadableFile() { + munmap(mmapped_region_, length_); + limiter_->Release(); + } + + virtual Status Read(uint64_t offset, size_t n, Slice* result, + char* scratch) const { + Status s; + if (offset + n > length_) { + *result = Slice(); + s = IOError(filename_, EINVAL); + } else { + *result = Slice(reinterpret_cast(mmapped_region_) + offset, n); + } + return s; + } +}; + +class PosixWritableFile : public WritableFile { + private: + std::string filename_; + FILE* file_; + + public: + PosixWritableFile(const std::string& fname, FILE* f) + : filename_(fname), file_(f) { } + + ~PosixWritableFile() { + if (file_ != NULL) { + // Ignoring any potential errors + fclose(file_); + } + } + + virtual Status Append(const Slice& data) { + size_t r = fwrite_unlocked(data.data(), 1, data.size(), file_); + if (r != data.size()) { + return IOError(filename_, errno); + } + return Status::OK(); + } + + virtual Status Close() { + Status result; + if (fclose(file_) != 0) { + result = IOError(filename_, errno); + } + file_ = NULL; + return result; + } + + virtual Status Flush() { + if (fflush_unlocked(file_) != 0) { + return IOError(filename_, errno); + } + return Status::OK(); + } + + Status SyncDirIfManifest() { + const char* f = filename_.c_str(); + const char* sep = strrchr(f, '/'); + Slice basename; + std::string dir; + if (sep == NULL) { + dir = "."; + basename = f; + } else { + dir = std::string(f, sep - f); + basename = sep + 1; + } + Status s; + if (basename.starts_with("MANIFEST")) { + int fd = open(dir.c_str(), O_RDONLY); + if (fd < 0) { + s = IOError(dir, errno); + } else { + if (fsync(fd) < 0) { + s = IOError(dir, errno); + } + close(fd); + } + } + return s; + } + + virtual Status Sync() { + // Ensure new files referred to by the manifest are in the filesystem. + Status s = SyncDirIfManifest(); + if (!s.ok()) { + return s; + } + if (fflush_unlocked(file_) != 0 || + fdatasync(fileno(file_)) != 0) { + s = Status::IOError(filename_, strerror(errno)); + } + return s; + } +}; + +static int LockOrUnlock(int fd, bool lock) { + errno = 0; + struct flock f; + memset(&f, 0, sizeof(f)); + f.l_type = (lock ? F_WRLCK : F_UNLCK); + f.l_whence = SEEK_SET; + f.l_start = 0; + f.l_len = 0; // Lock/unlock entire file + return fcntl(fd, F_SETLK, &f); +} + +class PosixFileLock : public FileLock { + public: + int fd_; + std::string name_; +}; + +// Set of locked files. We keep a separate set instead of just +// relying on fcntrl(F_SETLK) since fcntl(F_SETLK) does not provide +// any protection against multiple uses from the same process. +class PosixLockTable { + private: + port::Mutex mu_; + std::set locked_files_; + public: + bool Insert(const std::string& fname) { + MutexLock l(&mu_); + return locked_files_.insert(fname).second; + } + void Remove(const std::string& fname) { + MutexLock l(&mu_); + locked_files_.erase(fname); + } +}; + +class PosixEnv : public Env { + public: + PosixEnv(); + virtual ~PosixEnv() { + fprintf(stderr, "Destroying Env::Default()\n"); + abort(); + } + + virtual Status NewSequentialFile(const std::string& fname, + SequentialFile** result) { + FILE* f = fopen(fname.c_str(), "r"); + if (f == NULL) { + *result = NULL; + return IOError(fname, errno); + } else { + *result = new PosixSequentialFile(fname, f); + return Status::OK(); + } + } + + virtual Status NewRandomAccessFile(const std::string& fname, + RandomAccessFile** result) { + *result = NULL; + Status s; + int fd = open(fname.c_str(), O_RDONLY); + if (fd < 0) { + s = IOError(fname, errno); + } else if (mmap_limit_.Acquire()) { + uint64_t size; + s = GetFileSize(fname, &size); + if (s.ok()) { + void* base = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); + if (base != MAP_FAILED) { + *result = new PosixMmapReadableFile(fname, base, size, &mmap_limit_); + } else { + s = IOError(fname, errno); + } + } + close(fd); + if (!s.ok()) { + mmap_limit_.Release(); + } + } else { + *result = new PosixRandomAccessFile(fname, fd); + } + return s; + } + + virtual Status NewWritableFile(const std::string& fname, + WritableFile** result) { + Status s; + FILE* f = fopen(fname.c_str(), "w"); + if (f == NULL) { + *result = NULL; + s = IOError(fname, errno); + } else { + *result = new PosixWritableFile(fname, f); + } + return s; + } + + virtual bool FileExists(const std::string& fname) { + return access(fname.c_str(), F_OK) == 0; + } + + virtual Status GetChildren(const std::string& dir, + std::vector* result) { + result->clear(); + DIR* d = opendir(dir.c_str()); + if (d == NULL) { + return IOError(dir, errno); + } + struct dirent* entry; + while ((entry = readdir(d)) != NULL) { + result->push_back(entry->d_name); + } + closedir(d); + return Status::OK(); + } + + virtual Status DeleteFile(const std::string& fname) { + Status result; + if (unlink(fname.c_str()) != 0) { + result = IOError(fname, errno); + } + return result; + } + + virtual Status CreateDir(const std::string& name) { + Status result; + if (mkdir(name.c_str(), 0755) != 0) { + result = IOError(name, errno); + } + return result; + } + + virtual Status DeleteDir(const std::string& name) { + Status result; + if (rmdir(name.c_str()) != 0) { + result = IOError(name, errno); + } + return result; + } + + virtual Status GetFileSize(const std::string& fname, uint64_t* size) { + Status s; + struct stat sbuf; + if (stat(fname.c_str(), &sbuf) != 0) { + *size = 0; + s = IOError(fname, errno); + } else { + *size = sbuf.st_size; + } + return s; + } + + virtual Status RenameFile(const std::string& src, const std::string& target) { + Status result; + if (rename(src.c_str(), target.c_str()) != 0) { + result = IOError(src, errno); + } + return result; + } + + virtual Status LockFile(const std::string& fname, FileLock** lock) { + *lock = NULL; + Status result; + int fd = open(fname.c_str(), O_RDWR | O_CREAT, 0644); + if (fd < 0) { + result = IOError(fname, errno); + } else if (!locks_.Insert(fname)) { + close(fd); + result = Status::IOError("lock " + fname, "already held by process"); + } else if (LockOrUnlock(fd, true) == -1) { + result = IOError("lock " + fname, errno); + close(fd); + locks_.Remove(fname); + } else { + PosixFileLock* my_lock = new PosixFileLock; + my_lock->fd_ = fd; + my_lock->name_ = fname; + *lock = my_lock; + } + return result; + } + + virtual Status UnlockFile(FileLock* lock) { + PosixFileLock* my_lock = reinterpret_cast(lock); + Status result; + if (LockOrUnlock(my_lock->fd_, false) == -1) { + result = IOError("unlock", errno); + } + locks_.Remove(my_lock->name_); + close(my_lock->fd_); + delete my_lock; + return result; + } + + virtual void Schedule(void (*function)(void*), void* arg); + + virtual void StartThread(void (*function)(void* arg), void* arg); + + virtual Status GetTestDirectory(std::string* result) { + const char* env = getenv("TEST_TMPDIR"); + if (env && env[0] != '\0') { + *result = env; + } else { + char buf[100]; + snprintf(buf, sizeof(buf), "/tmp/leveldbtest-%d", int(geteuid())); + *result = buf; + } + // Directory may already exist + CreateDir(*result); + return Status::OK(); + } + + static uint64_t gettid() { + pthread_t tid = pthread_self(); + uint64_t thread_id = 0; + memcpy(&thread_id, &tid, std::min(sizeof(thread_id), sizeof(tid))); + return thread_id; + } + + virtual Status NewLogger(const std::string& fname, Logger** result) { + FILE* f = fopen(fname.c_str(), "w"); + if (f == NULL) { + *result = NULL; + return IOError(fname, errno); + } else { + *result = new PosixLogger(f, &PosixEnv::gettid); + return Status::OK(); + } + } + + virtual uint64_t NowMicros() { + struct timeval tv; + gettimeofday(&tv, NULL); + return static_cast(tv.tv_sec) * 1000000 + tv.tv_usec; + } + + virtual void SleepForMicroseconds(int micros) { + usleep(micros); + } + + private: + void PthreadCall(const char* label, int result) { + if (result != 0) { + fprintf(stderr, "pthread %s: %s\n", label, strerror(result)); + abort(); + } + } + + // BGThread() is the body of the background thread + void BGThread(); + static void* BGThreadWrapper(void* arg) { + reinterpret_cast(arg)->BGThread(); + return NULL; + } + + pthread_mutex_t mu_; + pthread_cond_t bgsignal_; + pthread_t bgthread_; + bool started_bgthread_; + + // Entry per Schedule() call + struct BGItem { void* arg; void (*function)(void*); }; + typedef std::deque BGQueue; + BGQueue queue_; + + PosixLockTable locks_; + MmapLimiter mmap_limit_; +}; + +PosixEnv::PosixEnv() : started_bgthread_(false) { + PthreadCall("mutex_init", pthread_mutex_init(&mu_, NULL)); + PthreadCall("cvar_init", pthread_cond_init(&bgsignal_, NULL)); +} + +void PosixEnv::Schedule(void (*function)(void*), void* arg) { + PthreadCall("lock", pthread_mutex_lock(&mu_)); + + // Start background thread if necessary + if (!started_bgthread_) { + started_bgthread_ = true; + PthreadCall( + "create thread", + pthread_create(&bgthread_, NULL, &PosixEnv::BGThreadWrapper, this)); + } + + // If the queue is currently empty, the background thread may currently be + // waiting. + if (queue_.empty()) { + PthreadCall("signal", pthread_cond_signal(&bgsignal_)); + } + + // Add to priority queue + queue_.push_back(BGItem()); + queue_.back().function = function; + queue_.back().arg = arg; + + PthreadCall("unlock", pthread_mutex_unlock(&mu_)); +} + +void PosixEnv::BGThread() { + while (true) { + // Wait until there is an item that is ready to run + PthreadCall("lock", pthread_mutex_lock(&mu_)); + while (queue_.empty()) { + PthreadCall("wait", pthread_cond_wait(&bgsignal_, &mu_)); + } + + void (*function)(void*) = queue_.front().function; + void* arg = queue_.front().arg; + queue_.pop_front(); + + PthreadCall("unlock", pthread_mutex_unlock(&mu_)); + (*function)(arg); + } +} + +namespace { +struct StartThreadState { + void (*user_function)(void*); + void* arg; +}; +} +static void* StartThreadWrapper(void* arg) { + StartThreadState* state = reinterpret_cast(arg); + state->user_function(state->arg); + delete state; + return NULL; +} + +void PosixEnv::StartThread(void (*function)(void* arg), void* arg) { + pthread_t t; + StartThreadState* state = new StartThreadState; + state->user_function = function; + state->arg = arg; + PthreadCall("start thread", + pthread_create(&t, NULL, &StartThreadWrapper, state)); +} + +} // namespace + +static pthread_once_t once = PTHREAD_ONCE_INIT; +static Env* default_env; +static void InitDefaultEnv() { default_env = new PosixEnv; } + +Env* Env::Default() { + pthread_once(&once, InitDefaultEnv); + return default_env; +} + +} // namespace leveldb + +#endif diff --git a/src/leveldb/util/env_test.cc b/src/leveldb/util/env_test.cc new file mode 100644 index 0000000..b72cb44 --- /dev/null +++ b/src/leveldb/util/env_test.cc @@ -0,0 +1,104 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/env.h" + +#include "port/port.h" +#include "util/testharness.h" + +namespace leveldb { + +static const int kDelayMicros = 100000; + +class EnvPosixTest { + private: + port::Mutex mu_; + std::string events_; + + public: + Env* env_; + EnvPosixTest() : env_(Env::Default()) { } +}; + +static void SetBool(void* ptr) { + reinterpret_cast(ptr)->NoBarrier_Store(ptr); +} + +TEST(EnvPosixTest, RunImmediately) { + port::AtomicPointer called (NULL); + env_->Schedule(&SetBool, &called); + Env::Default()->SleepForMicroseconds(kDelayMicros); + ASSERT_TRUE(called.NoBarrier_Load() != NULL); +} + +TEST(EnvPosixTest, RunMany) { + port::AtomicPointer last_id (NULL); + + struct CB { + port::AtomicPointer* last_id_ptr; // Pointer to shared slot + uintptr_t id; // Order# for the execution of this callback + + CB(port::AtomicPointer* p, int i) : last_id_ptr(p), id(i) { } + + static void Run(void* v) { + CB* cb = reinterpret_cast(v); + void* cur = cb->last_id_ptr->NoBarrier_Load(); + ASSERT_EQ(cb->id-1, reinterpret_cast(cur)); + cb->last_id_ptr->Release_Store(reinterpret_cast(cb->id)); + } + }; + + // Schedule in different order than start time + CB cb1(&last_id, 1); + CB cb2(&last_id, 2); + CB cb3(&last_id, 3); + CB cb4(&last_id, 4); + env_->Schedule(&CB::Run, &cb1); + env_->Schedule(&CB::Run, &cb2); + env_->Schedule(&CB::Run, &cb3); + env_->Schedule(&CB::Run, &cb4); + + Env::Default()->SleepForMicroseconds(kDelayMicros); + void* cur = last_id.Acquire_Load(); + ASSERT_EQ(4, reinterpret_cast(cur)); +} + +struct State { + port::Mutex mu; + int val; + int num_running; +}; + +static void ThreadBody(void* arg) { + State* s = reinterpret_cast(arg); + s->mu.Lock(); + s->val += 1; + s->num_running -= 1; + s->mu.Unlock(); +} + +TEST(EnvPosixTest, StartThread) { + State state; + state.val = 0; + state.num_running = 3; + for (int i = 0; i < 3; i++) { + env_->StartThread(&ThreadBody, &state); + } + while (true) { + state.mu.Lock(); + int num = state.num_running; + state.mu.Unlock(); + if (num == 0) { + break; + } + Env::Default()->SleepForMicroseconds(kDelayMicros); + } + ASSERT_EQ(state.val, 3); +} + +} // namespace leveldb + +int main(int argc, char** argv) { + return leveldb::test::RunAllTests(); +} diff --git a/src/leveldb/util/env_win.cc b/src/leveldb/util/env_win.cc new file mode 100644 index 0000000..ef2ecae --- /dev/null +++ b/src/leveldb/util/env_win.cc @@ -0,0 +1,1031 @@ +// This file contains source that originates from: +// http://code.google.com/p/leveldbwin/source/browse/trunk/win32_impl_src/env_win32.h +// http://code.google.com/p/leveldbwin/source/browse/trunk/win32_impl_src/port_win32.cc +// Those files dont' have any explict license headers but the +// project (http://code.google.com/p/leveldbwin/) lists the 'New BSD License' +// as the license. +#if defined(LEVELDB_PLATFORM_WINDOWS) +#include + + +#include "leveldb/env.h" + +#include "port/port.h" +#include "leveldb/slice.h" +#include "util/logging.h" + +#include +#include +#include +#include +#include +#include +#include + +#ifdef max +#undef max +#endif + +#ifndef va_copy +#define va_copy(d,s) ((d) = (s)) +#endif + +#if defined DeleteFile +#undef DeleteFile +#endif + +//Declarations +namespace leveldb +{ + +namespace Win32 +{ + +#define DISALLOW_COPY_AND_ASSIGN(TypeName) \ + TypeName(const TypeName&); \ + void operator=(const TypeName&) + +std::string GetCurrentDir(); +std::wstring GetCurrentDirW(); + +static const std::string CurrentDir = GetCurrentDir(); +static const std::wstring CurrentDirW = GetCurrentDirW(); + +std::string& ModifyPath(std::string& path); +std::wstring& ModifyPath(std::wstring& path); + +std::string GetLastErrSz(); +std::wstring GetLastErrSzW(); + +size_t GetPageSize(); + +typedef void (*ScheduleProc)(void*) ; + +struct WorkItemWrapper +{ + WorkItemWrapper(ScheduleProc proc_,void* content_); + ScheduleProc proc; + void* pContent; +}; + +DWORD WINAPI WorkItemWrapperProc(LPVOID pContent); + +class Win32SequentialFile : public SequentialFile +{ +public: + friend class Win32Env; + virtual ~Win32SequentialFile(); + virtual Status Read(size_t n, Slice* result, char* scratch); + virtual Status Skip(uint64_t n); + BOOL isEnable(); +private: + BOOL _Init(); + void _CleanUp(); + Win32SequentialFile(const std::string& fname); + std::string _filename; + ::HANDLE _hFile; + DISALLOW_COPY_AND_ASSIGN(Win32SequentialFile); +}; + +class Win32RandomAccessFile : public RandomAccessFile +{ +public: + friend class Win32Env; + virtual ~Win32RandomAccessFile(); + virtual Status Read(uint64_t offset, size_t n, Slice* result,char* scratch) const; + BOOL isEnable(); +private: + BOOL _Init(LPCWSTR path); + void _CleanUp(); + Win32RandomAccessFile(const std::string& fname); + HANDLE _hFile; + const std::string _filename; + DISALLOW_COPY_AND_ASSIGN(Win32RandomAccessFile); +}; + +class Win32MapFile : public WritableFile +{ +public: + Win32MapFile(const std::string& fname); + + ~Win32MapFile(); + virtual Status Append(const Slice& data); + virtual Status Close(); + virtual Status Flush(); + virtual Status Sync(); + BOOL isEnable(); +private: + std::string _filename; + HANDLE _hFile; + size_t _page_size; + size_t _map_size; // How much extra memory to map at a time + char* _base; // The mapped region + HANDLE _base_handle; + char* _limit; // Limit of the mapped region + char* _dst; // Where to write next (in range [base_,limit_]) + char* _last_sync; // Where have we synced up to + uint64_t _file_offset; // Offset of base_ in file + //LARGE_INTEGER file_offset_; + // Have we done an munmap of unsynced data? + bool _pending_sync; + + // Roundup x to a multiple of y + static size_t _Roundup(size_t x, size_t y); + size_t _TruncateToPageBoundary(size_t s); + bool _UnmapCurrentRegion(); + bool _MapNewRegion(); + DISALLOW_COPY_AND_ASSIGN(Win32MapFile); + BOOL _Init(LPCWSTR Path); +}; + +class Win32FileLock : public FileLock +{ +public: + friend class Win32Env; + virtual ~Win32FileLock(); + BOOL isEnable(); +private: + BOOL _Init(LPCWSTR path); + void _CleanUp(); + Win32FileLock(const std::string& fname); + HANDLE _hFile; + std::string _filename; + DISALLOW_COPY_AND_ASSIGN(Win32FileLock); +}; + +class Win32Logger : public Logger +{ +public: + friend class Win32Env; + virtual ~Win32Logger(); + virtual void Logv(const char* format, va_list ap); +private: + explicit Win32Logger(WritableFile* pFile); + WritableFile* _pFileProxy; + DISALLOW_COPY_AND_ASSIGN(Win32Logger); +}; + +class Win32Env : public Env +{ +public: + Win32Env(); + virtual ~Win32Env(); + virtual Status NewSequentialFile(const std::string& fname, + SequentialFile** result); + + virtual Status NewRandomAccessFile(const std::string& fname, + RandomAccessFile** result); + virtual Status NewWritableFile(const std::string& fname, + WritableFile** result); + + virtual bool FileExists(const std::string& fname); + + virtual Status GetChildren(const std::string& dir, + std::vector* result); + + virtual Status DeleteFile(const std::string& fname); + + virtual Status CreateDir(const std::string& dirname); + + virtual Status DeleteDir(const std::string& dirname); + + virtual Status GetFileSize(const std::string& fname, uint64_t* file_size); + + virtual Status RenameFile(const std::string& src, + const std::string& target); + + virtual Status LockFile(const std::string& fname, FileLock** lock); + + virtual Status UnlockFile(FileLock* lock); + + virtual void Schedule( + void (*function)(void* arg), + void* arg); + + virtual void StartThread(void (*function)(void* arg), void* arg); + + virtual Status GetTestDirectory(std::string* path); + + //virtual void Logv(WritableFile* log, const char* format, va_list ap); + + virtual Status NewLogger(const std::string& fname, Logger** result); + + virtual uint64_t NowMicros(); + + virtual void SleepForMicroseconds(int micros); +}; + +void ToWidePath(const std::string& value, std::wstring& target) { + wchar_t buffer[MAX_PATH]; + MultiByteToWideChar(CP_ACP, 0, value.c_str(), -1, buffer, MAX_PATH); + target = buffer; +} + +void ToNarrowPath(const std::wstring& value, std::string& target) { + char buffer[MAX_PATH]; + WideCharToMultiByte(CP_ACP, 0, value.c_str(), -1, buffer, MAX_PATH, NULL, NULL); + target = buffer; +} + +std::string GetCurrentDir() +{ + CHAR path[MAX_PATH]; + ::GetModuleFileNameA(::GetModuleHandleA(NULL),path,MAX_PATH); + *strrchr(path,'\\') = 0; + return std::string(path); +} + +std::wstring GetCurrentDirW() +{ + WCHAR path[MAX_PATH]; + ::GetModuleFileNameW(::GetModuleHandleW(NULL),path,MAX_PATH); + *wcsrchr(path,L'\\') = 0; + return std::wstring(path); +} + +std::string& ModifyPath(std::string& path) +{ + if(path[0] == '/' || path[0] == '\\'){ + path = CurrentDir + path; + } + std::replace(path.begin(),path.end(),'/','\\'); + + return path; +} + +std::wstring& ModifyPath(std::wstring& path) +{ + if(path[0] == L'/' || path[0] == L'\\'){ + path = CurrentDirW + path; + } + std::replace(path.begin(),path.end(),L'/',L'\\'); + return path; +} + +std::string GetLastErrSz() +{ + LPWSTR lpMsgBuf; + FormatMessageW( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + GetLastError(), + 0, // Default language + (LPWSTR) &lpMsgBuf, + 0, + NULL + ); + std::string Err; + ToNarrowPath(lpMsgBuf, Err); + LocalFree( lpMsgBuf ); + return Err; +} + +std::wstring GetLastErrSzW() +{ + LPVOID lpMsgBuf; + FormatMessageW( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + GetLastError(), + 0, // Default language + (LPWSTR) &lpMsgBuf, + 0, + NULL + ); + std::wstring Err = (LPCWSTR)lpMsgBuf; + LocalFree(lpMsgBuf); + return Err; +} + +WorkItemWrapper::WorkItemWrapper( ScheduleProc proc_,void* content_ ) : + proc(proc_),pContent(content_) +{ + +} + +DWORD WINAPI WorkItemWrapperProc(LPVOID pContent) +{ + WorkItemWrapper* item = static_cast(pContent); + ScheduleProc TempProc = item->proc; + void* arg = item->pContent; + delete item; + TempProc(arg); + return 0; +} + +size_t GetPageSize() +{ + SYSTEM_INFO si; + GetSystemInfo(&si); + return std::max(si.dwPageSize,si.dwAllocationGranularity); +} + +const size_t g_PageSize = GetPageSize(); + + +Win32SequentialFile::Win32SequentialFile( const std::string& fname ) : + _filename(fname),_hFile(NULL) +{ + _Init(); +} + +Win32SequentialFile::~Win32SequentialFile() +{ + _CleanUp(); +} + +Status Win32SequentialFile::Read( size_t n, Slice* result, char* scratch ) +{ + Status sRet; + DWORD hasRead = 0; + if(_hFile && ReadFile(_hFile,scratch,n,&hasRead,NULL) ){ + *result = Slice(scratch,hasRead); + } else { + sRet = Status::IOError(_filename, Win32::GetLastErrSz() ); + } + return sRet; +} + +Status Win32SequentialFile::Skip( uint64_t n ) +{ + Status sRet; + LARGE_INTEGER Move,NowPointer; + Move.QuadPart = n; + if(!SetFilePointerEx(_hFile,Move,&NowPointer,FILE_CURRENT)){ + sRet = Status::IOError(_filename,Win32::GetLastErrSz()); + } + return sRet; +} + +BOOL Win32SequentialFile::isEnable() +{ + return _hFile ? TRUE : FALSE; +} + +BOOL Win32SequentialFile::_Init() +{ + std::wstring path; + ToWidePath(_filename, path); + _hFile = CreateFileW(path.c_str(), + GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); + return _hFile ? TRUE : FALSE; +} + +void Win32SequentialFile::_CleanUp() +{ + if(_hFile){ + CloseHandle(_hFile); + _hFile = NULL; + } +} + +Win32RandomAccessFile::Win32RandomAccessFile( const std::string& fname ) : + _filename(fname),_hFile(NULL) +{ + std::wstring path; + ToWidePath(fname, path); + _Init( path.c_str() ); +} + +Win32RandomAccessFile::~Win32RandomAccessFile() +{ + _CleanUp(); +} + +Status Win32RandomAccessFile::Read(uint64_t offset,size_t n,Slice* result,char* scratch) const +{ + Status sRet; + OVERLAPPED ol = {0}; + ZeroMemory(&ol,sizeof(ol)); + ol.Offset = (DWORD)offset; + ol.OffsetHigh = (DWORD)(offset >> 32); + DWORD hasRead = 0; + if(!ReadFile(_hFile,scratch,n,&hasRead,&ol)) + sRet = Status::IOError(_filename,Win32::GetLastErrSz()); + else + *result = Slice(scratch,hasRead); + return sRet; +} + +BOOL Win32RandomAccessFile::_Init( LPCWSTR path ) +{ + BOOL bRet = FALSE; + if(!_hFile) + _hFile = ::CreateFileW(path,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,NULL); + if(!_hFile || _hFile == INVALID_HANDLE_VALUE ) + _hFile = NULL; + else + bRet = TRUE; + return bRet; +} + +BOOL Win32RandomAccessFile::isEnable() +{ + return _hFile ? TRUE : FALSE; +} + +void Win32RandomAccessFile::_CleanUp() +{ + if(_hFile){ + ::CloseHandle(_hFile); + _hFile = NULL; + } +} + +size_t Win32MapFile::_Roundup( size_t x, size_t y ) +{ + return ((x + y - 1) / y) * y; +} + +size_t Win32MapFile::_TruncateToPageBoundary( size_t s ) +{ + s -= (s & (_page_size - 1)); + assert((s % _page_size) == 0); + return s; +} + +bool Win32MapFile::_UnmapCurrentRegion() +{ + bool result = true; + if (_base != NULL) { + if (_last_sync < _limit) { + // Defer syncing this data until next Sync() call, if any + _pending_sync = true; + } + if (!UnmapViewOfFile(_base) || !CloseHandle(_base_handle)) + result = false; + _file_offset += _limit - _base; + _base = NULL; + _base_handle = NULL; + _limit = NULL; + _last_sync = NULL; + _dst = NULL; + // Increase the amount we map the next time, but capped at 1MB + if (_map_size < (1<<20)) { + _map_size *= 2; + } + } + return result; +} + +bool Win32MapFile::_MapNewRegion() +{ + assert(_base == NULL); + //LONG newSizeHigh = (LONG)((file_offset_ + map_size_) >> 32); + //LONG newSizeLow = (LONG)((file_offset_ + map_size_) & 0xFFFFFFFF); + DWORD off_hi = (DWORD)(_file_offset >> 32); + DWORD off_lo = (DWORD)(_file_offset & 0xFFFFFFFF); + LARGE_INTEGER newSize; + newSize.QuadPart = _file_offset + _map_size; + SetFilePointerEx(_hFile, newSize, NULL, FILE_BEGIN); + SetEndOfFile(_hFile); + + _base_handle = CreateFileMappingA( + _hFile, + NULL, + PAGE_READWRITE, + 0, + 0, + 0); + if (_base_handle != NULL) { + _base = (char*) MapViewOfFile(_base_handle, + FILE_MAP_ALL_ACCESS, + off_hi, + off_lo, + _map_size); + if (_base != NULL) { + _limit = _base + _map_size; + _dst = _base; + _last_sync = _base; + return true; + } + } + return false; +} + +Win32MapFile::Win32MapFile( const std::string& fname) : + _filename(fname), + _hFile(NULL), + _page_size(Win32::g_PageSize), + _map_size(_Roundup(65536, Win32::g_PageSize)), + _base(NULL), + _base_handle(NULL), + _limit(NULL), + _dst(NULL), + _last_sync(NULL), + _file_offset(0), + _pending_sync(false) +{ + std::wstring path; + ToWidePath(fname, path); + _Init(path.c_str()); + assert((Win32::g_PageSize & (Win32::g_PageSize - 1)) == 0); +} + +Status Win32MapFile::Append( const Slice& data ) +{ + const char* src = data.data(); + size_t left = data.size(); + Status s; + while (left > 0) { + assert(_base <= _dst); + assert(_dst <= _limit); + size_t avail = _limit - _dst; + if (avail == 0) { + if (!_UnmapCurrentRegion() || + !_MapNewRegion()) { + return Status::IOError("WinMmapFile.Append::UnmapCurrentRegion or MapNewRegion: ", Win32::GetLastErrSz()); + } + } + size_t n = (left <= avail) ? left : avail; + memcpy(_dst, src, n); + _dst += n; + src += n; + left -= n; + } + return s; +} + +Status Win32MapFile::Close() +{ + Status s; + size_t unused = _limit - _dst; + if (!_UnmapCurrentRegion()) { + s = Status::IOError("WinMmapFile.Close::UnmapCurrentRegion: ",Win32::GetLastErrSz()); + } else if (unused > 0) { + // Trim the extra space at the end of the file + LARGE_INTEGER newSize; + newSize.QuadPart = _file_offset - unused; + if (!SetFilePointerEx(_hFile, newSize, NULL, FILE_BEGIN)) { + s = Status::IOError("WinMmapFile.Close::SetFilePointer: ",Win32::GetLastErrSz()); + } else + SetEndOfFile(_hFile); + } + if (!CloseHandle(_hFile)) { + if (s.ok()) { + s = Status::IOError("WinMmapFile.Close::CloseHandle: ", Win32::GetLastErrSz()); + } + } + _hFile = INVALID_HANDLE_VALUE; + _base = NULL; + _base_handle = NULL; + _limit = NULL; + + return s; +} + +Status Win32MapFile::Sync() +{ + Status s; + if (_pending_sync) { + // Some unmapped data was not synced + _pending_sync = false; + if (!FlushFileBuffers(_hFile)) { + s = Status::IOError("WinMmapFile.Sync::FlushFileBuffers: ",Win32::GetLastErrSz()); + } + } + if (_dst > _last_sync) { + // Find the beginnings of the pages that contain the first and last + // bytes to be synced. + size_t p1 = _TruncateToPageBoundary(_last_sync - _base); + size_t p2 = _TruncateToPageBoundary(_dst - _base - 1); + _last_sync = _dst; + if (!FlushViewOfFile(_base + p1, p2 - p1 + _page_size)) { + s = Status::IOError("WinMmapFile.Sync::FlushViewOfFile: ",Win32::GetLastErrSz()); + } + } + return s; +} + +Status Win32MapFile::Flush() +{ + return Status::OK(); +} + +Win32MapFile::~Win32MapFile() +{ + if (_hFile != INVALID_HANDLE_VALUE) { + Win32MapFile::Close(); + } +} + +BOOL Win32MapFile::_Init( LPCWSTR Path ) +{ + DWORD Flag = PathFileExistsW(Path) ? OPEN_EXISTING : CREATE_ALWAYS; + _hFile = CreateFileW(Path, + GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ|FILE_SHARE_DELETE|FILE_SHARE_WRITE, + NULL, + Flag, + FILE_ATTRIBUTE_NORMAL, + NULL); + if(!_hFile || _hFile == INVALID_HANDLE_VALUE) + return FALSE; + else + return TRUE; +} + +BOOL Win32MapFile::isEnable() +{ + return _hFile ? TRUE : FALSE; +} + +Win32FileLock::Win32FileLock( const std::string& fname ) : + _hFile(NULL),_filename(fname) +{ + std::wstring path; + ToWidePath(fname, path); + _Init(path.c_str()); +} + +Win32FileLock::~Win32FileLock() +{ + _CleanUp(); +} + +BOOL Win32FileLock::_Init( LPCWSTR path ) +{ + BOOL bRet = FALSE; + if(!_hFile) + _hFile = ::CreateFileW(path,0,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL); + if(!_hFile || _hFile == INVALID_HANDLE_VALUE ){ + _hFile = NULL; + } + else + bRet = TRUE; + return bRet; +} + +void Win32FileLock::_CleanUp() +{ + ::CloseHandle(_hFile); + _hFile = NULL; +} + +BOOL Win32FileLock::isEnable() +{ + return _hFile ? TRUE : FALSE; +} + +Win32Logger::Win32Logger(WritableFile* pFile) : _pFileProxy(pFile) +{ + assert(_pFileProxy); +} + +Win32Logger::~Win32Logger() +{ + if(_pFileProxy) + delete _pFileProxy; +} + +void Win32Logger::Logv( const char* format, va_list ap ) +{ + uint64_t thread_id = ::GetCurrentThreadId(); + + // We try twice: the first time with a fixed-size stack allocated buffer, + // and the second time with a much larger dynamically allocated buffer. + char buffer[500]; + for (int iter = 0; iter < 2; iter++) { + char* base; + int bufsize; + if (iter == 0) { + bufsize = sizeof(buffer); + base = buffer; + } else { + bufsize = 30000; + base = new char[bufsize]; + } + char* p = base; + char* limit = base + bufsize; + + SYSTEMTIME st; + GetLocalTime(&st); + p += snprintf(p, limit - p, + "%04d/%02d/%02d-%02d:%02d:%02d.%06d %llx ", + int(st.wYear), + int(st.wMonth), + int(st.wDay), + int(st.wHour), + int(st.wMinute), + int(st.wMinute), + int(st.wMilliseconds), + static_cast(thread_id)); + + // Print the message + if (p < limit) { + va_list backup_ap; + va_copy(backup_ap, ap); + p += vsnprintf(p, limit - p, format, backup_ap); + va_end(backup_ap); + } + + // Truncate to available space if necessary + if (p >= limit) { + if (iter == 0) { + continue; // Try again with larger buffer + } else { + p = limit - 1; + } + } + + // Add newline if necessary + if (p == base || p[-1] != '\n') { + *p++ = '\n'; + } + + assert(p <= limit); + DWORD hasWritten = 0; + if(_pFileProxy){ + _pFileProxy->Append(Slice(base, p - base)); + _pFileProxy->Flush(); + } + if (base != buffer) { + delete[] base; + } + break; + } +} + +bool Win32Env::FileExists(const std::string& fname) +{ + std::string path = fname; + std::wstring wpath; + ToWidePath(ModifyPath(path), wpath); + return ::PathFileExistsW(wpath.c_str()) ? true : false; +} + +Status Win32Env::GetChildren(const std::string& dir, std::vector* result) +{ + Status sRet; + ::WIN32_FIND_DATAW wfd; + std::string path = dir; + ModifyPath(path); + path += "\\*.*"; + std::wstring wpath; + ToWidePath(path, wpath); + + ::HANDLE hFind = ::FindFirstFileW(wpath.c_str() ,&wfd); + if(hFind && hFind != INVALID_HANDLE_VALUE){ + BOOL hasNext = TRUE; + std::string child; + while(hasNext){ + ToNarrowPath(wfd.cFileName, child); + if(child != ".." && child != ".") { + result->push_back(child); + } + hasNext = ::FindNextFileW(hFind,&wfd); + } + ::FindClose(hFind); + } + else + sRet = Status::IOError(dir,"Could not get children."); + return sRet; +} + +void Win32Env::SleepForMicroseconds( int micros ) +{ + ::Sleep((micros + 999) /1000); +} + + +Status Win32Env::DeleteFile( const std::string& fname ) +{ + Status sRet; + std::string path = fname; + std::wstring wpath; + ToWidePath(ModifyPath(path), wpath); + + if(!::DeleteFileW(wpath.c_str())) { + sRet = Status::IOError(path, "Could not delete file."); + } + return sRet; +} + +Status Win32Env::GetFileSize( const std::string& fname, uint64_t* file_size ) +{ + Status sRet; + std::string path = fname; + std::wstring wpath; + ToWidePath(ModifyPath(path), wpath); + + HANDLE file = ::CreateFileW(wpath.c_str(), + GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); + LARGE_INTEGER li; + if(::GetFileSizeEx(file,&li)){ + *file_size = (uint64_t)li.QuadPart; + }else + sRet = Status::IOError(path,"Could not get the file size."); + CloseHandle(file); + return sRet; +} + +Status Win32Env::RenameFile( const std::string& src, const std::string& target ) +{ + Status sRet; + std::string src_path = src; + std::wstring wsrc_path; + ToWidePath(ModifyPath(src_path), wsrc_path); + std::string target_path = target; + std::wstring wtarget_path; + ToWidePath(ModifyPath(target_path), wtarget_path); + + if(!MoveFileW(wsrc_path.c_str(), wtarget_path.c_str() ) ){ + DWORD err = GetLastError(); + if(err == 0x000000b7){ + if(!::DeleteFileW(wtarget_path.c_str() ) ) + sRet = Status::IOError(src, "Could not rename file."); + else if(!::MoveFileW(wsrc_path.c_str(), + wtarget_path.c_str() ) ) + sRet = Status::IOError(src, "Could not rename file."); + } + } + return sRet; +} + +Status Win32Env::LockFile( const std::string& fname, FileLock** lock ) +{ + Status sRet; + std::string path = fname; + ModifyPath(path); + Win32FileLock* _lock = new Win32FileLock(path); + if(!_lock->isEnable()){ + delete _lock; + *lock = NULL; + sRet = Status::IOError(path, "Could not lock file."); + } + else + *lock = _lock; + return sRet; +} + +Status Win32Env::UnlockFile( FileLock* lock ) +{ + Status sRet; + delete lock; + return sRet; +} + +void Win32Env::Schedule( void (*function)(void* arg), void* arg ) +{ + QueueUserWorkItem(Win32::WorkItemWrapperProc, + new Win32::WorkItemWrapper(function,arg), + WT_EXECUTEDEFAULT); +} + +void Win32Env::StartThread( void (*function)(void* arg), void* arg ) +{ + ::_beginthread(function,0,arg); +} + +Status Win32Env::GetTestDirectory( std::string* path ) +{ + Status sRet; + WCHAR TempPath[MAX_PATH]; + ::GetTempPathW(MAX_PATH,TempPath); + ToNarrowPath(TempPath, *path); + path->append("leveldb\\test\\"); + ModifyPath(*path); + return sRet; +} + +uint64_t Win32Env::NowMicros() +{ +#ifndef USE_VISTA_API +#define GetTickCount64 GetTickCount +#endif + return (uint64_t)(GetTickCount64()*1000); +} + +static Status CreateDirInner( const std::string& dirname ) +{ + Status sRet; + DWORD attr = ::GetFileAttributes(dirname.c_str()); + if (attr == INVALID_FILE_ATTRIBUTES) { // doesn't exist: + std::size_t slash = dirname.find_last_of("\\"); + if (slash != std::string::npos){ + sRet = CreateDirInner(dirname.substr(0, slash)); + if (!sRet.ok()) return sRet; + } + BOOL result = ::CreateDirectory(dirname.c_str(), NULL); + if (result == FALSE) { + sRet = Status::IOError(dirname, "Could not create directory."); + return sRet; + } + } + return sRet; +} + +Status Win32Env::CreateDir( const std::string& dirname ) +{ + std::string path = dirname; + if(path[path.length() - 1] != '\\'){ + path += '\\'; + } + ModifyPath(path); + + return CreateDirInner(path); +} + +Status Win32Env::DeleteDir( const std::string& dirname ) +{ + Status sRet; + std::wstring path; + ToWidePath(dirname, path); + ModifyPath(path); + if(!::RemoveDirectoryW( path.c_str() ) ){ + sRet = Status::IOError(dirname, "Could not delete directory."); + } + return sRet; +} + +Status Win32Env::NewSequentialFile( const std::string& fname, SequentialFile** result ) +{ + Status sRet; + std::string path = fname; + ModifyPath(path); + Win32SequentialFile* pFile = new Win32SequentialFile(path); + if(pFile->isEnable()){ + *result = pFile; + }else { + delete pFile; + sRet = Status::IOError(path, Win32::GetLastErrSz()); + } + return sRet; +} + +Status Win32Env::NewRandomAccessFile( const std::string& fname, RandomAccessFile** result ) +{ + Status sRet; + std::string path = fname; + Win32RandomAccessFile* pFile = new Win32RandomAccessFile(ModifyPath(path)); + if(!pFile->isEnable()){ + delete pFile; + *result = NULL; + sRet = Status::IOError(path, Win32::GetLastErrSz()); + }else + *result = pFile; + return sRet; +} + +Status Win32Env::NewLogger( const std::string& fname, Logger** result ) +{ + Status sRet; + std::string path = fname; + Win32MapFile* pMapFile = new Win32MapFile(ModifyPath(path)); + if(!pMapFile->isEnable()){ + delete pMapFile; + *result = NULL; + sRet = Status::IOError(path,"could not create a logger."); + }else + *result = new Win32Logger(pMapFile); + return sRet; +} + +Status Win32Env::NewWritableFile( const std::string& fname, WritableFile** result ) +{ + Status sRet; + std::string path = fname; + Win32MapFile* pFile = new Win32MapFile(ModifyPath(path)); + if(!pFile->isEnable()){ + *result = NULL; + sRet = Status::IOError(fname,Win32::GetLastErrSz()); + }else + *result = pFile; + return sRet; +} + +Win32Env::Win32Env() +{ + +} + +Win32Env::~Win32Env() +{ + +} + + +} // Win32 namespace + +static port::OnceType once = LEVELDB_ONCE_INIT; +static Env* default_env; +static void InitDefaultEnv() { default_env = new Win32::Win32Env(); } + +Env* Env::Default() { + port::InitOnce(&once, InitDefaultEnv); + return default_env; +} + +} // namespace leveldb + +#endif // defined(LEVELDB_PLATFORM_WINDOWS) diff --git a/src/leveldb/util/filter_policy.cc b/src/leveldb/util/filter_policy.cc new file mode 100644 index 0000000..7b045c8 --- /dev/null +++ b/src/leveldb/util/filter_policy.cc @@ -0,0 +1,11 @@ +// Copyright (c) 2012 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/filter_policy.h" + +namespace leveldb { + +FilterPolicy::~FilterPolicy() { } + +} // namespace leveldb diff --git a/src/leveldb/util/hash.cc b/src/leveldb/util/hash.cc new file mode 100644 index 0000000..07cf022 --- /dev/null +++ b/src/leveldb/util/hash.cc @@ -0,0 +1,52 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include "util/coding.h" +#include "util/hash.h" + +// The FALLTHROUGH_INTENDED macro can be used to annotate implicit fall-through +// between switch labels. The real definition should be provided externally. +// This one is a fallback version for unsupported compilers. +#ifndef FALLTHROUGH_INTENDED +#define FALLTHROUGH_INTENDED do { } while (0) +#endif + +namespace leveldb { + +uint32_t Hash(const char* data, size_t n, uint32_t seed) { + // Similar to murmur hash + const uint32_t m = 0xc6a4a793; + const uint32_t r = 24; + const char* limit = data + n; + uint32_t h = seed ^ (n * m); + + // Pick up four bytes at a time + while (data + 4 <= limit) { + uint32_t w = DecodeFixed32(data); + data += 4; + h += w; + h *= m; + h ^= (h >> 16); + } + + // Pick up remaining bytes + switch (limit - data) { + case 3: + h += data[2] << 16; + FALLTHROUGH_INTENDED; + case 2: + h += data[1] << 8; + FALLTHROUGH_INTENDED; + case 1: + h += data[0]; + h *= m; + h ^= (h >> r); + break; + } + return h; +} + + +} // namespace leveldb diff --git a/src/leveldb/util/hash.h b/src/leveldb/util/hash.h new file mode 100644 index 0000000..8889d56 --- /dev/null +++ b/src/leveldb/util/hash.h @@ -0,0 +1,19 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// Simple hash function used for internal data structures + +#ifndef STORAGE_LEVELDB_UTIL_HASH_H_ +#define STORAGE_LEVELDB_UTIL_HASH_H_ + +#include +#include + +namespace leveldb { + +extern uint32_t Hash(const char* data, size_t n, uint32_t seed); + +} + +#endif // STORAGE_LEVELDB_UTIL_HASH_H_ diff --git a/src/leveldb/util/histogram.cc b/src/leveldb/util/histogram.cc new file mode 100644 index 0000000..bb95f58 --- /dev/null +++ b/src/leveldb/util/histogram.cc @@ -0,0 +1,139 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include +#include "port/port.h" +#include "util/histogram.h" + +namespace leveldb { + +const double Histogram::kBucketLimit[kNumBuckets] = { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 25, 30, 35, 40, 45, + 50, 60, 70, 80, 90, 100, 120, 140, 160, 180, 200, 250, 300, 350, 400, 450, + 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000, 2500, 3000, + 3500, 4000, 4500, 5000, 6000, 7000, 8000, 9000, 10000, 12000, 14000, + 16000, 18000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 60000, + 70000, 80000, 90000, 100000, 120000, 140000, 160000, 180000, 200000, + 250000, 300000, 350000, 400000, 450000, 500000, 600000, 700000, 800000, + 900000, 1000000, 1200000, 1400000, 1600000, 1800000, 2000000, 2500000, + 3000000, 3500000, 4000000, 4500000, 5000000, 6000000, 7000000, 8000000, + 9000000, 10000000, 12000000, 14000000, 16000000, 18000000, 20000000, + 25000000, 30000000, 35000000, 40000000, 45000000, 50000000, 60000000, + 70000000, 80000000, 90000000, 100000000, 120000000, 140000000, 160000000, + 180000000, 200000000, 250000000, 300000000, 350000000, 400000000, + 450000000, 500000000, 600000000, 700000000, 800000000, 900000000, + 1000000000, 1200000000, 1400000000, 1600000000, 1800000000, 2000000000, + 2500000000.0, 3000000000.0, 3500000000.0, 4000000000.0, 4500000000.0, + 5000000000.0, 6000000000.0, 7000000000.0, 8000000000.0, 9000000000.0, + 1e200, +}; + +void Histogram::Clear() { + min_ = kBucketLimit[kNumBuckets-1]; + max_ = 0; + num_ = 0; + sum_ = 0; + sum_squares_ = 0; + for (int i = 0; i < kNumBuckets; i++) { + buckets_[i] = 0; + } +} + +void Histogram::Add(double value) { + // Linear search is fast enough for our usage in db_bench + int b = 0; + while (b < kNumBuckets - 1 && kBucketLimit[b] <= value) { + b++; + } + buckets_[b] += 1.0; + if (min_ > value) min_ = value; + if (max_ < value) max_ = value; + num_++; + sum_ += value; + sum_squares_ += (value * value); +} + +void Histogram::Merge(const Histogram& other) { + if (other.min_ < min_) min_ = other.min_; + if (other.max_ > max_) max_ = other.max_; + num_ += other.num_; + sum_ += other.sum_; + sum_squares_ += other.sum_squares_; + for (int b = 0; b < kNumBuckets; b++) { + buckets_[b] += other.buckets_[b]; + } +} + +double Histogram::Median() const { + return Percentile(50.0); +} + +double Histogram::Percentile(double p) const { + double threshold = num_ * (p / 100.0); + double sum = 0; + for (int b = 0; b < kNumBuckets; b++) { + sum += buckets_[b]; + if (sum >= threshold) { + // Scale linearly within this bucket + double left_point = (b == 0) ? 0 : kBucketLimit[b-1]; + double right_point = kBucketLimit[b]; + double left_sum = sum - buckets_[b]; + double right_sum = sum; + double pos = (threshold - left_sum) / (right_sum - left_sum); + double r = left_point + (right_point - left_point) * pos; + if (r < min_) r = min_; + if (r > max_) r = max_; + return r; + } + } + return max_; +} + +double Histogram::Average() const { + if (num_ == 0.0) return 0; + return sum_ / num_; +} + +double Histogram::StandardDeviation() const { + if (num_ == 0.0) return 0; + double variance = (sum_squares_ * num_ - sum_ * sum_) / (num_ * num_); + return sqrt(variance); +} + +std::string Histogram::ToString() const { + std::string r; + char buf[200]; + snprintf(buf, sizeof(buf), + "Count: %.0f Average: %.4f StdDev: %.2f\n", + num_, Average(), StandardDeviation()); + r.append(buf); + snprintf(buf, sizeof(buf), + "Min: %.4f Median: %.4f Max: %.4f\n", + (num_ == 0.0 ? 0.0 : min_), Median(), max_); + r.append(buf); + r.append("------------------------------------------------------\n"); + const double mult = 100.0 / num_; + double sum = 0; + for (int b = 0; b < kNumBuckets; b++) { + if (buckets_[b] <= 0.0) continue; + sum += buckets_[b]; + snprintf(buf, sizeof(buf), + "[ %7.0f, %7.0f ) %7.0f %7.3f%% %7.3f%% ", + ((b == 0) ? 0.0 : kBucketLimit[b-1]), // left + kBucketLimit[b], // right + buckets_[b], // count + mult * buckets_[b], // percentage + mult * sum); // cumulative percentage + r.append(buf); + + // Add hash marks based on percentage; 20 marks for 100%. + int marks = static_cast(20*(buckets_[b] / num_) + 0.5); + r.append(marks, '#'); + r.push_back('\n'); + } + return r; +} + +} // namespace leveldb diff --git a/src/leveldb/util/histogram.h b/src/leveldb/util/histogram.h new file mode 100644 index 0000000..1ef9f3c --- /dev/null +++ b/src/leveldb/util/histogram.h @@ -0,0 +1,42 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_UTIL_HISTOGRAM_H_ +#define STORAGE_LEVELDB_UTIL_HISTOGRAM_H_ + +#include + +namespace leveldb { + +class Histogram { + public: + Histogram() { } + ~Histogram() { } + + void Clear(); + void Add(double value); + void Merge(const Histogram& other); + + std::string ToString() const; + + private: + double min_; + double max_; + double num_; + double sum_; + double sum_squares_; + + enum { kNumBuckets = 154 }; + static const double kBucketLimit[kNumBuckets]; + double buckets_[kNumBuckets]; + + double Median() const; + double Percentile(double p) const; + double Average() const; + double StandardDeviation() const; +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_HISTOGRAM_H_ diff --git a/src/leveldb/util/logging.cc b/src/leveldb/util/logging.cc new file mode 100644 index 0000000..22cf278 --- /dev/null +++ b/src/leveldb/util/logging.cc @@ -0,0 +1,81 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "util/logging.h" + +#include +#include +#include +#include +#include "leveldb/env.h" +#include "leveldb/slice.h" + +namespace leveldb { + +void AppendNumberTo(std::string* str, uint64_t num) { + char buf[30]; + snprintf(buf, sizeof(buf), "%llu", (unsigned long long) num); + str->append(buf); +} + +void AppendEscapedStringTo(std::string* str, const Slice& value) { + for (size_t i = 0; i < value.size(); i++) { + char c = value[i]; + if (c >= ' ' && c <= '~') { + str->push_back(c); + } else { + char buf[10]; + snprintf(buf, sizeof(buf), "\\x%02x", + static_cast(c) & 0xff); + str->append(buf); + } + } +} + +std::string NumberToString(uint64_t num) { + std::string r; + AppendNumberTo(&r, num); + return r; +} + +std::string EscapeString(const Slice& value) { + std::string r; + AppendEscapedStringTo(&r, value); + return r; +} + +bool ConsumeChar(Slice* in, char c) { + if (!in->empty() && (*in)[0] == c) { + in->remove_prefix(1); + return true; + } else { + return false; + } +} + +bool ConsumeDecimalNumber(Slice* in, uint64_t* val) { + uint64_t v = 0; + int digits = 0; + while (!in->empty()) { + char c = (*in)[0]; + if (c >= '0' && c <= '9') { + ++digits; + const int delta = (c - '0'); + static const uint64_t kMaxUint64 = ~static_cast(0); + if (v > kMaxUint64/10 || + (v == kMaxUint64/10 && delta > kMaxUint64%10)) { + // Overflow + return false; + } + v = (v * 10) + delta; + in->remove_prefix(1); + } else { + break; + } + } + *val = v; + return (digits > 0); +} + +} // namespace leveldb diff --git a/src/leveldb/util/logging.h b/src/leveldb/util/logging.h new file mode 100644 index 0000000..b0c5da8 --- /dev/null +++ b/src/leveldb/util/logging.h @@ -0,0 +1,47 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// Must not be included from any .h files to avoid polluting the namespace +// with macros. + +#ifndef STORAGE_LEVELDB_UTIL_LOGGING_H_ +#define STORAGE_LEVELDB_UTIL_LOGGING_H_ + +#include +#include +#include +#include "port/port.h" + +namespace leveldb { + +class Slice; +class WritableFile; + +// Append a human-readable printout of "num" to *str +extern void AppendNumberTo(std::string* str, uint64_t num); + +// Append a human-readable printout of "value" to *str. +// Escapes any non-printable characters found in "value". +extern void AppendEscapedStringTo(std::string* str, const Slice& value); + +// Return a human-readable printout of "num" +extern std::string NumberToString(uint64_t num); + +// Return a human-readable version of "value". +// Escapes any non-printable characters found in "value". +extern std::string EscapeString(const Slice& value); + +// If *in starts with "c", advances *in past the first character and +// returns true. Otherwise, returns false. +extern bool ConsumeChar(Slice* in, char c); + +// Parse a human-readable number from "*in" into *value. On success, +// advances "*in" past the consumed number and sets "*val" to the +// numeric value. Otherwise, returns false and leaves *in in an +// unspecified state. +extern bool ConsumeDecimalNumber(Slice* in, uint64_t* val); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_LOGGING_H_ diff --git a/src/leveldb/util/mutexlock.h b/src/leveldb/util/mutexlock.h new file mode 100644 index 0000000..1ff5a9e --- /dev/null +++ b/src/leveldb/util/mutexlock.h @@ -0,0 +1,41 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_UTIL_MUTEXLOCK_H_ +#define STORAGE_LEVELDB_UTIL_MUTEXLOCK_H_ + +#include "port/port.h" +#include "port/thread_annotations.h" + +namespace leveldb { + +// Helper class that locks a mutex on construction and unlocks the mutex when +// the destructor of the MutexLock object is invoked. +// +// Typical usage: +// +// void MyClass::MyMethod() { +// MutexLock l(&mu_); // mu_ is an instance variable +// ... some complex code, possibly with multiple return paths ... +// } + +class SCOPED_LOCKABLE MutexLock { + public: + explicit MutexLock(port::Mutex *mu) EXCLUSIVE_LOCK_FUNCTION(mu) + : mu_(mu) { + this->mu_->Lock(); + } + ~MutexLock() UNLOCK_FUNCTION() { this->mu_->Unlock(); } + + private: + port::Mutex *const mu_; + // No copying allowed + MutexLock(const MutexLock&); + void operator=(const MutexLock&); +}; + +} // namespace leveldb + + +#endif // STORAGE_LEVELDB_UTIL_MUTEXLOCK_H_ diff --git a/src/leveldb/util/options.cc b/src/leveldb/util/options.cc new file mode 100644 index 0000000..76af5b9 --- /dev/null +++ b/src/leveldb/util/options.cc @@ -0,0 +1,29 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "leveldb/options.h" + +#include "leveldb/comparator.h" +#include "leveldb/env.h" + +namespace leveldb { + +Options::Options() + : comparator(BytewiseComparator()), + create_if_missing(false), + error_if_exists(false), + paranoid_checks(false), + env(Env::Default()), + info_log(NULL), + write_buffer_size(4<<20), + max_open_files(1000), + block_cache(NULL), + block_size(4096), + block_restart_interval(16), + compression(kSnappyCompression), + filter_policy(NULL) { +} + + +} // namespace leveldb diff --git a/src/leveldb/util/posix_logger.h b/src/leveldb/util/posix_logger.h new file mode 100644 index 0000000..c063c2b --- /dev/null +++ b/src/leveldb/util/posix_logger.h @@ -0,0 +1,98 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. +// +// Logger implementation that can be shared by all environments +// where enough Posix functionality is available. + +#ifndef STORAGE_LEVELDB_UTIL_POSIX_LOGGER_H_ +#define STORAGE_LEVELDB_UTIL_POSIX_LOGGER_H_ + +#include +#include +#include +#include +#include "leveldb/env.h" + +namespace leveldb { + +class PosixLogger : public Logger { + private: + FILE* file_; + uint64_t (*gettid_)(); // Return the thread id for the current thread + public: + PosixLogger(FILE* f, uint64_t (*gettid)()) : file_(f), gettid_(gettid) { } + virtual ~PosixLogger() { + fclose(file_); + } + virtual void Logv(const char* format, va_list ap) { + const uint64_t thread_id = (*gettid_)(); + + // We try twice: the first time with a fixed-size stack allocated buffer, + // and the second time with a much larger dynamically allocated buffer. + char buffer[500]; + for (int iter = 0; iter < 2; iter++) { + char* base; + int bufsize; + if (iter == 0) { + bufsize = sizeof(buffer); + base = buffer; + } else { + bufsize = 30000; + base = new char[bufsize]; + } + char* p = base; + char* limit = base + bufsize; + + struct timeval now_tv; + gettimeofday(&now_tv, NULL); + const time_t seconds = now_tv.tv_sec; + struct tm t; + localtime_r(&seconds, &t); + p += snprintf(p, limit - p, + "%04d/%02d/%02d-%02d:%02d:%02d.%06d %llx ", + t.tm_year + 1900, + t.tm_mon + 1, + t.tm_mday, + t.tm_hour, + t.tm_min, + t.tm_sec, + static_cast(now_tv.tv_usec), + static_cast(thread_id)); + + // Print the message + if (p < limit) { + va_list backup_ap; + va_copy(backup_ap, ap); + p += vsnprintf(p, limit - p, format, backup_ap); + va_end(backup_ap); + } + + // Truncate to available space if necessary + if (p >= limit) { + if (iter == 0) { + continue; // Try again with larger buffer + } else { + p = limit - 1; + } + } + + // Add newline if necessary + if (p == base || p[-1] != '\n') { + *p++ = '\n'; + } + + assert(p <= limit); + fwrite(base, 1, p - base, file_); + fflush(file_); + if (base != buffer) { + delete[] base; + } + break; + } + } +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_POSIX_LOGGER_H_ diff --git a/src/leveldb/util/random.h b/src/leveldb/util/random.h new file mode 100644 index 0000000..ddd51b1 --- /dev/null +++ b/src/leveldb/util/random.h @@ -0,0 +1,64 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_UTIL_RANDOM_H_ +#define STORAGE_LEVELDB_UTIL_RANDOM_H_ + +#include + +namespace leveldb { + +// A very simple random number generator. Not especially good at +// generating truly random bits, but good enough for our needs in this +// package. +class Random { + private: + uint32_t seed_; + public: + explicit Random(uint32_t s) : seed_(s & 0x7fffffffu) { + // Avoid bad seeds. + if (seed_ == 0 || seed_ == 2147483647L) { + seed_ = 1; + } + } + uint32_t Next() { + static const uint32_t M = 2147483647L; // 2^31-1 + static const uint64_t A = 16807; // bits 14, 8, 7, 5, 2, 1, 0 + // We are computing + // seed_ = (seed_ * A) % M, where M = 2^31-1 + // + // seed_ must not be zero or M, or else all subsequent computed values + // will be zero or M respectively. For all other values, seed_ will end + // up cycling through every number in [1,M-1] + uint64_t product = seed_ * A; + + // Compute (product % M) using the fact that ((x << 31) % M) == x. + seed_ = static_cast((product >> 31) + (product & M)); + // The first reduction may overflow by 1 bit, so we may need to + // repeat. mod == M is not possible; using > allows the faster + // sign-bit-based test. + if (seed_ > M) { + seed_ -= M; + } + return seed_; + } + // Returns a uniformly distributed value in the range [0..n-1] + // REQUIRES: n > 0 + uint32_t Uniform(int n) { return Next() % n; } + + // Randomly returns true ~"1/n" of the time, and false otherwise. + // REQUIRES: n > 0 + bool OneIn(int n) { return (Next() % n) == 0; } + + // Skewed: pick "base" uniformly from range [0,max_log] and then + // return "base" random bits. The effect is to pick a number in the + // range [0,2^max_log-1] with exponential bias towards smaller numbers. + uint32_t Skewed(int max_log) { + return Uniform(1 << Uniform(max_log + 1)); + } +}; + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_RANDOM_H_ diff --git a/src/leveldb/util/status.cc b/src/leveldb/util/status.cc new file mode 100644 index 0000000..a44f35b --- /dev/null +++ b/src/leveldb/util/status.cc @@ -0,0 +1,75 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include +#include "port/port.h" +#include "leveldb/status.h" + +namespace leveldb { + +const char* Status::CopyState(const char* state) { + uint32_t size; + memcpy(&size, state, sizeof(size)); + char* result = new char[size + 5]; + memcpy(result, state, size + 5); + return result; +} + +Status::Status(Code code, const Slice& msg, const Slice& msg2) { + assert(code != kOk); + const uint32_t len1 = msg.size(); + const uint32_t len2 = msg2.size(); + const uint32_t size = len1 + (len2 ? (2 + len2) : 0); + char* result = new char[size + 5]; + memcpy(result, &size, sizeof(size)); + result[4] = static_cast(code); + memcpy(result + 5, msg.data(), len1); + if (len2) { + result[5 + len1] = ':'; + result[6 + len1] = ' '; + memcpy(result + 7 + len1, msg2.data(), len2); + } + state_ = result; +} + +std::string Status::ToString() const { + if (state_ == NULL) { + return "OK"; + } else { + char tmp[30]; + const char* type; + switch (code()) { + case kOk: + type = "OK"; + break; + case kNotFound: + type = "NotFound: "; + break; + case kCorruption: + type = "Corruption: "; + break; + case kNotSupported: + type = "Not implemented: "; + break; + case kInvalidArgument: + type = "Invalid argument: "; + break; + case kIOError: + type = "IO error: "; + break; + default: + snprintf(tmp, sizeof(tmp), "Unknown code(%d): ", + static_cast(code())); + type = tmp; + break; + } + std::string result(type); + uint32_t length; + memcpy(&length, state_, sizeof(length)); + result.append(state_ + 5, length); + return result; + } +} + +} // namespace leveldb diff --git a/src/leveldb/util/testharness.cc b/src/leveldb/util/testharness.cc new file mode 100644 index 0000000..402fab3 --- /dev/null +++ b/src/leveldb/util/testharness.cc @@ -0,0 +1,77 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "util/testharness.h" + +#include +#include +#include +#include + +namespace leveldb { +namespace test { + +namespace { +struct Test { + const char* base; + const char* name; + void (*func)(); +}; +std::vector* tests; +} + +bool RegisterTest(const char* base, const char* name, void (*func)()) { + if (tests == NULL) { + tests = new std::vector; + } + Test t; + t.base = base; + t.name = name; + t.func = func; + tests->push_back(t); + return true; +} + +int RunAllTests() { + const char* matcher = getenv("LEVELDB_TESTS"); + + int num = 0; + if (tests != NULL) { + for (size_t i = 0; i < tests->size(); i++) { + const Test& t = (*tests)[i]; + if (matcher != NULL) { + std::string name = t.base; + name.push_back('.'); + name.append(t.name); + if (strstr(name.c_str(), matcher) == NULL) { + continue; + } + } + fprintf(stderr, "==== Test %s.%s\n", t.base, t.name); + (*t.func)(); + ++num; + } + } + fprintf(stderr, "==== PASSED %d tests\n", num); + return 0; +} + +std::string TmpDir() { + std::string dir; + Status s = Env::Default()->GetTestDirectory(&dir); + ASSERT_TRUE(s.ok()) << s.ToString(); + return dir; +} + +int RandomSeed() { + const char* env = getenv("TEST_RANDOM_SEED"); + int result = (env != NULL ? atoi(env) : 301); + if (result <= 0) { + result = 301; + } + return result; +} + +} // namespace test +} // namespace leveldb diff --git a/src/leveldb/util/testharness.h b/src/leveldb/util/testharness.h new file mode 100644 index 0000000..da4fe68 --- /dev/null +++ b/src/leveldb/util/testharness.h @@ -0,0 +1,138 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_UTIL_TESTHARNESS_H_ +#define STORAGE_LEVELDB_UTIL_TESTHARNESS_H_ + +#include +#include +#include +#include "leveldb/env.h" +#include "leveldb/slice.h" +#include "util/random.h" + +namespace leveldb { +namespace test { + +// Run some of the tests registered by the TEST() macro. If the +// environment variable "LEVELDB_TESTS" is not set, runs all tests. +// Otherwise, runs only the tests whose name contains the value of +// "LEVELDB_TESTS" as a substring. E.g., suppose the tests are: +// TEST(Foo, Hello) { ... } +// TEST(Foo, World) { ... } +// LEVELDB_TESTS=Hello will run the first test +// LEVELDB_TESTS=o will run both tests +// LEVELDB_TESTS=Junk will run no tests +// +// Returns 0 if all tests pass. +// Dies or returns a non-zero value if some test fails. +extern int RunAllTests(); + +// Return the directory to use for temporary storage. +extern std::string TmpDir(); + +// Return a randomization seed for this run. Typically returns the +// same number on repeated invocations of this binary, but automated +// runs may be able to vary the seed. +extern int RandomSeed(); + +// An instance of Tester is allocated to hold temporary state during +// the execution of an assertion. +class Tester { + private: + bool ok_; + const char* fname_; + int line_; + std::stringstream ss_; + + public: + Tester(const char* f, int l) + : ok_(true), fname_(f), line_(l) { + } + + ~Tester() { + if (!ok_) { + fprintf(stderr, "%s:%d:%s\n", fname_, line_, ss_.str().c_str()); + exit(1); + } + } + + Tester& Is(bool b, const char* msg) { + if (!b) { + ss_ << " Assertion failure " << msg; + ok_ = false; + } + return *this; + } + + Tester& IsOk(const Status& s) { + if (!s.ok()) { + ss_ << " " << s.ToString(); + ok_ = false; + } + return *this; + } + +#define BINARY_OP(name,op) \ + template \ + Tester& name(const X& x, const Y& y) { \ + if (! (x op y)) { \ + ss_ << " failed: " << x << (" " #op " ") << y; \ + ok_ = false; \ + } \ + return *this; \ + } + + BINARY_OP(IsEq, ==) + BINARY_OP(IsNe, !=) + BINARY_OP(IsGe, >=) + BINARY_OP(IsGt, >) + BINARY_OP(IsLe, <=) + BINARY_OP(IsLt, <) +#undef BINARY_OP + + // Attach the specified value to the error message if an error has occurred + template + Tester& operator<<(const V& value) { + if (!ok_) { + ss_ << " " << value; + } + return *this; + } +}; + +#define ASSERT_TRUE(c) ::leveldb::test::Tester(__FILE__, __LINE__).Is((c), #c) +#define ASSERT_OK(s) ::leveldb::test::Tester(__FILE__, __LINE__).IsOk((s)) +#define ASSERT_EQ(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsEq((a),(b)) +#define ASSERT_NE(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsNe((a),(b)) +#define ASSERT_GE(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsGe((a),(b)) +#define ASSERT_GT(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsGt((a),(b)) +#define ASSERT_LE(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsLe((a),(b)) +#define ASSERT_LT(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsLt((a),(b)) + +#define TCONCAT(a,b) TCONCAT1(a,b) +#define TCONCAT1(a,b) a##b + +#define TEST(base,name) \ +class TCONCAT(_Test_,name) : public base { \ + public: \ + void _Run(); \ + static void _RunIt() { \ + TCONCAT(_Test_,name) t; \ + t._Run(); \ + } \ +}; \ +bool TCONCAT(_Test_ignored_,name) = \ + ::leveldb::test::RegisterTest(#base, #name, &TCONCAT(_Test_,name)::_RunIt); \ +void TCONCAT(_Test_,name)::_Run() + +// Register the specified test. Typically not used directly, but +// invoked via the macro expansion of TEST. +extern bool RegisterTest(const char* base, const char* name, void (*func)()); + + +} // namespace test +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_TESTHARNESS_H_ diff --git a/src/leveldb/util/testutil.cc b/src/leveldb/util/testutil.cc new file mode 100644 index 0000000..bee56bf --- /dev/null +++ b/src/leveldb/util/testutil.cc @@ -0,0 +1,51 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#include "util/testutil.h" + +#include "util/random.h" + +namespace leveldb { +namespace test { + +Slice RandomString(Random* rnd, int len, std::string* dst) { + dst->resize(len); + for (int i = 0; i < len; i++) { + (*dst)[i] = static_cast(' ' + rnd->Uniform(95)); // ' ' .. '~' + } + return Slice(*dst); +} + +std::string RandomKey(Random* rnd, int len) { + // Make sure to generate a wide variety of characters so we + // test the boundary conditions for short-key optimizations. + static const char kTestChars[] = { + '\0', '\1', 'a', 'b', 'c', 'd', 'e', '\xfd', '\xfe', '\xff' + }; + std::string result; + for (int i = 0; i < len; i++) { + result += kTestChars[rnd->Uniform(sizeof(kTestChars))]; + } + return result; +} + + +extern Slice CompressibleString(Random* rnd, double compressed_fraction, + size_t len, std::string* dst) { + int raw = static_cast(len * compressed_fraction); + if (raw < 1) raw = 1; + std::string raw_data; + RandomString(rnd, raw, &raw_data); + + // Duplicate the random data until we have filled "len" bytes + dst->clear(); + while (dst->size() < len) { + dst->append(raw_data); + } + dst->resize(len); + return Slice(*dst); +} + +} // namespace test +} // namespace leveldb diff --git a/src/leveldb/util/testutil.h b/src/leveldb/util/testutil.h new file mode 100644 index 0000000..adad3fc --- /dev/null +++ b/src/leveldb/util/testutil.h @@ -0,0 +1,53 @@ +// Copyright (c) 2011 The LevelDB Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. See the AUTHORS file for names of contributors. + +#ifndef STORAGE_LEVELDB_UTIL_TESTUTIL_H_ +#define STORAGE_LEVELDB_UTIL_TESTUTIL_H_ + +#include "leveldb/env.h" +#include "leveldb/slice.h" +#include "util/random.h" + +namespace leveldb { +namespace test { + +// Store in *dst a random string of length "len" and return a Slice that +// references the generated data. +extern Slice RandomString(Random* rnd, int len, std::string* dst); + +// Return a random key with the specified length that may contain interesting +// characters (e.g. \x00, \xff, etc.). +extern std::string RandomKey(Random* rnd, int len); + +// Store in *dst a string of length "len" that will compress to +// "N*compressed_fraction" bytes and return a Slice that references +// the generated data. +extern Slice CompressibleString(Random* rnd, double compressed_fraction, + size_t len, std::string* dst); + +// A wrapper that allows injection of errors. +class ErrorEnv : public EnvWrapper { + public: + bool writable_file_error_; + int num_writable_file_errors_; + + ErrorEnv() : EnvWrapper(Env::Default()), + writable_file_error_(false), + num_writable_file_errors_(0) { } + + virtual Status NewWritableFile(const std::string& fname, + WritableFile** result) { + if (writable_file_error_) { + ++num_writable_file_errors_; + *result = NULL; + return Status::IOError(fname, "fake error"); + } + return target()->NewWritableFile(fname, result); + } +}; + +} // namespace test +} // namespace leveldb + +#endif // STORAGE_LEVELDB_UTIL_TESTUTIL_H_ diff --git a/src/lz4/LICENSE b/src/lz4/LICENSE new file mode 100644 index 0000000..b566df3 --- /dev/null +++ b/src/lz4/LICENSE @@ -0,0 +1,24 @@ +LZ4 Library +Copyright (c) 2011-2014, Yann Collet +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/lz4/lz4.c b/src/lz4/lz4.c new file mode 100644 index 0000000..fd229ef --- /dev/null +++ b/src/lz4/lz4.c @@ -0,0 +1,880 @@ +/* + LZ4 - Fast LZ compression algorithm + Copyright (C) 2011-2014, Yann Collet. + BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - LZ4 source repository : http://code.google.com/p/lz4/ + - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c +*/ + +/************************************** + Tuning parameters +**************************************/ +/* + * MEMORY_USAGE : + * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) + * Increasing memory usage improves compression ratio + * Reduced memory usage can improve speed, due to cache effect + * Default value is 14, for 16KB, which nicely fits into Intel x86 L1 cache + */ +#define MEMORY_USAGE 14 + +/* + * HEAPMODE : + * Select how default compression functions will allocate memory for their hash table, + * in memory stack (0:default, fastest), or in memory heap (1:requires memory allocation (malloc)). + */ +#define HEAPMODE 0 + + +/************************************** + CPU Feature Detection +**************************************/ +/* 32 or 64 bits ? */ +#if (defined(__x86_64__) || defined(_M_X64) || defined(_WIN64) \ + || defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) \ + || defined(__64BIT__) || defined(_LP64) || defined(__LP64__) \ + || defined(__ia64) || defined(__itanium__) || defined(_M_IA64) ) /* Detects 64 bits mode */ +# define LZ4_ARCH64 1 +#else +# define LZ4_ARCH64 0 +#endif + +/* + * Little Endian or Big Endian ? + * Overwrite the #define below if you know your architecture endianess + */ +#if defined (__GLIBC__) +# include +# if (__BYTE_ORDER == __BIG_ENDIAN) +# define LZ4_BIG_ENDIAN 1 +# endif +#elif (defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN) || defined(_BIG_ENDIAN)) && !(defined(__LITTLE_ENDIAN__) || defined(__LITTLE_ENDIAN) || defined(_LITTLE_ENDIAN)) +# define LZ4_BIG_ENDIAN 1 +#elif defined(__sparc) || defined(__sparc__) \ + || defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \ + || defined(__hpux) || defined(__hppa) \ + || defined(_MIPSEB) || defined(__s390__) +# define LZ4_BIG_ENDIAN 1 +#else +/* Little Endian assumed. PDP Endian and other very rare endian format are unsupported. */ +#endif + +/* + * Unaligned memory access is automatically enabled for "common" CPU, such as x86. + * For others CPU, such as ARM, the compiler may be more cautious, inserting unnecessary extra code to ensure aligned access property + * If you know your target CPU supports unaligned memory access, you want to force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +# define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* Define this parameter if your target system or compiler does not support hardware bit count */ +#if defined(_MSC_VER) && defined(_WIN32_WCE) /* Visual Studio for Windows CE does not support Hardware bit count */ +# define LZ4_FORCE_SW_BITCOUNT +#endif + +/* + * BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE : + * This option may provide a small boost to performance for some big endian cpu, although probably modest. + * You may set this option to 1 if data will remain within closed environment. + * This option is useless on Little_Endian CPU (such as x86) + */ + +/* #define BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE 1 */ + + +/************************************** + Compiler Options +**************************************/ +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */ +/* "restrict" is a known keyword */ +#else +# define restrict /* Disable restrict */ +#endif + +#ifdef _MSC_VER /* Visual Studio */ +# define FORCE_INLINE static __forceinline +# include /* For Visual 2005 */ +# if LZ4_ARCH64 /* 64-bits */ +# pragma intrinsic(_BitScanForward64) /* For Visual 2005 */ +# pragma intrinsic(_BitScanReverse64) /* For Visual 2005 */ +# else /* 32-bits */ +# pragma intrinsic(_BitScanForward) /* For Visual 2005 */ +# pragma intrinsic(_BitScanReverse) /* For Visual 2005 */ +# endif +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +#else +# ifdef __GNUC__ +# define FORCE_INLINE static inline __attribute__((always_inline)) +# else +# define FORCE_INLINE static inline +# endif +#endif + +#ifdef _MSC_VER /* Visual Studio */ +# define lz4_bswap16(x) _byteswap_ushort(x) +#else +# define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))) +#endif + +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) +# define expect(expr,value) (__builtin_expect ((expr),(value)) ) +#else +# define expect(expr,value) (expr) +#endif + +#define likely(expr) expect((expr) != 0, 1) +#define unlikely(expr) expect((expr) != 0, 0) + + +/************************************** + Memory routines +**************************************/ +#include /* malloc, calloc, free */ +#define ALLOCATOR(n,s) calloc(n,s) +#define FREEMEM free +#include /* memset, memcpy */ +#define MEM_INIT memset + + +/************************************** + Includes +**************************************/ +#include "lz4.h" + + +/************************************** + Basic Types +**************************************/ +#if defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */ +# include + typedef uint8_t BYTE; + typedef uint16_t U16; + typedef uint32_t U32; + typedef int32_t S32; + typedef uint64_t U64; +#else + typedef unsigned char BYTE; + typedef unsigned short U16; + typedef unsigned int U32; + typedef signed int S32; + typedef unsigned long long U64; +#endif + +#if defined(__GNUC__) && !defined(LZ4_FORCE_UNALIGNED_ACCESS) +# define _PACKED __attribute__ ((packed)) +#else +# define _PACKED +#endif + +#if !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__) +# if defined(__IBMC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# pragma pack(1) +# else +# pragma pack(push, 1) +# endif +#endif + +typedef struct { U16 v; } _PACKED U16_S; +typedef struct { U32 v; } _PACKED U32_S; +typedef struct { U64 v; } _PACKED U64_S; +typedef struct {size_t v;} _PACKED size_t_S; + +#if !defined(LZ4_FORCE_UNALIGNED_ACCESS) && !defined(__GNUC__) +# if defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# pragma pack(0) +# else +# pragma pack(pop) +# endif +#endif + +#define A16(x) (((U16_S *)(x))->v) +#define A32(x) (((U32_S *)(x))->v) +#define A64(x) (((U64_S *)(x))->v) +#define AARCH(x) (((size_t_S *)(x))->v) + + +/************************************** + Constants +**************************************/ +#define LZ4_HASHLOG (MEMORY_USAGE-2) +#define HASHTABLESIZE (1 << MEMORY_USAGE) +#define HASHNBCELLS4 (1 << LZ4_HASHLOG) + +#define MINMATCH 4 + +#define COPYLENGTH 8 +#define LASTLITERALS 5 +#define MFLIMIT (COPYLENGTH+MINMATCH) +static const int LZ4_minLength = (MFLIMIT+1); + +#define KB *(1U<<10) +#define MB *(1U<<20) +#define GB *(1U<<30) + +#define LZ4_64KLIMIT ((64 KB) + (MFLIMIT-1)) +#define SKIPSTRENGTH 6 /* Increasing this value will make the compression run slower on incompressible data */ + +#define MAXD_LOG 16 +#define MAX_DISTANCE ((1 << MAXD_LOG) - 1) + +#define ML_BITS 4 +#define ML_MASK ((1U<=e; */ +#else +# define LZ4_WILDCOPY(d,s,e) { if (likely(e-d <= 8)) LZ4_COPY8(d,s) else do { LZ4_COPY8(d,s) } while (d>3); +# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_clzll(val) >> 3); +# else + int r; + if (!(val>>32)) { r=4; } else { r=0; val>>=32; } + if (!(val>>16)) { r+=2; val>>=8; } else { val>>=24; } + r += (!val); + return r; +# endif +# else +# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanForward64( &r, val ); + return (int)(r>>3); +# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_ctzll(val) >> 3); +# else + static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2, 0, 3, 1, 3, 1, 4, 2, 7, 0, 2, 3, 6, 1, 5, 3, 5, 1, 3, 4, 4, 2, 5, 6, 7, 7, 0, 1, 2, 3, 3, 4, 6, 2, 6, 5, 5, 3, 4, 5, 6, 7, 1, 2, 4, 6, 4, 4, 5, 7, 2, 6, 5, 7, 6, 7, 7 }; + return DeBruijnBytePos[((U64)((val & -(long long)val) * 0x0218A392CDABBD3FULL)) >> 58]; +# endif +# endif +} + +#else + +FORCE_INLINE int LZ4_NbCommonBytes (register U32 val) +{ +# if defined(LZ4_BIG_ENDIAN) +# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanReverse( &r, val ); + return (int)(r>>3); +# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_clz(val) >> 3); +# else + int r; + if (!(val>>16)) { r=2; val>>=8; } else { r=0; val>>=24; } + r += (!val); + return r; +# endif +# else +# if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r; + _BitScanForward( &r, val ); + return (int)(r>>3); +# elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_ctz(val) >> 3); +# else + static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0, 3, 2, 2, 1, 3, 2, 0, 1, 3, 3, 1, 2, 2, 2, 2, 0, 3, 1, 2, 0, 1, 0, 1, 1 }; + return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27]; +# endif +# endif +} + +#endif + + +/**************************** + Compression functions +****************************/ +int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); } + +FORCE_INLINE int LZ4_hashSequence(U32 sequence, tableType_t tableType) +{ + if (tableType == byU16) + return (((sequence) * 2654435761U) >> ((MINMATCH*8)-(LZ4_HASHLOG+1))); + else + return (((sequence) * 2654435761U) >> ((MINMATCH*8)-LZ4_HASHLOG)); +} + +FORCE_INLINE int LZ4_hashPosition(const BYTE* p, tableType_t tableType) { return LZ4_hashSequence(A32(p), tableType); } + +FORCE_INLINE void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t tableType, const BYTE* srcBase) +{ + switch (tableType) + { + case byPtr: { const BYTE** hashTable = (const BYTE**) tableBase; hashTable[h] = p; break; } + case byU32: { U32* hashTable = (U32*) tableBase; hashTable[h] = (U32)(p-srcBase); break; } + case byU16: { U16* hashTable = (U16*) tableBase; hashTable[h] = (U16)(p-srcBase); break; } + } +} + +FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) +{ + U32 h = LZ4_hashPosition(p, tableType); + LZ4_putPositionOnHash(p, h, tableBase, tableType, srcBase); +} + +FORCE_INLINE const BYTE* LZ4_getPositionOnHash(U32 h, void* tableBase, tableType_t tableType, const BYTE* srcBase) +{ + if (tableType == byPtr) { const BYTE** hashTable = (const BYTE**) tableBase; return hashTable[h]; } + if (tableType == byU32) { U32* hashTable = (U32*) tableBase; return hashTable[h] + srcBase; } + { U16* hashTable = (U16*) tableBase; return hashTable[h] + srcBase; } /* default, to ensure a return */ +} + +FORCE_INLINE const BYTE* LZ4_getPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase) +{ + U32 h = LZ4_hashPosition(p, tableType); + return LZ4_getPositionOnHash(h, tableBase, tableType, srcBase); +} + + +FORCE_INLINE int LZ4_compress_generic( + void* ctx, + const char* source, + char* dest, + int inputSize, + int maxOutputSize, + + limitedOutput_directive limitedOutput, + tableType_t tableType, + prefix64k_directive prefix) +{ + const BYTE* ip = (const BYTE*) source; + const BYTE* const base = (prefix==withPrefix) ? ((LZ4_Data_Structure*)ctx)->base : (const BYTE*) source; + const BYTE* const lowLimit = ((prefix==withPrefix) ? ((LZ4_Data_Structure*)ctx)->bufferStart : (const BYTE*)source); + const BYTE* anchor = (const BYTE*) source; + const BYTE* const iend = ip + inputSize; + const BYTE* const mflimit = iend - MFLIMIT; + const BYTE* const matchlimit = iend - LASTLITERALS; + + BYTE* op = (BYTE*) dest; + BYTE* const oend = op + maxOutputSize; + + int length; + const int skipStrength = SKIPSTRENGTH; + U32 forwardH; + + /* Init conditions */ + if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported input size, too large (or negative) */ + if ((prefix==withPrefix) && (ip != ((LZ4_Data_Structure*)ctx)->nextBlock)) return 0; /* must continue from end of previous block */ + if (prefix==withPrefix) ((LZ4_Data_Structure*)ctx)->nextBlock=iend; /* do it now, due to potential early exit */ + if ((tableType == byU16) && (inputSize>=(int)LZ4_64KLIMIT)) return 0; /* Size too large (not within 64K limit) */ + if (inputSize> skipStrength; + ip = forwardIp; + forwardIp = ip + step; + + if (unlikely(forwardIp > mflimit)) { goto _last_literals; } + + forwardH = LZ4_hashPosition(forwardIp, tableType); + ref = LZ4_getPositionOnHash(h, ctx, tableType, base); + LZ4_putPositionOnHash(ip, h, ctx, tableType, base); + + } while ((ref + MAX_DISTANCE < ip) || (A32(ref) != A32(ip))); + + /* Catch up */ + while ((ip>anchor) && (ref > lowLimit) && (unlikely(ip[-1]==ref[-1]))) { ip--; ref--; } + + /* Encode Literal length */ + length = (int)(ip - anchor); + token = op++; + if ((limitedOutput) && (unlikely(op + length + (2 + 1 + LASTLITERALS) + (length/255) > oend))) return 0; /* Check output limit */ + if (length>=(int)RUN_MASK) + { + int len = length-RUN_MASK; + *token=(RUN_MASK<= 255 ; len-=255) *op++ = 255; + *op++ = (BYTE)len; + } + else *token = (BYTE)(length<>8) > oend))) return 0; /* Check output limit */ + if (length>=(int)ML_MASK) + { + *token += ML_MASK; + length -= ML_MASK; + for (; length > 509 ; length-=510) { *op++ = 255; *op++ = 255; } + if (length >= 255) { length-=255; *op++ = 255; } + *op++ = (BYTE)length; + } + else *token += (BYTE)(length); + + /* Test end of chunk */ + if (ip > mflimit) { anchor = ip; break; } + + /* Fill table */ + LZ4_putPosition(ip-2, ctx, tableType, base); + + /* Test next position */ + ref = LZ4_getPosition(ip, ctx, tableType, base); + LZ4_putPosition(ip, ctx, tableType, base); + if ((ref + MAX_DISTANCE >= ip) && (A32(ref) == A32(ip))) { token = op++; *token=0; goto _next_match; } + + /* Prepare next loop */ + anchor = ip++; + forwardH = LZ4_hashPosition(ip, tableType); + } + +_last_literals: + /* Encode Last Literals */ + { + int lastRun = (int)(iend - anchor); + if ((limitedOutput) && (((char*)op - dest) + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > (U32)maxOutputSize)) return 0; /* Check output limit */ + if (lastRun>=(int)RUN_MASK) { *op++=(RUN_MASK<= 255 ; lastRun-=255) *op++ = 255; *op++ = (BYTE) lastRun; } + else *op++ = (BYTE)(lastRun<hashTable, 0, sizeof(lz4ds->hashTable)); + lz4ds->bufferStart = base; + lz4ds->base = base; + lz4ds->nextBlock = base; +} + +int LZ4_resetStreamState(void* state, const char* inputBuffer) +{ + if ((((size_t)state) & 3) != 0) return 1; /* Error : pointer is not aligned on 4-bytes boundary */ + LZ4_init((LZ4_Data_Structure*)state, (const BYTE*)inputBuffer); + return 0; +} + +void* LZ4_create (const char* inputBuffer) +{ + void* lz4ds = ALLOCATOR(1, sizeof(LZ4_Data_Structure)); + LZ4_init ((LZ4_Data_Structure*)lz4ds, (const BYTE*)inputBuffer); + return lz4ds; +} + + +int LZ4_free (void* LZ4_Data) +{ + FREEMEM(LZ4_Data); + return (0); +} + + +char* LZ4_slideInputBuffer (void* LZ4_Data) +{ + LZ4_Data_Structure* lz4ds = (LZ4_Data_Structure*)LZ4_Data; + size_t delta = lz4ds->nextBlock - (lz4ds->bufferStart + 64 KB); + + if ( (lz4ds->base - delta > lz4ds->base) /* underflow control */ + || ((size_t)(lz4ds->nextBlock - lz4ds->base) > 0xE0000000) ) /* close to 32-bits limit */ + { + size_t deltaLimit = (lz4ds->nextBlock - 64 KB) - lz4ds->base; + int nH; + + for (nH=0; nH < HASHNBCELLS4; nH++) + { + if ((size_t)(lz4ds->hashTable[nH]) < deltaLimit) lz4ds->hashTable[nH] = 0; + else lz4ds->hashTable[nH] -= (U32)deltaLimit; + } + memcpy((void*)(lz4ds->bufferStart), (const void*)(lz4ds->nextBlock - 64 KB), 64 KB); + lz4ds->base = lz4ds->bufferStart; + lz4ds->nextBlock = lz4ds->base + 64 KB; + } + else + { + memcpy((void*)(lz4ds->bufferStart), (const void*)(lz4ds->nextBlock - 64 KB), 64 KB); + lz4ds->nextBlock -= delta; + lz4ds->base -= delta; + } + + return (char*)(lz4ds->nextBlock); +} + + +int LZ4_compress_continue (void* LZ4_Data, const char* source, char* dest, int inputSize) +{ + return LZ4_compress_generic(LZ4_Data, source, dest, inputSize, 0, notLimited, byU32, withPrefix); +} + + +int LZ4_compress_limitedOutput_continue (void* LZ4_Data, const char* source, char* dest, int inputSize, int maxOutputSize) +{ + return LZ4_compress_generic(LZ4_Data, source, dest, inputSize, maxOutputSize, limited, byU32, withPrefix); +} + + +/**************************** + Decompression functions +****************************/ +/* + * This generic decompression function cover all use cases. + * It shall be instanciated several times, using different sets of directives + * Note that it is essential this generic function is really inlined, + * in order to remove useless branches during compilation optimisation. + */ +FORCE_INLINE int LZ4_decompress_generic( + const char* source, + char* dest, + int inputSize, + int outputSize, /* If endOnInput==endOnInputSize, this value is the max size of Output Buffer. */ + + int endOnInput, /* endOnOutputSize, endOnInputSize */ + int prefix64k, /* noPrefix, withPrefix */ + int partialDecoding, /* full, partial */ + int targetOutputSize /* only used if partialDecoding==partial */ + ) +{ + /* Local Variables */ + const BYTE* restrict ip = (const BYTE*) source; + const BYTE* ref; + const BYTE* const iend = ip + inputSize; + + BYTE* op = (BYTE*) dest; + BYTE* const oend = op + outputSize; + BYTE* cpy; + BYTE* oexit = op + targetOutputSize; + + /*const size_t dec32table[] = {0, 3, 2, 3, 0, 0, 0, 0}; / static reduces speed for LZ4_decompress_safe() on GCC64 */ + const size_t dec32table[] = {4-0, 4-3, 4-2, 4-3, 4-0, 4-0, 4-0, 4-0}; /* static reduces speed for LZ4_decompress_safe() on GCC64 */ + static const size_t dec64table[] = {0, 0, 0, (size_t)-1, 0, 1, 2, 3}; + + + /* Special cases */ + if ((partialDecoding) && (oexit> oend-MFLIMIT)) oexit = oend-MFLIMIT; /* targetOutputSize too high => decode everything */ + if ((endOnInput) && (unlikely(outputSize==0))) return ((inputSize==1) && (*ip==0)) ? 0 : -1; /* Empty output buffer */ + if ((!endOnInput) && (unlikely(outputSize==0))) return (*ip==0?1:-1); + + + /* Main Loop */ + while (1) + { + unsigned token; + size_t length; + + /* get runlength */ + token = *ip++; + if ((length=(token>>ML_BITS)) == RUN_MASK) + { + unsigned s=255; + while (((endOnInput)?ip(partialDecoding?oexit:oend-MFLIMIT)) || (ip+length>iend-(2+1+LASTLITERALS))) ) + || ((!endOnInput) && (cpy>oend-COPYLENGTH))) + { + if (partialDecoding) + { + if (cpy > oend) goto _output_error; /* Error : write attempt beyond end of output buffer */ + if ((endOnInput) && (ip+length > iend)) goto _output_error; /* Error : read attempt beyond end of input buffer */ + } + else + { + if ((!endOnInput) && (cpy != oend)) goto _output_error; /* Error : block decoding must stop exactly there */ + if ((endOnInput) && ((ip+length != iend) || (cpy > oend))) goto _output_error; /* Error : input must be consumed */ + } + memcpy(op, ip, length); + ip += length; + op += length; + break; /* Necessarily EOF, due to parsing restrictions */ + } + LZ4_WILDCOPY(op, ip, cpy); ip -= (op-cpy); op = cpy; + + /* get offset */ + LZ4_READ_LITTLEENDIAN_16(ref,cpy,ip); ip+=2; + if ((prefix64k==noPrefix) && (unlikely(ref < (BYTE* const)dest))) goto _output_error; /* Error : offset outside destination buffer */ + + /* get matchlength */ + if ((length=(token&ML_MASK)) == ML_MASK) + { + while ((!endOnInput) || (ipoend-COPYLENGTH-(STEPSIZE-4))) + { + if (cpy > oend-LASTLITERALS) goto _output_error; /* Error : last 5 bytes must be literals */ + LZ4_SECURECOPY(op, ref, (oend-COPYLENGTH)); + while(op (unsigned int)LZ4_MAX_INPUT_SIZE ? 0 : (isize) + ((isize)/255) + 16) + +/* +LZ4_compressBound() : + Provides the maximum size that LZ4 may output in a "worst case" scenario (input data not compressible) + primarily useful for memory allocation of output buffer. + inline function is recommended for the general case, + macro is also provided when result needs to be evaluated at compilation (such as stack memory allocation). + + isize : is the input size. Max supported value is LZ4_MAX_INPUT_SIZE + return : maximum output size in a "worst case" scenario + or 0, if input size is too large ( > LZ4_MAX_INPUT_SIZE) +*/ +int LZ4_compressBound(int isize); + + +/* +LZ4_compress_limitedOutput() : + Compress 'inputSize' bytes from 'source' into an output buffer 'dest' of maximum size 'maxOutputSize'. + If it cannot achieve it, compression will stop, and result of the function will be zero. + This function never writes outside of provided output buffer. + + inputSize : Max supported value is LZ4_MAX_INPUT_VALUE + maxOutputSize : is the size of the destination buffer (which must be already allocated) + return : the number of bytes written in buffer 'dest' + or 0 if the compression fails +*/ +int LZ4_compress_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize); + + +/* +LZ4_decompress_fast() : + originalSize : is the original and therefore uncompressed size + return : the number of bytes read from the source buffer (in other words, the compressed size) + If the source stream is malformed, the function will stop decoding and return a negative result. + note : This function is a bit faster than LZ4_decompress_safe() + This function never writes outside of output buffers, but may read beyond input buffer in case of malicious data packet. + Use this function preferably into a trusted environment (data to decode comes from a trusted source). + Destination buffer must be already allocated. Its size must be a minimum of 'outputSize' bytes. +*/ +int LZ4_decompress_fast (const char* source, char* dest, int originalSize); + + +/* +LZ4_decompress_safe_partial() : + This function decompress a compressed block of size 'inputSize' at position 'source' + into output buffer 'dest' of size 'maxOutputSize'. + The function tries to stop decompressing operation as soon as 'targetOutputSize' has been reached, + reducing decompression time. + return : the number of bytes decoded in the destination buffer (necessarily <= maxOutputSize) + Note : this number can be < 'targetOutputSize' should the compressed block to decode be smaller. + Always control how many bytes were decoded. + If the source stream is detected malformed, the function will stop decoding and return a negative result. + This function never writes outside of output buffer, and never reads outside of input buffer. It is therefore protected against malicious data packets +*/ +int LZ4_decompress_safe_partial (const char* source, char* dest, int inputSize, int targetOutputSize, int maxOutputSize); + + +/* +These functions are provided should you prefer to allocate memory for compression tables with your own allocation methods. +To know how much memory must be allocated for the compression tables, use : +int LZ4_sizeofState(); + +Note that tables must be aligned on 4-bytes boundaries, otherwise compression will fail (return code 0). + +The allocated memory can be provided to the compressions functions using 'void* state' parameter. +LZ4_compress_withState() and LZ4_compress_limitedOutput_withState() are equivalent to previously described functions. +They just use the externally allocated memory area instead of allocating their own (on stack, or on heap). +*/ +int LZ4_sizeofState(void); +int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize); +int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); + + +/************************************** + Streaming Functions +**************************************/ +void* LZ4_create (const char* inputBuffer); +int LZ4_compress_continue (void* LZ4_Data, const char* source, char* dest, int inputSize); +int LZ4_compress_limitedOutput_continue (void* LZ4_Data, const char* source, char* dest, int inputSize, int maxOutputSize); +char* LZ4_slideInputBuffer (void* LZ4_Data); +int LZ4_free (void* LZ4_Data); + +/* +These functions allow the compression of dependent blocks, where each block benefits from prior 64 KB within preceding blocks. +In order to achieve this, it is necessary to start creating the LZ4 Data Structure, thanks to the function : + +void* LZ4_create (const char* inputBuffer); +The result of the function is the (void*) pointer on the LZ4 Data Structure. +This pointer will be needed in all other functions. +If the pointer returned is NULL, then the allocation has failed, and compression must be aborted. +The only parameter 'const char* inputBuffer' must, obviously, point at the beginning of input buffer. +The input buffer must be already allocated, and size at least 192KB. +'inputBuffer' will also be the 'const char* source' of the first block. + +All blocks are expected to lay next to each other within the input buffer, starting from 'inputBuffer'. +To compress each block, use either LZ4_compress_continue() or LZ4_compress_limitedOutput_continue(). +Their behavior are identical to LZ4_compress() or LZ4_compress_limitedOutput(), +but require the LZ4 Data Structure as their first argument, and check that each block starts right after the previous one. +If next block does not begin immediately after the previous one, the compression will fail (return 0). + +When it's no longer possible to lay the next block after the previous one (not enough space left into input buffer), a call to : +char* LZ4_slideInputBuffer(void* LZ4_Data); +must be performed. It will typically copy the latest 64KB of input at the beginning of input buffer. +Note that, for this function to work properly, minimum size of an input buffer must be 192KB. +==> The memory position where the next input data block must start is provided as the result of the function. + +Compression can then resume, using LZ4_compress_continue() or LZ4_compress_limitedOutput_continue(), as usual. + +When compression is completed, a call to LZ4_free() will release the memory used by the LZ4 Data Structure. +*/ + + +int LZ4_sizeofStreamState(void); +int LZ4_resetStreamState(void* state, const char* inputBuffer); + +/* +These functions achieve the same result as : +void* LZ4_create (const char* inputBuffer); + +They are provided here to allow the user program to allocate memory using its own routines. + +To know how much space must be allocated, use LZ4_sizeofStreamState(); +Note also that space must be 4-bytes aligned. + +Once space is allocated, you must initialize it using : LZ4_resetStreamState(void* state, const char* inputBuffer); +void* state is a pointer to the space allocated. +It must be aligned on 4-bytes boundaries, and be large enough. +The parameter 'const char* inputBuffer' must, obviously, point at the beginning of input buffer. +The input buffer must be already allocated, and size at least 192KB. +'inputBuffer' will also be the 'const char* source' of the first block. + +The same space can be re-used multiple times, just by initializing it each time with LZ4_resetStreamState(). +return value of LZ4_resetStreamState() must be 0 is OK. +Any other value means there was an error (typically, pointer is not aligned on 4-bytes boundaries). +*/ + + +int LZ4_decompress_safe_withPrefix64k (const char* source, char* dest, int inputSize, int maxOutputSize); +int LZ4_decompress_fast_withPrefix64k (const char* source, char* dest, int outputSize); + +/* +*_withPrefix64k() : + These decoding functions work the same as their "normal name" versions, + but can use up to 64KB of data in front of 'char* dest'. + These functions are necessary to decode inter-dependant blocks. +*/ + + +/************************************** + Obsolete Functions +**************************************/ +/* +These functions are deprecated and should no longer be used. +They are provided here for compatibility with existing user programs. +*/ +int LZ4_uncompress (const char* source, char* dest, int outputSize); +int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize); + + +#if defined (__cplusplus) +} +#endif diff --git a/src/main.cpp b/src/main.cpp index d5a74dd..1775632 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,15 +6,16 @@ #include "alert.h" #include "checkpoints.h" #include "db.h" +#include "txdb.h" #include "net.h" -#include "init.h" +#include "init.h" #include "ui_interface.h" #include "kernel.h" +#include "smessage.h" #include #include #include -#include -#include + using namespace std; using namespace boost; @@ -33,48 +34,56 @@ unsigned int nTransactionsUpdated = 0; map mapBlockIndex; set > setStakeSeen; -uint256 hashGenesisBlock = hashGenesisBlockOfficial; +//libzerocoin::Params* ZCParams; +//uint256 hashGenesisBlock = hashGenesisBlockOfficial; + static CBigNum bnProofOfWorkLimit(~uint256(0) >> 8); static CBigNum bnProofOfStakeLimit(~uint256(0) >> 8); - static CBigNum bnProofOfWorkLimitTestNet(~uint256(0) >> 8); static CBigNum bnProofOfStakeLimitTestNet(~uint256(0) >> 8); -unsigned int nStakeMinAge = 60 * 60 * 1; -unsigned int nStakeMaxAge = 60 * 60 * 12; -unsigned int nStakeTargetSpacing = 60; +unsigned int nTargetSpacing = 60 * 2; // 2 minutes +unsigned int nStakeMinAge = 60 * 60 * 1; // 1 hour +unsigned int nStakeMaxAge = 60 * 60 * 12; //12 hours +unsigned int nModifierInterval = 5 * 60 ; // .5 time to elapse before new modifier is computed + +int64_t nChainStartTime = 1405500418; +int nCoinbaseMaturity = 7; //overall maturity: currently 7 blocks, maybe subject to increase -int64 nChainStartTime = 1405500418; -int nCoinbaseMaturity = 7; CBlockIndex* pindexGenesisBlock = NULL; int nBestHeight = -1; -CBigNum bnBestChainTrust = 0; -CBigNum bnBestInvalidTrust = 0; + +uint256 nBestChainTrust = 0; +uint256 nBestInvalidTrust = 0; + uint256 hashBestChain = 0; CBlockIndex* pindexBest = NULL; -int64 nTimeBestReceived = 0; +int64_t nTimeBestReceived = 0; CMedianFilter cPeerBlockCounts(5, 0); // Amount of blocks that other nodes claim to have map mapOrphanBlocks; multimap mapOrphanBlocksByPrev; set > setStakeSeenOrphan; -map mapProofOfStake; +//map mapProofOfStake; -map mapOrphanTransactions; -map > mapOrphanTransactionsByPrev; +map mapOrphanTransactions; +map > mapOrphanTransactionsByPrev; // Constant stuff for coinbase transactions we create: CScript COINBASE_FLAGS; const string strMessageMagic = "Triangles Signed Message:\n"; -double dHashesPerSec; -int64 nHPSTimerStart; +//double dHashesPerSec; +//int64_t nHPSTimerStart; // Settings -int64 nTransactionFee = MIN_TX_FEE; +int64_t nTransactionFee = MIN_TX_FEE; +int64_t nReserveBalance = 0; +int64_t nMinimumInputValue = 0; +extern enum Checkpoints::CPMode CheckpointsMode; ////////////////////////////////////////////////////////////////////////////// // @@ -173,29 +182,29 @@ void static Inventory(const uint256& hash) } // ask wallets to resend their transactions -void ResendWalletTransactions() +void ResendWalletTransactions(bool fForce) { BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) - pwallet->ResendWalletTransactions(); + pwallet->ResendWalletTransactions(fForce); } + + + + ////////////////////////////////////////////////////////////////////////////// // // mapOrphanTransactions // -bool AddOrphanTx(const CDataStream& vMsg) +bool AddOrphanTx(const CTransaction& tx) { - CTransaction tx; - CDataStream(vMsg) >> tx; uint256 hash = tx.GetHash(); if (mapOrphanTransactions.count(hash)) return false; - CDataStream* pvMsg = new CDataStream(vMsg); - // Ignore big transactions, to avoid a // send-big-orphans memory exhaustion attack. If a peer has a legitimate // large transaction with a missing parent then we assume @@ -203,16 +212,18 @@ bool AddOrphanTx(const CDataStream& vMsg) // have been mined or received. // 10,000 orphans, each of which is at most 5,000 bytes big is // at most 500 megabytes of orphans: - if (pvMsg->size() > 5000) + + size_t nSize = tx.GetSerializeSize(SER_NETWORK, CTransaction::CURRENT_VERSION); + + if (nSize > 5000) { - printf("ignoring large orphan tx (size: %"PRIszu", hash: %s)\n", pvMsg->size(), hash.ToString().substr(0,10).c_str()); - delete pvMsg; + printf("ignoring large orphan tx (size: %"PRIszu", hash: %s)\n", nSize, hash.ToString().substr(0,10).c_str()); return false; } - mapOrphanTransactions[hash] = pvMsg; + mapOrphanTransactions[hash] = tx; BOOST_FOREACH(const CTxIn& txin, tx.vin) - mapOrphanTransactionsByPrev[txin.prevout.hash].insert(make_pair(hash, pvMsg)); + mapOrphanTransactionsByPrev[txin.prevout.hash].insert(hash); printf("stored orphan tx %s (mapsz %"PRIszu")\n", hash.ToString().substr(0,10).c_str(), mapOrphanTransactions.size()); @@ -223,16 +234,13 @@ void static EraseOrphanTx(uint256 hash) { if (!mapOrphanTransactions.count(hash)) return; - const CDataStream* pvMsg = mapOrphanTransactions[hash]; - CTransaction tx; - CDataStream(*pvMsg) >> tx; + const CTransaction& tx = mapOrphanTransactions[hash]; BOOST_FOREACH(const CTxIn& txin, tx.vin) { mapOrphanTransactionsByPrev[txin.prevout.hash].erase(hash); if (mapOrphanTransactionsByPrev[txin.prevout.hash].empty()) mapOrphanTransactionsByPrev.erase(txin.prevout.hash); } - delete pvMsg; mapOrphanTransactions.erase(hash); } @@ -243,7 +251,7 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) { // Evict a random orphan: uint256 randomhash = GetRandHash(); - map::iterator it = mapOrphanTransactions.lower_bound(randomhash); + map::iterator it = mapOrphanTransactions.lower_bound(randomhash); if (it == mapOrphanTransactions.end()) it = mapOrphanTransactions.begin(); EraseOrphanTx(it->first); @@ -254,6 +262,10 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) + + + + ////////////////////////////////////////////////////////////////////////////// // // CTransaction and CTxIndex @@ -301,12 +313,18 @@ bool CTransaction::IsStandard() const return false; if (!txin.scriptSig.IsPushOnly()) return false; + if (fEnforceCanonical && !txin.scriptSig.HasCanonicalPushes()) { + return false; + } } BOOST_FOREACH(const CTxOut& txout, vout) { if (!::IsStandard(txout.scriptPubKey)) return false; if (txout.nValue == 0) return false; + if (fEnforceCanonical && !txout.scriptPubKey.HasCanonicalPushes()) { + return false; + } } return true; } @@ -446,6 +464,9 @@ int CMerkleTx::SetMerkleBranch(const CBlock* pblock) + + + bool CTransaction::CheckTransaction() const { // Basic checks that don't depend on any context @@ -458,17 +479,14 @@ bool CTransaction::CheckTransaction() const return DoS(100, error("CTransaction::CheckTransaction() : size limits failed")); // Check for negative or overflow output values - int64 nValueOut = 0; + int64_t nValueOut = 0; for (unsigned int i = 0; i < vout.size(); i++) { const CTxOut& txout = vout[i]; if (txout.IsEmpty() && !IsCoinBase() && !IsCoinStake()) return DoS(100, error("CTransaction::CheckTransaction() : txout empty for user transaction")); - - // triangles: enforce minimum output amount - if ((!txout.IsEmpty()) && txout.nValue < MIN_TXOUT_AMOUNT) - return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue below minimum")); - + if (txout.nValue < 0) + return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue negative")); if (txout.nValue > MAX_MONEY) return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue too high")); nValueOut += txout.nValue; @@ -488,7 +506,7 @@ bool CTransaction::CheckTransaction() const if (IsCoinBase()) { if (vin[0].scriptSig.size() < 2 || vin[0].scriptSig.size() > 100) - return DoS(100, error("CTransaction::CheckTransaction() : coinbase script size")); + return DoS(100, error("CTransaction::CheckTransaction() : coinbase script size is invalid")); } else { @@ -500,15 +518,13 @@ bool CTransaction::CheckTransaction() const return true; } - -int64 CTransaction::GetMinFee(unsigned int nBlockSize, bool fAllowFree, - enum GetMinFee_mode mode, unsigned int nBytes) const +int64_t CTransaction::GetMinFee(unsigned int nBlockSize, enum GetMinFee_mode mode, unsigned int nBytes) const { // Base fee is either MIN_TX_FEE or MIN_RELAY_TX_FEE - int64 nBaseFee = (mode == GMF_RELAY) ? MIN_RELAY_TX_FEE : MIN_TX_FEE; + int64_t nBaseFee = (mode == GMF_RELAY) ? MIN_RELAY_TX_FEE : MIN_TX_FEE; unsigned int nNewBlockSize = nBlockSize + nBytes; - int64 nMinFee = (1 + (int64)nBytes / 1000) * nBaseFee; + int64_t nMinFee = (1 + (int64_t)nBytes / 1000) * nBaseFee; // To limit dust spam, require MIN_TX_FEE/MIN_RELAY_TX_FEE if any output is less than 0.01 if (nMinFee < nBaseFee) @@ -550,10 +566,11 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, return tx.DoS(100, error("CTxMemPool::accept() : coinstake as individual tx")); // To help v0.1.5 clients who would see it as a negative number - if ((int64)tx.nLockTime > std::numeric_limits::max()) + if ((int64_t)tx.nLockTime > std::numeric_limits::max()) return error("CTxMemPool::accept() : not accepting nLockTime beyond 2038 yet"); // Rather not work on nonstandard transactions (unless -testnet) + if (!fTestNet && !tx.IsStandard()) return error("CTxMemPool::accept() : nonstandard transaction type"); @@ -618,13 +635,13 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, // you should add code here to check that the transaction does a // reasonable number of ECDSA signature verifications. - int64 nFees = tx.GetValueIn(mapInputs)-tx.GetValueOut(); + int64_t nFees = tx.GetValueIn(mapInputs)-tx.GetValueOut(); unsigned int nSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); // Don't accept it if it can't get into a block - int64 txMinFee = tx.GetMinFee(1000, false, GMF_RELAY, nSize); + int64_t txMinFee = tx.GetMinFee(1000, GMF_RELAY, nSize); if (nFees < txMinFee) - return error("CTxMemPool::accept() : not enough fees %s, %"PRI64d" < %"PRI64d, + return error("CTxMemPool::accept() : not enough fees %s, %"PRId64" < %"PRId64, hash.ToString().c_str(), nFees, txMinFee); @@ -635,8 +652,8 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, { static CCriticalSection cs; static double dFreeCount; - static int64 nLastTime; - int64 nNow = GetTime(); + static int64_t nLastTime; + int64_t nNow = GetTime(); { LOCK(cs); @@ -702,7 +719,7 @@ bool CTxMemPool::addUnchecked(const uint256& hash, CTransaction &tx) } -bool CTxMemPool::remove(CTransaction &tx) +bool CTxMemPool::remove(const CTransaction &tx, bool fRecursive) { // Remove transaction from memory pool { @@ -710,6 +727,13 @@ bool CTxMemPool::remove(CTransaction &tx) uint256 hash = tx.GetHash(); if (mapTx.count(hash)) { + if (fRecursive) { + for (unsigned int i = 0; i < tx.vout.size(); i++) { + std::map::iterator it = mapNextTx.find(COutPoint(hash, i)); + if (it != mapNextTx.end()) + remove(*it->second.ptx, true); + } + } BOOST_FOREACH(const CTxIn& txin, tx.vin) mapNextTx.erase(txin.prevout); mapTx.erase(hash); @@ -719,6 +743,21 @@ bool CTxMemPool::remove(CTransaction &tx) return true; } +bool CTxMemPool::removeConflicts(const CTransaction &tx) +{ + // Remove transactions which depend on inputs of tx, recursively + LOCK(cs); + BOOST_FOREACH(const CTxIn &txin, tx.vin) { + std::map::iterator it = mapNextTx.find(txin.prevout); + if (it != mapNextTx.end()) { + const CTransaction &txConflict = *it->second.ptx; + if (txConflict != tx) + remove(txConflict, true); + } + } + return true; +} + void CTxMemPool::clear() { LOCK(cs); @@ -740,7 +779,7 @@ void CTxMemPool::queryHashes(std::vector& vtxid) -int CMerkleTx::GetDepthInMainChain(CBlockIndex* &pindexRet) const +int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const { if (hashBlock == 0 || nIndex == -1) return 0; @@ -765,7 +804,14 @@ int CMerkleTx::GetDepthInMainChain(CBlockIndex* &pindexRet) const return pindexBest->nHeight - pindex->nHeight + 1; } +int CMerkleTx::GetDepthInMainChain(CBlockIndex* &pindexRet) const +{ + int nResult = GetDepthInMainChainINTERNAL(pindexRet); + if (nResult == 0 && !mempool.exists(GetHash())) + return -1; // Not in chain, not in mempool + return nResult; +} int CMerkleTx::GetBlocksToMaturity() const { @@ -781,7 +827,7 @@ bool CMerkleTx::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs) { if (!IsInMainChain() && !ClientConnectInputs()) return false; - return CTransaction::AcceptToMemoryPool(txdb, false); + return CTransaction::AcceptToMemoryPool(txdb, fCheckInputs); } else { @@ -817,14 +863,12 @@ bool CWalletTx::AcceptWalletTransaction(CTxDB& txdb, bool fCheckInputs) return false; } - bool CWalletTx::AcceptWalletTransaction() { CTxDB txdb("r"); return AcceptWalletTransaction(txdb); } - int CTxIndex::GetDepthInMainChain() const { // Read block header @@ -868,6 +912,12 @@ bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock) } + + + + + + ////////////////////////////////////////////////////////////////////////////// // // CBlock and CBlockIndex @@ -891,7 +941,6 @@ CBlockIndex* FindBlockByHeight(int nHeight) return pblockindex; } - bool CBlock::ReadFromDisk(const CBlockIndex* pindex, bool fReadTransactions) { if (!fReadTransactions) @@ -906,7 +955,6 @@ bool CBlock::ReadFromDisk(const CBlockIndex* pindex, bool fReadTransactions) return true; } - uint256 static GetOrphanRoot(const CBlock* pblock) { // Work back to the first block in the orphan chain @@ -915,7 +963,6 @@ uint256 static GetOrphanRoot(const CBlock* pblock) return pblock->GetHash(); } - // triangles: find block wanted by given orphan block uint256 WantedByOrphan(const CBlock* pblockOrphan) { @@ -925,53 +972,47 @@ uint256 WantedByOrphan(const CBlock* pblockOrphan) return pblockOrphan->hashPrevBlock; } - -int generateMTRandom(unsigned int s, int range) -{ - random::mt19937 gen(s); - random::uniform_int_distribution<> dist(0, range); - return dist(gen); -} - - - -static const int64 nMinSubsidy = 1 * COIN; -// miner's coin base reward based on nBits -int64 GetProofOfWorkReward(int nHeight, int64 nFees, uint256 prevHash) +// miner's coin base reward +int64_t GetProofOfWorkReward(int64_t nFees) { int64_t nSubsidy = 1 * COIN; - if(nHeight >= 1 && nHeight <= 100) nSubsidy = 1 * COIN; - else if(nHeight > 100 && nHeight <= 1000) nSubsidy = 20 * COIN; - else if(nHeight > 1000 && nHeight <= 3000) nSubsidy = 10 * COIN; - else if(nHeight > 3000 && nHeight <= 7000) nSubsidy = 5 * COIN; - else if(nHeight > 7000 && nHeight <= 9000) nSubsidy = 10 * COIN; + + if (pindexBest->nHeight >= 1 ) { nSubsidy = 1 * COIN;} + if (pindexBest->nHeight >= 100) { nSubsidy = 20 * COIN;} + if (pindexBest->nHeight >= 1000) { nSubsidy = 10 * COIN;} + if (pindexBest->nHeight >= 3000) { nSubsidy = 5 * COIN;} + if (pindexBest->nHeight >= 7000) { nSubsidy = 10 * COIN;} + if (pindexBest->nHeight >= 9001) { nSubsidy = 0 * COIN; } + + if (fDebug && GetBoolArg("-printcreation")) + printf("GetProofOfWorkReward() : create=%s nSubsidy=%"PRId64"\n", FormatMoney(nSubsidy).c_str(), nSubsidy); return nSubsidy + nFees; } -// miner's coin stake reward based on nBits and coin age spent (coin-days) -// simple algorithm, not depend on the diff -int64 GetProofOfStakeReward(int64 nCoinAge, unsigned int nBits, unsigned int nTime, int nHeight) +// miner's coin stake reward based on coin age spent (coin-days) +int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees) { - int64 nRewardCoinYear; + int64_t nRewardCoinYear; + nRewardCoinYear = MAX_TRI_PROOF_OF_STAKE; - int64 nSubsidy = nCoinAge * nRewardCoinYear / 365; + + int64_t nSubsidy = nCoinAge * nRewardCoinYear / 365 / COIN; + if (fDebug && GetBoolArg("-printcreation")) - printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRI64d" nBits=%d\n", FormatMoney(nSubsidy).c_str(), nCoinAge, nBits); + printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRId64"\n", FormatMoney(nSubsidy).c_str(), nCoinAge); - return nSubsidy; + return nSubsidy + nFees; } -static const int64 nTargetTimespan = 60 * 30; // 30 blocks -static const int64 nTargetSpacingWorkMax = 3 * nStakeTargetSpacing; +static const int64_t nTargetTimespan = 60 * 30; // 30 mins // // maximum nBits value could possible be required nTime after -// minimum proof-of-work required was nBase // -unsigned int ComputeMaxBits(CBigNum bnTargetLimit, unsigned int nBase, int64 nTime) +unsigned int ComputeMaxBits(CBigNum bnTargetLimit, unsigned int nBase, int64_t nTime) { CBigNum bnResult; bnResult.SetCompact(nBase); @@ -980,7 +1021,7 @@ unsigned int ComputeMaxBits(CBigNum bnTargetLimit, unsigned int nBase, int64 nTi { // Maximum 200% adjustment per day... bnResult *= 2; - nTime -= 24 * 60 * 6; + nTime -= 24 * 60 * 60; } if (bnResult > bnTargetLimit) bnResult = bnTargetLimit; @@ -991,7 +1032,7 @@ unsigned int ComputeMaxBits(CBigNum bnTargetLimit, unsigned int nBase, int64 nTi // minimum amount of work that could possibly be required nTime after // minimum proof-of-work required was nBase // -unsigned int ComputeMinWork(unsigned int nBase, int64 nTime) +unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime) { return ComputeMaxBits(bnProofOfWorkLimit, nBase, nTime); } @@ -1000,7 +1041,7 @@ unsigned int ComputeMinWork(unsigned int nBase, int64 nTime) // minimum amount of stake that could possibly be required nTime after // minimum proof-of-stake required was nBase // -unsigned int ComputeMinStake(unsigned int nBase, int64 nTime, unsigned int nBlockTime) +unsigned int ComputeMinStake(unsigned int nBase, int64_t nTime, unsigned int nBlockTime) { return ComputeMaxBits(bnProofOfStakeLimit, nBase, nTime); } @@ -1014,15 +1055,9 @@ const CBlockIndex* GetLastBlockIndex(const CBlockIndex* pindex, bool fProofOfSta return pindex; } -unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfStake) +static unsigned int GetNextTargetRequired_(const CBlockIndex* pindexLast, bool fProofOfStake) { - CBigNum bnTargetLimit = bnProofOfWorkLimit; - - if(fProofOfStake) - { - // Proof-of-Stake blocks has own target limit since nVersion=3 supermajority on mainNet and always on testNet - bnTargetLimit = bnProofOfStakeLimit; - } + CBigNum bnTargetLimit = fProofOfStake ? bnProofOfStakeLimit : bnProofOfWorkLimit; if (pindexLast == NULL) return bnTargetLimit.GetCompact(); // genesis block @@ -1034,36 +1069,39 @@ unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfS if (pindexPrevPrev->pprev == NULL) return bnTargetLimit.GetCompact(); // second block - int64 nActualSpacing = pindexPrev->GetBlockTime() - pindexPrevPrev->GetBlockTime(); - if(nActualSpacing < 0) - { - // printf(">> nActualSpacing = %"PRI64d" corrected to 1.\n", nActualSpacing); - nActualSpacing = 1; + int64_t nActualSpacing = pindexPrev->GetBlockTime() - pindexPrevPrev->GetBlockTime(); + if(nActualSpacing < 0) + { + //printf(">> nActualSpacing = %"PRId64" corrected to %"PRId64"\n", nActualSpacing, nTargetSpacing); + nActualSpacing = nTargetSpacing; } - + // triangles: target change every block // triangles: retarget with exponential moving toward target spacing CBigNum bnNew; bnNew.SetCompact(pindexPrev->nBits); - - int64 nTargetSpacing = fProofOfStake? nStakeTargetSpacing : min(nTargetSpacingWorkMax, (int64) nStakeTargetSpacing * (1 + pindexLast->nHeight - pindexPrev->nHeight)); - int64 nInterval = nTargetTimespan / nTargetSpacing; + int64_t nInterval = nTargetTimespan / nTargetSpacing; bnNew *= ((nInterval - 1) * nTargetSpacing + nActualSpacing + nActualSpacing); bnNew /= ((nInterval + 1) * nTargetSpacing); - - /* - printf(">> Height = %d, fProofOfStake = %d, nInterval = %"PRI64d", nTargetSpacing = %"PRI64d", nActualSpacing = %"PRI64d"\n", - pindexPrev->nHeight, fProofOfStake, nInterval, nTargetSpacing, nActualSpacing); - printf(">> pindexPrev->GetBlockTime() = %"PRI64d", pindexPrev->nHeight = %d, pindexPrevPrev->GetBlockTime() = %"PRI64d", pindexPrevPrev->nHeight = %d\n", - pindexPrev->GetBlockTime(), pindexPrev->nHeight, pindexPrevPrev->GetBlockTime(), pindexPrevPrev->nHeight); - */ - if (bnNew > bnTargetLimit) + /* + printf(">> Height = %d, fProofOfStake = %d, nInterval = %"PRId64", nTargetSpacing = %"PRId64", nActualSpacing = %"PRId64"\n", + pindexPrev->nHeight, fProofOfStake, nInterval, nTargetSpacing, nActualSpacing); + printf(">> pindexPrev->GetBlockTime() = %"PRId64", pindexPrev->nHeight = %d, pindexPrevPrev->GetBlockTime() = %"PRId64", pindexPrevPrev->nHeight = %d\n", + pindexPrev->GetBlockTime(), pindexPrev->nHeight, pindexPrevPrev->GetBlockTime(), pindexPrevPrev->nHeight); + */ + + if (bnNew <= 0 || bnNew > bnTargetLimit) bnNew = bnTargetLimit; return bnNew.GetCompact(); } +unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfStake) +{ + return GetNextTargetRequired_(pindexLast, fProofOfStake); +} + bool CheckProofOfWork(uint256 hash, unsigned int nBits) { CBigNum bnTarget; @@ -1090,7 +1128,7 @@ bool IsInitialBlockDownload() { if (pindexBest == NULL || nBestHeight < Checkpoints::GetTotalBlocksEstimate()) return true; - static int64 nLastUpdate; + static int64_t nLastUpdate; static CBlockIndex* pindexLastBest; if (pindexBest != pindexLastBest) { @@ -1103,28 +1141,43 @@ bool IsInitialBlockDownload() void static InvalidChainFound(CBlockIndex* pindexNew) { - if (pindexNew->bnChainTrust > bnBestInvalidTrust) + if (pindexNew->nChainTrust > nBestInvalidTrust) { - bnBestInvalidTrust = pindexNew->bnChainTrust; - CTxDB().WriteBestInvalidTrust(bnBestInvalidTrust); + nBestInvalidTrust = pindexNew->nChainTrust; + CTxDB().WriteBestInvalidTrust(CBigNum(nBestInvalidTrust)); uiInterface.NotifyBlocksChanged(); } - printf("InvalidChainFound: invalid block=%s height=%d trust=%s date=%s\n", + uint256 nBestInvalidBlockTrust = pindexNew->nChainTrust - pindexNew->pprev->nChainTrust; + uint256 nBestBlockTrust = pindexBest->nHeight != 0 ? (pindexBest->nChainTrust - pindexBest->pprev->nChainTrust) : pindexBest->nChainTrust; + + printf("InvalidChainFound: invalid block=%s height=%d trust=%s blocktrust=%"PRId64" date=%s\n", pindexNew->GetBlockHash().ToString().substr(0,20).c_str(), pindexNew->nHeight, - pindexNew->bnChainTrust.ToString().c_str(), DateTimeStrFormat("%x %H:%M:%S", - pindexNew->GetBlockTime()).c_str()); - printf("InvalidChainFound: current best=%s height=%d trust=%s date=%s\n", - hashBestChain.ToString().substr(0,20).c_str(), nBestHeight, bnBestChainTrust.ToString().c_str(), + CBigNum(pindexNew->nChainTrust).ToString().c_str(), nBestInvalidBlockTrust.Get64(), + DateTimeStrFormat("%x %H:%M:%S", pindexNew->GetBlockTime()).c_str()); + printf("InvalidChainFound: current best=%s height=%d trust=%s blocktrust=%"PRId64" date=%s\n", + hashBestChain.ToString().substr(0,20).c_str(), nBestHeight, + CBigNum(pindexBest->nChainTrust).ToString().c_str(), + nBestBlockTrust.Get64(), DateTimeStrFormat("%x %H:%M:%S", pindexBest->GetBlockTime()).c_str()); } + void CBlock::UpdateTime(const CBlockIndex* pindexPrev) { nTime = max(GetBlockTime(), GetAdjustedTime()); } + + + + + + + + + bool CTransaction::DisconnectInputs(CTxDB& txdb) { // Relinquish previous transactions' spent pointers @@ -1236,7 +1289,6 @@ bool CTransaction::FetchInputs(CTxDB& txdb, const map& mapTes return true; } - const CTxOut& CTransaction::GetOutputFor(const CTxIn& input, const MapPrevTx& inputs) const { MapPrevTx::const_iterator mi = inputs.find(input.prevout.hash); @@ -1250,13 +1302,12 @@ const CTxOut& CTransaction::GetOutputFor(const CTxIn& input, const MapPrevTx& in return txPrev.vout[input.prevout.n]; } - -int64 CTransaction::GetValueIn(const MapPrevTx& inputs) const +int64_t CTransaction::GetValueIn(const MapPrevTx& inputs) const { if (IsCoinBase()) return 0; - int64 nResult = 0; + int64_t nResult = 0; for (unsigned int i = 0; i < vin.size(); i++) { nResult += GetOutputFor(vin[i], inputs).nValue; @@ -1265,7 +1316,6 @@ int64 CTransaction::GetValueIn(const MapPrevTx& inputs) const } - unsigned int CTransaction::GetP2SHSigOpCount(const MapPrevTx& inputs) const { if (IsCoinBase()) @@ -1281,19 +1331,17 @@ unsigned int CTransaction::GetP2SHSigOpCount(const MapPrevTx& inputs) const return nSigOps; } - -bool CTransaction::ConnectInputs(CTxDB& txdb, MapPrevTx inputs, - map& mapTestPool, const CDiskTxPos& posThisTx, - const CBlockIndex* pindexBlock, bool fBlock, bool fMiner, bool fStrictPayToScriptHash) +bool CTransaction::ConnectInputs(CTxDB& txdb, MapPrevTx inputs, map& mapTestPool, const CDiskTxPos& posThisTx, + const CBlockIndex* pindexBlock, bool fBlock, bool fMiner) { // Take over previous transactions' spent pointers // fBlock is true when this is called from AcceptBlock when a new best-block is added to the blockchain - // fMiner is true when called from the internal bitcoin miner + // fMiner is true when called from the internal triangles miner // ... both are false when called from CTransaction::AcceptToMemoryPool if (!IsCoinBase()) { - int64 nValueIn = 0; - int64 nFees = 0; + int64_t nValueIn = 0; + int64_t nFees = 0; for (unsigned int i = 0; i < vin.size(); i++) { COutPoint prevout = vin[i].prevout; @@ -1342,13 +1390,8 @@ bool CTransaction::ConnectInputs(CTxDB& txdb, MapPrevTx inputs, if (!(fBlock && (nBestHeight < Checkpoints::GetTotalBlocksEstimate()))) { // Verify signature - if (!VerifySignature(txPrev, *this, i, fStrictPayToScriptHash, 0)) + if (!VerifySignature(txPrev, *this, i, 0)) { - // only during transition phase for P2SH: do not invoke anti-DoS code for - // potentially old clients relaying bad P2SH transactions - if (fStrictPayToScriptHash && VerifySignature(txPrev, *this, i, false, 0)) - return error("ConnectInputs() : %s P2SH VerifySignature failed", GetHash().ToString().substr(0,10).c_str()); - return DoS(100,error("ConnectInputs() : %s VerifySignature failed", GetHash().ToString().substr(0,10).c_str())); } } @@ -1363,25 +1406,16 @@ bool CTransaction::ConnectInputs(CTxDB& txdb, MapPrevTx inputs, } } - if (IsCoinStake()) - { - // triangles: coin stake tx earns reward instead of paying fee - uint64 nCoinAge; - if (!GetCoinAge(txdb, nCoinAge)) - return error("ConnectInputs() : %s unable to get coin age for coinstake", GetHash().ToString().substr(0,10).c_str()); - int64 nStakeReward = GetValueOut() - nValueIn; - if (nStakeReward > GetProofOfStakeReward(nCoinAge, pindexBlock->nBits, nTime, pindexBlock->nHeight) - GetMinFee() + MIN_TX_FEE) - return DoS(100, error("ConnectInputs() : %s stake reward exceeded", GetHash().ToString().substr(0,10).c_str())); - } - else + if (!IsCoinStake()) { if (nValueIn < GetValueOut()) return DoS(100, error("ConnectInputs() : %s value in < value out", GetHash().ToString().substr(0,10).c_str())); // Tally transaction fees - int64 nTxFee = nValueIn - GetValueOut(); + int64_t nTxFee = nValueIn - GetValueOut(); if (nTxFee < 0) return DoS(100, error("ConnectInputs() : %s nTxFee < 0", GetHash().ToString().substr(0,10).c_str())); + // triangles: enforce transaction fees for every block if (nTxFee < GetMinFee()) return fBlock? DoS(100, error("ConnectInputs() : %s not paying required fee=%s, paid=%s", GetHash().ToString().substr(0,10).c_str(), FormatMoney(GetMinFee()).c_str(), FormatMoney(nTxFee).c_str())) : false; @@ -1404,7 +1438,7 @@ bool CTransaction::ClientConnectInputs() // Take over previous transactions' spent pointers { LOCK(mempool.cs); - int64 nValueIn = 0; + int64_t nValueIn = 0; for (unsigned int i = 0; i < vin.size(); i++) { // Get prev tx from single transactions in memory @@ -1417,7 +1451,7 @@ bool CTransaction::ClientConnectInputs() return false; // Verify signature - if (!VerifySignature(txPrev, *this, i, true, 0)) + if (!VerifySignature(txPrev, *this, i, 0)) return error("ConnectInputs() : VerifySignature failed"); ///// this is redundant with the mempool.mapNextTx stuff, @@ -1443,6 +1477,8 @@ bool CTransaction::ClientConnectInputs() } + + bool CBlock::DisconnectBlock(CTxDB& txdb, CBlockIndex* pindex) { // Disconnect in reverse order @@ -1469,25 +1505,10 @@ bool CBlock::DisconnectBlock(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(!fJustCheck, !fJustCheck)) + // Check it again in case a previous version let a bad block in, but skip BlockSig checking + if (!CheckBlock(!fJustCheck, !fJustCheck, false)) return false; - // Do not allow blocks that contain transactions which 'overwrite' older transactions, - // unless those are already completely spent. - // If such overwrites are allowed, coinbases and transactions depending upon those - // can be duplicated to remove the ability to spend the first instance -- even after - // 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 ids entirely. - // This rule was originally applied all blocks whose timestamp was after March 15, 2012, 0:00 UTC. - // Now that the whole chain is irreversibly beyond that time it is applied to all blocks except the - // two in the chain that violate it. This prevents exploiting the issue against nodes in their - // initial block download. - bool fEnforceBIP30 = true; // Always active in triangles - bool fStrictPayToScriptHash = true; // Always active in triangles - //// issue here: it doesn't know the version unsigned int nTxPos; if (fJustCheck) @@ -1498,21 +1519,32 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck) nTxPos = pindex->nBlockPos + ::GetSerializeSize(CBlock(), SER_DISK, CLIENT_VERSION) - (2 * GetSizeOfCompactSize(0)) + GetSizeOfCompactSize(vtx.size()); map mapQueuedChanges; - int64 nFees = 0; - int64 nValueIn = 0; - int64 nValueOut = 0; + int64_t nFees = 0; + int64_t nValueIn = 0; + int64_t nValueOut = 0; + int64_t nStakeReward = 0; unsigned int nSigOps = 0; BOOST_FOREACH(CTransaction& tx, vtx) { uint256 hashTx = tx.GetHash(); - if (fEnforceBIP30) { - CTxIndex txindexOld; - if (txdb.ReadTxIndex(hashTx, txindexOld)) { - BOOST_FOREACH(CDiskTxPos &pos, txindexOld.vSpent) - if (pos.IsNull()) - return false; - } + // Do not allow blocks that contain transactions which 'overwrite' older transactions, + // unless those are already completely spent. + // If such overwrites are allowed, coinbases and transactions depending upon those + // can be duplicated to remove the ability to spend the first instance -- even after + // 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 ids entirely. + // This rule was originally applied all blocks whose timestamp was after March 15, 2012, 0:00 UTC. + // Now that the whole chain is irreversibly beyond that time it is applied to all blocks except the + // two in the chain that violate it. This prevents exploiting the issue against nodes in their + // initial block download. + CTxIndex txindexOld; + if (txdb.ReadTxIndex(hashTx, txindexOld)) { + BOOST_FOREACH(CDiskTxPos &pos, txindexOld.vSpent) + if (pos.IsNull()) + return false; } nSigOps += tx.GetLegacySigOpCount(); @@ -1532,41 +1564,57 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck) if (!tx.FetchInputs(txdb, mapQueuedChanges, true, false, mapInputs, fInvalid)) return false; - if (fStrictPayToScriptHash) - { - // Add in sigops done by pay-to-script-hash inputs; - // this is to prevent a "rogue miner" from creating - // an incredibly-expensive-to-validate block. - nSigOps += tx.GetP2SHSigOpCount(mapInputs); - if (nSigOps > MAX_BLOCK_SIGOPS) - return DoS(100, error("ConnectBlock() : too many sigops")); - } + // Add in sigops done by pay-to-script-hash inputs; + // this is to prevent a "rogue miner" from creating + // an incredibly-expensive-to-validate block. + nSigOps += tx.GetP2SHSigOpCount(mapInputs); + if (nSigOps > MAX_BLOCK_SIGOPS) + return DoS(100, error("ConnectBlock() : too many sigops")); - int64 nTxValueIn = tx.GetValueIn(mapInputs); - int64 nTxValueOut = tx.GetValueOut(); + int64_t nTxValueIn = tx.GetValueIn(mapInputs); + int64_t nTxValueOut = tx.GetValueOut(); nValueIn += nTxValueIn; nValueOut += nTxValueOut; if (!tx.IsCoinStake()) nFees += nTxValueIn - nTxValueOut; + if (tx.IsCoinStake()) + nStakeReward = nTxValueOut - nTxValueIn; - if (!tx.ConnectInputs(txdb, mapInputs, mapQueuedChanges, posThisTx, pindex, true, false, fStrictPayToScriptHash)) + if (!tx.ConnectInputs(txdb, mapInputs, mapQueuedChanges, posThisTx, pindex, true, false)) return false; } mapQueuedChanges[hashTx] = CTxIndex(posThisTx, tx.vout.size()); } + if (IsProofOfWork()) + { + int64_t nReward = GetProofOfWorkReward(nFees); + // Check coinbase reward + if (vtx[0].GetValueOut() > nReward) + return DoS(50, error("ConnectBlock() : coinbase reward exceeded (actual=%"PRId64" vs calculated=%"PRId64")", + vtx[0].GetValueOut(), + nReward)); + } + if (IsProofOfStake()) + { + // triangles: coin stake tx earns reward instead of paying fee + uint64_t nCoinAge; + if (!vtx[1].GetCoinAge(txdb, nCoinAge)) + return error("ConnectBlock() : %s unable to get coin age for coinstake", vtx[1].GetHash().ToString().substr(0,10).c_str()); + + int64_t nCalculatedStakeReward = GetProofOfStakeReward(nCoinAge, nFees); + + if (nStakeReward > nCalculatedStakeReward) + return DoS(100, error("ConnectBlock() : coinstake pays too much(actual=%"PRId64" vs calculated=%"PRId64")", nStakeReward, nCalculatedStakeReward)); + } + // triangles: track money supply and mint amount info pindex->nMint = nValueOut - nValueIn + nFees; pindex->nMoneySupply = (pindex->pprev? pindex->pprev->nMoneySupply : 0) + nValueOut - nValueIn; if (!txdb.WriteBlockIndex(CDiskBlockIndex(pindex))) return error("Connect() : WriteBlockIndex for pindex failed"); - // triangles: fees are not collected by miners as in bitcoin - // triangles: fees are destroyed to compensate the entire network - if (fDebug && GetBoolArg("-printcreation")) - printf("ConnectBlock() : destroy=%s nFees=%"PRI64d"\n", FormatMoney(nFees).c_str(), nFees); - if (fJustCheck) return true; @@ -1577,16 +1625,6 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck) return error("ConnectBlock() : UpdateTxIndex failed"); } - uint256 prevHash = 0; - if(pindex->pprev) - { - prevHash = pindex->pprev->GetBlockHash(); - // printf("==> Got prevHash = %s\n", prevHash.ToString().c_str()); - } - - if (vtx[0].GetValueOut() > GetProofOfWorkReward(pindex->nHeight, nFees, prevHash)) - 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) @@ -1692,8 +1730,10 @@ bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew) tx.AcceptToMemoryPool(txdb, false); // Delete redundant memory transactions that are in the connected branch - BOOST_FOREACH(CTransaction& tx, vDelete) + BOOST_FOREACH(CTransaction& tx, vDelete) { mempool.remove(tx); + mempool.removeConflicts(tx); + } printf("REORGANIZE: done\n"); @@ -1726,7 +1766,6 @@ bool CBlock::SetBestChainInner(CTxDB& txdb, CBlockIndex *pindexNew) return true; } - bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) { uint256 hash = GetHash(); @@ -1734,7 +1773,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) if (!txdb.TxnBegin()) return error("SetBestChain() : TxnBegin failed"); - if (pindexGenesisBlock == NULL && hash == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)) + if (pindexGenesisBlock == NULL && hash == (!fTestNet ? hashGenesisBlockOfficial : hashGenesisBlockTestNet)) { txdb.WriteHashBestChain(hash); if (!txdb.TxnCommit()) @@ -1756,7 +1795,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) // Reorganize is costly in terms of db load, as it works in a single db transaction. // Try to limit how much needs to be done inside - while (pindexIntermediate->pprev && pindexIntermediate->pprev->bnChainTrust > pindexBest->bnChainTrust) + while (pindexIntermediate->pprev && pindexIntermediate->pprev->nChainTrust > pindexBest->nChainTrust) { vpindexSecondary.push_back(pindexIntermediate); pindexIntermediate = pindexIntermediate->pprev; @@ -1805,14 +1844,20 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) pindexBest = pindexNew; pblockindexFBBHLast = NULL; nBestHeight = pindexBest->nHeight; - bnBestChainTrust = pindexNew->bnChainTrust; + nBestChainTrust = pindexNew->nChainTrust; nTimeBestReceived = GetTime(); nTransactionsUpdated++; - printf("SetBestChain: new best=%s height=%d trust=%s date=%s\n", - hashBestChain.ToString().c_str(), nBestHeight, bnBestChainTrust.ToString().c_str(), + + uint256 nBestBlockTrust = pindexBest->nHeight != 0 ? (pindexBest->nChainTrust - pindexBest->pprev->nChainTrust) : pindexBest->nChainTrust; + + printf("SetBestChain: new best=%s height=%d trust=%s blocktrust=%"PRId64" date=%s\n", + hashBestChain.ToString().substr(0,20).c_str(), nBestHeight, + CBigNum(nBestChainTrust).ToString().c_str(), + nBestBlockTrust.Get64(), DateTimeStrFormat("%x %H:%M:%S", pindexBest->GetBlockTime()).c_str()); - printf("Stake checkpoint: %x\n", pindexBest->nStakeModifierChecksum); + if (fDebug) + printf("Stake checkpoint: %x\n", pindexBest->nStakeModifierChecksum); // Check the version of the last 100 blocks to see if we need to upgrade: if (!fIsInitialDownload) @@ -1850,7 +1895,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) // guaranteed to be in main chain by sync-checkpoint. This rule is // introduced to help nodes establish a consistent view of the coin // age (trust score) of competing branches. -bool CTransaction::GetCoinAge(CTxDB& txdb, uint64& nCoinAge) const +bool CTransaction::GetCoinAge(CTxDB& txdb, uint64_t& nCoinAge) const { CBigNum bnCentSecond = 0; // coin age in the unit of cent-seconds nCoinAge = 0; @@ -1875,14 +1920,14 @@ bool CTransaction::GetCoinAge(CTxDB& txdb, uint64& nCoinAge) const if (block.GetBlockTime() + nStakeMinAge > nTime) continue; // only count coins meeting min age requirement - int64 nValueIn = txPrev.vout[txin.prevout.n].nValue; + int64_t nValueIn = txPrev.vout[txin.prevout.n].nValue; bnCentSecond += CBigNum(nValueIn) * (nTime-txPrev.nTime) / CENT; if (fDebug && GetBoolArg("-printcoinage")) - printf("coin age nValueIn=%"PRI64d" nTimeDiff=%d bnCentSecond=%s\n", nValueIn, nTime - txPrev.nTime, bnCentSecond.ToString().c_str()); + printf("coin age nValueIn=%"PRId64" nTimeDiff=%d bnCentSecond=%s\n", nValueIn, nTime - txPrev.nTime, bnCentSecond.ToString().c_str()); } - CBigNum bnCoinDay = bnCentSecond * CENT / COIN / (24 * 60 * 60); + CBigNum bnCoinDay = bnCentSecond * CENT / (24 * 60 * 60); if (fDebug && GetBoolArg("-printcoinage")) printf("coin age bnCoinDay=%s\n", bnCoinDay.ToString().c_str()); nCoinAge = bnCoinDay.getuint64(); @@ -1890,14 +1935,14 @@ bool CTransaction::GetCoinAge(CTxDB& txdb, uint64& nCoinAge) const } // triangles: total coin age spent in block, in the unit of coin-days. -bool CBlock::GetCoinAge(uint64& nCoinAge) const +bool CBlock::GetCoinAge(uint64_t& nCoinAge) const { nCoinAge = 0; CTxDB txdb("r"); BOOST_FOREACH(const CTransaction& tx, vtx) { - uint64 nTxCoinAge; + uint64_t nTxCoinAge; if (tx.GetCoinAge(txdb, nTxCoinAge)) nCoinAge += nTxCoinAge; else @@ -1907,11 +1952,11 @@ bool CBlock::GetCoinAge(uint64& nCoinAge) const if (nCoinAge == 0) // block coin age minimum 1 coin-day nCoinAge = 1; if (fDebug && GetBoolArg("-printcoinage")) - printf("block coin age total nCoinDays=%"PRI64d"\n", nCoinAge); + printf("block coin age total nCoinDays=%"PRId64"\n", nCoinAge); return true; } -bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos) +bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos, const uint256& hashProofOfStake) { // Check for duplicate uint256 hash = GetHash(); @@ -1931,29 +1976,24 @@ bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos) } // triangles: compute chain trust score - pindexNew->bnChainTrust = (pindexNew->pprev ? pindexNew->pprev->bnChainTrust : 0) + pindexNew->GetBlockTrust(); + pindexNew->nChainTrust = (pindexNew->pprev ? pindexNew->pprev->nChainTrust : 0) + pindexNew->GetBlockTrust(); // triangles: compute stake entropy bit for stake modifier - if (!pindexNew->SetStakeEntropyBit(GetStakeEntropyBit(pindexNew->nHeight))) - return error("AddToBlockIndex() : SetStakeEntropyBit() failed"); + if (!pindexNew->SetStakeEntropyBit(GetStakeEntropyBit())) + return error("AddToBlockIndex() : SetStakeEntropyBit() failed"); // triangles: record proof-of-stake hash value - if (pindexNew->IsProofOfStake()) - { - if (!mapProofOfStake.count(hash)) - return error("AddToBlockIndex() : hashProofOfStake not found in map"); - pindexNew->hashProofOfStake = mapProofOfStake[hash]; - } + pindexNew->hashProofOfStake = hashProofOfStake; // triangles: compute stake modifier - uint64 nStakeModifier = 0; + uint64_t nStakeModifier = 0; bool fGeneratedStakeModifier = false; if (!ComputeNextStakeModifier(pindexNew->pprev, nStakeModifier, fGeneratedStakeModifier)) return error("AddToBlockIndex() : ComputeNextStakeModifier() failed"); pindexNew->SetStakeModifier(nStakeModifier, fGeneratedStakeModifier); pindexNew->nStakeModifierChecksum = GetStakeModifierChecksum(pindexNew); if (!CheckStakeModifierCheckpoints(pindexNew->nHeight, pindexNew->nStakeModifierChecksum)) - return error("AddToBlockIndex() : Rejected by stake modifier checkpoint height=%d, modifier=0x%016"PRI64x, pindexNew->nHeight, nStakeModifier); + return error("AddToBlockIndex() : Rejected by stake modifier checkpoint height=%d, modifier=0x%016"PRIx64, pindexNew->nHeight, nStakeModifier); // Add to mapBlockIndex map::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first; @@ -1970,12 +2010,10 @@ bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos) return false; // New best - if (pindexNew->bnChainTrust > bnBestChainTrust) + if (pindexNew->nChainTrust > nBestChainTrust) if (!SetBestChain(txdb, pindexNew)) return false; - txdb.Close(); - if (pindexNew == pindexBest) { // Notify UI to display prev block's coinbase if it was ours @@ -1989,7 +2027,9 @@ bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos) } -bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot) const + + +bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckSig) const { // These are checks that are independent of context // that can be verified before saving an orphan block. @@ -2003,7 +2043,7 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot) const return DoS(50, error("CheckBlock() : proof of work failed")); // Check timestamp - if (GetBlockTime() > GetAdjustedTime() + nMaxClockDrift) + if (GetBlockTime() > FutureDrift(GetAdjustedTime())) return error("CheckBlock() : block timestamp too far in the future"); // First transaction must be coinbase, the rest must not be @@ -2013,25 +2053,31 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot) const if (vtx[i].IsCoinBase()) return DoS(100, error("CheckBlock() : more than one coinbase")); - // triangles: only the second transaction can be the optional coinstake - for (unsigned int i = 2; i < vtx.size(); i++) - if (vtx[i].IsCoinStake()) - return DoS(100, error("CheckBlock() : coinstake in wrong position")); - - // triangles: coinbase output should be empty if proof-of-stake block - if (IsProofOfStake() && (vtx[0].vout.size() != 1 || !vtx[0].vout[0].IsEmpty())) - return error("CheckBlock() : coinbase output not empty for proof-of-stake block"); - // Check coinbase timestamp - if (GetBlockTime() > (int64)vtx[0].nTime + nMaxClockDrift) + if (GetBlockTime() > FutureDrift((int64_t)vtx[0].nTime)) return DoS(50, error("CheckBlock() : coinbase timestamp is too early")); - // Check coinstake timestamp - if (IsProofOfStake() && !CheckCoinStakeTimestamp(GetBlockTime(), (int64)vtx[1].nTime)) - return DoS(50, error("CheckBlock() : coinstake timestamp violation nTimeBlock=%"PRI64d" nTimeTx=%u", GetBlockTime(), vtx[1].nTime)); + if (IsProofOfStake()) + { + // Coinbase output should be empty if proof-of-stake block + if (vtx[0].vout.size() != 1 || !vtx[0].vout[0].IsEmpty()) + return DoS(100, error("CheckBlock() : coinbase output not empty for proof-of-stake block")); - if ((nTime >= CUTOFF_POW_TIME) && (IsProofOfWork())) - return DoS(100, error("CheckBlock() : Proof of work (%f TRI) at t=%d on or after %d.\n", ((double) vtx[0].GetValueOut() / (double) COIN), (int) nTime, (int) CUTOFF_POW_TIME)); + // Second transaction must be coinstake, the rest must not be + if (vtx.empty() || !vtx[1].IsCoinStake()) + return DoS(100, error("CheckBlock() : second tx is not coinstake")); + for (unsigned int i = 2; i < vtx.size(); i++) + if (vtx[i].IsCoinStake()) + return DoS(100, error("CheckBlock() : more than one coinstake")); + + // Check coinstake timestamp + if (!CheckCoinStakeTimestamp(GetBlockTime(), (int64_t)vtx[1].nTime)) + return DoS(50, error("CheckBlock() : coinstake timestamp violation nTimeBlock=%"PRId64" nTimeTx=%u", GetBlockTime(), vtx[1].nTime)); + + // triangles: check proof-of-stake block signature + if (fCheckSig && !CheckBlockSignature()) + return DoS(100, error("CheckBlock() : bad proof-of-stake block signature")); + } // Check transactions BOOST_FOREACH(const CTransaction& tx, vtx) @@ -2040,7 +2086,7 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot) const return DoS(tx.nDoS, error("CheckBlock() : CheckTransaction failed")); // triangles: check transaction timestamp - if (GetBlockTime() < (int64)tx.nTime) + if (GetBlockTime() < (int64_t)tx.nTime) return DoS(50, error("CheckBlock() : block timestamp earlier than transaction timestamp")); } @@ -2066,14 +2112,10 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot) const if (fCheckMerkleRoot && hashMerkleRoot != BuildMerkleTree()) return DoS(100, error("CheckBlock() : hashMerkleRoot mismatch")); - // triangles: check block signature - if (!CheckBlockSignature()) - return DoS(100, error("CheckBlock() : bad block signature")); return true; } - bool CBlock::AcceptBlock() { // Check for duplicate @@ -2091,12 +2133,27 @@ bool CBlock::AcceptBlock() if (IsProofOfWork() && nHeight > CUTOFF_POW_BLOCK) return DoS(100, error("AcceptBlock() : No proof-of-work allowed anymore (height = %d)", nHeight)); + if (IsProofOfStake() && nHeight < MODIFIER_INTERVAL_SWITCH) + return DoS(100, error("AcceptBlock() : reject proof-of-stake at height %d", nHeight)); + // Check proof-of-work or proof-of-stake if (nBits != GetNextTargetRequired(pindexPrev, IsProofOfStake())) - return DoS(100, error("AcceptBlock() : incorrect %s", IsProofOfWork() ? "proof-of-work" : "proof-of-stake")); - + { + if (nHeight > CRAPCHAIN_CUTOFF_BLOCK) + { + return DoS(100, error("AcceptBlock() : incorrect %s", IsProofOfWork() ? "proof-of-work" : "proof-of-stake")); + } + else + { + // blocks generated prior to Pharao release (version 4) are automatically accepted + if (fDebug) + printf("ProcessBlock(): pre-Pharao version proof-of-stake accepted for block %d\n", nHeight); + } + } + else + printf("ProcessBlock(): Check proof-of-stake/work OK for block %d\n", nHeight); // Check timestamp against prev - if (GetBlockTime() <= pindexPrev->GetMedianTimePast() || GetBlockTime() + nMaxClockDrift < pindexPrev->GetBlockTime()) + if (GetBlockTime() <= pindexPrev->GetPastTimeLimit() || FutureDrift(GetBlockTime()) < pindexPrev->GetBlockTime()) return error("AcceptBlock() : block's timestamp is too early"); // Check that all transactions are finalized @@ -2108,26 +2165,30 @@ bool CBlock::AcceptBlock() if (!Checkpoints::CheckHardened(nHeight, hash)) return DoS(100, error("AcceptBlock() : rejected by hardened checkpoint lock-in at %d", nHeight)); - // triangles: check that the block satisfies synchronized checkpoint - if (!Checkpoints::CheckSync(hash, pindexPrev)) + // triangles: verify hash target and signature of coinstake tx + uint256 hashProofOfStake = 0, targetProofOfStake = 0; + if (IsProofOfStake()) { - if(!GetBoolArg("-nosynccheckpoints", false)) + if (!CheckProofOfStake(vtx[1], nBits, hashProofOfStake, targetProofOfStake)) { - return error("AcceptBlock() : rejected by synchronized checkpoint"); - } - else - { - strMiscWarning = _("WARNING: syncronized checkpoint violation detected, but skipped!"); + printf("WARNING: ProcessBlock(): check proof-of-stake failed for block %s\n", hash.ToString().c_str()); + return false; // do not error here as we expect this during initial block download } } - // Reject block.nVersion < 3 blocks since 95% threshold on mainNet and always on testNet: - if (nVersion < 3 && ((!fTestNet && nHeight > 14060) || (fTestNet && nHeight > 0))) - return error("CheckBlock() : rejected nVersion < 3 block"); + bool cpSatisfies = Checkpoints::CheckSync(hash, pindexPrev); + + // Check that the block satisfies synchronized checkpoint + if (CheckpointsMode == Checkpoints::STRICT && !cpSatisfies) + return error("AcceptBlock() : rejected by synchronized checkpoint"); + + if (CheckpointsMode == Checkpoints::ADVISORY && !cpSatisfies) + strMiscWarning = _("WARNING: syncronized checkpoint violation detected, but skipped!"); // Enforce rule that the coinbase starts with serialized block height CScript expect = CScript() << nHeight; - if (!std::equal(expect.begin(), expect.end(), vtx[0].vin[0].scriptSig.begin())) + if (vtx[0].vin[0].scriptSig.size() < expect.size() || + !std::equal(expect.begin(), expect.end(), vtx[0].vin[0].scriptSig.begin())) return DoS(100, error("AcceptBlock() : block height mismatch in coinbase")); // Write block to history file @@ -2137,7 +2198,7 @@ bool CBlock::AcceptBlock() unsigned int nBlockPos = 0; if (!WriteToDisk(nFile, nBlockPos)) return error("AcceptBlock() : WriteToDisk failed"); - if (!AddToBlockIndex(nFile, nBlockPos)) + if (!AddToBlockIndex(nFile, nBlockPos, hashProofOfStake)) return error("AcceptBlock() : AddToBlockIndex failed"); // Relay inventory, but don't relay old inventory during initial block download @@ -2156,26 +2217,16 @@ bool CBlock::AcceptBlock() return true; } - -CBigNum CBlockIndex::GetBlockTrust() const +uint256 CBlockIndex::GetBlockTrust() const { CBigNum bnTarget; bnTarget.SetCompact(nBits); + if (bnTarget <= 0) return 0; - if (IsProofOfStake()) - { - // Return trust score as usual - return (CBigNum(1)<<256) / (bnTarget+1); - } - else - { - // Calculate work amount for block - CBigNum bnPoWTrust = (bnProofOfWorkLimit / (bnTarget+1)); - return bnPoWTrust > 1 ? bnPoWTrust : 1; - } -} + return ((CBigNum(1)<<256) / (bnTarget+1)).getuint256(); +} bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned int nRequired, unsigned int nToCheck) { @@ -2189,7 +2240,6 @@ bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, uns return (nFound >= nRequired); } - bool ProcessBlock(CNode* pfrom, CBlock* pblock) { // Check for duplicate @@ -2209,19 +2259,6 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock) if (!pblock->CheckBlock()) return error("ProcessBlock() : CheckBlock FAILED"); - // triangles: verify hash target and signature of coinstake tx - if (pblock->IsProofOfStake()) - { - uint256 hashProofOfStake = 0; - if (!CheckProofOfStake(pblock->vtx[1], pblock->nBits, hashProofOfStake, IsInitialBlockDownload())) - { - printf("WARNING: ProcessBlock(): check proof-of-stake failed for block %s\n", hash.ToString().c_str()); - return false; // do not error here as we expect this during initial block download - } - if (!mapProofOfStake.count(hash)) // add to mapProofOfStake - mapProofOfStake.insert(make_pair(hash, hashProofOfStake)); - } - CBlockIndex* pcheckpoint = Checkpoints::GetLastSyncCheckpoint(); if(pcheckpoint && fDebug) @@ -2240,12 +2277,12 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock) if (pcheckpoint && pblock->hashPrevBlock != hashBestChain && !Checkpoints::WantedByPendingSyncCheckpoint(hash)) { // Extra checks to prevent "fill up memory by spamming with bogus blocks" - int64 deltaTime = pblock->GetBlockTime() - pcheckpoint->nTime; + int64_t deltaTime = pblock->GetBlockTime() - pcheckpoint->nTime; CBigNum bnNewBlock; bnNewBlock.SetCompact(pblock->nBits); CBigNum bnRequired; - if (pblock->IsProofOfStake()) + if (pblock->IsProofOfStake()) bnRequired.SetCompact(ComputeMinStake(GetLastBlockIndex(pcheckpoint, true)->nBits, deltaTime, pblock->nTime)); else bnRequired.SetCompact(ComputeMinWork(GetLastBlockIndex(pcheckpoint, false)->nBits, deltaTime)); @@ -2326,121 +2363,87 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock) } // triangles: sign block -bool CBlock::SignBlock(const CKeyStore& keystore) +bool CBlock::SignBlock(CWallet& wallet, int64_t nFees) { - vector vSolutions; - txnouttype whichType; + // if we are trying to sign + // something except proof-of-stake block template + if (!vtx[0].vout[0].IsEmpty()) + return false; - if(!IsProofOfStake()) + // if we are trying to sign + // a complete proof-of-stake block + if (IsProofOfStake()) + return true; + + static int64_t nLastCoinStakeSearchTime = GetAdjustedTime(); // only initialized at startup + + CKey key; + CTransaction txCoinStake; + int64_t nSearchTime = txCoinStake.nTime; // search to current time + + if (nSearchTime > nLastCoinStakeSearchTime) { - for(unsigned int i = 0; i < vtx[0].vout.size(); i++) + if (wallet.CreateCoinStake(wallet, nBits, nSearchTime-nLastCoinStakeSearchTime, nFees, txCoinStake, key)) { - const CTxOut& txout = vtx[0].vout[i]; - - if (!Solver(txout.scriptPubKey, whichType, vSolutions)) - continue; - - if (whichType == TX_PUBKEY) + if (txCoinStake.nTime >= max(pindexBest->GetPastTimeLimit()+1, PastDrift(pindexBest->GetBlockTime()))) { - // Sign - valtype& vchPubKey = vSolutions[0]; - CKey key; + // make sure coinstake would meet timestamp protocol + // as it would be the same as the block timestamp + vtx[0].nTime = nTime = txCoinStake.nTime; + nTime = max(pindexBest->GetPastTimeLimit()+1, GetMaxTransactionTime()); + nTime = max(GetBlockTime(), PastDrift(pindexBest->GetBlockTime())); - if (!keystore.GetKey(Hash160(vchPubKey), key)) - continue; - if (key.GetPubKey() != vchPubKey) - continue; - if(!key.Sign(GetHash(), vchBlockSig)) - continue; + // we have to make sure that we have no future timestamps in + // our transactions set + for (vector::iterator it = vtx.begin(); it != vtx.end();) + if (it->nTime > nTime) { it = vtx.erase(it); } else { ++it; } - return true; + vtx.insert(vtx.begin() + 1, txCoinStake); + hashMerkleRoot = BuildMerkleTree(); + + // append a signature to our block + return key.Sign(GetHash(), vchBlockSig); } } - } - else - { - const CTxOut& txout = vtx[1].vout[1]; - - if (!Solver(txout.scriptPubKey, whichType, vSolutions)) - return false; - - if (whichType == TX_PUBKEY) - { - // Sign - valtype& vchPubKey = vSolutions[0]; - CKey key; - - if (!keystore.GetKey(Hash160(vchPubKey), key)) - return false; - if (key.GetPubKey() != vchPubKey) - return false; - - return key.Sign(GetHash(), vchBlockSig); - } + nLastCoinStakeSearchInterval = nSearchTime - nLastCoinStakeSearchTime; + nLastCoinStakeSearchTime = nSearchTime; } - printf("Sign failed\n"); + //printf("Sign failed\n"); return false; } // triangles: check block signature bool CBlock::CheckBlockSignature() const { - if (GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)) + if (IsProofOfWork()) return vchBlockSig.empty(); vector vSolutions; txnouttype whichType; - if(IsProofOfStake()) - { - const CTxOut& txout = vtx[1].vout[1]; + const CTxOut& txout = vtx[1].vout[1]; - if (!Solver(txout.scriptPubKey, whichType, vSolutions)) + if (!Solver(txout.scriptPubKey, whichType, vSolutions)) + return false; + + if (whichType == TX_PUBKEY) + { + valtype& vchPubKey = vSolutions[0]; + CKey key; + if (!key.SetPubKey(vchPubKey)) return false; - if (whichType == TX_PUBKEY) - { - valtype& vchPubKey = vSolutions[0]; - CKey key; - if (!key.SetPubKey(vchPubKey)) - return false; - if (vchBlockSig.empty()) - return false; - return key.Verify(GetHash(), vchBlockSig); - } + if (vchBlockSig.empty()) + return false; + return key.Verify(GetHash(), vchBlockSig); } - else - { - for(unsigned int i = 0; i < vtx[0].vout.size(); i++) - { - const CTxOut& txout = vtx[0].vout[i]; - if (!Solver(txout.scriptPubKey, whichType, vSolutions)) - return false; - - if (whichType == TX_PUBKEY) - { - // Verify - valtype& vchPubKey = vSolutions[0]; - CKey key; - if (!key.SetPubKey(vchPubKey)) - continue; - if (vchBlockSig.empty()) - continue; - if(!key.Verify(GetHash(), vchBlockSig)) - continue; - - return true; - } - } - } return false; } - -bool CheckDiskSpace(uint64 nAdditionalBytes) +bool CheckDiskSpace(uint64_t nAdditionalBytes) { - uint64 nFreeBytesAvailable = filesystem::space(GetDataDir()).available; + uint64_t nFreeBytesAvailable = filesystem::space(GetDataDir()).available; // Check for nMinDiskSpace bytes (currently 50MB) if (nFreeBytesAvailable < nMinDiskSpace + nAdditionalBytes) @@ -2449,21 +2452,19 @@ bool CheckDiskSpace(uint64 nAdditionalBytes) string strMessage = _("Warning: Disk space is low!"); strMiscWarning = strMessage; printf("*** %s\n", strMessage.c_str()); - uiInterface.ThreadSafeMessageBox(strMessage, "triangles", CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); + uiInterface.ThreadSafeMessageBox(strMessage, "Triangles", CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); StartShutdown(); return false; } return true; } - static filesystem::path BlockFilePath(unsigned int nFile) { string strBlockFn = strprintf("blk%04u.dat", nFile); return GetDataDir() / strBlockFn; } - FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode) { if ((nFile < 1) || (nFile == (unsigned int) -1)) @@ -2482,13 +2483,12 @@ FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszM return file; } - static unsigned int nCurrentBlockFile = 1; FILE* AppendBlockFile(unsigned int& nFileRet) { nFileRet = 0; - loop + while (true) { FILE* file = OpenBlockFile(nCurrentBlockFile, 0, "ab"); if (!file) @@ -2506,9 +2506,10 @@ FILE* AppendBlockFile(unsigned int& nFileRet) } } - bool LoadBlockIndex(bool fAllowNew) { + //CBigNum bnTrustedModulus; + if (fTestNet) { pchMessageStart[0] = 0x6f; @@ -2520,18 +2521,17 @@ bool LoadBlockIndex(bool fAllowNew) bnProofOfWorkLimit = bnProofOfWorkLimitTestNet; // 0x0000ffff PoW base target is fixed in testnet nStakeMinAge = 10 * 60; // test net min age is 10 min nStakeMaxAge = 30 * 60; // test net min age is 30 min - nModifierInterval = 60; // test modifier interval is 1 minutes + nModifierInterval = 60; // test modifier interval is 1 minutes nCoinbaseMaturity = 10; // test maturity is 10 blocks - nStakeTargetSpacing = 1 * 60; // test block spacing is 1 minutes + nTargetSpacing = 1 * 60; // test block spacing is 1 minutes } // // Load block index // - CTxDB txdb("cr"); + CTxDB txdb("cr+"); if (!txdb.LoadBlockIndex()) return false; - txdb.Close(); // // Init with genesis block @@ -2541,7 +2541,8 @@ bool LoadBlockIndex(bool fAllowNew) if (!fAllowNew) return false; - // Genesis block + // Genesis block + const char* pszTimestamp = "july 16 2014, I'm deh besht mang, I deeed et!"; CTransaction txNew; txNew.nTime = nChainStartTime; @@ -2549,7 +2550,6 @@ bool LoadBlockIndex(bool fAllowNew) txNew.vout.resize(1); txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(9999) << vector((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp)); txNew.vout[0].SetEmpty(); - CBlock block; block.vtx.push_back(txNew); block.hashPrevBlock = 0; @@ -2559,20 +2559,24 @@ bool LoadBlockIndex(bool fAllowNew) block.nBits = bnProofOfWorkLimit.GetCompact(); block.nNonce = 43; - if (false && (block.GetHash() != hashGenesisBlock)) { - // This will figure out a valid hash and Nonce if you're - // creating a different genesis block: - uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256(); - while (block.GetHash() > hashTarget) - { - ++block.nNonce; - if (block.nNonce == 0) - { - printf("NONCE WRAPPED, incrementing time"); - ++block.nTime; - } - } + + + + if (false && (block.GetHash() != hashGenesisBlockOfficial)) { + + // This will figure out a valid hash and Nonce if you're + // creating a different genesis block: + uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256(); + while (block.GetHash() > hashTarget) + { + ++block.nNonce; + if (block.nNonce == 0) + { + printf("NONCE WRAPPED, incrementing time"); + ++block.nTime; + } + } } //// debug print @@ -2583,37 +2587,34 @@ bool LoadBlockIndex(bool fAllowNew) printf("block.nNonce = %u \n", block.nNonce); assert(block.hashMerkleRoot == uint256("0x27f77273afc4e7cca700b8564eed9a7cc7ee38e81189a8d57a98bc42f848d51e")); - assert(block.GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)); + assert(block.GetHash() == (!fTestNet ? hashGenesisBlockOfficial : hashGenesisBlockTestNet)); // Start new block file unsigned int nFile; unsigned int nBlockPos; if (!block.WriteToDisk(nFile, nBlockPos)) return error("LoadBlockIndex() : writing genesis block to disk failed"); - if (!block.AddToBlockIndex(nFile, nBlockPos)) + if (!block.AddToBlockIndex(nFile, nBlockPos, 0)) return error("LoadBlockIndex() : genesis block not accepted"); // triangles: initialize synchronized checkpoint - if (!Checkpoints::WriteSyncCheckpoint((!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet))) + if (!Checkpoints::WriteSyncCheckpoint((!fTestNet ? hashGenesisBlockOfficial : hashGenesisBlockTestNet))) return error("LoadBlockIndex() : failed to init sync checkpoint"); } - // triangles: if checkpoint master key changed must reset sync-checkpoint + string strPubKey = ""; + + // if checkpoint master key changed must reset sync-checkpoint + if (!txdb.ReadCheckpointPubKey(strPubKey) || strPubKey != CSyncCheckpoint::strMasterPubKey) { - CTxDB txdb; - string strPubKey = ""; - if (!txdb.ReadCheckpointPubKey(strPubKey) || strPubKey != CSyncCheckpoint::strMasterPubKey) - { - // write checkpoint master key to db - txdb.TxnBegin(); - if (!txdb.WriteCheckpointPubKey(CSyncCheckpoint::strMasterPubKey)) - return error("LoadBlockIndex() : failed to write new checkpoint master key to db"); - if (!txdb.TxnCommit()) - return error("LoadBlockIndex() : failed to commit new checkpoint master key to db"); - if ((!fTestNet) && !Checkpoints::ResetSyncCheckpoint()) - return error("LoadBlockIndex() : failed to reset sync-checkpoint"); - } - txdb.Close(); + // write checkpoint master key to db + txdb.TxnBegin(); + if (!txdb.WriteCheckpointPubKey(CSyncCheckpoint::strMasterPubKey)) + return error("LoadBlockIndex() : failed to write new checkpoint master key to db"); + if (!txdb.TxnCommit()) + return error("LoadBlockIndex() : failed to commit new checkpoint master key to db"); + if ((!fTestNet) && !Checkpoints::ResetSyncCheckpoint()) + return error("LoadBlockIndex() : failed to reset sync-checkpoint"); } return true; @@ -2697,7 +2698,7 @@ void PrintBlockTree() bool LoadExternalBlockFile(FILE* fileIn) { - int64 nStart = GetTimeMillis(); + int64_t nStart = GetTimeMillis(); int nLoaded = 0; { @@ -2751,13 +2752,10 @@ bool LoadExternalBlockFile(FILE* fileIn) __PRETTY_FUNCTION__); } } - printf("Loaded %i blocks from external file in %"PRI64d"ms\n", nLoaded, GetTimeMillis() - nStart); + printf("Loaded %i blocks from external file in %"PRId64"ms\n", nLoaded, GetTimeMillis() - nStart); return nLoaded > 0; } - - - ////////////////////////////////////////////////////////////////////////////// // // CAlert @@ -2782,19 +2780,11 @@ string GetWarnings(string strFor) strStatusBar = strMiscWarning; } - // triangles: should not enter safe mode for longer invalid chain - // triangles: if sync-checkpoint is too old do not enter safe mode - if (Checkpoints::IsSyncCheckpointTooOld(60 * 60 * 24 * 365) && !fTestNet && !IsInitialBlockDownload()) - { - nPriority = 100; - strStatusBar = "WARNING: Checkpoint is too old. Wait for block chain to download, or notify developers."; - } - // triangles: if detected invalid checkpoint enter safe mode if (Checkpoints::hashInvalidCheckpoint != 0) { nPriority = 3000; - strStatusBar = strRPC = "WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers."; + strStatusBar = strRPC = _("WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers."); } // Alerts @@ -2824,6 +2814,10 @@ string GetWarnings(string strFor) + + + + ////////////////////////////////////////////////////////////////////////////// // // Messages @@ -2883,11 +2877,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) return false; } - int64 nTime; + int64_t nTime; CAddress addrMe; CAddress addrFrom; - uint64 nNonce = 1; - uint64 verification_token = 0; + uint64_t nNonce = 1; + //uint64_t verification_token = 0; vRecv >> pfrom->nVersion >> pfrom->nServices >> nTime >> addrMe; if (pfrom->nVersion < MIN_PROTO_VERSION) { @@ -2901,20 +2895,14 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (pfrom->nVersion == 10300) pfrom->nVersion = 300; if (!vRecv.empty()) - vRecv >> addrFrom >> verification_token >> nNonce; + vRecv >> addrFrom >> nNonce; if (!vRecv.empty()) { vRecv >> pfrom->strSubVer; - pfrom->cleanSubVer = SanitizeString(pfrom->strSubVer); + //pfrom->cleanSubVer = SanitizeString(pfrom->strSubVer); } if (!vRecv.empty()) vRecv >> pfrom->nStartingHeight; - // if (!vRecv.empty()) - // // set to true after we get the first filter* message - // vRecv >> pfrom->fRelayTxes; - // else - // pfrom->fRelayTxes = true; - if (pfrom->fInbound && addrMe.IsRoutable()) { pfrom->addrLocal = addrMe; @@ -2939,16 +2927,17 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) pfrom->fClient = !(pfrom->nServices & NODE_NETWORK); - AddTimeData(pfrom->addr, nTime); + if (GetBoolArg("-synctime", true)) + AddTimeData(pfrom->addr, nTime); // Change version pfrom->PushMessage("verack"); - pfrom->vSend.SetVersion(min(pfrom->nVersion, PROTOCOL_VERSION)); + pfrom->ssSend.SetVersion(min(pfrom->nVersion, PROTOCOL_VERSION)); if (!pfrom->fInbound) { // Advertise our address - if (!IsInitialBlockDownload()) + if (!fNoListen && !IsInitialBlockDownload()) { CAddress addr = GetLocalAddress(&pfrom->addr); if (addr.IsRoutable()) @@ -2963,23 +2952,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } addrman.Good(pfrom->addr); } else { - addrFrom.SetPort(GetDefaultPort()); - pfrom->addr = addrFrom; - if (CNode::IsBanned(addrFrom)) + if (((CNetAddr)pfrom->addr) == (CNetAddr)addrFrom) { - printf("connection from %s dropped (banned)\n", addrFrom.ToString().c_str()); - pfrom->fDisconnect = true; - return true; + addrman.Add(addrFrom, addrFrom); + addrman.Good(addrFrom); } - if (addrman.CheckVerificationToken(addrFrom, verification_token)) { - printf("connection from %s verified\n", addrFrom.ToString().c_str()); - pfrom->fVerified = true; - addrman.Good(pfrom->addr); - } else { - printf("couldn't verify %s\n", addrFrom.ToString().c_str()); - addrman.SetReconnectToken(addrFrom, verification_token); - } - } // Ask the first connected node for block updates @@ -3030,7 +3007,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) else if (strCommand == "verack") { - pfrom->vRecv.SetVersion(min(pfrom->nVersion, PROTOCOL_VERSION)); + pfrom->SetRecvVersion(min(pfrom->nVersion, PROTOCOL_VERSION)); } @@ -3050,8 +3027,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) // Store the new addresses vector vAddrOk; - int64 nNow = GetAdjustedTime(); - int64 nSince = nNow - 10 * 60; + int64_t nNow = GetAdjustedTime(); + int64_t nSince = nNow - 10 * 60; BOOST_FOREACH(CAddress& addr, vAddr) { if (fShutdown) @@ -3070,7 +3047,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) static uint256 hashSalt; if (hashSalt == 0) hashSalt = GetRandHash(); - uint64 hashAddr = addr.GetHash(); + uint64_t hashAddr = addr.GetHash(); uint256 hashRand = hashSalt ^ (hashAddr<<32) ^ ((GetTime()+hashAddr)/(24*60*60)); hashRand = Hash(BEGIN(hashRand), END(hashRand)); multimap mapMix; @@ -3100,7 +3077,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) pfrom->fDisconnect = true; } - else if (strCommand == "inv") { vector vInv; @@ -3185,7 +3161,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (inv.hash == pfrom->hashContinue) { // triangles: send latest proof-of-work block to allow the - // download node to accept as orphan (proof-of-stake + // download node to accept as orphan (proof-of-stake // block might be rejected by stake connection check) vector vInv; vInv.push_back(CInv(MSG_BLOCK, GetLastBlockIndex(pindexBest, false)->GetBlockHash())); @@ -3327,7 +3303,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (tx.AcceptToMemoryPool(txdb, true, &fMissingInputs)) { SyncWithWallets(tx, NULL, true); - RelayMessage(inv, vMsg); + RelayTransaction(tx, inv.hash); mapAlreadyAskedFor.erase(inv); vWorkQueue.push_back(inv.hash); vEraseQueue.push_back(inv.hash); @@ -3336,30 +3312,28 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) for (unsigned int i = 0; i < vWorkQueue.size(); i++) { uint256 hashPrev = vWorkQueue[i]; - for (map::iterator mi = mapOrphanTransactionsByPrev[hashPrev].begin(); + for (set::iterator mi = mapOrphanTransactionsByPrev[hashPrev].begin(); mi != mapOrphanTransactionsByPrev[hashPrev].end(); ++mi) { - const CDataStream& vMsg = *((*mi).second); - CTransaction tx; - CDataStream(vMsg) >> tx; - CInv inv(MSG_TX, tx.GetHash()); + const uint256& orphanTxHash = *mi; + CTransaction& orphanTx = mapOrphanTransactions[orphanTxHash]; bool fMissingInputs2 = false; - if (tx.AcceptToMemoryPool(txdb, true, &fMissingInputs2)) + if (orphanTx.AcceptToMemoryPool(txdb, true, &fMissingInputs2)) { - printf(" accepted orphan tx %s\n", inv.hash.ToString().substr(0,10).c_str()); + printf(" accepted orphan tx %s\n", orphanTxHash.ToString().substr(0,10).c_str()); SyncWithWallets(tx, NULL, true); - RelayMessage(inv, vMsg); - mapAlreadyAskedFor.erase(inv); - vWorkQueue.push_back(inv.hash); - vEraseQueue.push_back(inv.hash); + RelayTransaction(orphanTx, orphanTxHash); + mapAlreadyAskedFor.erase(CInv(MSG_TX, orphanTxHash)); + vWorkQueue.push_back(orphanTxHash); + vEraseQueue.push_back(orphanTxHash); } else if (!fMissingInputs2) { // invalid orphan - vEraseQueue.push_back(inv.hash); - printf(" removed invalid orphan tx %s\n", inv.hash.ToString().substr(0,10).c_str()); + vEraseQueue.push_back(orphanTxHash); + printf(" removed invalid orphan tx %s\n", orphanTxHash.ToString().substr(0,10).c_str()); } } } @@ -3369,7 +3343,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } else if (fMissingInputs) { - AddOrphanTx(vMsg); + AddOrphanTx(tx); // DoS prevention: do not allow mapOrphanTransactions to grow unbounded unsigned int nEvicted = LimitOrphanTxSize(MAX_ORPHAN_TRANSACTIONS); @@ -3384,25 +3358,34 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) { CBlock block; vRecv >> block; + uint256 hashBlock = block.GetHash(); - printf("received block %s\n", block.GetHash().ToString().substr(0,20).c_str()); + printf("received block %s\n", hashBlock.ToString().substr(0,20).c_str()); // block.print(); - CInv inv(MSG_BLOCK, block.GetHash()); + CInv inv(MSG_BLOCK, hashBlock); pfrom->AddInventoryKnown(inv); if (ProcessBlock(pfrom, &block)) mapAlreadyAskedFor.erase(inv); - if (block.nDoS) pfrom->Misbehaving(block.nDoS); + + if (block.nDoS) + pfrom->Misbehaving(block.nDoS); + + if (fSecMsgEnabled) + SecureMsgScanBlock(block); } else if (strCommand == "getaddr") { + // Don't return addresses older than nCutOff timestamp + int64_t nCutOff = GetTime() - (nNodeLifespan * 24 * 60 * 60); pfrom->vAddrToSend.clear(); vector vAddr = addrman.GetAddr(); BOOST_FOREACH(const CAddress &addr, vAddr) - pfrom->PushAddress(addr); + if(addr.nTime > nCutOff) + pfrom->PushAddress(addr); } @@ -3473,7 +3456,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) { if (pfrom->nVersion > BIP0031_VERSION) { - uint64 nonce = 0; + uint64_t nonce = 0; vRecv >> nonce; // Echo the message back with the nonce. This allows for two useful features: // @@ -3524,6 +3507,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) else { + if (fSecMsgEnabled) + SecureMsgReceiveData(pfrom, strCommand, vRecv); + // Ignore unknown commands for extensibility } @@ -3539,18 +3525,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) bool ProcessMessages(CNode* pfrom) { - if (fDebug) { - printf("ProcessMessages: %s\n", - pfrom->addr.ToString().c_str()); - } - CDataStream& vRecv = pfrom->vRecv; - if (vRecv.empty()) { - if (fDebug) { - printf("ProcessMessages: %s message empty\n", - pfrom->addr.ToString().c_str()); - } - return true; - } //if (fDebug) // printf("ProcessMessages(%u bytes)\n", vRecv.size()); @@ -3562,33 +3536,38 @@ bool ProcessMessages(CNode* pfrom) // (4) checksum // (x) data // + bool fOk = true; - loop - { + std::deque::iterator it = pfrom->vRecvMsg.begin(); + while (!pfrom->fDisconnect && it != pfrom->vRecvMsg.end()) { // Don't bother if send buffer is too full to respond anyway - if (pfrom->vSend.size() >= SendBufferSize()) + if (pfrom->nSendSize >= SendBufferSize()) break; + // get next message + CNetMessage& msg = *it; + + //if (fDebug) + // printf("ProcessMessages(message %u msgsz, %zu bytes, complete:%s)\n", + // msg.hdr.nMessageSize, msg.vRecv.size(), + // msg.complete() ? "Y" : "N"); + + // end, if an incomplete message is found + if (!msg.complete()) + break; + + // at this point, any failure means we can delete the current message + it++; + // Scan for message start - CDataStream::iterator pstart = search(vRecv.begin(), vRecv.end(), BEGIN(pchMessageStart), END(pchMessageStart)); - int nHeaderSize = vRecv.GetSerializeSize(CMessageHeader()); - if (vRecv.end() - pstart < nHeaderSize) - { - if ((int)vRecv.size() > nHeaderSize) - { - printf("\n\nPROCESSMESSAGE MESSAGESTART NOT FOUND\n\n"); - vRecv.erase(vRecv.begin(), vRecv.end() - nHeaderSize); - } + if (memcmp(msg.hdr.pchMessageStart, pchMessageStart, sizeof(pchMessageStart)) != 0) { + printf("\n\nPROCESSMESSAGE: INVALID MESSAGESTART\n\n"); + fOk = false; break; } - if (pstart - vRecv.begin() > 0) - printf("\n\nPROCESSMESSAGE SKIPPED %"PRIpdd" BYTES\n\n", pstart - vRecv.begin()); - vRecv.erase(vRecv.begin(), pstart); // Read header - vector vHeaderSave(vRecv.begin(), vRecv.begin() + nHeaderSize); - CMessageHeader hdr; - vRecv >> hdr; + CMessageHeader& hdr = msg.hdr; if (!hdr.IsValid()) { printf("\n\nPROCESSMESSAGE: ERRORS IN HEADER %s\n\n\n", hdr.GetCommand().c_str()); @@ -3598,19 +3577,9 @@ bool ProcessMessages(CNode* pfrom) // Message size unsigned int nMessageSize = hdr.nMessageSize; - if (nMessageSize > MAX_SIZE) - { - printf("ProcessMessages(%s, %u bytes) : nMessageSize > MAX_SIZE\n", strCommand.c_str(), nMessageSize); - continue; - } - if (nMessageSize > vRecv.size()) - { - // Rewind and wait for rest of message - vRecv.insert(vRecv.begin(), vHeaderSave.begin(), vHeaderSave.end()); - break; - } // Checksum + CDataStream& vRecv = msg.vRecv; uint256 hash = Hash(vRecv.begin(), vRecv.begin() + nMessageSize); unsigned int nChecksum = 0; memcpy(&nChecksum, &hash, sizeof(nChecksum)); @@ -3621,17 +3590,13 @@ bool ProcessMessages(CNode* pfrom) continue; } - // Copy message to its own buffer - CDataStream vMsg(vRecv.begin(), vRecv.begin() + nMessageSize, vRecv.nType, vRecv.nVersion); - vRecv.ignore(nMessageSize); - // Process message bool fRet = false; try { { LOCK(cs_main); - fRet = ProcessMessage(pfrom, strCommand, vMsg); + fRet = ProcessMessage(pfrom, strCommand, vRecv); } if (fShutdown) return true; @@ -3663,8 +3628,11 @@ bool ProcessMessages(CNode* pfrom) printf("ProcessMessage(%s, %u bytes) FAILED\n", strCommand.c_str(), nMessageSize); } - vRecv.Compact(); - return true; + // In case the connection got shut down, its receive buffer was wiped + if (!pfrom->fDisconnect) + pfrom->vRecvMsg.erase(pfrom->vRecvMsg.begin(), it); + + return fOk; } @@ -3678,8 +3646,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle) // Keep-alive ping. We send a nonce of zero because we don't use it anywhere // right now. - if (pto->nLastSend && GetTime() - pto->nLastSend > 30 * 60 && pto->vSend.empty()) { - uint64 nonce = 0; + if (pto->nLastSend && GetTime() - pto->nLastSend > 30 * 60 && pto->ssSend.empty()) { + uint64_t nonce = 0; if (pto->nVersion > BIP0031_VERSION) pto->PushMessage("ping", nonce); else @@ -3690,7 +3658,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle) ResendWalletTransactions(); // Address refresh broadcast - static int64 nLastRebroadcast; + static int64_t nLastRebroadcast; if (!IsInitialBlockDownload() && (GetTime() - nLastRebroadcast > 24 * 60 * 60)) { { @@ -3702,7 +3670,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle) pnode->setAddrKnown.clear(); // Rebroadcast our address - if (true) + if (!fNoListen) { CAddress addr = GetLocalAddress(&pnode->addr); if (addr.IsRoutable()) @@ -3802,7 +3770,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle) // Message: getdata // vector vGetData; - int64 nNow = GetTime() * 1000000; + int64_t nNow = GetTime() * 1000000; CTxDB txdb("r"); while (!pto->mapAskFor.empty() && (*pto->mapAskFor.begin()).first <= nNow) { @@ -3823,7 +3791,9 @@ bool SendMessages(CNode* pto, bool fSendTrickle) } if (!vGetData.empty()) pto->PushMessage("getdata", vGetData); - + + if (fSecMsgEnabled) + SecureMsgSendData(pto, fSendTrickle); // should be in cs_main? } return true; } @@ -3831,676 +3801,3 @@ bool SendMessages(CNode* pto, bool fSendTrickle) - -////////////////////////////////////////////////////////////////////////////// -// -// BitcoinMiner -// - -int static FormatHashBlocks(void* pbuffer, unsigned int len) -{ - unsigned char* pdata = (unsigned char*)pbuffer; - unsigned int blocks = 1 + ((len + 8) / 64); - unsigned char* pend = pdata + 64 * blocks; - memset(pdata + len, 0, 64 * blocks - len); - pdata[len] = 0x80; - unsigned int bits = len * 8; - pend[-1] = (bits >> 0) & 0xff; - pend[-2] = (bits >> 8) & 0xff; - pend[-3] = (bits >> 16) & 0xff; - pend[-4] = (bits >> 24) & 0xff; - return blocks; -} - -static const unsigned int pSHA256InitState[8] = -{0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19}; - -void SHA256Transform(void* pstate, void* pinput, const void* pinit) -{ - SHA256_CTX ctx; - unsigned char data[64]; - - SHA256_Init(&ctx); - - for (int i = 0; i < 16; i++) - ((uint32_t*)data)[i] = ByteReverse(((uint32_t*)pinput)[i]); - - for (int i = 0; i < 8; i++) - ctx.h[i] = ((uint32_t*)pinit)[i]; - - SHA256_Update(&ctx, data, sizeof(data)); - for (int i = 0; i < 8; i++) - ((uint32_t*)pstate)[i] = ctx.h[i]; -} - -// Some explaining would be appreciated -class COrphan -{ -public: - CTransaction* ptx; - set setDependsOn; - double dPriority; - double dFeePerKb; - - COrphan(CTransaction* ptxIn) - { - ptx = ptxIn; - dPriority = dFeePerKb = 0; - } - - void print() const - { - 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()); - } -}; - - -uint64 nLastBlockTx = 0; -uint64 nLastBlockSize = 0; -int64 nLastCoinStakeSearchInterval = 0; - -// We want to sort transactions by priority and fee, so: -typedef boost::tuple 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>(); - } - } -}; - -// CreateNewBlock: -// fProofOfStake: try (best effort) to make a proof-of-stake block -CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake) -{ - CReserveKey reservekey(pwallet); - - // Create new block - auto_ptr pblock(new CBlock()); - if (!pblock.get()) - return NULL; - - // Create coinbase tx - CTransaction txNew; - txNew.vin.resize(1); - txNew.vin[0].prevout.SetNull(); - txNew.vout.resize(1); - txNew.vout[0].scriptPubKey << reservekey.GetReservedKey() << OP_CHECKSIG; - - // 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); - - // triangles: if coinstake available add coinstake tx - static int64 nLastCoinStakeSearchTime = GetAdjustedTime(); // only initialized at startup - CBlockIndex* pindexPrev = pindexBest; - - if (fProofOfStake) // attempt to find a coinstake - { - pblock->nBits = GetNextTargetRequired(pindexPrev, true); - CTransaction txCoinStake; - int64 nSearchTime = txCoinStake.nTime; // search to current time - if (nSearchTime > nLastCoinStakeSearchTime) - { - // printf(">>> OK1\n"); - if (pwallet->CreateCoinStake(*pwallet, pblock->nBits, nSearchTime-nLastCoinStakeSearchTime, txCoinStake)) - { - if (txCoinStake.nTime >= max(pindexPrev->GetMedianTimePast()+1, pindexPrev->GetBlockTime() - nMaxClockDrift)) - { // make sure coinstake would meet timestamp protocol - // as it would be the same as the block timestamp - pblock->vtx[0].vout[0].SetEmpty(); - pblock->vtx[0].nTime = txCoinStake.nTime; - pblock->vtx.push_back(txCoinStake); - } - } - nLastCoinStakeSearchInterval = nSearchTime - nLastCoinStakeSearchTime; - nLastCoinStakeSearchTime = nSearchTime; - } - } - - pblock->nBits = GetNextTargetRequired(pindexPrev, pblock->IsProofOfStake()); - - // Collect memory pool transactions into the block - int64 nFees = 0; - { - LOCK2(cs_main, mempool.cs); - CBlockIndex* pindexPrev = pindexBest; - CTxDB txdb("r"); - - // Priority order to process transactions - list vOrphan; // list memory doesn't move - map > mapDependers; - - // This vector will be sorted into a priority queue: - vector vecPriority; - vecPriority.reserve(mempool.mapTx.size()); - for (map::iterator mi = mempool.mapTx.begin(); mi != mempool.mapTx.end(); ++mi) - { - CTransaction& tx = (*mi).second; - if (tx.IsCoinBase() || tx.IsCoinStake() || !tx.IsFinal()) - continue; - - COrphan* porphan = NULL; - double dPriority = 0; - int64 nTotalIn = 0; - bool fMissingInputs = false; - BOOST_FOREACH(const CTxIn& txin, tx.vin) - { - // Read prev transaction - CTransaction txPrev; - 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) - { - // Use list for automatic deletion - vOrphan.push_back(COrphan(&tx)); - porphan = &vOrphan.back(); - } - 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; - - int nConf = txindex.GetDepthInMainChain(); - dPriority += (double)nValueIn * nConf; - } - if (fMissingInputs) continue; - - // Priority is sum(valuein * age) / txsize - unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); - dPriority /= nTxSize; - - // 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 (porphan) - { - porphan->dPriority = dPriority; - porphan->dFeePerKb = dFeePerKb; - } - else - vecPriority.push_back(TxPriority(dPriority, dFeePerKb, &(*mi).second)); - } - - // Collect transactions into block - map mapTestPool; - uint64 nBlockSize = 1000; - uint64 nBlockTx = 0; - int nBlockSigOps = 100; - bool fSortedByFee = (nBlockPrioritySize <= 0); - - TxPriorityCompare comparer(fSortedByFee); - std::make_heap(vecPriority.begin(), vecPriority.end(), comparer); - - while (!vecPriority.empty()) - { - // 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 >= nBlockMaxSize) - continue; - - // Legacy limits on sigOps: - unsigned int nTxSigOps = tx.GetLegacySigOpCount(); - if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) - continue; - - // Timestamp limit - if (tx.nTime > GetAdjustedTime() || (pblock->IsProofOfStake() && tx.nTime > pblock->vtx[1].nTime)) - continue; - - // triangles: simplify transaction fee - allow free = false - int64 nMinFee = tx.GetMinFee(nBlockSize, false, 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 * 300 / 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 - map mapTestPoolTmp(mapTestPool); - MapPrevTx mapInputs; - bool fInvalid; - if (!tx.FetchInputs(txdb, mapTestPoolTmp, false, true, mapInputs, fInvalid)) - continue; - - int64 nTxFees = tx.GetValueIn(mapInputs)-tx.GetValueOut(); - if (nTxFees < nMinFee) - continue; - - nTxSigOps += tx.GetP2SHSigOpCount(mapInputs); - if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) - continue; - - if (!tx.ConnectInputs(txdb, mapInputs, mapTestPoolTmp, CDiskTxPos(1,1,1), pindexPrev, false, true)) - continue; - mapTestPoolTmp[tx.GetHash()] = CTxIndex(CDiskTxPos(1,1,1), tx.vout.size()); - swap(mapTestPool, mapTestPoolTmp); - - // Added - pblock->vtx.push_back(tx); - nBlockSize += nTxSize; - ++nBlockTx; - 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)) - { - BOOST_FOREACH(COrphan* porphan, mapDependers[hash]) - { - if (!porphan->setDependsOn.empty()) - { - porphan->setDependsOn.erase(hash); - if (porphan->setDependsOn.empty()) - { - vecPriority.push_back(TxPriority(porphan->dPriority, porphan->dFeePerKb, porphan->ptx)); - std::push_heap(vecPriority.begin(), vecPriority.end(), comparer); - } - } - } - } - } - - nLastBlockTx = nBlockTx; - nLastBlockSize = nBlockSize; - - if (fDebug && GetBoolArg("-printpriority")) - printf("CreateNewBlock(): total size %"PRI64u"\n", nBlockSize); - - if (pblock->IsProofOfWork()) - pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(pindexPrev->nHeight+1, nFees, pindexPrev->GetBlockHash()); - - // Fill in header - pblock->hashPrevBlock = pindexPrev->GetBlockHash(); - if (pblock->IsProofOfStake()) - pblock->nTime = pblock->vtx[1].nTime; //same as coinstake timestamp - pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, pblock->GetMaxTransactionTime()); - pblock->nTime = max(pblock->GetBlockTime(), pindexPrev->GetBlockTime() - nMaxClockDrift); - if (pblock->IsProofOfWork()) - pblock->UpdateTime(pindexPrev); - pblock->nNonce = 0; - } - - return pblock.release(); -} - - -void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce) -{ - // Update nExtraNonce - static uint256 hashPrevBlock; - if (hashPrevBlock != pblock->hashPrevBlock) - { - nExtraNonce = 0; - hashPrevBlock = pblock->hashPrevBlock; - } - ++nExtraNonce; - unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2 - pblock->vtx[0].vin[0].scriptSig = (CScript() << nHeight << CBigNum(nExtraNonce)) + COINBASE_FLAGS; - assert(pblock->vtx[0].vin[0].scriptSig.size() <= 100); - - pblock->hashMerkleRoot = pblock->BuildMerkleTree(); -} - - -void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1) -{ - // - // Pre-build hash buffers - // - struct - { - struct unnamed2 - { - int nVersion; - uint256 hashPrevBlock; - uint256 hashMerkleRoot; - unsigned int nTime; - unsigned int nBits; - unsigned int nNonce; - } - block; - unsigned char pchPadding0[64]; - uint256 hash1; - unsigned char pchPadding1[64]; - } - tmp; - memset(&tmp, 0, sizeof(tmp)); - - tmp.block.nVersion = pblock->nVersion; - tmp.block.hashPrevBlock = pblock->hashPrevBlock; - tmp.block.hashMerkleRoot = pblock->hashMerkleRoot; - tmp.block.nTime = pblock->nTime; - tmp.block.nBits = pblock->nBits; - tmp.block.nNonce = pblock->nNonce; - - FormatHashBlocks(&tmp.block, sizeof(tmp.block)); - FormatHashBlocks(&tmp.hash1, sizeof(tmp.hash1)); - - // Byte swap all the input buffer - for (unsigned int i = 0; i < sizeof(tmp)/4; i++) - ((unsigned int*)&tmp)[i] = ByteReverse(((unsigned int*)&tmp)[i]); - - // Precalc the first half of the first hash, which stays constant - SHA256Transform(pmidstate, &tmp.block, pSHA256InitState); - - memcpy(pdata, &tmp.block, 128); - memcpy(phash1, &tmp.hash1, 64); -} - - -bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey) -{ - uint256 hash = pblock->GetHash(); - uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); - - if (hash > hashTarget && pblock->IsProofOfWork()) - return error("BitcoinMiner : proof-of-work not meeting target"); - - //// debug print - printf("BitcoinMiner:\n"); - printf("new block found \n hash: %s \ntarget: %s\n", hash.GetHex().c_str(), hashTarget.GetHex().c_str()); - pblock->print(); - printf("generated %s\n", FormatMoney(pblock->vtx[0].vout[0].nValue).c_str()); - - // Found a solution - { - LOCK(cs_main); - if (pblock->hashPrevBlock != hashBestChain) - return error("BitcoinMiner : generated block is stale"); - - // Remove key from key pool - reservekey.KeepKey(); - - // Track how many getdata requests this block gets - { - LOCK(wallet.cs_wallet); - wallet.mapRequestCount[pblock->GetHash()] = 0; - } - - // Process this block the same as if we had received it from another node - if (!ProcessBlock(NULL, pblock)) - return error("BitcoinMiner : ProcessBlock, block not accepted"); - } - - return true; -} - -void static ThreadBitcoinMiner(void* parg); - -static bool fGenerateBitcoins = false; -static bool fLimitProcessors = false; -static int nLimitProcessors = -1; - -void BitcoinMiner(CWallet *pwallet, bool fProofOfStake) -{ - printf("CPUMiner started for proof-of-%s\n", fProofOfStake? "stake" : "work"); - SetThreadPriority(THREAD_PRIORITY_NORMAL); - - // 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; - - while (fGenerateBitcoins || fProofOfStake) - { - if (fShutdown) - return; - - while (vNodes.empty() || IsInitialBlockDownload() || pwallet->IsLocked()) - { - nLastCoinStakeSearchInterval = 0; - Sleep(1000); - if (fShutdown) - return; - if (!fGenerateBitcoins && !fProofOfStake) - return; - } - - // - // Create new block - // - unsigned int nTransactionsUpdatedLast = nTransactionsUpdated; - CBlockIndex* pindexPrev = pindexBest; - - auto_ptr pblock(CreateNewBlock(pwallet, fProofOfStake)); - if (!pblock.get()) - return; - IncrementExtraNonce(pblock.get(), pindexPrev, nExtraNonce); - - if (fProofOfStake) - { - // triangles: if proof-of-stake block found then process block - if (pblock->IsProofOfStake()) - { - if (!pblock->SignBlock(*pwalletMain)) - continue; - printf("CPUMINER: A proof-of-stake block has been found! %s\n", pblock->GetHash().ToString().c_str()); - SetThreadPriority(THREAD_PRIORITY_NORMAL); - CheckWork(pblock.get(), *pwalletMain, reservekey); - SetThreadPriority(THREAD_PRIORITY_LOWEST); - } - Sleep(250); - continue; - } - - printf("Running BitcoinMiner with %"PRIszu" transactions in block (%u bytes)\n", pblock->vtx.size(), - ::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION)); - - // - // Search - // - int64 nStart = GetTime(); - uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); - uint256 hash; - - loop - { - hash = pblock->GetHash(); - if (hash <= hashTarget){ - // nHashesDone += pblock->nNonce; - if (!pblock->SignBlock(*pwalletMain)) - break; - - SetThreadPriority(THREAD_PRIORITY_NORMAL); - - printf("proof-of-work found \n hash: %s \ntarget: %s\n", hash.GetHex().c_str(), hashTarget.GetHex().c_str()); - pblock->print(); - - CheckWork(pblock.get(), *pwalletMain, reservekey); - SetThreadPriority(THREAD_PRIORITY_NORMAL); - break; - } - ++pblock->nNonce; - - - // Meter hashes/sec - static int64 nHashCounter; - if (nHPSTimerStart == 0) - { - nHPSTimerStart = GetTimeMillis(); - nHashCounter = 0; - } - else - nHashCounter += 1; - - if (GetTimeMillis() - nHPSTimerStart > 4000) - { - static CCriticalSection cs; - { - LOCK(cs); - if (GetTimeMillis() - nHPSTimerStart > 4000) - { - dHashesPerSec = 1000.0 * nHashCounter / (GetTimeMillis() - nHPSTimerStart); - nHPSTimerStart = GetTimeMillis(); - nHashCounter = 0; - - printf("hashmeter %3d CPUs %6.0f khash/s\n", vnThreadsRunning[THREAD_MINER], dHashesPerSec/1000.0); - - } - } - } - - // Check for stop or if block needs to be rebuilt - if (fShutdown) - return; - if (!fGenerateBitcoins) - return; - if (fLimitProcessors && vnThreadsRunning[THREAD_MINER] > nLimitProcessors) - return; - if (vNodes.empty()) - break; - if (++pblock->nNonce >= 0xffff0000) - break; - if (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60) - break; - if (pindexPrev != pindexBest) - break; - - // Update nTime every few seconds - pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, pblock->GetMaxTransactionTime()); - pblock->nTime = max(pblock->GetBlockTime(), pindexPrev->GetBlockTime() - nMaxClockDrift); - pblock->UpdateTime(pindexPrev); - - if (pblock->GetBlockTime() >= (int64)pblock->vtx[0].nTime + nMaxClockDrift) - break; // need to update coinbase timestamp - } - } -} - -void static ThreadBitcoinMiner(void* parg) -{ - CWallet* pwallet = (CWallet*)parg; - try - { - vnThreadsRunning[THREAD_MINER]++; - BitcoinMiner(pwallet, false); - vnThreadsRunning[THREAD_MINER]--; - } - catch (std::exception& e) { - vnThreadsRunning[THREAD_MINER]--; - PrintException(&e, "ThreadBitcoinMiner()"); - } catch (...) { - vnThreadsRunning[THREAD_MINER]--; - PrintException(NULL, "ThreadBitcoinMiner()"); - } - nHPSTimerStart = 0; - if (vnThreadsRunning[THREAD_MINER] == 0) - dHashesPerSec = 0; - printf("ThreadBitcoinMiner exiting, %d threads remaining\n", vnThreadsRunning[THREAD_MINER]); -} - - -void GenerateBitcoins(bool fGenerate, CWallet* pwallet) -{ - fGenerateBitcoins = fGenerate; - nLimitProcessors = GetArg("-genproclimit", -1); - if (nLimitProcessors == 0) - fGenerateBitcoins = false; - fLimitProcessors = (nLimitProcessors != -1); - - if (fGenerate) - { - int nProcessors = boost::thread::hardware_concurrency(); - printf("%d processors\n", nProcessors); - if (nProcessors < 1) - nProcessors = 1; - if (fLimitProcessors && nProcessors > nLimitProcessors) - nProcessors = nLimitProcessors; - int nAddThreads = nProcessors - vnThreadsRunning[THREAD_MINER]; - printf("Starting %d BitcoinMiner threads\n", nAddThreads); - for (int i = 0; i < nAddThreads; i++) - { - if (!NewThread(ThreadBitcoinMiner, pwallet)) - printf("Error: NewThread(ThreadBitcoinMiner) failed\n"); - Sleep(10); - } - } -} diff --git a/src/main.h b/src/main.h index 43a3b30..e6ab8f2 100644 --- a/src/main.h +++ b/src/main.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_MAIN_H -#define BITCOIN_MAIN_H +#ifndef TRIANGLES_MAIN_H +#define TRIANGLES_MAIN_H #include "bignum.h" #include "sync.h" @@ -26,23 +26,22 @@ class CInv; class CRequestTracker; class CNode; +static const int CUTOFF_POW_BLOCK = 9000; +static const int CRAPCHAIN_CUTOFF_BLOCK = 17691; // pre-Pharao (version 4) blockchain until block 17691 + static const unsigned int MAX_BLOCK_SIZE = 1000000; static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2; static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50; static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100; static const unsigned int MAX_INV_SZ = 50000; -static const int64 MIN_TX_FEE = (1 * CENT) / 100; -static const int64 MIN_RELAY_TX_FEE = (1 * CENT) / 100; -static const int64 MAX_MONEY = 120000 * COIN; -static const int64 CIRCULATION_MONEY = MAX_MONEY; -static const double TAX_PERCENTAGE = 0.00; //no tax. who likes tax? -static const int64 MAX_TRI_PROOF_OF_STAKE = 0.33 * COIN; -static const int CUTOFF_POW_BLOCK = 9000; -static const unsigned int CUTOFF_POW_TIME = 1405986970; +static const int64_t MIN_TX_FEE = (1 * CENT) / 100; +static const int64_t MIN_RELAY_TX_FEE = (1 * CENT) / 100; +static const int64_t MAX_MONEY = 120000 * COIN; +static const int64_t COIN_YEAR_REWARD = 33 * CENT; // 33% per year +static const int64_t MAX_TRI_PROOF_OF_STAKE = 0.33 * COIN; +static const int MODIFIER_INTERVAL_SWITCH = 1; -static const int64 MIN_TXOUT_AMOUNT = MIN_TX_FEE; - -inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } +inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } // Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC @@ -54,43 +53,45 @@ static const int fHaveUPnP = false; static const uint256 hashGenesisBlockOfficial("0x7e7a6e4dd5fe895106fca912dfbacaeaf2a89e76c6a588df8ff96e0e18b96021"); static const uint256 hashGenesisBlockTestNet ("0x7e7a6e4dd5fe895106fca912dfbacaeaf2a89e76c6a588df8ff96e0e18b96021"); +inline int64_t PastDrift(int64_t nTime) { return nTime - 10 * 60; } // up to 10 minutes from the past +inline int64_t FutureDrift(int64_t nTime) { return nTime + 10 * 60; } // up to 10 minutes from the future -static const int64 nMaxClockDrift = 1 * 60 * 60; // one hour extern CScript COINBASE_FLAGS; - - extern CCriticalSection cs_main; extern std::map mapBlockIndex; extern std::set > setStakeSeen; -extern uint256 hashGenesisBlock; extern CBlockIndex* pindexGenesisBlock; extern unsigned int nStakeMinAge; +extern unsigned int nNodeLifespan; extern int nCoinbaseMaturity; extern int nBestHeight; -extern CBigNum bnBestChainTrust; -extern CBigNum bnBestInvalidTrust; +extern uint256 nBestChainTrust; +extern uint256 nBestInvalidTrust; extern uint256 hashBestChain; extern CBlockIndex* pindexBest; extern unsigned int nTransactionsUpdated; -extern uint64 nLastBlockTx; -extern uint64 nLastBlockSize; -extern int64 nLastCoinStakeSearchInterval; +extern uint64_t nLastBlockTx; +extern uint64_t nLastBlockSize; +extern int64_t nLastCoinStakeSearchInterval; extern const std::string strMessageMagic; -extern double dHashesPerSec; -extern int64 nHPSTimerStart; -extern int64 nTimeBestReceived; +extern int64_t nTimeBestReceived; extern CCriticalSection cs_setpwalletRegistered; extern std::set setpwalletRegistered; extern unsigned char pchMessageStart[4]; extern std::map mapOrphanBlocks; // Settings -extern int64 nTransactionFee; +extern int64_t nTransactionFee; +extern int64_t nReserveBalance; +extern int64_t nMinimumInputValue; +extern bool fUseFastIndex; +extern unsigned int nDerivationMethodIndex; + +extern bool fEnforceCanonical; // Minimum disk space required - used in CheckDiskSpace() -static const uint64 nMinDiskSpace = 52428800; - +static const uint64_t nMinDiskSpace = 52428800; class CReserveKey; class CTxDB; @@ -100,7 +101,7 @@ void RegisterWallet(CWallet* pwalletIn); void UnregisterWallet(CWallet* pwalletIn); void SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL, bool fUpdate = false, bool fConnect = true); bool ProcessBlock(CNode* pfrom, CBlock* pblock); -bool CheckDiskSpace(uint64 nAdditionalBytes=0); +bool CheckDiskSpace(uint64_t nAdditionalBytes=0); FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode="rb"); FILE* AppendBlockFile(unsigned int& nFileRet); bool LoadBlockIndex(bool fAllowNew=true); @@ -109,24 +110,21 @@ CBlockIndex* FindBlockByHeight(int nHeight); bool ProcessMessages(CNode* pfrom); bool SendMessages(CNode* pto, bool fSendTrickle); bool LoadExternalBlockFile(FILE* fileIn); -void GenerateBitcoins(bool fGenerate, CWallet* pwallet); -CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake=false); -void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce); -void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1); -bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey); + bool CheckProofOfWork(uint256 hash, unsigned int nBits); -int64 GetProofOfWorkReward(int nHeight, int64 nFees, uint256 prevHash); -int64 GetProofOfStakeReward(int64 nCoinAge, unsigned int nBits, unsigned int nTime, int nHeight); -unsigned int ComputeMinWork(unsigned int nBase, int64 nTime); -unsigned int ComputeMinStake(unsigned int nBase, int64 nTime, unsigned int nBlockTime); +unsigned int GetNextTargetRequired(const CBlockIndex* pindexLast, bool fProofOfStake); +int64_t GetProofOfWorkReward(int64_t nFees); +int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees); +unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime); +unsigned int ComputeMinStake(unsigned int nBase, int64_t nTime, unsigned int nBlockTime); int GetNumBlocksOfPeers(); bool IsInitialBlockDownload(); std::string GetWarnings(std::string strFor); bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock); uint256 WantedByOrphan(const CBlock* pblockOrphan); const CBlockIndex* GetLastBlockIndex(const CBlockIndex* pindex, bool fProofOfStake); -void BitcoinMiner(CWallet *pwallet, bool fProofOfStake); -void ResendWalletTransactions(); +void StakeMiner(CWallet *pwallet); +void ResendWalletTransactions(bool fForce = false); @@ -338,7 +336,7 @@ public: class CTxOut { public: - int64 nValue; + int64_t nValue; CScript scriptPubKey; CTxOut() @@ -346,7 +344,7 @@ public: SetNull(); } - CTxOut(int64 nValueIn, CScript scriptPubKeyIn) + CTxOut(int64_t nValueIn, CScript scriptPubKeyIn) { nValue = nValueIn; scriptPubKey = scriptPubKeyIn; @@ -434,7 +432,6 @@ class CTransaction { public: static const int CURRENT_VERSION=1; - int nVersion; unsigned int nTime; std::vector vin; @@ -458,7 +455,7 @@ public: READWRITE(vin); READWRITE(vout); READWRITE(nLockTime); - ) + ) void SetNull() { @@ -480,7 +477,7 @@ public: return SerializeHash(*this); } - bool IsFinal(int nBlockHeight=0, int64 nBlockTime=0) const + bool IsFinal(int nBlockHeight=0, int64_t nBlockTime=0) const { // Time based nLockTime implemented in 0.1.6 if (nLockTime == 0) @@ -489,7 +486,7 @@ public: nBlockHeight = nBestHeight; if (nBlockTime == 0) nBlockTime = GetAdjustedTime(); - if ((int64)nLockTime < ((int64)nLockTime < LOCKTIME_THRESHOLD ? (int64)nBlockHeight : nBlockTime)) + if ((int64_t)nLockTime < ((int64_t)nLockTime < LOCKTIME_THRESHOLD ? (int64_t)nBlockHeight : nBlockTime)) return true; BOOST_FOREACH(const CTxIn& txin, vin) if (!txin.IsFinal()) @@ -537,12 +534,6 @@ public: return (vin.size() > 0 && (!vin[0].prevout.IsNull()) && vout.size() >= 2 && vout[0].IsEmpty()); } - bool IsCoinBaseOrStake() const - { - return (IsCoinBase() || IsCoinStake()); - } - - /** Check for standard transaction types @return True if all outputs (scriptPubKeys) use only standard transaction forms */ @@ -569,12 +560,12 @@ public: */ unsigned int GetP2SHSigOpCount(const MapPrevTx& mapInputs) const; - /** Amount of bitcoins spent by this transaction. + /** Amount of Triangles spent by this transaction. @return sum of all outputs (note: does not include fees) */ - int64 GetValueOut() const + int64_t GetValueOut() const { - int64 nValueOut = 0; + int64_t nValueOut = 0; BOOST_FOREACH(const CTxOut& txout, vout) { nValueOut += txout.nValue; @@ -584,7 +575,7 @@ public: return nValueOut; } - /** Amount of bitcoins coming in to this transaction + /** Amount of Triangles coming in to this transaction Note that lightweight clients may not know anything besides the hash of previous transactions, so may not be able to calculate this. @@ -592,16 +583,9 @@ public: @return Sum of value of all inputs (scriptSigs) @see CTransaction::FetchInputs */ - int64 GetValueIn(const MapPrevTx& mapInputs) const; + int64_t GetValueIn(const MapPrevTx& mapInputs) const; - static bool AllowFree(double dPriority) - { - // Large (in bytes) low-priority (new, small-coin) transactions - // need a fee. - return dPriority > COIN * 300 / 250; - } - - int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=false, enum GetMinFee_mode mode=GMF_BLOCK, unsigned int nBytes = 0) const; + int64_t GetMinFee(unsigned int nBlockSize=1, enum GetMinFee_mode mode=GMF_BLOCK, unsigned int nBytes = 0) const; bool ReadFromDisk(CDiskTxPos pos, FILE** pfileRet=NULL) { @@ -661,9 +645,7 @@ public: nVersion, vin.size(), vout.size(), - nLockTime - ); - + nLockTime); for (unsigned int i = 0; i < vin.size(); i++) str += " " + vin[i].ToString() + "\n"; for (unsigned int i = 0; i < vout.size(); i++) @@ -704,16 +686,15 @@ public: @param[in] pindexBlock @param[in] fBlock true if called from ConnectBlock @param[in] fMiner true if called from CreateNewBlock - @param[in] fStrictPayToScriptHash true if fully validating p2sh transactions @return Returns true if all checks succeed */ bool ConnectInputs(CTxDB& txdb, MapPrevTx inputs, std::map& mapTestPool, const CDiskTxPos& posThisTx, - const CBlockIndex* pindexBlock, bool fBlock, bool fMiner, bool fStrictPayToScriptHash=true); + const CBlockIndex* pindexBlock, bool fBlock, bool fMiner); bool ClientConnectInputs(); bool CheckTransaction() const; bool AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs=true, bool* pfMissingInputs=NULL); - bool GetCoinAge(CTxDB& txdb, uint64& nCoinAge) const; // triangles: get transaction coin age + bool GetCoinAge(CTxDB& txdb, uint64_t& nCoinAge) const; // triangles: get transaction coin age protected: const CTxOut& GetOutputFor(const CTxIn& input, const MapPrevTx& inputs) const; @@ -726,6 +707,8 @@ protected: /** A transaction with a merkle branch linking it to the block chain. */ class CMerkleTx : public CTransaction { +private: + int GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const; public: uint256 hashBlock; std::vector vMerkleBranch; @@ -764,9 +747,14 @@ public: int SetMerkleBranch(const CBlock* pblock=NULL); + + // Return depth of transaction in blockchain: + // -1 : not in blockchain, and not in memory pool (conflicted transaction) + // 0 : in memory pool, waiting to be included in a block + // >=1 : this many blocks deep in the main chain int GetDepthInMainChain(CBlockIndex* &pindexRet) const; int GetDepthInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); } - bool IsInMainChain() const { return GetDepthInMainChain() > 0; } + bool IsInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChainINTERNAL(pindexRet) > 0; } int GetBlocksToMaturity() const; bool AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs=true); bool AcceptToMemoryPool(); @@ -847,7 +835,7 @@ class CBlock { public: // header - static const int CURRENT_VERSION=4; + static const int CURRENT_VERSION=6; int nVersion; uint256 hashPrevBlock; uint256 hashMerkleRoot; @@ -920,20 +908,20 @@ public: return Hash9(BEGIN(nVersion), END(nNonce)); } - int64 GetBlockTime() const + int64_t GetBlockTime() const { - return (int64)nTime; + return (int64_t)nTime; } void UpdateTime(const CBlockIndex* pindexPrev); // triangles: entropy bit for stake modifier if chosen by modifier - unsigned int GetStakeEntropyBit(unsigned int nHeight) const + unsigned int GetStakeEntropyBit() const { // Take last bit of block hash as entropy bit unsigned int nEntropyBit = ((GetHash().Get64()) & 1llu); if (fDebug && GetBoolArg("-printstakemodifier")) - printf("GetStakeEntropyBit: nHeight=%u hashBlock=%s nEntropyBit=%u\n", nHeight, GetHash().ToString().c_str(), nEntropyBit); + printf("GetStakeEntropyBit: hashBlock=%s nEntropyBit=%u\n", GetHash().ToString().c_str(), nEntropyBit); return nEntropyBit; } @@ -954,11 +942,11 @@ public: } // triangles: get max transaction timestamp - int64 GetMaxTransactionTime() const + int64_t GetMaxTransactionTime() const { - int64 maxTransactionTime = 0; + int64_t maxTransactionTime = 0; BOOST_FOREACH(const CTransaction& tx, vtx) - maxTransactionTime = std::max(maxTransactionTime, (int64)tx.nTime); + maxTransactionTime = std::max(maxTransactionTime, (int64_t)tx.nTime); return maxTransactionTime; } @@ -1093,11 +1081,11 @@ public: 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(bool fCheckPOW=true, bool fCheckMerkleRoot=true) const; + bool AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos, const uint256& hashProofOfStake); + bool CheckBlock(bool fCheckPOW=true, bool fCheckMerkleRoot=true, bool fCheckSig=true) const; bool AcceptBlock(); - bool GetCoinAge(uint64& nCoinAge) const; // triangles: calculate total coin age spent in block - bool SignBlock(const CKeyStore& keystore); + bool GetCoinAge(uint64_t& nCoinAge) const; // triangles: calculate total coin age spent in block + bool SignBlock(CWallet& keystore, int64_t nFees); bool CheckBlockSignature() const; private: @@ -1124,21 +1112,21 @@ public: CBlockIndex* pnext; unsigned int nFile; unsigned int nBlockPos; - CBigNum bnChainTrust; // triangles: trust score of block chain + uint256 nChainTrust; // triangles: trust score of block chain int nHeight; - int64 nMint; - int64 nMoneySupply; + int64_t nMint; + int64_t nMoneySupply; unsigned int nFlags; // triangles: block index flags - enum + enum { BLOCK_PROOF_OF_STAKE = (1 << 0), // is proof-of-stake block BLOCK_STAKE_ENTROPY = (1 << 1), // entropy bit for stake modifier BLOCK_STAKE_MODIFIER = (1 << 2), // regenerated stake modifier }; - uint64 nStakeModifier; // hash modifier for proof-of-stake + uint64_t nStakeModifier; // hash modifier for proof-of-stake unsigned int nStakeModifierChecksum; // checksum of index; in-memeory only // proof-of-stake specific fields @@ -1161,7 +1149,7 @@ public: nFile = 0; nBlockPos = 0; nHeight = 0; - bnChainTrust = 0; + nChainTrust = 0; nMint = 0; nMoneySupply = 0; nFlags = 0; @@ -1186,7 +1174,7 @@ public: nFile = nFileIn; nBlockPos = nBlockPosIn; nHeight = 0; - bnChainTrust = 0; + nChainTrust = 0; nMint = 0; nMoneySupply = 0; nFlags = 0; @@ -1230,12 +1218,12 @@ public: return *phashBlock; } - int64 GetBlockTime() const + int64_t GetBlockTime() const { - return (int64)nTime; + return (int64_t)nTime; } - CBigNum GetBlockTrust() const; + uint256 GetBlockTrust() const; bool IsInMainChain() const { @@ -1247,13 +1235,18 @@ public: return true; } + int64_t GetPastTimeLimit() const + { + return GetMedianTimePast(); + } + enum { nMedianTimeSpan=11 }; - int64 GetMedianTimePast() const + int64_t GetMedianTimePast() const { - int64 pmedian[nMedianTimeSpan]; - int64* pbegin = &pmedian[nMedianTimeSpan]; - int64* pend = &pmedian[nMedianTimeSpan]; + int64_t pmedian[nMedianTimeSpan]; + int64_t* pbegin = &pmedian[nMedianTimeSpan]; + int64_t* pend = &pmedian[nMedianTimeSpan]; const CBlockIndex* pindex = this; for (int i = 0; i < nMedianTimeSpan && pindex; i++, pindex = pindex->pprev) @@ -1263,7 +1256,7 @@ public: return pbegin[(pend - pbegin)/2]; } - int64 GetMedianTime() const + int64_t GetMedianTime() const { const CBlockIndex* pindex = this; for (int i = 0; i < nMedianTimeSpan/2; i++) @@ -1316,7 +1309,7 @@ public: return (nFlags & BLOCK_STAKE_MODIFIER); } - void SetStakeModifier(uint64 nModifier, bool fGeneratedStakeModifier) + void SetStakeModifier(uint64_t nModifier, bool fGeneratedStakeModifier) { nStakeModifier = nModifier; if (fGeneratedStakeModifier) @@ -1325,7 +1318,7 @@ public: std::string ToString() const { - return strprintf("CBlockIndex(nprev=%p, pnext=%p, nFile=%u, nBlockPos=%-6d nHeight=%d, nMint=%s, nMoneySupply=%s, nFlags=(%s)(%d)(%s), nStakeModifier=%016"PRI64x", nStakeModifierChecksum=%08x, hashProofOfStake=%s, prevoutStake=(%s), nStakeTime=%d merkle=%s, hashBlock=%s)", + return strprintf("CBlockIndex(nprev=%p, pnext=%p, nFile=%u, nBlockPos=%-6d nHeight=%d, nMint=%s, nMoneySupply=%s, nFlags=(%s)(%d)(%s), nStakeModifier=%016"PRIx64", nStakeModifierChecksum=%08x, hashProofOfStake=%s, prevoutStake=(%s), nStakeTime=%d merkle=%s, hashBlock=%s)", pprev, pnext, nFile, nBlockPos, nHeight, FormatMoney(nMint).c_str(), FormatMoney(nMoneySupply).c_str(), GeneratedStakeModifier() ? "MOD" : "-", GetStakeEntropyBit(), IsProofOfStake()? "PoS" : "PoW", @@ -1347,6 +1340,9 @@ public: /** Used to marshal pointers into hashes for db storage. */ class CDiskBlockIndex : public CBlockIndex { +private: + uint256 blockHash; + public: uint256 hashPrev; uint256 hashNext; @@ -1355,6 +1351,7 @@ public: { hashPrev = 0; hashNext = 0; + blockHash = 0; } explicit CDiskBlockIndex(CBlockIndex* pindex) : CBlockIndex(*pindex) @@ -1396,10 +1393,14 @@ public: READWRITE(nTime); READWRITE(nBits); READWRITE(nNonce); + READWRITE(blockHash); ) uint256 GetBlockHash() const { + if (fUseFastIndex && (nTime < GetAdjustedTime() - 24 * 60 * 60) && blockHash != 0) + return blockHash; + CBlock block; block.nVersion = nVersion; block.hashPrevBlock = hashPrev; @@ -1407,9 +1408,11 @@ public: block.nTime = nTime; block.nBits = nBits; block.nNonce = nNonce; - return block.GetHash(); - } + const_cast(this)->blockHash = block.GetHash(); + + return blockHash; + } std::string ToString() const { @@ -1497,7 +1500,7 @@ public: if (vHave.size() > 10) nStep *= 2; } - vHave.push_back((!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)); + vHave.push_back((!fTestNet ? hashGenesisBlockOfficial : hashGenesisBlockTestNet)); } int GetDistanceBack() @@ -1550,7 +1553,7 @@ public: return hash; } } - return (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet); + return (!fTestNet ? hashGenesisBlockOfficial : hashGenesisBlockTestNet); } int GetHeight() @@ -1579,7 +1582,8 @@ public: bool accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, bool* pfMissingInputs); bool addUnchecked(const uint256& hash, CTransaction &tx); - bool remove(CTransaction &tx); + bool remove(const CTransaction &tx, bool fRecursive = false); + bool removeConflicts(const CTransaction &tx); void clear(); void queryHashes(std::vector& vtxid); @@ -1602,4 +1606,4 @@ public: extern CTxMemPool mempool; -#endif +#endif \ No newline at end of file diff --git a/src/makefile.bsd b/src/makefile.bsd deleted file mode 100644 index 86a83f1..0000000 --- a/src/makefile.bsd +++ /dev/null @@ -1,189 +0,0 @@ -# Copyright (c) 2009-2010 Satoshi Nakamoto -# Distributed under the MIT/X11 software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -USE_UPNP:=0 -USE_IPV6:=1 - -LINK:=$(CXX) - -DEFS=-DBOOST_SPIRIT_THREADSAFE - -DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH)) -LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH)) - -TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) - -LMODE = dynamic -LMODE2 = dynamic -ifdef STATIC - LMODE = static - ifeq (${STATIC}, all) - LMODE2 = static - endif -else - TESTDEFS += -DBOOST_TEST_DYN_LINK -endif - -# for boost 1.37, add -mt to the boost libraries -LIBS += \ - -Wl,-B$(LMODE) \ - -l boost_system$(BOOST_LIB_SUFFIX) \ - -l boost_filesystem$(BOOST_LIB_SUFFIX) \ - -l boost_program_options$(BOOST_LIB_SUFFIX) \ - -l boost_thread$(BOOST_LIB_SUFFIX) \ - -l db_cxx$(BDB_LIB_SUFFIX) \ - -l ssl \ - -l crypto \ - -l execinfo - -ifndef USE_UPNP - override USE_UPNP = - -endif -ifneq (${USE_UPNP}, -) - LIBS += -l miniupnpc - DEFS += -DUSE_UPNP=$(USE_UPNP) -endif - -ifneq (${USE_IPV6}, -) - DEFS += -DUSE_IPV6=$(USE_IPV6) -endif - -LIBS+= \ - -Wl,-B$(LMODE2) \ - -l z \ - -l dl \ - -l pthread - - -# Hardening -# Make some classes of vulnerabilities unexploitable in case one is discovered. -# - # This is a workaround for Ubuntu bug #691722, the default -fstack-protector causes - # -fstack-protector-all to be ignored unless -fno-stack-protector is used first. - # see: https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/691722 - HARDENING=-fno-stack-protector - - # Stack Canaries - # Put numbers at the beginning of each stack frame and check that they are the same. - # If a stack buffer if overflowed, it writes over the canary number and then on return - # when that number is checked, it won't be the same and the program will exit with - # a "Stack smashing detected" error instead of being exploited. - HARDENING+=-fstack-protector-all -Wstack-protector - - # 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. - 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 - LDHARDENING+=-pie - endif - - # -D_FORTIFY_SOURCE=2 does some checking for potentially exploitable code patterns in - # the source such overflowing a statically defined buffer. - HARDENING+=-D_FORTIFY_SOURCE=2 -# - - -DEBUGFLAGS=-g - -# CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only -# adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work. -xCXXFLAGS=-O0 -msse2 -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/alert.o \ - obj/version.o \ - obj/checkpoints.o \ - obj/netbase.o \ - obj/addrman.o \ - obj/crypter.o \ - obj/key.o \ - obj/db.o \ - obj/init.o \ - obj/irc.o \ - obj/keystore.o \ - obj/main.o \ - obj/net.o \ - obj/protocol.o \ - obj/bitcoinrpc.o \ - obj/rpcdump.o \ - obj/rpcnet.o \ - obj/rpcmining.o \ - obj/rpcwallet.o \ - obj/rpcblockchain.o \ - obj/rpcrawtransaction.o \ - obj/script.o \ - obj/sync.o \ - obj/util.o \ - obj/wallet.o \ - obj/walletdb.o \ - obj/noui.o \ - obj/kernel.o \ - obj/pbkdf2.o \ - obj/scrypt_mine.o \ - obj/scrypt-x86.o \ - obj/scrypt-x86_64.o - - -all: trianglesd - -test check: test_triangles FORCE - ./test_BottleCaps - -# auto-generated dependencies: --include obj/*.P --include obj-test/*.P - -obj/build.h: FORCE - /bin/sh ../share/genbuild.sh obj/build.h -version.cpp: obj/build.h -DEFS += -DHAVE_BUILD_INFO - -obj/scrypt-x86.o: scrypt-x86.S - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -obj/scrypt-x86_64.o: scrypt-x86_64.S - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -obj/%.o: %.cpp - $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< - @cp $(@:%.o=%.d) $(@:%.o=%.P); \ - sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ - -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ - rm -f $(@:%.o=%.d) - -trianglesd: $(OBJS:obj/%=obj/%) - $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) - -TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) - -obj-test/%.o: test/%.cpp - $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< - @cp $(@:%.o=%.d) $(@:%.o=%.P); \ - sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ - -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ - rm -f $(@:%.o=%.d) - -test_triangles: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) - $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(xLDFLAGS) $(LIBS) - -clean: - -rm -f trianglesd test_triangles - -rm -f obj/*.o - -rm -f obj-test/*.o - -rm -f obj/*.P - -rm -f obj-test/*.P - -rm -f obj/build.h - -FORCE: diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw deleted file mode 100644 index 4757858..0000000 --- a/src/makefile.linux-mingw +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright (c) 2009-2010 Satoshi Nakamoto -# Distributed under the MIT/X11 software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -DEPSDIR:=/usr/i586-mingw32msvc - -USE_UPNP:=0 -USE_IPV6:=1 - -INCLUDEPATHS= \ - -I"$(CURDIR)" \ - -I"$(CURDIR)"/obj \ - -I"$(CURDIR)"/tor \ - -I"$(DEPSDIR)/boost_1_50_0" \ - -I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \ - -I"$(DEPSDIR)/openssl-1.0.1g/include" \ - -I"$(DEPSDIR)" - -LIBPATHS= \ - -L"$(DEPSDIR)/boost_1_50_0/stage/lib" \ - -L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \ - -L"$(DEPSDIR)/openssl-1.0.1g" - -LIBS= \ - -l boost_system-mt-s \ - -l boost_filesystem-mt-s \ - -l boost_program_options-mt-s \ - -l boost_thread_win32-mt-s \ - -l boost_chrono-mt-s \ - -l db_cxx \ - -l ssl \ - -l crypto - -DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DEBUGFLAGS=-g -CFLAGS=-O2 -msse2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) -LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat - -TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) - -ifndef USE_UPNP - override USE_UPNP = - -endif -ifneq (${USE_UPNP}, -) - LIBPATHS += -L"$(DEPSDIR)/miniupnpc" - LIBS += -l miniupnpc -l iphlpapi - DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) -endif - -ifneq (${USE_IPV6}, -) - DEFS += -DUSE_IPV6=$(USE_IPV6) -endif - -LIBS += -l mingwthrd -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l mswsock -l shlwapi - -# TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are -HEADERS = $(wildcard *.h) - -OBJS= \ - obj/address.o \ - obj/addressmap.o \ - obj/aes.o \ - obj/backtrace.o \ - obj/buffers.o \ - obj/channel.o \ - obj/channeltls.o \ - obj/circpathbias.o \ - obj/circuitbuild.o \ - obj/circuitlist.o \ - obj/circuitmux.o \ - obj/circuitmux_ewma.o \ - obj/circuitstats.o \ - obj/circuituse.o \ - obj/command.o \ - obj/compat.o \ - obj/compat_libevent.o \ - obj/config.o \ - obj/config_codedigest.o \ - obj/confparse.o \ - obj/connection.o \ - obj/connection_edge.o \ - obj/connection_or.o \ - obj/container.o \ - obj/control.o \ - obj/cpuworker.o \ - obj/crypto.o \ - obj/crypto_curve25519.o \ - obj/crypto_format.o \ - obj/curve25519-donna.o \ - obj/di_ops.o \ - obj/directory.o \ - obj/dirserv.o \ - obj/dirvote.o \ - obj/dns.o \ - obj/dnsserv.o \ - obj/entrynodes.o \ - obj/ext_orport.o \ - obj/fp_pair.o \ - obj/geoip.o \ - obj/hibernate.o \ - obj/log.o \ - obj/memarea.o \ - obj/mempool.o \ - obj/microdesc.o \ - obj/networkstatus.o \ - obj/nodelist.o \ - obj/onion.o \ - obj/onion_fast.o \ - obj/onion_main.o \ - obj/onion_ntor.o \ - obj/onion_tap.o \ - obj/policies.o \ - obj/procmon.o \ - obj/reasons.o \ - obj/relay.o \ - obj/rendclient.o \ - obj/rendcommon.o \ - obj/rendmid.o \ - obj/rendservice.o \ - obj/rephist.o \ - obj/replaycache.o \ - obj/router.o \ - obj/routerlist.o \ - obj/routerparse.o \ - obj/routerset.o \ - obj/sandbox.o \ - obj/statefile.o \ - obj/status.o \ - obj/tor_util.o \ - obj/torgzip.o \ - obj/tortls.o \ - obj/transports.o \ - obj/util_codedigest.o \ - obj/aes_helper.o \ - obj/fugue.o \ - obj/hamsi.o \ - obj/groestl.o \ - obj/blake.o \ - obj/bmw.o \ - obj/skein.o \ - obj/keccak.o \ - obj/shavite.o \ - obj/jh.o \ - obj/luffa.o \ - obj/cubehash.o \ - obj/echo.o \ - obj/simd.o \ - obj/alert.o \ - obj/version.o \ - obj/checkpoints.o \ - obj/netbase.o \ - obj/addrman.o \ - obj/crypter.o \ - obj/key.o \ - obj/db.o \ - obj/init.o \ - obj/irc.o \ - obj/keystore.o \ - obj/main.o \ - obj/net.o \ - obj/protocol.o \ - obj/bitcoinrpc.o \ - obj/rpcdump.o \ - obj/rpcnet.o \ - obj/rpcmining.o \ - obj/rpcwallet.o \ - obj/rpcblockchain.o \ - obj/rpcrawtransaction.o \ - obj/script.o \ - obj/sync.o \ - obj/util.o \ - obj/wallet.o \ - obj/walletdb.o \ - obj/noui.o \ - obj/kernel.o \ - obj/pbkdf2.o \ - obj/scrypt.o \ - obj/scrypt_mine.o \ - obj/scrypt-x86.o \ - obj/scrypt-x86_64.o - -all: StealthCoind.exe - -obj/build.h: FORCE - /bin/sh ../share/genbuild.sh obj/build.h -version.cpp: obj/build.h -DEFS += -DHAVE_BUILD_INFO - -obj/%.o: %.cpp $(HEADERS) - i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $< - -obj/%.o: %.c $(HEADERS) - i586-mingw32msvc-g++ -c $(CFLAGS) -fpermissive -o $@ $< - -obj/%.o: tor/%.c - $(CC) -c $(xCXXFLAGS) -o $@ $< - -obj/%.o: tor/anonymize.cpp - $(CXX) -c $(xCXXFLAGS) -o $@ $< - - -StealthCoind.exe: $(OBJS:obj/%=obj/%) - i586-mingw32msvc-g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) - -TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) - -obj-test/%.o: test/%.cpp $(HEADERS) - i586-mingw32msvc-g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $< - -test_triangles.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) - i586-mingw32msvc-g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework-mt-s $(LIBS) - -obj/scrypt-x86.o: scrypt-x86.S - i586-mingw32msvc-g++ -c $(CFLAGS) -MMD -o $@ $< - -obj/scrypt-x86_64.o: scrypt-x86_64.S - i586-mingw32msvc-g++ -c $(CFLAGS) -MMD -o $@ $< - -clean: - -rm -f obj/*.o - -rm -f StealthCoind.exe - -rm -f obj-test/*.o - -rm -f test_triangles.exe - -rm -f obj/build.h - -FORCE: diff --git a/src/makefile.mingw b/src/makefile.mingw deleted file mode 100644 index 8b7fcc7..0000000 --- a/src/makefile.mingw +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright (c) 2009-2010 Satoshi Nakamoto -# Distributed under the MIT/X11 software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -USE_UPNP:=0 -USE_IPV6:=0 - -INCLUDEPATHS= \ - -I"C:/deps/boost_1_53_0" \ - -I"C:/deps/db-4.8.30.NC/build_unix" \ - -I"C:/deps/openssl-1.0.1g/include" - -LIBPATHS= \ - -L"C:/deps/boost_1_53_0/stage/lib" \ - -L"C:/deps/db-4.8.30.NC/build_unix" \ - -L"C:/deps/openssl-1.0.1g" - - -LIBS= \ - -l boost_system-mgw48-mt-s-1_53 \ - -l boost_filesystem-mgw48-mt-s-1_53 \ - -l boost_program_options-mgw48-mt-s-1_53 \ - -l boost_thread-mgw48-mt-s-1_53 \ - -l db_cxx \ - -l ssl \ - -l crypto - -DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -D__NO_SYSTEM_INCLUDES -DEBUGFLAGS=-g -CFLAGS=-mthreads -O2 -msse2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) -LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat - -TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) - -ifndef USE_UPNP - override USE_UPNP = - -endif -ifneq (${USE_UPNP}, -) - INCLUDEPATHS += -I"C:/deps/" - LIBPATHS += -L"C:/deps/miniupnpc" - LIBS += -l miniupnpc -l iphlpapi - DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP) -endif - -ifneq (${USE_IPV6}, -) - DEFS += -DUSE_IPV6=$(USE_IPV6) -endif - -LIBS += -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l mswsock -l shlwapi - -# TODO: make the mingw builds smarter about dependencies, like the linux/osx builds are -HEADERS = $(wildcard *.h) - -OBJS= \ - obj/alert.o \ - obj/version.o \ - obj/checkpoints.o \ - obj/netbase.o \ - obj/addrman.o \ - obj/crypter.o \ - obj/key.o \ - obj/db.o \ - obj/init.o \ - obj/irc.o \ - obj/keystore.o \ - obj/main.o \ - obj/net.o \ - obj/protocol.o \ - obj/bitcoinrpc.o \ - obj/rpcdump.o \ - obj/rpcnet.o \ - obj/rpcmining.o \ - obj/rpcwallet.o \ - obj/rpcblockchain.o \ - obj/rpcrawtransaction.o \ - obj/script.o \ - obj/sync.o \ - obj/util.o \ - obj/wallet.o \ - obj/walletdb.o \ - obj/noui.o \ - obj/kernel.o \ - obj/pbkdf2.o \ - obj/scrypt_mine.o \ - obj/scrypt-x86.o \ - obj/scrypt-x86_64.o - -all: trianglesd.exe - -test check: test_triangles.exe FORCE - test_triangles.exe - -obj/%.o: %.cpp $(HEADERS) - g++ -c $(CFLAGS) -o $@ $< - -obj/scrypt-x86.o: scrypt-x86.S - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -obj/scrypt-x86_64.o: scrypt-x86_64.S - $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< - -trianglesd.exe: $(OBJS:obj/%=obj/%) - g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) - -TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) - -obj-test/%.o: test/%.cpp $(HEADERS) - g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $< - -test_triangles.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) - g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS) - -clean: - -del /Q triangles test_triangles - -del /Q obj\* - -del /Q obj-test\* - -FORCE: diff --git a/src/makefile.osx b/src/makefile.osx index e449984..d305426 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -3,7 +3,7 @@ # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -# Mac OS X makefile for bitcoin +# Mac OS X makefile for triangles # Originally by Laszlo Hanyecz (solar@heliacal.net) CXX=llvm-g++ @@ -70,7 +70,7 @@ else CFLAGS = -g -msse2 endif -# ppc doesn't work because we don't support big-endian +# triangles doesn't work because we don't support big-endian CFLAGS += -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) @@ -149,7 +149,6 @@ OBJS= \ obj/tortls.o \ obj/transports.o \ obj/util_codedigest.o \ - obj/aes_helper.o \ obj/fugue.o \ obj/hamsi.o \ obj/groestl.o \ @@ -174,28 +173,31 @@ OBJS= \ obj/init.o \ obj/irc.o \ obj/keystore.o \ + obj/miner.o \ obj/main.o \ obj/net.o \ obj/protocol.o \ - obj/bitcoinrpc.o \ + obj/trianglesrpc.o \ obj/rpcdump.o \ obj/rpcnet.o \ obj/rpcmining.o \ obj/rpcwallet.o \ obj/rpcblockchain.o \ obj/rpcrawtransaction.o \ + obj/rpcsmessage.o \ obj/script.o \ obj/sync.o \ obj/util.o \ obj/wallet.o \ obj/walletdb.o \ obj/noui.o \ - obj/pbkdf2.o \ obj/kernel.o \ - obj/scrypt_mine.o \ + obj/pbkdf2.o \ + obj/scrypt.o \ + obj/scrypt-arm.o \ obj/scrypt-x86.o \ - obj/scrypt-x86_64.o - + obj/scrypt-x86_64.o \ + obj/smessage.o ifndef USE_UPNP override USE_UPNP = - endif @@ -217,6 +219,14 @@ all: trianglesd test check: test_triangles FORCE ./test_triangles +LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a +DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) +DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) +OBJS += obj/txdb-leveldb.o +leveldb/libleveldb.a: + @echo "Building LevelDB ..."; cd leveldb; make libleveldb.a libmemenv.a; cd ..; +obj/txdb-leveldb.o: leveldb/libleveldb.a + # auto-generated dependencies: -include obj/*.P -include obj-test/*.P @@ -260,6 +270,9 @@ obj/scrypt-x86.o: scrypt-x86.S obj/scrypt-x86_64.o: scrypt-x86_64.S $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< +obj/scrypt-arm.o: scrypt-arm.S + $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< + trianglesd: $(OBJS:obj/%=obj/%) obj/anonymize.o $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) @@ -282,5 +295,7 @@ clean: -rm -f obj/*.P -rm -f obj-test/*.P -rm -f obj/build.h + -rm -f leveldb/libleveldb.a + -rm -f leveldb/libmemenv.a FORCE: diff --git a/src/makefile.unix b/src/makefile.unix index 63abf39..7a71559 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -6,6 +6,7 @@ USE_UPNP:=1 USE_IPV6:=1 LINK:=$(CXX) +ARCH:=$(system lscpu | head -n 1 | awk '{print $2}') DEFS=-DBOOST_SPIRIT_THREADSAFE @@ -97,9 +98,15 @@ LIBS+= \ DEBUGFLAGS=-g + +ifeq (${ARCH}, i686) + EXT_OPTIONS=-msse2 +endif + + # CXXFLAGS can be specified on the make command line, so we use xCXXFLAGS that only # adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work. -xCXXFLAGS=-O2 -msse2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ +xCXXFLAGS=-O2 $(EXT_OPTIONS) -pthread -Wall -Wextra -Wno-ignored-qualifiers -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 @@ -107,7 +114,7 @@ xCXXFLAGS=-O2 -msse2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unus xLDFLAGS=$(LDHARDENING) $(LDFLAGS) OBJS= \ -obj/address.o \ + obj/address.o \ obj/addressmap.o \ obj/aes.o \ obj/backtrace.o \ @@ -205,16 +212,18 @@ obj/address.o \ obj/init.o \ obj/irc.o \ obj/keystore.o \ + obj/miner.o \ obj/main.o \ obj/net.o \ obj/protocol.o \ - obj/bitcoinrpc.o \ + obj/trianglesrpc.o \ obj/rpcdump.o \ obj/rpcnet.o \ obj/rpcmining.o \ obj/rpcwallet.o \ obj/rpcblockchain.o \ obj/rpcrawtransaction.o \ + obj/rpcsmessage.o \ obj/script.o \ obj/sync.o \ obj/util.o \ @@ -224,16 +233,24 @@ obj/address.o \ obj/kernel.o \ obj/pbkdf2.o \ obj/scrypt.o \ - obj/scrypt_mine.o \ + obj/scrypt-arm.o \ obj/scrypt-x86.o \ - obj/scrypt-x86_64.o - - + obj/scrypt-x86_64.o \ + obj/smessage.o + all: trianglesd test check: test_triangles FORCE ./test_triangles +LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a +DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) +DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) +OBJS += obj/txdb-leveldb.o +leveldb/libleveldb.a: + @echo "Building LevelDB ..."; cd leveldb; make libleveldb.a libmemenv.a; cd ..; +obj/txdb-leveldb.o: leveldb/libleveldb.a + # auto-generated dependencies: -include obj/*.P -include obj-test/*.P @@ -249,6 +266,9 @@ obj/scrypt-x86.o: scrypt-x86.S obj/scrypt-x86_64.o: scrypt-x86_64.S $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< +obj/scrypt-arm.o: scrypt-arm.S + $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< + obj/%.o: %.cpp $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ @@ -263,7 +283,6 @@ obj/%.o: %.c -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ rm -f $(@:%.o=%.d) - obj/%.o: tor/%.c $(CC) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ @@ -300,5 +319,7 @@ clean: -rm -f obj/*.P -rm -f obj-test/*.P -rm -f obj/build.h + -rm -f leveldb/libleveldb.a + -rm -f leveldb/libmemenv.a FORCE: diff --git a/src/miner.cpp b/src/miner.cpp new file mode 100644 index 0000000..adeb8b7 --- /dev/null +++ b/src/miner.cpp @@ -0,0 +1,583 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2012 The Bitcoin developers +// Copyright (c) 2014 Triangles team +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "txdb.h" +#include "miner.h" +#include "kernel.h" + +using namespace std; + +////////////////////////////////////////////////////////////////////////////// +// +// TrianglesMiner +// + +// + +int static FormatHashBlocks(void* pbuffer, unsigned int len) +{ + unsigned char* pdata = (unsigned char*)pbuffer; + unsigned int blocks = 1 + ((len + 8) / 64); + unsigned char* pend = pdata + 64 * blocks; + memset(pdata + len, 0, 64 * blocks - len); + pdata[len] = 0x80; + unsigned int bits = len * 8; + pend[-1] = (bits >> 0) & 0xff; + pend[-2] = (bits >> 8) & 0xff; + pend[-3] = (bits >> 16) & 0xff; + pend[-4] = (bits >> 24) & 0xff; + return blocks; +} + +static const unsigned int pSHA256InitState[8] = +{0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19}; + +void SHA256Transform(void* pstate, void* pinput, const void* pinit) +{ + SHA256_CTX ctx; + unsigned char data[64]; + + SHA256_Init(&ctx); + + for (int i = 0; i < 16; i++) + ((uint32_t*)data)[i] = ByteReverse(((uint32_t*)pinput)[i]); + + for (int i = 0; i < 8; i++) + ctx.h[i] = ((uint32_t*)pinit)[i]; + + SHA256_Update(&ctx, data, sizeof(data)); + for (int i = 0; i < 8; i++) + ((uint32_t*)pstate)[i] = ctx.h[i]; +} + +// Some explaining would be appreciated +class COrphan +{ +public: + CTransaction* ptx; + set setDependsOn; + double dPriority; + double dFeePerKb; + + COrphan(CTransaction* ptxIn) + { + ptx = ptxIn; + dPriority = dFeePerKb = 0; + } + + void print() const + { + 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()); + } +}; + + +uint64_t nLastBlockTx = 0; +uint64_t nLastBlockSize = 0; +int64_t nLastCoinStakeSearchInterval = 0; + +// We want to sort transactions by priority and fee, so: +typedef boost::tuple 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>(); + } + } +}; + +// CreateNewBlock: fProofOfStake: try (best effort) to make a proof-of-stake block +CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake, int64_t* pFees) +{ + // Create new block + auto_ptr pblock(new CBlock()); + if (!pblock.get()) + return NULL; + + CBlockIndex* pindexPrev = pindexBest; + + // Create coinbase tx + CTransaction txNew; + txNew.vin.resize(1); + txNew.vin[0].prevout.SetNull(); + txNew.vout.resize(1); + + if (!fProofOfStake) + { + CReserveKey reservekey(pwallet); + txNew.vout[0].scriptPubKey.SetDestination(reservekey.GetReservedKey().GetID()); + } + else + { + // Height first in coinbase required for block.version=2 + txNew.vin[0].scriptSig = (CScript() << pindexPrev->nHeight+1) + COINBASE_FLAGS; + assert(txNew.vin[0].scriptSig.size() <= 100); + + txNew.vout[0].SetEmpty(); + } + + // 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_t nMinTxFee = MIN_TX_FEE; + if (mapArgs.count("-mintxfee")) + ParseMoney(mapArgs["-mintxfee"], nMinTxFee); + + pblock->nBits = GetNextTargetRequired(pindexPrev, fProofOfStake); + + // Collect memory pool transactions into the block + int64_t nFees = 0; + { + LOCK2(cs_main, mempool.cs); + CTxDB txdb("r"); + + // Priority order to process transactions + list vOrphan; // list memory doesn't move + map > mapDependers; + + // This vector will be sorted into a priority queue: + vector vecPriority; + vecPriority.reserve(mempool.mapTx.size()); + for (map::iterator mi = mempool.mapTx.begin(); mi != mempool.mapTx.end(); ++mi) + { + CTransaction& tx = (*mi).second; + if (tx.IsCoinBase() || tx.IsCoinStake() || !tx.IsFinal()) + continue; + + COrphan* porphan = NULL; + double dPriority = 0; + int64_t nTotalIn = 0; + bool fMissingInputs = false; + BOOST_FOREACH(const CTxIn& txin, tx.vin) + { + // Read prev transaction + CTransaction txPrev; + 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) + { + // Use list for automatic deletion + vOrphan.push_back(COrphan(&tx)); + porphan = &vOrphan.back(); + } + 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_t nValueIn = txPrev.vout[txin.prevout.n].nValue; + nTotalIn += nValueIn; + + int nConf = txindex.GetDepthInMainChain(); + dPriority += (double)nValueIn * nConf; + } + if (fMissingInputs) continue; + + // Priority is sum(valuein * age) / txsize + unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); + dPriority /= nTxSize; + + // 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 (porphan) + { + porphan->dPriority = dPriority; + porphan->dFeePerKb = dFeePerKb; + } + else + vecPriority.push_back(TxPriority(dPriority, dFeePerKb, &(*mi).second)); + } + + // Collect transactions into block + map mapTestPool; + uint64_t nBlockSize = 1000; + uint64_t nBlockTx = 0; + int nBlockSigOps = 100; + bool fSortedByFee = (nBlockPrioritySize <= 0); + + TxPriorityCompare comparer(fSortedByFee); + std::make_heap(vecPriority.begin(), vecPriority.end(), comparer); + + while (!vecPriority.empty()) + { + // 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 >= nBlockMaxSize) + continue; + + // Legacy limits on sigOps: + unsigned int nTxSigOps = tx.GetLegacySigOpCount(); + if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) + continue; + + // Timestamp limit + if (tx.nTime > GetAdjustedTime() || (fProofOfStake && tx.nTime > pblock->vtx[0].nTime)) + continue; + + // Transaction fee + int64_t nMinFee = tx.GetMinFee(nBlockSize, 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 + map mapTestPoolTmp(mapTestPool); + MapPrevTx mapInputs; + bool fInvalid; + if (!tx.FetchInputs(txdb, mapTestPoolTmp, false, true, mapInputs, fInvalid)) + continue; + + int64_t nTxFees = tx.GetValueIn(mapInputs)-tx.GetValueOut(); + if (nTxFees < nMinFee) + continue; + + nTxSigOps += tx.GetP2SHSigOpCount(mapInputs); + if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) + continue; + + if (!tx.ConnectInputs(txdb, mapInputs, mapTestPoolTmp, CDiskTxPos(1,1,1), pindexPrev, false, true)) + continue; + mapTestPoolTmp[tx.GetHash()] = CTxIndex(CDiskTxPos(1,1,1), tx.vout.size()); + swap(mapTestPool, mapTestPoolTmp); + + // Added + pblock->vtx.push_back(tx); + nBlockSize += nTxSize; + ++nBlockTx; + 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)) + { + BOOST_FOREACH(COrphan* porphan, mapDependers[hash]) + { + if (!porphan->setDependsOn.empty()) + { + porphan->setDependsOn.erase(hash); + if (porphan->setDependsOn.empty()) + { + vecPriority.push_back(TxPriority(porphan->dPriority, porphan->dFeePerKb, porphan->ptx)); + std::push_heap(vecPriority.begin(), vecPriority.end(), comparer); + } + } + } + } + } + + nLastBlockTx = nBlockTx; + nLastBlockSize = nBlockSize; + + if (fDebug && GetBoolArg("-printpriority")) + printf("CreateNewBlock(): total size %"PRIu64"\n", nBlockSize); + + if (!fProofOfStake) + pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(nFees); + + if (pFees) + *pFees = nFees; + + // Fill in header + pblock->hashPrevBlock = pindexPrev->GetBlockHash(); + pblock->nTime = max(pindexPrev->GetPastTimeLimit()+1, pblock->GetMaxTransactionTime()); + pblock->nTime = max(pblock->GetBlockTime(), PastDrift(pindexPrev->GetBlockTime())); + if (!fProofOfStake) + pblock->UpdateTime(pindexPrev); + pblock->nNonce = 0; + } + + return pblock.release(); +} + + +void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce) +{ + // Update nExtraNonce + static uint256 hashPrevBlock; + if (hashPrevBlock != pblock->hashPrevBlock) + { + nExtraNonce = 0; + hashPrevBlock = pblock->hashPrevBlock; + } + ++nExtraNonce; + + unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2 + pblock->vtx[0].vin[0].scriptSig = (CScript() << nHeight << CBigNum(nExtraNonce)) + COINBASE_FLAGS; + assert(pblock->vtx[0].vin[0].scriptSig.size() <= 100); + + pblock->hashMerkleRoot = pblock->BuildMerkleTree(); +} + + +void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1) +{ + // + // Pre-build hash buffers + // + struct + { + struct unnamed2 + { + int nVersion; + uint256 hashPrevBlock; + uint256 hashMerkleRoot; + unsigned int nTime; + unsigned int nBits; + unsigned int nNonce; + } + block; + unsigned char pchPadding0[64]; + uint256 hash1; + unsigned char pchPadding1[64]; + } + tmp; + memset(&tmp, 0, sizeof(tmp)); + + tmp.block.nVersion = pblock->nVersion; + tmp.block.hashPrevBlock = pblock->hashPrevBlock; + tmp.block.hashMerkleRoot = pblock->hashMerkleRoot; + tmp.block.nTime = pblock->nTime; + tmp.block.nBits = pblock->nBits; + tmp.block.nNonce = pblock->nNonce; + + FormatHashBlocks(&tmp.block, sizeof(tmp.block)); + FormatHashBlocks(&tmp.hash1, sizeof(tmp.hash1)); + + // Byte swap all the input buffer + for (unsigned int i = 0; i < sizeof(tmp)/4; i++) + ((unsigned int*)&tmp)[i] = ByteReverse(((unsigned int*)&tmp)[i]); + + // Precalc the first half of the first hash, which stays constant + SHA256Transform(pmidstate, &tmp.block, pSHA256InitState); + + memcpy(pdata, &tmp.block, 128); + memcpy(phash1, &tmp.hash1, 64); +} + + +bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey) +{ + uint256 hash = pblock->GetHash(); + uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); + + if(!pblock->IsProofOfWork()) + return error("CheckWork() : %s is not a proof-of-work block", hash.GetHex().c_str()); + + if (hash > hashTarget && pblock->IsProofOfWork()) + return error("CheckWork() : proof-of-work not meeting target"); + + //// debug print + printf("CheckWork() : new proof-of-work block found \n hash: %s \ntarget: %s\n", hash.GetHex().c_str(), hashTarget.GetHex().c_str()); + pblock->print(); + printf("generated %s\n", FormatMoney(pblock->vtx[0].vout[0].nValue).c_str()); + + // Found a solution + { + LOCK(cs_main); + if (pblock->hashPrevBlock != hashBestChain) + return error("CheckWork() : generated block is stale"); + + // Remove key from key pool + reservekey.KeepKey(); + + // Track how many getdata requests this block gets + { + LOCK(wallet.cs_wallet); + wallet.mapRequestCount[hash] = 0; + } + + // Process this block the same as if we had received it from another node + if (!ProcessBlock(NULL, pblock)) + return error("CheckWork() : ProcessBlock, block not accepted"); + } + + return true; +} + +bool CheckStake(CBlock* pblock, CWallet& wallet) +{ + uint256 proofHash = 0, hashTarget = 0; + uint256 hash = pblock->GetHash(); + + if(!pblock->IsProofOfStake()) + return error("CheckStake() : %s is not a proof-of-stake block", hash.GetHex().c_str()); + + // verify hash target and signature of coinstake tx + //bool fIsInitialDownload = IsInitialBlockDownload(); + if (!CheckProofOfStake(pblock->vtx[1], pblock->nBits, proofHash, hashTarget)) + return error("CheckStake() : proof-of-stake checking failed"); + + //// debug print + printf("CheckStake() : new proof-of-stake block found \n hash: %s \nproofhash: %s \ntarget: %s\n", hash.GetHex().c_str(), proofHash.GetHex().c_str(), hashTarget.GetHex().c_str()); + pblock->print(); + printf("out %s\n", FormatMoney(pblock->vtx[1].GetValueOut()).c_str()); + + // Found a solution + { + LOCK(cs_main); + if (pblock->hashPrevBlock != hashBestChain) + return error("CheckStake() : generated block is stale"); + + // Track how many getdata requests this block gets + { + LOCK(wallet.cs_wallet); + wallet.mapRequestCount[hash] = 0; + } + + // Process this block the same as if we had received it from another node + if (!ProcessBlock(NULL, pblock)) + return error("CheckStake() : ProcessBlock, block not accepted"); + } + + return true; +} + +void StakeMiner(CWallet *pwallet) +{ + SetThreadPriority(THREAD_PRIORITY_LOWEST); + + // Make this thread recognisable as the mining thread + RenameThread("Triangles-miner"); + + bool fTryToSync = true; + + while (true) + { + if (fShutdown) + return; + + while (pwallet->IsLocked()) + { + nLastCoinStakeSearchInterval = 0; + MilliSleep(1000); + if (fShutdown) + return; + } + + while (vNodes.empty() || IsInitialBlockDownload()) + { + nLastCoinStakeSearchInterval = 0; + fTryToSync = true; + MilliSleep(1000); + if (fShutdown) + return; + } + + if (fTryToSync) + { + fTryToSync = false; + if (vNodes.size() < 3 || nBestHeight < GetNumBlocksOfPeers()) + { + MilliSleep(60000); + continue; + } + } + + // + // Create new block + // + int64_t nFees; + auto_ptr pblock(CreateNewBlock(pwallet, true, &nFees)); + if (!pblock.get()) + return; + + // Try to sign the block + if (pblock->SignBlock(*pwallet, nFees)) + { + printf("StakeMiner(): A proof-of-stake block has been found! %s\n", pblock->GetHash().ToString().c_str()); + SetThreadPriority(THREAD_PRIORITY_NORMAL); + CheckStake(pblock.get(), *pwallet); + SetThreadPriority(THREAD_PRIORITY_LOWEST); + MilliSleep(500); + } + else + MilliSleep(500); + } +} + + diff --git a/src/miner.h b/src/miner.h new file mode 100644 index 0000000..2b931ee --- /dev/null +++ b/src/miner.h @@ -0,0 +1,32 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2012 The Bitcoin developers +// Copyright (c) 2014 Triangles team +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef TRIANGLES_MINER_H +#define TRIANGLES_MINER_H + +#include "main.h" +#include "wallet.h" + +/* Generate a new block, without valid proof-of-work */ +CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake=false, int64_t* pFees = 0); + +/** Modify the extranonce in a block */ +void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce); + +/** Do mining precalculation */ +void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1); + +/** Check mined proof-of-work block */ +bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey); + +/** Check mined proof-of-stake block */ +bool CheckStake(CBlock* pblock, CWallet& wallet); + +/** Base sha256 mining transform */ +void SHA256Transform(void* pstate, void* pinput, const void* pinit); + +#endif // TRIANGLES_MINER_H + + diff --git a/src/mruset.h b/src/mruset.h index a527351..b3c27e3 100644 --- a/src/mruset.h +++ b/src/mruset.h @@ -1,8 +1,8 @@ // Copyright (c) 2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_MRUSET_H -#define BITCOIN_MRUSET_H +#ifndef TRIANGLES_MRUSET_H +#define TRIANGLES_MRUSET_H #include #include @@ -30,6 +30,7 @@ public: bool empty() const { return set.empty(); } iterator find(const key_type& k) const { return set.find(k); } size_type count(const key_type& k) const { return set.count(k); } + void clear() { set.clear(); queue.clear(); } bool inline friend operator==(const mruset& a, const mruset& b) { return a.set == b.set; } bool inline friend operator==(const mruset& a, const std::set& b) { return a.set == b; } bool inline friend operator<(const mruset& a, const mruset& b) { return a.set < b.set; } @@ -62,3 +63,5 @@ public: }; #endif + + diff --git a/src/net.cpp b/src/net.cpp index 440a57e..bb6fb03 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -27,10 +27,10 @@ using namespace std; using namespace boost; extern "C" { - int tor_main(int argc, char *argv[]); +int tor_main(int argc, char *argv[]); } -static const int MAX_OUTBOUND_CONNECTIONS = 12; +static const int MAX_OUTBOUND_CONNECTIONS = 16; void ThreadMessageHandler2(void* parg); void ThreadSocketHandler2(void* parg); @@ -52,18 +52,18 @@ struct LocalServiceInfo { // Global state variables // bool fClient = false; +//bool fDiscover = true; -// bool fUseUPnP = GetBoolArg("-upnp", USE_UPNP); -bool fUseUPnP = false; - -uint64 nLocalServices = (fClient ? 0 : NODE_NETWORK); +bool fUseUPnP = GetBoolArg("-upnp", USE_UPNP); +//bool fUseUPnP = false; +uint64_t nLocalServices = (fClient ? 0 : NODE_NETWORK); static CCriticalSection cs_mapLocalHost; static map mapLocalHost; static bool vfReachable[NET_MAX] = {}; static bool vfLimited[NET_MAX] = {}; static CNode* pnodeLocalHost = NULL; CAddress addrSeenByPeer(CService("0.0.0.0", 0), nLocalServices); -uint64 nLocalHostNonce = 0; +uint64_t nLocalHostNonce = 0; boost::array vnThreadsRunning; static std::vector vhListenSocket; CAddrMan addrman; @@ -71,9 +71,9 @@ CAddrMan addrman; vector vNodes; CCriticalSection cs_vNodes; map mapRelay; -deque > vRelayExpiration; +deque > vRelayExpiration; CCriticalSection cs_mapRelay; -map mapAlreadyAskedFor; +map mapAlreadyAskedFor; static deque vOneShots; CCriticalSection cs_vOneShots; @@ -108,6 +108,9 @@ void CNode::PushGetBlocks(CBlockIndex* pindexBegin, uint256 hashEnd) // find 'best' local address for a particular peer bool GetLocal(CService& addr, const CNetAddr *paddrPeer) { + if (fNoListen) + return false; + int nBestScore = -1; int nBestReachability = -1; { @@ -144,7 +147,7 @@ CAddress GetLocalAddress(const CNetAddr *paddrPeer) bool RecvLine(SOCKET hSocket, string& strLine) { strLine = ""; - loop + while (true) { char c; int nBytes = recv(hSocket, &c, 1, 0); @@ -169,7 +172,7 @@ bool RecvLine(SOCKET hSocket, string& strLine) continue; if (nErr == WSAEWOULDBLOCK || nErr == WSAEINTR || nErr == WSAEINPROGRESS) { - Sleep(10); + MilliSleep(10); continue; } } @@ -317,7 +320,7 @@ bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const cha { if (strLine.empty()) // HTTP response is separated from headers by blank line { - loop + while (true) { if (!RecvLine(hSocket, strLine)) { @@ -377,7 +380,7 @@ bool GetMyExternalIP(CNetAddr& ipRet) pszGet = "GET / HTTP/1.1\r\n" "Host: checkip.dyndns.org\r\n" - "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n" + "User-Agent: Triangles\r\n" "Connection: close\r\n" "\r\n"; @@ -396,7 +399,7 @@ bool GetMyExternalIP(CNetAddr& ipRet) pszGet = "GET /simple/ HTTP/1.1\r\n" "Host: www.showmyip.com\r\n" - "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n" + "User-Agent: Triangles\r\n" "Connection: close\r\n" "\r\n"; @@ -413,7 +416,7 @@ bool GetMyExternalIP(CNetAddr& ipRet) void ThreadGetMyExternalIP(void* parg) { // Make this thread recognisable as the external IP detection thread - RenameThread("bitcoin-ext-ip"); + RenameThread("Triangles-ext-ip"); CNetAddr addrLocalHost; if (GetMyExternalIP(addrLocalHost)) @@ -423,11 +426,21 @@ void ThreadGetMyExternalIP(void* parg) } } + + + + void AddressCurrentlyConnected(const CService& addr) { addrman.Connected(addr); } + + + + + + CNode* FindNode(const CNetAddr& ip) { { @@ -459,9 +472,8 @@ CNode* FindNode(const CService& addr) return NULL; } -CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) +CNode* ConnectNode(CAddress addrConnect, const char *pszDest) { - if (pszDest == NULL) { if (IsLocal(addrConnect)) return NULL; @@ -470,10 +482,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) CNode* pnode = FindNode((CService)addrConnect); if (pnode) { - if (nTimeout != 0) - pnode->AddRef(nTimeout); - else - pnode->AddRef(); + pnode->AddRef(); return pnode; } } @@ -481,7 +490,6 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) if (fDebug) { printf("ConnectNode(): pszDest: %s\n", pszDest); } - /// debug print printf("trying connection %s lastseen=%.1fhrs\n", @@ -490,10 +498,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) // Connect SOCKET hSocket; - if (pszDest ? - ConnectSocketByName(addrConnect, hSocket, - pszDest, GetDefaultPort()) : - ConnectSocket(addrConnect, hSocket)) + if (pszDest ? ConnectSocketByName(addrConnect, hSocket, pszDest, GetDefaultPort()) : ConnectSocket(addrConnect, hSocket)) { addrman.Attempt(addrConnect); @@ -512,10 +517,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) // Add node CNode* pnode = new CNode(hSocket, addrConnect, pszDest ? pszDest : "", false); - if (nTimeout != 0) - pnode->AddRef(nTimeout); - else - pnode->AddRef(); + pnode->AddRef(); { LOCK(cs_vNodes); @@ -539,7 +541,11 @@ void CNode::CloseSocketDisconnect() printf("disconnecting node %s\n", addrName.c_str()); closesocket(hSocket); hSocket = INVALID_SOCKET; - vRecv.clear(); + + // in case this fails, we'll empty the recv buffer when the CNode is deleted + TRY_LOCK(cs_vRecvMsg, lockRecv); + if (lockRecv) + vRecvMsg.clear(); } } @@ -551,47 +557,20 @@ void CNode::Cleanup() void CNode::PushVersion() { /// when NTP implemented, change to just nTime = GetAdjustedTime() - int64 nTime = (fInbound ? GetAdjustedTime() : GetTime()); - uint64 verification_token = 0; - if ( - !fInbound - ) { - if (!addrman.GetReconnectToken(addr, verification_token)) { - RAND_bytes((unsigned char*)&verification_token, sizeof(verification_token)); - addrman.SetVerificationToken( - addr, - verification_token - ); - } - } - - if (fDebug) { - if (addr.IsRoutable()) { - printf("PushVersion(): Address is routable (good)\n"); - } else { - printf("PushVersion(): Address not routable (bad)\n"); - } - - if (IsProxy(addr)) { - printf("PushVersion(): Address is proxy (bad)\n"); - } else { - printf("PushVersion(): Address not proxy (good)\n"); - } - } - + int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime()); CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService("0.0.0.0",0))); CAddress addrMe = GetLocalAddress(&addr); RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce)); - printf("send version message: version %d, blocks=%d, us=%s, them=%s, peer=%s, verification=%" PRI64d "\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString().c_str(), addrYou.ToString().c_str(), addr.ToString().c_str(), verification_token); + printf("send version message: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString().c_str(), addrYou.ToString().c_str(), addr.ToString().c_str()); PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe, - verification_token, nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector()), nBestHeight); + nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector()), nBestHeight); } -std::map CNode::setBanned; +std::map CNode::setBanned; CCriticalSection CNode::cs_setBanned; void CNode::ClearBanned() @@ -604,10 +583,10 @@ bool CNode::IsBanned(CNetAddr ip) bool fResult = false; { LOCK(cs_setBanned); - std::map::iterator i = setBanned.find(ip); + std::map::iterator i = setBanned.find(ip); if (i != setBanned.end()) { - int64 t = (*i).second; + int64_t t = (*i).second; if (GetTime() < t) fResult = true; } @@ -615,8 +594,6 @@ bool CNode::IsBanned(CNetAddr ip) return fResult; } -extern CMedianFilter cPeerBlockCounts; - bool CNode::Misbehaving(int howmuch) { if (addr.IsLocal()) @@ -628,7 +605,7 @@ bool CNode::Misbehaving(int howmuch) nMisbehavior += howmuch; if (nMisbehavior >= GetArg("-banscore", 100)) { - int64 banTime = GetTime()+GetArg("-bantime", 60*60*24); // Default 24-hour ban + int64_t 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); @@ -636,9 +613,6 @@ bool CNode::Misbehaving(int howmuch) setBanned[addr] = banTime; } CloseSocketDisconnect(); - - cPeerBlockCounts.removeLast(nStartingHeight); // remove this node's reported number of blocks - return true; } else printf("Misbehaving: %s (%d -> %d)\n", addr.ToString().c_str(), nMisbehavior-howmuch, nMisbehavior); @@ -652,23 +626,158 @@ void CNode::copyStats(CNodeStats &stats) X(nServices); X(nLastSend); X(nLastRecv); + X(nSendBytes); + X(nRecvBytes); X(nTimeConnected); X(addrName); X(nVersion); - X(cleanSubVer); + X(strSubVer); X(fInbound); - X(nReleaseTime); X(nStartingHeight); X(nMisbehavior); } #undef X +// requires LOCK(cs_vRecvMsg) +bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes) +{ + while (nBytes > 0) { + + // get current incomplete message, or create a new one + if (vRecvMsg.empty() || + vRecvMsg.back().complete()) + vRecvMsg.push_back(CNetMessage(SER_NETWORK, nRecvVersion)); + + CNetMessage& msg = vRecvMsg.back(); + + // absorb network data + int handled; + if (!msg.in_data) + handled = msg.readHeader(pch, nBytes); + else + handled = msg.readData(pch, nBytes); + + if (handled < 0) + return false; + + pch += handled; + nBytes -= handled; + + if (msg.complete()) + msg.nTime = GetTimeMicros(); + } + + return true; +} + +int CNetMessage::readHeader(const char *pch, unsigned int nBytes) +{ + // copy data to temporary parsing buffer + unsigned int nRemaining = 24 - nHdrPos; + unsigned int nCopy = std::min(nRemaining, nBytes); + + memcpy(&hdrbuf[nHdrPos], pch, nCopy); + nHdrPos += nCopy; + + // if header incomplete, exit + if (nHdrPos < 24) + return nCopy; + + // deserialize to CMessageHeader + try { + hdrbuf >> hdr; + } + catch (std::exception &e) { + return -1; + } + + // reject messages larger than MAX_SIZE + if (hdr.nMessageSize > MAX_SIZE) + return -1; + + // switch state to reading message data + in_data = true; + vRecv.resize(hdr.nMessageSize); + + return nCopy; +} + +int CNetMessage::readData(const char *pch, unsigned int nBytes) +{ + unsigned int nRemaining = hdr.nMessageSize - nDataPos; + unsigned int nCopy = std::min(nRemaining, nBytes); + + memcpy(&vRecv[nDataPos], pch, nCopy); + nDataPos += nCopy; + + return nCopy; +} + + + + + + + + + +// requires LOCK(cs_vSend) +void SocketSendData(CNode *pnode) +{ + std::deque::iterator it = pnode->vSendMsg.begin(); + + while (it != pnode->vSendMsg.end()) { + const CSerializeData &data = *it; + assert(data.size() > pnode->nSendOffset); + int nBytes = send(pnode->hSocket, &data[pnode->nSendOffset], data.size() - pnode->nSendOffset, MSG_NOSIGNAL | MSG_DONTWAIT); + if (nBytes > 0) { + pnode->nLastSend = GetTime(); + pnode->nSendOffset += nBytes; + + pnode->nSendBytes += nBytes; + + if (pnode->nSendOffset == data.size()) { + pnode->nSendOffset = 0; + pnode->nSendSize -= data.size(); + it++; + } else { + // could not send full message; stop sending more + break; + } + } else { + if (nBytes < 0) { + // error + int nErr = WSAGetLastError(); + if (nErr != WSAEWOULDBLOCK && nErr != WSAEMSGSIZE && nErr != WSAEINTR && nErr != WSAEINPROGRESS) + { + printf("socket send error %d\n", nErr); + pnode->CloseSocketDisconnect(); + } + } + // couldn't send anything at all + break; + } + } + + if (it == pnode->vSendMsg.end()) { + assert(pnode->nSendOffset == 0); + assert(pnode->nSendSize == 0); + } + pnode->vSendMsg.erase(pnode->vSendMsg.begin(), it); +} + + + + + + + void ThreadSocketHandler(void* parg) { // Make this thread recognisable as the networking thread - RenameThread("bitcoin-net"); + RenameThread("Triangles-net"); try { @@ -692,7 +801,7 @@ void ThreadSocketHandler2(void* parg) list vNodesDisconnected; unsigned int nPrevNodeCount = 0; - loop + while (true) { // // Disconnect nodes @@ -700,11 +809,11 @@ void ThreadSocketHandler2(void* parg) { LOCK(cs_vNodes); // Disconnect unused nodes - vector const vNodesCopy = vNodes; + vector vNodesCopy = vNodes; BOOST_FOREACH(CNode* pnode, vNodesCopy) { if (pnode->fDisconnect || - (pnode->GetRefCount() <= 0 && pnode->vRecv.empty() && pnode->vSend.empty())) + (pnode->GetRefCount() <= 0 && pnode->vRecvMsg.empty() && pnode->nSendSize == 0 && pnode->ssSend.empty())) { // remove from vNodes vNodes.erase(remove(vNodes.begin(), vNodes.end(), pnode), vNodes.end()); @@ -717,7 +826,6 @@ void ThreadSocketHandler2(void* parg) pnode->Cleanup(); // hold in disconnected pool until all refs are released - pnode->nReleaseTime = max(pnode->nReleaseTime, GetTime() + 15 * 60); if (pnode->fNetworkNode || pnode->fInbound) pnode->Release(); vNodesDisconnected.push_back(pnode); @@ -736,7 +844,7 @@ void ThreadSocketHandler2(void* parg) TRY_LOCK(pnode->cs_vSend, lockSend); if (lockSend) { - TRY_LOCK(pnode->cs_vRecv, lockRecv); + TRY_LOCK(pnode->cs_vRecvMsg, lockRecv); if (lockRecv) { TRY_LOCK(pnode->cs_mapRequests, lockReq); @@ -756,31 +864,6 @@ void ThreadSocketHandler2(void* parg) } } } - // count secured connections - int unsecured = 0; - int secured = 0; - vector vNodesUnsecure; - BOOST_FOREACH(CNode* pnode, vNodesCopy) - { - if (GetTime() - pnode->nTimeConnected < 60) { - continue; - } - if ( - !pnode->fInbound || pnode->fVerified - ) { - secured++; - } else { - unsecured++; - vNodesUnsecure.push_back(pnode); - } - } - if ( - 0 > 2 * secured - 3 * unsecured - ) { - random_shuffle(vNodesUnsecure.begin(), vNodesUnsecure.end(), GetRandInt); - printf("removing unsecured connection %s\n", (*vNodesUnsecure.begin())->addr.ToString().c_str()); - (*vNodesUnsecure.begin())->fDisconnect = true; - } } if (vNodes.size() != nPrevNodeCount) { @@ -822,7 +905,7 @@ void ThreadSocketHandler2(void* parg) have_fds = true; { TRY_LOCK(pnode->cs_vSend, lockSend); - if (lockSend && !pnode->vSend.empty()) + if (lockSend && !pnode->ssSend.empty()) FD_SET(pnode->hSocket, &fdsetSend); } } @@ -845,7 +928,7 @@ void ThreadSocketHandler2(void* parg) } FD_ZERO(&fdsetSend); FD_ZERO(&fdsetError); - Sleep(timeout.tv_usec/1000); + MilliSleep(timeout.tv_usec/1000); } @@ -884,11 +967,12 @@ void ThreadSocketHandler2(void* parg) } else if (nInbound >= GetArg("-maxconnections", 125) - MAX_OUTBOUND_CONNECTIONS) { - { - LOCK(cs_setservAddNodeAddresses); - if (!setservAddNodeAddresses.count(addr)) - closesocket(hSocket); - } + closesocket(hSocket); + } + else if (CNode::IsBanned(addr)) + { + printf("connection from %s dropped (banned)\n", addr.ToString().c_str()); + closesocket(hSocket); } else { @@ -925,15 +1009,12 @@ void ThreadSocketHandler2(void* parg) continue; if (FD_ISSET(pnode->hSocket, &fdsetRecv) || FD_ISSET(pnode->hSocket, &fdsetError)) { - TRY_LOCK(pnode->cs_vRecv, lockRecv); + TRY_LOCK(pnode->cs_vRecvMsg, lockRecv); if (lockRecv) { - CDataStream& vRecv = pnode->vRecv; - unsigned int nPos = vRecv.size(); - - if (nPos > ReceiveBufferSize()) { + if (pnode->GetTotalRecvSize() > ReceiveFloodSize()) { if (!pnode->fDisconnect) - printf("socket recv flood control disconnect (%"PRIszu" bytes)\n", vRecv.size()); + printf("socket recv flood control disconnect (%u bytes)\n", pnode->GetTotalRecvSize()); pnode->CloseSocketDisconnect(); } else { @@ -942,9 +1023,10 @@ void ThreadSocketHandler2(void* parg) int nBytes = recv(pnode->hSocket, pchBuf, sizeof(pchBuf), MSG_DONTWAIT); if (nBytes > 0) { - vRecv.resize(nPos + nBytes); - memcpy(&vRecv[nPos], pchBuf, nBytes); + if (!pnode->ReceiveMsgBytes(pchBuf, nBytes)) + pnode->CloseSocketDisconnect(); pnode->nLastRecv = GetTime(); + pnode->nRecvBytes += nBytes; } else if (nBytes == 0) { @@ -977,36 +1059,14 @@ void ThreadSocketHandler2(void* parg) { TRY_LOCK(pnode->cs_vSend, lockSend); if (lockSend) - { - CDataStream& vSend = pnode->vSend; - if (!vSend.empty()) - { - int nBytes = send(pnode->hSocket, &vSend[0], vSend.size(), MSG_NOSIGNAL | MSG_DONTWAIT); - if (nBytes > 0) - { - vSend.erase(vSend.begin(), vSend.begin() + nBytes); - pnode->nLastSend = GetTime(); - } - else if (nBytes < 0) - { - // error - int nErr = WSAGetLastError(); - if (nErr != WSAEWOULDBLOCK && nErr != WSAEMSGSIZE && nErr != WSAEINTR && nErr != WSAEINPROGRESS) - { - printf("socket send error %d\n", nErr); - pnode->CloseSocketDisconnect(); - } - } - } - } + SocketSendData(pnode); } // // Inactivity checking // - if (pnode->vSend.empty()) - pnode->nLastSendEmpty = GetTime(); - if (GetTime() - pnode->nTimeConnected > 60) + int64_t nTime = GetTime(); + if (nTime - pnode->nTimeConnected > 60) { if (pnode->nLastRecv == 0 || pnode->nLastSend == 0) { @@ -1031,7 +1091,7 @@ void ThreadSocketHandler2(void* parg) pnode->Release(); } - Sleep(10); + MilliSleep(10); } } @@ -1047,9 +1107,7 @@ void ThreadSocketHandler2(void* parg) void ThreadMapPort(void* parg) { // Make this thread recognisable as the UPnP thread - RenameThread("bitcoin-UPnP"); - - printf("ThreadMapPort started\n"); + RenameThread("Triangles-UPnP"); try { @@ -1069,7 +1127,7 @@ void ThreadMapPort(void* parg) void ThreadMapPort2(void* parg) { - printf("ThreadMapPort2 started\n"); + printf("ThreadMapPort started\n"); std::string port = strprintf("%u", GetListenPort()); const char * multicastif = 0; @@ -1093,8 +1151,24 @@ void ThreadMapPort2(void* parg) r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr)); if (r == 1) { + //if (fDiscover) { + char externalIPAddress[40]; + r = UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIPAddress); + if(r != UPNPCOMMAND_SUCCESS) + printf("UPnP: GetExternalIPAddress() returned %d\n", r); + else + { + if(externalIPAddress[0]) + { + printf("UPnP: ExternalIPAddress = %s\n", externalIPAddress); + AddLocal(CNetAddr(externalIPAddress), LOCAL_UPNP); + } + else + printf("UPnP: GetExternalIPAddress failed.\n"); + } + //} - string strDesc = "triangles " + FormatFullVersion(); + string strDesc = "Triangles " + FormatFullVersion(); #ifndef UPNPDISCOVER_SUCCESS /* miniupnpc 1.5 */ r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, @@ -1111,7 +1185,8 @@ void ThreadMapPort2(void* parg) else printf("UPnP Port Mapping successful.\n"); int i = 1; - loop { + while (true) + { if (fShutdown || !fUseUPnP) { r = UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, port.c_str(), "TCP", 0); @@ -1138,7 +1213,7 @@ void ThreadMapPort2(void* parg) else printf("UPnP Port Mapping successful.\n");; } - Sleep(2000); + MilliSleep(2000); i++; } } else { @@ -1146,16 +1221,17 @@ void ThreadMapPort2(void* parg) freeUPNPDevlist(devlist); devlist = 0; if (r != 0) FreeUPNPUrls(&urls); - loop { + while (true) + { if (fShutdown || !fUseUPnP) return; - Sleep(2000); + MilliSleep(2000); } } printf("ThreadMapPort2 exited\n"); } -void MapPort(bool fUseUPnP) +void MapPort() { printf("MapPort()...\n"); if (fUseUPnP && vnThreadsRunning[THREAD_UPNP] < 1) @@ -1172,18 +1248,79 @@ void MapPort() #endif + + + void ThreadOnionSeed(void* parg) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + + // Make this thread recognisable as the tor thread - RenameThread("onionseed"); + RenameThread("Triangles-onionseed"); + + + + + + + + + + + + + static const char *(*strOnionSeed)[1] = fTestNet ? strTestNetOnionSeed : strMainNetOnionSeed; + int found = 0; printf("Loading addresses from .onion seeds\n"); + + + + for (unsigned int seed_idx = 0; strOnionSeed[seed_idx][0] != NULL; seed_idx++) { CNetAddr parsed; if ( @@ -1193,11 +1330,17 @@ void ThreadOnionSeed(void* parg) ) { throw runtime_error("ThreadOnionSeed() : invalid .onion seed"); } + int nOneDay = 24*3600; CAddress addr = CAddress(CService(parsed, GetDefaultPort())); addr.nTime = GetTime() - 3*nOneDay - GetRand(4*nOneDay); // use a random age between 3 and 7 days old + found++; addrman.Add(addr, parsed); + + + + } printf("%d addresses found from .onion seeds\n", found); @@ -1205,18 +1348,25 @@ void ThreadOnionSeed(void* parg) -unsigned int pnSeed[] = -{ -}; + + + + + + + + + +unsigned int pnSeed[] = {}; void DumpAddresses() { - int64 nStart = GetTimeMillis(); + int64_t nStart = GetTimeMillis(); CAddrDB adb; adb.Write(addrman); - printf("Flushed %d addresses to peers.dat %"PRI64d"ms\n", + printf("Flushed %d addresses to peers.dat %"PRId64"ms\n", addrman.size(), GetTimeMillis() - nStart); } @@ -1227,7 +1377,7 @@ void ThreadDumpAddress2(void* parg) { DumpAddresses(); vnThreadsRunning[THREAD_DUMPADDRESS]--; - Sleep(100000); + MilliSleep(600000); vnThreadsRunning[THREAD_DUMPADDRESS]++; } vnThreadsRunning[THREAD_DUMPADDRESS]--; @@ -1236,7 +1386,7 @@ void ThreadDumpAddress2(void* parg) void ThreadDumpAddress(void* parg) { // Make this thread recognisable as the address dumping thread - RenameThread("bitcoin-adrdump"); + RenameThread("Triangles-adrdump"); try { @@ -1251,7 +1401,7 @@ void ThreadDumpAddress(void* parg) void ThreadOpenConnections(void* parg) { // Make this thread recognisable as the connection opening thread - RenameThread("bitcoin-opencon"); + RenameThread("Triangles-opencon"); try { @@ -1287,25 +1437,25 @@ void static ProcessOneShot() } } -// triangles: stake minter thread -void static ThreadStakeMinter(void* parg) +// triangles: stake miner thread +void static ThreadStakeMiner(void* parg) { - printf("ThreadStakeMinter started\n"); + printf("ThreadStakeMiner started\n"); CWallet* pwallet = (CWallet*)parg; try { - vnThreadsRunning[THREAD_STAKER]++; - BitcoinMiner(pwallet, true); - vnThreadsRunning[THREAD_STAKER]--; + vnThreadsRunning[THREAD_STAKE_MINER]++; + StakeMiner(pwallet); + vnThreadsRunning[THREAD_STAKE_MINER]--; } catch (std::exception& e) { - vnThreadsRunning[THREAD_STAKER]--; - PrintException(&e, "ThreadStakeMinter()"); + vnThreadsRunning[THREAD_STAKE_MINER]--; + PrintException(&e, "ThreadStakeMiner()"); } catch (...) { - vnThreadsRunning[THREAD_STAKER]--; - PrintException(NULL, "ThreadStakeMinter()"); + vnThreadsRunning[THREAD_STAKE_MINER]--; + PrintException(NULL, "ThreadStakeMiner()"); } - printf("ThreadStakeMinter exiting, %d threads remaining\n", vnThreadsRunning[THREAD_STAKER]); + printf("ThreadStakeMiner exiting, %d threads remaining\n", vnThreadsRunning[THREAD_STAKE_MINER]); } void ThreadOpenConnections2(void* parg) @@ -1315,7 +1465,7 @@ void ThreadOpenConnections2(void* parg) // Connect to specific addresses if (mapArgs.count("-connect") && mapMultiArgs["-connect"].size() > 0) { - for (int64 nLoop = 0;; nLoop++) + for (int64_t nLoop = 0;; nLoop++) { ProcessOneShot(); BOOST_FOREACH(string strAddr, mapMultiArgs["-connect"]) @@ -1324,23 +1474,23 @@ void ThreadOpenConnections2(void* parg) OpenNetworkConnection(addr, NULL, strAddr.c_str()); for (int i = 0; i < 10 && i < nLoop; i++) { - Sleep(500); + MilliSleep(500); if (fShutdown) return; } } - Sleep(500); + MilliSleep(500); } } // Initiate network connections - int64 nStart = GetTime(); - loop + int64_t nStart = GetTime(); + while (true) { ProcessOneShot(); vnThreadsRunning[THREAD_OPENCONNECTIONS]--; - Sleep(500); + MilliSleep(500); vnThreadsRunning[THREAD_OPENCONNECTIONS]++; if (fShutdown) return; @@ -1362,7 +1512,7 @@ void ThreadOpenConnections2(void* parg) // it'll get a pile of addresses with newer timestamps. // Seed nodes are given a random 'last seen time' of between one and two // weeks ago. - const int64 nOneWeek = 7*24*60*60; + const int64_t nOneWeek = 7*24*60*60; struct in_addr ip; memcpy(&ip, &pnSeed[i], sizeof(ip)); CAddress addr(CService(ip, GetDefaultPort())); @@ -1391,10 +1541,10 @@ void ThreadOpenConnections2(void* parg) } } - int64 nANow = GetAdjustedTime(); + int64_t nANow = GetAdjustedTime(); int nTries = 0; - loop + while (true) { // use an nUnkBias between 10 (no outgoing connections) and 90 (8 outgoing connections) CAddress addr = addrman.Select(10 + min(nOutbound,8)*10); @@ -1433,9 +1583,7 @@ void ThreadOpenConnections2(void* parg) void ThreadOpenAddedConnections(void* parg) { // Make this thread recognisable as the connection opening thread - RenameThread("bitcoin-opencon"); - - printf("ThreadOpenAddedConnections started\n"); + RenameThread("Triangles-opencon"); try { @@ -1455,7 +1603,7 @@ void ThreadOpenAddedConnections(void* parg) void ThreadOpenAddedConnections2(void* parg) { - printf("ThreadOpenAddedConnections2 started\n"); + printf("ThreadOpenAddedConnections started\n"); if (mapArgs.count("-addnode") == 0) return; @@ -1466,10 +1614,10 @@ void ThreadOpenAddedConnections2(void* parg) CAddress addr; CSemaphoreGrant grant(*semOutbound); OpenNetworkConnection(addr, &grant, strAddNode.c_str()); - Sleep(500); + MilliSleep(500); } vnThreadsRunning[THREAD_ADDEDCONNECTIONS]--; - Sleep(120000); // Retry every 2 minutes + MilliSleep(120000); // Retry every 2 minutes vnThreadsRunning[THREAD_ADDEDCONNECTIONS]++; } return; @@ -1489,7 +1637,7 @@ void ThreadOpenAddedConnections2(void* parg) } } } - loop + while (true) { vector > vservConnectAddresses = vservAddressesToAdd; // Attempt to connect to each IP for each addnode entry until at least one is successful per addnode entry @@ -1510,19 +1658,19 @@ void ThreadOpenAddedConnections2(void* parg) { CSemaphoreGrant grant(*semOutbound); OpenNetworkConnection(CAddress(*(vserv.begin())), &grant); - Sleep(500); + MilliSleep(500); if (fShutdown) return; } if (fShutdown) return; vnThreadsRunning[THREAD_ADDEDCONNECTIONS]--; - Sleep(120000); // Retry every 2 minutes + MilliSleep(120000); // Retry every 2 minutes vnThreadsRunning[THREAD_ADDEDCONNECTIONS]++; if (fShutdown) return; } - printf("ThreadOpenAddedConnections2 exited\n"); + printf("ThreadOpenAddedConnections exited\n"); } // if successful, this moves the passed grant to the constructed node @@ -1567,9 +1715,7 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu void ThreadMessageHandler(void* parg) { // Make this thread recognisable as the message handling thread - RenameThread("bitcoin-msghand"); - - printf("ThreadMessageHandler started\n"); + RenameThread("Triangles-msghand"); try { @@ -1589,7 +1735,7 @@ void ThreadMessageHandler(void* parg) void ThreadMessageHandler2(void* parg) { - printf("ThreadMessageHandler2 started\n"); + printf("ThreadMessageHandler started\n"); SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL); while (!fShutdown) { @@ -1609,9 +1755,10 @@ void ThreadMessageHandler2(void* parg) { // Receive messages { - TRY_LOCK(pnode->cs_vRecv, lockRecv); + TRY_LOCK(pnode->cs_vRecvMsg, lockRecv); if (lockRecv) - ProcessMessages(pnode); + if (!ProcessMessages(pnode)) + pnode->CloseSocketDisconnect(); } if (fShutdown) return; @@ -1636,14 +1783,14 @@ void ThreadMessageHandler2(void* parg) // Reduce vnThreadsRunning so StopNode has permission to exit while // we're sleeping, but we must always check fShutdown after doing this. vnThreadsRunning[THREAD_MESSAGEHANDLER]--; - Sleep(100); + MilliSleep(100); if (fRequestShutdown) StartShutdown(); vnThreadsRunning[THREAD_MESSAGEHANDLER]++; if (fShutdown) return; } - printf("ThreadMessageHandler2 exited\n"); + printf("ThreadMessageHandler exited\n"); } @@ -1738,7 +1885,7 @@ bool BindListenPort(const CService &addrBind, string& strError) { int nErr = WSAGetLastError(); if (nErr == WSAEADDRINUSE) - strError = strprintf(_("Unable to bind to %s on this computer. triangles is probably already running."), addrBind.ToString().c_str()); + strError = strprintf(_("Unable to bind to %s on this computer. Triangles is probably already running."), addrBind.ToString().c_str()); else strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %d, %s)"), addrBind.ToString().c_str(), nErr, strerror(nErr)); printf("%s\n", strError.c_str()); @@ -1756,16 +1903,38 @@ bool BindListenPort(const CService &addrBind, string& strError) vhListenSocket.push_back(hListenSocket); + //if (addrBind.IsRoutable() && fDiscover) + // AddLocal(addrBind, LOCAL_BIND); + return true; } void static Discover() + + + + + + + + + + + + + { // no network discovery + + + + + + } static void run_tor() { - printf("TOR thread started.\n"); + printf("Onion thread started.\n"); std::string logDecl = "notice file " + GetDataDir().string() + "/tor/tor.log"; char *argvLogDecl = (char*) logDecl.c_str(); @@ -1782,26 +1951,46 @@ static void run_tor() { void StartTor(void* parg) + + + + + + + + + { // Make this thread recognisable as the tor thread - RenameThread("onion"); - + RenameThread("Triangles-onion"); + printf("Onion thread started."); try + + + { run_tor(); + + + + + } catch (std::exception& e) { PrintException(&e, "StartTor()"); } + + printf("Onion thread exited."); + } void StartNode(void* parg) { // Make this thread recognisable as the startup thread - RenameThread("bitcoin-start"); + RenameThread("Triangles-start"); if (semOutbound == NULL) { // initialize semaphore @@ -1826,11 +2015,11 @@ void StartNode(void* parg) printf(".onion seeding disabled\n"); else if (!NewThread(ThreadOnionSeed, NULL)) - printf("Error: could not start .onion seeding\n"); + printf("Error: NewThread(ThreadOnionSeed) failed\n"); // Map ports with UPnP (default) if (fUseUPnP) - MapPort(fUseUPnP); + MapPort(); // Get addresses from IRC and advertise ours //if (!NewThread(ThreadIRCSeed, NULL)) @@ -1856,28 +2045,20 @@ void StartNode(void* parg) if (!NewThread(ThreadDumpAddress, NULL)) printf("Error; NewThread(ThreadDumpAddress) failed\n"); - - // make sure conf allows it (stake=0 in conf) - if (GetBoolArg("-stake", true)) { - printf("Stake minting enabled at startup.\n"); - if (!NewThread(ThreadStakeMinter, pwalletMain)) - printf("Error: NewThread(ThreadStakeMinter) failed\n"); - } else { - printf("Stake minting disabled at startup (stake=0).\n"); - } - - // Generate coins in the background - GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain); + // Mine proof-of-stake blocks in the background + if (!GetBoolArg("-stake", true)) + printf("Staking disabled at startup (stake=0).\n"); + else + if (!NewThread(ThreadStakeMiner, pwalletMain)) + printf("Error: NewThread(ThreadStakeMiner) failed\n"); } - - bool StopNode() { printf("StopNode()\n"); fShutdown = true; nTransactionsUpdated++; - int64 nStart = GetTime(); + int64_t nStart = GetTime(); if (semOutbound) for (int i=0; ipost(); @@ -1890,12 +2071,11 @@ bool StopNode() break; if (GetTime() - nStart > 20) break; - Sleep(20); + MilliSleep(20); } while(true); if (vnThreadsRunning[THREAD_SOCKETHANDLER] > 0) printf("ThreadSocketHandler still running\n"); if (vnThreadsRunning[THREAD_OPENCONNECTIONS] > 0) printf("ThreadOpenConnections still running\n"); if (vnThreadsRunning[THREAD_MESSAGEHANDLER] > 0) printf("ThreadMessageHandler still running\n"); - if (vnThreadsRunning[THREAD_MINER] > 0) printf("ThreadBitcoinMiner still running\n"); if (vnThreadsRunning[THREAD_RPCLISTENER] > 0) printf("ThreadRPCListener still running\n"); if (vnThreadsRunning[THREAD_RPCHANDLER] > 0) printf("ThreadsRPCServer still running\n"); #ifdef USE_UPNP @@ -1904,10 +2084,10 @@ bool StopNode() if (vnThreadsRunning[THREAD_DNSSEED] > 0) printf("ThreadDNSAddressSeed still running\n"); if (vnThreadsRunning[THREAD_ADDEDCONNECTIONS] > 0) printf("ThreadOpenAddedConnections still running\n"); if (vnThreadsRunning[THREAD_DUMPADDRESS] > 0) printf("ThreadDumpAddresses still running\n"); - if (vnThreadsRunning[THREAD_STAKER] > 0) printf("ThreadStakeMinter still running\n"); + if (vnThreadsRunning[THREAD_STAKE_MINER] > 0) printf("ThreadStakeMiner still running\n"); while (vnThreadsRunning[THREAD_MESSAGEHANDLER] > 0 || vnThreadsRunning[THREAD_RPCHANDLER] > 0) - Sleep(20); - Sleep(50); + MilliSleep(20); + MilliSleep(50); DumpAddresses(); return true; } @@ -1936,3 +2116,32 @@ public: } } instance_of_cnetcleanup; + +void RelayTransaction(const CTransaction& tx, const uint256& hash) +{ + CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); + ss.reserve(10000); + ss << tx; + RelayTransaction(tx, hash, ss); +} + +void RelayTransaction(const CTransaction& tx, const uint256& hash, const CDataStream& ss) +{ + CInv inv(MSG_TX, hash); + { + LOCK(cs_mapRelay); + // Expire old relay messages + while (!vRelayExpiration.empty() && vRelayExpiration.front().first < GetTime()) + { + mapRelay.erase(vRelayExpiration.front().second); + vRelayExpiration.pop_front(); + } + + // Save original serialized message so newer versions are preserved + mapRelay.insert(std::make_pair(inv, ss)); + vRelayExpiration.push_back(std::make_pair(GetTime() + 15 * 60, inv)); + } + + RelayInventory(inv); +} + diff --git a/src/net.h b/src/net.h index 6fb0f9f..88bd403 100644 --- a/src/net.h +++ b/src/net.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_NET_H -#define BITCOIN_NET_H +#ifndef TRIANGLES_NET_H +#define TRIANGLES_NET_H #include #include @@ -25,7 +25,8 @@ class CBlockIndex; extern int nBestHeight; -inline unsigned int ReceiveBufferSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); } + +inline unsigned int ReceiveFloodSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); } inline unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 1*1000); } void AddOneShot(std::string strDest); @@ -34,13 +35,14 @@ bool GetMyExternalIP(CNetAddr& ipRet); void AddressCurrentlyConnected(const CService& addr); CNode* FindNode(const CNetAddr& ip); CNode* FindNode(const CService& ip); -CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL, int64 nTimeout=0); -void MapPort(bool fUseUPnP); +CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL); +void MapPort(); unsigned short GetListenPort(); bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string())); void StartNode(void* parg); void StartTor(void* parg); bool StopNode(); +void SocketSendData(CNode *pnode); enum { @@ -99,21 +101,22 @@ enum threadId THREAD_SOCKETHANDLER, THREAD_OPENCONNECTIONS, THREAD_MESSAGEHANDLER, - THREAD_MINER, THREAD_RPCLISTENER, THREAD_UPNP, THREAD_DNSSEED, THREAD_ADDEDCONNECTIONS, THREAD_DUMPADDRESS, THREAD_RPCHANDLER, - THREAD_STAKER, + THREAD_STAKE_MINER, THREAD_MAX }; extern bool fClient; -extern uint64 nLocalServices; -extern uint64 nLocalHostNonce; +extern bool fDiscover; +extern bool fUseUPnP; +extern uint64_t nLocalServices; +extern uint64_t nLocalHostNonce; extern CAddress addrSeenByPeer; extern boost::array vnThreadsRunning; extern CAddrMan addrman; @@ -121,9 +124,9 @@ extern CAddrMan addrman; extern std::vector vNodes; extern CCriticalSection cs_vNodes; extern std::map mapRelay; -extern std::deque > vRelayExpiration; +extern std::deque > vRelayExpiration; extern CCriticalSection cs_mapRelay; -extern std::map mapAlreadyAskedFor; +extern std::map mapAlreadyAskedFor; @@ -131,15 +134,16 @@ extern std::map mapAlreadyAskedFor; class CNodeStats { public: - uint64 nServices; - int64 nLastSend; - int64 nLastRecv; - int64 nTimeConnected; + uint64_t nServices; + int64_t nLastSend; + int64_t nLastRecv; + uint64_t nSendBytes; + uint64_t nRecvBytes; + int64_t nTimeConnected; std::string addrName; int nVersion; - std::string cleanSubVer; + std::string strSubVer; bool fInbound; - int64 nReleaseTime; int nStartingHeight; int nMisbehavior; }; @@ -147,52 +151,118 @@ public: +class CNetMessage { +public: + bool in_data; // parsing header (false) or data (true) + + CDataStream hdrbuf; // partially received header + CMessageHeader hdr; // complete header + unsigned int nHdrPos; + + CDataStream vRecv; // received message data + unsigned int nDataPos; + + int64_t nTime; // time (in microseconds) of message receipt. + + CNetMessage(int nTypeIn, int nVersionIn) : hdrbuf(nTypeIn, nVersionIn), vRecv(nTypeIn, nVersionIn) { + hdrbuf.resize(24); + in_data = false; + nHdrPos = 0; + nDataPos = 0; + nTime = 0; + } + + bool complete() const + { + if (!in_data) + return false; + return (hdr.nMessageSize == nDataPos); + } + + void SetVersion(int nVersionIn) + { + hdrbuf.SetVersion(nVersionIn); + vRecv.SetVersion(nVersionIn); + } + + int readHeader(const char *pch, unsigned int nBytes); + int readData(const char *pch, unsigned int nBytes); +}; + + + + +class SecMsgNode +{ +public: + SecMsgNode() + { + lastSeen = 0; + lastMatched = 0; + ignoreUntil = 0; + nWakeCounter = 0; + nPeerId = 0; + fEnabled = false; + }; + + ~SecMsgNode() {}; + + int64_t lastSeen; + int64_t lastMatched; + int64_t ignoreUntil; + uint32_t nWakeCounter; + uint32_t nPeerId; + bool fEnabled; + +}; /** Information about a peer */ class CNode { public: // socket - uint64 nServices; + uint64_t nServices; SOCKET hSocket; - CDataStream vSend; - CDataStream vRecv; + CDataStream ssSend; + size_t nSendSize; // total size of all vSendMsg entries + size_t nSendOffset; // offset inside the first vSendMsg already sent + std::deque vSendMsg; CCriticalSection cs_vSend; - CCriticalSection cs_vRecv; - int64 nLastSend; - int64 nLastRecv; - int64 nLastSendEmpty; - int64 nTimeConnected; - int nHeaderStart; - unsigned int nMessageStart; + + std::deque vRecvMsg; + CCriticalSection cs_vRecvMsg; + int nRecvVersion; + + int64_t nLastSend; + int64_t nLastRecv; + + uint64_t nSendBytes; + uint64_t nRecvBytes; + + int64_t nLastSendEmpty; + int64_t nTimeConnected; CAddress addr; std::string addrName; CService addrLocal; int nVersion; - // strSubVer is whatever byte array we read from the wire. However, this field is intended - // to be printed out, displayed to humans in various forms and so on. So we sanitize it and - // store the sanitized version in cleanSubVer. The original should be used when dealing with - // the network or wire types and the cleaned string used when displayed or logged. - std::string strSubVer, cleanSubVer; + std::string strSubVer; bool fOneShot; bool fClient; bool fInbound; - bool fVerified; bool fNetworkNode; bool fSuccessfullyConnected; bool fDisconnect; CSemaphoreGrant grantOutbound; -protected: int nRefCount; +protected: // Denial-of-service detection/prevention // Key is IP address, value is banned-until-time - static std::map setBanned; + static std::map setBanned; static CCriticalSection cs_setBanned; int nMisbehavior; public: - int64 nReleaseTime; std::map mapRequests; CCriticalSection cs_mapRequests; uint256 hashContinue; @@ -202,7 +272,7 @@ public: // flood relay std::vector vAddrToSend; - std::set setAddrKnown; + mruset setAddrKnown; bool fGetAddr; std::set setKnown; uint256 hashCheckpointKnown; // triangles: known sent sync-checkpoint @@ -211,18 +281,21 @@ public: mruset setInventoryKnown; std::vector vInventoryToSend; CCriticalSection cs_inventory; - std::multimap mapAskFor; + std::multimap mapAskFor; - CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn = "", bool fInboundIn=false) : vSend(SER_NETWORK, MIN_PROTO_VERSION), vRecv(SER_NETWORK, MIN_PROTO_VERSION) + SecMsgNode smsgData; + + CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn = "", bool fInboundIn=false) : ssSend(SER_NETWORK, INIT_PROTO_VERSION), setAddrKnown(5000) { nServices = 0; hSocket = hSocketIn; + nRecvVersion = INIT_PROTO_VERSION; nLastSend = 0; nLastRecv = 0; + nSendBytes = 0; + nRecvBytes = 0; nLastSendEmpty = GetTime(); nTimeConnected = GetTime(); - nHeaderStart = -1; - nMessageStart = -1; addr = addrIn; addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn; nVersion = 0; @@ -230,12 +303,12 @@ public: fOneShot = false; fClient = false; // set by version message fInbound = fInboundIn; - fVerified = false; fNetworkNode = false; fSuccessfullyConnected = false; fDisconnect = false; nRefCount = 0; - nReleaseTime = 0; + nSendSize = 0; + nSendOffset = 0; hashContinue = 0; pindexLastGetBlocksBegin = 0; hashLastGetBlocksEnd = 0; @@ -246,7 +319,7 @@ public: setInventoryKnown.max_size(SendBufferSize() / 1000); // Be shy and don't send version until we hear - if (!fInbound) + if (hSocket != INVALID_SOCKET && !fInbound) printf("CNode(): pfrom-addr %s\n", addrName.c_str()); PushVersion(); } @@ -268,15 +341,33 @@ public: int GetRefCount() { - return std::max(nRefCount, 0) + (GetTime() < nReleaseTime ? 1 : 0); + assert(nRefCount >= 0); + return nRefCount; } - CNode* AddRef(int64 nTimeout=0) + // requires LOCK(cs_vRecvMsg) + unsigned int GetTotalRecvSize() { - if (nTimeout != 0) - nReleaseTime = std::max(nReleaseTime, GetTime() + nTimeout); - else - nRefCount++; + unsigned int total = 0; + BOOST_FOREACH(const CNetMessage &msg, vRecvMsg) + total += msg.vRecv.size() + 24; + return total; + } + + // requires LOCK(cs_vRecvMsg) + bool ReceiveMsgBytes(const char *pch, unsigned int nBytes); + + // requires LOCK(cs_vRecvMsg) + void SetRecvVersion(int nVersionIn) + { + nRecvVersion = nVersionIn; + BOOST_FOREACH(CNetMessage &msg, vRecvMsg) + msg.SetVersion(nVersionIn); + } + + CNode* AddRef() + { + nRefCount++; return this; } @@ -323,13 +414,13 @@ public: { // We're using mapAskFor as a priority queue, // the key is the earliest time the request can be sent - int64& nRequestTime = mapAlreadyAskedFor[inv]; + int64_t& nRequestTime = mapAlreadyAskedFor[inv]; if (fDebugNet) - printf("askfor %s %"PRI64d" (%s)\n", inv.ToString().c_str(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str()); + printf("askfor %s %"PRId64" (%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; - static int64 nLastTime; + int64_t nNow = (GetTime() - 1) * 1000000; + static int64_t nLastTime; ++nLastTime; nNow = std::max(nNow, nLastTime); nLastTime = nNow; @@ -344,22 +435,16 @@ public: void BeginMessage(const char* pszCommand) { ENTER_CRITICAL_SECTION(cs_vSend); - if (nHeaderStart != -1) - AbortMessage(); - nHeaderStart = vSend.size(); - vSend << CMessageHeader(pszCommand, 0); - nMessageStart = vSend.size(); + assert(ssSend.size() == 0); + ssSend << CMessageHeader(pszCommand, 0); if (fDebug) printf("sending: %s ", pszCommand); } void AbortMessage() { - if (nHeaderStart < 0) - return; - vSend.resize(nHeaderStart); - nHeaderStart = -1; - nMessageStart = -1; + ssSend.clear(); + LEAVE_CRITICAL_SECTION(cs_vSend); if (fDebug) @@ -375,42 +460,35 @@ public: return; } - if (nHeaderStart < 0) + if (ssSend.size() == 0) return; // Set the size - unsigned int nSize = vSend.size() - nMessageStart; - memcpy((char*)&vSend[nHeaderStart] + CMessageHeader::MESSAGE_SIZE_OFFSET, &nSize, sizeof(nSize)); + unsigned int nSize = ssSend.size() - CMessageHeader::HEADER_SIZE; + memcpy((char*)&ssSend[CMessageHeader::MESSAGE_SIZE_OFFSET], &nSize, sizeof(nSize)); // Set the checksum - uint256 hash = Hash(vSend.begin() + nMessageStart, vSend.end()); + uint256 hash = Hash(ssSend.begin() + CMessageHeader::HEADER_SIZE, ssSend.end()); unsigned int nChecksum = 0; memcpy(&nChecksum, &hash, sizeof(nChecksum)); - assert(nMessageStart - nHeaderStart >= CMessageHeader::CHECKSUM_OFFSET + sizeof(nChecksum)); - memcpy((char*)&vSend[nHeaderStart] + CMessageHeader::CHECKSUM_OFFSET, &nChecksum, sizeof(nChecksum)); + assert(ssSend.size () >= CMessageHeader::CHECKSUM_OFFSET + sizeof(nChecksum)); + memcpy((char*)&ssSend[CMessageHeader::CHECKSUM_OFFSET], &nChecksum, sizeof(nChecksum)); if (fDebug) { printf("(%d bytes)\n", nSize); } - nHeaderStart = -1; - nMessageStart = -1; + std::deque::iterator it = vSendMsg.insert(vSendMsg.end(), CSerializeData()); + ssSend.GetAndClear(*it); + nSendSize += (*it).size(); + + // If write queue empty, attempt "optimistic write" + if (it == vSendMsg.begin()) + SocketSendData(this); + LEAVE_CRITICAL_SECTION(cs_vSend); } - void EndMessageAbortIfEmpty() - { - if (nHeaderStart < 0) - return; - int nSize = vSend.size() - nMessageStart; - if (nSize > 0) - EndMessage(); - else - AbortMessage(); - } - - - void PushVersion(); @@ -434,7 +512,7 @@ public: try { BeginMessage(pszCommand); - vSend << a1; + ssSend << a1; EndMessage(); } catch (...) @@ -450,7 +528,7 @@ public: try { BeginMessage(pszCommand); - vSend << a1 << a2; + ssSend << a1 << a2; EndMessage(); } catch (...) @@ -466,7 +544,7 @@ public: try { BeginMessage(pszCommand); - vSend << a1 << a2 << a3; + ssSend << a1 << a2 << a3; EndMessage(); } catch (...) @@ -482,7 +560,7 @@ public: try { BeginMessage(pszCommand); - vSend << a1 << a2 << a3 << a4; + ssSend << a1 << a2 << a3 << a4; EndMessage(); } catch (...) @@ -498,7 +576,7 @@ public: try { BeginMessage(pszCommand); - vSend << a1 << a2 << a3 << a4 << a5; + ssSend << a1 << a2 << a3 << a4 << a5; EndMessage(); } catch (...) @@ -514,7 +592,7 @@ public: try { BeginMessage(pszCommand); - vSend << a1 << a2 << a3 << a4 << a5 << a6; + ssSend << a1 << a2 << a3 << a4 << a5 << a6; EndMessage(); } catch (...) @@ -530,7 +608,7 @@ public: try { BeginMessage(pszCommand); - vSend << a1 << a2 << a3 << a4 << a5 << a6 << a7; + ssSend << a1 << a2 << a3 << a4 << a5 << a6 << a7; EndMessage(); } catch (...) @@ -546,7 +624,7 @@ public: try { BeginMessage(pszCommand); - vSend << a1 << a2 << a3 << a4 << a5 << a6 << a7 << a8; + ssSend << a1 << a2 << a3 << a4 << a5 << a6 << a7 << a8; EndMessage(); } catch (...) @@ -562,7 +640,7 @@ public: try { BeginMessage(pszCommand); - vSend << a1 << a2 << a3 << a4 << a5 << a6 << a7 << a8 << a9; + ssSend << a1 << a2 << a3 << a4 << a5 << a6 << a7 << a8 << a9; EndMessage(); } catch (...) @@ -647,9 +725,6 @@ public: void copyStats(CNodeStats &stats); }; - - - inline void RelayInventory(const CInv& inv) { // Put on lists to offer to the other nodes @@ -660,34 +735,11 @@ inline void RelayInventory(const CInv& inv) } } -template -void RelayMessage(const CInv& inv, const T& a) -{ - CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); - ss.reserve(10000); - ss << a; - RelayMessage(inv, ss); -} - -template<> -inline void RelayMessage<>(const CInv& inv, const CDataStream& ss) -{ - { - LOCK(cs_mapRelay); - // Expire old relay messages - while (!vRelayExpiration.empty() && vRelayExpiration.front().first < GetTime()) - { - mapRelay.erase(vRelayExpiration.front().second); - vRelayExpiration.pop_front(); - } - - // Save original serialized message so newer versions are preserved - mapRelay.insert(std::make_pair(inv, ss)); - vRelayExpiration.push_back(std::make_pair(GetTime() + 15 * 60, inv)); - } - - RelayInventory(inv); -} +class CTransaction; +void RelayTransaction(const CTransaction& tx, const uint256& hash); +void RelayTransaction(const CTransaction& tx, const uint256& hash, const CDataStream& ss); #endif + + diff --git a/src/netbase.cpp b/src/netbase.cpp index e2ad5e0..34818da 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -312,8 +312,10 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket) case 0x03: { ret = recv(hSocket, pchRet3, 1, 0) != 1; - if (ret) + if (ret) { + closesocket(hSocket); return error("Error reading from proxy"); + } int nRecv = pchRet3[0]; ret = recv(hSocket, pchRet3, nRecv, 0) != nRecv; break; @@ -537,6 +539,7 @@ bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout) printf("ConnectSocket(): connected Socks 5\n"); break; default: + closesocket(hSocket); if (fDebug) printf("ConnectSocket(): second is %d\n", proxy.second); return false; @@ -578,7 +581,9 @@ bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest switch(nameproxy.second) { default: - case 4: return false; + case 4: + closesocket(hSocket); + return false; case 5: if (!Socks5(strDest, port, hSocket)) return false; @@ -958,10 +963,10 @@ std::vector CNetAddr::GetGroup() const return vchRet; } -uint64 CNetAddr::GetHash() const +uint64_t CNetAddr::GetHash() const { uint256 hash = Hash(&ip[0], &ip[16]); - uint64 nRet; + uint64_t nRet; memcpy(&nRet, &hash, sizeof(nRet)); return nRet; } diff --git a/src/netbase.h b/src/netbase.h index 0a29d4f..5775568 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -1,8 +1,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_NETBASE_H -#define BITCOIN_NETBASE_H +#ifndef TRIANGLES_NETBASE_H +#define TRIANGLES_NETBASE_H #include #include @@ -67,7 +67,7 @@ class CNetAddr std::string ToString() const; std::string ToStringIP() const; unsigned int GetByte(int n) const; - uint64 GetHash() const; + uint64_t GetHash() const; bool GetInAddr(struct in_addr* pipv4Addr) const; std::vector GetGroup() const; int GetReachabilityFrom(const CNetAddr *paddrPartner = NULL) const; diff --git a/src/noui.cpp b/src/noui.cpp index db25f2d..f3ab77f 100644 --- a/src/noui.cpp +++ b/src/noui.cpp @@ -4,7 +4,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "ui_interface.h" #include "init.h" -#include "bitcoinrpc.h" +#include "trianglesrpc.h" #include @@ -15,14 +15,14 @@ static int noui_ThreadSafeMessageBox(const std::string& message, const std::stri return 4; } -static bool noui_ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption) +static bool noui_ThreadSafeAskFee(int64_t nFeeRequired, const std::string& strCaption) { return true; } void noui_connect() { - // Connect bitcoind signal handlers + // Connect trianglesd signal handlers uiInterface.ThreadSafeMessageBox.connect(noui_ThreadSafeMessageBox); uiInterface.ThreadSafeAskFee.connect(noui_ThreadSafeAskFee); } diff --git a/src/onionseed.h b/src/onionseed.h index ab13b55..4030ce8 100644 --- a/src/onionseed.h +++ b/src/onionseed.h @@ -1,17 +1,15 @@ -#ifndef AR_ONIONSEED_H -#define AR_ONIONSEED_H +#ifndef TRIANGLES_ONIONSEED_H +#define TRIANGLES_ONIONSEED_H // hidden service seeds static const char *strMainNetOnionSeed[][1] = { - {"4mmbxrdk5xorxq4s.onion"}, - {"fzwpi2uqgauy225m.onion"}, + {"ubxidutptf2sslhq.onion"}, {NULL} }; static const char *strTestNetOnionSeed[][1] = { - {"4mmbxrdk5xorxq4s.onion"}, - {"fzwpi2uqgauy225m.onion"}, + {"ubxidutptf2sslhq.onion"}, {NULL} }; diff --git a/src/protocol.cpp b/src/protocol.cpp index d6e340e..1bb578c 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -80,7 +80,7 @@ CAddress::CAddress() : CService() Init(); } -CAddress::CAddress(CService ipIn, uint64 nServicesIn) : CService(ipIn) +CAddress::CAddress(CService ipIn, uint64_t nServicesIn) : CService(ipIn) { Init(); nServices = nServicesIn; diff --git a/src/protocol.h b/src/protocol.h index 58bd83d..336dddc 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -56,7 +56,8 @@ class CMessageHeader CHECKSUM_SIZE=sizeof(int), MESSAGE_SIZE_OFFSET=MESSAGE_START_SIZE+COMMAND_SIZE, - CHECKSUM_OFFSET=MESSAGE_SIZE_OFFSET+MESSAGE_SIZE_SIZE + CHECKSUM_OFFSET=MESSAGE_SIZE_OFFSET+MESSAGE_SIZE_SIZE, + HEADER_SIZE=MESSAGE_START_SIZE+COMMAND_SIZE+MESSAGE_SIZE_SIZE+CHECKSUM_SIZE }; char pchMessageStart[MESSAGE_START_SIZE]; char pchCommand[COMMAND_SIZE]; @@ -75,7 +76,7 @@ class CAddress : public CService { public: CAddress(); - explicit CAddress(CService ipIn, uint64 nServicesIn=NODE_NETWORK); + explicit CAddress(CService ipIn, uint64_t nServicesIn=NODE_NETWORK); void Init(); @@ -98,13 +99,13 @@ class CAddress : public CService // TODO: make private (improves encapsulation) public: - uint64 nServices; + uint64_t nServices; // disk and network only unsigned int nTime; // memory only - int64 nLastTry; + int64_t nLastTry; }; /** inv message data */ diff --git a/src/qt/aboutdialog.cpp b/src/qt/aboutdialog.cpp index 14ff9e9..0b98bef 100644 --- a/src/qt/aboutdialog.cpp +++ b/src/qt/aboutdialog.cpp @@ -9,7 +9,6 @@ AboutDialog::AboutDialog(QWidget *parent) : ui(new Ui::AboutDialog) { ui->setupUi(this); - // this->setStyleSheet("background-color: #effbef;"); } void AboutDialog::setModel(ClientModel *model) diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index e20358c..8177994 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -3,7 +3,7 @@ #include "addresstablemodel.h" #include "optionsmodel.h" -#include "bitcoingui.h" +#include "trianglesgui.h" #include "editaddressdialog.h" #include "csvmodelwriter.h" #include "guiutil.h" diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp index e65d391..11e2a43 100644 --- a/src/qt/addresstablemodel.cpp +++ b/src/qt/addresstablemodel.cpp @@ -21,10 +21,11 @@ struct AddressTableEntry Type type; QString label; QString address; + bool stealth; AddressTableEntry() {} - AddressTableEntry(Type type, const QString &label, const QString &address): - type(type), label(label), address(address) {} + AddressTableEntry(Type type, const QString &label, const QString &address, const bool &stealth = false): + type(type), label(label), address(address), stealth(stealth) {} }; struct AddressTableEntryLessThan @@ -61,14 +62,17 @@ public: LOCK(wallet->cs_wallet); BOOST_FOREACH(const PAIRTYPE(CTxDestination, std::string)& item, wallet->mapAddressBook) { - const CBitcoinAddress& address = item.first; + const CTrianglesAddress& address = item.first; const std::string& strName = item.second; bool fMine = IsMine(*wallet, address.Get()); cachedAddressTable.append(AddressTableEntry(fMine ? AddressTableEntry::Receiving : AddressTableEntry::Sending, QString::fromStdString(strName), QString::fromStdString(address.ToString()))); } + } + // qLowerBound() and qUpperBound() require our cachedAddressTable list to be sorted in asc order + qSort(cachedAddressTable.begin(), cachedAddressTable.end(), AddressTableEntryLessThan()); } void updateEntry(const QString &address, const QString &label, bool isMine, int status) @@ -88,7 +92,7 @@ public: case CT_NEW: if(inModel) { - OutputDebugStringF("Warning: AddressTablePriv::updateEntry: Got CT_NOW, but entry is already in model\n"); + OutputDebugStringF("Warning: AddressTablePriv::updateEntry: Got CT_NEW, but entry is already in model\n"); break; } parent->beginInsertRows(QModelIndex(), lowerIndex, lowerIndex); @@ -190,7 +194,7 @@ QVariant AddressTableModel::data(const QModelIndex &index, int role) const QFont font; if(index.column() == Address) { - font = GUIUtil::bitcoinAddressFont(); + font = GUIUtil::trianglesAddressFont(); } return font; } @@ -208,7 +212,7 @@ QVariant AddressTableModel::data(const QModelIndex &index, int role) const return QVariant(); } -bool AddressTableModel::setData(const QModelIndex & index, const QVariant & value, int role) +bool AddressTableModel::setData(const QModelIndex &index, const QVariant &value, int role) { if(!index.isValid()) return false; @@ -216,35 +220,58 @@ bool AddressTableModel::setData(const QModelIndex & index, const QVariant & valu editStatus = OK; + std::string strTemp, strValue; if(role == Qt::EditRole) { switch(index.column()) { case Label: - wallet->SetAddressBookName(CBitcoinAddress(rec->address.toStdString()).Get(), value.toString().toStdString()); - rec->label = value.toString(); + // Do nothing, if old label == new label + if(rec->label == value.toString()) + { + editStatus = NO_CHANGES; + return false; + } + + strTemp = rec->address.toStdString(); + wallet->SetAddressBookName(CTrianglesAddress(strTemp).Get(), value.toString().toStdString()); + break; case Address: + + std::string sTemp = value.toString().toStdString(); + // Do nothing, if old address == new address + if(CTrianglesAddress(rec->address.toStdString()) == CTrianglesAddress(value.toString().toStdString())) + { + editStatus = NO_CHANGES; + return false; + } // Refuse to set invalid address, set error status and return false - if(!walletModel->validateAddress(value.toString())) + else if(!walletModel->validateAddress(value.toString())) { editStatus = INVALID_ADDRESS; return false; } + // Check for duplicate addresses to prevent accidental deletion of addresses, if you try + // to paste an existing address over another address (with a different label) + else if(wallet->mapAddressBook.count(CTrianglesAddress(value.toString().toStdString()).Get())) + { + editStatus = DUPLICATE_ADDRESS; + return false; + } // Double-check that we're not overwriting a receiving address - if(rec->type == AddressTableEntry::Sending) + else if(rec->type == AddressTableEntry::Sending) { { LOCK(wallet->cs_wallet); // Remove old entry - wallet->DelAddressBookName(CBitcoinAddress(rec->address.toStdString()).Get()); + wallet->DelAddressBookName(CTrianglesAddress(rec->address.toStdString()).Get()); // Add new entry with new address - wallet->SetAddressBookName(CBitcoinAddress(value.toString().toStdString()).Get(), rec->label.toStdString()); + wallet->SetAddressBookName(CTrianglesAddress(value.toString().toStdString()).Get(), rec->label.toStdString()); } } break; } - return true; } return false; @@ -262,7 +289,7 @@ QVariant AddressTableModel::headerData(int section, Qt::Orientation orientation, return QVariant(); } -Qt::ItemFlags AddressTableModel::flags(const QModelIndex & index) const +Qt::ItemFlags AddressTableModel::flags(const QModelIndex &index) const { if(!index.isValid()) return 0; @@ -279,7 +306,7 @@ Qt::ItemFlags AddressTableModel::flags(const QModelIndex & index) const return retval; } -QModelIndex AddressTableModel::index(int row, int column, const QModelIndex & parent) const +QModelIndex AddressTableModel::index(int row, int column, const QModelIndex &parent) const { Q_UNUSED(parent); AddressTableEntry *data = priv->index(row); @@ -295,35 +322,36 @@ QModelIndex AddressTableModel::index(int row, int column, const QModelIndex & pa void AddressTableModel::updateEntry(const QString &address, const QString &label, bool isMine, int status) { - // Update address book model from Bitcoin core + // Update address book model from Triangles core priv->updateEntry(address, label, isMine, status); } -QString AddressTableModel::addRow(const QString &type, const QString &label, const QString &address) +QString AddressTableModel::addRow(const QString &type, const QString &label, const QString &address, int addressType) { std::string strLabel = label.toStdString(); std::string strAddress = address.toStdString(); editStatus = OK; - if(type == Send) + if (type == Send) { - if(!walletModel->validateAddress(address)) - { - editStatus = INVALID_ADDRESS; - return QString(); - } - // Check for duplicate addresses - { - LOCK(wallet->cs_wallet); - if(wallet->mapAddressBook.count(CBitcoinAddress(strAddress).Get())) + if (!walletModel->validateAddress(address)) { - editStatus = DUPLICATE_ADDRESS; + editStatus = INVALID_ADDRESS; return QString(); - } - } + }; + // Check for duplicate addresses + { + LOCK(wallet->cs_wallet); + if (wallet->mapAddressBook.count(CTrianglesAddress(strAddress).Get())) + { + editStatus = DUPLICATE_ADDRESS; + return QString(); + }; + + wallet->SetAddressBookName(CTrianglesAddress(strAddress).Get(), strLabel); } - else if(type == Receive) + }else if(type == Receive) { // Generate a new address to associate with given label WalletModel::UnlockContext ctx(walletModel->requestUnlock()); @@ -333,27 +361,28 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con editStatus = WALLET_UNLOCK_FAILURE; return QString(); } - CPubKey newKey; - if(!wallet->GetKeyFromPool(newKey, true)) - { - editStatus = KEY_GENERATION_FAILURE; - return QString(); - } - strAddress = CBitcoinAddress(newKey.GetID()).ToString(); + + CPubKey newKey; + if(!wallet->GetKeyFromPool(newKey, true)) + { + editStatus = KEY_GENERATION_FAILURE; + return QString(); + } + strAddress = CTrianglesAddress(newKey.GetID()).ToString(); + + { + LOCK(wallet->cs_wallet); + wallet->SetAddressBookName(CTrianglesAddress(strAddress).Get(), strLabel); + } } else { return QString(); } - // Add entry - { - LOCK(wallet->cs_wallet); - wallet->SetAddressBookName(CBitcoinAddress(strAddress).Get(), strLabel); - } return QString::fromStdString(strAddress); } -bool AddressTableModel::removeRows(int row, int count, const QModelIndex & parent) +bool AddressTableModel::removeRows(int row, int count, const QModelIndex &parent) { Q_UNUSED(parent); AddressTableEntry *rec = priv->index(row); @@ -365,7 +394,7 @@ bool AddressTableModel::removeRows(int row, int count, const QModelIndex & paren } { LOCK(wallet->cs_wallet); - wallet->DelAddressBookName(CBitcoinAddress(rec->address.toStdString()).Get()); + wallet->DelAddressBookName(CTrianglesAddress(rec->address.toStdString()).Get()); } return true; } @@ -374,9 +403,10 @@ bool AddressTableModel::removeRows(int row, int count, const QModelIndex & paren */ QString AddressTableModel::labelForAddress(const QString &address) const { - { - LOCK(wallet->cs_wallet); - CBitcoinAddress address_parsed(address.toStdString()); + { + std::string sAddr = address.toStdString(); + + CTrianglesAddress address_parsed(sAddr); std::map::iterator mi = wallet->mapAddressBook.find(address_parsed.Get()); if (mi != wallet->mapAddressBook.end()) { diff --git a/src/qt/addresstablemodel.h b/src/qt/addresstablemodel.h index 42974e3..df87ebe 100644 --- a/src/qt/addresstablemodel.h +++ b/src/qt/addresstablemodel.h @@ -17,10 +17,17 @@ class AddressTableModel : public QAbstractTableModel public: explicit AddressTableModel(CWallet *wallet, WalletModel *parent = 0); ~AddressTableModel(); - + + enum AddressType { + AT_Unknown = 0, /**< User specified label */ + AT_Normal = 1, /**< Triangles address */ + AT_Stealth = 2 /**< Triangles address */ + }; + enum ColumnIndex { Label = 0, /**< User specified label */ - Address = 1 /**< Bitcoin address */ + Address = 1, /**< Triangles address */ + Type = 2 /**< Address type */ }; enum RoleIndex { @@ -29,32 +36,33 @@ public: /** Return status of edit/insert operation */ enum EditStatus { - OK, - INVALID_ADDRESS, /**< Unparseable address */ - DUPLICATE_ADDRESS, /**< Address already in address book */ - WALLET_UNLOCK_FAILURE, /**< Wallet could not be unlocked to create new receiving address */ - KEY_GENERATION_FAILURE /**< Generating a new public key for a receiving address failed */ + OK, /**< Everything ok */ + NO_CHANGES, /**< No changes were made during edit operation */ + INVALID_ADDRESS, /**< Unparseable address */ + DUPLICATE_ADDRESS, /**< Address already in address book */ + WALLET_UNLOCK_FAILURE, /**< Wallet could not be unlocked to create new receiving address */ + KEY_GENERATION_FAILURE /**< Generating a new public key for a receiving address failed */ }; - static const QString Send; /**< Specifies send address */ - static const QString Receive; /**< Specifies receive address */ + static const QString Send; /**< Specifies send address */ + static const QString Receive; /**< Specifies receive address */ /** @name Methods overridden from QAbstractTableModel @{*/ int rowCount(const QModelIndex &parent) const; int columnCount(const QModelIndex &parent) const; QVariant data(const QModelIndex &index, int role) const; - bool setData(const QModelIndex & index, const QVariant & value, int role); + bool setData(const QModelIndex &index, const QVariant &value, int role); QVariant headerData(int section, Qt::Orientation orientation, int role) const; - QModelIndex index(int row, int column, const QModelIndex & parent) const; - bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex()); - Qt::ItemFlags flags(const QModelIndex & index) const; + QModelIndex index(int row, int column, const QModelIndex &parent) const; + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); + Qt::ItemFlags flags(const QModelIndex &index) const; /*@}*/ /* Add an address to the model. Returns the added address on success, and an empty string otherwise. */ - QString addRow(const QString &type, const QString &label, const QString &address); + QString addRow(const QString &type, const QString &label, const QString &address, int addressType); /* Look up label for address in address book, if not found return empty string. */ diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp index 27fb3db..600ca12 100644 --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -8,7 +8,7 @@ #include #include -extern bool fWalletUnlockMintOnly; +extern bool fWalletUnlockStakingOnly; AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) : QDialog(parent), @@ -35,9 +35,9 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) : ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.
Please use a passphrase of 10 or more random characters, or eight or more words.")); setWindowTitle(tr("Encrypt wallet")); break; - case UnlockMinting: - ui->mintingCheckBox->setChecked(true); - ui->mintingCheckBox->show(); + case UnlockStaking: + ui->stakingCheckBox->setChecked(true); + ui->stakingCheckBox->show(); // fallthru case Unlock: // Ask passphrase ui->warningLabel->setText(tr("This operation needs your wallet passphrase to unlock the wallet.")); @@ -115,7 +115,7 @@ void AskPassphraseDialog::accept() { QMessageBox::warning(this, tr("Wallet encrypted"), "" + - tr("triangles will close now to finish the encryption process. " + tr("Triangles will close now to finish the encryption process. " "Remember that encrypting your wallet cannot fully protect " "your coins from being stolen by malware infecting your computer.") + "

" + @@ -144,7 +144,7 @@ void AskPassphraseDialog::accept() QDialog::reject(); // Cancelled } } break; - case UnlockMinting: + case UnlockStaking: case Unlock: if(!model->setWalletLocked(false, oldpass)) { @@ -153,7 +153,7 @@ void AskPassphraseDialog::accept() } else { - fWalletUnlockMintOnly = ui->mintingCheckBox->isChecked(); + fWalletUnlockStakingOnly = ui->stakingCheckBox->isChecked(); QDialog::accept(); // Success } break; @@ -201,7 +201,7 @@ void AskPassphraseDialog::textChanged() case Encrypt: // New passphrase x2 acceptable = !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty(); break; - case UnlockMinting: + case UnlockStaking: case Unlock: // Old passphrase x1 case Decrypt: acceptable = !ui->passEdit1->text().isEmpty(); diff --git a/src/qt/askpassphrasedialog.h b/src/qt/askpassphrasedialog.h index ca01274..2c2e142 100644 --- a/src/qt/askpassphrasedialog.h +++ b/src/qt/askpassphrasedialog.h @@ -17,11 +17,11 @@ class AskPassphraseDialog : public QDialog public: enum Mode { - Encrypt, /**< Ask passphrase twice and encrypt */ - UnlockMinting, /**< Ask passphrase and unlock for minting only */ - Unlock, /**< Ask passphrase and unlock */ - ChangePass, /**< Ask old passphrase + new passphrase twice */ - Decrypt /**< Ask passphrase and decrypt wallet */ + Encrypt, /**< Ask passphrase twice and encrypt */ + UnlockStaking, /**< Ask passphrase and unlock */ + Unlock, /**< Ask passphrase and unlock */ + ChangePass, /**< Ask old passphrase + new passphrase twice */ + Decrypt /**< Ask passphrase and decrypt wallet */ }; explicit AskPassphraseDialog(Mode mode, QWidget *parent = 0); diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc deleted file mode 100644 index 4d06540..0000000 --- a/src/qt/bitcoin.qrc +++ /dev/null @@ -1,57 +0,0 @@ - - - res/icons/triangles-128.png - res/icons/address-book.png - res/icons/quit.png - res/icons/send.png - res/icons/triangles-16.png - res/icons/connect0_16.png - res/icons/connect1_16.png - res/icons/connect2_16.png - res/icons/connect3_16.png - res/icons/connect4_16.png - res/icons/transaction0.png - res/icons/transaction2.png - res/icons/clock1.png - res/icons/clock2.png - res/icons/clock3.png - res/icons/clock4.png - res/icons/clock5.png - res/icons/configure.png - res/icons/receive.png - res/icons/editpaste.png - res/icons/editcopy.png - res/icons/add.png - res/icons/triangles-128.png - res/icons/triangles-16.png - res/icons/edit.png - res/icons/history.png - res/icons/overview.png - res/icons/export.png - res/icons/synced.png - res/icons/remove.png - res/icons/tx_mined.png - res/icons/tx_input.png - res/icons/tx_output.png - res/icons/tx_inout.png - res/icons/lock_closed.png - res/icons/lock_open.png - res/icons/mining.png - res/icons/key.png - res/icons/filesave.png - res/icons/qrcode.png - res/icons/debugwindow.png - - - res/images/about.png - res/images/splash.png - res/images/wallet.png - - - res/movies/update_spinner.mng - - - locale/bitcoin_en.qm - locale/bitcoin_ru.qm - - diff --git a/src/qt/bitcoinaddressvalidator.h b/src/qt/bitcoinaddressvalidator.h deleted file mode 100644 index 9710d12..0000000 --- a/src/qt/bitcoinaddressvalidator.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef BITCOINADDRESSVALIDATOR_H -#define BITCOINADDRESSVALIDATOR_H - -#include - -/** Base48 entry widget validator. - Corrects near-miss characters and refuses characters that are no part of base48. - */ -class BitcoinAddressValidator : public QValidator -{ - Q_OBJECT -public: - explicit BitcoinAddressValidator(QObject *parent = 0); - - State validate(QString &input, int &pos) const; - - static const int MaxAddressLength = 35; -signals: - -public slots: - -}; - -#endif // BITCOINADDRESSVALIDATOR_H diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp deleted file mode 100644 index bb5985e..0000000 --- a/src/qt/bitcoinstrings.cpp +++ /dev/null @@ -1,177 +0,0 @@ -#include -// Automatically generated by extract_strings.py -#ifdef __GNUC__ -#define UNUSED __attribute__((unused)) -#else -#define UNUSED -#endif -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" -"rpcuser=bitcoinrpc\n" -"rpcpassword=%s\n" -"(you do not need to remember this password)\n" -"If the file does not exist, create it with owner-readable-only file " -"permissions.\n"), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:" -"@STRENGTH)"), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"An error occurred while setting up the RPC port %u for listening on IPv4: %s"), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"An error occurred while setting up the RPC port %u for listening on IPv6, " -"falling back to IPv4: %s"), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Cannot obtain a lock on data directory %s. triangles is probably already " -"running."), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Detach block and address databases. Increases shutdown time (default: 0)"), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Error initializing database environment %s! To recover, BACKUP THAT " -"DIRECTORY, then remove everything from it except for wallet.dat."), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"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."), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Error: This transaction requires a transaction fee of at least %s because of " -"its amount, complexity, or use of recently received funds "), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Error: Wallet unlocked for block minting only, unable to create transaction."), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Execute command when the best block changes (%s in cmd is replaced by block " -"hash)"), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Listen for JSON-RPC connections on (default: 33334 or testnet: 33333)"), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Number of seconds to keep misbehaving peers from reconnecting (default: " -"86400)"), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Set maximum size of high-priority/low-fee transactions in bytes (default: " -"27000)"), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Unable to bind to %s on this computer. triangles is probably already running."), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Warning: -paytxfee is set very high! This is the transaction fee you will " -"pay if you send a transaction."), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Warning: Please check that your computer's date and time are correct! If " -"your clock is wrong triangles will not work properly."), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Warning: error reading wallet.dat! All keys read correctly, but transaction " -"data or address book entries might be missing or incorrect."), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as " -"wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect " -"you should restore from a backup."), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"You must set rpcpassword= in the configuration file:\n" -"%s\n" -"If the file does not exist, create it with owner-readable-only file " -"permissions."), -QT_TRANSLATE_NOOP("bitcoin-core", "Accept command line and JSON-RPC commands"), -QT_TRANSLATE_NOOP("bitcoin-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Add a node to connect to and attempt to keep the connection open"), -QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"), -QT_TRANSLATE_NOOP("bitcoin-core", "Allow JSON-RPC connections from specified IP address"), -QT_TRANSLATE_NOOP("bitcoin-core", "Attempt to recover private keys from a corrupt wallet.dat"), -QT_TRANSLATE_NOOP("bitcoin-core", "Bind to given address. Use [host]:port notation for IPv6"), -QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"), -QT_TRANSLATE_NOOP("bitcoin-core", "Cannot downgrade wallet"), -QT_TRANSLATE_NOOP("bitcoin-core", "Cannot initialize keypool"), -QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -bind address: '%s'"), -QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -externalip address: '%s'"), -QT_TRANSLATE_NOOP("bitcoin-core", "Cannot write default address"), -QT_TRANSLATE_NOOP("bitcoin-core", "Connect only to the specified node(s)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Connect through socks proxy"), -QT_TRANSLATE_NOOP("bitcoin-core", "Connect to a node to retrieve peer addresses, and disconnect"), -QT_TRANSLATE_NOOP("bitcoin-core", "Discover own IP address (default: 1 when listening and no -externalip)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Don't generate coins"), -QT_TRANSLATE_NOOP("bitcoin-core", "Done loading"), -QT_TRANSLATE_NOOP("bitcoin-core", "Error loading blkindex.dat"), -QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat"), -QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet corrupted"), -QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet requires newer version of triangles"), -QT_TRANSLATE_NOOP("bitcoin-core", "Error"), -QT_TRANSLATE_NOOP("bitcoin-core", "Error: Transaction creation failed "), -QT_TRANSLATE_NOOP("bitcoin-core", "Error: Wallet locked, unable to create transaction "), -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: 0)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Find peers using internet relay chat (default: 1)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Generate coins"), -QT_TRANSLATE_NOOP("bitcoin-core", "Get help for a command"), -QT_TRANSLATE_NOOP("bitcoin-core", "How many blocks to check at startup (default: 2500, 0 = all)"), -QT_TRANSLATE_NOOP("bitcoin-core", "How thorough the block verification is (0-6, default: 1)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Importing blockchain data file."), -QT_TRANSLATE_NOOP("bitcoin-core", "Importing bootstrap blockchain data file."), -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=: '%s'"), -QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -reservebalance="), -QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount"), -QT_TRANSLATE_NOOP("bitcoin-core", "List commands"), -QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on (default: 12788 or testnet: 22788)"), -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 connections to peers (default: 125)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, *1000 bytes (default: 5000)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, *1000 bytes (default: 1000)"), -QT_TRANSLATE_NOOP("bitcoin-core", "triangles version"), -QT_TRANSLATE_NOOP("bitcoin-core", "triangles"), -QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network (IPv4, IPv6 or Tor)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Options:"), -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"), -QT_TRANSLATE_NOOP("bitcoin-core", "Rescanning..."), -QT_TRANSLATE_NOOP("bitcoin-core", "Run in the background as a daemon and accept commands"), -QT_TRANSLATE_NOOP("bitcoin-core", "SSL options: (see the Bitcoin Wiki for SSL setup instructions)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Select the version of socks proxy to use (4-5, default: 5)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Send command to -server or trianglesd"), -QT_TRANSLATE_NOOP("bitcoin-core", "Send commands to node running on (default: 127.0.0.1)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to console instead of debug.log file"), -QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to debugger"), -QT_TRANSLATE_NOOP("bitcoin-core", "Sending..."), -QT_TRANSLATE_NOOP("bitcoin-core", "Server certificate file (default: server.cert)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Server private key (default: server.pem)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Set database cache size in megabytes (default: 25)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Set database disk log size in megabytes (default: 100)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Set key pool size to (default: 100)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum block size in bytes (default: 250000)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Set minimum block size in bytes (default: 0)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Specify configuration file (default: triangles.conf)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Specify connection timeout in milliseconds (default: 5000)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Specify data directory"), -QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: trianglesd.pid)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Specify your own public address"), -QT_TRANSLATE_NOOP("bitcoin-core", "This help message"), -QT_TRANSLATE_NOOP("bitcoin-core", "Threshold for disconnecting misbehaving peers (default: 100)"), -QT_TRANSLATE_NOOP("bitcoin-core", "To use the %s option"), -QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind returned error %d, %s)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Unable to sign checkpoint, wrong checkpointkey?\n"), -QT_TRANSLATE_NOOP("bitcoin-core", "Unknown -socks proxy version requested: %i"), -QT_TRANSLATE_NOOP("bitcoin-core", "Unknown network specified in -onlynet: '%s'"), -QT_TRANSLATE_NOOP("bitcoin-core", "Upgrade wallet to latest format"), -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", "Verifying database integrity..."), -QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart triangles to complete"), -QT_TRANSLATE_NOOP("bitcoin-core", "Warning: Disk space is low!"), -QT_TRANSLATE_NOOP("bitcoin-core", "Warning: This version is obsolete, upgrade required!"), -QT_TRANSLATE_NOOP("bitcoin-core", "wallet.dat corrupt, salvage failed"), -}; diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 6ea4f83..67de76b 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -11,7 +11,7 @@ #include #include -static const int64 nClientStartupTime = GetTime(); +static const int64_t nClientStartupTime = GetTime(); ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) : QObject(parent), optionsModel(optionsModel), @@ -50,7 +50,10 @@ int ClientModel::getNumBlocksAtStartup() QDateTime ClientModel::getLastBlockDate() const { - return QDateTime::fromTime_t(pindexBest->GetBlockTime()); + if (pindexBest) + return QDateTime::fromTime_t(pindexBest->GetBlockTime()); + else + return QDateTime::fromTime_t(1393221600); // Genesis block's time } void ClientModel::updateTimer() @@ -93,7 +96,6 @@ void ClientModel::updateAlert(const QString &hash, int status) emit numBlocksChanged(getNumBlocks(), getNumBlocksOfPeers()); } - double ClientModel::GetDifficulty() const { // Floating point number that is a multiple of the minimum difficulty, @@ -120,7 +122,6 @@ double ClientModel::GetDifficulty() const return dDiff; } - bool ClientModel::isTestNet() const { return fTestNet; diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index dd27de6..837566d 100644 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -13,7 +13,7 @@ class QDateTime; class QTimer; QT_END_NAMESPACE -/** Model for Bitcoin network client. */ +/** Model for Triangles network client. */ class ClientModel : public QObject { Q_OBJECT @@ -42,7 +42,7 @@ public: QString formatBuildDate() const; QString clientName() const; QString formatClientStartupTime() const; - double GetDifficulty() const; + double GetDifficulty() const; private: OptionsModel *optionsModel; diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 2df3c64..9cf5e42 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -2,7 +2,7 @@ #include "ui_coincontroldialog.h" #include "init.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "walletmodel.h" #include "addresstablemodel.h" #include "optionsmodel.h" @@ -113,8 +113,8 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) : ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 100); ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transacton hash in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but dont show it - ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but dont show it - ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64 in this column, but dont show it + ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64_t in this column, but dont show it + ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64_t in this column, but dont show it // default view is sorted by amount desc sortView(COLUMN_AMOUNT_INT64, Qt::DescendingOrder); @@ -434,10 +434,10 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog) } QString sPriorityLabel = ""; - int64 nAmount = 0; - int64 nPayFee = 0; - int64 nAfterFee = 0; - int64 nChange = 0; + int64_t nAmount = 0; + int64_t nPayFee = 0; + int64_t nAfterFee = 0; + int64_t nChange = 0; unsigned int nBytes = 0; unsigned int nBytesInputs = 0; double dPriority = 0; @@ -485,10 +485,10 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog) sPriorityLabel = CoinControlDialog::getPriorityLabel(dPriority); // Fee - int64 nFee = nTransactionFee * (1 + (int64)nBytes / 1000); + int64_t nFee = nTransactionFee * (1 + (int64_t)nBytes / 1000); // Min Fee - int64 nMinFee = txDummy.GetMinFee(1, false, GMF_SEND, nBytes); + int64_t nMinFee = txDummy.GetMinFee(1, GMF_SEND, nBytes); nPayFee = max(nFee, nMinFee); @@ -522,7 +522,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog) } // actually update labels - int nDisplayUnit = BitcoinUnits::BTC; + int nDisplayUnit = TrianglesUnits::TRI; if (model && model->getOptionsModel()) nDisplayUnit = model->getOptionsModel()->getDisplayUnit(); @@ -543,25 +543,25 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog) // stats l1->setText(QString::number(nQuantity)); // Quantity - l2->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAmount)); // Amount - l3->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nPayFee)); // Fee - l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); // After Fee + l2->setText(TrianglesUnits::formatWithUnit(nDisplayUnit, nAmount)); // Amount + l3->setText(TrianglesUnits::formatWithUnit(nDisplayUnit, nPayFee)); // Fee + l4->setText(TrianglesUnits::formatWithUnit(nDisplayUnit, nAfterFee)); // After Fee l5->setText(((nBytes > 0) ? "~" : "") + QString::number(nBytes)); // Bytes l6->setText(sPriorityLabel); // Priority l7->setText((fLowOutput ? (fDust ? tr("DUST") : tr("yes")) : tr("no"))); // Low Output / Dust - l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change + l8->setText(TrianglesUnits::formatWithUnit(nDisplayUnit, nChange)); // Change // turn labels "red" l5->setStyleSheet((nBytes >= 10000) ? "color:red;" : ""); // Bytes >= 10000 l6->setStyleSheet((dPriority <= 576000) ? "color:red;" : ""); // Priority < "medium" l7->setStyleSheet((fLowOutput) ? "color:red;" : ""); // Low Output = "yes" - l8->setStyleSheet((nChange > 0 && nChange < CENT) ? "color:red;" : ""); // Change < 0.01BTC + l8->setStyleSheet((nChange > 0 && nChange < CENT) ? "color:red;" : ""); // Change < 0.01 // tool tips - l5->setToolTip(tr("This label turns red, if the transaction size is bigger than 10000 bytes.\n\n This means a fee of at least %1 per kb is required.\n\n Can vary +/- 1 Byte per input.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT))); - l6->setToolTip(tr("Transactions with higher priority get more likely into a block.\n\nThis label turns red, if the priority is smaller than \"medium\".\n\n This means a fee of at least %1 per kb is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT))); - l7->setToolTip(tr("This label turns red, if any recipient receives an amount smaller than %1.\n\n This means a fee of at least %2 is required. \n\n Amounts below 0.546 times the minimum relay fee are shown as DUST.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)).arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT))); - l8->setToolTip(tr("This label turns red, if the change is smaller than %1.\n\n This means a fee of at least %2 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)).arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT))); + l5->setToolTip(tr("This label turns red, if the transaction size is bigger than 10000 bytes.\n\n This means a fee of at least %1 per kb is required.\n\n Can vary +/- 1 Byte per input.").arg(TrianglesUnits::formatWithUnit(nDisplayUnit, CENT))); + l6->setToolTip(tr("Transactions with higher priority get more likely into a block.\n\nThis label turns red, if the priority is smaller than \"medium\".\n\n This means a fee of at least %1 per kb is required.").arg(TrianglesUnits::formatWithUnit(nDisplayUnit, CENT))); + l7->setToolTip(tr("This label turns red, if any recipient receives an amount smaller than %1.\n\n This means a fee of at least %2 is required. \n\n Amounts below 0.546 times the minimum relay fee are shown as DUST.").arg(TrianglesUnits::formatWithUnit(nDisplayUnit, CENT)).arg(TrianglesUnits::formatWithUnit(nDisplayUnit, CENT))); + l8->setToolTip(tr("This label turns red, if the change is smaller than %1.\n\n This means a fee of at least %2 is required.").arg(TrianglesUnits::formatWithUnit(nDisplayUnit, CENT)).arg(TrianglesUnits::formatWithUnit(nDisplayUnit, CENT))); dialog->findChild("labelCoinControlBytesText") ->setToolTip(l5->toolTip()); dialog->findChild("labelCoinControlPriorityText") ->setToolTip(l6->toolTip()); dialog->findChild("labelCoinControlLowOutputText")->setToolTip(l7->toolTip()); @@ -583,7 +583,7 @@ void CoinControlDialog::updateView() QFlags flgCheckbox=Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable; QFlags flgTristate=Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsTristate; - int nDisplayUnit = BitcoinUnits::BTC; + int nDisplayUnit = TrianglesUnits::TRI; if (model && model->getOptionsModel()) nDisplayUnit = model->getOptionsModel()->getDisplayUnit(); @@ -618,7 +618,7 @@ void CoinControlDialog::updateView() itemWalletAddress->setText(COLUMN_ADDRESS, sWalletAddress); } - int64 nSum = 0; + int64_t nSum = 0; double dPrioritySum = 0; int nChildren = 0; int nInputSum = 0; @@ -639,9 +639,9 @@ void CoinControlDialog::updateView() QString sAddress = ""; if(ExtractDestination(out.tx->vout[out.i].scriptPubKey, outputAddress)) { - sAddress = CBitcoinAddress(outputAddress).ToString().c_str(); + sAddress = CTrianglesAddress(outputAddress).ToString().c_str(); - // if listMode or change => show bitcoin address. In tree mode, address is not shown again for direct wallet address outputs + // if listMode or change => show triangles address. In tree mode, address is not shown again for direct wallet address outputs if (!treeMode || (!(sAddress == sWalletAddress))) itemOutput->setText(COLUMN_ADDRESS, sAddress); @@ -669,7 +669,7 @@ void CoinControlDialog::updateView() } // amount - itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue)); + itemOutput->setText(COLUMN_AMOUNT, TrianglesUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue)); itemOutput->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(out.tx->vout[out.i].nValue), 15, " ")); // padding so that sorting works correctly // date @@ -687,7 +687,7 @@ void CoinControlDialog::updateView() // priority double dPriority = ((double)out.tx->vout[out.i].nValue / (nInputSize + 78)) * (out.nDepth+1); // 78 = 2 * 34 + 10 itemOutput->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPriority)); - itemOutput->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64)dPriority), 20, " ")); + itemOutput->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPriority), 20, " ")); dPrioritySum += (double)out.tx->vout[out.i].nValue * (out.nDepth+1); nInputSum += nInputSize; @@ -717,10 +717,10 @@ void CoinControlDialog::updateView() { dPrioritySum = dPrioritySum / (nInputSum + 78); itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")"); - itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum)); + itemWalletAddress->setText(COLUMN_AMOUNT, TrianglesUnits::format(nDisplayUnit, nSum)); itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " ")); itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum)); - itemWalletAddress->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64)dPrioritySum), 20, " ")); + itemWalletAddress->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPrioritySum), 20, " ")); } } diff --git a/src/qt/coincontroltreewidget.cpp b/src/qt/coincontroltreewidget.cpp index 0c1b514..aa75a49 100644 --- a/src/qt/coincontroltreewidget.cpp +++ b/src/qt/coincontroltreewidget.cpp @@ -25,4 +25,4 @@ void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event) { this->QTreeWidget::keyPressEvent(event); } -} +} \ No newline at end of file diff --git a/src/qt/coincontroltreewidget.h b/src/qt/coincontroltreewidget.h index 912e573..d981f72 100644 --- a/src/qt/coincontroltreewidget.h +++ b/src/qt/coincontroltreewidget.h @@ -14,4 +14,4 @@ protected: virtual void keyPressEvent(QKeyEvent *event); }; -#endif // COINCONTROLTREEWIDGET_H +#endif // COINCONTROLTREEWIDGET_H \ No newline at end of file diff --git a/src/qt/editaddressdialog.cpp b/src/qt/editaddressdialog.cpp index 19cb02a..b187936 100644 --- a/src/qt/editaddressdialog.cpp +++ b/src/qt/editaddressdialog.cpp @@ -2,6 +2,12 @@ #include "ui_editaddressdialog.h" #include "addresstablemodel.h" #include "guiutil.h" +#include "main.h" +#include "wallet.h" +#include "init.h" +#include "base58.h" +#include "clientmodel.h" +#include "trianglesrpc.h" #include #include @@ -19,16 +25,27 @@ EditAddressDialog::EditAddressDialog(Mode mode, QWidget *parent) : case NewReceivingAddress: setWindowTitle(tr("New receiving address")); ui->addressEdit->setEnabled(false); + ui->addressEdit->setVisible(false); + if (!fTestNet && (pindexBest->nHeight < 27000)) { + ui->stealthCB->setEnabled(false); } + if (fTestNet || pindexBest->nHeight > 26999) { + ui->stealthCB->setEnabled(true); } + ui->stealthCB->setVisible(true); break; case NewSendingAddress: setWindowTitle(tr("New sending address")); + ui->stealthCB->setVisible(false); break; case EditReceivingAddress: setWindowTitle(tr("Edit receiving address")); - ui->addressEdit->setDisabled(true); + ui->addressEdit->setEnabled(false); + ui->addressEdit->setVisible(true); + ui->stealthCB->setEnabled(false); + ui->stealthCB->setVisible(true); break; case EditSendingAddress: setWindowTitle(tr("Edit sending address")); + ui->stealthCB->setVisible(false); break; } @@ -44,9 +61,13 @@ EditAddressDialog::~EditAddressDialog() void EditAddressDialog::setModel(AddressTableModel *model) { this->model = model; + if(!model) + return; + mapper->setModel(model); mapper->addMapping(ui->labelEdit, AddressTableModel::Label); mapper->addMapping(ui->addressEdit, AddressTableModel::Address); + mapper->addMapping(ui->stealthCB, AddressTableModel::Type); } void EditAddressDialog::loadRow(int row) @@ -58,14 +79,19 @@ bool EditAddressDialog::saveCurrentRow() { if(!model) return false; + switch(mode) { case NewReceivingAddress: case NewSendingAddress: + { + int typeInd = ui->stealthCB->isChecked() ? AddressTableModel::AT_Stealth : AddressTableModel::AT_Normal; address = model->addRow( mode == NewSendingAddress ? AddressTableModel::Send : AddressTableModel::Receive, ui->labelEdit->text(), - ui->addressEdit->text()); + ui->addressEdit->text(), + typeInd); + } break; case EditReceivingAddress: case EditSendingAddress: @@ -82,35 +108,39 @@ void EditAddressDialog::accept() { if(!model) return; + if(!saveCurrentRow()) { switch(model->getEditStatus()) { + case AddressTableModel::OK: + // Failed with unknown reason. Just reject. + break; + case AddressTableModel::NO_CHANGES: + // No changes were made during edit operation. Just reject. + break; + case AddressTableModel::INVALID_ADDRESS: + QMessageBox::warning(this, windowTitle(), + tr("The entered address \"%1\" is not a valid TRI address.").arg(ui->addressEdit->text()), + QMessageBox::Ok, QMessageBox::Ok); + break; case AddressTableModel::DUPLICATE_ADDRESS: QMessageBox::warning(this, windowTitle(), tr("The entered address \"%1\" is already in the address book.").arg(ui->addressEdit->text()), QMessageBox::Ok, QMessageBox::Ok); break; - case AddressTableModel::INVALID_ADDRESS: - QMessageBox::warning(this, windowTitle(), - tr("The entered address \"%1\" is not a valid triangles address.").arg(ui->addressEdit->text()), - QMessageBox::Ok, QMessageBox::Ok); - return; case AddressTableModel::WALLET_UNLOCK_FAILURE: QMessageBox::critical(this, windowTitle(), tr("Could not unlock wallet."), QMessageBox::Ok, QMessageBox::Ok); - return; + break; case AddressTableModel::KEY_GENERATION_FAILURE: QMessageBox::critical(this, windowTitle(), tr("New key generation failed."), QMessageBox::Ok, QMessageBox::Ok); - return; - case AddressTableModel::OK: - // Failed with unknown reason. Just reject. break; - } + } return; } QDialog::accept(); diff --git a/src/qt/editaddressdialog.h b/src/qt/editaddressdialog.h index 7ec053f..0e4183b 100644 --- a/src/qt/editaddressdialog.h +++ b/src/qt/editaddressdialog.h @@ -27,15 +27,17 @@ public: }; explicit EditAddressDialog(Mode mode, QWidget *parent = 0); - ~EditAddressDialog(); + ~EditAddressDialog(); void setModel(AddressTableModel *model); void loadRow(int row); - void accept(); - QString getAddress() const; void setAddress(const QString &address); + +public slots: + void accept(); + private: bool saveCurrentRow(); diff --git a/src/qt/forms/aboutdialog.ui b/src/qt/forms/aboutdialog.ui index 1bc24c3..33ea9bf 100644 --- a/src/qt/forms/aboutdialog.ui +++ b/src/qt/forms/aboutdialog.ui @@ -6,12 +6,12 @@ 0 0 - 632 - 417 + 593 + 319 - About triangles + About Triangles @@ -23,7 +23,7 @@ - :/images/about + :/images/about @@ -50,7 +50,7 @@ IBeamCursor - <html><head/><body><p><span style=" font-weight:600;">Triangles</span> version</p></body></html> + <b>Triangles</b> version Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -63,7 +63,7 @@ IBeamCursor - 3.3.4.3-beta + 0.3.666-beta Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -91,11 +91,8 @@ IBeamCursor - -Copyright © 2009-2012 Bitcoin Developers -Copyright © 2012 PPCoin Developers -Copyright © 2014 Triangles Developers - + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -109,7 +106,7 @@ Copyright © 2014 Triangles Developers -This is experimental software. If you don't treat it as such, you're likely to put an eye out! +This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -151,7 +148,7 @@ This product includes software developed by the OpenSSL Project for use in the O - + @@ -161,8 +158,8 @@ This product includes software developed by the OpenSSL Project for use in the O accept() - 619 - 404 + 360 + 308 157 @@ -177,8 +174,8 @@ This product includes software developed by the OpenSSL Project for use in the O reject() - 619 - 404 + 428 + 308 286 diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui index ed06c95..0a89602 100644 --- a/src/qt/forms/addressbookpage.ui +++ b/src/qt/forms/addressbookpage.ui @@ -6,173 +6,185 @@ 0 0 - 852 + 760 380 Address Book - + - - - #labelExplanation { color: #464747; } + + + QFrame::StyledPanel - - These are your triangles 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. - - - Qt::PlainText - - - true + + QFrame::Raised + + + + + These are your Triangles 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. + + + Qt::PlainText + + + true + + + + + + + Qt::CustomContextMenu + + + Double-click to edit address or label + + + QFrame::NoFrame + + + false + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + true + + + false + + + + + + + + + Create a new address + + + &New Address + + + + :/icons/add:/icons/add + + + + + + + Copy the currently selected address to the system clipboard + + + &Copy Address + + + + :/icons/editcopy:/icons/editcopy + + + + + + + Show &QR Code + + + + :/icons/qrcode:/icons/qrcode + + + + + + + Sign a message to prove you own a TRI address + + + Sign &Message + + + + :/icons/edit:/icons/edit + + + + + + + Verify a message to ensure it was signed with a specified TRI address + + + &Verify Message + + + + :/icons/transaction_0:/icons/transaction_0 + + + + + + + Delete the currently selected address from the list + + + &Delete + + + + :/icons/remove:/icons/remove + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + QDialogButtonBox::Ok + + + + + + - - - - Qt::CustomContextMenu - - - Double-click to edit address or label - - - false - - - true - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - true - - - false - - - - - - - - - Create a new address - - - &New Address - - - - :/icons/add:/icons/add - - - - - - - Copy the currently selected address to the system clipboard - - - &Copy Address - - - - :/icons/editcopy:/icons/editcopy - - - - - - - Show &QR Code - - - - :/icons/qrcode:/icons/qrcode - - - - - - - Sign a message to prove you own a triangles address - - - Sign &Message - - - - :/icons/edit:/icons/edit - - - - - - - Verify a message to ensure it was signed with a specified triangles address - - - &Verify Message - - - - :/icons/transaction_0:/icons/transaction_0 - - - - - - - Delete the currently selected address from the list - - - &Delete - - - - :/icons/remove:/icons/remove - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - QDialogButtonBox::Ok - - - - - - + diff --git a/src/qt/forms/askpassphrasedialog.ui b/src/qt/forms/askpassphrasedialog.ui index 5fd8a4a..02ea8ff 100644 --- a/src/qt/forms/askpassphrasedialog.ui +++ b/src/qt/forms/askpassphrasedialog.ui @@ -100,12 +100,12 @@ - + true - Serves to disable trivial use of sendmoney when the OS account is compromised. Provides no real security. + Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. For staking only diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui index f861553..fcf29af 100644 --- a/src/qt/forms/coincontroldialog.ui +++ b/src/qt/forms/coincontroldialog.ui @@ -61,7 +61,7 @@ Qt::ActionsContextMenu - 0 + 0 Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -93,7 +93,7 @@ Qt::ActionsContextMenu - 0 + 0 Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -141,7 +141,7 @@ Qt::ActionsContextMenu - 0.00 TRI + 0.00 TRI Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -221,7 +221,7 @@ Qt::ActionsContextMenu - 0.00 TRI + 0.00 TRI Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -259,7 +259,7 @@ Qt::ActionsContextMenu - no + no Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -307,7 +307,7 @@ Qt::ActionsContextMenu - 0.00 TRI + 0.00 TRI Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -345,7 +345,7 @@ Qt::ActionsContextMenu - 0.00 TRI + 0.00 TRI Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse @@ -379,7 +379,7 @@ 41 - + 14 diff --git a/src/qt/forms/editaddressdialog.ui b/src/qt/forms/editaddressdialog.ui index b4a4c1b..cff27dc 100644 --- a/src/qt/forms/editaddressdialog.ui +++ b/src/qt/forms/editaddressdialog.ui @@ -7,7 +7,7 @@ 0 0 457 - 126 + 129 @@ -52,6 +52,13 @@ The address associated with this address book entry. This can only be modified for sending addresses. + + + + + &Stealth Address + + diff --git a/src/qt/forms/messagepage.ui b/src/qt/forms/messagepage.ui new file mode 100644 index 0000000..db93ecf --- /dev/null +++ b/src/qt/forms/messagepage.ui @@ -0,0 +1,242 @@ + + + MessagePage + + + + 0 + 0 + 793 + 375 + + + + Address Book + + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + Qt::PlainText + + + true + + + + + + + Qt::CustomContextMenu + + + Click on a message to view it + + + false + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + true + + + false + + + + + + + + + + + + + 2 + + + 0 + + + 6 + + + 0 + + + 0 + + + + + + + &Back + + + + :/icons/quit:/icons/quit + + + + + + + Contact: + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + 0 + 100 + + + + + + + + + + &Conversation + + + + :/icons/add:/icons/add + + + + + + + Sign a message to prove you own a TRI address + + + &Send + + + + :/icons/send:/icons/send + + + + + + + Copy the currently selected address to the system clipboard + + + &Copy From Address + + + + :/icons/editcopy:/icons/editcopy + + + + + + + Copy the currently selected address to the system clipboard + + + Copy To &Address + + + + :/icons/editcopy:/icons/editcopy + + + + + + + Delete the currently selected address from the list + + + &Delete + + + + :/icons/remove:/icons/remove + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + MRichTextEdit + QWidget +
mrichtextedit.h
+ 1 +
+
+ + + + +
diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui index 0b4fe6d..e28573c 100644 --- a/src/qt/forms/optionsdialog.ui +++ b/src/qt/forms/optionsdialog.ui @@ -44,7 +44,7 @@ - + @@ -59,10 +59,10 @@ - + - + Qt::Horizontal @@ -77,12 +77,58 @@ - + + + Reserved amount does not participate in staking and is therefore spendable at any time. + + + Qt::PlainText + + + true + + + + + + + + + Reserve + + + Qt::PlainText + + + reserveBalance + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + - Automatically start triangles after logging in to the system. + Automatically start Triangles after logging in to the system. - &Start triangles on system login + &Start Triangles on system login @@ -119,7 +165,7 @@ - Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. Map port using &UPnP @@ -129,7 +175,7 @@ - Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). &Connect through SOCKS proxy: @@ -303,7 +349,7 @@ - The user interface language can be set here. This setting will take effect after restarting triangles. + The user interface language can be set here. This setting will take effect after restarting Triangles. @@ -336,7 +382,7 @@ - Whether to show triangles addresses in the transaction list or not. + Whether to show TRI addresses in the transaction list or not. &Display addresses in transaction list @@ -450,9 +496,9 @@ - BitcoinAmountField + TrianglesAmountField QSpinBox -
bitcoinamountfield.h
+
trianglesamountfield.h
QValueComboBox diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index eb38e13..8dcbd58 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -6,383 +6,450 @@ 0 0 - 573 - 492 + 785 + 463
Form - - #OverviewPage { color: #464747; } - - + - - - - - #frame { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(70,71,71,15), stop:1.0 rgba(70,71,71,0)); } - - + + + QFrame::NoFrame + + + + - - - - - - 11 - 75 - true - - - - color: #464747; - - - Wallet - - - - - - - The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. - - - QLabel { color: red; } - - - (out of sync) - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - QFormLayout::AllNonFixedFieldsGrow - - - 12 - - - 12 - - - - - color: #464747; - - - Balance: - - - - - - - - 75 - true - - - - IBeamCursor - - - Your current balance - - - color: #464747; - - - 0 TRI - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - color: #464747; - - - Stake: - - - - - - - - 75 - true - - - - IBeamCursor - - - Total of coins that was staked, and do not yet count toward the current balance - - - color: #464747; - - - 0 TRI - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - color: #464747; - - - Unconfirmed: - - - - - - - - 75 - true - - - - IBeamCursor - - - Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - - - color: #464747; - - - 0 TRI - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - color: #464747; - - - Immature: - - - - - - - - 75 - true - - - - Mined balance that has not yet matured - - - color: #464747; - - - 0 TRI - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - color: #464747; - - - Number of transactions: - - - - - - - Total number of transactions in wallet - - - color: #464747; - - - 0 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 260 - 260 - - - - - - - :/images/backg - - - Qt::AlignCenter - - - 2 - - - 1 - - - - - - - - - - - #frame_2 { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(70,71,71,10), stop:1.0 rgba(70,71,71,0)); } - - - - - - - - color: #464747; - - - <b>Recent transactions</b> - - - - - - - The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. - - - QLabel { color: red; } - - - (out of sync) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - QListView { background: transparent; } - + - QFrame::NoFrame + QFrame::StyledPanel - - Qt::ScrollBarAlwaysOff + + QFrame::Plain - - Qt::ScrollBarAlwaysOff + + + + + + + + 11 + 75 + true + + + + Wallet + + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + QLabel { color: red; } + + + (out of sync) + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + QFormLayout::AllNonFixedFieldsGrow + + + 12 + + + 12 + + + + + Spendable: + + + + + + + + 75 + true + + + + IBeamCursor + + + Your current spendable balance + + + 0 TRI + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Stake: + + + + + + + + 75 + true + + + + IBeamCursor + + + Total of coins that was staked, and do not yet count toward the current balance + + + 0 TRI + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Unconfirmed: + + + + + + + + 75 + true + + + + IBeamCursor + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + 0 TRI + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Immature: + + + + + + + + 75 + true + + + + Mined balance that has not yet matured + + + 0 TRI + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Horizontal + + + + + + + + 12 + + + + Total: + + + + + + + + 12 + 75 + true + + + + IBeamCursor + + + Your current total balance + + + 0 TRI + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + + + + + Qt::Vertical - - QAbstractItemView::NoSelection + + + 20 + 40 + + + + + + + + + + + :/images/backg + + + Qt::AlignCenter + + + + + + + + + + :/images/wallet - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + + + + + QFrame::StyledPanel + + + QFrame::Plain + + + + + + + + <b>Recent transactions</b> + + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + QLabel { color: red; } + + + (out of sync) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + QListView { background: transparent; } + + + QFrame::NoFrame + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractItemView::NoSelection + + + + + + + a:link {color:#000;} /* unvisited link */ +a:visited {color:#000;} /* visited link */ +a:hover {color:#000;} /* mouse over link */ +a:active {color:#000;} /* selected link */ + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + + + + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + + + + + a:link {color:#000;} /* unvisited link */ +a:visited {color:#000;} /* visited link */ +a:hover {color:#000;} /* mouse over link */ +a:active {color:#000;} /* selected link */ + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://explorer.triangles.technology"> &#187; TRI block explorer</a></body> + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + + + + + + + +
- + diff --git a/src/qt/forms/qrcodedialog.ui b/src/qt/forms/qrcodedialog.ui index 52e9db3..7c3016a 100644 --- a/src/qt/forms/qrcodedialog.ui +++ b/src/qt/forms/qrcodedialog.ui @@ -140,7 +140,7 @@
- + false @@ -185,9 +185,9 @@ - BitcoinAmountField + TrianglesAmountField QSpinBox -
bitcoinamountfield.h
+
trianglesamountfield.h
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui index 9279548..93d065b 100644 --- a/src/qt/forms/rpcconsole.ui +++ b/src/qt/forms/rpcconsole.ui @@ -11,7 +11,7 @@ - triangles - Debug window + Triangles - Debug window @@ -36,7 +36,7 @@ - triangles Core + Triangles Core
@@ -322,7 +322,7 @@ - Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. &Open @@ -348,7 +348,7 @@ - Show the triangles-qt help message to get a list with possible triangles command-line options. + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. &Show @@ -430,7 +430,7 @@ - + :/icons/remove:/icons/remove @@ -450,7 +450,7 @@ - + diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui index 85c9097..c0dcb7e 100644 --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -13,800 +13,802 @@ Send Coins - - - 8 - + - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - - 6 - - - 0 - - - 0 - - - 0 - - - 6 - + + - - - 0 + + + + 0 + 0 + - - 10 + + + 16777215 + 16777215 + - - 10 + + QFrame::StyledPanel - - - - 15 - - - - - - 0 - 0 - - - - - 75 - true - - - - font-weight:bold; - - - Coin Control Features - - - - - - - - - 8 - - - 10 - - - - - - - - Inputs... - - - - - - - automatically selected - - - 5 - - - - - - - - 75 - true - - - - color:red;font-weight:bold; - - - Insufficient funds! - - - 5 - - - - - - - Qt::Horizontal - - - - 40 - 1 - - - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - - - + + QFrame::Sunken + + + + 6 + + + 0 + + + 0 + + + 0 + + + 6 + + + + 0 + + 10 + - 0 - - - 0 - - - 0 + 10 - - - 20 + + + 15 - - 0 + + + + + 0 + 0 + + + + + 75 + true + + + + font-weight:bold; + + + Coin Control Features + + + + + + + + + 8 10 - - - 10 + + + - - 14 + + Inputs... - - 10 - - - 4 - - - 6 - - - - - font-weight:bold; - - - Quantity: - - - 0 - - - - - - - - Monospace - 10 - - - - IBeamCursor - - - Qt::ActionsContextMenu - - - 0 - - - 0 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - font-weight:bold; - - - Bytes: - - - - - - - - Monospace - 10 - - - - IBeamCursor - - - Qt::ActionsContextMenu - - - 0 - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - + - - - 10 + + + automatically selected - - 14 + + 5 - - 6 - - - 4 - - - 6 - - - - - font-weight:bold; - - - Amount: - - - 0 - - - - - - - - Monospace - 10 - - - - IBeamCursor - - - Qt::ActionsContextMenu - - - 0.00 TRI - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - font-weight:bold; - - - Priority: - - - - - - - - Monospace - 10 - - - - IBeamCursor - - - Qt::ActionsContextMenu - - - medium - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - + - - - 10 + + + + 75 + true + - - 14 + + color:red;font-weight:bold; - - 6 + + Insufficient funds! - - 4 + + 5 - - 6 - - - - - font-weight:bold; - - - Fee: - - - 0 - - - - - - - - Monospace - 10 - - - - IBeamCursor - - - Qt::ActionsContextMenu - - - 0.00 TRI - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - font-weight:bold; - - - Low Output: - - - - - - - - Monospace - 10 - - - - IBeamCursor - - - Qt::ActionsContextMenu - - - no - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - + - - - 10 + + + Qt::Horizontal - - 14 + + + 40 + 1 + - - 6 - - - 4 - - - 6 - - - - - font-weight:bold; - - - After Fee: - - - 0 - - - - - - - - Monospace - 10 - - - - IBeamCursor - - - Qt::ActionsContextMenu - - - 0.00 TRI - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - font-weight:bold; - - - Change - - - - - - - - Monospace - 10 - - - - IBeamCursor - - - Qt::ActionsContextMenu - - - 0.00 TRI - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 20 + + + 0 + + + 10 + + + + + 10 + + + 14 + + + 10 + + + 4 + + + 6 + + + + + font-weight:bold; + + + Quantity: + + + 0 + + + + + + + + Monospace + 10 + + + + IBeamCursor + + + Qt::ActionsContextMenu + + + 0 + + + 0 + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + font-weight:bold; + + + Bytes: + + + + + + + + Monospace + 10 + + + + IBeamCursor + + + Qt::ActionsContextMenu + + + 0 + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + + 10 + + + 14 + + + 6 + + + 4 + + + 6 + + + + + font-weight:bold; + + + Amount: + + + 0 + + + + + + + + Monospace + 10 + + + + IBeamCursor + + + Qt::ActionsContextMenu + + + 0.00 TRI + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + font-weight:bold; + + + Priority: + + + + + + + + Monospace + 10 + + + + IBeamCursor + + + Qt::ActionsContextMenu + + + medium + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + + 10 + + + 14 + + + 6 + + + 4 + + + 6 + + + + + font-weight:bold; + + + Fee: + + + 0 + + + + + + + + Monospace + 10 + + + + IBeamCursor + + + Qt::ActionsContextMenu + + + 0.00 TRI + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + font-weight:bold; + + + Low Output: + + + + + + + + Monospace + 10 + + + + IBeamCursor + + + Qt::ActionsContextMenu + + + no + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + + 10 + + + 14 + + + 6 + + + 4 + + + 6 + + + + + font-weight:bold; + + + After Fee: + + + 0 + + + + + + + + Monospace + 10 + + + + IBeamCursor + + + Qt::ActionsContextMenu + + + 0.00 TRI + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + font-weight:bold; + + + Change + + + + + + + + Monospace + 10 + + + + IBeamCursor + + + Qt::ActionsContextMenu + + + 0.00 TRI + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + + + + + + + 12 + + + QLayout::SetDefaultConstraint + + + 5 + + + 5 + + + + + custom change address + + + + + + + false + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + 3 + + + + + + + + + Qt::Vertical + + + + 800 + 1 + + + + + + + + + + + + QFrame::NoFrame + + + true + + + + + 0 + 0 + 813 + 148 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 6 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + Send to multiple recipients at once + + + Add &Recipient + + + + :/icons/add:/icons/add + + + false + - + + + + 0 + 0 + + + + Remove all transaction fields + + + Clear &All + + + + :/icons/remove:/icons/remove + + + 300 + + + false + + + + + - 12 - - - QLayout::SetDefaultConstraint - - - 5 - - - 5 + 3 - - - custom change address - - - - - - - false - + - + 0 0 + + Balance: + - + - + 0 0 - - - 0 - 0 - + + IBeamCursor - + 123.456 TRI - - 3 + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - + - Qt::Vertical + Qt::Horizontal - 800 - 1 + 40 + 20 + + + + + 150 + 0 + + + + Confirm the send action + + + S&end + + + + :/icons/send:/icons/send + + + true + + + + scrollArea + frameCoinControl - - - - true - - - - - 0 - 0 - 824 - 141 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 6 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - Send to multiple recipients at once - - - Add &Recipient - - - - :/icons/add:/icons/add - - - false - - - - - - - - 0 - 0 - - - - Remove all transaction fields - - - Clear &All - - - - :/icons/remove:/icons/remove - - - 300 - - - false - - - - - - - 3 - - - - - - 0 - 0 - - - - #label { color: #464747; } - - - Balance: - - - - - - - - 0 - 0 - - - - IBeamCursor - - - #label { color: #464747; } - - - 123.456 TRI - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 150 - 0 - - - - Confirm the send action - - - S&end over Tor - - - - :/icons/send:/icons/send - - - true - - - - - - + diff --git a/src/qt/forms/sendcoinsentry.ui b/src/qt/forms/sendcoinsentry.ui index 6e2045a..5c43a49 100644 --- a/src/qt/forms/sendcoinsentry.ui +++ b/src/qt/forms/sendcoinsentry.ui @@ -7,7 +7,7 @@ 0 0 729 - 131 + 142 @@ -19,11 +19,24 @@ QFrame::Sunken - - - QFormLayout::AllNonFixedFieldsGrow + + + 12 - + + + + A&mount: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + payAmount + + + + Pay &To: @@ -36,85 +49,10 @@ - - - - 0 - - - - - The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) - - - 34 - - - - - - - Choose address from address book - - - - - - - :/icons/address-book:/icons/address-book - - - Alt+A - - - - - - - Paste address from clipboard - - - - - - - :/icons/editpaste:/icons/editpaste - - - Alt+P - - - - - - - Remove this recipient - - - - - - - :/icons/remove:/icons/remove - - - - + + - - - - &Label: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - addAsLabel - - - - + 0 @@ -131,29 +69,114 @@ - - + + - A&mount: + N&arration: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - payAmount + narration - - + + + + true + + + Enter a short note to send with payment (max 24 characters) + + + + + + + &Label: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + addAsLabel + + + + + + + 0 + + + + + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + 34 + + + + + + + Choose address from address book + + + + + + + :/icons/address-book:/icons/address-book + + + Alt+A + + + + + + + Paste address from clipboard + + + + + + + :/icons/editpaste:/icons/editpaste + + + Alt+P + + + + + + + Remove this recipient + + + + + + + :/icons/remove:/icons/remove + + + + - BitcoinAmountField + TrianglesAmountField QSpinBox -
bitcoinamountfield.h
+
trianglesamountfield.h
1
@@ -163,7 +186,7 @@
- + diff --git a/src/qt/forms/sendmessagesdialog.ui b/src/qt/forms/sendmessagesdialog.ui new file mode 100644 index 0000000..9a80c04 --- /dev/null +++ b/src/qt/forms/sendmessagesdialog.ui @@ -0,0 +1,256 @@ + + + SendMessagesDialog + + + + 0 + 0 + 850 + 400 + + + + Send Messages + + + + 8 + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + Address &From: + + + addressFrom + + + + + + + 1 + + + + + + + + Choose address from address book + + + + + + + :/icons/address-book:/icons/address-book + + + Alt+A + + + + + + + Paste address from clipboard + + + + + + + :/icons/editpaste:/icons/editpaste + + + Alt+P + + + + + + + + + + + + true + + + + + 0 + 0 + 830 + 279 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 6 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + Send to multiple recipients at once + + + Add &Recipient + + + + :/icons/add:/icons/add + + + false + + + + + + + + 0 + 0 + + + + Remove all transaction fields + + + Clear &All + + + + :/icons/remove:/icons/remove + + + 300 + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 150 + 0 + + + + Confirm the send action + + + S&end + + + + :/icons/send:/icons/send + + + true + + + + + + + &Close + + + + :/icons/quit:/icons/quit + + + + + + + + + + QValidatedLineEdit + QLineEdit +
qvalidatedlineedit.h
+
+
+ + + + +
diff --git a/src/qt/forms/sendmessagesentry.ui b/src/qt/forms/sendmessagesentry.ui new file mode 100644 index 0000000..d4ef6cf --- /dev/null +++ b/src/qt/forms/sendmessagesentry.ui @@ -0,0 +1,184 @@ + + + SendMessagesEntry + + + + 0 + 0 + 729 + 236 + + + + Form + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + 12 + + + + + 0 + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + 34 + + + + + + + Choose address from address book + + + + + + + :/icons/address-book:/icons/address-book + + + Alt+A + + + + + + + Paste address from clipboard + + + + + + + :/icons/editpaste:/icons/editpaste + + + Alt+P + + + + + + + Remove this recipient + + + + + + + :/icons/remove:/icons/remove + + + + + + + + + &Message: + + + Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing + + + messageText + + + + + + + Send &To: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + sendTo + + + + + + + true + + + Qt::WheelFocus + + + false + + + + + + + true + + + Enter a label for this address to add it to your address book + + + + + + + &Label: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + addAsLabel + + + + + + + &Public Key: + + + publicKey + + + + + + + + + + + QValidatedLineEdit + QLineEdit +
qvalidatedlineedit.h
+
+ + QValidatedTextEdit + QPlainTextEdit +
qvalidatedtextedit.h
+
+
+ + + + +
diff --git a/src/qt/forms/signverifymessagedialog.ui b/src/qt/forms/signverifymessagedialog.ui index 3f3ed40..c31de56 100644 --- a/src/qt/forms/signverifymessagedialog.ui +++ b/src/qt/forms/signverifymessagedialog.ui @@ -48,7 +48,7 @@ - The address to sign the message with (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) 34 @@ -64,7 +64,7 @@ - + :/icons/address-book:/icons/address-book @@ -84,7 +84,7 @@ - + :/icons/editpaste:/icons/editpaste @@ -130,7 +130,7 @@ - + :/icons/editcopy:/icons/editcopy @@ -145,13 +145,13 @@ - Sign the message to prove you own this triangles address + Sign the message to prove you own this TRI address &Sign Message - + :/icons/edit:/icons/edit @@ -168,7 +168,7 @@ Clear &All - + :/icons/remove:/icons/remove @@ -251,7 +251,7 @@ - The address the message was signed with (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) 34 @@ -267,7 +267,7 @@ - + :/icons/address-book:/icons/address-book @@ -291,13 +291,13 @@ - Verify the message to ensure it was signed with the specified triangles address + Verify the message to ensure it was signed with the specified TRI address &Verify Message - + :/icons/transaction_0:/icons/transaction_0 @@ -314,7 +314,7 @@ Clear &All - + :/icons/remove:/icons/remove @@ -380,7 +380,7 @@ - + diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h index 405ba39..1eeffef 100644 --- a/src/qt/guiconstants.h +++ b/src/qt/guiconstants.h @@ -7,14 +7,14 @@ static const int MODEL_UPDATE_DELAY = 500; /* AskPassphraseDialog -- Maximum passphrase length */ static const int MAX_PASSPHRASE_SIZE = 1024; -/* BitcoinGUI -- Size of icons in status bar */ +/* TrianglesTrianglesGUI -- Size of icons in status bar */ static const int STATUSBAR_ICONSIZE = 16; /* Invalid field background style */ #define STYLE_INVALID "background:#FF8080" /* Transaction list -- unconfirmed transaction */ -#define COLOR_UNCONFIRMED QColor(128, 128, 128) +#define COLOR_UNCONFIRMED QColor(190, 190, 190) /* Transaction list -- negative amount */ #define COLOR_NEGATIVE QColor(255, 0, 0) /* Transaction list -- bare address (without label) */ diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 7ec933b..ab7cfc6 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -1,7 +1,7 @@ #include "guiutil.h" -#include "bitcoinaddressvalidator.h" +#include "trianglesaddressvalidator.h" #include "walletmodel.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "util.h" #include "init.h" @@ -52,7 +52,7 @@ QString dateTimeStr(qint64 nTime) return dateTimeStr(QDateTime::fromTime_t((qint32)nTime)); } -QFont bitcoinAddressFont() +QFont trianglesAddressFont() { QFont font("Monospace"); font.setStyleHint(QFont::TypeWriter); @@ -61,9 +61,9 @@ QFont bitcoinAddressFont() void setupAddressWidget(QLineEdit *widget, QWidget *parent) { - widget->setMaxLength(BitcoinAddressValidator::MaxAddressLength); - widget->setValidator(new BitcoinAddressValidator(parent)); - widget->setFont(bitcoinAddressFont()); + widget->setMaxLength(TrianglesAddressValidator::MaxAddressLength); + widget->setValidator(new TrianglesAddressValidator(parent)); + widget->setFont(trianglesAddressFont()); } void setupAmountWidget(QLineEdit *widget, QWidget *parent) @@ -75,9 +75,10 @@ void setupAmountWidget(QLineEdit *widget, QWidget *parent) widget->setAlignment(Qt::AlignRight|Qt::AlignVCenter); } -bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out) +bool parseTrianglesURI(const QUrl &uri, SendCoinsRecipient *out) { - if(uri.scheme() != QString("bitcoin")) + // triangles: check prefix + if(uri.scheme() != QString("Triangles")) return false; SendCoinsRecipient rv; @@ -102,7 +103,7 @@ bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out) { if(!i->second.isEmpty()) { - if(!BitcoinUnits::parse(BitcoinUnits::BTC, i->second, &rv.amount)) + if(!TrianglesUnits::parse(TrianglesUnits::TRI, i->second, &rv.amount)) { return false; } @@ -120,18 +121,18 @@ bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out) return true; } -bool parseBitcoinURI(QString uri, SendCoinsRecipient *out) +bool parseTrianglesURI(QString uri, SendCoinsRecipient *out) { - // Convert bitcoin:// to bitcoin: + // Convert Triangles:// to Triangles: // - // Cannot handle this later, because bitcoin:// will cause Qt to see the part after // as host, + // Cannot handle this later, because Triangles:// will cause Qt to see the part after // as host, // which will lower-case it (and thus invalidate the address). - if(uri.startsWith("bitcoin://")) + if(uri.startsWith("Triangles://")) { - uri.replace(0, 10, "bitcoin:"); + uri.replace(0, 12, "Triangles:"); } QUrl uriInstance(uri); - return parseBitcoinURI(uriInstance, out); + return parseTrianglesURI(uriInstance, out); } QString HtmlEscape(const QString& str, bool fMultiLine) @@ -257,11 +258,11 @@ bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt) { QWidget *widget = static_cast(obj); QString tooltip = widget->toolTip(); - if(tooltip.size() > size_threshold && !tooltip.startsWith("") && !Qt::mightBeRichText(tooltip)) + if(tooltip.size() > size_threshold && !tooltip.startsWith("") && !Qt::mightBeRichText(tooltip)) { // Prefix to make sure Qt detects this as rich text // Escape the current message as HTML and replace \n by
- tooltip = "" + HtmlEscape(tooltip, true); + tooltip = "" + HtmlEscape(tooltip, true) + ""; widget->setToolTip(tooltip); return true; } @@ -277,7 +278,7 @@ boost::filesystem::path static StartupShortcutPath() bool GetStartOnSystemStartup() { - // check for Bitcoin.lnk + // check for triangles.lnk return boost::filesystem::exists(StartupShortcutPath()); } @@ -392,7 +393,7 @@ bool SetStartOnSystemStartup(bool fAutoStart) boost::filesystem::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out|std::ios_base::trunc); if (!optionFile.good()) return false; - // Write a bitcoin.desktop file to the autostart directory: + // Write a triangles.desktop file to the autostart directory: optionFile << "[Desktop Entry]\n"; optionFile << "Type=Application\n"; optionFile << "Name=triangles\n"; @@ -416,7 +417,7 @@ bool SetStartOnSystemStartup(bool fAutoStart) { return false; } HelpMessageBox::HelpMessageBox(QWidget *parent) : QMessageBox(parent) { - header = tr("triangles-qt") + " " + tr("version") + " " + + header = tr("Triangles-Qt") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion()) + "\n\n" + tr("Usage:") + "\n" + " triangles-qt [" + tr("command-line options") + "] " + "\n"; @@ -428,7 +429,7 @@ HelpMessageBox::HelpMessageBox(QWidget *parent) : " -min " + tr("Start minimized") + "\n" + " -splash " + tr("Show splash screen on startup (default: 1)") + "\n"; - setWindowTitle(tr("triangles-qt")); + setWindowTitle(tr("Triangles-Qt")); setTextFormat(Qt::PlainText); // setMinimumWidth is ignored for QMessageBox so put in non-breaking spaces to make it wider. setText(header + QString(QChar(0x2003)).repeated(50)); diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index db100bd..4270893 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -15,7 +15,7 @@ class QAbstractItemView; QT_END_NAMESPACE class SendCoinsRecipient; -/** Utility functions used by the Bitcoin Qt UI. +/** Utility functions used by the Triangles Qt UI. */ namespace GUIUtil { @@ -23,17 +23,17 @@ namespace GUIUtil QString dateTimeStr(const QDateTime &datetime); QString dateTimeStr(qint64 nTime); - // Render Bitcoin addresses in monospace font - QFont bitcoinAddressFont(); + // Render TRI addresses in monospace font + QFont trianglesAddressFont(); // Set up widgets for address and amounts void setupAddressWidget(QLineEdit *widget, QWidget *parent); void setupAmountWidget(QLineEdit *widget, QWidget *parent); - // 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); + // Parse "Triangles:" URI into recipient object, return true on successful parsing + // See Triangles URI definition discussion here: https://bitcointalk.org/index.php?topic=33490.0 + bool parseTrianglesURI(const QUrl &uri, SendCoinsRecipient *out); + bool parseTrianglesURI(QString uri, SendCoinsRecipient *out); // HTML escaping for rich text controls QString HtmlEscape(const QString& str, bool fMultiLine=false); @@ -95,7 +95,7 @@ namespace GUIUtil bool GetStartOnSystemStartup(); bool SetStartOnSystemStartup(bool fAutoStart); - /** Help message for Bitcoin-Qt, shown with --help. */ + /** Help message for Triangles-Qt, shown with --help. */ class HelpMessageBox : public QMessageBox { Q_OBJECT diff --git a/src/qt/locale/bitcoin_ar.qm b/src/qt/locale/bitcoin_ar.qm deleted file mode 100644 index f7b157c..0000000 Binary files a/src/qt/locale/bitcoin_ar.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_bs.ts b/src/qt/locale/bitcoin_bs.ts deleted file mode 100644 index 335aa73..0000000 --- a/src/qt/locale/bitcoin_bs.ts +++ /dev/null @@ -1,3285 +0,0 @@ - - - AboutDialog - - - About buynowcoin - - - - - <b>buynowcoin</b> version - - - - - Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - - - - - -This is experimental software. - -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. - - - - - AddressBookPage - - - Address Book - - - - - Double-click to edit address or label - - - - - Create a new address - - - - - Copy the currently selected address to the system clipboard - - - - - &New Address - - - - - These are your buynowcoin 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. - - - - - &Copy Address - - - - - Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - - - - - &Delete - - - - - Copy &Label - - - - - &Edit - - - - - Export Address Book Data - - - - - Comma separated file (*.csv) - - - - - Error exporting - - - - - Could not write to file %1. - - - - - AddressTableModel - - - Label - - - - - Address - - - - - (no label) - - - - - AskPassphraseDialog - - - Passphrase Dialog - - - - - Enter passphrase - - - - - New passphrase - - - - - Repeat new passphrase - - - - - Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - - - - - For staking only - - - - - 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>. - - - - - Encrypt wallet - - - - - This operation needs your wallet passphrase to unlock the wallet. - - - - - Unlock wallet - - - - - This operation needs your wallet passphrase to decrypt the wallet. - - - - - Decrypt wallet - - - - - Change passphrase - - - - - Enter the old and new passphrase to the wallet. - - - - - Confirm wallet encryption - - - - - Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - - - - - Are you sure you wish to encrypt your wallet? - - - - - IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - - - - - - Warning: The Caps Lock key is on! - - - - - - Wallet encrypted - - - - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - - - - - - - - Wallet encryption failed - - - - - Wallet encryption failed due to an internal error. Your wallet was not encrypted. - - - - - - The supplied passphrases do not match. - - - - - Wallet unlock failed - - - - - - - The passphrase entered for the wallet decryption was incorrect. - - - - - Wallet decryption failed - - - - - Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - - - - - &Overview - - - - - Show general overview of wallet - - - - - &Transactions - - - - - Browse transaction history - - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - - - - - &Settings - - - - - &Help - - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - - - ClientModel - - - Network Alert - - - - - CoinControlDialog - - - Coin Control - - - - - Quantity: - - - - - Bytes: - - - - - Amount: - - - - - Priority: - - - - - Fee: - - - - - Low Output: - - - - - no - - - - - After Fee: - - - - - Change: - - - - - (un)select all - - - - - Tree mode - - - - - List mode - - - - - Amount - - - - - Label - - - - - Address - - - - - Date - - - - - Confirmations - - - - - Confirmed - - - - - Priority - - - - - Copy address - - - - - Copy label - - - - - - Copy amount - - - - - Copy transaction ID - - - - - Copy quantity - - - - - Copy fee - - - - - Copy after fee - - - - - Copy bytes - - - - - Copy priority - - - - - Copy low output - - - - - Copy change - - - - - highest - - - - - high - - - - - medium-high - - - - - medium - - - - - low-medium - - - - - low - - - - - lowest - - - - - DUST - - - - - yes - - - - - This label turns red, if the transaction size is bigger than 10000 bytes. - - This means a fee of at least %1 per kb is required. - - Can vary +/- 1 Byte per input. - - - - - Transactions with higher priority get more likely into a block. - -This label turns red, if the priority is smaller than "medium". - - This means a fee of at least %1 per kb is required. - - - - - This label turns red, if any recipient receives an amount smaller than %1. - - This means a fee of at least %2 is required. - - Amounts below 0.546 times the minimum relay fee are shown as DUST. - - - - - This label turns red, if the change is smaller than %1. - - This means a fee of at least %2 is required. - - - - - - (no label) - - - - - change from %1 (%2) - - - - - (change) - - - - - EditAddressDialog - - - Edit Address - - - - - &Label - - - - - The label associated with this address book entry - - - - - &Address - - - - - The address associated with this address book entry. This can only be modified for sending addresses. - - - - - New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - - - - - Could not unlock wallet. - - - - - New key generation failed. - - - - - GUIUtil::HelpMessageBox - - - - buynowcoin-Qt - - - - - version - - - - - Usage: - - - - - command-line options - - - - - UI options - - - - - Set language, for example "de_DE" (default: system locale) - - - - - Start minimized - - - - - Show splash screen on startup (default: 1) - - - - - OptionsDialog - - - Options - - - - - &Main - - - - - Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - - - - - Pay transaction &fee - - - - - Reserved amount does not participate in staking and is therefore spendable at any time. - - - - - Reserve - - - - - Automatically start buynowcoin after logging in to the system. - - - - - &Start buynowcoin on system login - - - - - 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. - - - - - &Detach databases at shutdown - - - - - &Network - - - - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - - - - - Map port using &UPnP - - - - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - - - - - &Connect through SOCKS proxy: - - - - - Proxy &IP: - - - - - IP address of the proxy (e.g. 127.0.0.1) - - - - - &Port: - - - - - Port of the proxy (e.g. 9050) - - - - - SOCKS &Version: - - - - - SOCKS version of the proxy (e.g. 5) - - - - - &Window - - - - - Show only a tray icon after minimizing the window. - - - - - &Minimize to the tray instead of the taskbar - - - - - 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. - - - - - M&inimize on close - - - - - &Display - - - - - User Interface &language: - - - - - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - - - - - &Unit to show amounts in: - - - - - Choose the default subdivision unit to show in the interface and when sending coins. - - - - - Whether to show buynowcoin addresses in the transaction list or not. - - - - - &Display addresses in transaction list - - - - - Whether to show coin control features or not. - - - - - Display coin &control features (experts only!) - - - - - &OK - - - - - &Cancel - - - - - &Apply - - - - - default - - - - - - Warning - - - - - - This setting will take effect after restarting buynowcoin. - - - - - The supplied proxy address is invalid. - - - - - OverviewPage - - - Form - - - - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - - - - - Stake: - - - - - Unconfirmed: - - - - - Wallet - - - - - Spendable: - - - - - Your current spendable balance - - - - - Immature: - - - - - Mined balance that has not yet matured - - - - - Total: - - - - - Your current total balance - - - - - <b>Recent transactions</b> - - - - - Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - - - - - Total of coins that was staked, and do not yet count toward the current balance - - - - - - out of sync - - - - - QRCodeDialog - - - QR Code Dialog - - - - - Request Payment - - - - - Amount: - - - - - Label: - - - - - Message: - - - - - &Save As... - - - - - Error encoding URI into QR Code. - - - - - The entered amount is invalid, please check. - - - - - Resulting URI too long, try to reduce the text for label / message. - - - - - Save QR Code - - - - - PNG Images (*.png) - - - - - RPCConsole - - - Client name - - - - - - - - - - - - - - N/A - - - - - Client version - - - - - &Information - - - - - Using OpenSSL version - - - - - Startup time - - - - - Network - - - - - Number of connections - - - - - On testnet - - - - - Block chain - - - - - Current number of blocks - - - - - Estimated total blocks - - - - - Last block time - - - - - &Open - - - - - Command-line options - - - - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - - &Show - - - - - &Console - - - - - Build date - - - - - buynowcoin - Debug window - - - - - buynowcoin Core - - - - - Debug log file - - - - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - - - - - Clear console - - - - - Welcome to the buynowcoin RPC console. - - - - - Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - - - - - Type <b>help</b> for an overview of available commands. - - - - - SendCoinsDialog - - - - - - - - - - Send Coins - - - - - Coin Control Features - - - - - Inputs... - - - - - automatically selected - - - - - Insufficient funds! - - - - - Quantity: - - - - - - 0 - - - - - Bytes: - - - - - Amount: - - - - - - - - 0.00 BTC - - - - - Priority: - - - - - medium - - - - - Fee: - - - - - Low Output: - - - - - no - - - - - After Fee: - - - - - Change - - - - - custom change address - - - - - Send to multiple recipients at once - - - - - Add &Recipient - - - - - Remove all transaction fields - - - - - Clear &All - - - - - Balance: - - - - - 123.456 BTC - - - - - Confirm the send action - - - - - S&end - - - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Copy quantity - - - - - Copy amount - - - - - Copy fee - - - - - Copy after fee - - - - - Copy bytes - - - - - Copy priority - - - - - Copy low output - - - - - Copy change - - - - - <b>%1</b> to %2 (%3) - - - - - Confirm send coins - - - - - Are you sure you want to send %1? - - - - - and - - - - - The recipient address is not valid, please recheck. - - - - - The amount to pay must be larger than 0. - - - - - The amount exceeds your balance. - - - - - The total exceeds your balance when the %1 transaction fee is included. - - - - - Duplicate address found, can only send to each address once per send operation. - - - - - Error: Transaction creation failed. - - - - - 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. - - - - - WARNING: Invalid buynowcoin address - - - - - (no label) - - - - - WARNING: unknown change address - - - - - SendCoinsEntry - - - Form - - - - - A&mount: - - - - - Pay &To: - - - - - - Enter a label for this address to add it to your address book - - - - - &Label: - - - - - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Choose address from address book - - - - - Alt+A - Alt+A - - - - Paste address from clipboard - - - - - Alt+P - Alt+P - - - - Remove this recipient - - - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - SignVerifyMessageDialog - - - Signatures - Sign / Verify a Message - - - - - - &Sign Message - - - - - 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. - - - - - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - - Choose an address from the address book - - - - - - Alt+A - Alt+A - - - - Paste address from clipboard - - - - - Alt+P - Alt+P - - - - Enter the message you want to sign here - - - - - Copy the current signature to the system clipboard - - - - - Sign the message to prove you own this buynowcoin address - - - - - Reset all sign message fields - - - - - - Clear &All - - - - - - &Verify Message - - - - - 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. - - - - - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - - Reset all verify message fields - - - - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Click "Sign Message" to generate signature - - - - - Enter buynowcoin signature - - - - - - The entered address is invalid. - - - - - - - - Please check the address and try again. - - - - - - The entered address does not refer to a key. - - - - - Wallet unlock was cancelled. - - - - - Private key for the entered address is not available. - - - - - Message signing failed. - - - - - Message signed. - - - - - The signature could not be decoded. - - - - - - Please check the signature and try again. - - - - - The signature did not match the message digest. - - - - - Message verification failed. - - - - - Message verified. - - - - - TransactionDesc - - - Open until %1 - - - - - Open for %n block(s) - - - - - conflicted - - - - - %1/offline - - - - - %1/unconfirmed - - - - - %1 confirmations - - - - - Status - - - - - , broadcast through %n node(s) - - - - - Date - - - - - Source - - - - - Generated - - - - - - From - - - - - - - To - - - - - - own address - - - - - label - - - - - - - - - Credit - - - - - matures in %n more block(s) - - - - - not accepted - - - - - - - - Debit - - - - - Transaction fee - - - - - Net amount - - - - - Message - - - - - Comment - - - - - Transaction ID - - - - - Generated coins must mature 510 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. - - - - - Debug information - - - - - Transaction - - - - - Inputs - - - - - Amount - - - - - true - - - - - false - - - - - , has not been successfully broadcast yet - - - - - unknown - - - - - TransactionDescDialog - - - Transaction details - - - - - This pane shows a detailed description of the transaction - - - - - TransactionTableModel - - - Date - - - - - Type - - - - - Address - - - - - Amount - - - - - Open until %1 - - - - - Confirmed (%1 confirmations) - - - - - Open for %n more block(s) - - - - - Offline - - - - - Unconfirmed - - - - - Confirming (%1 of %2 recommended confirmations) - - - - - Conflicted - - - - - Immature (%1 confirmations, will be available after %2) - - - - - This block was not received by any other nodes and will probably not be accepted! - - - - - Generated but not accepted - - - - - Received with - - - - - Received from - - - - - Sent to - - - - - Payment to yourself - - - - - Mined - - - - - (n/a) - - - - - Transaction status. Hover over this field to show number of confirmations. - - - - - Date and time that the transaction was received. - - - - - Type of transaction. - - - - - Destination address of transaction. - - - - - Amount removed from or added to balance. - - - - - TransactionView - - - - All - Sve - - - - Today - Danas - - - - This week - - - - - This month - Ovaj mjesec - - - - Last month - Prošli mjesec - - - - This year - Ove godine - - - - Range... - - - - - Received with - - - - - Sent to - - - - - To yourself - - - - - Mined - - - - - Other - - - - - Enter address or label to search - - - - - Min amount - - - - - Copy address - - - - - Copy label - - - - - Copy amount - - - - - Copy transaction ID - - - - - Edit label - - - - - Show transaction details - - - - - Export Transaction Data - - - - - Comma separated file (*.csv) - - - - - Confirmed - - - - - Date - - - - - Type - - - - - Label - - - - - Address - - - - - Amount - - - - - ID - - - - - Error exporting - - - - - Could not write to file %1. - - - - - Range: - - - - - to - - - - - WalletModel - - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - - Usage: - - - - - Send command to -server or buynowcoind - - - - - List commands - - - - - Get help for a command - - - - - Options: - - - - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - - Specify wallet file (within data directory) - - - - - Specify data directory - - - - - Set database cache size in megabytes (default: 25) - - - - - Set database disk log size in megabytes (default: 100) - - - - - Listen for connections on <port> (default: 15714 or testnet: 25714) - - - - - Maintain at most <n> connections to peers (default: 125) - - - - - Connect to a node to retrieve peer addresses, and disconnect - - - - - Specify your own public address - - - - - Bind to given address. Use [host]:port notation for IPv6 - - - - - Stake your coins to support network and gain reward (default: 1) - - - - - Threshold for disconnecting misbehaving peers (default: 100) - - - - - Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - - - - - An error occurred while setting up the RPC port %u for listening on IPv4: %s - - - - - Detach block and address databases. Increases shutdown time (default: 0) - - - - - 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. - - - - - Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - - - - - Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - - - - - Accept command line and JSON-RPC commands - - - - - Error: Transaction creation failed - - - - - Error: Wallet locked, unable to create transaction - - - - - Importing blockchain data file. - - - - - Importing bootstrap blockchain data file. - - - - - Run in the background as a daemon and accept commands - - - - - Use the test network - - - - - Accept connections from outside (default: 1 if no -proxy or -connect) - - - - - An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - - - - - Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - - - - - Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - - - - - Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - - - - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - - Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - - - - - Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - - - - - Attempt to recover private keys from a corrupt wallet.dat - - - - - Block creation options: - - - - - Connect only to the specified node(s) - - - - - Discover own IP address (default: 1 when listening and no -externalip) - - - - - Failed to listen on any port. Use -listen=0 if you want this. - - - - - Find peers using DNS lookup (default: 1) - - - - - Sync checkpoints policy (default: strict) - - - - - Invalid -tor address: '%s' - - - - - Invalid amount for -reservebalance=<amount> - - - - - Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - - - - - Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - - - - - Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - - - - - Output extra debugging information. Implies all other -debug* options - - - - - Output extra network debugging information - - - - - Prepend debug output with timestamp - - - - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - - Select the version of socks proxy to use (4-5, default: 5) - - - - - Send trace/debug info to console instead of debug.log file - - - - - Send trace/debug info to debugger - - - - - Set maximum block size in bytes (default: 250000) - - - - - Set minimum block size in bytes (default: 0) - - - - - Shrink debug.log file on client startup (default: 1 when no -debug) - - - - - Specify connection timeout in milliseconds (default: 5000) - - - - - Unable to sign checkpoint, wrong checkpointkey? - - - - - - Use UPnP to map the listening port (default: 0) - - - - - Use UPnP to map the listening port (default: 1 when listening) - - - - - Use proxy to reach tor hidden services (default: same as -proxy) - - - - - Username for JSON-RPC connections - - - - - Verifying database integrity... - - - - - WARNING: syncronized checkpoint violation detected, but skipped! - - - - - Warning: Disk space is low! - - - - - Warning: This version is obsolete, upgrade required! - - - - - wallet.dat corrupt, salvage failed - - - - - Password for JSON-RPC connections - - - - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - - - - - Find peers using internet relay chat (default: 0) - - - - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - - Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - - - - - Loading wallet... - - - - - Cannot downgrade wallet - - - - - Cannot initialize keypool - - - - - Cannot write default address - - - - - Rescanning... - - - - - Done loading - - - - - To use the %s option - - - - - Error - - - - - You must set rpcpassword=<password> in the configuration file: -%s -If the file does not exist, create it with owner-readable-only file permissions. - - - - \ No newline at end of file diff --git a/src/qt/locale/bitcoin_ca.qm b/src/qt/locale/bitcoin_ca.qm deleted file mode 100644 index 66cf381..0000000 Binary files a/src/qt/locale/bitcoin_ca.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_ca_ES.qm b/src/qt/locale/bitcoin_ca_ES.qm deleted file mode 100644 index c6d07f8..0000000 Binary files a/src/qt/locale/bitcoin_ca_ES.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_cs.qm b/src/qt/locale/bitcoin_cs.qm deleted file mode 100644 index bb08e7e..0000000 Binary files a/src/qt/locale/bitcoin_cs.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_cy.qm b/src/qt/locale/bitcoin_cy.qm deleted file mode 100644 index e2745a7..0000000 Binary files a/src/qt/locale/bitcoin_cy.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_da.qm b/src/qt/locale/bitcoin_da.qm deleted file mode 100644 index 86402c6..0000000 Binary files a/src/qt/locale/bitcoin_da.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_de.qm b/src/qt/locale/bitcoin_de.qm deleted file mode 100644 index 8558f85..0000000 Binary files a/src/qt/locale/bitcoin_de.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_en.qm b/src/qt/locale/bitcoin_en.qm deleted file mode 100644 index e94040a..0000000 Binary files a/src/qt/locale/bitcoin_en.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_eo.qm b/src/qt/locale/bitcoin_eo.qm deleted file mode 100644 index 2851f01..0000000 Binary files a/src/qt/locale/bitcoin_eo.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_es.qm b/src/qt/locale/bitcoin_es.qm deleted file mode 100644 index 689ae28..0000000 Binary files a/src/qt/locale/bitcoin_es.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_es_CL.qm b/src/qt/locale/bitcoin_es_CL.qm deleted file mode 100644 index 99000e5..0000000 Binary files a/src/qt/locale/bitcoin_es_CL.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_es_UY.qm b/src/qt/locale/bitcoin_es_UY.qm deleted file mode 100644 index e8d3e13..0000000 Binary files a/src/qt/locale/bitcoin_es_UY.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_fa_IR.qm b/src/qt/locale/bitcoin_fa_IR.qm deleted file mode 100644 index b7e4053..0000000 Binary files a/src/qt/locale/bitcoin_fa_IR.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_fi.qm b/src/qt/locale/bitcoin_fi.qm deleted file mode 100644 index e9b3203..0000000 Binary files a/src/qt/locale/bitcoin_fi.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_fr.qm b/src/qt/locale/bitcoin_fr.qm deleted file mode 100644 index b5b81aa..0000000 Binary files a/src/qt/locale/bitcoin_fr.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_fr_CA.qm b/src/qt/locale/bitcoin_fr_CA.qm deleted file mode 100644 index 0153c52..0000000 Binary files a/src/qt/locale/bitcoin_fr_CA.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_hr.qm b/src/qt/locale/bitcoin_hr.qm deleted file mode 100644 index 30ef8a7..0000000 Binary files a/src/qt/locale/bitcoin_hr.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_hu.qm b/src/qt/locale/bitcoin_hu.qm deleted file mode 100644 index 7d6f227..0000000 Binary files a/src/qt/locale/bitcoin_hu.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_id_ID.qm b/src/qt/locale/bitcoin_id_ID.qm deleted file mode 100644 index 8264923..0000000 Binary files a/src/qt/locale/bitcoin_id_ID.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_it.qm b/src/qt/locale/bitcoin_it.qm deleted file mode 100644 index cf07101..0000000 Binary files a/src/qt/locale/bitcoin_it.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_ja.qm b/src/qt/locale/bitcoin_ja.qm deleted file mode 100644 index dbd770a..0000000 Binary files a/src/qt/locale/bitcoin_ja.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_ky.qm b/src/qt/locale/bitcoin_ky.qm deleted file mode 100644 index df83eb2..0000000 Binary files a/src/qt/locale/bitcoin_ky.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_la.qm b/src/qt/locale/bitcoin_la.qm deleted file mode 100644 index e8fb424..0000000 Binary files a/src/qt/locale/bitcoin_la.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_lv_LV.qm b/src/qt/locale/bitcoin_lv_LV.qm deleted file mode 100644 index b0a8fb5..0000000 Binary files a/src/qt/locale/bitcoin_lv_LV.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_ms_MY.qm b/src/qt/locale/bitcoin_ms_MY.qm deleted file mode 100644 index 0cb196f..0000000 Binary files a/src/qt/locale/bitcoin_ms_MY.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_nb.qm b/src/qt/locale/bitcoin_nb.qm deleted file mode 100644 index 14b3f53..0000000 Binary files a/src/qt/locale/bitcoin_nb.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_nl.qm b/src/qt/locale/bitcoin_nl.qm deleted file mode 100644 index 6e53efc..0000000 Binary files a/src/qt/locale/bitcoin_nl.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_pt_BR.qm b/src/qt/locale/bitcoin_pt_BR.qm deleted file mode 100644 index 5f83e27..0000000 Binary files a/src/qt/locale/bitcoin_pt_BR.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_ro_RO.qm b/src/qt/locale/bitcoin_ro_RO.qm deleted file mode 100644 index c14bfed..0000000 Binary files a/src/qt/locale/bitcoin_ro_RO.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_ru.qm b/src/qt/locale/bitcoin_ru.qm deleted file mode 100644 index 1d7d8fd..0000000 Binary files a/src/qt/locale/bitcoin_ru.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_sah.ts b/src/qt/locale/bitcoin_sah.ts deleted file mode 100644 index 56742e6..0000000 --- a/src/qt/locale/bitcoin_sah.ts +++ /dev/null @@ -1,3285 +0,0 @@ - - - AboutDialog - - - About buynowcoin - - - - - <b>buynowcoin</b> version - - - - - Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - - - - - -This is experimental software. - -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. - - - - - AddressBookPage - - - Address Book - - - - - Double-click to edit address or label - Аадырыскын уларытаргар иккитэ баттаа - - - - Create a new address - - - - - Copy the currently selected address to the system clipboard - - - - - &New Address - - - - - These are your buynowcoin 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. - - - - - &Copy Address - - - - - Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - - - - - &Delete - - - - - Copy &Label - - - - - &Edit - - - - - Export Address Book Data - - - - - Comma separated file (*.csv) - - - - - Error exporting - - - - - Could not write to file %1. - - - - - AddressTableModel - - - Label - - - - - Address - - - - - (no label) - - - - - AskPassphraseDialog - - - Passphrase Dialog - - - - - Enter passphrase - - - - - New passphrase - - - - - Repeat new passphrase - - - - - Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - - - - - For staking only - - - - - 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>. - - - - - Encrypt wallet - - - - - This operation needs your wallet passphrase to unlock the wallet. - - - - - Unlock wallet - - - - - This operation needs your wallet passphrase to decrypt the wallet. - - - - - Decrypt wallet - - - - - Change passphrase - - - - - Enter the old and new passphrase to the wallet. - - - - - Confirm wallet encryption - - - - - Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - - - - - Are you sure you wish to encrypt your wallet? - - - - - IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - - - - - - Warning: The Caps Lock key is on! - - - - - - Wallet encrypted - - - - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - - - - - - - - Wallet encryption failed - - - - - Wallet encryption failed due to an internal error. Your wallet was not encrypted. - - - - - - The supplied passphrases do not match. - - - - - Wallet unlock failed - - - - - - - The passphrase entered for the wallet decryption was incorrect. - - - - - Wallet decryption failed - - - - - Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - - - - - &Overview - - - - - Show general overview of wallet - - - - - &Transactions - - - - - Browse transaction history - - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - - - - - &Settings - - - - - &Help - - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - - - ClientModel - - - Network Alert - - - - - CoinControlDialog - - - Coin Control - - - - - Quantity: - - - - - Bytes: - - - - - Amount: - - - - - Priority: - - - - - Fee: - - - - - Low Output: - - - - - no - - - - - After Fee: - - - - - Change: - - - - - (un)select all - - - - - Tree mode - - - - - List mode - - - - - Amount - - - - - Label - - - - - Address - - - - - Date - - - - - Confirmations - - - - - Confirmed - - - - - Priority - - - - - Copy address - - - - - Copy label - - - - - - Copy amount - - - - - Copy transaction ID - - - - - Copy quantity - - - - - Copy fee - - - - - Copy after fee - - - - - Copy bytes - - - - - Copy priority - - - - - Copy low output - - - - - Copy change - - - - - highest - - - - - high - - - - - medium-high - - - - - medium - - - - - low-medium - - - - - low - - - - - lowest - - - - - DUST - - - - - yes - - - - - This label turns red, if the transaction size is bigger than 10000 bytes. - - This means a fee of at least %1 per kb is required. - - Can vary +/- 1 Byte per input. - - - - - Transactions with higher priority get more likely into a block. - -This label turns red, if the priority is smaller than "medium". - - This means a fee of at least %1 per kb is required. - - - - - This label turns red, if any recipient receives an amount smaller than %1. - - This means a fee of at least %2 is required. - - Amounts below 0.546 times the minimum relay fee are shown as DUST. - - - - - This label turns red, if the change is smaller than %1. - - This means a fee of at least %2 is required. - - - - - - (no label) - - - - - change from %1 (%2) - - - - - (change) - - - - - EditAddressDialog - - - Edit Address - - - - - &Label - - - - - The label associated with this address book entry - - - - - &Address - - - - - The address associated with this address book entry. This can only be modified for sending addresses. - - - - - New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - - - - - Could not unlock wallet. - - - - - New key generation failed. - - - - - GUIUtil::HelpMessageBox - - - - buynowcoin-Qt - - - - - version - - - - - Usage: - - - - - command-line options - - - - - UI options - - - - - Set language, for example "de_DE" (default: system locale) - - - - - Start minimized - - - - - Show splash screen on startup (default: 1) - - - - - OptionsDialog - - - Options - - - - - &Main - - - - - Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - - - - - Pay transaction &fee - - - - - Reserved amount does not participate in staking and is therefore spendable at any time. - - - - - Reserve - - - - - Automatically start buynowcoin after logging in to the system. - - - - - &Start buynowcoin on system login - - - - - 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. - - - - - &Detach databases at shutdown - - - - - &Network - - - - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - - - - - Map port using &UPnP - - - - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - - - - - &Connect through SOCKS proxy: - - - - - Proxy &IP: - - - - - IP address of the proxy (e.g. 127.0.0.1) - - - - - &Port: - - - - - Port of the proxy (e.g. 9050) - - - - - SOCKS &Version: - - - - - SOCKS version of the proxy (e.g. 5) - - - - - &Window - - - - - Show only a tray icon after minimizing the window. - - - - - &Minimize to the tray instead of the taskbar - - - - - 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. - - - - - M&inimize on close - - - - - &Display - - - - - User Interface &language: - - - - - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - - - - - &Unit to show amounts in: - - - - - Choose the default subdivision unit to show in the interface and when sending coins. - - - - - Whether to show buynowcoin addresses in the transaction list or not. - - - - - &Display addresses in transaction list - - - - - Whether to show coin control features or not. - - - - - Display coin &control features (experts only!) - - - - - &OK - - - - - &Cancel - - - - - &Apply - - - - - default - - - - - - Warning - - - - - - This setting will take effect after restarting buynowcoin. - - - - - The supplied proxy address is invalid. - - - - - OverviewPage - - - Form - - - - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - - - - - Stake: - - - - - Unconfirmed: - - - - - Wallet - - - - - Spendable: - - - - - Your current spendable balance - - - - - Immature: - - - - - Mined balance that has not yet matured - - - - - Total: - - - - - Your current total balance - - - - - <b>Recent transactions</b> - - - - - Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - - - - - Total of coins that was staked, and do not yet count toward the current balance - - - - - - out of sync - - - - - QRCodeDialog - - - QR Code Dialog - - - - - Request Payment - - - - - Amount: - - - - - Label: - - - - - Message: - - - - - &Save As... - - - - - Error encoding URI into QR Code. - - - - - The entered amount is invalid, please check. - - - - - Resulting URI too long, try to reduce the text for label / message. - - - - - Save QR Code - - - - - PNG Images (*.png) - - - - - RPCConsole - - - Client name - - - - - - - - - - - - - - N/A - - - - - Client version - - - - - &Information - - - - - Using OpenSSL version - - - - - Startup time - - - - - Network - - - - - Number of connections - - - - - On testnet - - - - - Block chain - - - - - Current number of blocks - - - - - Estimated total blocks - - - - - Last block time - - - - - &Open - - - - - Command-line options - - - - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - - &Show - - - - - &Console - - - - - Build date - - - - - buynowcoin - Debug window - - - - - buynowcoin Core - - - - - Debug log file - - - - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - - - - - Clear console - - - - - Welcome to the buynowcoin RPC console. - - - - - Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - - - - - Type <b>help</b> for an overview of available commands. - - - - - SendCoinsDialog - - - - - - - - - - Send Coins - - - - - Coin Control Features - - - - - Inputs... - - - - - automatically selected - - - - - Insufficient funds! - - - - - Quantity: - - - - - - 0 - - - - - Bytes: - - - - - Amount: - - - - - - - - 0.00 BTC - - - - - Priority: - - - - - medium - - - - - Fee: - - - - - Low Output: - - - - - no - - - - - After Fee: - - - - - Change - - - - - custom change address - - - - - Send to multiple recipients at once - - - - - Add &Recipient - - - - - Remove all transaction fields - - - - - Clear &All - - - - - Balance: - - - - - 123.456 BTC - - - - - Confirm the send action - - - - - S&end - - - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Copy quantity - - - - - Copy amount - - - - - Copy fee - - - - - Copy after fee - - - - - Copy bytes - - - - - Copy priority - - - - - Copy low output - - - - - Copy change - - - - - <b>%1</b> to %2 (%3) - - - - - Confirm send coins - - - - - Are you sure you want to send %1? - - - - - and - - - - - The recipient address is not valid, please recheck. - - - - - The amount to pay must be larger than 0. - - - - - The amount exceeds your balance. - - - - - The total exceeds your balance when the %1 transaction fee is included. - - - - - Duplicate address found, can only send to each address once per send operation. - - - - - Error: Transaction creation failed. - - - - - 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. - - - - - WARNING: Invalid buynowcoin address - - - - - (no label) - - - - - WARNING: unknown change address - - - - - SendCoinsEntry - - - Form - - - - - A&mount: - - - - - Pay &To: - - - - - - Enter a label for this address to add it to your address book - - - - - &Label: - - - - - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Choose address from address book - - - - - Alt+A - - - - - Paste address from clipboard - - - - - Alt+P - - - - - Remove this recipient - - - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - SignVerifyMessageDialog - - - Signatures - Sign / Verify a Message - - - - - - &Sign Message - - - - - 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. - - - - - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - - Choose an address from the address book - - - - - - Alt+A - - - - - Paste address from clipboard - - - - - Alt+P - - - - - Enter the message you want to sign here - - - - - Copy the current signature to the system clipboard - - - - - Sign the message to prove you own this buynowcoin address - - - - - Reset all sign message fields - - - - - - Clear &All - - - - - - &Verify Message - - - - - 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. - - - - - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - - Reset all verify message fields - - - - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Click "Sign Message" to generate signature - - - - - Enter buynowcoin signature - - - - - - The entered address is invalid. - - - - - - - - Please check the address and try again. - - - - - - The entered address does not refer to a key. - - - - - Wallet unlock was cancelled. - - - - - Private key for the entered address is not available. - - - - - Message signing failed. - - - - - Message signed. - - - - - The signature could not be decoded. - - - - - - Please check the signature and try again. - - - - - The signature did not match the message digest. - - - - - Message verification failed. - - - - - Message verified. - - - - - TransactionDesc - - - Open until %1 - - - - - Open for %n block(s) - - - - - conflicted - - - - - %1/offline - - - - - %1/unconfirmed - - - - - %1 confirmations - - - - - Status - - - - - , broadcast through %n node(s) - - - - - Date - - - - - Source - - - - - Generated - - - - - - From - - - - - - - To - - - - - - own address - - - - - label - - - - - - - - - Credit - - - - - matures in %n more block(s) - - - - - not accepted - - - - - - - - Debit - - - - - Transaction fee - - - - - Net amount - - - - - Message - - - - - Comment - - - - - Transaction ID - - - - - Generated coins must mature 510 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. - - - - - Debug information - - - - - Transaction - - - - - Inputs - - - - - Amount - - - - - true - - - - - false - - - - - , has not been successfully broadcast yet - - - - - unknown - - - - - TransactionDescDialog - - - Transaction details - - - - - This pane shows a detailed description of the transaction - - - - - TransactionTableModel - - - Date - - - - - Type - - - - - Address - - - - - Amount - - - - - Open until %1 - - - - - Confirmed (%1 confirmations) - - - - - Open for %n more block(s) - - - - - Offline - - - - - Unconfirmed - - - - - Confirming (%1 of %2 recommended confirmations) - - - - - Conflicted - - - - - Immature (%1 confirmations, will be available after %2) - - - - - This block was not received by any other nodes and will probably not be accepted! - - - - - Generated but not accepted - - - - - Received with - - - - - Received from - - - - - Sent to - - - - - Payment to yourself - - - - - Mined - - - - - (n/a) - - - - - Transaction status. Hover over this field to show number of confirmations. - - - - - Date and time that the transaction was received. - - - - - Type of transaction. - - - - - Destination address of transaction. - - - - - Amount removed from or added to balance. - - - - - TransactionView - - - - All - - - - - Today - - - - - This week - - - - - This month - - - - - Last month - - - - - This year - - - - - Range... - - - - - Received with - - - - - Sent to - - - - - To yourself - - - - - Mined - - - - - Other - - - - - Enter address or label to search - - - - - Min amount - - - - - Copy address - - - - - Copy label - - - - - Copy amount - - - - - Copy transaction ID - - - - - Edit label - - - - - Show transaction details - - - - - Export Transaction Data - - - - - Comma separated file (*.csv) - - - - - Confirmed - - - - - Date - - - - - Type - - - - - Label - - - - - Address - - - - - Amount - - - - - ID - - - - - Error exporting - - - - - Could not write to file %1. - - - - - Range: - - - - - to - - - - - WalletModel - - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - - Usage: - - - - - Send command to -server or buynowcoind - - - - - List commands - - - - - Get help for a command - - - - - Options: - - - - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - - Specify wallet file (within data directory) - - - - - Specify data directory - - - - - Set database cache size in megabytes (default: 25) - - - - - Set database disk log size in megabytes (default: 100) - - - - - Listen for connections on <port> (default: 15714 or testnet: 25714) - - - - - Maintain at most <n> connections to peers (default: 125) - - - - - Connect to a node to retrieve peer addresses, and disconnect - - - - - Specify your own public address - - - - - Bind to given address. Use [host]:port notation for IPv6 - - - - - Stake your coins to support network and gain reward (default: 1) - - - - - Threshold for disconnecting misbehaving peers (default: 100) - - - - - Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - - - - - An error occurred while setting up the RPC port %u for listening on IPv4: %s - - - - - Detach block and address databases. Increases shutdown time (default: 0) - - - - - 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. - - - - - Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - - - - - Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - - - - - Accept command line and JSON-RPC commands - - - - - Error: Transaction creation failed - - - - - Error: Wallet locked, unable to create transaction - - - - - Importing blockchain data file. - - - - - Importing bootstrap blockchain data file. - - - - - Run in the background as a daemon and accept commands - - - - - Use the test network - - - - - Accept connections from outside (default: 1 if no -proxy or -connect) - - - - - An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - - - - - Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - - - - - Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - - - - - Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - - - - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - - Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - - - - - Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - - - - - Attempt to recover private keys from a corrupt wallet.dat - - - - - Block creation options: - - - - - Connect only to the specified node(s) - - - - - Discover own IP address (default: 1 when listening and no -externalip) - - - - - Failed to listen on any port. Use -listen=0 if you want this. - - - - - Find peers using DNS lookup (default: 1) - - - - - Sync checkpoints policy (default: strict) - - - - - Invalid -tor address: '%s' - - - - - Invalid amount for -reservebalance=<amount> - - - - - Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - - - - - Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - - - - - Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - - - - - Output extra debugging information. Implies all other -debug* options - - - - - Output extra network debugging information - - - - - Prepend debug output with timestamp - - - - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - - Select the version of socks proxy to use (4-5, default: 5) - - - - - Send trace/debug info to console instead of debug.log file - - - - - Send trace/debug info to debugger - - - - - Set maximum block size in bytes (default: 250000) - - - - - Set minimum block size in bytes (default: 0) - - - - - Shrink debug.log file on client startup (default: 1 when no -debug) - - - - - Specify connection timeout in milliseconds (default: 5000) - - - - - Unable to sign checkpoint, wrong checkpointkey? - - - - - - Use UPnP to map the listening port (default: 0) - - - - - Use UPnP to map the listening port (default: 1 when listening) - - - - - Use proxy to reach tor hidden services (default: same as -proxy) - - - - - Username for JSON-RPC connections - - - - - Verifying database integrity... - - - - - WARNING: syncronized checkpoint violation detected, but skipped! - - - - - Warning: Disk space is low! - - - - - Warning: This version is obsolete, upgrade required! - - - - - wallet.dat corrupt, salvage failed - - - - - Password for JSON-RPC connections - - - - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - - - - - Find peers using internet relay chat (default: 0) - - - - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - - Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - - - - - Loading wallet... - - - - - Cannot downgrade wallet - - - - - Cannot initialize keypool - - - - - Cannot write default address - - - - - Rescanning... - - - - - Done loading - - - - - To use the %s option - - - - - Error - - - - - You must set rpcpassword=<password> in the configuration file: -%s -If the file does not exist, create it with owner-readable-only file permissions. - - - - \ No newline at end of file diff --git a/src/qt/locale/bitcoin_sk.qm b/src/qt/locale/bitcoin_sk.qm deleted file mode 100644 index 6e0abdd..0000000 Binary files a/src/qt/locale/bitcoin_sk.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_sl_SI.qm b/src/qt/locale/bitcoin_sl_SI.qm deleted file mode 100644 index bb4249a..0000000 Binary files a/src/qt/locale/bitcoin_sl_SI.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_sr.qm b/src/qt/locale/bitcoin_sr.qm deleted file mode 100644 index fe89aeb..0000000 Binary files a/src/qt/locale/bitcoin_sr.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_sv.qm b/src/qt/locale/bitcoin_sv.qm deleted file mode 100644 index 9848696..0000000 Binary files a/src/qt/locale/bitcoin_sv.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_tr.qm b/src/qt/locale/bitcoin_tr.qm deleted file mode 100644 index 6698e08..0000000 Binary files a/src/qt/locale/bitcoin_tr.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_vi.qm b/src/qt/locale/bitcoin_vi.qm deleted file mode 100644 index 8cb33c4..0000000 Binary files a/src/qt/locale/bitcoin_vi.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts deleted file mode 100644 index f7b95f9..0000000 --- a/src/qt/locale/bitcoin_vi_VN.ts +++ /dev/null @@ -1,3285 +0,0 @@ - - - AboutDialog - - - About buynowcoin - - - - - <b>buynowcoin</b> version - - - - - Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - - - - - -This is experimental software. - -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. - - - - - AddressBookPage - - - Address Book - - - - - Double-click to edit address or label - - - - - Create a new address - Tạo một địa chỉ mới - - - - Copy the currently selected address to the system clipboard - - - - - &New Address - - - - - These are your buynowcoin 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. - - - - - &Copy Address - - - - - Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - - - - - &Delete - - - - - Copy &Label - - - - - &Edit - - - - - Export Address Book Data - - - - - Comma separated file (*.csv) - - - - - Error exporting - - - - - Could not write to file %1. - - - - - AddressTableModel - - - Label - - - - - Address - - - - - (no label) - - - - - AskPassphraseDialog - - - Passphrase Dialog - - - - - Enter passphrase - - - - - New passphrase - - - - - Repeat new passphrase - - - - - Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - - - - - For staking only - - - - - 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>. - - - - - Encrypt wallet - - - - - This operation needs your wallet passphrase to unlock the wallet. - - - - - Unlock wallet - - - - - This operation needs your wallet passphrase to decrypt the wallet. - - - - - Decrypt wallet - - - - - Change passphrase - - - - - Enter the old and new passphrase to the wallet. - - - - - Confirm wallet encryption - - - - - Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - - - - - Are you sure you wish to encrypt your wallet? - - - - - IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - - - - - - Warning: The Caps Lock key is on! - - - - - - Wallet encrypted - - - - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - - - - - - - - Wallet encryption failed - - - - - Wallet encryption failed due to an internal error. Your wallet was not encrypted. - - - - - - The supplied passphrases do not match. - - - - - Wallet unlock failed - - - - - - - The passphrase entered for the wallet decryption was incorrect. - - - - - Wallet decryption failed - - - - - Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - - - - - &Overview - - - - - Show general overview of wallet - - - - - &Transactions - - - - - Browse transaction history - - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - - - - - &Settings - - - - - &Help - - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - - - ClientModel - - - Network Alert - - - - - CoinControlDialog - - - Coin Control - - - - - Quantity: - - - - - Bytes: - - - - - Amount: - - - - - Priority: - - - - - Fee: - - - - - Low Output: - - - - - no - - - - - After Fee: - - - - - Change: - - - - - (un)select all - - - - - Tree mode - - - - - List mode - - - - - Amount - - - - - Label - - - - - Address - - - - - Date - - - - - Confirmations - - - - - Confirmed - - - - - Priority - - - - - Copy address - - - - - Copy label - - - - - - Copy amount - - - - - Copy transaction ID - - - - - Copy quantity - - - - - Copy fee - - - - - Copy after fee - - - - - Copy bytes - - - - - Copy priority - - - - - Copy low output - - - - - Copy change - - - - - highest - - - - - high - - - - - medium-high - - - - - medium - - - - - low-medium - - - - - low - - - - - lowest - - - - - DUST - - - - - yes - - - - - This label turns red, if the transaction size is bigger than 10000 bytes. - - This means a fee of at least %1 per kb is required. - - Can vary +/- 1 Byte per input. - - - - - Transactions with higher priority get more likely into a block. - -This label turns red, if the priority is smaller than "medium". - - This means a fee of at least %1 per kb is required. - - - - - This label turns red, if any recipient receives an amount smaller than %1. - - This means a fee of at least %2 is required. - - Amounts below 0.546 times the minimum relay fee are shown as DUST. - - - - - This label turns red, if the change is smaller than %1. - - This means a fee of at least %2 is required. - - - - - - (no label) - - - - - change from %1 (%2) - - - - - (change) - - - - - EditAddressDialog - - - Edit Address - - - - - &Label - - - - - The label associated with this address book entry - - - - - &Address - - - - - The address associated with this address book entry. This can only be modified for sending addresses. - - - - - New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - - - - - Could not unlock wallet. - - - - - New key generation failed. - - - - - GUIUtil::HelpMessageBox - - - - buynowcoin-Qt - - - - - version - - - - - Usage: - - - - - command-line options - - - - - UI options - - - - - Set language, for example "de_DE" (default: system locale) - - - - - Start minimized - - - - - Show splash screen on startup (default: 1) - - - - - OptionsDialog - - - Options - - - - - &Main - - - - - Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - - - - - Pay transaction &fee - - - - - Reserved amount does not participate in staking and is therefore spendable at any time. - - - - - Reserve - - - - - Automatically start buynowcoin after logging in to the system. - - - - - &Start buynowcoin on system login - - - - - 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. - - - - - &Detach databases at shutdown - - - - - &Network - - - - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - - - - - Map port using &UPnP - - - - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - - - - - &Connect through SOCKS proxy: - - - - - Proxy &IP: - - - - - IP address of the proxy (e.g. 127.0.0.1) - - - - - &Port: - - - - - Port of the proxy (e.g. 9050) - - - - - SOCKS &Version: - - - - - SOCKS version of the proxy (e.g. 5) - - - - - &Window - - - - - Show only a tray icon after minimizing the window. - - - - - &Minimize to the tray instead of the taskbar - - - - - 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. - - - - - M&inimize on close - - - - - &Display - - - - - User Interface &language: - - - - - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - - - - - &Unit to show amounts in: - - - - - Choose the default subdivision unit to show in the interface and when sending coins. - - - - - Whether to show buynowcoin addresses in the transaction list or not. - - - - - &Display addresses in transaction list - - - - - Whether to show coin control features or not. - - - - - Display coin &control features (experts only!) - - - - - &OK - - - - - &Cancel - - - - - &Apply - - - - - default - - - - - - Warning - - - - - - This setting will take effect after restarting buynowcoin. - - - - - The supplied proxy address is invalid. - - - - - OverviewPage - - - Form - - - - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - - - - - Stake: - - - - - Unconfirmed: - - - - - Wallet - - - - - Spendable: - - - - - Your current spendable balance - - - - - Immature: - - - - - Mined balance that has not yet matured - - - - - Total: - - - - - Your current total balance - - - - - <b>Recent transactions</b> - - - - - Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - - - - - Total of coins that was staked, and do not yet count toward the current balance - - - - - - out of sync - - - - - QRCodeDialog - - - QR Code Dialog - - - - - Request Payment - - - - - Amount: - - - - - Label: - - - - - Message: - - - - - &Save As... - - - - - Error encoding URI into QR Code. - - - - - The entered amount is invalid, please check. - - - - - Resulting URI too long, try to reduce the text for label / message. - - - - - Save QR Code - - - - - PNG Images (*.png) - - - - - RPCConsole - - - Client name - - - - - - - - - - - - - - N/A - - - - - Client version - - - - - &Information - - - - - Using OpenSSL version - - - - - Startup time - - - - - Network - - - - - Number of connections - - - - - On testnet - - - - - Block chain - - - - - Current number of blocks - - - - - Estimated total blocks - - - - - Last block time - - - - - &Open - - - - - Command-line options - - - - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - - &Show - - - - - &Console - - - - - Build date - - - - - buynowcoin - Debug window - - - - - buynowcoin Core - - - - - Debug log file - - - - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - - - - - Clear console - - - - - Welcome to the buynowcoin RPC console. - - - - - Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - - - - - Type <b>help</b> for an overview of available commands. - - - - - SendCoinsDialog - - - - - - - - - - Send Coins - - - - - Coin Control Features - - - - - Inputs... - - - - - automatically selected - - - - - Insufficient funds! - - - - - Quantity: - - - - - - 0 - - - - - Bytes: - - - - - Amount: - - - - - - - - 0.00 BTC - - - - - Priority: - - - - - medium - - - - - Fee: - - - - - Low Output: - - - - - no - - - - - After Fee: - - - - - Change - - - - - custom change address - - - - - Send to multiple recipients at once - - - - - Add &Recipient - - - - - Remove all transaction fields - - - - - Clear &All - - - - - Balance: - - - - - 123.456 BTC - - - - - Confirm the send action - - - - - S&end - - - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Copy quantity - - - - - Copy amount - - - - - Copy fee - - - - - Copy after fee - - - - - Copy bytes - - - - - Copy priority - - - - - Copy low output - - - - - Copy change - - - - - <b>%1</b> to %2 (%3) - - - - - Confirm send coins - - - - - Are you sure you want to send %1? - - - - - and - - - - - The recipient address is not valid, please recheck. - - - - - The amount to pay must be larger than 0. - - - - - The amount exceeds your balance. - - - - - The total exceeds your balance when the %1 transaction fee is included. - - - - - Duplicate address found, can only send to each address once per send operation. - - - - - Error: Transaction creation failed. - - - - - 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. - - - - - WARNING: Invalid buynowcoin address - - - - - (no label) - - - - - WARNING: unknown change address - - - - - SendCoinsEntry - - - Form - - - - - A&mount: - - - - - Pay &To: - - - - - - Enter a label for this address to add it to your address book - - - - - &Label: - - - - - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Choose address from address book - - - - - Alt+A - - - - - Paste address from clipboard - - - - - Alt+P - - - - - Remove this recipient - - - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - SignVerifyMessageDialog - - - Signatures - Sign / Verify a Message - - - - - - &Sign Message - - - - - 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. - - - - - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - - Choose an address from the address book - - - - - - Alt+A - - - - - Paste address from clipboard - - - - - Alt+P - - - - - Enter the message you want to sign here - - - - - Copy the current signature to the system clipboard - - - - - Sign the message to prove you own this buynowcoin address - - - - - Reset all sign message fields - - - - - - Clear &All - - - - - - &Verify Message - - - - - 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. - - - - - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - - Reset all verify message fields - - - - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - - Click "Sign Message" to generate signature - - - - - Enter buynowcoin signature - - - - - - The entered address is invalid. - - - - - - - - Please check the address and try again. - - - - - - The entered address does not refer to a key. - - - - - Wallet unlock was cancelled. - - - - - Private key for the entered address is not available. - - - - - Message signing failed. - - - - - Message signed. - - - - - The signature could not be decoded. - - - - - - Please check the signature and try again. - - - - - The signature did not match the message digest. - - - - - Message verification failed. - - - - - Message verified. - - - - - TransactionDesc - - - Open until %1 - - - - - Open for %n block(s) - - - - - conflicted - - - - - %1/offline - - - - - %1/unconfirmed - - - - - %1 confirmations - - - - - Status - - - - - , broadcast through %n node(s) - - - - - Date - - - - - Source - - - - - Generated - - - - - - From - - - - - - - To - - - - - - own address - - - - - label - - - - - - - - - Credit - - - - - matures in %n more block(s) - - - - - not accepted - - - - - - - - Debit - - - - - Transaction fee - - - - - Net amount - - - - - Message - - - - - Comment - - - - - Transaction ID - - - - - Generated coins must mature 510 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. - - - - - Debug information - - - - - Transaction - - - - - Inputs - - - - - Amount - - - - - true - - - - - false - - - - - , has not been successfully broadcast yet - - - - - unknown - - - - - TransactionDescDialog - - - Transaction details - - - - - This pane shows a detailed description of the transaction - - - - - TransactionTableModel - - - Date - - - - - Type - - - - - Address - - - - - Amount - - - - - Open until %1 - - - - - Confirmed (%1 confirmations) - - - - - Open for %n more block(s) - - - - - Offline - - - - - Unconfirmed - - - - - Confirming (%1 of %2 recommended confirmations) - - - - - Conflicted - - - - - Immature (%1 confirmations, will be available after %2) - - - - - This block was not received by any other nodes and will probably not be accepted! - - - - - Generated but not accepted - - - - - Received with - - - - - Received from - - - - - Sent to - - - - - Payment to yourself - - - - - Mined - - - - - (n/a) - - - - - Transaction status. Hover over this field to show number of confirmations. - - - - - Date and time that the transaction was received. - - - - - Type of transaction. - - - - - Destination address of transaction. - - - - - Amount removed from or added to balance. - - - - - TransactionView - - - - All - - - - - Today - - - - - This week - - - - - This month - - - - - Last month - - - - - This year - - - - - Range... - - - - - Received with - - - - - Sent to - - - - - To yourself - - - - - Mined - - - - - Other - - - - - Enter address or label to search - - - - - Min amount - - - - - Copy address - - - - - Copy label - - - - - Copy amount - - - - - Copy transaction ID - - - - - Edit label - - - - - Show transaction details - - - - - Export Transaction Data - - - - - Comma separated file (*.csv) - - - - - Confirmed - - - - - Date - - - - - Type - - - - - Label - - - - - Address - - - - - Amount - - - - - ID - - - - - Error exporting - - - - - Could not write to file %1. - - - - - Range: - - - - - to - - - - - WalletModel - - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - - Usage: - - - - - Send command to -server or buynowcoind - - - - - List commands - - - - - Get help for a command - - - - - Options: - - - - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - - Specify wallet file (within data directory) - - - - - Specify data directory - - - - - Set database cache size in megabytes (default: 25) - - - - - Set database disk log size in megabytes (default: 100) - - - - - Listen for connections on <port> (default: 15714 or testnet: 25714) - - - - - Maintain at most <n> connections to peers (default: 125) - - - - - Connect to a node to retrieve peer addresses, and disconnect - - - - - Specify your own public address - - - - - Bind to given address. Use [host]:port notation for IPv6 - - - - - Stake your coins to support network and gain reward (default: 1) - - - - - Threshold for disconnecting misbehaving peers (default: 100) - - - - - Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - - - - - An error occurred while setting up the RPC port %u for listening on IPv4: %s - - - - - Detach block and address databases. Increases shutdown time (default: 0) - - - - - 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. - - - - - Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - - - - - Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - - - - - Accept command line and JSON-RPC commands - - - - - Error: Transaction creation failed - - - - - Error: Wallet locked, unable to create transaction - - - - - Importing blockchain data file. - - - - - Importing bootstrap blockchain data file. - - - - - Run in the background as a daemon and accept commands - - - - - Use the test network - - - - - Accept connections from outside (default: 1 if no -proxy or -connect) - - - - - An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - - - - - Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - - - - - Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - - - - - Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - - - - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - - Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - - - - - Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - - - - - Attempt to recover private keys from a corrupt wallet.dat - - - - - Block creation options: - - - - - Connect only to the specified node(s) - - - - - Discover own IP address (default: 1 when listening and no -externalip) - - - - - Failed to listen on any port. Use -listen=0 if you want this. - - - - - Find peers using DNS lookup (default: 1) - - - - - Sync checkpoints policy (default: strict) - - - - - Invalid -tor address: '%s' - - - - - Invalid amount for -reservebalance=<amount> - - - - - Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - - - - - Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - - - - - Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - - - - - Output extra debugging information. Implies all other -debug* options - - - - - Output extra network debugging information - - - - - Prepend debug output with timestamp - - - - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - - Select the version of socks proxy to use (4-5, default: 5) - - - - - Send trace/debug info to console instead of debug.log file - - - - - Send trace/debug info to debugger - - - - - Set maximum block size in bytes (default: 250000) - - - - - Set minimum block size in bytes (default: 0) - - - - - Shrink debug.log file on client startup (default: 1 when no -debug) - - - - - Specify connection timeout in milliseconds (default: 5000) - - - - - Unable to sign checkpoint, wrong checkpointkey? - - - - - - Use UPnP to map the listening port (default: 0) - - - - - Use UPnP to map the listening port (default: 1 when listening) - - - - - Use proxy to reach tor hidden services (default: same as -proxy) - - - - - Username for JSON-RPC connections - - - - - Verifying database integrity... - - - - - WARNING: syncronized checkpoint violation detected, but skipped! - - - - - Warning: Disk space is low! - - - - - Warning: This version is obsolete, upgrade required! - - - - - wallet.dat corrupt, salvage failed - - - - - Password for JSON-RPC connections - - - - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - - - - - Find peers using internet relay chat (default: 0) - - - - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - - Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - - - - - Loading wallet... - - - - - Cannot downgrade wallet - - - - - Cannot initialize keypool - - - - - Cannot write default address - - - - - Rescanning... - - - - - Done loading - - - - - To use the %s option - - - - - Error - - - - - You must set rpcpassword=<password> in the configuration file: -%s -If the file does not exist, create it with owner-readable-only file permissions. - - - - \ No newline at end of file diff --git a/src/qt/locale/bitcoin_zh_CN.qm b/src/qt/locale/bitcoin_zh_CN.qm deleted file mode 100644 index 8c9d226..0000000 Binary files a/src/qt/locale/bitcoin_zh_CN.qm and /dev/null differ diff --git a/src/qt/locale/bitcoin_af_ZA.qm b/src/qt/locale/triangles_af_ZA.qm similarity index 53% rename from src/qt/locale/bitcoin_af_ZA.qm rename to src/qt/locale/triangles_af_ZA.qm index 2fa0f31..d5a2a5f 100644 Binary files a/src/qt/locale/bitcoin_af_ZA.qm and b/src/qt/locale/triangles_af_ZA.qm differ diff --git a/src/qt/locale/bitcoin_af_ZA.ts b/src/qt/locale/triangles_af_ZA.ts similarity index 58% rename from src/qt/locale/bitcoin_af_ZA.ts rename to src/qt/locale/triangles_af_ZA.ts index 5425b1b..b9d1014 100644 --- a/src/qt/locale/bitcoin_af_ZA.ts +++ b/src/qt/locale/triangles_af_ZA.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Dubbel-klik om die adres of etiket te wysig - + Create a new address Skep 'n nuwe adres @@ -52,90 +53,90 @@ This product includes software developed by the OpenSSL Project for use in the O Maak 'n kopie van die huidige adres na die stelsel klipbord - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Verwyder Copy &Label - + &Edit - + Export Address Book Data - + Comma separated file (*.csv) - + Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etiket @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,428 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - Sinchroniseer met die netwerk ... - - - - &Overview - &Oorsig - - - - Show general overview of wallet - Wys algemene oorsig van die beursie - - - - &Transactions - &Transaksies - - - - Browse transaction history - Besoek transaksie geskiedenis - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - S&luit af - - - - Quit application - Sluit af - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - Wys inligting oor Qt - - - - &Options... - &Opsies - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - Beursie - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Lêer - - - - &Settings - &Instellings - - - - &Help - &Hulp - - - - Tabs toolbar - Blad nutsbalk - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,17 +315,17 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + @@ -755,47 +335,47 @@ Address: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -805,7 +385,7 @@ Address: %4 Label - + Etiket @@ -820,17 +400,17 @@ Address: %4 Confirmations - + Confirmed - + Priority - + @@ -840,7 +420,7 @@ Address: %4 Copy label - + @@ -851,87 +431,87 @@ Address: %4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -989,111 +569,457 @@ This label turns red, if the priority is smaller than "medium". Edit Address - + &Label - + The label associated with this address book entry - + &Address - + The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nuwe ontvangende adres - + New sending address Nuwe stuurende adres - + Edit receiving address Wysig ontvangende adres - + Edit sending address Wysig stuurende adres - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. - + - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Kon nie die beursie oopsluit nie. New key generation failed. - + GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Gebruik: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipe + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiket + + + + To Address + + + + + From Address + + + + + Message + Boodskap + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (geen etiket) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Maak 'n kopie van die huidige adres na die stelsel klipbord + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Verwyder + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1106,209 +1032,209 @@ This label turns red, if the priority is smaller than "medium". &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1319,20 +1245,20 @@ This label turns red, if the priority is smaller than "medium". Vorm - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1342,53 +1268,81 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Onlangse transaksies</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Bedrag: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,44 +1561,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Stuur Munstukke Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1656,68 +1611,68 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Stuur aan vele ontvangers op eens Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1726,13 +1681,13 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + Confirm the send action - + @@ -1740,14 +1695,14 @@ This label turns red, if the priority is smaller than "medium". S&tuur - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1757,92 +1712,97 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,63 +1820,284 @@ This label turns red, if the priority is smaller than "medium". Form - + Vorm A&mount: - + Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: - + - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Send to multiple recipients at once + Stuur aan vele ontvangers op eens + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + S&tuur + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Vorm + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,7 +2105,7 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + @@ -1935,108 +2116,112 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2104,42 +2289,48 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Open for %n block(s) - + + + + conflicted - + %1/offline - + %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + + @@ -2149,12 +2340,12 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + @@ -2185,14 +2376,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Krediet - + matures in %n more block(s) - + + + + @@ -2203,12 +2397,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debiet - + Transaction fee Transaksie fooi @@ -2225,32 +2419,32 @@ This label turns red, if the priority is smaller than "medium". Comment - + - + Transaction ID Transaksie ID - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2268,9 +2462,9 @@ This label turns red, if the priority is smaller than "medium". onwaar - + , has not been successfully broadcast yet - + @@ -2283,18 +2477,18 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date Datum @@ -2316,52 +2510,60 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + @@ -2394,9 +2596,9 @@ This label turns red, if the priority is smaller than "medium". (n.v.t) - + Transaction status. Hover over this field to show number of confirmations. - + @@ -2411,12 +2613,12 @@ This label turns red, if the priority is smaller than "medium". Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2485,7 +2687,7 @@ This label turns red, if the priority is smaller than "medium". Enter address or label to search - + @@ -2500,7 +2702,7 @@ This label turns red, if the priority is smaller than "medium". Copy label - + @@ -2510,32 +2712,32 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + Comma separated file (*.csv) - + Confirmed - + @@ -2570,12 +2772,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2589,39 +2791,21 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Gebruik: - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + @@ -2629,39 +2813,29 @@ This label turns red, if the priority is smaller than "medium". Opsies: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2671,87 +2845,87 @@ This label turns red, if the priority is smaller than "medium". Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + @@ -2761,338 +2935,343 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + Allow JSON-RPC connections from specified IP address - + Send commands to node running on <ip> (default: 127.0.0.1) - + Execute command when the best block changes (%s in cmd is replaced by block hash) - + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + Upgrade wallet to latest format - + Set key pool size to <n> (default: 100) - + Rescan the block chain for missing wallet transactions - + How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + Use OpenSSL (https) for JSON-RPC connections - + Server certificate file (default: server.cert) - + Server private key (default: server.pem) - + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3102,32 +3281,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) - + Connect through socks proxy - + Allow DNS lookups for -addnode, -seednode and -connect - + @@ -3137,67 +3306,57 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + Error loading wallet.dat: Wallet corrupted - + - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat - + Invalid -proxy address: '%s' - + Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + Invalid amount for -paytxfee=<amount>: '%s' - + Error: could not start node - + Sending... - + @@ -3215,49 +3374,84 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Laai blok indeks... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Laai beursie... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + @@ -3267,7 +3461,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f To use the %s option - + @@ -3279,7 +3473,485 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Beursie + + + + &Overview + &Oorsig + + + + Show general overview of wallet + Wys algemene oorsig van die beursie + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transaksies + + + + Browse transaction history + Besoek transaksie geskiedenis + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + S&luit af + + + + Quit application + Sluit af + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + Wys inligting oor Qt + + + + &Options... + &Opsies + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + Sluit beursie oop + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Lêer + + + + &Settings + &Instellings + + + + &Help + &Hulp + + + + Tabs toolbar + Blad nutsbalk + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sinchroniseer met die netwerk ... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + + + + + + + %n day(s) + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_ar.qm b/src/qt/locale/triangles_ar.qm new file mode 100644 index 0000000..eb6a5b6 Binary files /dev/null and b/src/qt/locale/triangles_ar.qm differ diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/triangles_ar.ts similarity index 60% rename from src/qt/locale/bitcoin_ar.ts rename to src/qt/locale/triangles_ar.ts index f78c80c..8ca9efc 100644 --- a/src/qt/locale/bitcoin_ar.ts +++ b/src/qt/locale/triangles_ar.ts @@ -1,32 +1,37 @@ - + + + AboutDialog - About buynowcoin + About Triangles عن البلاك كوين + + <b>triangles</b> version + جزء البلاك كوين + - <b>buynowcoin</b> version - جزء البلاك كوين + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -37,12 +42,17 @@ This product includes software developed by the OpenSSL Project for use in the O كتاب العنوان - + + These are your Triangles 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. + + + + Double-click to edit address or label أنقر على الماوس مرتين لتعديل العنوان - + Create a new address انشأ عنوان جديد @@ -52,17 +62,21 @@ This product includes software developed by the OpenSSL Project for use in the O قم بنسخ العنوان المختار لحافظة النظام - + + Sign a message to prove you own a TRI address + + + + &New Address &عنوان جديد - - These are your buynowcoin 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. - هذه هي عناوين البلاك كوين لاستقبال الدفعات. يمكن أن تعطي عنوان مختلف لكل مرسل من اجل أن تتابع من يرسل لك. + These are your triangles 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. + هذه هي عناوين البلاك كوين لاستقبال الدفعات. يمكن أن تعطي عنوان مختلف لكل مرسل من اجل أن تتابع من يرسل لك. - + &Copy Address انسخ العنوان @@ -72,27 +86,30 @@ This product includes software developed by the OpenSSL Project for use in the O اظهار &رمز الاستجابة السريعة - - Sign a message to prove you own a buynowcoin address - التوقيع علي رسالة لاثبات بانك تملك عنوان البلاك كوين + Sign a message to prove you own a triangles address + التوقيع علي رسالة لاثبات بانك تملك عنوان البلاك كوين - + Sign &Message وقع &الرسالة - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list خذف العنوان الحالي التي تم اختياره من القائمة - - Verify a message to ensure it was signed with a specified buynowcoin address - تحقق من الرسالة لتثبت بانه تم توقيعه بعنوان بلاك كوين محدد + Verify a message to ensure it was signed with a specified triangles address + تحقق من الرسالة لتثبت بانه تم توقيعه بعنوان بلاك كوين محدد - + &Verify Message &تحقق الرسالة @@ -119,7 +136,7 @@ This product includes software developed by the OpenSSL Project for use in the O Comma separated file (*.csv) - + @@ -135,7 +152,7 @@ This product includes software developed by the OpenSSL Project for use in the O AddressTableModel - + Label وصف @@ -175,12 +192,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -238,15 +255,20 @@ This product includes software developed by the OpenSSL Project for use in the O هل انت متأكد من رغبتك في تشفير المحفظة؟ - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -255,12 +277,11 @@ This product includes software developed by the OpenSSL Project for use in the O محفظة مشفرة - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - بلاك كوين + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + بلاك كوين - + @@ -303,427 +324,6 @@ This product includes software developed by the OpenSSL Project for use in the O كلمة مرور المحفظة تم تغييره بشكل ناجح - - BitcoinGUI - - - Sign &message... - التوقيع و الرسائل - - - - Synchronizing with network... - مزامنة مع شبكة ... - - - - &Overview - نظرة عامة - - - - Show general overview of wallet - إظهار نظرة عامة على المحفظة - - - - &Transactions - المعاملات - - - - Browse transaction history - تصفح التاريخ المعاملات - - - - &Address Book - &كتاب العنوان - - - - Edit the list of stored addresses and labels - تعديل قائمة العنوان المحفوظة - - - - &Receive coins - &استقبال البلاك كوين - - - - Show the list of addresses for receiving payments - اظهار قائمة العناوين التي تستقبل التعاملات - - - - &Send coins - &ارسال البلاك كوين - - - - E&xit - خروج - - - - Quit application - الخروج من التطبيق - - - - Show information about buynowcoin - اظهار المعلومات عن البلاك كوين - - - - About &Qt - عن - - - - Show information about Qt - اظهر المعلومات - - - - &Options... - خيارات ... - - - - &Encrypt Wallet... - تشفير المحفظة - - - - &Backup Wallet... - حفظ ودعم المحفظة - - - - &Change Passphrase... - تغيير كلمة المرور - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - &تصدير... - - - - Send coins to a buynowcoin address - ارسال البلاك كوين الي عنوان اخر - - - - Modify configuration options for buynowcoin - تعديل خيارات التكوين للبلاك كوين - - - - Export the data in the current tab to a file - ارسال البيانات الحالية الي ملف - - - - Encrypt or decrypt wallet - تشفير او فك التشفير للمحفظة - - - - Backup wallet to another location - احفظ نسخة احتياطية للمحفظة في مكان آخر - - - - Change the passphrase used for wallet encryption - تغيير عبارة المرور المستخدمة لتشفير المحفظة - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - تأكيد الرسالة - - - - buynowcoin - البلاك كوين - - - - Wallet - محفظة - - - - &About buynowcoin - عن البلاك كوين - - - - &Show / Hide - اظهار/ اخفاء - - - - Unlock wallet - فتح المحفظة - - - - &Lock Wallet - قفل المحفظة - - - - Lock wallet - قفل المحفظة - - - - &File - ملف - - - - &Settings - الاعدادات - - - - &Help - مساعدة - - - - Tabs toolbar - شريط أدوات علامات التبويب - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - برنامج البلاك كوين - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - محين - - - - Catching up... - اللحاق بالركب ... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - تأكيد رسوم المعاملة - - - - Sent transaction - المعاملات المرسلة - - - - Incoming transaction - المعاملات واردة - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - المحفظة مشفرة و مفتوحة حاليا - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - المحفظة مشفرة و مقفلة حاليا - - - - Backup Wallet - النسخ الاحتياطي للمحفظة - - - - Wallet Data (*.dat) - بيانات المحفظة (*.dat) - - - - Backup Failed - فشل الدعم - - - - There was an error trying to save the wallet data to the new location. - خطا في محاولة حفظ بيانات الحفظة في مكان جديد - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - خطا فادح! بلاك كوين لا يمكن أن يستمر جاري الاغلاق - - ClientModel @@ -747,7 +347,7 @@ Address: %4 Bytes: - + @@ -767,7 +367,7 @@ Address: %4 Low Output: - + @@ -787,17 +387,17 @@ Address: %4 (un)select all - + Tree mode - + List mode - + @@ -807,7 +407,7 @@ Address: %4 Label - + وصف @@ -822,7 +422,7 @@ Address: %4 Confirmations - + @@ -832,7 +432,7 @@ Address: %4 Priority - + @@ -853,82 +453,82 @@ Address: %4 Copy transaction ID - + نسخ رقم المعاملة Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + @@ -942,7 +542,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -951,7 +551,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -960,14 +560,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -978,12 +578,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -996,12 +596,12 @@ This label turns red, if the priority is smaller than "medium". &Label - + The label associated with this address book entry - + @@ -1011,41 +611,46 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address عنوان تلقي جديد - + New sending address عنوان إرسال جديد - + Edit receiving address تعديل عنوان التلقي - + Edit sending address تعديل عنوان الارسال - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. هدا العنوان "%1" موجود مسبقا في دفتر العناوين - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. يمكن فتح المحفظة. @@ -1059,44 +664,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + المستخدم command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + النوع + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + وصف + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (لا وصف) + + + + MessagePage + + + Address Book + كتاب العنوان + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + قم بنسخ العنوان المختار لحافظة النظام + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + خذف العنوان الحالي التي تم اختياره من القائمة + + + + &Delete + &أمسح + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + خطا في التصدير + + + + Could not write to file %1. + لا يمكن الكتابة الي الملف %1. @@ -1114,7 +1060,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1124,7 +1070,7 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + @@ -1132,24 +1078,18 @@ This label turns red, if the priority is smaller than "medium". حجز - - Automatically start buynowcoin after logging in to the system. - بد البلاك كوين تلقائي عند الدخول الي الجهاز + Automatically start triangles after logging in to the system. + بد البلاك كوين تلقائي عند الدخول الي الجهاز - - &Start buynowcoin on system login - - - - + 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. - + &Detach databases at shutdown - + @@ -1157,54 +1097,64 @@ This label turns red, if the priority is smaller than "medium". &الشبكة - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + + Map port using &UPnP + + + + + Automatically start Triangles after logging in to the system. + - Map port using &UPnP - + &Start Triangles on system login + - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + @@ -1214,52 +1164,52 @@ This label turns red, if the priority is smaller than "medium". Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1269,12 +1219,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1289,7 +1239,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1300,13 +1250,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1322,20 +1272,20 @@ This label turns red, if the priority is smaller than "medium". نمودج - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1345,12 +1295,12 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + @@ -1360,32 +1310,60 @@ This label turns red, if the priority is smaller than "medium". Mined balance that has not yet matured - + - + Total: الكامل: - + Your current total balance - + - + <b>Recent transactions</b> اخر المعملات - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1399,57 +1377,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + المبلغ: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1486,12 +1464,12 @@ This label turns red, if the priority is smaller than "medium". Using OpenSSL version - + Startup time - + @@ -1506,27 +1484,27 @@ This label turns red, if the priority is smaller than "medium". On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + @@ -1536,22 +1514,17 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + @@ -1560,43 +1533,48 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1610,112 +1588,113 @@ This label turns red, if the priority is smaller than "medium". + Send Coins إرسال Coins Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + الكمية: 0 - + Bytes: - + Amount: - + المبلغ: - 0.00 BTC - + 0.00 TRI + Priority: - + اهمية: medium - + Fee: - + رسوم: Low Output: - + no - + لا After Fee: - + بعد الرسوم: Change - + custom change address - + - + Send to multiple recipients at once إرسال إلى عدة مستلمين في وقت واحد Add &Recipient - + Remove all transaction fields - + @@ -1729,8 +1708,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1740,17 +1719,17 @@ This label turns red, if the priority is smaller than "medium". S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1760,37 +1739,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1800,17 +1779,17 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + @@ -1820,32 +1799,37 @@ This label turns red, if the priority is smaller than "medium". The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1855,7 +1839,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1863,12 +1847,12 @@ This label turns red, if the priority is smaller than "medium". Form - + نمودج A&mount: - + @@ -1877,19 +1861,29 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book إدخال تسمية لهذا العنوان لإضافته إلى دفتر العناوين الخاص بك + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: - + - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - العنوان لارسال المعاملة الي (مثلا Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + العنوان لارسال المعاملة الي (مثلا TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1916,10 +1910,225 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient خذف هذا المستخدم + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + ادخال عنوان البلاك كوين (مثلا TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - ادخال عنوان البلاك كوين (مثلا Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + اختيار عنوان من كتاب العناوين + + + + Alt+A + Alt+A + + + + Paste address from clipboard + انسخ العنوان من لوحة المفاتيح + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + إرسال إلى عدة مستلمين في وقت واحد + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + مسح الكل + + + + Confirm the send action + تأكيد الإرسال + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + نمودج + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + اختيار عنوان من كتاب العناوين + + + + Alt+A + Alt+A + + + + Paste address from clipboard + انسخ العنوان من لوحة المفاتيح + + + + Alt+P + Alt+P + + + + Remove this recipient + خذف هذا المستخدم + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + إدخال تسمية لهذا العنوان لإضافته إلى دفتر العناوين الخاص بك + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1938,12 +2147,12 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1970,22 +2179,27 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + @@ -1997,43 +2211,42 @@ This label turns red, if the priority is smaller than "medium". &Verify Message - + &تحقق الرسالة 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2058,7 +2271,7 @@ This label turns red, if the priority is smaller than "medium". Wallet unlock was cancelled. - + @@ -2078,18 +2291,18 @@ This label turns red, if the priority is smaller than "medium". The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + @@ -2112,12 +2325,19 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + + + + + conflicted - + @@ -2142,7 +2362,14 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + + + + + + @@ -2181,21 +2408,28 @@ This label turns red, if the priority is smaller than "medium". label - + - + Credit - + - + matures in %n more block(s) - + + + + + + + + @@ -2206,24 +2440,24 @@ This label turns red, if the priority is smaller than "medium". - + Debit دين - + Transaction fee رسوم التحويل Net amount - + Message - + @@ -2231,19 +2465,19 @@ This label turns red, if the priority is smaller than "medium". تعليق - + Transaction ID رقم المعاملة - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + @@ -2253,7 +2487,7 @@ This label turns red, if the priority is smaller than "medium". Inputs - + @@ -2271,7 +2505,7 @@ This label turns red, if the priority is smaller than "medium". خاطئ - + , has not been successfully broadcast yet لم يتم حتى الآن البث بنجاح @@ -2297,7 +2531,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date التاريخ @@ -2329,32 +2563,44 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + + + + + - + + Narration + + + + Offline غير متصل Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2397,7 +2643,7 @@ This label turns red, if the priority is smaller than "medium". غير متوفر - + Transaction status. Hover over this field to show number of confirmations. حالة المعاملة. تحوم حول هذا الحقل لعرض عدد التأكيدات. @@ -2533,7 +2779,7 @@ This label turns red, if the priority is smaller than "medium". Comma separated file (*.csv) - + @@ -2592,32 +2838,18 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - ارسال.... - - - - bitcoin-core - - - buynowcoin version - جزع البلاك كوين + triangles version + جزع البلاك كوين - + Usage: المستخدم - - Send command to -server or buynowcoind - - - - + List commands اعرض الأوامر @@ -2632,19 +2864,9 @@ This label turns red, if the priority is smaller than "medium". خيارات: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2659,22 +2881,22 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + @@ -2684,52 +2906,52 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + @@ -2749,12 +2971,12 @@ This label turns red, if the priority is smaller than "medium". Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + @@ -2769,30 +2991,29 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - تحذير : تأكد من ساعة وتاريخ الكمبيوتر! اذا ساعة غير صحيحة بلاك كوين لن يعمل بشكل صحيح + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + تحذير : تأكد من ساعة وتاريخ الكمبيوتر! اذا ساعة غير صحيحة بلاك كوين لن يعمل بشكل صحيح - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. تحذير : خطا في قراءة wallet.dat! كل المفاتيح تم قرائتة بشكل صحيح لكن بيانات الصفقة او إدخالات كتاب العنوان غير صحيحة او غير موجودة @@ -2814,12 +3035,12 @@ This label turns red, if the priority is smaller than "medium". Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + @@ -2829,128 +3050,133 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + @@ -2970,32 +3196,37 @@ This label turns red, if the priority is smaller than "medium". Password for JSON-RPC connections - + - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + @@ -3005,37 +3236,37 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Allow JSON-RPC connections from specified IP address - + Send commands to node running on <ip> (default: 127.0.0.1) - + Execute command when the best block changes (%s in cmd is replaced by block hash) - + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3045,7 +3276,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Set key pool size to <n> (default: 100) - + @@ -3070,32 +3301,32 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Use OpenSSL (https) for JSON-RPC connections - + Server certificate file (default: server.cert) - + Server private key (default: server.pem) - + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3105,32 +3336,26 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - + triangles + البلاك كوين - - buynowcoin - البلاك كوين - - - + Unable to bind to %s on this computer (bind returned error %d, %s) - + Connect through socks proxy - + Allow DNS lookups for -addnode, -seednode and -connect - + @@ -3148,54 +3373,48 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f خطأ عند تنزيل wallet.dat: المحفظة تالفة - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - + Wallet needed to be rewritten: restart triangles to complete + المحفظة يجب أن يعاد كتابته : أعد البلاك كوين لتكتمل - - Wallet needed to be rewritten: restart buynowcoin to complete - المحفظة يجب أن يعاد كتابته : أعد البلاك كوين لتكتمل - - - + Error loading wallet.dat خطأ عند تنزيل wallet.dat Invalid -proxy address: '%s' - + Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + Invalid amount for -paytxfee=<amount>: '%s' - + Error: could not start node - + @@ -3215,42 +3434,77 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Loading block index... - + - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... تحميل المحفظه - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet لا يمكن خفض المحفظة Cannot initialize keypool - + @@ -3270,7 +3524,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f To use the %s option - + @@ -3282,7 +3536,553 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + محفظة + + + + &Overview + نظرة عامة + + + + Show general overview of wallet + إظهار نظرة عامة على المحفظة + + + + &Send coins + &ارسال البلاك كوين + + + + Send coins to a TRI address + + + + + &Receive coins + &استقبال البلاك كوين + + + + Show the list of addresses for receiving payments + اظهار قائمة العناوين التي تستقبل التعاملات + + + + &Transactions + المعاملات + + + + Browse transaction history + تصفح التاريخ المعاملات + + + + &Address Book + &كتاب العنوان + + + + Edit the list of stored addresses and labels + تعديل قائمة العنوان المحفوظة + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + خروج + + + + Quit application + الخروج من التطبيق + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + عن + + + + Show information about Qt + اظهر المعلومات + + + + &Options... + خيارات ... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + اظهار/ اخفاء + + + + &Encrypt Wallet... + تشفير المحفظة + + + + Encrypt or decrypt wallet + تشفير او فك التشفير للمحفظة + + + + &Backup Wallet... + حفظ ودعم المحفظة + + + + Backup wallet to another location + احفظ نسخة احتياطية للمحفظة في مكان آخر + + + + &Change Passphrase... + تغيير كلمة المرور + + + + Change the passphrase used for wallet encryption + تغيير عبارة المرور المستخدمة لتشفير المحفظة + + + + &Unlock Wallet... + + + + + Unlock wallet + فتح المحفظة + + + + &Lock Wallet + قفل المحفظة + + + + Lock wallet + قفل المحفظة + + + + Sign &message... + التوقيع و الرسائل + + + + &Verify message... + تأكيد الرسالة + + + + &Export... + &تصدير... + + + + Export the data in the current tab to a file + ارسال البيانات الحالية الي ملف + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + ملف + + + + &Settings + الاعدادات + + + + &Help + مساعدة + + + + Tabs toolbar + شريط أدوات علامات التبويب + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + + + + Synchronizing with network... + مزامنة مع شبكة ... + + + + ~%n block(s) remaining + + + + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + + + + %n minute(s) ago + + + + + + + + + + + + %n hour(s) ago + + + + + + + + + + + + %n day(s) ago + + + + + + + + + + + + Up to date + محين + + + + Catching up... + اللحاق بالركب ... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + تأكيد رسوم المعاملة + + + + Sent transaction + المعاملات المرسلة + + + + Incoming transaction + المعاملات واردة + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + المحفظة مشفرة و مفتوحة حاليا + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + المحفظة مشفرة و مقفلة حاليا + + + + Backup Wallet + النسخ الاحتياطي للمحفظة + + + + Wallet Data (*.dat) + بيانات المحفظة (*.dat) + + + + Backup Failed + فشل الدعم + + + + There was an error trying to save the wallet data to the new location. + خطا في محاولة حفظ بيانات الحفظة في مكان جديد + + + + %n second(s) + + + + + + + + + + + + %n minute(s) + + + + + + + + + + + + %n hour(s) + + + + + + + + + + + + %n day(s) + + + + + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + Show information about triangles + اظهار المعلومات عن البلاك كوين + + + Send coins to a triangles address + ارسال البلاك كوين الي عنوان اخر + + + Modify configuration options for triangles + تعديل خيارات التكوين للبلاك كوين + + + triangles + البلاك كوين + + + &About triangles + عن البلاك كوين + + + triangles client + برنامج البلاك كوين + + + A fatal error occurred. triangles can no longer continue safely and will quit. + خطا فادح! بلاك كوين لا يمكن أن يستمر جاري الاغلاق + + + + WalletModel + + + Sending... + ارسال.... + + + diff --git a/src/qt/locale/bitcoin_be_BY.qm b/src/qt/locale/triangles_be_BY.qm similarity index 50% rename from src/qt/locale/bitcoin_be_BY.qm rename to src/qt/locale/triangles_be_BY.qm index 94246e0..d63144c 100644 Binary files a/src/qt/locale/bitcoin_be_BY.qm and b/src/qt/locale/triangles_be_BY.qm differ diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/triangles_be_BY.ts similarity index 60% rename from src/qt/locale/bitcoin_be_BY.ts rename to src/qt/locale/triangles_be_BY.ts index dfab830..4c5c410 100644 --- a/src/qt/locale/bitcoin_be_BY.ts +++ b/src/qt/locale/triangles_be_BY.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Двайны клік для рэдагавання адрасу ці пазнакі - + Create a new address Стварыць новы адрас @@ -52,69 +53,69 @@ This product includes software developed by the OpenSSL Project for use in the O Капіяваць пазначаны адрас у сістэмны буфер абмену - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete Выдаліць Copy &Label - + &Edit - + Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Пазнака @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,432 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - Сінхранізацыя з сецівам... - - - - &Overview - Агляд - - - - Show general overview of wallet - Паказвае агульныя звесткі аб гаманцы - - - - &Transactions - Транзакцыі - - - - Browse transaction history - Праглядзець гісторыю транзакцый - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - Выйсці - - - - Quit application - Выйсці з праграмы - - - - Show information about buynowcoin - - - - - About &Qt - Аб Qt - - - - Show information about Qt - Паказаць інфармацыю аб Qt - - - - &Options... - Опцыі... - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Зрабіце копію гаманца ў іншае месца - - - - Change the passphrase used for wallet encryption - Змяніць пароль шыфравання гаманца - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - Ф&айл - - - - &Settings - Наладкі - - - - &Help - Дапамога - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Сінхранізавана - - - - Catching up... - Наганяем... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Дасланыя транзакцыі - - - - Incoming transaction - Прынятыя транзакцыі - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Дата: %1 -Колькасць: %2 -Тып: %3 -Адрас: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Гаманец <b>зашыфраваны</b> і зараз <b>разблакаваны</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Гаманец <b>зашыфраваны</b> і зараз <b>заблакаваны</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -731,7 +307,7 @@ Address: %4 Network Alert - + @@ -739,67 +315,67 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -809,7 +385,7 @@ Address: %4 Label - + Пазнака @@ -824,7 +400,7 @@ Address: %4 Confirmations - + @@ -834,7 +410,7 @@ Address: %4 Priority - + @@ -860,82 +436,82 @@ Address: %4 Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -944,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -953,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -962,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -980,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1003,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1013,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Новы адрас для атрымання - + New sending address Новы адрас для дасылання - + Edit receiving address Рэдагаваць адрас прымання - + Edit sending address Рэдагаваць адрас дасылання - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Уведзены адрас "%1" ужо ў кніге адрасоў - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Немагчыма разблакаваць гаманец @@ -1060,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Ужыванне: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Тып + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Пазнака + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + непазначаны + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Капіяваць пазначаны адрас у сістэмны буфер абмену + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + Выдаліць + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Коскамі падзелены файл (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1110,209 +1032,209 @@ This label turns red, if the priority is smaller than "medium". &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1323,76 +1245,104 @@ This label turns red, if the priority is smaller than "medium". Форма - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Нядаўнія транзаццыі</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1400,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1458,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1472,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1611,117 +1561,118 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Даслаць Манеты Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Даслаць адразу некалькім атрымальнікам Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1730,8 +1681,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1741,17 +1692,17 @@ This label turns red, if the priority is smaller than "medium". S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1761,37 +1712,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1801,17 +1752,17 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + @@ -1821,32 +1772,37 @@ This label turns red, if the priority is smaller than "medium". The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1856,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1864,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Форма @@ -1878,24 +1834,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Увядзіце пазнаку гэтаму адрасу, каб дадаць яго ў адрасную кнігу + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: Пазнака: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1915,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Уставіць адрас з буферу абмена + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Даслаць адразу некалькім атрымальнікам + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + Пацвердзіць дасыланне + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Форма + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Уставіць адрас з буферу абмена + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Увядзіце пазнаку гэтаму адрасу, каб дадаць яго ў адрасную кнігу + + + + &Label: + Пазнака: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1928,29 +2105,29 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1971,76 +2148,80 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2048,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2108,22 +2289,26 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Open for %n block(s) - + + + + + conflicted - + %1/offline - + @@ -2138,12 +2323,16 @@ This label turns red, if the priority is smaller than "medium". Status - + , broadcast through %n node(s) - + + + + + @@ -2153,108 +2342,112 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2264,15 +2457,15 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet , пакуль не было паспяхова транслявана @@ -2298,7 +2491,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Дата @@ -2320,7 +2513,7 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + @@ -2330,32 +2523,41 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2398,7 +2600,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Статус транзакцыі. Навядзіце курсар на гэтае поле, каб паказаць колькасць пацверджанняў. @@ -2524,12 +2726,12 @@ This label turns red, if the priority is smaller than "medium". Show transaction details - + Export Transaction Data - + @@ -2574,12 +2776,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2593,32 +2795,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Ужыванне: - - Send command to -server or buynowcoind - - - - + List commands Спіс каманд @@ -2633,19 +2817,9 @@ This label turns red, if the priority is smaller than "medium". Опцыі: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2660,12 +2834,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2675,22 +2849,22 @@ This label turns red, if the priority is smaller than "medium". Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2705,27 +2879,27 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2735,22 +2909,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2765,127 +2939,117 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + @@ -2895,48 +3059,48 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2946,27 +3110,37 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + @@ -2974,34 +3148,39 @@ This label turns red, if the priority is smaller than "medium". Пароль для JSON-RPC злучэнняў - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3021,22 +3200,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3056,17 +3235,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3086,52 +3265,42 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + This help message - + Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) - + Connect through socks proxy - + Allow DNS lookups for -addnode, -seednode and -connect - + @@ -3141,7 +3310,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3149,59 +3318,49 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Памылка загрузкі wallet.dat: гаманец пашкоджаны - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Памылка загрузкі wallet.dat Invalid -proxy address: '%s' - + Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + Invalid amount for -paytxfee=<amount>: '%s' - + Error: could not start node - + Sending... - + @@ -3219,44 +3378,79 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Загружаем індэкс блокаў... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Загружаем гаманец... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + @@ -3271,7 +3465,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f To use the %s option - + @@ -3283,7 +3477,499 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + Агляд + + + + Show general overview of wallet + Паказвае агульныя звесткі аб гаманцы + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + Транзакцыі + + + + Browse transaction history + Праглядзець гісторыю транзакцый + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + Выйсці + + + + Quit application + Выйсці з праграмы + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Аб Qt + + + + Show information about Qt + Паказаць інфармацыю аб Qt + + + + &Options... + Опцыі... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + Зрабіце копію гаманца ў іншае месца + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + Змяніць пароль шыфравання гаманца + + + + &Unlock Wallet... + + + + + Unlock wallet + Разблакаваць гаманец + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + Ф&айл + + + + &Settings + Наладкі + + + + &Help + Дапамога + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Сінхранізацыя з сецівам... + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + Сінхранізавана + + + + Catching up... + Наганяем... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Дасланыя транзакцыі + + + + Incoming transaction + Прынятыя транзакцыі + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Дата: %1 +Колькасць: %2 +Тып: %3 +Адрас: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Гаманец <b>зашыфраваны</b> і зараз <b>разблакаваны</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Гаманец <b>зашыфраваны</b> і зараз <b>заблакаваны</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + + + + + + + + %n day(s) + + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_bg.qm b/src/qt/locale/triangles_bg.qm similarity index 53% rename from src/qt/locale/bitcoin_bg.qm rename to src/qt/locale/triangles_bg.qm index c2009fd..3f4bff5 100644 Binary files a/src/qt/locale/bitcoin_bg.qm and b/src/qt/locale/triangles_bg.qm differ diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/triangles_bg.ts similarity index 63% rename from src/qt/locale/bitcoin_bg.ts rename to src/qt/locale/triangles_bg.ts index c80312a..c9301ac 100644 --- a/src/qt/locale/bitcoin_bg.ts +++ b/src/qt/locale/triangles_bg.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Двоен клик за редакция на адрес или име - + Create a new address Създаване на нов адрес @@ -57,52 +58,52 @@ This product includes software developed by the OpenSSL Project for use in the O Копирай избрания адрес - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Копирай Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Изтрий избрания адрес от списъка - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Провери - + + These are your Triangles 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. + + + + &Delete &Изтрий @@ -119,7 +120,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -129,18 +130,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Име @@ -160,7 +161,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -180,12 +181,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,23 +236,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -261,8 +262,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,433 +307,12 @@ This product includes software developed by the OpenSSL Project for use in the O Паролата на портфейла беше променена успешно. - - BitcoinGUI - - - Sign &message... - Подписване на &съобщение... - - - - Synchronizing with network... - Синхронизиране с мрежата... - - - - &Overview - &Баланс - - - - Show general overview of wallet - Обобщена информация за портфейла - - - - &Transactions - &Транзакции - - - - Browse transaction history - История на транзакциите - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - Из&ход - - - - Quit application - Изход от приложението - - - - Show information about buynowcoin - - - - - About &Qt - За &Qt - - - - Show information about Qt - Покажи информация за Qt - - - - &Options... - &Опции... - - - - &Encrypt Wallet... - &Криптиране на портфейла... - - - - &Backup Wallet... - &Запазване на портфейла... - - - - &Change Passphrase... - &Смяна на паролата... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - Променя паролата за портфейла - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - &Проверка на съобщение... - - - - buynowcoin - - - - - Wallet - Портфейл - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Файл - - - - &Settings - &Настройки - - - - &Help - &Помощ - - - - Tabs toolbar - Раздели - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Синхронизиран - - - - Catching up... - Зарежда блокове... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Изходяща транзакция - - - - Incoming transaction - Входяща транзакция - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Портфейлът е <b>криптиран</b> и <b>отключен</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Портфейлът е <b>криптиран</b> и <b>заключен</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel Network Alert - + @@ -740,17 +320,17 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + @@ -760,47 +340,47 @@ Address: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -810,7 +390,7 @@ Address: %4 Label - + Име @@ -825,7 +405,7 @@ Address: %4 Confirmations - + @@ -835,7 +415,7 @@ Address: %4 Priority - + @@ -856,87 +436,87 @@ Address: %4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -945,7 +525,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -954,7 +534,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -963,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -981,12 +561,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1004,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1014,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Нов адрес за получаване - + New sending address Нов адрес за изпращане - + Edit receiving address Редактиране на входящ адрес - + Edit sending address Редактиране на изходящ адрес - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Вече има адрес "%1" в списъка с адреси. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Отключването на портфейла беше неуспешно. @@ -1061,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Използване: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Тип + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Име + + + + To Address + + + + + From Address + + + + + Message + Съобщение + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (без име) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Копирай избрания адрес + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Изтрий избрания адрес от списъка + + + + &Delete + &Изтрий + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + CSV файл (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1116,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1126,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1160,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1170,43 +1096,43 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + @@ -1245,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1260,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1271,44 +1197,44 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1324,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". Форма - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1347,47 +1273,75 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Последни транзакции</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1401,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Сума: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1459,7 +1413,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1478,22 +1432,22 @@ This label turns red, if the priority is smaller than "medium". Client version - + &Information - + Using OpenSSL version - + Startup time - + @@ -1503,92 +1457,92 @@ This label turns red, if the priority is smaller than "medium". Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Изчисти конзолата - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1598,7 +1552,7 @@ This label turns red, if the priority is smaller than "medium". Type <b>help</b> for an overview of available commands. - + @@ -1612,44 +1566,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Изпращане Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1661,51 +1616,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Изпращане към повече от един получател @@ -1717,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1731,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1745,14 +1700,14 @@ This label turns red, if the priority is smaller than "medium". И&зпрати - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1762,37 +1717,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1802,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1822,32 +1777,37 @@ This label turns red, if the priority is smaller than "medium". The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1857,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1865,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Форма @@ -1879,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Въведете име за този адрес, за да го добавите в списъка с адреси + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Име: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1916,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Вмъкни от клипборда + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Изпращане към повече от един получател + + + + Add &Recipient + Добави &получател + + + + Remove all transaction fields + + + + + Clear &All + &Изчисти + + + + Confirm the send action + Потвърдете изпращането + + + + S&end + И&зпрати + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Невалиден адрес на получателя. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Форма + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Вмъкни от клипборда + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Въведете име за този адрес, за да го добавите в списъка с адреси + + + + &Label: + &Име: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1944,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1981,13 +2162,18 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + @@ -2004,38 +2190,37 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Натиснете "Подписване на съобщение" за да създадете подпис + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2055,12 +2240,12 @@ This label turns red, if the priority is smaller than "medium". The entered address does not refer to a key. - + Wallet unlock was cancelled. - + @@ -2114,12 +2299,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2144,7 +2332,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + + @@ -2190,30 +2381,33 @@ This label turns red, if the priority is smaller than "medium". - + Credit Кредит - + matures in %n more block(s) - + + + + not accepted - + - + Debit Дебит - + Transaction fee Такса @@ -2233,19 +2427,19 @@ This label turns red, if the priority is smaller than "medium". Коментар - + Transaction ID ID - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + @@ -2255,7 +2449,7 @@ This label turns red, if the priority is smaller than "medium". Inputs - + @@ -2273,7 +2467,7 @@ This label turns red, if the priority is smaller than "medium". false - + , has not been successfully broadcast yet , все още не е изпратено @@ -2299,7 +2493,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Дата @@ -2331,32 +2525,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2386,7 +2588,7 @@ This label turns red, if the priority is smaller than "medium". Payment to yourself - + @@ -2399,7 +2601,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Състояние на транзакцията. Задръжте върху това поле за брой потвърждения. @@ -2515,7 +2717,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2525,12 +2727,12 @@ This label turns red, if the priority is smaller than "medium". Show transaction details - + Export Transaction Data - + @@ -2575,12 +2777,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2594,32 +2796,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Използване: - - Send command to -server or buynowcoind - - - - + List commands Вписване на команди @@ -2634,19 +2818,9 @@ This label turns red, if the priority is smaller than "medium". Опции: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2656,42 +2830,42 @@ This label turns red, if the priority is smaller than "medium". Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2706,57 +2880,57 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + @@ -2766,127 +2940,117 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + @@ -2896,48 +3060,48 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2947,27 +3111,37 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + @@ -2975,34 +3149,39 @@ This label turns red, if the priority is smaller than "medium". Парола за JSON-RPC връзките - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3017,37 +3196,37 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when the best block changes (%s in cmd is replaced by block hash) - + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + Upgrade wallet to latest format - + Set key pool size to <n> (default: 100) - + @@ -3057,17 +3236,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3087,17 +3266,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3107,32 +3286,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) - + Connect through socks proxy - + Allow DNS lookups for -addnode, -seednode and -connect - + @@ -3142,27 +3311,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + Error loading wallet.dat: Wallet corrupted - + - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat - + @@ -3172,47 +3331,47 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + Invalid amount for -paytxfee=<amount>: '%s' - + Error: could not start node - + Sending... - + Invalid amount - + Insufficient funds - + @@ -3220,44 +3379,79 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Зареждане на блок индекса... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Зареждане на портфейла... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + @@ -3272,7 +3466,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f To use the %s option - + @@ -3284,7 +3478,485 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Портфейл + + + + &Overview + &Баланс + + + + Show general overview of wallet + Обобщена информация за портфейла + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Транзакции + + + + Browse transaction history + История на транзакциите + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + Из&ход + + + + Quit application + Изход от приложението + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + За &Qt + + + + Show information about Qt + Покажи информация за Qt + + + + &Options... + &Опции... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + &Криптиране на портфейла... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Запазване на портфейла... + + + + Backup wallet to another location + + + + + &Change Passphrase... + &Смяна на паролата... + + + + Change the passphrase used for wallet encryption + Променя паролата за портфейла + + + + &Unlock Wallet... + + + + + Unlock wallet + Отключване на портфейла + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Подписване на &съобщение... + + + + &Verify message... + &Проверка на съобщение... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Файл + + + + &Settings + &Настройки + + + + &Help + &Помощ + + + + Tabs toolbar + Раздели + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Синхронизиране с мрежата... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Синхронизиран + + + + Catching up... + Зарежда блокове... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Изходяща транзакция + + + + Incoming transaction + Входяща транзакция + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Портфейлът е <b>криптиран</b> и <b>отключен</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Портфейлът е <b>криптиран</b> и <b>заключен</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + + + + + + + %n day(s) + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_bs.qm b/src/qt/locale/triangles_bs.qm similarity index 60% rename from src/qt/locale/bitcoin_bs.qm rename to src/qt/locale/triangles_bs.qm index 89a73a4..bfdd7ad 100644 Binary files a/src/qt/locale/bitcoin_bs.qm and b/src/qt/locale/triangles_bs.qm differ diff --git a/src/qt/locale/triangles_bs.ts b/src/qt/locale/triangles_bs.ts new file mode 100644 index 0000000..415e235 --- /dev/null +++ b/src/qt/locale/triangles_bs.ts @@ -0,0 +1,3971 @@ + + + + + AboutDialog + + + About Triangles + + + + + <b>Triangles</b> version + + + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team + + + + + +This is experimental software. + +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. + + + + + AddressBookPage + + + Address Book + + + + + Double-click to edit address or label + + + + + Create a new address + + + + + Copy the currently selected address to the system clipboard + + + + + Sign a message to prove you own a TRI address + + + + + &New Address + + + + + &Copy Address + + + + + Show &QR Code + + + + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + + &Delete + + + + + Copy &Label + + + + + &Edit + + + + + Export Address Book Data + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + + + + + AddressTableModel + + + Label + + + + + Address + + + + + (no label) + + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + + + + + New passphrase + + + + + Repeat new passphrase + + + + + Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. + + + + + For staking only + + + + + 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>. + + + + + Encrypt wallet + + + + + This operation needs your wallet passphrase to unlock the wallet. + + + + + Unlock wallet + + + + + This operation needs your wallet passphrase to decrypt the wallet. + + + + + Decrypt wallet + + + + + Change passphrase + + + + + Enter the old and new passphrase to the wallet. + + + + + Confirm wallet encryption + + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! + + + + + Are you sure you wish to encrypt your wallet? + + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. + + + + + + Warning: The Caps Lock key is on! + + + + + + Wallet encrypted + + + + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + + + + + Wallet encryption failed + + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + + + + + + The supplied passphrases do not match. + + + + + Wallet unlock failed + + + + + + + The passphrase entered for the wallet decryption was incorrect. + + + + + Wallet decryption failed + + + + + Wallet passphrase was successfully changed. + + + + + ClientModel + + + Network Alert + + + + + CoinControlDialog + + + Coin Control + + + + + Quantity: + + + + + Bytes: + + + + + Amount: + + + + + Priority: + + + + + Fee: + + + + + Low Output: + + + + + no + + + + + After Fee: + + + + + Change: + + + + + (un)select all + + + + + Tree mode + + + + + List mode + + + + + Amount + + + + + Label + + + + + Address + + + + + Date + + + + + Confirmations + + + + + Confirmed + + + + + Priority + + + + + Copy address + + + + + Copy label + + + + + + Copy amount + + + + + Copy transaction ID + + + + + Copy quantity + + + + + Copy fee + + + + + Copy after fee + + + + + Copy bytes + + + + + Copy priority + + + + + Copy low output + + + + + Copy change + + + + + highest + + + + + high + + + + + medium-high + + + + + medium + + + + + low-medium + + + + + low + + + + + lowest + + + + + DUST + + + + + yes + + + + + This label turns red, if the transaction size is bigger than 10000 bytes. + + This means a fee of at least %1 per kb is required. + + Can vary +/- 1 Byte per input. + + + + + Transactions with higher priority get more likely into a block. + +This label turns red, if the priority is smaller than "medium". + + This means a fee of at least %1 per kb is required. + + + + + This label turns red, if any recipient receives an amount smaller than %1. + + This means a fee of at least %2 is required. + + Amounts below 0.546 times the minimum relay fee are shown as DUST. + + + + + This label turns red, if the change is smaller than %1. + + This means a fee of at least %2 is required. + + + + + + (no label) + + + + + change from %1 (%2) + + + + + (change) + + + + + EditAddressDialog + + + Edit Address + + + + + &Label + + + + + The label associated with this address book entry + + + + + &Address + + + + + The address associated with this address book entry. This can only be modified for sending addresses. + + + + + &Stealth Address + + + + + New receiving address + + + + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + version + + + + + + Triangles-Qt + + + + + Usage: + + + + + command-line options + + + + + UI options + + + + + Set language, for example "de_DE" (default: system locale) + + + + + Start minimized + + + + + Show splash screen on startup (default: 1) + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + + + + + OptionsDialog + + + Options + + + + + &Main + + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. + + + + + Pay transaction &fee + + + + + Reserved amount does not participate in staking and is therefore spendable at any time. + + + + + Reserve + + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + 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. + + + + + &Detach databases at shutdown + + + + + &Network + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + + + + + &Connect through SOCKS proxy: + + + + + Proxy &IP: + + + + + IP address of the proxy (e.g. 127.0.0.1) + + + + + &Port: + + + + + Port of the proxy (e.g. 9050) + + + + + SOCKS &Version: + + + + + SOCKS version of the proxy (e.g. 5) + + + + + &Window + + + + + Show only a tray icon after minimizing the window. + + + + + &Minimize to the tray instead of the taskbar + + + + + 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. + + + + + M&inimize on close + + + + + &Display + + + + + User Interface &language: + + + + + The user interface language can be set here. This setting will take effect after restarting Triangles. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show TRI addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + Whether to show coin control features or not. + + + + + Display coin &control features (experts only!) + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + + Warning + + + + + + This setting will take effect after restarting Triangles. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + + Stake: + + + + + Unconfirmed: + + + + + Wallet + + + + + Spendable: + + + + + Your current spendable balance + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + Total: + + + + + Your current total balance + + + + + <b>Recent transactions</b> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + Total of coins that was staked, and do not yet count toward the current balance + + + + + + out of sync + + + + + QRCodeDialog + + + QR Code Dialog + + + + + Request Payment + + + + + Amount: + + + + + Label: + + + + + Message: + + + + + &Save As... + + + + + Error encoding URI into QR Code. + + + + + The entered amount is invalid, please check. + + + + + Resulting URI too long, try to reduce the text for label / message. + + + + + Save QR Code + + + + + PNG Images (*.png) + + + + + RPCConsole + + + Client name + + + + + + + + + + + + + + N/A + + + + + Client version + + + + + &Information + + + + + Using OpenSSL version + + + + + Startup time + + + + + Network + + + + + Number of connections + + + + + On testnet + + + + + Block chain + + + + + Current number of blocks + + + + + Estimated total blocks + + + + + Last block time + + + + + &Open + + + + + Command-line options + + + + + &Show + + + + + &Console + + + + + Build date + + + + + Triangles - Debug window + + + + + Triangles Core + + + + + Debug log file + + + + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + + Clear console + + + + + Welcome to the Triangles RPC console. + + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + + + + + Type <b>help</b> for an overview of available commands. + + + + + SendCoinsDialog + + + + + + + + + + + Send Coins + + + + + Coin Control Features + + + + + Inputs... + + + + + automatically selected + + + + + Insufficient funds! + + + + + Quantity: + + + + + + 0 + + + + + Bytes: + + + + + Amount: + + + + + + + + 0.00 TRI + + + + + Priority: + + + + + medium + + + + + Fee: + + + + + Low Output: + + + + + no + + + + + After Fee: + + + + + Change + + + + + custom change address + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 TRI + + + + + Confirm the send action + + + + + S&end + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Copy quantity + + + + + Copy amount + + + + + Copy fee + + + + + Copy after fee + + + + + Copy bytes + + + + + Copy priority + + + + + Copy low output + + + + + Copy change + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send coins + + + + + Are you sure you want to send %1? + + + + + and + + + + + The recipient address is not valid, please recheck. + + + + + The amount to pay must be larger than 0. + + + + + The amount exceeds your balance. + + + + + The total exceeds your balance when the %1 transaction fee is included. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Transaction creation failed. + + + + + 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. + + + + + Error: Narration is too long. + + + + + WARNING: Invalid TRI address + + + + + (no label) + + + + + WARNING: unknown change address + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + + Enter a label for this address to add it to your address book + + + + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + + &Label: + + + + + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + + + + + + &Sign Message + + + + + 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. + + + + + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + + Choose an address from the address book + + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this TRI address + + + + + Verify the message to ensure it was signed with the specified TRI address + + + + + Reset all sign message fields + + + + + + Clear &All + + + + + + &Verify Message + + + + + 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. + + + + + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Reset all verify message fields + + + + + Click "Sign Message" to generate signature + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + + + + + + The entered address is invalid. + + + + + + + + Please check the address and try again. + + + + + + The entered address does not refer to a key. + + + + + Wallet unlock was cancelled. + + + + + Private key for the entered address is not available. + + + + + Message signing failed. + + + + + Message signed. + + + + + The signature could not be decoded. + + + + + + Please check the signature and try again. + + + + + The signature did not match the message digest. + + + + + Message verification failed. + + + + + Message verified. + + + + + TransactionDesc + + + Open until %1 + + + + + Open for %n block(s) + + + + + + + + + conflicted + + + + + %1/offline + + + + + %1/unconfirmed + + + + + %1 confirmations + + + + + Status + + + + + , broadcast through %n node(s) + + + + + + + + + Date + + + + + Source + + + + + Generated + + + + + + From + + + + + + + To + + + + + + own address + + + + + label + + + + + + + + + Credit + + + + + matures in %n more block(s) + + + + + + + + + not accepted + + + + + + + + Debit + + + + + Transaction fee + + + + + Net amount + + + + + Message + + + + + Comment + + + + + Transaction ID + + + + + Generated coins must mature 60 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. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + + + + + Amount + + + + + Open until %1 + + + + + Confirmed (%1 confirmations) + + + + + Open for %n more block(s) + + + + + + + + + Narration + + + + + Offline + + + + + Unconfirmed + + + + + Confirming (%1 of %2 recommended confirmations) + + + + + Conflicted + + + + + Immature (%1 confirmations, will be available after %2) + + + + + This block was not received by any other nodes and will probably not be accepted! + + + + + Generated but not accepted + + + + + Received with + + + + + Received from + + + + + Sent to + + + + + Payment to yourself + + + + + Mined + + + + + (n/a) + + + + + Transaction status. Hover over this field to show number of confirmations. + + + + + Date and time that the transaction was received. + + + + + Type of transaction. + + + + + Destination address of transaction. + + + + + Amount removed from or added to balance. + + + + + TransactionView + + + + All + Sve + + + + Today + Danas + + + + This week + + + + + This month + Ovaj mjesec + + + + Last month + Prošli mjesec + + + + This year + Ove godine + + + + Range... + + + + + Received with + + + + + Sent to + + + + + To yourself + + + + + Mined + + + + + Other + + + + + Enter address or label to search + + + + + Min amount + + + + + Copy address + + + + + Copy label + + + + + Copy amount + + + + + Copy transaction ID + + + + + Edit label + + + + + Show transaction details + + + + + Export Transaction Data + + + + + Comma separated file (*.csv) + + + + + Confirmed + + + + + Date + + + + + Type + + + + + Label + + + + + Address + + + + + Amount + + + + + ID + + + + + Error exporting + + + + + Could not write to file %1. + + + + + Range: + + + + + to + + + + + Triangles-core + + + Usage: + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify wallet file (within data directory) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Set database disk log size in megabytes (default: 100) + + + + + Listen for connections on <port> (default: 15714 or testnet: 25714) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + Bind to given address. Use [host]:port notation for IPv6 + + + + + Stake your coins to support network and gain reward (default: 1) + + + + + Threshold for disconnecting misbehaving peers (default: 100) + + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Detach block and address databases. Increases shutdown time (default: 0) + + + + + 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. + + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds + + + + + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) + + + + + Accept command line and JSON-RPC commands + + + + + Error: Transaction creation failed + + + + + Error: Wallet locked, unable to create transaction + + + + + Importing blockchain data file. + + + + + Importing bootstrap blockchain data file. + + + + + Run in the background as a daemon and accept commands + + + + + Use the test network + + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + + + + + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. + + + + + Attempt to recover private keys from a corrupt wallet.dat + + + + + Block creation options: + + + + + Connect only to the specified node(s) + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Find peers using DNS lookup (default: 1) + + + + + Sync checkpoints policy (default: strict) + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -reservebalance=<amount> + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + + + + + Output extra debugging information. Implies all other -debug* options + + + + + Output extra network debugging information + + + + + Prepend debug output with timestamp + + + + + Select the version of socks proxy to use (4-5, default: 5) + + + + + Send trace/debug info to console instead of debug.log file + + + + + Send trace/debug info to debugger + + + + + Set maximum block size in bytes (default: 250000) + + + + + Set minimum block size in bytes (default: 0) + + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + Unable to sign checkpoint, wrong checkpointkey? + + + + + + Use UPnP to map the listening port (default: 0) + + + + + Use UPnP to map the listening port (default: 1 when listening) + + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + + + + + Verifying database integrity... + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + + WARNING: syncronized checkpoint violation detected, but skipped! + + + + + Warning: Disk space is low! + + + + + Warning: This version is obsolete, upgrade required! + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + + Add a node to connect to and attempt to keep the connection open + + + + + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Cannot downgrade wallet + + + + + Cannot initialize keypool + + + + + Cannot write default address + + + + + Rescanning... + + + + + Done loading + + + + + To use the %s option + + + + + Error + + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + + + + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + + + + + Browse transaction history + + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + + + + + + + + %n day(s) + + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_ca.qm b/src/qt/locale/triangles_ca.qm new file mode 100644 index 0000000..dbc8c84 Binary files /dev/null and b/src/qt/locale/triangles_ca.qm differ diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/triangles_ca.ts similarity index 55% rename from src/qt/locale/bitcoin_ca.ts rename to src/qt/locale/triangles_ca.ts index 389b41e..40e92a0 100644 --- a/src/qt/locale/bitcoin_ca.ts +++ b/src/qt/locale/triangles_ca.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Doble click per editar l'adreça o l'etiqueta - + Create a new address Crear una nova adrça @@ -52,69 +53,69 @@ This product includes software developed by the OpenSSL Project for use in the O Copia la selecció actual al porta-retalls del sistema - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Eliminar Copy &Label - + &Edit - + Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etiqueta @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,428 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - Sincronitzant amb la xarxa... - - - - &Overview - &Visió general - - - - Show general overview of wallet - Mostrar visió general de la cartera - - - - &Transactions - &Transaccions - - - - Browse transaction history - Exploreu l'historial de transaccions - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - Sortir de l'aplicació - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - &Opcions... - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - Canviar frase-contrasenya per a l'escriptació de la cartera - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Fitxer - - - - &Settings - &Configuració - - - - &Help - &Ajuda - - - - Tabs toolbar - Barra d'eines - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - Actualitzant... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transacció enviada - - - - Incoming transaction - Transacció entrant - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - La cartera està <b>encriptada<b/> i <b>desbloquejada<b/> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - La cartera està <b>encriptada<b/> i <b>bloquejada<b/> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,77 +315,77 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + Amount - + Label - + Etiqueta @@ -815,123 +395,123 @@ Address: %4 Date - + Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -999,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1009,91 +589,437 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + Could not unlock wallet. - + New key generation failed. - + GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiqueta + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (sense etiqueta) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copia la selecció actual al porta-retalls del sistema + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Eliminar + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Fitxer separat per comes (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1101,214 +1027,214 @@ This label turns red, if the priority is smaller than "medium". Options - + &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1316,79 +1242,107 @@ This label turns red, if the priority is smaller than "medium". Form - + - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> - + - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,242 +1561,248 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - + Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once - + Add &Recipient - + Remove all transaction fields - + Clear &All - + Balance: - + - 123.456 BTC - + 123.456 TRI + Confirm the send action - + S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,63 +1820,284 @@ This label turns red, if the priority is smaller than "medium". Form - + A&mount: - + Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: - + - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,119 +2105,123 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2104,178 +2289,190 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Open for %n block(s) - + + + + + conflicted - + %1/offline - + %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + + + Date - + Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + Amount - + true - + false - + - + , has not been successfully broadcast yet - + unknown - + @@ -2283,25 +2480,25 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date - + Type - + @@ -2311,112 +2508,121 @@ This label turns red, if the priority is smaller than "medium". Amount - + Open until %1 - + Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + Received with - + Received from - + Sent to - + Payment to yourself - + Mined - + (n/a) - + - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2425,107 +2631,107 @@ This label turns red, if the priority is smaller than "medium". All - + Today - + This week - + This month - + Last month - + This year - + Range... - + Received with - + Sent to - + To yourself - + Mined - + Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + @@ -2535,17 +2741,17 @@ This label turns red, if the priority is smaller than "medium". Confirmed - + Date - + Type - + @@ -2560,726 +2766,1206 @@ This label turns red, if the priority is smaller than "medium". Amount - + ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com - + - - Find peers using internet relay chat (default: 0) - + + Specify configuration file (default: triangles.conf) + - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + &Visió general + + + + Show general overview of wallet + Mostrar visió general de la cartera + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transaccions + + + + Browse transaction history + Exploreu l'historial de transaccions + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + Sortir de l'aplicació + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + &Opcions... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + Canviar frase-contrasenya per a l'escriptació de la cartera + + + + &Unlock Wallet... + + + + + Unlock wallet + Desbloquejar cartera + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Fitxer + + + + &Settings + &Configuració + + + + &Help + &Ajuda + + + + Tabs toolbar + Barra d'eines + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Sincronitzant amb la xarxa... + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + + + + + Catching up... + Actualitzant... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transacció enviada + + + + Incoming transaction + Transacció entrant + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + La cartera està <b>encriptada<b/> i <b>desbloquejada<b/> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + La cartera està <b>encriptada<b/> i <b>bloquejada<b/> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + + + + + + + + %n day(s) + + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_ca@valencia.qm b/src/qt/locale/triangles_ca@valencia.qm similarity index 51% rename from src/qt/locale/bitcoin_ca@valencia.qm rename to src/qt/locale/triangles_ca@valencia.qm index dece326..4dbd865 100644 Binary files a/src/qt/locale/bitcoin_ca@valencia.qm and b/src/qt/locale/triangles_ca@valencia.qm differ diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/triangles_ca@valencia.ts similarity index 54% rename from src/qt/locale/bitcoin_ca@valencia.ts rename to src/qt/locale/triangles_ca@valencia.ts index a5bb772..50a97b7 100644 --- a/src/qt/locale/bitcoin_ca@valencia.ts +++ b/src/qt/locale/triangles_ca@valencia.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Doble click per editar la direccio o la etiqueta - + Create a new address Crear nova direccio @@ -52,102 +53,102 @@ This product includes software developed by the OpenSSL Project for use in the O Copieu l'adreça seleccionada al porta-retalls del sistema - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete Eliminar Copy &Label - + &Edit - + Export Address Book Data - + Comma separated file (*.csv) - + Error exporting - + Could not write to file %1. - + AddressTableModel - + Label - + Address - + (no label) - + @@ -155,109 +156,109 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + Enter passphrase - + New passphrase - + Repeat new passphrase - + Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + 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>. - + Encrypt wallet - + This operation needs your wallet passphrase to unlock the wallet. - + Unlock wallet - + This operation needs your wallet passphrase to decrypt the wallet. - + Decrypt wallet - + Change passphrase - + Enter the old and new passphrase to the wallet. - + Confirm wallet encryption - + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + Wallet encrypted - + - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -265,461 +266,40 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet encryption failed - + Wallet encryption failed due to an internal error. Your wallet was not encrypted. - + The supplied passphrases do not match. - + Wallet unlock failed - + The passphrase entered for the wallet decryption was incorrect. - + Wallet decryption failed - + Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - - - - - &Overview - - - - - Show general overview of wallet - - - - - &Transactions - - - - - Browse transaction history - - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - - - - - &Settings - - - - - &Help - - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,203 +315,203 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + Amount - + Label - + Address - + Date - + Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,30 +538,30 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + (no label) - + change from %1 (%2) - + (change) - + @@ -989,111 +569,457 @@ This label turns red, if the priority is smaller than "medium". Edit Address - + &Label - + The label associated with this address book entry - + &Address - + The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + Could not unlock wallet. - + New key generation failed. - + GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copieu l'adreça seleccionada al porta-retalls del sistema + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + Eliminar + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1101,214 +1027,214 @@ This label turns red, if the priority is smaller than "medium". Options - + &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1316,79 +1242,107 @@ This label turns red, if the priority is smaller than "medium". Form - + - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> - + - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,252 +1561,258 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - + Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once - + Add &Recipient - + Remove all transaction fields - + Clear &All - + Balance: - + - 123.456 BTC - + 123.456 TRI + Confirm the send action - + S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + (no label) - + WARNING: unknown change address - + @@ -1860,63 +1820,284 @@ This label turns red, if the priority is smaller than "medium". Form - + A&mount: - + Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: - + - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,119 +2105,123 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2104,178 +2289,190 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Open for %n block(s) - + + + + + conflicted - + %1/offline - + %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + + + Date - + Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + Amount - + true - + false - + - + , has not been successfully broadcast yet - + unknown - + @@ -2283,140 +2480,149 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date - + Type - + Address - + Amount - + Open until %1 - + Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + Received with - + Received from - + Sent to - + Payment to yourself - + Mined - + (n/a) - + - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2425,861 +2631,1341 @@ This label turns red, if the priority is smaller than "medium". All - + Today - + This week - + This month - + Last month - + This year - + Range... - + Received with - + Sent to - + To yourself - + Mined - + Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + Comma separated file (*.csv) - + Confirmed - + Date - + Type - + Label - + Address - + Amount - + ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com - + - - Find peers using internet relay chat (default: 0) - + + Specify configuration file (default: triangles.conf) + - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + + + + + Browse transaction history + + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + + + + + + + + %n day(s) + + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_ca_ES.qm b/src/qt/locale/triangles_ca_ES.qm new file mode 100644 index 0000000..e5a2eba Binary files /dev/null and b/src/qt/locale/triangles_ca_ES.qm differ diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/triangles_ca_ES.ts similarity index 67% rename from src/qt/locale/bitcoin_ca_ES.ts rename to src/qt/locale/triangles_ca_ES.ts index 787a584..4a56b0b 100644 --- a/src/qt/locale/bitcoin_ca_ES.ts +++ b/src/qt/locale/triangles_ca_ES.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin - Sobre buynowcoin + About Triangles + Sobre triangles + + + <b>triangles</b> version + versió <b>triangles</b> + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers - <b>buynowcoin</b> version - versió <b>buynowcoin</b> + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,12 +50,17 @@ This product includes software developed by the OpenSSL Project for use in the O Llibreta d'adreces - + + These are your Triangles 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. + + + + Double-click to edit address or label Feu doble clic per editar l'adreça o l'etiqueta - + Create a new address Crear una nova adreça @@ -54,17 +70,21 @@ This product includes software developed by the OpenSSL Project for use in the O Copiar l'adreça seleccionada al porta-retalls del sistema - + + Sign a message to prove you own a TRI address + + + + &New Address &Nova adreça - - These are your buynowcoin 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. - Aquestes són les teves adreces de buynowcoin per rebre els pagaments. És possible que vulgueu donar una diferent a cada remitent per a poder realitzar un seguiment de qui li está pagant. + These are your triangles 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. + Aquestes són les teves adreces de triangles per rebre els pagaments. És possible que vulgueu donar una diferent a cada remitent per a poder realitzar un seguiment de qui li está pagant. - + &Copy Address &Copiar adreça @@ -74,27 +94,30 @@ This product includes software developed by the OpenSSL Project for use in the O Mostra el códi &QR - - Sign a message to prove you own a buynowcoin address - Signar un missatge per demostrar que és propietari d'una adreça buynowcoin + Sign a message to prove you own a triangles address + Signar un missatge per demostrar que és propietari d'una adreça triangles - + Sign &Message Signar &Message - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Esborrar l'adreça sel·leccionada - - Verify a message to ensure it was signed with a specified buynowcoin address - Comproveu el missatge per assegurar-se que es va signar amb una adreça buynowcoin especificada. + Verify a message to ensure it was signed with a specified triangles address + Comproveu el missatge per assegurar-se que es va signar amb una adreça triangles especificada. - + &Verify Message &Verificar el missatge @@ -137,7 +160,7 @@ This product includes software developed by the OpenSSL Project for use in the O AddressTableModel - + Label Etiqueta @@ -240,7 +263,12 @@ This product includes software developed by the OpenSSL Project for use in the O Esteu segur que voleu encriptar el vostre moneder? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. IMPORTANT: Tota copia de seguretat que hagis realitzat hauria de ser reemplaçada pel, recentment generat, arxiu encriptat del moneder. @@ -257,12 +285,11 @@ This product includes software developed by the OpenSSL Project for use in the O Moneder encriptat - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin tancarà ara per acabar el procés de xifrat. Recordeu que l'encriptació de la seva cartera no pot protegir completament les seves monedes de ser robades pel malware que pugui infectar al seu equip. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles tancarà ara per acabar el procés de xifrat. Recordeu que l'encriptació de la seva cartera no pot protegir completament les seves monedes de ser robades pel malware que pugui infectar al seu equip. - + @@ -303,427 +330,6 @@ This product includes software developed by the OpenSSL Project for use in the O La contrasenya del moneder ha estat modificada correctament. - - BitcoinGUI - - - Sign &message... - Signar &missatge... - - - - Synchronizing with network... - Sincronitzant amb la xarxa ... - - - - &Overview - &Panorama general - - - - Show general overview of wallet - Mostra panorama general del moneder - - - - &Transactions - &Transaccions - - - - Browse transaction history - Cerca a l'historial de transaccions - - - - &Address Book - &Llibreta d'adreces - - - - Edit the list of stored addresses and labels - Edició de la llista d'adreces i etiquetes emmagatzemades - - - - &Receive coins - &Rebre monedes - - - - Show the list of addresses for receiving payments - Mostra la llista d'adreces per rebre pagaments - - - - &Send coins - &Enviar monedes - - - - E&xit - S&ortir - - - - Quit application - Sortir de l'aplicació - - - - Show information about buynowcoin - Mostra informació sobre buynowcoin - - - - About &Qt - Sobre &Qt - - - - Show information about Qt - Mostra informació sobre Qt - - - - &Options... - &Opcions... - - - - &Encrypt Wallet... - &Xifrar moneder - - - - &Backup Wallet... - &Realitzant copia de seguretat del moneder... - - - - &Change Passphrase... - &Canviar contrasenya... - - - - ~%n block(s) remaining - ~%n bloc restant~%n blocs restants - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Descarregats %1 de %2 blocs d'historial de transaccions (%3% completat). - - - - &Export... - &Exportar... - - - - Send coins to a buynowcoin address - Enviar monedes a una adreça buynowcoin - - - - Modify configuration options for buynowcoin - Modificar les opcions de configuració per a buynowcoin - - - - Export the data in the current tab to a file - Exportar les dades de la pestanya actual a un arxiu - - - - Encrypt or decrypt wallet - Xifrar o desxifrar cartera - - - - Backup wallet to another location - Realitzar còpia de seguretat del moneder a un altre directori - - - - Change the passphrase used for wallet encryption - Canviar la constrasenya d'encriptació del moneder - - - - &Debug window - &Finestra de debug - - - - Open debugging and diagnostic console - Obrir la consola de diagnòstic i debugging - - - - &Verify message... - &Verifica el missatge.. - - - - buynowcoin - buynowcoin - - - - Wallet - Moneder - - - - &About buynowcoin - &Sobre buynowcoin - - - - &Show / Hide - &Mostrar / Amagar - - - - Unlock wallet - Desbloquejar la cartera - - - - &Lock Wallet - &Bloquejar cartera - - - - Lock wallet - Bloquejar cartera - - - - &File - &Arxiu - - - - &Settings - &Configuració - - - - &Help - &Ajuda - - - - Tabs toolbar - Barra d'eines de seccions - - - - Actions toolbar - Barra d'eines d'accions - - - - - [testnet] - [testnet] - - - - - buynowcoin client - Client buynowcoin - - - - %n active connection(s) to buynowcoin network - %n conexió activa a la xarxa buynowcoin%n conexions actives a la xarxa buynowcoin - - - - Downloaded %1 blocks of transaction history. - Descarregats %1 blocs d'historial de transaccions - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Fent "stake".<br>El teu pes és %1<br>El pes de la xarxa és %2<br>El temps estimat per a guanyar una recompensa és 3% - - - - Not staking because wallet is locked - No s'està fent "stake" perquè la cartera esa bloquejada - - - - Not staking because wallet is offline - No s'està fent "stake" perquè la cartera està fora de línia - - - - Not staking because wallet is syncing - No s'està fent "stake" perquè la cartera està sincronitzant - - - - Not staking because you don't have mature coins - No s'està fent "stake" perquè no tens monedes madures - - - - %n second(s) ago - fa %n segonfa %n segons - - - - About buynowcoin card - Sobre la tarjeta buynowcoin - - - - Show information about buynowcoin card - Mostra informació sobre la tarjeta buynowcoin - - - - &Unlock Wallet... - &Desbloquejar cartera - - - - %n minute(s) ago - fa %n minutfa %n minuts - - - - %n hour(s) ago - fa %n horafa %n hores - - - - %n day(s) ago - fa %n diafa %n dies - - - - Up to date - Al dia - - - - Catching up... - Posar-se al dia ... - - - - Last received block was generated %1. - El darrer bloc rebut s'ha generat %1. - - - - 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? - Aquesta transacció es troba sobre el límit de mida. Encara pot enviar-la amb una comisió de 1%, aquesta va als nodes que processen la seva transacció i ajuda a mantenir la xarxa. Vol pagar la quota? - - - - Confirm transaction fee - Confirmeu comisió - - - - Sent transaction - Transacció enviada - - - - Incoming transaction - Transacció entrant - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Data: %1\nQuantitat %2\n Tipus: %3\n Adreça: %4\n - - - - - URI handling - Manejant URI - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - l'URI no es pot analitzar! Això pot ser causat per una adreça buynowcoin no vàlida o paràmetres URI malformats. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - El moneder està <b>encriptat</b> i actualment <b>desbloquejat</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - El moneder està <b>encriptat</b> i actualment <b>bloquejat</b> - - - - Backup Wallet - Realitzar còpia de seguretat del moneder - - - - Wallet Data (*.dat) - Dades del moneder (*.dat) - - - - Backup Failed - Còpia de seguretat fallida - - - - There was an error trying to save the wallet data to the new location. - Hi ha un error al tractar de salvar les dades de la seva cartera a la nova ubicació. - - - - %n second(s) - %n segon%n segons - - - - %n minute(s) - %n minut%n minuts - - - - %n hour(s) - %n hora%n hores - - - - %n day(s) - %n dia%n dies - - - - Not staking - No s'està fent "stake" - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - S'ha produït un error fatal. buynowcoin ja no pot continuar de forma segura i es tancarà. - - ClientModel @@ -1028,37 +634,46 @@ En aquest cas es requereix una comisió d'almenys 2%. La direcció associada amb aquesta entrada de la llibreta d'adreces. Només pot ser modificada per a l'enviament d'adreces. - + + &Stealth Address + + + + New receiving address Nova adreça de recepció. - + New sending address Nova adreça d'enviament - + Edit receiving address Editar adreces de recepció - + Edit sending address Editar adreces d'enviament - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. L'adreça introduïda "%1" ja és present a la llibreta d'adreces. - - The entered address "%1" is not a valid buynowcoin address. - La direcció introduïda "%1" no és una adreça buynowcoin vàlida. + The entered address "%1" is not a valid triangles address. + La direcció introduïda "%1" no és una adreça triangles vàlida. - + Could not unlock wallet. No s'ha pogut desbloquejar el moneder. @@ -1071,18 +686,22 @@ En aquest cas es requereix una comisió d'almenys 2%. GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version versió - + + + Triangles-Qt + + + + Usage: Ús: @@ -1112,6 +731,347 @@ En aquest cas es requereix una comisió d'almenys 2%. Mostrar finestra de benvinguda a l'inici (per defecte: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipus + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiqueta + + + + To Address + + + + + From Address + + + + + Message + Missatge + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (sense etiqueta) + + + + MessagePage + + + Address Book + Llibreta d'adreces + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copiar l'adreça seleccionada al porta-retalls del sistema + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Esborrar l'adreça sel·leccionada + + + + &Delete + &Esborrar + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Arxiu de separació per comes (*.csv) + + + + Error exporting + Error a l'exportar + + + + Could not write to file %1. + No s'ha pogut escriure al fitxer %1. + + OptionsDialog @@ -1145,17 +1105,15 @@ En aquest cas es requereix una comisió d'almenys 2%. Reserva - - Automatically start buynowcoin after logging in to the system. - Inicia automàticament buynowcoin després d'entrar en el sistema. + Automatically start triangles after logging in to the system. + Inicia automàticament triangles després d'entrar en el sistema. - - &Start buynowcoin on system login - &Iniciar buynowcoin amb l'inici de sessió + &Start triangles on system login + &Iniciar triangles amb l'inici de sessió - + 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. Separeu el bloc i les bases de dades d'adreces en apagar l'equip. En aquest cas es pot moure a un altre directori de dades, però alenteix l'apagada. La cartera està sempre separada. @@ -1170,19 +1128,37 @@ En aquest cas es requereix una comisió d'almenys 2%. &Xarxa - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Obrir automàticament el port de client buynowcoin en el router. Això només funciona quan el router és compatible amb UPnP i està habilitat. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Obrir automàticament el port de client triangles en el router. Això només funciona quan el router és compatible amb UPnP i està habilitat. - + Map port using &UPnP Port obert amb &UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Connecteu-vos a la xarxa buynowcoin través d'un proxy SOCKS (per exemple, quan es connecta a través de Tor). + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Connecteu-vos a la xarxa triangles través d'un proxy SOCKS (per exemple, quan es connecta a través de Tor). + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1256,11 +1232,20 @@ En aquest cas es requereix una comisió d'almenys 2%. - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - L'idioma de la interfície d'usuari es pot configurar aquí. Aquesta configuració s'aplicarà després de reiniciar buynowcoin. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + L'idioma de la interfície d'usuari es pot configurar aquí. Aquesta configuració s'aplicarà després de reiniciar triangles. + + + &Unit to show amounts in: &Unitats per mostrar les quantitats en: @@ -1270,12 +1255,11 @@ En aquest cas es requereix una comisió d'almenys 2%. Sel·lecciona la unitat de subdivisió per defecte per mostrar en la interficie quan s'envien monedes. - - Whether to show buynowcoin addresses in the transaction list or not. - Per mostrar buynowcoin adreces a la llista de transaccions o no. + Whether to show triangles addresses in the transaction list or not. + Per mostrar triangles adreces a la llista de transaccions o no. - + &Display addresses in transaction list &Mostrar adreces al llistat de transaccions @@ -1318,8 +1302,12 @@ En aquest cas es requereix una comisió d'almenys 2%. - This setting will take effect after restarting buynowcoin. - Aquesta configuració s'aplicarà després de reiniciar buynowcoin. + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Aquesta configuració s'aplicarà després de reiniciar triangles. @@ -1335,13 +1323,11 @@ En aquest cas es requereix una comisió d'almenys 2%. Formulari - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - La informació mostrada pot estar fora de data. La seva cartera es sincronitza automàticament amb la xarxa buynowcoin després d'establir una connexió, però aquest procés no s'ha completat encara. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + La informació mostrada pot estar fora de data. La seva cartera es sincronitza automàticament amb la xarxa triangles després d'establir una connexió, però aquest procés no s'ha completat encara. - + Stake: En "stake": @@ -1376,27 +1362,61 @@ En aquest cas es requereix una comisió d'almenys 2%. Balanç minat que encara no ha madurat - + Total: Total: - + Your current total balance El seu balanç total - + <b>Recent transactions</b> <b>Transaccions recents</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Total de transaccions que encara no s'han confirmat, i encara no compten per al balanç actual - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Total de les monedes que s'han posat a fer "stake" (en joc, aposta), i encara no compten per al balanç actual @@ -1497,7 +1517,17 @@ En aquest cas es requereix una comisió d'almenys 2%. &Informació - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Utilitzant OpenSSL versió @@ -1542,7 +1572,17 @@ En aquest cas es requereix una comisió d'almenys 2%. Últim temps de bloc - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Obrir @@ -1552,12 +1592,11 @@ En aquest cas es requereix una comisió d'almenys 2%. Opcions de la línia d'ordres - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Mostra el missatge d'ajuda de buynowcoin-Qt per obtenir una llista amb les possibles opcions de línia d'ordres buynowcoin. + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Mostra el missatge d'ajuda de triangles-Qt per obtenir una llista amb les possibles opcions de línia d'ordres triangles. - + &Show &Mostra @@ -1572,34 +1611,35 @@ En aquest cas es requereix una comisió d'almenys 2%. Data de compilació - - buynowcoin - Debug window - buynowcoin - Finestra Depuració + triangles - Debug window + triangles - Finestra Depuració - - buynowcoin Core - Nucli buynowcoin + triangles Core + Nucli triangles - + Debug log file Dietàri de debug - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Obriu el fitxer de registre de depuració buynowcoin des del directori de dades actual. Això pot trigar uns segons en els arxius de registre de grans dimensions. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Obriu el fitxer de registre de depuració triangles des del directori de dades actual. Això pot trigar uns segons en els arxius de registre de grans dimensions. - + Clear console Netejar consola + + Welcome to the triangles RPC console. + Benvingut a la consola RPC de triangles. + - Welcome to the buynowcoin RPC console. - Benvingut a la consola RPC de buynowcoin. + Welcome to the Triangles RPC console. + @@ -1623,6 +1663,7 @@ En aquest cas es requereix una comisió d'almenys 2%. + Send Coins Enviar monedes @@ -1647,7 +1688,7 @@ En aquest cas es requereix una comisió d'almenys 2%. Fons insuficient - + Quantity: Quantitat: @@ -1667,13 +1708,17 @@ En aquest cas es requereix una comisió d'almenys 2%. Amount: Quantitat: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1716,7 +1761,7 @@ En aquest cas es requereix una comisió d'almenys 2%. Adreça de canvi pròpia - + Send to multiple recipients at once Enviar a multiples destinataris al mateix temps @@ -1742,8 +1787,12 @@ En aquest cas es requereix una comisió d'almenys 2%. - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1756,9 +1805,13 @@ En aquest cas es requereix una comisió d'almenys 2%. E&nviar - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Introdueix una adreça buynowcoin (p.ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Introdueix una adreça triangles (p.ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1855,10 +1908,19 @@ En aquest cas es requereix una comisió d'almenys 2%. 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. Error: La transacció ha sigut rebutjada. Això pot passar si algunes de les monedes a la cartera ja s'han gastat, per exemple, si vostè utilitza una còpia del wallet.dat i les monedes han estat gastades a la cópia pero no s'han marcat com a gastades aqui. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - ADVERTÈNCIA: Direcció buynowcoin invàlida + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + ADVERTÈNCIA: Direcció triangles invàlida @@ -1890,19 +1952,29 @@ En aquest cas es requereix una comisió d'almenys 2%. - + Enter a label for this address to add it to your address book Introdueixi una etiquera per a aquesta adreça per afegir-la a la llibreta d'adreces + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiqueta: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - L'adreça per a enviar el pagament (per exemple: Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + L'adreça per a enviar el pagament (per exemple: TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1929,10 +2001,225 @@ En aquest cas es requereix una comisió d'almenys 2%. Remove this recipient Eliminar aquest destinatari + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Introdueix una adreça triangles (p.ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Introdueix una adreça buynowcoin (p.ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Trieu la direcció de la llibreta d'adreces + + + + Alt+A + Alta+A + + + + Paste address from clipboard + Enganxar adreça del porta-retalls + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Enviar a multiples destinataris al mateix temps + + + + Add &Recipient + Affegir &Destinatari + + + + Remove all transaction fields + Traieu tots els camps de transacció + + + + Clear &All + Esborrar &Tot + + + + Confirm the send action + Confirmi l'acció d'enviament + + + + S&end + E&nviar + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> a %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Esteu segur que voleu enviar %1? + + + + and + i + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + L'adreça remetent no és vàlida, si us plau comprovi-la. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + S'ha trobat una adreça duplicada, tan sols es pot enviar a cada adreça un cop per ordre de enviament. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulari + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Trieu la direcció de la llibreta d'adreces + + + + Alt+A + Alta+A + + + + Paste address from clipboard + Enganxar adreça del porta-retalls + + + + Alt+P + Alt+P + + + + Remove this recipient + Eliminar aquest destinatari + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Introdueixi una etiquera per a aquesta adreça per afegir-la a la llibreta d'adreces + + + + &Label: + &Etiqueta: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1955,8 +2242,8 @@ En aquest cas es requereix una comisió d'almenys 2%. - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - L'adreça per a signar el missatge (per exemple Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + L'adreça per a signar el missatge (per exemple TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1992,11 +2279,20 @@ En aquest cas es requereix una comisió d'almenys 2%. - Sign the message to prove you own this buynowcoin address - Signar un missatge per demostrar que és propietari d'aquesta adreça buynowcoin + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Signar un missatge per demostrar que és propietari d'aquesta adreça triangles + + + Reset all sign message fields Neteja tots els camps de clau @@ -2019,34 +2315,45 @@ En aquest cas es requereix una comisió d'almenys 2%. - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - La direcció que va ser signada amb un missatge (per exemple Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + La direcció que va ser signada amb un missatge (per exemple TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Comproveu el missatge per assegurar-se que es va signar amb l'adreça buynowcoin especificada. + Verify the message to ensure it was signed with the specified triangles address + Comproveu el missatge per assegurar-se que es va signar amb l'adreça triangles especificada. - + Reset all verify message fields Neteja tots els camps de verificació de missatge - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Introdueix una adreça buynowcoin (p.ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Introdueix una adreça triangles (p.ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Clica "Signar Missatge" per a generar una signatura + + Enter triangles signature + Introduïu la signatura triangles + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Introduïu la signatura buynowcoin + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2125,7 +2432,11 @@ En aquest cas es requereix una comisió d'almenys 2%. Open for %n block(s) - Obert per a %n blocObert per a %n blocs + + Obert per a %n bloc + Obert per a %n blocs + + @@ -2155,7 +2466,11 @@ En aquest cas es requereix una comisió d'almenys 2%. , broadcast through %n node(s) - , transmès a través de %n node, transmès a través de %n nodes + + , transmès a través de %n node + , transmès a través de %n nodes + + @@ -2201,14 +2516,18 @@ En aquest cas es requereix una comisió d'almenys 2%. - + Credit Crèdit - + matures in %n more block(s) - madura en %n bloc mésmadura en %n blocs més + + madura en %n bloc més + madura en %n blocs més + + @@ -2219,12 +2538,12 @@ En aquest cas es requereix una comisió d'almenys 2%. - + Debit Dèbit - + Transaction fee Comissió de transacció @@ -2244,14 +2563,18 @@ En aquest cas es requereix una comisió d'almenys 2%. Comentar - + Transaction ID ID de transacció + Generated coins must mature 60 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. + Les monedes generades han de madurar 510 blocs abans de poder-se gastar. En generar aquest bloc, que va ser transmès a la xarxa per ser afegit a la cadena de bloc. Si no aconsegueix entrar a la cadena, el seu estat canviarà a "no acceptat" i no es podrà gastar. Això pot succeir de tant en tant si un altre node genera un bloc a pocs segons del seu. {60 ?} + + Generated coins must mature 510 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. - Les monedes generades han de madurar 510 blocs abans de poder-se gastar. En generar aquest bloc, que va ser transmès a la xarxa per ser afegit a la cadena de bloc. Si no aconsegueix entrar a la cadena, el seu estat canviarà a "no acceptat" i no es podrà gastar. Això pot succeir de tant en tant si un altre node genera un bloc a pocs segons del seu. + Les monedes generades han de madurar 510 blocs abans de poder-se gastar. En generar aquest bloc, que va ser transmès a la xarxa per ser afegit a la cadena de bloc. Si no aconsegueix entrar a la cadena, el seu estat canviarà a "no acceptat" i no es podrà gastar. Això pot succeir de tant en tant si un altre node genera un bloc a pocs segons del seu. @@ -2284,7 +2607,7 @@ En aquest cas es requereix una comisió d'almenys 2%. fals - + , has not been successfully broadcast yet , encara no ha estat emès correctement @@ -2310,7 +2633,7 @@ En aquest cas es requereix una comisió d'almenys 2%. TransactionTableModel - + Date Data @@ -2342,10 +2665,19 @@ En aquest cas es requereix una comisió d'almenys 2%. Open for %n more block(s) - Obert per a %n bloc mésObert per a %n blocs més + + Obert per a %n bloc més + Obert per a %n blocs més + + - + + Narration + + + + Offline Desconnectat @@ -2410,7 +2742,7 @@ En aquest cas es requereix una comisió d'almenys 2%. (n/a) - + Transaction status. Hover over this field to show number of confirmations. Estat de la transacció. Desplaça't per aquí sobre per mostrar el nombre de confirmacions. @@ -2605,29 +2937,20 @@ En aquest cas es requereix una comisió d'almenys 2%. - WalletModel + Triangles-core - - Sending... - Enviant... - - - - bitcoin-core - - - buynowcoin version - versió buynowcoin + triangles version + versió triangles - + Usage: Ús: - Send command to -server or buynowcoind - Enviar comandes a -server o buynowcoind + Send command to -server or trianglesd + Enviar comandes a -server o trianglesd @@ -2646,13 +2969,13 @@ En aquest cas es requereix una comisió d'almenys 2%. - Specify configuration file (default: buynowcoin.conf) - Especifiqueu el fitxer de configuració (per defecte: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Especifiqueu el fitxer de configuració (per defecte: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Especificar arxiu pid (per defecte: buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + Especificar arxiu pid (per defecte: trianglesd.pid) @@ -2665,7 +2988,22 @@ En aquest cas es requereix una comisió d'almenys 2%. Especificar directori de dades - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Establir tamany de la memoria cau en megabytes (per defecte: 25) @@ -2800,12 +3138,11 @@ En aquest cas es requereix una comisió d'almenys 2%. Advertència: el -paytxfee és molt elevat! Aquesta és la comissió de transacció que pagaràs quan enviis una transacció. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Avís: Comproveu que la data i hora de l'equip siguin correctes! Si el seu rellotge és erroni buynowcoin no funcionarà correctament. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Avís: Comproveu que la data i hora de l'equip siguin correctes! Si el seu rellotge és erroni triangles no funcionarà correctament. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Advertència: Error llegint l'arxiu wallet.dat!! Totes les claus es llegeixen correctament, però hi ha dades de transaccions o entrades del llibre d'adreces absents o bé son incorrectes. @@ -2891,8 +3228,8 @@ En aquest cas es requereix una comisió d'almenys 2%. - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Opcions SSL: (veure la Wiki de Bitcoin per a instruccions de configuració SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Opcions SSL: (veure la Wiki de Triangles per a instruccions de configuració SSL) @@ -2952,17 +3289,52 @@ En aquest cas es requereix una comisió d'almenys 2%. Utilitza proxy per arribar als serveis ocults de Tor (per defecte: la mateixa que -proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Nom d'usuari per a connexions JSON-RPC - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Comprovant la integritat de la base de dades ... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! ADVERTÈNCIA: violació de punt de control sincronitzat detectada, es saltarà! @@ -2987,32 +3359,31 @@ En aquest cas es requereix una comisió d'almenys 2%. Contrasenya per a connexions JSON-RPC - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, ha d'establir un rpcpassword al fitxer de configuració: + %s, ha d'establir un rpcpassword al fitxer de configuració: %s Es recomana utilitzar la següent contrasenya aleatòria: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (No cal recordar aquesta contrasenya) El nom d'usuari i contrasenya NO HA DE SER el mateix. Si no hi ha l'arxiu, s'ha de crear amb els permisos de només lectura per al propietari. També es recomana establir alertnotify per a que se li notifiquin els problemes; -per exemple: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +per exemple: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - + Find peers using internet relay chat (default: 0) Trobar companys utilitzant l'IRC (per defecte: 1) {0)?} @@ -3133,17 +3504,15 @@ Executar una ordre quan es rep un avís rellevant (%s en cmd es substitueix per La cartera %s resideix fora del directori de dades %s. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - No es pot obtenir un bloqueig en el directori de dades %s. buynowcoin probablement ja estigui en funcionament. + Cannot obtain a lock on data directory %s. triangles is probably already running. + No es pot obtenir un bloqueig en el directori de dades %s. triangles probablement ja estigui en funcionament. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Impossible d'unir %s a aquest ordinador (s'ha retornat l'error %d, %s) @@ -3173,17 +3542,15 @@ Executar una ordre quan es rep un avís rellevant (%s en cmd es substitueix per Error carregant wallet.dat: Moneder corrupte - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Error en carregar wallet.dat: La cartera requereix la versió més recent de buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Error en carregar wallet.dat: La cartera requereix la versió més recent de triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - La cartera necessita ser reescrita: reiniciar buynowcoin per completar + Wallet needed to be rewritten: restart triangles to complete + La cartera necessita ser reescrita: reiniciar triangles per completar - + Error loading wallet.dat Error carregant wallet.dat @@ -3248,12 +3615,11 @@ Executar una ordre quan es rep un avís rellevant (%s en cmd es substitueix per Afegir un node per a connectar's-hi i intentar mantenir la connexió oberta - - Unable to bind to %s on this computer. buynowcoin is probably already running. - No es pot enllaçar a %s en aquest equip. buynowcoin probablement ja estigui en funcionament. + Unable to bind to %s on this computer. triangles is probably already running. + No es pot enllaçar a %s en aquest equip. triangles probablement ja estigui en funcionament. - + Fee per KB to add to transactions you send Comisió per KB per a afegir a les transaccions que enviï @@ -3310,4 +3676,540 @@ If the file does not exist, create it with owner-readable-only file permissions. Has de configurar el rpcpassword=<password> a l'arxiu de configuració:\n %s\n Si l'arxiu no existeix, crea'l amb els permís owner-readable-only. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Moneder + + + + &Overview + &Panorama general + + + + Show general overview of wallet + Mostra panorama general del moneder + + + + &Send coins + &Enviar monedes + + + + Send coins to a TRI address + + + + + &Receive coins + &Rebre monedes + + + + Show the list of addresses for receiving payments + Mostra la llista d'adreces per rebre pagaments + + + + &Transactions + &Transaccions + + + + Browse transaction history + Cerca a l'historial de transaccions + + + + &Address Book + &Llibreta d'adreces + + + + Edit the list of stored addresses and labels + Edició de la llista d'adreces i etiquetes emmagatzemades + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + S&ortir + + + + Quit application + Sortir de l'aplicació + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Sobre &Qt + + + + Show information about Qt + Mostra informació sobre Qt + + + + &Options... + &Opcions... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Mostrar / Amagar + + + + &Encrypt Wallet... + &Xifrar moneder + + + + Encrypt or decrypt wallet + Xifrar o desxifrar cartera + + + + &Backup Wallet... + &Realitzant copia de seguretat del moneder... + + + + Backup wallet to another location + Realitzar còpia de seguretat del moneder a un altre directori + + + + &Change Passphrase... + &Canviar contrasenya... + + + + Change the passphrase used for wallet encryption + Canviar la constrasenya d'encriptació del moneder + + + + &Unlock Wallet... + &Desbloquejar cartera + + + + Unlock wallet + Desbloquejar la cartera + + + + &Lock Wallet + &Bloquejar cartera + + + + Lock wallet + Bloquejar cartera + + + + Sign &message... + Signar &missatge... + + + + &Verify message... + &Verifica el missatge.. + + + + &Export... + &Exportar... + + + + Export the data in the current tab to a file + Exportar les dades de la pestanya actual a un arxiu + + + + &Debug window + &Finestra de debug + + + + Open debugging and diagnostic console + Obrir la consola de diagnòstic i debugging + + + + &File + &Arxiu + + + + &Settings + &Configuració + + + + &Help + &Ajuda + + + + Tabs toolbar + Barra d'eines de seccions + + + + Actions toolbar + Barra d'eines d'accions + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Sincronitzant amb la xarxa ... + + + + ~%n block(s) remaining + + ~%n bloc restant + ~%n blocs restants + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Descarregats %1 de %2 blocs d'historial de transaccions (%3% completat). + + + + Downloaded %1 blocks of transaction history. + Descarregats %1 blocs d'historial de transaccions + + + + Current difficulty is %1. + + + + + %n second(s) ago + + fa %n segon + fa %n segons + + + + + + %n minute(s) ago + + fa %n minut + fa %n minuts + + + + + + %n hour(s) ago + + fa %n hora + fa %n hores + + + + + + %n day(s) ago + + fa %n dia + fa %n dies + + + + + + Up to date + Al dia + + + + Catching up... + Posar-se al dia ... + + + + Last received block was generated %1. + El darrer bloc rebut s'ha generat %1. + + + + 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? + Aquesta transacció es troba sobre el límit de mida. Encara pot enviar-la amb una comisió de 1%, aquesta va als nodes que processen la seva transacció i ajuda a mantenir la xarxa. Vol pagar la quota? + + + + Confirm transaction fee + Confirmeu comisió + + + + Sent transaction + Transacció enviada + + + + Incoming transaction + Transacció entrant + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Data: %1\nQuantitat %2\n Tipus: %3\n Adreça: %4\n + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + Manejant URI + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + El moneder està <b>encriptat</b> i actualment <b>desbloquejat</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + El moneder està <b>encriptat</b> i actualment <b>bloquejat</b> + + + + Backup Wallet + Realitzar còpia de seguretat del moneder + + + + Wallet Data (*.dat) + Dades del moneder (*.dat) + + + + Backup Failed + Còpia de seguretat fallida + + + + There was an error trying to save the wallet data to the new location. + Hi ha un error al tractar de salvar les dades de la seva cartera a la nova ubicació. + + + + %n second(s) + + %n segon + %n segons + + + + + + %n minute(s) + + %n minut + %n minuts + + + + + + %n hour(s) + + %n hora + %n hores + + + + + + %n day(s) + + %n dia + %n dies + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Fent "stake".<br>El teu pes és %1<br>El pes de la xarxa és %2<br>El temps estimat per a guanyar una recompensa és 3% + + + + Not staking because wallet is locked + No s'està fent "stake" perquè la cartera esa bloquejada + + + + Not staking because wallet is offline + No s'està fent "stake" perquè la cartera està fora de línia + + + + Not staking because wallet is syncing + No s'està fent "stake" perquè la cartera està sincronitzant + + + + Not staking because you don't have mature coins + No s'està fent "stake" perquè no tens monedes madures + + + + Not staking + No s'està fent "stake" + + + Show information about triangles + Mostra informació sobre triangles + + + Send coins to a triangles address + Enviar monedes a una adreça triangles + + + Modify configuration options for triangles + Modificar les opcions de configuració per a triangles + + + triangles + triangles + + + &About triangles + &Sobre triangles + + + triangles client + Client triangles + + + %n active connection(s) to triangles network + + %n conexió activa a la xarxa triangles + %n conexions actives a la xarxa triangles + + + + + About triangles card + Sobre la tarjeta triangles + + + Show information about triangles card + Mostra informació sobre la tarjeta triangles + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + l'URI no es pot analitzar! Això pot ser causat per una adreça triangles no vàlida o paràmetres URI malformats. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + S'ha produït un error fatal. triangles ja no pot continuar de forma segura i es tancarà. + + + + WalletModel + + + Sending... + Enviant... + + + diff --git a/src/qt/locale/triangles_cs.qm b/src/qt/locale/triangles_cs.qm new file mode 100644 index 0000000..aeb0d4b Binary files /dev/null and b/src/qt/locale/triangles_cs.qm differ diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/triangles_cs.ts similarity index 67% rename from src/qt/locale/bitcoin_cs.ts rename to src/qt/locale/triangles_cs.ts index 5b7953b..7433a65 100644 --- a/src/qt/locale/bitcoin_cs.ts +++ b/src/qt/locale/triangles_cs.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open Address Book - + - + Double-click to edit address or label Dvojklikem myši začneš upravovat označení adresy - + Create a new address Vytvoř novou adresu @@ -57,52 +58,52 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open Zkopíruj aktuálně vybranou adresu do systémové schránky - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Kopíruj adresu Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Smaž zvolenou adresu ze seznamu - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Ověř zprávu - + + These are your Triangles 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. + + + + &Delete S&maž @@ -119,7 +120,7 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open Export Address Book Data - + @@ -129,18 +130,18 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Označení @@ -180,12 +181,12 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,431 +307,6 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open Heslo k peněžence bylo v pořádku změněno. - - BitcoinGUI - - - Sign &message... - Po&depiš zprávu... - - - - Synchronizing with network... - Synchronizuji se se sítí... - - - - &Overview - &Přehled - - - - Show general overview of wallet - Zobraz celkový přehled peněženky - - - - &Transactions - &Transakce - - - - Browse transaction history - Procházej historii transakcí - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Konec - - - - Quit application - Ukonči aplikaci - - - - Show information about buynowcoin - - - - - About &Qt - O &Qt - - - - Show information about Qt - Zobraz informace o Qt - - - - &Options... - &Možnosti... - - - - &Encrypt Wallet... - Zaši&fruj peněženku... - - - - &Backup Wallet... - &Zazálohuj peněženku... - - - - &Change Passphrase... - Změň &heslo... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Zazálohuj peněženku na jiné místo - - - - Change the passphrase used for wallet encryption - Změň heslo k šifrování peněženky - - - - &Debug window - &Ladicí okno - - - - Open debugging and diagnostic console - Otevři ladicí a diagnostickou konzoli - - - - &Verify message... - &Ověř zprávu... - - - - buynowcoin - - - - - Wallet - Peněženka - - - - &About buynowcoin - - - - - &Show / Hide - &Zobraz/Skryj - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Soubor - - - - &Settings - &Nastavení - - - - &Help - Ná&pověda - - - - Tabs toolbar - Panel s listy - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Aktuální - - - - Catching up... - Stahuji... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Odeslané transakce - - - - Incoming transaction - Příchozí transakce - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Datum: %1 -Částka: %2 -Typ: %3 -Adresa: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Peněženka je <b>zašifrovaná</b> a momentálně <b>odemčená</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Peněženka je <b>zašifrovaná</b> a momentálně <b>zamčená</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - hodinu%n hodiny%n hodin - - - - %n day(s) - den%n dny%n dnů - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -744,17 +320,17 @@ Adresa: %4 Coin Control - + Quantity: - + Bytes: - + @@ -764,47 +340,47 @@ Adresa: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -814,7 +390,7 @@ Adresa: %4 Label - + Označení @@ -829,7 +405,7 @@ Adresa: %4 Confirmations - + @@ -839,7 +415,7 @@ Adresa: %4 Priority - + @@ -865,82 +441,82 @@ Adresa: %4 Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -949,7 +525,7 @@ Adresa: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -958,7 +534,7 @@ Adresa: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -967,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -985,12 +561,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1008,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1018,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nová přijímací adresa - + New sending address Nová odesílací adresa - + Edit receiving address Uprav přijímací adresu - + Edit sending address Uprav odesílací adresu - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Zadaná adresa "%1" už v adresáři je. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Nemohu odemknout peněženku. @@ -1065,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Užití: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Typ + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Označení + + + + To Address + + + + + From Address + + + + + Message + Zpráva + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Zkopíruj aktuálně vybranou adresu do systémové schránky + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Smaž zvolenou adresu ze seznamu + + + + &Delete + S&maž + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + CSV formát (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1120,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1130,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1164,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1174,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1190,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1249,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1264,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1275,12 +1197,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1295,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1306,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1328,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". Formulář - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1351,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1369,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". Vytěžené mince, které ještě nejsou zralé - + Total: Celkem: - + Your current total balance Celkový stav tvého účtu - + <b>Recent transactions</b> <b>Poslední transakce</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1405,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Částka: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1512,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1542,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1566,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1581,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Vyčistit konzoli - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1616,44 +1566,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Pošli mince Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1665,51 +1616,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Pošli více příjemcům naráz @@ -1721,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1735,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1749,14 +1700,14 @@ This label turns red, if the priority is smaller than "medium". P&ošli - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1766,37 +1717,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1806,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1841,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1861,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1869,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formulář @@ -1883,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Zadej označení této adresy; obojí se ti pak uloží do adresáře + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: O&značení: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1920,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Vlož adresu ze schránky + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Pošli více příjemcům naráz + + + + Add &Recipient + Při&dej příjemce + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + Potvrď odeslání + + + + S&end + P&ošli + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Adresa příjemce je neplatná, překontroluj ji prosím. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Zaznamenána duplikovaná adresa; každá adresa může být v odesílané platbě pouze jednou. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulář + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Vlož adresu ze schránky + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Zadej označení této adresy; obojí se ti pak uloží do adresáře + + + + &Label: + O&značení: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1948,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1985,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Vymaž všechna pole formuláře pro podepsání zrávy @@ -2012,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Vymaž všechna pole formuláře pro ověření zrávy - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Kliknutím na "Podepiš zprávu" vygeneruješ podpis + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2118,12 +2299,16 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + + conflicted - + @@ -2148,7 +2333,11 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , rozesláno přes 1 uzel, rozesláno přes %n uzly, rozesláno přes %n uzlů + + , rozesláno přes 1 uzel + , rozesláno přes %n uzly + , rozesláno přes %n uzlů + @@ -2194,14 +2383,18 @@ This label turns red, if the priority is smaller than "medium". - + Credit Příjem - + matures in %n more block(s) - dozraje po jednom blokudozraje po %n blocíchdozraje po %n blocích + + dozraje po jednom bloku + dozraje po %n blocích + dozraje po %n blocích + @@ -2212,12 +2405,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Výdaj - + Transaction fee Transakční poplatek @@ -2237,14 +2430,14 @@ This label turns red, if the priority is smaller than "medium". Komentář - + Transaction ID ID transakce - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2277,7 +2470,7 @@ This label turns red, if the priority is smaller than "medium". false - + , has not been successfully broadcast yet , ještě nebylo rozesláno @@ -2303,7 +2496,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Datum @@ -2335,32 +2528,41 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Otevřeno pro 1 další blokOtevřeno pro %n další blokyOtevřeno pro %n dalších bloků + + Otevřeno pro 1 další blok + Otevřeno pro %n další bloky + Otevřeno pro %n dalších bloků + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2403,7 +2605,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Stav transakce. Najetím myši na toto políčko si zobrazíš počet potvrzení. @@ -2534,7 +2736,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2579,12 +2781,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2598,32 +2800,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Užití: - - Send command to -server or buynowcoind - - - - + List commands Výpis příkazů @@ -2638,17 +2822,7 @@ This label turns red, if the priority is smaller than "medium". Možnosti: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) Udej název souboru s peněženkou (v rámci datového adresáře) @@ -2665,12 +2839,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2690,12 +2864,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2715,22 +2889,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2740,22 +2914,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2780,12 +2954,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2793,12 +2967,7 @@ This label turns red, if the priority is smaller than "medium". Upozornění: -paytxfee je nastaveno velmi vysoko! Toto je transakční poplatek, který zaplatíš za každou poslanou transakci. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Upozornění: nastala chyba při čtení souboru wallet.dat! Všechny klíče se přečetly správně, ale data o transakcích nebo záznamy v adresáři mohou chybět či být nesprávné. @@ -2835,22 +3004,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2870,27 +3039,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Možnosti SSL: (viz instrukce nastavení SSL v Bitcoin Wiki) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Možnosti SSL: (viz instrukce nastavení SSL v Triangles Wiki) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2900,12 +3069,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2926,7 +3095,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2941,7 +3110,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2951,17 +3120,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2979,34 +3158,39 @@ This label turns red, if the priority is smaller than "medium". Heslo pro JSON-RPC spojení - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3031,17 +3215,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3061,17 +3245,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3091,17 +3275,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3111,27 +3295,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Nedaří se mi připojit na %s na tomhle počítači (operace bind vrátila chybu %d, %s) Connect through socks proxy - + @@ -3146,7 +3320,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3154,17 +3328,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Chyba při načítání wallet.dat: peněženka je poškozená - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Chyba při načítání wallet.dat @@ -3201,12 +3365,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3224,39 +3388,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Načítám index bloků... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Přidat uzel, ke kterému se připojit a snažit se spojení udržet - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Načítám peněženku... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Nemohu převést peněženku do staršího formátu Cannot initialize keypool - + @@ -3293,4 +3487,496 @@ If the file does not exist, create it with owner-readable-only file permissions. Pokud konfigurační soubor ještě neexistuje, vytvoř ho tak, aby ho mohl číst pouze vlastník. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Peněženka + + + + &Overview + &Přehled + + + + Show general overview of wallet + Zobraz celkový přehled peněženky + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transakce + + + + Browse transaction history + Procházej historii transakcí + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Konec + + + + Quit application + Ukonči aplikaci + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + O &Qt + + + + Show information about Qt + Zobraz informace o Qt + + + + &Options... + &Možnosti... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Zobraz/Skryj + + + + &Encrypt Wallet... + Zaši&fruj peněženku... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Zazálohuj peněženku... + + + + Backup wallet to another location + Zazálohuj peněženku na jiné místo + + + + &Change Passphrase... + Změň &heslo... + + + + Change the passphrase used for wallet encryption + Změň heslo k šifrování peněženky + + + + &Unlock Wallet... + + + + + Unlock wallet + Odemkni peněženku + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Po&depiš zprávu... + + + + &Verify message... + &Ověř zprávu... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + &Ladicí okno + + + + Open debugging and diagnostic console + Otevři ladicí a diagnostickou konzoli + + + + &File + &Soubor + + + + &Settings + &Nastavení + + + + &Help + Ná&pověda + + + + Tabs toolbar + Panel s listy + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Synchronizuji se se sítí... + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + Aktuální + + + + Catching up... + Stahuji... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Odeslané transakce + + + + Incoming transaction + Příchozí transakce + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Datum: %1 +Částka: %2 +Typ: %3 +Adresa: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Peněženka je <b>zašifrovaná</b> a momentálně <b>odemčená</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Peněženka je <b>zašifrovaná</b> a momentálně <b>zamčená</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + hodinu + %n hodiny + %n hodin + + + + + %n day(s) + + den + %n dny + %n dnů + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_cy.qm b/src/qt/locale/triangles_cy.qm new file mode 100644 index 0000000..b9b85dc Binary files /dev/null and b/src/qt/locale/triangles_cy.qm differ diff --git a/src/qt/locale/bitcoin_cy.ts b/src/qt/locale/triangles_cy.ts similarity index 56% rename from src/qt/locale/bitcoin_cy.ts rename to src/qt/locale/triangles_cy.ts index 03c588a..8c6da36 100644 --- a/src/qt/locale/bitcoin_cy.ts +++ b/src/qt/locale/triangles_cy.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Clicio dwywaith i olygu cyfeiriad neu label - + Create a new address Creu cyfeiriad newydd @@ -52,90 +53,90 @@ This product includes software developed by the OpenSSL Project for use in the O Copio'r cyfeiriad sydd wedi'i ddewis i'r clipfwrdd system - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Dileu Copy &Label - + &Edit - + Export Address Book Data - + Comma separated file (*.csv) - + Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Label @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -288,7 +289,7 @@ This product includes software developed by the OpenSSL Project for use in the O The passphrase entered for the wallet decryption was incorrect. - + @@ -298,428 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - Cysoni â'r rhwydwaith... - - - - &Overview - &Trosolwg - - - - Show general overview of wallet - Dangos trosolwg cyffredinol y waled - - - - &Transactions - &Trafodion - - - - Browse transaction history - Pori hanes trafodion - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - Gadael rhaglen - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - &Opsiynau - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - Newid y cyfrinymadrodd a ddefnyddiwyd ar gyfer amgryptio'r waled - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Ffeil - - - - &Settings - &Gosodiadau - - - - &Help - &Cymorth - - - - Tabs toolbar - Bar offer tabiau - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Cyfamserol - - - - Catching up... - Dal i fyny - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Trafodiad a anfonwyd - - - - Incoming transaction - Trafodiad sy'n cyrraedd - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Mae'r waled <b>wedi'i amgryptio</b> ac <b>heb ei gloi</b> ar hyn o bryd - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Mae'r waled <b>wedi'i amgryptio</b> ac <b>ar glo</b> ar hyn o bryd - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,77 +315,77 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + Amount - + Label - + Label @@ -820,118 +400,118 @@ Address: %4 Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -999,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1009,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Cyfeiriad derbyn newydd - + New sending address Cyfeiriad anfon newydd - + Edit receiving address Golygu'r cyfeiriad derbyn - + Edit sending address Golygu'r cyfeiriad anfon - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Mae'r cyfeiriad "%1" sydd newydd gael ei geisio gennych yn y llyfr cyfeiriad yn barod. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Methodd ddatgloi'r waled. @@ -1056,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Math + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Label + + + + To Address + + + + + From Address + + + + + Message + Neges + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (heb label) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copio'r cyfeiriad sydd wedi'i ddewis i'r clipfwrdd system + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Dileu + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1106,209 +1032,209 @@ This label turns red, if the priority is smaller than "medium". &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1319,76 +1245,104 @@ This label turns red, if the priority is smaller than "medium". Ffurflen - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Trafodion diweddar</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,117 +1561,118 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Anfon arian Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Anfon at pobl lluosog ar yr un pryd Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1726,8 +1681,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1737,112 +1692,117 @@ This label turns red, if the priority is smaller than "medium". S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Ffurflen @@ -1870,28 +1830,38 @@ This label turns red, if the priority is smaller than "medium". Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Label: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1911,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Gludo cyfeiriad o'r glipfwrdd + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Anfon at pobl lluosog ar yr un pryd + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + Cadarnhau'r gweithrediad anfon + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Ffurflen + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Gludo cyfeiriad o'r glipfwrdd + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + &Label: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,29 +2105,29 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1967,76 +2148,80 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2109,37 +2294,49 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + + + + conflicted - + %1/offline - + %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + + + + + @@ -2149,73 +2346,79 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + @@ -2225,57 +2428,57 @@ This label turns red, if the priority is smaller than "medium". Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + Amount - + true - + false - + - + , has not been successfully broadcast yet - + unknown - + @@ -2283,18 +2486,18 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date Dyddiad @@ -2311,7 +2514,7 @@ This label turns red, if the priority is smaller than "medium". Amount - + @@ -2321,102 +2524,113 @@ This label turns red, if the priority is smaller than "medium". Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + Received with - + Received from - + Sent to - + Payment to yourself - + Mined - + (n/a) - + - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2425,7 +2639,7 @@ This label turns red, if the priority is smaller than "medium". All - + @@ -2435,17 +2649,17 @@ This label turns red, if the priority is smaller than "medium". This week - + This month - + Last month - + @@ -2455,87 +2669,87 @@ This label turns red, if the priority is smaller than "medium". Range... - + Received with - + Sent to - + To yourself - + Mined - + Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + Comma separated file (*.csv) - + Confirmed - + @@ -2560,714 +2774,706 @@ This label turns red, if the priority is smaller than "medium". Amount - + ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com - + - - Find peers using internet relay chat (default: 0) - + + Specify configuration file (default: triangles.conf) + - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + @@ -3279,7 +3485,515 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + &Trosolwg + + + + Show general overview of wallet + Dangos trosolwg cyffredinol y waled + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Trafodion + + + + Browse transaction history + Pori hanes trafodion + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + Gadael rhaglen + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + &Opsiynau + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + Newid y cyfrinymadrodd a ddefnyddiwyd ar gyfer amgryptio'r waled + + + + &Unlock Wallet... + + + + + Unlock wallet + Datgloi'r waled + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Ffeil + + + + &Settings + &Gosodiadau + + + + &Help + &Cymorth + + + + Tabs toolbar + Bar offer tabiau + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + + + Synchronizing with network... + Cysoni â'r rhwydwaith... + + + + ~%n block(s) remaining + + + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + + + %n minute(s) ago + + + + + + + + + + + %n hour(s) ago + + + + + + + + + + + %n day(s) ago + + + + + + + + + + + Up to date + Cyfamserol + + + + Catching up... + Dal i fyny + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Trafodiad a anfonwyd + + + + Incoming transaction + Trafodiad sy'n cyrraedd + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Mae'r waled <b>wedi'i amgryptio</b> ac <b>heb ei gloi</b> ar hyn o bryd + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Mae'r waled <b>wedi'i amgryptio</b> ac <b>ar glo</b> ar hyn o bryd + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + + + %n minute(s) + + + + + + + + + + + %n hour(s) + + + + + + + + + + + %n day(s) + + + + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_da.qm b/src/qt/locale/triangles_da.qm new file mode 100644 index 0000000..9104dba Binary files /dev/null and b/src/qt/locale/triangles_da.qm differ diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/triangles_da.ts similarity index 67% rename from src/qt/locale/bitcoin_da.ts rename to src/qt/locale/triangles_da.ts index 987845a..cd7123b 100644 --- a/src/qt/locale/bitcoin_da.ts +++ b/src/qt/locale/triangles_da.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin - Om buynowcoin + About Triangles + Om triangles + + + <b>triangles</b> version + <b>triangles</b> version + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers - <b>buynowcoin</b> version - <b>buynowcoin</b> version + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers +Copyright © 2014 Triangles team + - + This is experimental software. @@ -44,12 +55,17 @@ Produktet indeholder software, som er udviklet af OpenSSL Project til brug i Ope Adressebog - + + These are your Triangles 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. + + + + Double-click to edit address or label Dobbeltklik for at redigere adresse eller mærkat - + Create a new address Opret en ny adresse @@ -59,17 +75,21 @@ Produktet indeholder software, som er udviklet af OpenSSL Project til brug i Ope Kopier den valgte adresse til udklipsholder - + + Sign a message to prove you own a TRI address + + + + &New Address &Ny adresse - - These are your buynowcoin 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. - Dette er dine buynowcoin adresser til at modtage betalinger. Du ønsker måske at give en anden en til af hver afsender, så du kan holde styr på hvem der betaler dig. + These are your triangles 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. + Dette er dine triangles adresser til at modtage betalinger. Du ønsker måske at give en anden en til af hver afsender, så du kan holde styr på hvem der betaler dig. - + &Copy Address &Kopier adresse @@ -79,27 +99,30 @@ Produktet indeholder software, som er udviklet af OpenSSL Project til brug i Ope Vis &QR kode - - Sign a message to prove you own a buynowcoin address - Signerer en meddelelse for at bevise du ejer en buynowcoin adresse + Sign a message to prove you own a triangles address + Signerer en meddelelse for at bevise du ejer en triangles adresse - + Sign &Message Signere & Besked - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Slet den markerede adresse fra listen - - Verify a message to ensure it was signed with a specified buynowcoin address - Bekræft en meddelelse for at sikre, den blev underskrevet med en specificeret buynowcoin adresse + Verify a message to ensure it was signed with a specified triangles address + Bekræft en meddelelse for at sikre, den blev underskrevet med en specificeret triangles adresse - + &Verify Message Bekræft Meddelse @@ -142,7 +165,7 @@ Produktet indeholder software, som er udviklet af OpenSSL Project til brug i Ope AddressTableModel - + Label Mærkat @@ -245,7 +268,12 @@ Produktet indeholder software, som er udviklet af OpenSSL Project til brug i Ope Er du sikker på, at du ønsker at kryptere din tegnebog? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. VIGTIGT: Enhver tidligere sikkerhedskopi, som du har lavet af tegnebogsfilen, bør blive erstattet af den nyligt genererede, krypterede tegnebogsfil. Af sikkerhedsmæssige årsager vil tidligere sikkerhedskopier af den ikke-krypterede tegnebogsfil blive ubrugelig i det øjeblik, du starter med at anvende den nye, krypterede tegnebog. @@ -262,12 +290,11 @@ Produktet indeholder software, som er udviklet af OpenSSL Project til brug i Ope Tegnebog krypteret - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin lukker nu for at afslutte krypteringen. Husk at en krypteret tegnebog ikke fuldt ud beskytter dine mønter mod at blive stjålet af malware som har inficeret din computer. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles lukker nu for at afslutte krypteringen. Husk at en krypteret tegnebog ikke fuldt ud beskytter dine mønter mod at blive stjålet af malware som har inficeret din computer. - + @@ -308,431 +335,6 @@ Produktet indeholder software, som er udviklet af OpenSSL Project til brug i Ope Tegnebogens adgangskode blev ændret. - - BitcoinGUI - - - Sign &message... - Underskriv besked... - - - - Synchronizing with network... - Synkroniserer med netværk... - - - - &Overview - Oversigt - - - - Show general overview of wallet - Vis generel oversigt over tegnebog - - - - &Transactions - Transaktioner - - - - Browse transaction history - Gennemse transaktionshistorik - - - - &Address Book - &Adresse Bog - - - - Edit the list of stored addresses and labels - Redigere listen over gemte adresser og etiketter - - - - &Receive coins - &Modtag mønter - - - - Show the list of addresses for receiving payments - Vis listen over adresser for modtagne betalinger - - - - &Send coins - &Send mønter - - - - E&xit - Luk - - - - Quit application - Afslut program - - - - Show information about buynowcoin - Vis oplysninger om buynowcoin - - - - About &Qt - Om Qt - - - - Show information about Qt - Vis informationer om Qt - - - - &Options... - Indstillinger... - - - - &Encrypt Wallet... - Krypter tegnebog... - - - - &Backup Wallet... - Sikkerhedskopier tegnebog... - - - - &Change Passphrase... - Skift adgangskode... - - - - ~%n block(s) remaining - ~%n blok resterer~%n blokke resterende - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Downloadet% 1 af% 2 blokke af transaktions historie (% 3% færdig). - - - - &Export... - &Eksporter ... - - - - Send coins to a buynowcoin address - Send mønter til en buynowcoin adresse - - - - Modify configuration options for buynowcoin - Ændre indstillingsmuligheder for buynowcoin - - - - Export the data in the current tab to a file - Eksportere data i den aktuelle fane til en fil - - - - Encrypt or decrypt wallet - Kryptere eller dekryptere tegnebog - - - - Backup wallet to another location - Lav sikkerhedskopi af tegnebogen til et andet sted - - - - Change the passphrase used for wallet encryption - Skift adgangskode anvendt til tegnebogskryptering - - - - &Debug window - Fejlsøgningsvindue - - - - Open debugging and diagnostic console - Åbn fejlsøgnings- og diagnosticeringskonsollen - - - - &Verify message... - Verificér besked... - - - - buynowcoin - buynowcoin - - - - Wallet - Tegnebog - - - - &About buynowcoin - &Om buynowcoin - - - - &Show / Hide - Vis / skjul - - - - Unlock wallet - Lås tegnebog - - - - &Lock Wallet - &Lås tegnebog - - - - Lock wallet - Lås tegnebog - - - - &File - Fil - - - - &Settings - Indstillinger - - - - &Help - Hjælp - - - - Tabs toolbar - Faneværktøjslinje - - - - Actions toolbar - Fanværktøjslinje - - - - - [testnet] - [testnetværk] - - - - - buynowcoin client - buynowcoin Klient - - - - %n active connection(s) to buynowcoin network - %n aktiv forbindelse til buynowcoin netværk%n aktive forbindelser til buynowcoin netværk - - - - Downloaded %1 blocks of transaction history. - Downloadet %1 blokke af transaktions historie. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Renter.<br> Din andel er% 1 <br> Netværkets andel er% 2 <br> Forventet tid til at modtage rente %3 - - - - Not staking because wallet is locked - Ingen rente fordi tegnebog er låst - - - - Not staking because wallet is offline - Ingen rente fordi tegnebog er offline - - - - Not staking because wallet is syncing - Ingen rente fordi tegnebog er ved at synkronisere - - - - Not staking because you don't have mature coins - Ingen rente fordi der ingen modne mønter eksistere - - - - %n second(s) ago - %n sekund siden%n sekunder siden - - - - About buynowcoin card - Om buynowcoin kort - - - - Show information about buynowcoin card - Vis oplysninger om buynowcoin kort - - - - &Unlock Wallet... - Lås tegnebog op - - - - %n minute(s) ago - %n minut siden%n minutter siden - - - - %n hour(s) ago - %n time siden%n timer siden - - - - %n day(s) ago - %n dag siden%n dage siden - - - - Up to date - Opdateret - - - - Catching up... - Indhenter... - - - - Last received block was generated %1. - Sidst modtagne blok blev genereret %1. - - - - 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? - Denne transaktion er over grænsen størrelse. Du kan stadig sende det for et gebyr på %1, der går til de noder, der behandler din transaktion og hjælper med at støtte netværket. Ønsker du at betale gebyret? - - - - Confirm transaction fee - Bekræft transaktionsgebyr - - - - Sent transaction - Afsendt transaktion - - - - Incoming transaction - Indgående transaktion - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Dato: %1 -Beløb: %2 -Type: %3 -Adresse: %4 - - - - - - URI handling - URI håndtering - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URI kan ikke tolkes! Dette kan skyldes en ugyldig buynowcoin adresse eller misdannede URI parametre. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Tegnebog er <b>krypteret</b> og i øjeblikket <b>ulåst</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Tegnebog er <b>krypteret</b> og i øjeblikket <b>låst</b> - - - - Backup Wallet - Sikkerhedskopier Tegnebog - - - - Wallet Data (*.dat) - Wallet Data (*.dat) - - - - Backup Failed - Sikkerhedskopiering Mislykkedes - - - - There was an error trying to save the wallet data to the new location. - Der opstod en fejl under forsøg på at gemme data i tegnebogen til den nye placering. - - - - %n second(s) - %n sekund%n sekunder - - - - %n minute(s) - %n minut%n minutter - - - - %n hour(s) - %n time(r)%n time(r) - - - - %n day(s) - %n dag(e)%n dag(e) - - - - Not staking - Ingen rente - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Der opstod en fejl under forsøg på at gemme dataene i tegnebogen til den nye placering. - - ClientModel @@ -1037,37 +639,46 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Adressen er forbundet med denne post i adressekartoteket. Dette kan kun ændres til sende adresser. - + + &Stealth Address + + + + New receiving address Ny modtagelsesadresse - + New sending address Ny afsendelsesadresse - + Edit receiving address Rediger modtagelsesadresse - + Edit sending address Rediger afsendelsesadresse - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Den indtastede adresse "%1" er allerede i adressebogen. - - The entered address "%1" is not a valid buynowcoin address. - Den indtastede adresse "%1" er ikke en gyldig buynowcoin adresse. + The entered address "%1" is not a valid triangles address. + Den indtastede adresse "%1" er ikke en gyldig triangles adresse. - + Could not unlock wallet. Kunne ikke låse tegnebog op. @@ -1080,18 +691,22 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version version - + + + Triangles-Qt + + + + Usage: Anvendelse: @@ -1121,6 +736,347 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Vis splash skærm ved opstart (default: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Type + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Mærkat + + + + To Address + + + + + From Address + + + + + Message + Besked + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (ingen mærkat) + + + + MessagePage + + + Address Book + Adressebog + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopier den valgte adresse til udklipsholder + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Slet den markerede adresse fra listen + + + + &Delete + &Slet + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Kommasepareret fil (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + + + OptionsDialog @@ -1154,17 +1110,15 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Reserve - - Automatically start buynowcoin after logging in to the system. - Automatisk start buynowcoin efter at have logget ind på systemet. + Automatically start triangles after logging in to the system. + Automatisk start triangles efter at have logget ind på systemet. - - &Start buynowcoin on system login - &Start buynowcoin ved systems login + &Start triangles on system login + &Start triangles ved systems login - + 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. Frigør blok og adressedatabaser ved lukning. Det betyder, at de kan flyttes til et anden data-bibliotek, men det sinker lukning. Tegnebogen er altid frigjort. @@ -1179,19 +1133,37 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Netværk - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Automatisk åbne buynowcoin klient-port på routeren. Dette virker kun, når din router understøtter UPnP og er det er aktiveret. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Automatisk åbne triangles klient-port på routeren. Dette virker kun, når din router understøtter UPnP og er det er aktiveret. - + Map port using &UPnP Konfigurer port vha. UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Opret forbindelse til buynowcoin netværk via en SOCKS proxy (fx ved tilslutning gennem Tor). + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Opret forbindelse til triangles netværk via en SOCKS proxy (fx ved tilslutning gennem Tor). + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1265,26 +1237,34 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - Sproget i brugergrænsefladen kan indstilles her. Denne indstilling vil træde i kraft efter genstart af buynowcoin tegnebog. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + Sproget i brugergrænsefladen kan indstilles her. Denne indstilling vil træde i kraft efter genstart af triangles tegnebog. + + + &Unit to show amounts in: Enhed at vise beløb i: Choose the default subdivision unit to show in the interface and when sending coins. - Vælg den standard underopdelingsenhed, som skal vises i brugergrænsefladen og ved afsendelse af bitcoins. + Vælg den standard underopdelingsenhed, som skal vises i brugergrænsefladen og ved afsendelse af triangless. - - Whether to show buynowcoin addresses in the transaction list or not. - Få vist buynowcoin adresser på listen over transaktioner eller ej. + Whether to show triangles addresses in the transaction list or not. + Få vist triangles adresser på listen over transaktioner eller ej. - + &Display addresses in transaction list Vis adresser i transaktionsliste @@ -1327,8 +1307,12 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - This setting will take effect after restarting buynowcoin. - Denne indstilling vil træde i kraft efter genstart af buynowcoin. + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Denne indstilling vil træde i kraft efter genstart af triangles. @@ -1344,13 +1328,11 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Formular - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - De viste oplysninger kan være forældet. Din tegnebog synkroniserer automatisk med buynowcoin netværket efter en forbindelse er etableret, men denne proces er ikke afsluttet endnu. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + De viste oplysninger kan være forældet. Din tegnebog synkroniserer automatisk med triangles netværket efter en forbindelse er etableret, men denne proces er ikke afsluttet endnu. - + Stake: Rente: @@ -1385,27 +1367,61 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Udvunden saldo, som endnu ikke er modnet - + Total: Total: - + Your current total balance Din nuværende totale saldo - + <b>Recent transactions</b> <b>Nyeste transaktioner</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Summen af ​​transaktioner, der endnu mangler at blive bekræftet, og ikke tæller mod den nuværende balance - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance I alt mønter, der bliver berentet, og endnu ikke tæller mod den nuværende balance @@ -1506,7 +1522,17 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Information - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Anvender OpenSSL-version @@ -1551,7 +1577,17 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Tidsstempel for seneste blok - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open Åbn @@ -1561,12 +1597,11 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Kommandolinjeparametrene - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Vis buynowcoin-Qt hjælpe besked for at få en liste med mulige buynowcoin kommandolinjeparametre. + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Vis triangles-Qt hjælpe besked for at få en liste med mulige triangles kommandolinjeparametre. - + &Show &Vis @@ -1581,34 +1616,35 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Byggedato - - buynowcoin - Debug window - buynowcoin - Debug vindue + triangles - Debug window + triangles - Debug vindue - - buynowcoin Core - buynowcoin Kerne + triangles Core + triangles Kerne - + Debug log file Fejlsøgningslogfil - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Åbn buynowcoin debug logfilen fra den nuværende data mappe. Dette kan tage et par sekunder for store logfiler. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Åbn triangles debug logfilen fra den nuværende data mappe. Dette kan tage et par sekunder for store logfiler. - + Clear console Ryd konsol + + Welcome to the triangles RPC console. + Velkommen til triangles RPC-konsol. + - Welcome to the buynowcoin RPC console. - Velkommen til buynowcoin RPC-konsol. + Welcome to the Triangles RPC console. + @@ -1632,8 +1668,9 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. + Send Coins - Send bitcoins + Send triangless @@ -1656,7 +1693,7 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Utilstrækkelig midler! - + Quantity: Antal: @@ -1676,13 +1713,17 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Amount: Beløb: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1725,7 +1766,7 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Ændre adresse - + Send to multiple recipients at once Send til flere modtagere på en gang @@ -1751,8 +1792,12 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1765,9 +1810,13 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Afsend - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Indtast en buynowcoin-adresse (f.eks Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Indtast en triangles-adresse (f.eks TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1817,7 +1866,7 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Confirm send coins - Bekræft afsendelse af bitcoins + Bekræft afsendelse af triangless @@ -1864,10 +1913,19 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. 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. Fejl: Transaktionen blev afvist. Dette kan ske, hvis nogle af mønterne i din tegnebog allerede er blevet brugt, som hvis du brugte en kopi af wallet.dat og mønterne blev brugt i kopien, men ikke markeret som brugt her. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - ADVARSEL: Ugyldig buynowcoin adresse + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + ADVARSEL: Ugyldig triangles adresse @@ -1899,19 +1957,29 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - + Enter a label for this address to add it to your address book Indtast en mærkat for denne adresse for at føje den til din adressebog + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: Mærkat: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adressen til at sende betalingen til (f.eks Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adressen til at sende betalingen til (f.eks TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1938,10 +2006,225 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Remove this recipient Fjern denne modtager + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Indtast en triangles-adresse (f.eks TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Indtast en buynowcoin-adresse (f.eks Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Vælg adresse fra adressebogen + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Indsæt adresse fra udklipsholderen + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Send til flere modtagere på en gang + + + + Add &Recipient + Tilføj modtager + + + + Remove all transaction fields + Fjern alle transaktions omkostnings felter + + + + Clear &All + Ryd alle + + + + Confirm the send action + Bekræft afsendelsen + + + + S&end + Afsend + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> til %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Er du sikker på du vil sende% 1? + + + + and + og + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Modtagerens adresse er ikke gyldig. Tjek venligst adressen igen. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Duplikeret adresse fundet. Du kan kun sende til hver adresse en gang pr. afsendelse. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Vælg adresse fra adressebogen + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Indsæt adresse fra udklipsholderen + + + + Alt+P + Alt+P + + + + Remove this recipient + Fjern denne modtager + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Indtast en mærkat for denne adresse for at føje den til din adressebog + + + + &Label: + Mærkat: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1960,12 +2243,12 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. 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. - Du kan underskrive beskeder med dine Bitcoin-adresser for at bevise, at de tilhører dig. Pas på ikke at underskrive noget vagt, da phisingangreb kan narre dig til at overdrage din identitet. Underskriv kun fuldt detaljerede udsagn, du er enig i. + Du kan underskrive beskeder med dine Triangles-adresser for at bevise, at de tilhører dig. Pas på ikke at underskrive noget vagt, da phisingangreb kan narre dig til at overdrage din identitet. Underskriv kun fuldt detaljerede udsagn, du er enig i. - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adresse til at underskrive meddelelsen med (f.eks Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adresse til at underskrive meddelelsen med (f.eks TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -2001,11 +2284,20 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - Sign the message to prove you own this buynowcoin address - Underskriv brevet for at bevise du ejer denne buynowcoin adresse + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Underskriv brevet for at bevise du ejer denne triangles adresse + + + Reset all sign message fields Nulstil alle "underskriv besked"-felter @@ -2028,34 +2320,45 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adressen meddelelse blev underskrevet med (f.eks Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adressen meddelelse blev underskrevet med (f.eks TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Kontroller meddelelsen for at sikre, at den blev indgået med den angivne buynowcoin adresse + Verify the message to ensure it was signed with the specified triangles address + Kontroller meddelelsen for at sikre, at den blev indgået med den angivne triangles adresse - + Reset all verify message fields Nulstil alle "verificér besked"-felter - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Indtast en buynowcoin-adresse (f.eks Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Indtast en triangles-adresse (f.eks TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Klik "Underskriv besked" for at generere underskriften + + Enter triangles signature + Indtast triangles underskrift + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Indtast buynowcoin underskrift + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2134,7 +2437,10 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Open for %n block(s) - Åben for %n blokÅben for %n blok(ke) + + Åben for %n blok + Åben for %n blok(ke) + @@ -2164,7 +2470,10 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. , broadcast through %n node(s) - , transmitteret igennem %n knude(r), transmitteret igennem %n knude(r) + + , transmitteret igennem %n knude(r) + , transmitteret igennem %n knude(r) + @@ -2210,14 +2519,17 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - + Credit Kredit - + matures in %n more block(s) - modner efter yderligere %n blok(ke)modner efter yderligere %n blok(ke) + + modner efter yderligere %n blok(ke) + modner efter yderligere %n blok(ke) + @@ -2228,12 +2540,12 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - + Debit Debet - + Transaction fee Transaktionsgebyr @@ -2253,14 +2565,18 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Kommentar - + Transaction ID Transaktionens ID + Generated coins must mature 60 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. + Generet mønter skal modne 510 blokke, før de kan blive brugt. Når du genererede denne blok blev det transmitteret til netværket, der tilføjes til blokkæden. Hvis det mislykkes at komme ind i kæden, vil dens tilstand ændres til "ikke godkendt", og det vil ikke være brugbar. Dette kan lejlighedsvis ske, hvis en anden node genererer en blok et par sekunder efter din. {60 ?} + + Generated coins must mature 510 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. - Generet mønter skal modne 510 blokke, før de kan blive brugt. Når du genererede denne blok blev det transmitteret til netværket, der tilføjes til blokkæden. Hvis det mislykkes at komme ind i kæden, vil dens tilstand ændres til "ikke godkendt", og det vil ikke være brugbar. Dette kan lejlighedsvis ske, hvis en anden node genererer en blok et par sekunder efter din. + Generet mønter skal modne 510 blokke, før de kan blive brugt. Når du genererede denne blok blev det transmitteret til netværket, der tilføjes til blokkæden. Hvis det mislykkes at komme ind i kæden, vil dens tilstand ændres til "ikke godkendt", og det vil ikke være brugbar. Dette kan lejlighedsvis ske, hvis en anden node genererer en blok et par sekunder efter din. @@ -2293,7 +2609,7 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. falsk - + , has not been successfully broadcast yet , er ikke blevet transmitteret endnu @@ -2319,7 +2635,7 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. TransactionTableModel - + Date Dato @@ -2351,10 +2667,18 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Open for %n more block(s) - Åben %n blok(ke) yderligereÅben %n blok(ke) yderligere + + Åben %n blok(ke) yderligere + Åben %n blok(ke) yderligere + - + + Narration + + + + Offline Offline @@ -2419,7 +2743,7 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. (n/a) - + Transaction status. Hover over this field to show number of confirmations. Transaktionsstatus. Hold musen over dette felt for at vise antallet af bekræftelser. @@ -2614,29 +2938,20 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - WalletModel + Triangles-core - - Sending... - Sender... - - - - bitcoin-core - - - buynowcoin version - buynowcoin version + triangles version + triangles version - + Usage: Anvendelse: - Send command to -server or buynowcoind - Send kommando til-server eller buynowcoind + Send command to -server or trianglesd + Send kommando til-server eller trianglesd @@ -2655,13 +2970,13 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - Specify configuration file (default: buynowcoin.conf) - Angiv konfigurationsfil (default: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Angiv konfigurationsfil (default: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Angiv pid fil (standard: buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + Angiv pid fil (standard: trianglesd.pid) @@ -2674,7 +2989,22 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Angiv datakatalog - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Angiv databasecachestørrelse i megabytes (standard: 25) @@ -2809,12 +3139,11 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Advarsel: -paytxfee er sat meget højt! Dette er det gebyr du vil betale, hvis du sender en transaktion. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Advarsel: Kontroller venligst, at computerens dato og klokkeslæt er korrekt! Hvis dit ur er forkert vil buynowcoin ikke fungere korrekt. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Advarsel: Kontroller venligst, at computerens dato og klokkeslæt er korrekt! Hvis dit ur er forkert vil triangles ikke fungere korrekt. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Advarsel: fejl under læsning af wallet.dat! Alle nøgler blev læst korrekt, men transaktionsdata eller adressebogsposter kan mangle eller være forkerte. @@ -2900,8 +3229,8 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL-indstillinger: (se Bitcoin Wiki for SSL-opsætningsinstruktioner) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL-indstillinger: (se Triangles Wiki for SSL-opsætningsinstruktioner) @@ -2961,17 +3290,52 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Brug proxy til at nå tor skjulte services (Standard: samme som-proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Brugernavn til JSON-RPC-forbindelser - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Bekræfter database integritet ... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! ADVARSEL: synkroniseret checkpoint overtrædelse opdaget, men skibbet! @@ -2996,32 +3360,31 @@ Det betyder, at et gebyr på mindst %2 er påkrævet. Adgangskode til JSON-RPC-forbindelser - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - % s, skal du indstille et rpcpassword i konfigurationsfilen: + % s, skal du indstille et rpcpassword i konfigurationsfilen: % s Det anbefales at bruge følgende tilfældig adgangskode: -rpcuser = buynowcoinrpc +rpcuser = trianglesrpc rpcpassword =% s (du behøver ikke at huske denne adgangskode) Brugernavn og adgangskode må ikke være den samme. Hvis filen ikke findes, skal du oprette den med filtilladelser ejer-læsbar-kun. Det kan også anbefales at sætte alertnotify så du får besked om problemer; -for eksempel: alertnotify = echo%% s | mail-s "buynowcoin Alert" admin@foo.com +for eksempel: alertnotify = echo%% s | mail-s "triangles Alert" admin@foo.com - + Find peers using internet relay chat (default: 0) Find peers der bruger internet relay chat (default: 1) {? 0)} @@ -3141,17 +3504,15 @@ for eksempel: alertnotify = echo%% s | mail-s "buynowcoin Alert" admin Wallet% s placeret udenfor data mappe% s. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Kan ikke få en lås på data mappe% s. buynowcoin kører sikkert allerede. + Cannot obtain a lock on data directory %s. triangles is probably already running. + Kan ikke få en lås på data mappe% s. triangles kører sikkert allerede. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Kunne ikke tildele %s på denne computer (bind returnerede fejl %d, %s) @@ -3181,17 +3542,15 @@ for eksempel: alertnotify = echo%% s | mail-s "buynowcoin Alert" admin Fejl ved indlæsning af wallet.dat: Tegnebog ødelagt - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Fejl ved indlæsning af wallet.dat: Wallet kræver en nyere version af buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Fejl ved indlæsning af wallet.dat: Wallet kræver en nyere version af triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - Det er nødvendig for wallet at blive omskrevet: Genstart buynowcoin for fuldføre + Wallet needed to be rewritten: restart triangles to complete + Det er nødvendig for wallet at blive omskrevet: Genstart triangles for fuldføre - + Error loading wallet.dat Fejl ved indlæsning af wallet.dat @@ -3256,12 +3615,11 @@ for eksempel: alertnotify = echo%% s | mail-s "buynowcoin Alert" admin Tilføj en knude til at forbinde til og forsøg at holde forbindelsen åben - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Kunne ikke binde sig til% s på denne computer. buynowcoin kører sikkert allerede. + Unable to bind to %s on this computer. triangles is probably already running. + Kunne ikke binde sig til% s på denne computer. triangles kører sikkert allerede. - + Fee per KB to add to transactions you send Gebyr pr KB som tilføjes til transaktioner, du sender @@ -3320,4 +3678,533 @@ If the file does not exist, create it with owner-readable-only file permissions. Hvis filen ikke eksisterer, opret den og giv ingen andre end ejeren læserettighed. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Tegnebog + + + + &Overview + Oversigt + + + + Show general overview of wallet + Vis generel oversigt over tegnebog + + + + &Send coins + &Send mønter + + + + Send coins to a TRI address + + + + + &Receive coins + &Modtag mønter + + + + Show the list of addresses for receiving payments + Vis listen over adresser for modtagne betalinger + + + + &Transactions + Transaktioner + + + + Browse transaction history + Gennemse transaktionshistorik + + + + &Address Book + &Adresse Bog + + + + Edit the list of stored addresses and labels + Redigere listen over gemte adresser og etiketter + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + Luk + + + + Quit application + Afslut program + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Om Qt + + + + Show information about Qt + Vis informationer om Qt + + + + &Options... + Indstillinger... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + Vis / skjul + + + + &Encrypt Wallet... + Krypter tegnebog... + + + + Encrypt or decrypt wallet + Kryptere eller dekryptere tegnebog + + + + &Backup Wallet... + Sikkerhedskopier tegnebog... + + + + Backup wallet to another location + Lav sikkerhedskopi af tegnebogen til et andet sted + + + + &Change Passphrase... + Skift adgangskode... + + + + Change the passphrase used for wallet encryption + Skift adgangskode anvendt til tegnebogskryptering + + + + &Unlock Wallet... + Lås tegnebog op + + + + Unlock wallet + Lås tegnebog + + + + &Lock Wallet + &Lås tegnebog + + + + Lock wallet + Lås tegnebog + + + + Sign &message... + Underskriv besked... + + + + &Verify message... + Verificér besked... + + + + &Export... + &Eksporter ... + + + + Export the data in the current tab to a file + Eksportere data i den aktuelle fane til en fil + + + + &Debug window + Fejlsøgningsvindue + + + + Open debugging and diagnostic console + Åbn fejlsøgnings- og diagnosticeringskonsollen + + + + &File + Fil + + + + &Settings + Indstillinger + + + + &Help + Hjælp + + + + Tabs toolbar + Faneværktøjslinje + + + + Actions toolbar + Fanværktøjslinje + + + + + [testnet] + [testnetværk] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Synkroniserer med netværk... + + + + ~%n block(s) remaining + + ~%n blok resterer + ~%n blokke resterende + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Downloadet% 1 af% 2 blokke af transaktions historie (% 3% færdig). + + + + Downloaded %1 blocks of transaction history. + Downloadet %1 blokke af transaktions historie. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + %n sekund siden + %n sekunder siden + + + + + %n minute(s) ago + + %n minut siden + %n minutter siden + + + + + %n hour(s) ago + + %n time siden + %n timer siden + + + + + %n day(s) ago + + %n dag siden + %n dage siden + + + + + Up to date + Opdateret + + + + Catching up... + Indhenter... + + + + Last received block was generated %1. + Sidst modtagne blok blev genereret %1. + + + + 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? + Denne transaktion er over grænsen størrelse. Du kan stadig sende det for et gebyr på %1, der går til de noder, der behandler din transaktion og hjælper med at støtte netværket. Ønsker du at betale gebyret? + + + + Confirm transaction fee + Bekræft transaktionsgebyr + + + + Sent transaction + Afsendt transaktion + + + + Incoming transaction + Indgående transaktion + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Dato: %1 +Beløb: %2 +Type: %3 +Adresse: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + URI håndtering + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Tegnebog er <b>krypteret</b> og i øjeblikket <b>ulåst</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Tegnebog er <b>krypteret</b> og i øjeblikket <b>låst</b> + + + + Backup Wallet + Sikkerhedskopier Tegnebog + + + + Wallet Data (*.dat) + Wallet Data (*.dat) + + + + Backup Failed + Sikkerhedskopiering Mislykkedes + + + + There was an error trying to save the wallet data to the new location. + Der opstod en fejl under forsøg på at gemme data i tegnebogen til den nye placering. + + + + %n second(s) + + %n sekund + %n sekunder + + + + + %n minute(s) + + %n minut + %n minutter + + + + + %n hour(s) + + %n time(r) + %n time(r) + + + + + %n day(s) + + %n dag(e) + %n dag(e) + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Renter.<br> Din andel er% 1 <br> Netværkets andel er% 2 <br> Forventet tid til at modtage rente %3 + + + + Not staking because wallet is locked + Ingen rente fordi tegnebog er låst + + + + Not staking because wallet is offline + Ingen rente fordi tegnebog er offline + + + + Not staking because wallet is syncing + Ingen rente fordi tegnebog er ved at synkronisere + + + + Not staking because you don't have mature coins + Ingen rente fordi der ingen modne mønter eksistere + + + + Not staking + Ingen rente + + + Show information about triangles + Vis oplysninger om triangles + + + Send coins to a triangles address + Send mønter til en triangles adresse + + + Modify configuration options for triangles + Ændre indstillingsmuligheder for triangles + + + triangles + triangles + + + &About triangles + &Om triangles + + + triangles client + triangles Klient + + + %n active connection(s) to triangles network + + %n aktiv forbindelse til triangles netværk + %n aktive forbindelser til triangles netværk + + + + About triangles card + Om triangles kort + + + Show information about triangles card + Vis oplysninger om triangles kort + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URI kan ikke tolkes! Dette kan skyldes en ugyldig triangles adresse eller misdannede URI parametre. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Der opstod en fejl under forsøg på at gemme dataene i tegnebogen til den nye placering. + + + + WalletModel + + + Sending... + Sender... + + + diff --git a/src/qt/locale/triangles_de.qm b/src/qt/locale/triangles_de.qm new file mode 100644 index 0000000..b8dd4b8 Binary files /dev/null and b/src/qt/locale/triangles_de.qm differ diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/triangles_de.ts similarity index 68% rename from src/qt/locale/bitcoin_de.ts rename to src/qt/locale/triangles_de.ts index 0bec7ce..36d443e 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/triangles_de.ts @@ -1,25 +1,30 @@ - + + + AboutDialog - About buynowcoin - Über buynowcoin + About Triangles + Über triangles + + + <b>triangles</b> version + <b>triangles</b> Version - <b>buynowcoin</b> version - <b>buynowcoin</b> Version + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -42,12 +47,12 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open Adressbuch - + Double-click to edit address or label Doppelklicken, um die Adresse oder die Bezeichnung zu bearbeiten - + Create a new address Eine neue Adresse erstellen @@ -57,17 +62,17 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open Ausgewählte Adresse in die Zwischenablage kopieren - + + Sign a message to prove you own a TRI address + + + + &New Address &Neue Adresse - - These are your buynowcoin 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. - - - - + &Copy Address Adresse &kopieren @@ -77,32 +82,32 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open &QR Code anzeigen - - Sign a message to prove you own a buynowcoin address - - - - + Sign &Message - + - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Ausgewählte Adresse aus der Liste entfernen - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + Nachricht &verifizieren - + + These are your Triangles 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. + + + + &Delete &Löschen @@ -119,7 +124,7 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open Export Address Book Data - + @@ -129,18 +134,18 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open Error exporting - + Fehler beim Exportieren Could not write to file %1. - + Kann Datei nicht schreiben %1. AddressTableModel - + Label Bezeichnung @@ -180,12 +185,12 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +240,7 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +266,8 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,430 +311,6 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open Die Wallet-Passphrase wurde erfolgreich geändert. - - BitcoinGUI - - - Sign &message... - Nachricht &signieren... - - - - Synchronizing with network... - Synchronisiere mit Netzwerk... - - - - &Overview - &Übersicht - - - - Show general overview of wallet - Allgemeine Wallet-Übersicht anzeigen - - - - &Transactions - &Transaktionen - - - - Browse transaction history - Transaktionsverlauf durchsehen - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Beenden - - - - Quit application - Anwendung beenden - - - - Show information about buynowcoin - - - - - About &Qt - Über &Qt - - - - Show information about Qt - Informationen über Qt anzeigen - - - - &Options... - &Konfiguration... - - - - &Encrypt Wallet... - Wallet &verschlüsseln... - - - - &Backup Wallet... - Wallet &sichern... - - - - &Change Passphrase... - Passphrase &ändern... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Eine Wallet-Sicherungskopie erstellen und abspeichern - - - - Change the passphrase used for wallet encryption - Ändert die Passphrase, die für die Wallet-Verschlüsselung benutzt wird - - - - &Debug window - &Debugfenster - - - - Open debugging and diagnostic console - Debugging- und Diagnosekonsole öffnen - - - - &Verify message... - Nachricht &verifizieren... - - - - buynowcoin - - - - - Wallet - Wallet - - - - &About buynowcoin - - - - - &Show / Hide - &Anzeigen / Verstecken - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Datei - - - - &Settings - &Einstellungen - - - - &Help - &Hilfe - - - - Tabs toolbar - Registerkartenleiste - - - - Actions toolbar - - - - - - [testnet] - [Testnetz] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Auf aktuellem Stand - - - - Catching up... - Hole auf... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Gesendete Transaktion - - - - Incoming transaction - Eingehende Transaktion - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Datum: %1 -Betrag: %2 -Typ: %3 -Adresse: %4 - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Wallet ist <b>verschlüsselt</b> und aktuell <b>entsperrt</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Wallet ist <b>verschlüsselt</b> und aktuell <b>gesperrt</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n Stunde%n Stunden - - - - %n day(s) - %n Tag%n Tage - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -743,7 +324,7 @@ Adresse: %4 Coin Control - + @@ -948,7 +529,7 @@ Adresse: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -957,7 +538,7 @@ Adresse: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -966,14 +547,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1020,37 +601,46 @@ This label turns red, if the priority is smaller than "medium". Die Adresse verknüpft mit diesem Adressbucheintrag. Kann nur bei Ausgangsadressen verändert werden. - + + &Stealth Address + + + + New receiving address Neue Empfangsadresse - + New sending address Neue Zahlungsadresse - + Edit receiving address Empfangsadresse bearbeiten - + Edit sending address Zahlungsadresse bearbeiten - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Die eingegebene Adresse "%1" befindet sich bereits im Adressbuch. - - The entered address "%1" is not a valid buynowcoin address. - Die eingegebene Adresse "%1" ist keine gültige buynowcoin Adresse. + The entered address "%1" is not a valid triangles address. + Die eingegebene Adresse "%1" ist keine gültige triangles Adresse. - + Could not unlock wallet. Wallet konnte nicht entsperrt werden. @@ -1064,17 +654,17 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version version - + + + Triangles-Qt + + + + Usage: Benutzung: @@ -1086,12 +676,12 @@ This label turns red, if the priority is smaller than "medium". UI options - + Set language, for example "de_DE" (default: system locale) - + @@ -1101,7 +691,348 @@ This label turns red, if the priority is smaller than "medium". Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Typ + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Bezeichnung + + + + To Address + + + + + From Address + + + + + Message + Nachricht signieren + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (keine Bezeichnung) + + + + MessagePage + + + Address Book + Adressbuch + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Ausgewählte Adresse in die Zwischenablage kopieren + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Ausgewählte Adresse aus der Liste entfernen + + + + &Delete + &Löschen + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Kommagetrennte-Datei (*.csv) + + + + Error exporting + Fehler beim Exportieren + + + + Could not write to file %1. + Kann Datei nicht schreiben %1. @@ -1119,7 +1050,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1129,7 +1060,7 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + @@ -1137,24 +1068,22 @@ This label turns red, if the priority is smaller than "medium". Reserviert - - Automatically start buynowcoin after logging in to the system. - Automatisch buynowcoin starten beim Einloggen in das System. + Automatically start triangles after logging in to the system. + Automatisch triangles starten beim Einloggen in das System. - - &Start buynowcoin on system login - &Starte buynowcoin bei Systemstart + &Start triangles on system login + &Starte triangles bei Systemstart - + 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. - + &Detach databases at shutdown - + @@ -1162,24 +1091,38 @@ This label turns red, if the priority is smaller than "medium". &Netzwerk - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Automatisch den buynowcoin client port auf dem Router öffnen. Das funktioniert nur wenn der Router UPnP unterstützt und UPnP aktiviert ist. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Automatisch den triangles client port auf dem Router öffnen. Das funktioniert nur wenn der Router UPnP unterstützt und UPnP aktiviert ist. - + Map port using &UPnP Portweiterleitung via &UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1248,26 +1191,34 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - Die Sprache der GUI kann hier verändert werden. Die Einstellung wird nach einem Neustart übernommen. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + Die Sprache der GUI kann hier verändert werden. Die Einstellung wird nach einem Neustart übernommen. + + + &Unit to show amounts in: &Einheit der Beträge: Choose the default subdivision unit to show in the interface and when sending coins. - Wählen Sie die Standarduntereinheit, die in der Benutzeroberfläche und beim Überweisen von Bitcoins angezeigt werden soll. + Wählen Sie die Standarduntereinheit, die in der Benutzeroberfläche und beim Überweisen von Triangless angezeigt werden soll. - - Whether to show buynowcoin addresses in the transaction list or not. - buynowcoin Adressen in der Überweisung anzeigen oder nicht. + Whether to show triangles addresses in the transaction list or not. + triangles Adressen in der Überweisung anzeigen oder nicht. - + &Display addresses in transaction list Adressen in der Transaktionsliste &anzeigen @@ -1310,8 +1261,12 @@ This label turns red, if the priority is smaller than "medium". - This setting will take effect after restarting buynowcoin. - Diese Einstellung wird nach einem Neustart übernommen. + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Diese Einstellung wird nach einem Neustart übernommen. @@ -1327,15 +1282,13 @@ This label turns red, if the priority is smaller than "medium". Formular - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - Die angezeigte Information kann falsch sein. Die Brieftasche synchronisiert automatisch mit dem buynowcoin Netzwerk nachdem eine Verbindung zustande gekommen ist, aber dieser Prozess ist nicht abgeschlossen. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + Die angezeigte Information kann falsch sein. Die Brieftasche synchronisiert automatisch mit dem triangles Netzwerk nachdem eine Verbindung zustande gekommen ist, aber dieser Prozess ist nicht abgeschlossen. - + Stake: - + @@ -1368,29 +1321,63 @@ This label turns red, if the priority is smaller than "medium". Erarbeiteter Betrag der noch nicht gereift ist - + Total: Gesamtbetrag: - + Your current total balance Aktueller Gesamtbetrag aus obigen Kategorien - + <b>Recent transactions</b> <b>Letzte Transaktionen</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Anzahl der unbestätigten Transaktionen die somit noch nicht zum aktuellen Kontostand zählen. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1489,7 +1476,17 @@ This label turns red, if the priority is smaller than "medium". &Information - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Verwendete OpenSSL-Version @@ -1544,12 +1541,7 @@ This label turns red, if the priority is smaller than "medium". Kommandozeilen Optionen: - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show &Zeigen @@ -1564,34 +1556,37 @@ This label turns red, if the priority is smaller than "medium". Erstellungsdatum - - buynowcoin - Debug window - buynowcoin - Debug Fenster + triangles - Debug window + triangles - Debug Fenster - - buynowcoin Core - buynowcoin Kern + triangles Core + triangles Kern - + Debug log file Debugprotokolldatei - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Konsole zurücksetzen - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1615,8 +1610,9 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - Bitcoins überweisen + Triangless überweisen @@ -1639,7 +1635,7 @@ This label turns red, if the priority is smaller than "medium". Unzureichender Kontostand! - + Quantity: Anzahl: @@ -1647,7 +1643,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1664,8 +1660,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1675,7 +1671,7 @@ This label turns red, if the priority is smaller than "medium". medium - + mittel @@ -1690,7 +1686,7 @@ This label turns red, if the priority is smaller than "medium". no - + nein @@ -1700,15 +1696,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once In einer Transaktion an mehrere Empfänger auf einmal überweisen @@ -1720,7 +1716,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1734,8 +1730,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1748,9 +1744,9 @@ This label turns red, if the priority is smaller than "medium". &Überweisen - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1795,7 +1791,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1805,12 +1801,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1840,17 +1836,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1860,7 +1861,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1868,7 +1869,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formular @@ -1882,19 +1883,29 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Adressbezeichnung eingeben (diese wird zusammen mit der Adresse dem Adressbuch hinzugefügt) + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Bezeichnung: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Empfängeradresse (z.b. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Empfängeradresse (z.b. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1919,12 +1930,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Adresse aus dem Adressbuch auswählen + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Adresse aus der Zwischenablage einfügen + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + In einer Transaktion an mehrere Empfänger auf einmal überweisen + + + + Add &Recipient + Empfänger &hinzufügen + + + + Remove all transaction fields + + + + + Clear &All + &Zurücksetzen + + + + Confirm the send action + Überweisung bestätigen + + + + S&end + &Überweisen + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Die Zahlungsadresse ist ungültig, bitte nochmals überprüfen. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Doppelte Adresse gefunden, pro Überweisung kann an jede Adresse nur einmalig etwas überwiesen werden. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formular + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Adresse aus dem Adressbuch auswählen + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Adresse aus der Zwischenablage einfügen + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Adressbezeichnung eingeben (diese wird zusammen mit der Adresse dem Adressbuch hinzugefügt) + + + + &Label: + &Bezeichnung: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1947,8 +2169,8 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1984,11 +2206,20 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - Signiere die Nachricht um zu beweisen das du Besitzer dieser buynowcoin Adresse bist. + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Signiere die Nachricht um zu beweisen das du Besitzer dieser triangles Adresse bist. + + + Reset all sign message fields Alle "Nachricht signieren"-Felder zurücksetzen @@ -2011,34 +2242,37 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Alle "Nachricht verifizieren"-Felder zurücksetzen - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Auf "Nachricht signieren" klicken, um die Signatur zu erzeugen + + Enter triangles signature + triangles Signatur eingeben + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - buynowcoin Signatur eingeben + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2117,7 +2351,10 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - Offen für %n weitere BlöckeOffen für %n weitere Blöcke + + Offen für %n weitere Blöcke + Offen für %n weitere Blöcke + @@ -2147,7 +2384,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , über %n Knoten übertragen, über %n Knoten übertragen + + , über %n Knoten übertragen + , über %n Knoten übertragen + @@ -2193,14 +2433,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Gutschrift - + matures in %n more block(s) - reift noch %n weiteren Blockreift noch %n weitere Blöcke + + reift noch %n weiteren Block + reift noch %n weitere Blöcke + @@ -2211,12 +2454,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Belastung - + Transaction fee Transaktionsgebühr @@ -2236,14 +2479,18 @@ This label turns red, if the priority is smaller than "medium". Kommentar - + Transaction ID Transaktions-ID + Generated coins must mature 60 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. + Generierte Coins müssen 510 Bestätigungen erhalten bevor sie verfügbar sind. Dieser Block wurde ans Netzwerk gesendet und der Blockkette angehängt als der Block generiert wurde. Wenn er der Blockkette nicht erfolgreich angehängt werden konnte, wird er den Status in "nicht Akzeptiert" ändern und wird nicht verfügbar sein. Das kann zufällig geschehen wenn eine andere Leitung den Block innerhalb von ein paar Sekunden generiert. {60 ?} + + Generated coins must mature 510 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. - Generierte Coins müssen 510 Bestätigungen erhalten bevor sie verfügbar sind. Dieser Block wurde ans Netzwerk gesendet und der Blockkette angehängt als der Block generiert wurde. Wenn er der Blockkette nicht erfolgreich angehängt werden konnte, wird er den Status in "nicht Akzeptiert" ändern und wird nicht verfügbar sein. Das kann zufällig geschehen wenn eine andere Leitung den Block innerhalb von ein paar Sekunden generiert. + Generierte Coins müssen 510 Bestätigungen erhalten bevor sie verfügbar sind. Dieser Block wurde ans Netzwerk gesendet und der Blockkette angehängt als der Block generiert wurde. Wenn er der Blockkette nicht erfolgreich angehängt werden konnte, wird er den Status in "nicht Akzeptiert" ändern und wird nicht verfügbar sein. Das kann zufällig geschehen wenn eine andere Leitung den Block innerhalb von ein paar Sekunden generiert. @@ -2276,7 +2523,7 @@ This label turns red, if the priority is smaller than "medium". falsch - + , has not been successfully broadcast yet , wurde noch nicht erfolgreich übertragen @@ -2302,7 +2549,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Datum @@ -2334,12 +2581,20 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Offen für %n weiteren BlockOffen für %n weitere Blöcke + + Offen für %n weiteren Block + Offen für %n weitere Blöcke + - + + Narration + + + + Offline - + @@ -2402,7 +2657,7 @@ This label turns red, if the priority is smaller than "medium". (k.A.) - + Transaction status. Hover over this field to show number of confirmations. Transaktionsstatus. Fahren Sie mit der Maus über dieses Feld, um die Anzahl der Bestätigungen zu sehen. @@ -2597,29 +2852,16 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - Wird gesendet... - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Benutzung: - Send command to -server or buynowcoind - Kommando versenden an -server oder buynowcoind + Send command to -server or trianglesd + Kommando versenden an -server oder trianglesd @@ -2638,13 +2880,13 @@ This label turns red, if the priority is smaller than "medium". - Specify configuration file (default: buynowcoin.conf) - Konfigurationsdatei angeben (Standard: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Konfigurationsdatei angeben (Standard: triangles.conf) - Specify pid file (default: buynowcoind.pid) - PID Datei angeben (Standard: buynowcoin.pid) + Specify pid file (default: trianglesd.pid) + PID Datei angeben (Standard: triangles.pid) @@ -2657,19 +2899,34 @@ This label turns red, if the priority is smaller than "medium". Datenverzeichnis festlegen - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Größe des Datenbankcaches in MB festlegen (Standard: 25) Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2689,12 +2946,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2714,7 +2971,7 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + @@ -2729,7 +2986,7 @@ This label turns red, if the priority is smaller than "medium". Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2754,7 +3011,7 @@ This label turns red, if the priority is smaller than "medium". Importing bootstrap blockchain data file. - + @@ -2779,12 +3036,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2792,12 +3049,11 @@ This label turns red, if the priority is smaller than "medium". Warnung: -paytxfee ist auf einen sehr hohen Wert festgelegt! Dies ist die Gebühr die beim Senden einer Transaktion fällig wird. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Wanung : Bitte prüfen Sie ob Datum und Uhrzeit richtig eingestellt sind. Wenn das Datum falsch ist buynowcoin nicht richtig funktionieren. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Wanung : Bitte prüfen Sie ob Datum und Uhrzeit richtig eingestellt sind. Wenn das Datum falsch ist triangles nicht richtig funktionieren. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Warnung: Lesen von wallet.dat fehlgeschlagen! Alle Schlüssel wurden korrekt gelesen, Transaktionsdaten bzw. Adressbucheinträge fehlen aber möglicherweise oder sind inkorrekt. @@ -2834,22 +3090,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2869,27 +3125,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL-Optionen: (siehe Bitcoin-Wiki für SSL-Installationsanweisungen) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL-Optionen: (siehe Triangles-Wiki für SSL-Installationsanweisungen) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2899,12 +3155,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2925,7 +3181,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2953,9 +3209,19 @@ This label turns red, if the priority is smaller than "medium". Überprüfe Datenbank Integrität... - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + @@ -2978,29 +3244,24 @@ This label turns red, if the priority is smaller than "medium". Passwort für JSON-RPC-Verbindungen - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Triangles + + + + Find peers using internet relay chat (default: 0) Knoten die IRC Chat nutzen auffinden (Standard: 1) (0)?) Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + @@ -3035,7 +3296,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Enforce transaction scripts to use canonical PUSH operators (default: 1) - + @@ -3065,7 +3326,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How thorough the block verification is (0-6, default: 1) - + @@ -3090,12 +3351,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + @@ -3113,17 +3374,15 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s liegt außerhalb des Daten Verzeichnisses %s. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Kann das Verzeichniss nicht einbinden %s. buynowcoin Brieftasche läuft wahrscheinlich bereits. + Cannot obtain a lock on data directory %s. triangles is probably already running. + Kann das Verzeichniss nicht einbinden %s. triangles Brieftasche läuft wahrscheinlich bereits. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Kann auf diesem Computer nicht an %s binden (von bind zurückgegebener Fehler %d, %s) @@ -3153,17 +3412,15 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Fehler beim Laden von wallet.dat: Wallet beschädigt - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Fehler beim Laden wallet.dat. Brieftasche benötigt neuere Version der buynowcoin Brieftasche. + Error loading wallet.dat: Wallet requires newer version of triangles + Fehler beim Laden wallet.dat. Brieftasche benötigt neuere Version der triangles Brieftasche. - - Wallet needed to be rewritten: restart buynowcoin to complete - Brieftasche muss neu geschrieben werden. Starte die buynowcoin Brieftasche neu zum komplettieren. + Wallet needed to be rewritten: restart triangles to complete + Brieftasche muss neu geschrieben werden. Starte die triangles Brieftasche neu zum komplettieren. - + Error loading wallet.dat Fehler beim Laden von wallet.dat @@ -3228,12 +3485,11 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Mit dem Knoten verbinden und versuchen die Verbindung aufrecht zu halten - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Fehler beim anbinden %s auf diesem Computer. BlaclCoin Client läuft wahrscheinlich bereits. + Unable to bind to %s on this computer. triangles is probably already running. + Fehler beim anbinden %s auf diesem Computer. BlaclCoin Client läuft wahrscheinlich bereits. - + Fee per KB to add to transactions you send Gebühr pro KB, zusätzlich zur ausgehenden Transaktion @@ -3243,12 +3499,27 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Ungültiger Betrag für -mininput=<amount>:'%s' - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Lade Wallet... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Wallet kann nicht auf eine ältere Version herabgestuft werden @@ -3292,4 +3563,485 @@ If the file does not exist, create it with owner-readable-only file permissions. Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Wallet + + + + &Overview + &Übersicht + + + + Show general overview of wallet + Allgemeine Wallet-Übersicht anzeigen + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transaktionen + + + + Browse transaction history + Transaktionsverlauf durchsehen + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Beenden + + + + Quit application + Anwendung beenden + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Über &Qt + + + + Show information about Qt + Informationen über Qt anzeigen + + + + &Options... + &Konfiguration... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Anzeigen / Verstecken + + + + &Encrypt Wallet... + Wallet &verschlüsseln... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + Wallet &sichern... + + + + Backup wallet to another location + Eine Wallet-Sicherungskopie erstellen und abspeichern + + + + &Change Passphrase... + Passphrase &ändern... + + + + Change the passphrase used for wallet encryption + Ändert die Passphrase, die für die Wallet-Verschlüsselung benutzt wird + + + + &Unlock Wallet... + + + + + Unlock wallet + Wallet entsperren + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Nachricht &signieren... + + + + &Verify message... + Nachricht &verifizieren... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + &Debugfenster + + + + Open debugging and diagnostic console + Debugging- und Diagnosekonsole öffnen + + + + &File + &Datei + + + + &Settings + &Einstellungen + + + + &Help + &Hilfe + + + + Tabs toolbar + Registerkartenleiste + + + + Actions toolbar + + + + + + [testnet] + [Testnetz] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Synchronisiere mit Netzwerk... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Auf aktuellem Stand + + + + Catching up... + Hole auf... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Gesendete Transaktion + + + + Incoming transaction + Eingehende Transaktion + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Datum: %1 +Betrag: %2 +Typ: %3 +Adresse: %4 + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Wallet ist <b>verschlüsselt</b> und aktuell <b>entsperrt</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Wallet ist <b>verschlüsselt</b> und aktuell <b>gesperrt</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n Stunde + %n Stunden + + + + + %n day(s) + + %n Tag + %n Tage + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + Wird gesendet... + + + diff --git a/src/qt/locale/bitcoin_el_GR.qm b/src/qt/locale/triangles_el_GR.qm similarity index 51% rename from src/qt/locale/bitcoin_el_GR.qm rename to src/qt/locale/triangles_el_GR.qm index d8e4e44..58ec2e6 100644 Binary files a/src/qt/locale/bitcoin_el_GR.qm and b/src/qt/locale/triangles_el_GR.qm differ diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/triangles_el_GR.ts similarity index 68% rename from src/qt/locale/bitcoin_el_GR.ts rename to src/qt/locale/triangles_el_GR.ts index 201194d..290ccec 100644 --- a/src/qt/locale/bitcoin_el_GR.ts +++ b/src/qt/locale/triangles_el_GR.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Διπλό-κλικ για επεξεργασία της διεύθυνσης ή της ετικέτας - + Create a new address Δημιούργησε νέα διεύθυνση @@ -57,52 +58,52 @@ This product includes software developed by the OpenSSL Project for use in the O Αντέγραψε την επιλεγμένη διεύθυνση στο πρόχειρο του συστήματος - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Αντιγραφή διεύθυνσης Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Αντιγραφη της επιλεγμενης διεύθυνσης στο πρόχειρο του συστηματος - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Επιβεβαίωση μηνύματος - + + These are your Triangles 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. + + + + &Delete &Διαγραφή @@ -119,7 +120,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -129,18 +130,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Ετικέτα @@ -180,12 +181,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,431 +307,6 @@ This product includes software developed by the OpenSSL Project for use in the O Ο κωδικος του πορτοφολιού άλλαξε με επιτυχία. - - BitcoinGUI - - - Sign &message... - Υπογραφή &Μηνύματος... - - - - Synchronizing with network... - Συγχρονισμός με το δίκτυο... - - - - &Overview - &Επισκόπηση - - - - Show general overview of wallet - Εμφάνισε τη γενική εικόνα του πορτοφολιού - - - - &Transactions - &Συναλλαγές - - - - Browse transaction history - Περιήγηση στο ιστορικό συναλλαγών - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - Έ&ξοδος - - - - Quit application - Εξοδος από την εφαρμογή - - - - Show information about buynowcoin - - - - - About &Qt - Σχετικά με &Qt - - - - Show information about Qt - Εμφάνισε πληροφορίες σχετικά με Qt - - - - &Options... - &Επιλογές... - - - - &Encrypt Wallet... - &Κρυπτογράφησε το πορτοφόλι - - - - &Backup Wallet... - &Αντίγραφο ασφαλείας του πορτοφολιού - - - - &Change Passphrase... - &Άλλαξε κωδικο πρόσβασης - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Δημιουργία αντιγράφου ασφαλείας πορτοφολιού σε άλλη τοποθεσία - - - - Change the passphrase used for wallet encryption - Αλλαγή του κωδικού κρυπτογράφησης του πορτοφολιού - - - - &Debug window - &Παράθυρο αποσφαλμάτωσης - - - - Open debugging and diagnostic console - Άνοιγμα κονσόλας αποσφαλμάτωσης και διαγνωστικών - - - - &Verify message... - &Επιβεβαίωση μηνύματος - - - - buynowcoin - - - - - Wallet - Πορτοφόλι - - - - &About buynowcoin - - - - - &Show / Hide - &Εμφάνισε/Κρύψε - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Αρχείο - - - - &Settings - &Ρυθμίσεις - - - - &Help - &Βοήθεια - - - - Tabs toolbar - Εργαλειοθήκη καρτελών - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Ενημερωμένο - - - - Catching up... - Ενημέρωση... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Η συναλλαγή απεστάλη - - - - Incoming transaction - Εισερχόμενη συναλλαγή - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Ημερομηνία: %1 -Ποσό: %2 -Τύπος: %3 -Διεύθυνση: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Το πορτοφόλι είναι <b>κρυπτογραφημένο</b> και <b>ξεκλείδωτο</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Το πορτοφόλι είναι <b>κρυπτογραφημένο</b> και <b>κλειδωμένο</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n ώρες %n ώρες - - - - %n day(s) - %n ημέρες %n ημέρες - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -744,17 +320,17 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + @@ -764,47 +340,47 @@ Address: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -814,7 +390,7 @@ Address: %4 Label - + @@ -829,7 +405,7 @@ Address: %4 Confirmations - + @@ -839,7 +415,7 @@ Address: %4 Priority - + @@ -865,82 +441,82 @@ Address: %4 Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -949,7 +525,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -958,7 +534,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -967,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -985,12 +561,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1008,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1018,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Νέα διεύθυνση λήψης - + New sending address Νέα διεύθυνση αποστολής - + Edit receiving address Επεξεργασία διεύθυνσης λήψης - + Edit sending address Επεξεργασία διεύθυνσης αποστολής - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Η διεύθυνση "%1" βρίσκεται ήδη στο βιβλίο διευθύνσεων. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Δεν είναι δυνατό το ξεκλείδωμα του πορτοφολιού. @@ -1065,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Χρήση: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Τύπος + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + Μήνυμα + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (χωρίς ετικέτα) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Αντέγραψε την επιλεγμένη διεύθυνση στο πρόχειρο του συστήματος + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Αντιγραφη της επιλεγμενης διεύθυνσης στο πρόχειρο του συστηματος + + + + &Delete + &Διαγραφή + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Αρχείο οριοθετημένο με κόμματα (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1120,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1130,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1164,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1174,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1190,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1249,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1264,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1275,12 +1197,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1295,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1306,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1328,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". Φόρμα - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1351,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1369,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". Εξορυγμενο υπόλοιπο που δεν έχει ακόμα ωριμάσει - + Total: Σύνολο: - + Your current total balance Το τρέχον συνολικό υπόλοιπο - + <b>Recent transactions</b> <b>Πρόσφατες συναλλαγές</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1405,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Ποσό: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1512,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1542,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1566,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1581,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Καθαρισμός κονσόλας - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1616,44 +1566,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Αποστολή νομισμάτων Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1665,51 +1616,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Αποστολή σε πολλούς αποδέκτες ταυτόχρονα @@ -1721,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1735,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1749,14 +1700,14 @@ This label turns red, if the priority is smaller than "medium". Αποστολη - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1766,37 +1717,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1806,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1841,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1861,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1869,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Φόρμα @@ -1883,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Εισάγετε μια επιγραφή για αυτή τη διεύθυνση ώστε να καταχωρηθεί στο βιβλίο διευθύνσεων + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Επιγραφή - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1920,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Αποστολή σε πολλούς αποδέκτες ταυτόχρονα + + + + Add &Recipient + &Προσθήκη αποδέκτη + + + + Remove all transaction fields + + + + + Clear &All + Καθαρισμός &Όλων + + + + Confirm the send action + Επιβεβαίωση αποστολής + + + + S&end + Αποστολη + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Η διεύθυνση του αποδέκτη δεν είναι σωστή. Παρακαλώ ελέγξτε ξανά. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Βρέθηκε η ίδια διεύθυνση δύο φορές. Επιτρέπεται μία μόνο εγγραφή για κάθε διεύθυνση, σε κάθε διαδικασία αποστολής. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Φόρμα + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Εισάγετε μια επιγραφή για αυτή τη διεύθυνση ώστε να καταχωρηθεί στο βιβλίο διευθύνσεων + + + + &Label: + &Επιγραφή + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1948,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1985,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Επαναφορά όλων των πεδίων μήνυματος @@ -2012,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Επαναφορά όλων επαλήθευμενων πεδίων μήνυματος - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Κάντε κλικ στο "Υπογραφή Μηνύματος" για να λάβετε την υπογραφή + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2118,12 +2299,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2148,7 +2332,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , έχει μεταδοθεί μέσω %n κόμβων, έχει μεταδοθεί μέσω %n κόμβων + + , έχει μεταδοθεί μέσω %n κόμβων + , έχει μεταδοθεί μέσω %n κόμβων + @@ -2194,14 +2381,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Πίστωση - + matures in %n more block(s) - ωρίμανση σε %n επιπλέον μπλοκωρίμανση σε %n επιπλέον μπλοκ + + ωρίμανση σε %n επιπλέον μπλοκ + ωρίμανση σε %n επιπλέον μπλοκ + @@ -2212,12 +2402,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debit - + Transaction fee Τέλος συναλλαγής @@ -2237,14 +2427,14 @@ This label turns red, if the priority is smaller than "medium". Σχόλιο: - + Transaction ID ID Συναλλαγής: - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2277,7 +2467,7 @@ This label turns red, if the priority is smaller than "medium". αναληθής - + , has not been successfully broadcast yet , δεν έχει ακόμα μεταδοθεί μ' επιτυχία @@ -2303,7 +2493,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Ημερομηνία @@ -2335,32 +2525,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Ανοιχτό για %n μπλοκΑνοιχτό για %n μπλοκ + + Ανοιχτό για %n μπλοκ + Ανοιχτό για %n μπλοκ + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2403,7 +2601,7 @@ This label turns red, if the priority is smaller than "medium". (δ/α) - + Transaction status. Hover over this field to show number of confirmations. Κατάσταση συναλλαγής. Πηγαίνετε το ποντίκι πάνω από αυτό το πεδίο για να δείτε τον αριθμό των επικυρώσεων @@ -2534,7 +2732,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2579,12 +2777,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2598,32 +2796,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Χρήση: - - Send command to -server or buynowcoind - - - - + List commands Λίστα εντολών @@ -2638,19 +2818,9 @@ This label turns red, if the priority is smaller than "medium". Επιλογές: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2665,12 +2835,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2690,12 +2860,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2715,22 +2885,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2740,22 +2910,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2780,12 +2950,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2793,12 +2963,7 @@ This label turns red, if the priority is smaller than "medium". Προειδοποίηση: Η παράμετρος -paytxfee είναι πολύ υψηλή. Πρόκειται για την αμοιβή που θα πληρώνετε για κάθε συναλλαγή που θα στέλνετε. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Προειδοποίηση : Σφάλμα wallet.dat κατα την ανάγνωση ! Όλα τα κλειδιά αναγνωρισθηκαν σωστά, αλλά τα δεδομένα των συναλλαγών ή καταχωρήσεις στο βιβλίο διευθύνσεων μπορεί να είναι ελλιπείς ή λανθασμένα. @@ -2835,22 +3000,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2870,27 +3035,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Ρυθμίσεις SSL: (ανατρέξτε στο Bitcoin Wiki για οδηγίες ρυθμίσεων SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Ρυθμίσεις SSL: (ανατρέξτε στο Triangles Wiki για οδηγίες ρυθμίσεων SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2900,12 +3065,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2926,7 +3091,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2941,7 +3106,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2951,17 +3116,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2979,34 +3154,39 @@ This label turns red, if the priority is smaller than "medium". Κωδικός για τις συνδέσεις JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3031,17 +3211,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3061,17 +3241,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3091,17 +3271,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3111,27 +3291,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Αδύνατη η σύνδεση με τη θύρα %s αυτού του υπολογιστή (bind returned error %d, %s) Connect through socks proxy - + @@ -3146,7 +3316,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3154,17 +3324,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Σφάλμα φόρτωσης wallet.dat: Κατεστραμμένο Πορτοφόλι - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Σφάλμα φόρτωσης αρχείου wallet.dat @@ -3201,12 +3361,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3224,39 +3384,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Φόρτωση ευρετηρίου μπλοκ... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Προσέθεσε ένα κόμβο για σύνδεση και προσπάθησε να κρατήσεις την σύνδεση ανοιχτή - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Φόρτωση πορτοφολιού... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Δεν μπορώ να υποβαθμίσω το πορτοφόλι Cannot initialize keypool - + @@ -3292,4 +3482,486 @@ If the file does not exist, create it with owner-readable-only file permissions. Εάν το αρχείο δεν υπάρχει, δημιούργησε το με δικαιώματα μόνο για ανάγνωση από τον δημιουργό - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Πορτοφόλι + + + + &Overview + &Επισκόπηση + + + + Show general overview of wallet + Εμφάνισε τη γενική εικόνα του πορτοφολιού + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Συναλλαγές + + + + Browse transaction history + Περιήγηση στο ιστορικό συναλλαγών + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + Έ&ξοδος + + + + Quit application + Εξοδος από την εφαρμογή + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Σχετικά με &Qt + + + + Show information about Qt + Εμφάνισε πληροφορίες σχετικά με Qt + + + + &Options... + &Επιλογές... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Εμφάνισε/Κρύψε + + + + &Encrypt Wallet... + &Κρυπτογράφησε το πορτοφόλι + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Αντίγραφο ασφαλείας του πορτοφολιού + + + + Backup wallet to another location + Δημιουργία αντιγράφου ασφαλείας πορτοφολιού σε άλλη τοποθεσία + + + + &Change Passphrase... + &Άλλαξε κωδικο πρόσβασης + + + + Change the passphrase used for wallet encryption + Αλλαγή του κωδικού κρυπτογράφησης του πορτοφολιού + + + + &Unlock Wallet... + + + + + Unlock wallet + Ξεκλειδωσε το πορτοφολι + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Υπογραφή &Μηνύματος... + + + + &Verify message... + &Επιβεβαίωση μηνύματος + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + &Παράθυρο αποσφαλμάτωσης + + + + Open debugging and diagnostic console + Άνοιγμα κονσόλας αποσφαλμάτωσης και διαγνωστικών + + + + &File + &Αρχείο + + + + &Settings + &Ρυθμίσεις + + + + &Help + &Βοήθεια + + + + Tabs toolbar + Εργαλειοθήκη καρτελών + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Συγχρονισμός με το δίκτυο... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Ενημερωμένο + + + + Catching up... + Ενημέρωση... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Η συναλλαγή απεστάλη + + + + Incoming transaction + Εισερχόμενη συναλλαγή + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Ημερομηνία: %1 +Ποσό: %2 +Τύπος: %3 +Διεύθυνση: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Το πορτοφόλι είναι <b>κρυπτογραφημένο</b> και <b>ξεκλείδωτο</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Το πορτοφόλι είναι <b>κρυπτογραφημένο</b> και <b>κλειδωμένο</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n ώρες + %n ώρες + + + + + %n day(s) + + %n ημέρες + %n ημέρες + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_en.qm b/src/qt/locale/triangles_en.qm new file mode 100644 index 0000000..42669ef Binary files /dev/null and b/src/qt/locale/triangles_en.qm differ diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/triangles_en.ts similarity index 69% rename from src/qt/locale/bitcoin_en.ts rename to src/qt/locale/triangles_en.ts index 111b91e..42a28ba 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/triangles_en.ts @@ -5,23 +5,26 @@ AboutDialog - About buynowcoin - About buynowcoin + About Triangles + About triangles + + + <b>triangles</b> version + <b>triangles</b> version - <b>buynowcoin</b> version - <b>buynowcoin</b> version + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers +Copyright © 2014 Triangles team - + This is experimental software. @@ -44,12 +47,17 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + + These are your Triangles 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. + + + + Double-click to edit address or label Double-click to edit address or label - + Create a new address Create a new address @@ -59,17 +67,21 @@ This product includes software developed by the OpenSSL Project for use in the O Copy the currently selected address to the system clipboard - + + Sign a message to prove you own a TRI address + + + + &New Address &New Address - - These are your buynowcoin 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. - These are your buynowcoin 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. + These are your triangles 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. + These are your triangles 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. - + &Copy Address &Copy Address @@ -79,27 +91,30 @@ This product includes software developed by the OpenSSL Project for use in the O Show &QR Code - - Sign a message to prove you own a buynowcoin address - Sign a message to prove you own a buynowcoin address + Sign a message to prove you own a triangles address + Sign a message to prove you own a triangles address - + Sign &Message - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list - - Verify a message to ensure it was signed with a specified buynowcoin address - Verify a message to ensure it was signed with a specified buynowcoin address + Verify a message to ensure it was signed with a specified triangles address + Verify a message to ensure it was signed with a specified triangles address - + &Verify Message &Verify Message @@ -142,7 +157,7 @@ This product includes software developed by the OpenSSL Project for use in the O AddressTableModel - + Label Label @@ -245,7 +260,12 @@ This product includes software developed by the OpenSSL Project for use in the O Are you sure you wish to encrypt your wallet? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. @@ -262,12 +282,11 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet encrypted - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + @@ -308,461 +327,6 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - BitcoinGUI - - - Sign &message... - Sign &message... - - - - Synchronizing with network... - Synchronizing with network... - - - - &Overview - &Overview - - - - Show general overview of wallet - Show general overview of wallet - - - - &Transactions - &Transactions - - - - Browse transaction history - Browse transaction history - - - - &Address Book - &Address Book - - - - Edit the list of stored addresses and labels - Edit the list of stored addresses and labels - - - - &Receive coins - &Receive coins - - - - Show the list of addresses for receiving payments - Show the list of addresses for receiving payments - - - - &Send coins - &Send coins - - - - E&xit - E&xit - - - - Quit application - Quit application - - - - Show information about buynowcoin - Show information about buynowcoin - - - - About &Qt - About &Qt - - - - Show information about Qt - Show information about Qt - - - - &Options... - &Options... - - - - &Encrypt Wallet... - &Encrypt Wallet... - - - - &Backup Wallet... - &Backup Wallet... - - - - &Change Passphrase... - &Change Passphrase... - - - - ~%n block(s) remaining - - ~%n block remaining - ~%n blocks remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - &Export... - &Export... - - - - Send coins to a buynowcoin address - Send coins to a buynowcoin address - - - - Modify configuration options for buynowcoin - Modify configuration options for buynowcoin - - - - Export the data in the current tab to a file - Export the data in the current tab to a file - - - - Encrypt or decrypt wallet - Encrypt or decrypt wallet - - - - Backup wallet to another location - Backup wallet to another location - - - - Change the passphrase used for wallet encryption - Change the passphrase used for wallet encryption - - - - &Debug window - &Debug window - - - - Open debugging and diagnostic console - Open debugging and diagnostic console - - - - &Verify message... - &Verify message... - - - - buynowcoin - buynowcoin - - - - Wallet - Wallet - - - - &About buynowcoin - &About buynowcoin - - - - &Show / Hide - &Show / Hide - - - - Unlock wallet - Unlock wallet - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &File - - - - &Settings - &Settings - - - - &Help - &Help - - - - Tabs toolbar - Tabs toolbar - - - - Actions toolbar - Actions toolbar - - - - - [testnet] - [testnet] - - - - - buynowcoin client - buynowcoin client - - - - %n active connection(s) to buynowcoin network - - %n active connection to buynowcoin network - %n active connections to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - Downloaded %1 blocks of transaction history. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - %n second ago - %n seconds ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - %n minute ago - %n minutes ago - - - - - %n hour(s) ago - - %n hour ago - %n hours ago - - - - - %n day(s) ago - - %n day ago - %n days ago - - - - - Up to date - Up to date - - - - Catching up... - Catching up... - - - - Last received block was generated %1. - Last received block was generated %1. - - - - 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? - - - - - Confirm transaction fee - Confirm transaction fee - - - - Sent transaction - Sent transaction - - - - Incoming transaction - Incoming transaction - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - URI handling - URI handling - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - Backup Wallet - Backup Wallet - - - - Wallet Data (*.dat) - Wallet Data (*.dat) - - - - Backup Failed - Backup Failed - - - - There was an error trying to save the wallet data to the new location. - There was an error trying to save the wallet data to the new location. - - - - %n second(s) - - %n second - %n seconds - - - - - %n minute(s) - - %n minute - %n minutes - - - - - %n hour(s) - - %n hour - %n hours - - - - - %n day(s) - - %n day - %n days - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - ClientModel @@ -1053,37 +617,46 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + + &Stealth Address + + + + New receiving address New receiving address - + New sending address New sending address - + Edit receiving address Edit receiving address - + Edit sending address Edit sending address - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. The entered address "%1" is already in the address book. - - The entered address "%1" is not a valid buynowcoin address. - The entered address "%1" is not a valid buynowcoin address. + The entered address "%1" is not a valid triangles address. + The entered address "%1" is not a valid triangles address. - + Could not unlock wallet. Could not unlock wallet. @@ -1096,18 +669,22 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version version - + + + Triangles-Qt + + + + Usage: Usage: @@ -1137,6 +714,347 @@ This label turns red, if the priority is smaller than "medium". Show splash screen on startup (default: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Type + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Label + + + + To Address + + + + + From Address + + + + + Message + Message + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (no label) + + + + MessagePage + + + Address Book + Address Book + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copy the currently selected address to the system clipboard + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Delete + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + + Error exporting + Error exporting + + + + Could not write to file %1. + Could not write to file %1. + + OptionsDialog @@ -1170,17 +1088,15 @@ This label turns red, if the priority is smaller than "medium". - - Automatically start buynowcoin after logging in to the system. - Automatically start buynowcoin after logging in to the system. + Automatically start triangles after logging in to the system. + Automatically start triangles after logging in to the system. - - &Start buynowcoin on system login - &Start buynowcoin on system login + &Start triangles on system login + &Start triangles on system login - + 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. 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. @@ -1195,19 +1111,37 @@ This label turns red, if the priority is smaller than "medium". &Network - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. - + Map port using &UPnP Map port using &UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1281,11 +1215,20 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - The user interface language can be set here. This setting will take effect after restarting buynowcoin. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + The user interface language can be set here. This setting will take effect after restarting triangles. + + + &Unit to show amounts in: &Unit to show amounts in: @@ -1295,12 +1238,11 @@ This label turns red, if the priority is smaller than "medium". Choose the default subdivision unit to show in the interface and when sending coins. - - Whether to show buynowcoin addresses in the transaction list or not. - Whether to show buynowcoin addresses in the transaction list or not. + Whether to show triangles addresses in the transaction list or not. + Whether to show triangles addresses in the transaction list or not. - + &Display addresses in transaction list &Display addresses in transaction list @@ -1343,8 +1285,12 @@ This label turns red, if the priority is smaller than "medium". - This setting will take effect after restarting buynowcoin. - This setting will take effect after restarting buynowcoin. + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + This setting will take effect after restarting triangles. @@ -1360,13 +1306,11 @@ This label turns red, if the priority is smaller than "medium". Form - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. - + Stake: Stake: @@ -1401,27 +1345,61 @@ This label turns red, if the priority is smaller than "medium". Mined balance that has not yet matured - + Total: - + Your current total balance - + <b>Recent transactions</b> <b>Recent transactions</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Total of coins that was staked, and do not yet count toward the current balance @@ -1522,7 +1500,17 @@ This label turns red, if the priority is smaller than "medium". &Information - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Using OpenSSL version @@ -1567,7 +1555,17 @@ This label turns red, if the priority is smaller than "medium". Last block time - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Open @@ -1577,12 +1575,11 @@ This label turns red, if the priority is smaller than "medium". Command-line options - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Show the triangles-Qt help message to get a list with possible triangles command-line options. - + &Show &Show @@ -1597,34 +1594,35 @@ This label turns red, if the priority is smaller than "medium". Build date - - buynowcoin - Debug window - buynowcoin - Debug window + triangles - Debug window + triangles - Debug window - - buynowcoin Core - buynowcoin Core + triangles Core + triangles Core - + Debug log file Debug log file - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. - + Clear console Clear console + + Welcome to the triangles RPC console. + Welcome to the triangles RPC console. + - Welcome to the buynowcoin RPC console. - Welcome to the buynowcoin RPC console. + Welcome to the Triangles RPC console. + @@ -1648,6 +1646,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Send Coins @@ -1672,7 +1671,7 @@ This label turns red, if the priority is smaller than "medium". - + Quantity: @@ -1692,13 +1691,17 @@ This label turns red, if the priority is smaller than "medium". Amount: Amount: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1741,7 +1744,7 @@ This label turns red, if the priority is smaller than "medium". - + Send to multiple recipients at once Send to multiple recipients at once @@ -1767,8 +1770,12 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1781,9 +1788,13 @@ This label turns red, if the priority is smaller than "medium". - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1880,10 +1891,15 @@ This label turns red, if the priority is smaller than "medium". 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. 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. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1915,18 +1931,28 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Enter a label for this address to add it to your address book + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Label: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1954,10 +1980,225 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient Remove this recipient + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Choose address from address book + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Paste address from clipboard + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Send to multiple recipients at once + + + + Add &Recipient + + + + + Remove all transaction fields + Remove all transaction fields + + + + Clear &All + Clear &All + + + + Confirm the send action + Confirm the send action + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Are you sure you want to send %1? + + + + and + and + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + The recipient address is not valid, please recheck. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Duplicate address found, can only send to each address once per send operation. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Form + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Choose address from address book + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Paste address from clipboard + + + + Alt+P + Alt+P + + + + Remove this recipient + Remove this recipient + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Enter a label for this address to add it to your address book + + + + &Label: + &Label: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1980,8 +2221,8 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -2017,11 +2258,20 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - Sign the message to prove you own this buynowcoin address + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Sign the message to prove you own this triangles address + + + Reset all sign message fields Reset all sign message fields @@ -2044,34 +2294,45 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Verify the message to ensure it was signed with the specified buynowcoin address + Verify the message to ensure it was signed with the specified triangles address + Verify the message to ensure it was signed with the specified triangles address - + Reset all verify message fields Reset all verify message fields - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Click "Sign Message" to generate signature + + Enter triangles signature + Enter triangles signature + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Enter buynowcoin signature + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2232,12 +2493,12 @@ This label turns red, if the priority is smaller than "medium". - + Credit Credit - + matures in %n more block(s) matures in %n more block @@ -2253,12 +2514,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debit - + Transaction fee Transaction fee @@ -2278,14 +2539,18 @@ This label turns red, if the priority is smaller than "medium". Comment - + Transaction ID Transaction ID + Generated coins must mature 60 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. + Generated coins must mature 510 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. {60 ?} + + Generated coins must mature 510 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. - Generated coins must mature 510 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. + Generated coins must mature 510 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. @@ -2318,7 +2583,7 @@ This label turns red, if the priority is smaller than "medium". false - + , has not been successfully broadcast yet , has not been successfully broadcast yet @@ -2344,7 +2609,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Date @@ -2382,7 +2647,12 @@ This label turns red, if the priority is smaller than "medium". - + + Narration + + + + Offline @@ -2447,7 +2717,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Transaction status. Hover over this field to show number of confirmations. @@ -2642,29 +2912,20 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - Sending... - - - - bitcoin-core - - - buynowcoin version - buynowcoin version + triangles version + triangles version - + Usage: Usage: - Send command to -server or buynowcoind - Send command to -server or buynowcoind + Send command to -server or trianglesd + Send command to -server or trianglesd @@ -2683,13 +2944,13 @@ This label turns red, if the priority is smaller than "medium". - Specify configuration file (default: buynowcoin.conf) - Specify configuration file (default: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Specify configuration file (default: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Specify pid file (default: buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + Specify pid file (default: trianglesd.pid) @@ -2702,7 +2963,22 @@ This label turns red, if the priority is smaller than "medium". Specify data directory - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Set database cache size in megabytes (default: 25) @@ -2837,12 +3113,11 @@ This label turns red, if the priority is smaller than "medium". Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. @@ -2928,8 +3203,8 @@ This label turns red, if the priority is smaller than "medium". - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL options: (see the Bitcoin Wiki for SSL setup instructions) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL options: (see the Triangles Wiki for SSL setup instructions) @@ -2998,7 +3273,17 @@ This label turns red, if the priority is smaller than "medium". - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! @@ -3023,22 +3308,17 @@ This label turns red, if the priority is smaller than "medium". Password for JSON-RPC connections - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - + + Triangles version - + + Triangles + + + + Find peers using internet relay chat (default: 0) Find peers using internet relay chat (default: 1) {0)?} @@ -3158,17 +3438,15 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. + Cannot obtain a lock on data directory %s. triangles is probably already running. + Cannot obtain a lock on data directory %s. triangles is probably already running. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Unable to bind to %s on this computer (bind returned error %d, %s) @@ -3198,17 +3476,15 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading wallet.dat: Wallet corrupted - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Error loading wallet.dat: Wallet requires newer version of buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Error loading wallet.dat: Wallet requires newer version of triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - Wallet needed to be rewritten: restart buynowcoin to complete + Wallet needed to be rewritten: restart triangles to complete + Wallet needed to be rewritten: restart triangles to complete - + Error loading wallet.dat Error loading wallet.dat @@ -3273,12 +3549,11 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Add a node to connect to and attempt to keep the connection open - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Unable to bind to %s on this computer. buynowcoin is probably already running. + Unable to bind to %s on this computer. triangles is probably already running. + Unable to bind to %s on this computer. triangles is probably already running. - + Fee per KB to add to transactions you send Fee per KB to add to transactions you send @@ -3288,12 +3563,27 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Loading wallet... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Cannot downgrade wallet @@ -3337,4 +3627,525 @@ If the file does not exist, create it with owner-readable-only file permissions. If the file does not exist, create it with owner-readable-only file permissions. + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Wallet + + + + &Overview + &Overview + + + + Show general overview of wallet + Show general overview of wallet + + + + &Send coins + &Send coins + + + + Send coins to a TRI address + + + + + &Receive coins + &Receive coins + + + + Show the list of addresses for receiving payments + Show the list of addresses for receiving payments + + + + &Transactions + &Transactions + + + + Browse transaction history + Browse transaction history + + + + &Address Book + &Address Book + + + + Edit the list of stored addresses and labels + Edit the list of stored addresses and labels + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + E&xit + + + + Quit application + Quit application + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + About &Qt + + + + Show information about Qt + Show information about Qt + + + + &Options... + &Options... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Show / Hide + + + + &Encrypt Wallet... + &Encrypt Wallet... + + + + Encrypt or decrypt wallet + Encrypt or decrypt wallet + + + + &Backup Wallet... + &Backup Wallet... + + + + Backup wallet to another location + Backup wallet to another location + + + + &Change Passphrase... + &Change Passphrase... + + + + Change the passphrase used for wallet encryption + Change the passphrase used for wallet encryption + + + + &Unlock Wallet... + + + + + Unlock wallet + Unlock wallet + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Sign &message... + + + + &Verify message... + &Verify message... + + + + &Export... + &Export... + + + + Export the data in the current tab to a file + Export the data in the current tab to a file + + + + &Debug window + &Debug window + + + + Open debugging and diagnostic console + Open debugging and diagnostic console + + + + &File + &File + + + + &Settings + &Settings + + + + &Help + &Help + + + + Tabs toolbar + Tabs toolbar + + + + Actions toolbar + Actions toolbar + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Synchronizing with network... + + + + ~%n block(s) remaining + + ~%n block remaining + ~%n blocks remaining + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + Downloaded %1 blocks of transaction history. + Downloaded %1 blocks of transaction history. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + %n second ago + %n seconds ago + + + + + %n minute(s) ago + + %n minute ago + %n minutes ago + + + + + %n hour(s) ago + + %n hour ago + %n hours ago + + + + + %n day(s) ago + + %n day ago + %n days ago + + + + + Up to date + Up to date + + + + Catching up... + Catching up... + + + + Last received block was generated %1. + Last received block was generated %1. + + + + 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? + + + + + Confirm transaction fee + Confirm transaction fee + + + + Sent transaction + Sent transaction + + + + Incoming transaction + Incoming transaction + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + URI handling + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + Backup Wallet + Backup Wallet + + + + Wallet Data (*.dat) + Wallet Data (*.dat) + + + + Backup Failed + Backup Failed + + + + There was an error trying to save the wallet data to the new location. + There was an error trying to save the wallet data to the new location. + + + + %n second(s) + + %n second + %n seconds + + + + + %n minute(s) + + %n minute + %n minutes + + + + + %n hour(s) + + %n hour + %n hours + + + + + %n day(s) + + %n day + %n days + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + Show information about triangles + Show information about triangles + + + Send coins to a triangles address + Send coins to a triangles address + + + Modify configuration options for triangles + Modify configuration options for triangles + + + triangles + triangles + + + &About triangles + &About triangles + + + triangles client + triangles client + + + %n active connection(s) to triangles network + + %n active connection to triangles network + %n active connections to triangles network + + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + A fatal error occurred. triangles can no longer continue safely and will quit. + + + + WalletModel + + + Sending... + Sending... + + diff --git a/src/qt/locale/triangles_eo.qm b/src/qt/locale/triangles_eo.qm new file mode 100644 index 0000000..2e4dcf6 Binary files /dev/null and b/src/qt/locale/triangles_eo.qm differ diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/triangles_eo.ts similarity index 69% rename from src/qt/locale/bitcoin_eo.ts rename to src/qt/locale/triangles_eo.ts index b2f81fc..f80e58a 100644 --- a/src/qt/locale/bitcoin_eo.ts +++ b/src/qt/locale/triangles_eo.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ Tiu ĉi produkto enhavas erojn kreitajn de la "OpenSSL Project" por uz Address Book - + - + Double-click to edit address or label Duoble-klaku por redakti adreson aŭ etikedon - + Create a new address Krei novan adreson @@ -57,52 +58,52 @@ Tiu ĉi produkto enhavas erojn kreitajn de la "OpenSSL Project" por uz Kopii elektitan adreson al la tondejo - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Kopii Adreson Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Forigi la elektitan adreson el la listo - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Kontroli Mesaĝon - + + These are your Triangles 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. + + + + &Delete &Forigi @@ -119,7 +120,7 @@ Tiu ĉi produkto enhavas erojn kreitajn de la "OpenSSL Project" por uz Export Address Book Data - + @@ -129,18 +130,18 @@ Tiu ĉi produkto enhavas erojn kreitajn de la "OpenSSL Project" por uz Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etikedo @@ -180,12 +181,12 @@ Tiu ĉi produkto enhavas erojn kreitajn de la "OpenSSL Project" por uz Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ Tiu ĉi produkto enhavas erojn kreitajn de la "OpenSSL Project" por uz Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ Tiu ĉi produkto enhavas erojn kreitajn de la "OpenSSL Project" por uz - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,431 +307,6 @@ Tiu ĉi produkto enhavas erojn kreitajn de la "OpenSSL Project" por uz Vi sukcese ŝanĝis la pasfrazon de la monujo. - - BitcoinGUI - - - Sign &message... - Subskribi &mesaĝon... - - - - Synchronizing with network... - Sinkronigante kun reto... - - - - &Overview - &Superrigardo - - - - Show general overview of wallet - Vidigi ĝeneralan superrigardon de la monujo - - - - &Transactions - &Transakcioj - - - - Browse transaction history - Esplori historion de transakcioj - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Eliri - - - - Quit application - Eliri la aplikaĵon - - - - Show information about buynowcoin - - - - - About &Qt - Pri &Qt - - - - Show information about Qt - Vidigi informojn pri Qt - - - - &Options... - &Agordoj... - - - - &Encrypt Wallet... - Ĉifri &Monujon... - - - - &Backup Wallet... - &Krei sekurkopion de la monujo... - - - - &Change Passphrase... - Ŝanĝi &Pasfrazon... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Krei alilokan sekurkopion de monujo - - - - Change the passphrase used for wallet encryption - Ŝanĝi la pasfrazon por ĉifri la monujon - - - - &Debug window - Sen&cimiga fenestro - - - - Open debugging and diagnostic console - Malfermi konzolon de sencimigo kaj diagnozo - - - - &Verify message... - &Kontroli mesaĝon... - - - - buynowcoin - - - - - Wallet - Monujo - - - - &About buynowcoin - - - - - &Show / Hide - &Montri / Kaŝi - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Dosiero - - - - &Settings - &Agordoj - - - - &Help - &Helpo - - - - Tabs toolbar - Langeto-breto - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Ĝisdata - - - - Catching up... - Ĝisdatigante... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Sendita transakcio - - - - Incoming transaction - Envenanta transakcio - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Dato: %1 -Sumo: %2 -Tipo: %3 -Adreso: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Monujo estas <b>ĉifrita</b> kaj aktuale <b>malŝlosita</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Monujo estas <b>ĉifrita</b> kaj aktuale <b>ŝlosita</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n horo%n horoj - - - - %n day(s) - %n tago%n tagoj - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -744,7 +320,7 @@ Adreso: %4 Coin Control - + @@ -814,7 +390,7 @@ Adreso: %4 Label - + Etikedo @@ -935,7 +511,7 @@ Adreso: %4 DUST - + @@ -949,7 +525,7 @@ Adreso: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -958,7 +534,7 @@ Adreso: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -967,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1008,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1018,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nova adreso por ricevi - + New sending address Nova adreso por sendi - + Edit receiving address Redakti adreson por ricevi - + Edit sending address Redakti adreson por sendi - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. La adreso enigita "%1" jam ekzistas en la adresaro. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Ne eblis malŝlosi monujon. @@ -1065,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Uzado: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipo + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etikedo + + + + To Address + + + + + From Address + + + + + Message + Mesaĝo + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (neniu etikedo) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopii elektitan adreson al la tondejo + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Forigi la elektitan adreson el la listo + + + + &Delete + &Forigi + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Perkome disigita dosiero (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1120,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1130,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1164,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1174,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1190,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1249,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1264,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1280,7 +1202,7 @@ This label turns red, if the priority is smaller than "medium". Display coin &control features (experts only!) - + @@ -1295,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1306,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1328,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". Formularo - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1351,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1369,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". Minita saldo, kiu ankoraŭ ne maturiĝis - + Total: Totalo: - + Your current total balance via aktuala totala saldo - + <b>Recent transactions</b> <b>Lastaj transakcioj</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1405,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Sumo: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1512,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1542,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1566,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1581,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Malplenigi konzolon - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1616,6 +1566,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Sendi Monon @@ -1632,7 +1583,7 @@ This label turns red, if the priority is smaller than "medium". automatically selected - + @@ -1640,7 +1591,7 @@ This label turns red, if the priority is smaller than "medium". Nesufiĉa mono! - + Quantity: Kvanto: @@ -1648,7 +1599,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1665,8 +1616,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1676,7 +1627,7 @@ This label turns red, if the priority is smaller than "medium". medium - + meza @@ -1691,7 +1642,7 @@ This label turns red, if the priority is smaller than "medium". no - + ne @@ -1701,15 +1652,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once Sendi samtempe al pluraj ricevantoj @@ -1721,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1735,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1749,9 +1700,9 @@ This label turns red, if the priority is smaller than "medium". Ŝendi - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1796,7 +1747,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1806,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1841,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1861,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1869,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formularo @@ -1883,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Tajpu etikedon por tiu ĉi adreso kaj aldonu ĝin al via adresaro + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etikedo: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1920,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Sendi samtempe al pluraj ricevantoj + + + + Add &Recipient + Aldoni &Ricevonton + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + Konfirmi la sendon + + + + S&end + Ŝendi + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + La adreso de la ricevonto ne validas. Bonvolu kontroli. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Iu adreso estas ripetita. Vi povas sendi al ĉiu adreso po unufoje en iu send-operacio. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formularo + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Tajpu etikedon por tiu ĉi adreso kaj aldonu ĝin al via adresaro + + + + &Label: + &Etikedo: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1948,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1985,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Reagordigi ĉiujn prisubskribajn kampojn @@ -2012,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Reagordigi ĉiujn prikontrolajn kampojn - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Klaku "Subskribi Mesaĝon" por krei subskribon + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2118,12 +2299,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2148,7 +2332,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , elsendita(j) tra %n nodo, elsendita(j) tra %n nodoj + + , elsendita(j) tra %n nodo + , elsendita(j) tra %n nodoj + @@ -2194,14 +2381,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Kredito - + matures in %n more block(s) - maturiĝos post %n blokomaturiĝos post %n blokoj + + maturiĝos post %n bloko + maturiĝos post %n blokoj + @@ -2212,12 +2402,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debeto - + Transaction fee Krompago @@ -2237,14 +2427,14 @@ This label turns red, if the priority is smaller than "medium". Komento - + Transaction ID Transakcia ID - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2277,7 +2467,7 @@ This label turns red, if the priority is smaller than "medium". malvera - + , has not been successfully broadcast yet , ankoraŭ ne elsendita sukcese @@ -2303,7 +2493,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Dato @@ -2335,10 +2525,18 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Malferma dum ankoraŭ %n blokoMalferma dum ankoraŭ %n blokoj + + Malferma dum ankoraŭ %n bloko + Malferma dum ankoraŭ %n blokoj + - + + Narration + + + + Offline Senkonekte @@ -2350,17 +2548,17 @@ This label turns red, if the priority is smaller than "medium". Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2403,7 +2601,7 @@ This label turns red, if the priority is smaller than "medium". neaplikebla - + Transaction status. Hover over this field to show number of confirmations. Transakcia stato. Ŝvebi super tiu ĉi kampo por montri la nombron de konfirmoj. @@ -2534,7 +2732,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2579,12 +2777,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2598,32 +2796,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Uzado: - - Send command to -server or buynowcoind - - - - + List commands Listigi komandojn @@ -2638,17 +2818,7 @@ This label turns red, if the priority is smaller than "medium". Agordoj: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) Specifi monujan dosieron (ene de dosierujo por datumoj) @@ -2665,12 +2835,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2690,12 +2860,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2715,22 +2885,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2740,22 +2910,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2780,12 +2950,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2793,12 +2963,7 @@ This label turns red, if the priority is smaller than "medium". Averto: -paytxfee estas agordita per tre alta valoro! Tio estas la krompago, kion vi pagos se vi sendas la transakcion. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Averto: okazis eraro dum lego de wallet.dat! Ĉiuj ŝlosiloj sukcese legiĝis, sed la transakciaj datumoj aŭ la adresaro eble mankas aŭ malĝustas. @@ -2835,22 +3000,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2870,27 +3035,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) + SSL options: (see the Triangles Wiki for SSL setup instructions) SSL-agordaĵoj: (vidu la vikio de Bitmono por instrukcioj pri agordado de SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2900,12 +3065,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2926,7 +3091,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2941,7 +3106,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2951,17 +3116,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2979,34 +3154,39 @@ This label turns red, if the priority is smaller than "medium". Pasvorto por konektoj JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3031,17 +3211,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3061,17 +3241,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3091,17 +3271,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3111,27 +3291,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Ne eblis bindi al %s en tiu ĉi komputilo (bind resendis eraron %d, %s) Connect through socks proxy - + @@ -3146,7 +3316,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3154,17 +3324,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Eraro dum ŝargado de wallet.dat: monujo difektita - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Eraro dum ŝargado de wallet.dat @@ -3201,12 +3361,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3224,39 +3384,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Ŝarĝante blok-indekson... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Aldoni nodon por alkonekti kaj provi daŭrigi la malferman konekton - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Ŝargado de monujo... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Ne eblas malpromocii monujon Cannot initialize keypool - + @@ -3293,4 +3483,486 @@ If the file does not exist, create it with owner-readable-only file permissions. Se la dosiero ne ekzistas, kreu ĝin kun permeso "nur posedanto rajtas legi". - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Monujo + + + + &Overview + &Superrigardo + + + + Show general overview of wallet + Vidigi ĝeneralan superrigardon de la monujo + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transakcioj + + + + Browse transaction history + Esplori historion de transakcioj + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Eliri + + + + Quit application + Eliri la aplikaĵon + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Pri &Qt + + + + Show information about Qt + Vidigi informojn pri Qt + + + + &Options... + &Agordoj... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Montri / Kaŝi + + + + &Encrypt Wallet... + Ĉifri &Monujon... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Krei sekurkopion de la monujo... + + + + Backup wallet to another location + Krei alilokan sekurkopion de monujo + + + + &Change Passphrase... + Ŝanĝi &Pasfrazon... + + + + Change the passphrase used for wallet encryption + Ŝanĝi la pasfrazon por ĉifri la monujon + + + + &Unlock Wallet... + + + + + Unlock wallet + Malŝlosi la monujon + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Subskribi &mesaĝon... + + + + &Verify message... + &Kontroli mesaĝon... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + Sen&cimiga fenestro + + + + Open debugging and diagnostic console + Malfermi konzolon de sencimigo kaj diagnozo + + + + &File + &Dosiero + + + + &Settings + &Agordoj + + + + &Help + &Helpo + + + + Tabs toolbar + Langeto-breto + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sinkronigante kun reto... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Ĝisdata + + + + Catching up... + Ĝisdatigante... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Sendita transakcio + + + + Incoming transaction + Envenanta transakcio + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Dato: %1 +Sumo: %2 +Tipo: %3 +Adreso: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Monujo estas <b>ĉifrita</b> kaj aktuale <b>malŝlosita</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Monujo estas <b>ĉifrita</b> kaj aktuale <b>ŝlosita</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n horo + %n horoj + + + + + %n day(s) + + %n tago + %n tagoj + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_es.qm b/src/qt/locale/triangles_es.qm new file mode 100644 index 0000000..d5505fc Binary files /dev/null and b/src/qt/locale/triangles_es.qm differ diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/triangles_es.ts similarity index 68% rename from src/qt/locale/bitcoin_es.ts rename to src/qt/locale/triangles_es.ts index f7263b7..5be60d3 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/triangles_es.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin - Acerca de buynowcoin + About Triangles + Acerca de triangles + + + <b>triangles</b> version + <b>triangles</b> versión + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers - <b>buynowcoin</b> version - <b>buynowcoin</b> versión + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers +Copyright © 2014 Triangles team + - + This is experimental software. @@ -47,12 +58,17 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.
Libreta de Direcciones - + + These are your Triangles 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. + + + + Double-click to edit address or label Haga doble clic para editar una etiqueta o dirección - + Create a new address Crear una nueva dirección @@ -62,17 +78,21 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.
Copiar la dirección seleccionada al portapapeles del sistema - + + Sign a message to prove you own a TRI address + + + + &New Address &Nueva Dirección - - These are your buynowcoin 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. - Estas son las direcciones de buynowcoin para recibir pagos. Es posible que desee dar una diferente a cada remitente para que pueda realizar un seguimiento de quien te está pagando. + These are your triangles 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. + Estas son las direcciones de triangles para recibir pagos. Es posible que desee dar una diferente a cada remitente para que pueda realizar un seguimiento de quien te está pagando. - + &Copy Address &Copiar dirección @@ -82,27 +102,30 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.
Enseñar &QR Code - - Sign a message to prove you own a buynowcoin address - Firmar un mensaje para demostrar que es dueño de su dirección de buynowcoin + Sign a message to prove you own a triangles address + Firmar un mensaje para demostrar que es dueño de su dirección de triangles - + Sign &Message Firmar &Mensaje - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Borrar de la lista la dirección seleccionada - - Verify a message to ensure it was signed with a specified buynowcoin address - Verifique el mensaje para asegurarse que fue firmado por una dirección específica de buynowcoin + Verify a message to ensure it was signed with a specified triangles address + Verifique el mensaje para asegurarse que fue firmado por una dirección específica de triangles - + &Verify Message &Verifique Mensaje @@ -145,7 +168,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.
AddressTableModel - + Label Etiqueta @@ -248,7 +271,12 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.
¿Seguro que desea cifrar su monedero? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. IMPORTANTE: Cualquier copia de seguridad que haya realizado previamente de su archivo de monedero debe reemplazarse con el nuevo archivo de monedero cifrado. Por razones de seguridad, las copias de seguridad previas del archivo de monedero no cifradas serán inservibles en cuanto comience a usar el nuevo monedero cifrado. @@ -265,12 +293,11 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.
Monedero cifrado - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin cerrará para terminar el proceso de encriptación. Recuerde que la encriptación de su monedero no puede proteger completamente que sus monedas sean robadas por malware infectando su computadora. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles cerrará para terminar el proceso de encriptación. Recuerde que la encriptación de su monedero no puede proteger completamente que sus monedas sean robadas por malware infectando su computadora. - + @@ -311,431 +338,6 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.Se ha cambiado correctamente la contraseña del monedero. - - BitcoinGUI - - - Sign &message... - Firmar &mensaje... - - - - Synchronizing with network... - Sincronizando con la red… - - - - &Overview - &Vista general - - - - Show general overview of wallet - Mostrar vista general del monedero - - - - &Transactions - &Transacciones - - - - Browse transaction history - Examinar el historial de transacciones - - - - &Address Book - &Libreta de Direcciones - - - - Edit the list of stored addresses and labels - Editar la lista de direcciones y etiquetas almacenadas - - - - &Receive coins - &Recibir monedas - - - - Show the list of addresses for receiving payments - Mostrar la lista de direcciones para recibir pagos - - - - &Send coins - &Enviar monedas - - - - E&xit - &Salir - - - - Quit application - Salir de la aplicación - - - - Show information about buynowcoin - Mostrar información sobre buynowcoin - - - - About &Qt - Acerca de &Qt - - - - Show information about Qt - Mostrar información acerca de Qt - - - - &Options... - &Opciones... - - - - &Encrypt Wallet... - &Cifrar monedero… - - - - &Backup Wallet... - %Guardar copia del monedero... - - - - &Change Passphrase... - &Cambiar la contraseña… - - - - ~%n block(s) remaining - ~%n bloque restante~%n bloques restantes - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Descargado %1 de %2 bloques de historial de transacciones (%3% completado). - - - - &Export... - &Exportando... - - - - Send coins to a buynowcoin address - Enviar monedas a una dirección de buynowcoin - - - - Modify configuration options for buynowcoin - Modificar las opciones de configuración para buynowcoin - - - - Export the data in the current tab to a file - Exportar los datos en la ficha actual a un archivo - - - - Encrypt or decrypt wallet - Cifrar o descifrar el monedero - - - - Backup wallet to another location - Copia de seguridad del monedero en otra ubicación - - - - Change the passphrase used for wallet encryption - Cambiar la contraseña utilizada para el cifrado del monedero - - - - &Debug window - Ventana de &depuración - - - - Open debugging and diagnostic console - Abrir la consola de depuración y diagnóstico - - - - &Verify message... - &Verificar mensaje... - - - - buynowcoin - buynowcoin - - - - Wallet - Monedero - - - - &About buynowcoin - Acerca de buynowcoin - - - - &Show / Hide - &Mostrar / Ocultar - - - - Unlock wallet - Desbloquear el monedero - - - - &Lock Wallet - &Bloquear monedero - - - - Lock wallet - Bloquear monedero - - - - &File - &Archivo - - - - &Settings - &Configuración - - - - &Help - A&yuda - - - - Tabs toolbar - Barra de pestañas - - - - Actions toolbar - Barra de herramientas de acciones - - - - - [testnet] - [testnet] - - - - - buynowcoin client - Cliente buynowcoin - - - - %n active connection(s) to buynowcoin network - %n conexión activa a la red buynowcoin%n conexiones activas a la red buynowcoin - - - - Downloaded %1 blocks of transaction history. - Descargado %1 bloques de historial de transacciones. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Staking.<br>Su contribución es %1<br>Contribución de la red es %2<br>Tiempo esperado para ganar la recompensa es %3 - - - - Not staking because wallet is locked - No esta "Staking" porque monedera está bloqueada - - - - Not staking because wallet is offline - No esta "Staking" porque monedera está desconectada - - - - Not staking because wallet is syncing - No esta "Staking" porque monedera está sincronizando - - - - Not staking because you don't have mature coins - No esta "Staking" ya que no tiene monedas maduras - - - - %n second(s) ago - hace %n segundohace %n segundos - - - - About buynowcoin card - Sobre la tarjeta buynowcoin - - - - Show information about buynowcoin card - Mostrar información sobre la tarjeta buynowcoin - - - - &Unlock Wallet... - &Desbloquear Monedero... - - - - %n minute(s) ago - hace %n minutohace %n minutos - - - - %n hour(s) ago - hace %n horahace %n horas - - - - %n day(s) ago - hace %n diahace %n dias - - - - Up to date - Actualizado - - - - Catching up... - Actualizando... - - - - Last received block was generated %1. - Último bloque recibido se generó en %1. - - - - 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? - Esta transacción se encuentra sobre el límite de tamaño. Usted todavía puede enviarlo a un costo de %1, lo que va a los nodos que procesan sus transacciones y ayuda a apoyar la red. ¿Quieres pagar la cuota? - - - - Confirm transaction fee - Confirme tarifa de transacción - - - - Sent transaction - Transacción enviada - - - - Incoming transaction - Transacción entrante - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Fecha: %1 -Cantidad: %2 -Tipo: %3 -Dirección: %4 - - - - - - URI handling - Manejar URI - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URI no se puede analizar! Esto puede ser causado por una dirección de buynowcoin no válida o parámetros de URI malformados. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - El monedero está <b>cifrado</b> y actualmente <b>desbloqueado</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - El monedero está <b>cifrado</b> y actualmente <b>bloqueado</b> - - - - Backup Wallet - Copia de Seguridad de Monedero - - - - Wallet Data (*.dat) - Data de Monedero (*.dat) - - - - Backup Failed - Copia de Seguridad a fracasado - - - - There was an error trying to save the wallet data to the new location. - Hubo un error al tratar de salvar los datos de su monedero a la nueva ubicación. - - - - %n second(s) - %n segundo%n segundos - - - - %n minute(s) - %n minuto%n minutos - - - - %n hour(s) - %n hora%n horas - - - - %n day(s) - %n día%n días - - - - Not staking - No estás "Staking" - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Se ha producido un error fatal. buynowcoin ya no puede continuar de forma segura y cerrará. - - ClientModel @@ -1040,37 +642,46 @@ Esto significa que se requiere una cuota de al menos %2. La dirección asociada con esta entrada de la libreta de direcciones. Esto sólo puede ser modificada para direcciones de envío. - + + &Stealth Address + + + + New receiving address Nueva dirección de recepción - + New sending address Nueva dirección de envío - + Edit receiving address Editar dirección de recepción - + Edit sending address Editar dirección de envío - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. La dirección introducida "%1" ya está presente en la libreta de direcciones. - - The entered address "%1" is not a valid buynowcoin address. - La dirección introducida "%1" no es una dirección válida de buynowcoin. + The entered address "%1" is not a valid triangles address. + La dirección introducida "%1" no es una dirección válida de triangles. - + Could not unlock wallet. No se pudo desbloquear el monedero. @@ -1083,18 +694,22 @@ Esto significa que se requiere una cuota de al menos %2. GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version Versión - + + + Triangles-Qt + + + + Usage: Uso: @@ -1124,6 +739,347 @@ Esto significa que se requiere una cuota de al menos %2. Mostrar pantalla de bienvenida al iniciar (predeterminado: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipo + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiqueta + + + + To Address + + + + + From Address + + + + + Message + Mensaje + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (sin etiqueta) + + + + MessagePage + + + Address Book + Libreta de Direcciones + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copiar la dirección seleccionada al portapapeles del sistema + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Borrar de la lista la dirección seleccionada + + + + &Delete + &Eliminar + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Archivos de columnas separadas por coma (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + + + OptionsDialog @@ -1157,17 +1113,15 @@ Esto significa que se requiere una cuota de al menos %2. Reserva - - Automatically start buynowcoin after logging in to the system. - Iniciar buynowcoin automáticamente después de entrar en el sistema. + Automatically start triangles after logging in to the system. + Iniciar triangles automáticamente después de entrar en el sistema. - - &Start buynowcoin on system login - &Iniciar buynowcoin al inicio del sistema + &Start triangles on system login + &Iniciar triangles al inicio del sistema - + 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. Separe el bloque y las bases de datos de direcciones al apagar el equipo. Esto significa que se puede mover a otro directorio de datos, pero desacelera el apagado. El monedero siempre está separado. @@ -1182,19 +1136,37 @@ Esto significa que se requiere una cuota de al menos %2. &Red - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Abrir automáticamente el puerto de cliente buynowcoin en el router. Esto sólo funciona cuando el router es compatible con UPnP y está habilitado. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Abrir automáticamente el puerto de cliente triangles en el router. Esto sólo funciona cuando el router es compatible con UPnP y está habilitado. - + Map port using &UPnP Mapear el puerto usando &UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Conéctese a la red de buynowcoin a través de un SOCKS proxy (e.g. cuando se conecta a través de Tor) + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Conéctese a la red de triangles a través de un SOCKS proxy (e.g. cuando se conecta a través de Tor) + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1268,26 +1240,34 @@ Esto significa que se requiere una cuota de al menos %2. - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - El idioma del interfaz de usuario se puede configurar aquí. Esta configuración se aplicará después de reiniciar buynowcoin. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + El idioma del interfaz de usuario se puede configurar aquí. Esta configuración se aplicará después de reiniciar triangles. + + + &Unit to show amounts in: Mostrar las cantidades en la &unidad: Choose the default subdivision unit to show in the interface and when sending coins. - Elegir la subdivisión predeterminada para mostrar cantidades en la interfaz y cuando se envían bitcoins. + Elegir la subdivisión predeterminada para mostrar cantidades en la interfaz y cuando se envían triangless. - - Whether to show buynowcoin addresses in the transaction list or not. - Tanto para mostrar direcciones de buynowcoin en la lista de transacciones o no. + Whether to show triangles addresses in the transaction list or not. + Tanto para mostrar direcciones de triangles en la lista de transacciones o no. - + &Display addresses in transaction list &Mostrar las direcciones en la lista de transacciones @@ -1330,8 +1310,12 @@ Esto significa que se requiere una cuota de al menos %2. - This setting will take effect after restarting buynowcoin. - Esta configuración se aplicará después de reiniciar buynowcoin. + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Esta configuración se aplicará después de reiniciar triangles. @@ -1347,13 +1331,11 @@ Esto significa que se requiere una cuota de al menos %2. Desde - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - La información mostrada puede estar fuera de fecha. Su monedera se sincroniza automáticamente con la red buynowcoin después de que se establece una conexión, pero este proceso no se ha completado todavía. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + La información mostrada puede estar fuera de fecha. Su monedera se sincroniza automáticamente con la red triangles después de que se establece una conexión, pero este proceso no se ha completado todavía. - + Stake: Stake: @@ -1388,27 +1370,61 @@ Esto significa que se requiere una cuota de al menos %2. Saldo recién minado que aún no está disponible. - + Total: Total: - + Your current total balance Su balance actual total - + <b>Recent transactions</b> <b>Movimientos recientes</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Total de transacciones que aún no se han confirmado, y aún no cuentan para el balance actual - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Total de las monedas que fueron "Staked", y aún no cuentan para el balance actual @@ -1509,7 +1525,17 @@ Esto significa que se requiere una cuota de al menos %2. &Información - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Utilizando la versión OpenSSL @@ -1554,7 +1580,17 @@ Esto significa que se requiere una cuota de al menos %2. Hora del último bloque - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Abrir @@ -1564,12 +1600,11 @@ Esto significa que se requiere una cuota de al menos %2. Opciones de línea de comandos - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Mostrar el mensaje de ayuda de buynowcoin-Qt para obtener una lista con las posibles opciones de línea de comandos para buynowcoin. + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Mostrar el mensaje de ayuda de triangles-Qt para obtener una lista con las posibles opciones de línea de comandos para triangles. - + &Show &Mostrar @@ -1584,34 +1619,35 @@ Esto significa que se requiere una cuota de al menos %2. Fecha de compilación - - buynowcoin - Debug window - buynowcoin - Ventana de depuración + triangles - Debug window + triangles - Ventana de depuración - - buynowcoin Core - Núcleo buynowcoin + triangles Core + Núcleo triangles - + Debug log file Archivo de registro de depuración - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Abre el archivo de registro de buynowcoin del directorio de datos actual. Esto puede tardar algunos segundos para archivos grandes. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Abre el archivo de registro de triangles del directorio de datos actual. Esto puede tardar algunos segundos para archivos grandes. - + Clear console Borrar consola + + Welcome to the triangles RPC console. + Bienvenido a la consola RPC de triangles + - Welcome to the buynowcoin RPC console. - Bienvenido a la consola RPC de buynowcoin + Welcome to the Triangles RPC console. + @@ -1635,8 +1671,9 @@ Esto significa que se requiere una cuota de al menos %2. + Send Coins - Enviar bitcoins + Enviar triangless @@ -1659,7 +1696,7 @@ Esto significa que se requiere una cuota de al menos %2. Fondos insuficientes! - + Quantity: Cantidad: @@ -1679,13 +1716,17 @@ Esto significa que se requiere una cuota de al menos %2. Amount: Cuantía: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1728,7 +1769,7 @@ Esto significa que se requiere una cuota de al menos %2. dirección de cambio personalizada - + Send to multiple recipients at once Enviar a múltiples destinatarios de una vez @@ -1754,8 +1795,12 @@ Esto significa que se requiere una cuota de al menos %2. - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1768,9 +1813,13 @@ Esto significa que se requiere una cuota de al menos %2. &Enviar - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Introduce una dirección buynowcoin (p.ej. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Introduce una dirección triangles (p.ej. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1820,7 +1869,7 @@ Esto significa que se requiere una cuota de al menos %2. Confirm send coins - Confirmar el envío de bitcoins + Confirmar el envío de triangless @@ -1867,10 +1916,19 @@ Esto significa que se requiere una cuota de al menos %2. 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. Error: La transacción ha sido rechazada. Esto puede ocurrir si algunas de sus monedas en el monedero ya se gastaron, por ejemplo, si se usa una copia del wallet.dat y se gastaron las monedas de la copia pero no se han marcado como gastadas aquí. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - ADVERTENCIA: Dirección buynowcoin inválida + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + ADVERTENCIA: Dirección triangles inválida @@ -1902,19 +1960,29 @@ Esto significa que se requiere una cuota de al menos %2. - + Enter a label for this address to add it to your address book Etiquete esta dirección para añadirla a la libreta + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiqueta: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - La dirección a la que se quiere enviar el pago (p.ej. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + La dirección a la que se quiere enviar el pago (p.ej. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1941,10 +2009,225 @@ Esto significa que se requiere una cuota de al menos %2. Remove this recipient Elimina este beneficiario + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Introduce una dirección triangles (p.ej. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Introduce una dirección buynowcoin (p.ej. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Elije dirección de la libreta de direcciones + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar dirección desde portapapeles + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Enviar a múltiples destinatarios de una vez + + + + Add &Recipient + Añadir &destinatario + + + + Remove all transaction fields + Elimina todos los campos de transacciones + + + + Clear &All + Vaciar &todo + + + + Confirm the send action + Confirmar el envío + + + + S&end + &Enviar + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> para %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Estás seguro que quieres enviar %1? + + + + and + y + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + La dirección de recepción no es válida, compruébela de nuevo. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Se ha encontrado una dirección duplicada. Solo se puede enviar a cada dirección una vez por operación de envío. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Elije dirección de la libreta de direcciones + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar dirección desde portapapeles + + + + Alt+P + Alt+P + + + + Remove this recipient + Elimina este beneficiario + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Etiquete esta dirección para añadirla a la libreta + + + + &Label: + &Etiqueta: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1967,8 +2250,8 @@ Esto significa que se requiere una cuota de al menos %2. - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - La dirección a firmar con un mensaje (p.ej. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + La dirección a firmar con un mensaje (p.ej. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -2004,11 +2287,20 @@ Esto significa que se requiere una cuota de al menos %2. - Sign the message to prove you own this buynowcoin address - Firma el mensaje para demostrar que posees esta dirección buynowcoin. + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Firma el mensaje para demostrar que posees esta dirección triangles. + + + Reset all sign message fields Vaciar todos los campos de la firma de mensaje @@ -2031,34 +2323,45 @@ Esto significa que se requiere una cuota de al menos %2. - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - La dirección firmada con un mensaje (p.ej. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + La dirección firmada con un mensaje (p.ej. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Verifique el mensaje para asegurarse de que se firmó con la dirección buynowcoin especificada. + Verify the message to ensure it was signed with the specified triangles address + Verifique el mensaje para asegurarse de que se firmó con la dirección triangles especificada. - + Reset all verify message fields Vaciar todos los campos de la verificación de mensaje - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Introduce una dirección buynowcoin (p.ej Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Introduce una dirección triangles (p.ej TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Haga clic en "Firmar mensaje" para generar la firma + + Enter triangles signature + Introduce la firma triangles + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Introduce la firma buynowcoin + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2137,7 +2440,10 @@ Esto significa que se requiere una cuota de al menos %2. Open for %n block(s) - Abierto para %n bloqueAbierto para %n bloques + + Abierto para %n bloque + Abierto para %n bloques + @@ -2167,7 +2473,10 @@ Esto significa que se requiere una cuota de al menos %2. , broadcast through %n node(s) - , transmitir a través de %n nodo, transmitir a través de %n nodos + + , transmitir a través de %n nodo + , transmitir a través de %n nodos + @@ -2213,14 +2522,17 @@ Esto significa que se requiere una cuota de al menos %2. - + Credit Crédito - + matures in %n more block(s) - disponible en %n bloque másdisponible en %n bloques más + + disponible en %n bloque más + disponible en %n bloques más + @@ -2231,12 +2543,12 @@ Esto significa que se requiere una cuota de al menos %2. - + Debit Débito - + Transaction fee Comisión de transacción @@ -2256,14 +2568,18 @@ Esto significa que se requiere una cuota de al menos %2. Comentario - + Transaction ID Identificador de transacción + Generated coins must mature 60 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. + Las monedas generadas deben madurar 510 bloques antes de que puedan gastarse. Cuando generaste este bloque, este fue transmitido a la red para ser añadido a la cadena de bloques. Si falla al introducirse en la cadena, su estado cambiará a "no aceptado" y no se podrá gastar. Esto ocasionalmente puede ocurrir si otro nodo genera un bloque a unos segundos que el tuyo. {60 ?} + + Generated coins must mature 510 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. - Las monedas generadas deben madurar 510 bloques antes de que puedan gastarse. Cuando generaste este bloque, este fue transmitido a la red para ser añadido a la cadena de bloques. Si falla al introducirse en la cadena, su estado cambiará a "no aceptado" y no se podrá gastar. Esto ocasionalmente puede ocurrir si otro nodo genera un bloque a unos segundos que el tuyo. + Las monedas generadas deben madurar 510 bloques antes de que puedan gastarse. Cuando generaste este bloque, este fue transmitido a la red para ser añadido a la cadena de bloques. Si falla al introducirse en la cadena, su estado cambiará a "no aceptado" y no se podrá gastar. Esto ocasionalmente puede ocurrir si otro nodo genera un bloque a unos segundos que el tuyo. @@ -2296,7 +2612,7 @@ Esto significa que se requiere una cuota de al menos %2. falso - + , has not been successfully broadcast yet , todavía no se ha sido difundido satisfactoriamente @@ -2322,7 +2638,7 @@ Esto significa que se requiere una cuota de al menos %2. TransactionTableModel - + Date Fecha @@ -2354,10 +2670,18 @@ Esto significa que se requiere una cuota de al menos %2. Open for %n more block(s) - Abrir para %n bloque másAbrir para %n bloques más + + Abrir para %n bloque más + Abrir para %n bloques más + - + + Narration + + + + Offline Sin conexión @@ -2422,7 +2746,7 @@ Esto significa que se requiere una cuota de al menos %2. (nd) - + Transaction status. Hover over this field to show number of confirmations. Estado de transacción. Pasa el ratón sobre este campo para ver el número de confirmaciones. @@ -2617,29 +2941,20 @@ Esto significa que se requiere una cuota de al menos %2. - WalletModel + Triangles-core - - Sending... - Enviando... - - - - bitcoin-core - - - buynowcoin version - versión buynowcoin + triangles version + versión triangles - + Usage: Uso: - Send command to -server or buynowcoind - Envía un comando a -server o buynowcoind + Send command to -server or trianglesd + Envía un comando a -server o trianglesd @@ -2661,13 +2976,13 @@ Esto significa que se requiere una cuota de al menos %2. - Specify configuration file (default: buynowcoin.conf) - Especifica un archivo de configuración (por defecto: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Especifica un archivo de configuración (por defecto: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Especifica un archivo pid (por defecto: buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + Especifica un archivo pid (por defecto: trianglesd.pid) @@ -2680,7 +2995,22 @@ Esto significa que se requiere una cuota de al menos %2. Especificar directorio para los datos - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Establecer el tamaño de caché de la base de datos en megabytes (predeterminado: 25) @@ -2818,12 +3148,11 @@ Esto significa que se requiere una cuota de al menos %2. Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Advertencia: Verifique que la fecha y hora del equipo sean correctas! Si su reloj es erróneo buynowcoin no funcionará correctamente. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Advertencia: Verifique que la fecha y hora del equipo sean correctas! Si su reloj es erróneo triangles no funcionará correctamente. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Aviso: ¡Error al leer wallet.dat! Todas las claves se han leído correctamente, pero podrían faltar o ser incorrectos los datos de transacciones o las entradas de la libreta de direcciones. @@ -2909,8 +3238,8 @@ Esto significa que se requiere una cuota de al menos %2. - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Opciones SSL: (ver la Bitcoin Wiki para instrucciones de configuración SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Opciones SSL: (ver la Triangles Wiki para instrucciones de configuración SSL) @@ -2969,18 +3298,53 @@ Esto significa que se requiere una cuota de al menos %2. Usar proxy para alcanzar a ver los servicios ocultos (por defecto: los mismos que -proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Nombre de usuario para las conexiones JSON-RPC - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Verificando la integridad de la base de datos... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! ADVERTENCIA: violación de un punto de control sincronizado detectada, se saltara! @@ -3006,32 +3370,31 @@ Esto significa que se requiere una cuota de al menos %2. - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, debe establecer un rpcpassword en el fichero de configuración: + %s, debe establecer un rpcpassword en el fichero de configuración: %s Se recomienda utilizar la siguiente contraseña aleatoria: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (no necesita recordar este password) El nombre de usuario y contraseña no debe ser el mismo. Si no existe el archivo, créelo con permisos de sólo lectura para el dueño. También se recomienda establecer alertnotify para ser notificado de los problemas; -por ejemplo: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +por ejemplo: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - + Find peers using internet relay chat (default: 0) Encontrar pares usando IRC (por defecto:1) {0)?} @@ -3158,17 +3521,15 @@ por ejemplo: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f El monedero %s reside fuera del directorio de datos %s. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - No se puede obtener un bloqueo en el directorio de datos %s. buynowcoin probablemente ya esté en funcionamiento. + Cannot obtain a lock on data directory %s. triangles is probably already running. + No se puede obtener un bloqueo en el directorio de datos %s. triangles probablemente ya esté en funcionamiento. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) No es posible conectar con %s en este sistema (bind ha dado el error %d, %s) @@ -3198,17 +3559,15 @@ por ejemplo: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error al cargar wallet.dat: el monedero está dañado - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Error cargando wallet.dat: El monedero requiere una nueva versión de buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Error cargando wallet.dat: El monedero requiere una nueva versión de triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - El monedero necesita ser reescrito: reinicie buynowcoin para completar + Wallet needed to be rewritten: restart triangles to complete + El monedero necesita ser reescrito: reinicie triangles para completar - + Error loading wallet.dat Error al cargar wallet.dat @@ -3273,12 +3632,11 @@ por ejemplo: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Añadir un nodo al que conectarse y tratar de mantener la conexión abierta - - Unable to bind to %s on this computer. buynowcoin is probably already running. - No se puede enlazar a %s en este equipo. buynowcoin probablemente ya esté en funcionamiento. + Unable to bind to %s on this computer. triangles is probably already running. + No se puede enlazar a %s en este equipo. triangles probablemente ya esté en funcionamiento. - + Fee per KB to add to transactions you send Comisión por KB a añadir a las transacciones que envía @@ -3337,4 +3695,533 @@ If the file does not exist, create it with owner-readable-only file permissions. Si el archivo no existe, créelo con permiso de lectura solamente del propietario. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Monedero + + + + &Overview + &Vista general + + + + Show general overview of wallet + Mostrar vista general del monedero + + + + &Send coins + &Enviar monedas + + + + Send coins to a TRI address + + + + + &Receive coins + &Recibir monedas + + + + Show the list of addresses for receiving payments + Mostrar la lista de direcciones para recibir pagos + + + + &Transactions + &Transacciones + + + + Browse transaction history + Examinar el historial de transacciones + + + + &Address Book + &Libreta de Direcciones + + + + Edit the list of stored addresses and labels + Editar la lista de direcciones y etiquetas almacenadas + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Salir + + + + Quit application + Salir de la aplicación + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Acerca de &Qt + + + + Show information about Qt + Mostrar información acerca de Qt + + + + &Options... + &Opciones... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Mostrar / Ocultar + + + + &Encrypt Wallet... + &Cifrar monedero… + + + + Encrypt or decrypt wallet + Cifrar o descifrar el monedero + + + + &Backup Wallet... + %Guardar copia del monedero... + + + + Backup wallet to another location + Copia de seguridad del monedero en otra ubicación + + + + &Change Passphrase... + &Cambiar la contraseña… + + + + Change the passphrase used for wallet encryption + Cambiar la contraseña utilizada para el cifrado del monedero + + + + &Unlock Wallet... + &Desbloquear Monedero... + + + + Unlock wallet + Desbloquear el monedero + + + + &Lock Wallet + &Bloquear monedero + + + + Lock wallet + Bloquear monedero + + + + Sign &message... + Firmar &mensaje... + + + + &Verify message... + &Verificar mensaje... + + + + &Export... + &Exportando... + + + + Export the data in the current tab to a file + Exportar los datos en la ficha actual a un archivo + + + + &Debug window + Ventana de &depuración + + + + Open debugging and diagnostic console + Abrir la consola de depuración y diagnóstico + + + + &File + &Archivo + + + + &Settings + &Configuración + + + + &Help + A&yuda + + + + Tabs toolbar + Barra de pestañas + + + + Actions toolbar + Barra de herramientas de acciones + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sincronizando con la red… + + + + ~%n block(s) remaining + + ~%n bloque restante + ~%n bloques restantes + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Descargado %1 de %2 bloques de historial de transacciones (%3% completado). + + + + Downloaded %1 blocks of transaction history. + Descargado %1 bloques de historial de transacciones. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + hace %n segundo + hace %n segundos + + + + + %n minute(s) ago + + hace %n minuto + hace %n minutos + + + + + %n hour(s) ago + + hace %n hora + hace %n horas + + + + + %n day(s) ago + + hace %n dia + hace %n dias + + + + + Up to date + Actualizado + + + + Catching up... + Actualizando... + + + + Last received block was generated %1. + Último bloque recibido se generó en %1. + + + + 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? + Esta transacción se encuentra sobre el límite de tamaño. Usted todavía puede enviarlo a un costo de %1, lo que va a los nodos que procesan sus transacciones y ayuda a apoyar la red. ¿Quieres pagar la cuota? + + + + Confirm transaction fee + Confirme tarifa de transacción + + + + Sent transaction + Transacción enviada + + + + Incoming transaction + Transacción entrante + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Fecha: %1 +Cantidad: %2 +Tipo: %3 +Dirección: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + Manejar URI + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + El monedero está <b>cifrado</b> y actualmente <b>desbloqueado</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + El monedero está <b>cifrado</b> y actualmente <b>bloqueado</b> + + + + Backup Wallet + Copia de Seguridad de Monedero + + + + Wallet Data (*.dat) + Data de Monedero (*.dat) + + + + Backup Failed + Copia de Seguridad a fracasado + + + + There was an error trying to save the wallet data to the new location. + Hubo un error al tratar de salvar los datos de su monedero a la nueva ubicación. + + + + %n second(s) + + %n segundo + %n segundos + + + + + %n minute(s) + + %n minuto + %n minutos + + + + + %n hour(s) + + %n hora + %n horas + + + + + %n day(s) + + %n día + %n días + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Staking.<br>Su contribución es %1<br>Contribución de la red es %2<br>Tiempo esperado para ganar la recompensa es %3 + + + + Not staking because wallet is locked + No esta "Staking" porque monedera está bloqueada + + + + Not staking because wallet is offline + No esta "Staking" porque monedera está desconectada + + + + Not staking because wallet is syncing + No esta "Staking" porque monedera está sincronizando + + + + Not staking because you don't have mature coins + No esta "Staking" ya que no tiene monedas maduras + + + + Not staking + No estás "Staking" + + + Show information about triangles + Mostrar información sobre triangles + + + Send coins to a triangles address + Enviar monedas a una dirección de triangles + + + Modify configuration options for triangles + Modificar las opciones de configuración para triangles + + + triangles + triangles + + + &About triangles + Acerca de triangles + + + triangles client + Cliente triangles + + + %n active connection(s) to triangles network + + %n conexión activa a la red triangles + %n conexiones activas a la red triangles + + + + About triangles card + Sobre la tarjeta triangles + + + Show information about triangles card + Mostrar información sobre la tarjeta triangles + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URI no se puede analizar! Esto puede ser causado por una dirección de triangles no válida o parámetros de URI malformados. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Se ha producido un error fatal. triangles ya no puede continuar de forma segura y cerrará. + + + + WalletModel + + + Sending... + Enviando... + + + diff --git a/src/qt/locale/triangles_es_CL.qm b/src/qt/locale/triangles_es_CL.qm new file mode 100644 index 0000000..8d60851 Binary files /dev/null and b/src/qt/locale/triangles_es_CL.qm differ diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/triangles_es_CL.ts similarity index 64% rename from src/qt/locale/bitcoin_es_CL.ts rename to src/qt/locale/triangles_es_CL.ts index 17182bc..8e417ba 100644 --- a/src/qt/locale/bitcoin_es_CL.ts +++ b/src/qt/locale/triangles_es_CL.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -42,15 +43,15 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard. Address Book - + - + Double-click to edit address or label Haz doble clic para editar una dirección o etiqueta - + Create a new address Crea una nueva dirección @@ -60,52 +61,52 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.Copia la dirección seleccionada al portapapeles - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Copia dirección Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + &Firmar Mensaje + + + + These are your Triangles 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. + + + + &Delete &Borrar @@ -122,7 +123,7 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard. Export Address Book Data - + @@ -132,18 +133,18 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard. Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etiqueta @@ -163,7 +164,7 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard. Passphrase Dialog - + @@ -183,12 +184,12 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard. Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -238,7 +239,7 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard. Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -264,8 +265,8 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard. - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -309,430 +310,6 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.La contraseña de billetera ha sido cambiada con éxito. - - BitcoinGUI - - - Sign &message... - Firmar &Mensaje... - - - - Synchronizing with network... - Sincronizando con la red... - - - - &Overview - &Vista general - - - - Show general overview of wallet - Muestra una vista general de la billetera - - - - &Transactions - &Transacciones - - - - Browse transaction history - Explora el historial de transacciónes - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Salir - - - - Quit application - Salir del programa - - - - Show information about buynowcoin - - - - - About &Qt - Acerca de - - - - Show information about Qt - Mostrar Información sobre QT - - - - &Options... - &Opciones - - - - &Encrypt Wallet... - &Codificar la billetera... - - - - &Backup Wallet... - &Respaldar billetera... - - - - &Change Passphrase... - &Cambiar la contraseña... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Respaldar billetera en otra ubicación - - - - Change the passphrase used for wallet encryption - Cambiar la contraseña utilizada para la codificación de la billetera - - - - &Debug window - Ventana &Debug - - - - Open debugging and diagnostic console - Abre consola de depuración y diagnóstico - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - Cartera - - - - &About buynowcoin - - - - - &Show / Hide - &Mostrar/Ocultar - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Archivo - - - - &Settings - &Configuración - - - - &Help - &Ayuda - - - - Tabs toolbar - Barra de pestañas - - - - Actions toolbar - - - - - - [testnet] - [red-de-pruebas] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Actualizado - - - - Catching up... - Recuperando... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transacción enviada - - - - Incoming transaction - Transacción entrante - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Fecha: %1 -Cantidad: %2 -Tipo: %3 -Dirección: %4 - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - La billetera esta <b>codificada</b> y actualmente <b>desbloqueda</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - La billetera esta <b>codificada</b> y actualmente <b>bloqueda</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n hora%n horas - - - - %n day(s) - %n día%n días - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -746,17 +323,17 @@ Dirección: %4 Coin Control - + Quantity: - + Bytes: - + @@ -766,47 +343,47 @@ Dirección: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -816,7 +393,7 @@ Dirección: %4 Label - + Etiqueta @@ -831,7 +408,7 @@ Dirección: %4 Confirmations - + @@ -841,7 +418,7 @@ Dirección: %4 Priority - + @@ -862,87 +439,87 @@ Dirección: %4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -951,7 +528,7 @@ Dirección: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -960,7 +537,7 @@ Dirección: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -969,14 +546,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -987,12 +564,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1010,7 +587,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1020,40 +597,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nueva dirección para recibir - + New sending address Nueva dirección para enviar - + Edit receiving address Editar dirección de recepción - + Edit sending address Editar dirección de envio - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. La dirección introducida "%1" ya esta guardada en la libreta de direcciones. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. No se pudo desbloquear la billetera. @@ -1067,44 +649,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Uso: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipo + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiqueta + + + + To Address + + + + + From Address + + + + + Message + Mensaje + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (sin etiqueta) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copia la dirección seleccionada al portapapeles + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Borrar + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Archivos separados por coma (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1122,7 +1045,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1132,32 +1055,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1166,8 +1089,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1176,13 +1099,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1192,7 +1115,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1207,17 +1130,17 @@ This label turns red, if the priority is smaller than "medium". SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + @@ -1247,12 +1170,12 @@ This label turns red, if the priority is smaller than "medium". User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1266,8 +1189,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1277,12 +1200,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1297,7 +1220,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1308,18 +1231,18 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1330,15 +1253,15 @@ This label turns red, if the priority is smaller than "medium". Formulario - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + @@ -1353,47 +1276,75 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: Total: - + Your current total balance - + - + <b>Recent transactions</b> <b>Transacciones recientes</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1407,57 +1358,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Cantidad: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1494,7 +1445,7 @@ This label turns red, if the priority is smaller than "medium". Using OpenSSL version - + @@ -1514,7 +1465,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1524,17 +1475,17 @@ This label turns red, if the priority is smaller than "medium". Current number of blocks - + Estimated total blocks - + Last block time - + @@ -1544,17 +1495,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1564,47 +1510,52 @@ This label turns red, if the priority is smaller than "medium". Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Limpiar Consola - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1618,44 +1569,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Enviar monedas Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1667,51 +1619,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Enviar a múltiples destinatarios @@ -1723,7 +1675,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1737,8 +1689,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1751,14 +1703,14 @@ This label turns red, if the priority is smaller than "medium". &Envía - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1768,37 +1720,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1808,12 +1760,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1843,17 +1795,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1863,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1871,7 +1828,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formulario @@ -1885,24 +1842,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Introduce una etiqueta a esta dirección para añadirla a tu guia + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiqueta: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1922,12 +1889,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pega dirección desde portapapeles + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Enviar a múltiples destinatarios + + + + Add &Recipient + &Agrega destinatario + + + + Remove all transaction fields + + + + + Clear &All + &Borra todos + + + + Confirm the send action + Confirma el envio + + + + S&end + &Envía + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + La dirección de destinatarion no es valida, comprueba otra vez. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Tienes una dirección duplicada, solo puedes enviar a direcciónes individuales de una sola vez. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulario + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pega dirección desde portapapeles + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Introduce una etiqueta a esta dirección para añadirla a tu guia + + + + &Label: + &Etiqueta: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1935,7 +2113,7 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + @@ -1946,18 +2124,18 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1983,17 +2161,22 @@ This label turns red, if the priority is smaller than "medium". Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + @@ -2010,44 +2193,43 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Click en "Firmar Mensage" para conseguir firma + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - La dirección introducida "%1" no es una dirección Bitcoin valida. + La dirección introducida "%1" no es una dirección Triangles valida. @@ -2055,13 +2237,13 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - Por favor, revise la dirección Bitcoin e inténtelo denuevo + Por favor, revise la dirección Triangles e inténtelo denuevo The entered address does not refer to a key. - + @@ -2071,7 +2253,7 @@ This label turns red, if the priority is smaller than "medium". Private key for the entered address is not available. - + @@ -2086,23 +2268,23 @@ This label turns red, if the priority is smaller than "medium". The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + @@ -2120,12 +2302,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2150,7 +2335,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + + @@ -2160,7 +2348,7 @@ This label turns red, if the priority is smaller than "medium". Source - + @@ -2196,14 +2384,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Credito - + matures in %n more block(s) - + + + + @@ -2214,12 +2405,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debito - + Transaction fee Comisión transacción @@ -2239,19 +2430,19 @@ This label turns red, if the priority is smaller than "medium". Comentario - + Transaction ID ID de Transacción - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + @@ -2261,7 +2452,7 @@ This label turns red, if the priority is smaller than "medium". Inputs - + @@ -2271,15 +2462,15 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet , no ha sido emitido satisfactoriamente todavía @@ -2305,7 +2496,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Fecha @@ -2337,32 +2528,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Abierto para &n bloque másAbierto para &n bloques más + + Abierto para &n bloque más + Abierto para &n bloques más + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2405,7 +2604,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Estado de transacción. Pasa el raton sobre este campo para ver el numero de confirmaciónes. @@ -2521,7 +2720,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2536,7 +2735,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2581,12 +2780,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2600,32 +2799,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Uso: - - Send command to -server or buynowcoind - - - - + List commands Muestra comandos @@ -2643,19 +2824,9 @@ This label turns red, if the priority is smaller than "medium". - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2671,12 +2842,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2686,22 +2857,22 @@ This label turns red, if the priority is smaller than "medium". Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2711,32 +2882,32 @@ This label turns red, if the priority is smaller than "medium". Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2747,22 +2918,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2779,22 +2950,22 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2802,29 +2973,24 @@ This label turns red, if the priority is smaller than "medium". Precaución: -paytxfee es muy alta. Esta es la comisión que pagarás si envias una transacción. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + @@ -2835,72 +3001,72 @@ This label turns red, if the priority is smaller than "medium". Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Opciones SSL: (ver la Bitcoin Wiki para instrucciones de configuración SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Opciones SSL: (ver la Triangles Wiki para instrucciones de configuración SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2910,12 +3076,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2925,7 +3091,7 @@ This label turns red, if the priority is smaller than "medium". Shrink debug.log file on client startup (default: 1 when no -debug) - + @@ -2936,7 +3102,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2951,7 +3117,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2962,17 +3128,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2991,34 +3167,39 @@ This label turns red, if the priority is smaller than "medium". - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3035,27 +3216,27 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when the best block changes (%s in cmd is replaced by block hash) - + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3077,17 +3258,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3110,17 +3291,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3131,27 +3312,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) No es posible escuchar en el %s en este ordenador (bind returned error %d, %s) Connect through socks proxy - + @@ -3167,7 +3338,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3175,17 +3346,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error cargando wallet.dat: Billetera corrupta - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Error cargando wallet.dat @@ -3197,22 +3358,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + @@ -3222,12 +3383,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3245,44 +3406,74 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Cargando el index de bloques... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Agrega un nodo para conectarse and attempt to keep the connection open - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Cargando cartera... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + @@ -3309,7 +3500,488 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Cartera + + + + &Overview + &Vista general + + + + Show general overview of wallet + Muestra una vista general de la billetera + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transacciones + + + + Browse transaction history + Explora el historial de transacciónes + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Salir + + + + Quit application + Salir del programa + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Acerca de + + + + Show information about Qt + Mostrar Información sobre QT + + + + &Options... + &Opciones + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Mostrar/Ocultar + + + + &Encrypt Wallet... + &Codificar la billetera... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Respaldar billetera... + + + + Backup wallet to another location + Respaldar billetera en otra ubicación + + + + &Change Passphrase... + &Cambiar la contraseña... + + + + Change the passphrase used for wallet encryption + Cambiar la contraseña utilizada para la codificación de la billetera + + + + &Unlock Wallet... + + + + + Unlock wallet + Desbloquea billetera + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Firmar &Mensaje... + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + Ventana &Debug + + + + Open debugging and diagnostic console + Abre consola de depuración y diagnóstico + + + + &File + &Archivo + + + + &Settings + &Configuración + + + + &Help + &Ayuda + + + + Tabs toolbar + Barra de pestañas + + + + Actions toolbar + + + + + + [testnet] + [red-de-pruebas] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sincronizando con la red... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Actualizado + + + + Catching up... + Recuperando... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transacción enviada + + + + Incoming transaction + Transacción entrante + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Fecha: %1 +Cantidad: %2 +Tipo: %3 +Dirección: %4 + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + La billetera esta <b>codificada</b> y actualmente <b>desbloqueda</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + La billetera esta <b>codificada</b> y actualmente <b>bloqueda</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n hora + %n horas + + + + + %n day(s) + + %n día + %n días + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_es_DO.qm b/src/qt/locale/triangles_es_DO.qm similarity index 50% rename from src/qt/locale/bitcoin_es_DO.qm rename to src/qt/locale/triangles_es_DO.qm index 6c603a6..d534c20 100644 Binary files a/src/qt/locale/bitcoin_es_DO.qm and b/src/qt/locale/triangles_es_DO.qm differ diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/triangles_es_DO.ts similarity index 69% rename from src/qt/locale/bitcoin_es_DO.ts rename to src/qt/locale/triangles_es_DO.ts index 2d8ba49..42c9d95 100644 --- a/src/qt/locale/bitcoin_es_DO.ts +++ b/src/qt/locale/triangles_es_DO.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -42,15 +43,15 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard. Address Book - + - + Double-click to edit address or label Haga doble clic para editar una dirección o etiqueta - + Create a new address Crear una nueva dirección @@ -60,52 +61,52 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.Copiar la dirección seleccionada al portapapeles del sistema - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Copiar dirección Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Borrar de la lista la dirección seleccionada - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Verificar mensaje - + + These are your Triangles 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. + + + + &Delete &Eliminar @@ -122,7 +123,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard. Export Address Book Data - + @@ -132,18 +133,18 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard. Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etiqueta @@ -183,12 +184,12 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard. Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -238,7 +239,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard. Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -264,8 +265,8 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard. - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -309,431 +310,6 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.Se ha cambiado correctamente la contraseña del monedero. - - BitcoinGUI - - - Sign &message... - Firmar &mensaje... - - - - Synchronizing with network... - Sincronizando con la red… - - - - &Overview - &Vista general - - - - Show general overview of wallet - Mostrar vista general del monedero - - - - &Transactions - &Transacciones - - - - Browse transaction history - Examinar el historial de transacciones - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Salir - - - - Quit application - Salir de la aplicación - - - - Show information about buynowcoin - - - - - About &Qt - Acerca de &Qt - - - - Show information about Qt - Mostrar información acerca de Qt - - - - &Options... - &Opciones... - - - - &Encrypt Wallet... - &Cifrar monedero… - - - - &Backup Wallet... - Copia de &respaldo del monedero... - - - - &Change Passphrase... - &Cambiar la contraseña… - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Copia de seguridad del monedero en otra ubicación - - - - Change the passphrase used for wallet encryption - Cambiar la contraseña utilizada para el cifrado del monedero - - - - &Debug window - Ventana de &depuración - - - - Open debugging and diagnostic console - Abrir la consola de depuración y diagnóstico - - - - &Verify message... - &Verificar mensaje... - - - - buynowcoin - - - - - Wallet - Monedero - - - - &About buynowcoin - - - - - &Show / Hide - Mo&strar/ocultar - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Archivo - - - - &Settings - &Configuración - - - - &Help - A&yuda - - - - Tabs toolbar - Barra de pestañas - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Actualizado - - - - Catching up... - Actualizando... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transacción enviada - - - - Incoming transaction - Transacción entrante - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Fecha: %1 -Cantidad: %2 -Tipo: %3 -Dirección: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - El monedero está <b>cifrado</b> y actualmente <b>desbloqueado</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - El monedero está <b>cifrado</b> y actualmente <b>bloqueado</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n hora%n horas - - - - %n day(s) - %n día%n días - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -747,7 +323,7 @@ Dirección: %4 Coin Control - + @@ -817,7 +393,7 @@ Dirección: %4 Label - + Etiqueta @@ -938,7 +514,7 @@ Dirección: %4 DUST - + @@ -952,7 +528,7 @@ Dirección: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -961,7 +537,7 @@ Dirección: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -970,14 +546,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1011,7 +587,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1021,40 +597,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nueva dirección de recepción - + New sending address Nueva dirección de envío - + Edit receiving address Editar dirección de recepción - + Edit sending address Editar dirección de envío - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. La dirección introducida "%1" ya está presente en la libreta de direcciones. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. No se pudo desbloquear el monedero. @@ -1068,44 +649,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Uso: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipo + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiqueta + + + + To Address + + + + + From Address + + + + + Message + Mensaje + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (sin etiqueta) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copiar la dirección seleccionada al portapapeles del sistema + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Borrar de la lista la dirección seleccionada + + + + &Delete + &Eliminar + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Archivos de columnas separadas por coma (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1123,7 +1045,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1133,32 +1055,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1167,8 +1089,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1177,13 +1099,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1193,7 +1115,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1252,8 +1174,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1267,8 +1189,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1283,7 +1205,7 @@ This label turns red, if the priority is smaller than "medium". Display coin &control features (experts only!) - + @@ -1298,7 +1220,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1309,13 +1231,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1331,15 +1253,15 @@ This label turns red, if the priority is smaller than "medium". Desde - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + @@ -1354,7 +1276,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1372,29 +1294,57 @@ This label turns red, if the priority is smaller than "medium". Saldo recién minado que aún no está disponible. - + Total: Total: - + Your current total balance Su balance actual total - + <b>Recent transactions</b> <b>Movimientos recientes</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1408,57 +1358,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Cuantía: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1515,7 +1465,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1545,17 +1495,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1569,13 +1514,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1584,18 +1529,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Borrar consola - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1619,6 +1569,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Enviar monedas @@ -1643,7 +1594,7 @@ This label turns red, if the priority is smaller than "medium". Fondos insuficientes! - + Quantity: Cantidad: @@ -1651,7 +1602,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1668,8 +1619,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1679,7 +1630,7 @@ This label turns red, if the priority is smaller than "medium". medium - + medio @@ -1694,7 +1645,7 @@ This label turns red, if the priority is smaller than "medium". no - + no @@ -1704,15 +1655,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once Enviar a múltiples destinatarios de una vez @@ -1724,7 +1675,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1738,8 +1689,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1752,9 +1703,9 @@ This label turns red, if the priority is smaller than "medium". &Enviar - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1799,7 +1750,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1809,12 +1760,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1844,17 +1795,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1864,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1872,7 +1828,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Desde @@ -1886,24 +1842,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Etiquete esta dirección para añadirla a la libreta + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiqueta: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1923,12 +1889,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar dirección desde portapapeles + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Enviar a múltiples destinatarios de una vez + + + + Add &Recipient + Añadir &destinatario + + + + Remove all transaction fields + + + + + Clear &All + Limpiar &todo + + + + Confirm the send action + Confirmar el envío + + + + S&end + &Enviar + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + La dirección de recepción no es válida, compruébela de nuevo. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Se ha encontrado una dirección duplicada. Solo se puede enviar a cada dirección una vez por operación de envío. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Desde + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar dirección desde portapapeles + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Etiquete esta dirección para añadirla a la libreta + + + + &Label: + &Etiqueta: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1951,14 +2128,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1988,11 +2165,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Limpiar todos los campos de la firma de mensaje @@ -2015,34 +2197,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Limpiar todos los campos de la verificación de mensaje - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Haga clic en "Firmar mensaje" para generar la firma + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2121,12 +2302,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2151,7 +2335,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , transmitir a través de %n nodo, transmitir a través de %n nodos + + , transmitir a través de %n nodo + , transmitir a través de %n nodos + @@ -2197,14 +2384,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Crédito - + matures in %n more block(s) - disponible en %n bloque másdisponible en %n bloques más + + disponible en %n bloque más + disponible en %n bloques más + @@ -2215,12 +2405,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Débito - + Transaction fee Comisión de transacción @@ -2240,14 +2430,14 @@ This label turns red, if the priority is smaller than "medium". Comentario - + Transaction ID Identificador de transacción - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2280,7 +2470,7 @@ This label turns red, if the priority is smaller than "medium". falso - + , has not been successfully broadcast yet , todavía no se ha sido difundido satisfactoriamente @@ -2306,7 +2496,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Fecha @@ -2338,32 +2528,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Abrir para %n bloque másAbrir para %n bloques más + + Abrir para %n bloque más + Abrir para %n bloques más + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2406,7 +2604,7 @@ This label turns red, if the priority is smaller than "medium". (nd) - + Transaction status. Hover over this field to show number of confirmations. Estado de transacción. Pasa el ratón sobre este campo para ver el número de confirmaciones. @@ -2537,7 +2735,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2582,12 +2780,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2601,32 +2799,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Uso: - - Send command to -server or buynowcoind - - - - + List commands Muestra comandos @@ -2644,17 +2824,7 @@ This label turns red, if the priority is smaller than "medium". - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) Especificar archivo de monedero (dentro del directorio de datos) @@ -2671,12 +2841,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2696,12 +2866,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2721,22 +2891,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2747,22 +2917,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2789,12 +2959,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2802,12 +2972,7 @@ This label turns red, if the priority is smaller than "medium". Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Aviso: ¡Error al leer wallet.dat! Todas las claves se han leído correctamente, pero podrían faltar o ser incorrectos los datos de transacciones o las entradas de la libreta de direcciones. @@ -2844,22 +3009,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2879,27 +3044,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Opciones SSL: (ver la Bitcoin Wiki para instrucciones de configuración SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Opciones SSL: (ver la Triangles Wiki para instrucciones de configuración SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2909,12 +3074,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2935,7 +3100,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2950,7 +3115,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2961,17 +3126,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2990,34 +3165,39 @@ This label turns red, if the priority is smaller than "medium". - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3044,17 +3224,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3075,17 +3255,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3108,17 +3288,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3129,27 +3309,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) No es posible conectar con %s en este sistema (bind ha dado el error %d, %s) Connect through socks proxy - + @@ -3164,7 +3334,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3172,17 +3342,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error al cargar wallet.dat: el monedero está dañado - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Error al cargar wallet.dat @@ -3219,12 +3379,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3242,39 +3402,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Cargando el índice de bloques... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Añadir un nodo al que conectarse y tratar de mantener la conexión abierta - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Cargando monedero... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet No se puede rebajar el monedero Cannot initialize keypool - + @@ -3311,4 +3501,486 @@ If the file does not exist, create it with owner-readable-only file permissions. Si el archivo no existe, créelo con permiso de lectura solamente del propietario. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Monedero + + + + &Overview + &Vista general + + + + Show general overview of wallet + Mostrar vista general del monedero + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transacciones + + + + Browse transaction history + Examinar el historial de transacciones + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Salir + + + + Quit application + Salir de la aplicación + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Acerca de &Qt + + + + Show information about Qt + Mostrar información acerca de Qt + + + + &Options... + &Opciones... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + Mo&strar/ocultar + + + + &Encrypt Wallet... + &Cifrar monedero… + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + Copia de &respaldo del monedero... + + + + Backup wallet to another location + Copia de seguridad del monedero en otra ubicación + + + + &Change Passphrase... + &Cambiar la contraseña… + + + + Change the passphrase used for wallet encryption + Cambiar la contraseña utilizada para el cifrado del monedero + + + + &Unlock Wallet... + + + + + Unlock wallet + Desbloquear cartera + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Firmar &mensaje... + + + + &Verify message... + &Verificar mensaje... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + Ventana de &depuración + + + + Open debugging and diagnostic console + Abrir la consola de depuración y diagnóstico + + + + &File + &Archivo + + + + &Settings + &Configuración + + + + &Help + A&yuda + + + + Tabs toolbar + Barra de pestañas + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sincronizando con la red… + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Actualizado + + + + Catching up... + Actualizando... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transacción enviada + + + + Incoming transaction + Transacción entrante + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Fecha: %1 +Cantidad: %2 +Tipo: %3 +Dirección: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + El monedero está <b>cifrado</b> y actualmente <b>desbloqueado</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + El monedero está <b>cifrado</b> y actualmente <b>bloqueado</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n hora + %n horas + + + + + %n day(s) + + %n día + %n días + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_es_MX.qm b/src/qt/locale/triangles_es_MX.qm similarity index 57% rename from src/qt/locale/bitcoin_es_MX.qm rename to src/qt/locale/triangles_es_MX.qm index 0102f69..f9b5b9b 100644 Binary files a/src/qt/locale/bitcoin_es_MX.qm and b/src/qt/locale/triangles_es_MX.qm differ diff --git a/src/qt/locale/bitcoin_es_MX.ts b/src/qt/locale/triangles_es_MX.ts similarity index 59% rename from src/qt/locale/bitcoin_es_MX.ts rename to src/qt/locale/triangles_es_MX.ts index d4a6322..43dddba 100644 --- a/src/qt/locale/bitcoin_es_MX.ts +++ b/src/qt/locale/triangles_es_MX.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Haga doble clic para editar el domicilio o la etiqueta - + Create a new address Crear una dirección nueva @@ -52,69 +53,69 @@ This product includes software developed by the OpenSSL Project for use in the O Copiar el domicilio seleccionado al portapapeles del sistema - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Borrar Copy &Label - + &Edit - + Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etiqueta @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,428 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - Sincronizando con la red... - - - - &Overview - &Vista previa - - - - Show general overview of wallet - Mostrar la vista previa general de la cartera - - - - &Transactions - &Transacciones - - - - Browse transaction history - Explorar el historial de transacciones - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - S&alir - - - - Quit application - Salir de la aplicación - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - &Opciones - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - Cambiar la contraseña usada para la encriptación de la cartera - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Archivo - - - - &Settings - &Configuraciones - - - - &Help - &Ayuda - - - - Tabs toolbar - Pestañas - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Actualizado al dia - - - - Catching up... - Resiviendo... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Enviar Transacción - - - - Incoming transaction - Transacción entrante - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - La cartera esta <b>encriptada</b> y <b>desbloqueada</b> actualmente - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - La cartera esta <b>encriptada</b> y <b>bloqueada</b> actualmente - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,12 +315,12 @@ Address: %4 Coin Control - + Quantity: - + @@ -765,37 +345,37 @@ Address: %4 Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -805,7 +385,7 @@ Address: %4 Label - + Etiqueta @@ -820,7 +400,7 @@ Address: %4 Confirmations - + @@ -830,7 +410,7 @@ Address: %4 Priority - + @@ -851,7 +431,7 @@ Address: %4 Copy transaction ID - + @@ -881,7 +461,7 @@ Address: %4 Copy low output - + @@ -891,47 +471,47 @@ Address: %4 highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -999,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1009,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nueva dirección de entregas - + New sending address Nueva dirección de entregas - + Edit receiving address Editar dirección de entregas - + Edit sending address Editar dirección de envios - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. El domicilio ingresado "%1" ya existe en la libreta de direcciones - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. No se puede desbloquear la cartera @@ -1056,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Uso: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipo + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiqueta + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (sin etiqueta) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copiar el domicilio seleccionado al portapapeles del sistema + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Borrar + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1106,209 +1032,209 @@ This label turns red, if the priority is smaller than "medium". &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1319,76 +1245,104 @@ This label turns red, if the priority is smaller than "medium". Formulario - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Transacciones recientes</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Monto: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,39 +1561,40 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Mandar monedas Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + @@ -1656,8 +1611,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1667,7 +1622,7 @@ This label turns red, if the priority is smaller than "medium". medium - + @@ -1677,47 +1632,47 @@ This label turns red, if the priority is smaller than "medium". Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Enviar a múltiples receptores a la vez Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1726,8 +1681,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1737,12 +1692,12 @@ This label turns red, if the priority is smaller than "medium". S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1777,7 +1732,7 @@ This label turns red, if the priority is smaller than "medium". Copy low output - + @@ -1787,7 +1742,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1797,17 +1752,17 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + @@ -1817,32 +1772,37 @@ This label turns red, if the priority is smaller than "medium". The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formulario @@ -1874,24 +1834,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Ingrese una etiqueta para esta dirección para agregarlo en su libreta de direcciones. + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiqueta - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1911,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar dirección del portapapeles + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Enviar a múltiples receptores a la vez + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + Confirme la acción de enviar + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulario + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar dirección del portapapeles + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Ingrese una etiqueta para esta dirección para agregarlo en su libreta de direcciones. + + + + &Label: + &Etiqueta + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,29 +2105,29 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1967,76 +2148,80 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2109,17 +2294,20 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + %1/offline - + @@ -2134,12 +2322,15 @@ This label turns red, if the priority is smaller than "medium". Status - + , broadcast through %n node(s) - + + + + @@ -2149,108 +2340,111 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2260,15 +2454,15 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet , no ha sido transmitido aun @@ -2294,7 +2488,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Fecha @@ -2326,32 +2520,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2371,7 +2573,7 @@ This label turns red, if the priority is smaller than "medium". Received from - + @@ -2394,9 +2596,9 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. - + @@ -2455,7 +2657,7 @@ This label turns red, if the priority is smaller than "medium". Range... - + @@ -2510,7 +2712,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2520,12 +2722,12 @@ This label turns red, if the priority is smaller than "medium". Show transaction details - + Export Transaction Data - + @@ -2570,17 +2772,17 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + Range: - + @@ -2589,545 +2791,512 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Uso: - - Send command to -server or buynowcoind - - - - + List commands Lista de comandos Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + Allow JSON-RPC connections from specified IP address - + Send commands to node running on <ip> (default: 127.0.0.1) - + Execute command when the best block changes (%s in cmd is replaced by block hash) - + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + Upgrade wallet to latest format - + Set key pool size to <n> (default: 100) - + Rescan the block chain for missing wallet transactions - + How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + Use OpenSSL (https) for JSON-RPC connections - + Server certificate file (default: server.cert) - + Server private key (default: server.pem) - + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + This help message - + Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) - + Connect through socks proxy - + Allow DNS lookups for -addnode, -seednode and -connect - + @@ -3137,77 +3306,67 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + Error loading wallet.dat: Wallet corrupted - + - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat - + Invalid -proxy address: '%s' - + Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + Invalid amount for -paytxfee=<amount>: '%s' - + Error: could not start node - + Sending... - + Invalid amount - + Insufficient funds - + @@ -3215,49 +3374,84 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Cargando indice de bloques... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Cargando billetera... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + @@ -3267,19 +3461,497 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + &Vista previa + + + + Show general overview of wallet + Mostrar la vista previa general de la cartera + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transacciones + + + + Browse transaction history + Explorar el historial de transacciones + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + S&alir + + + + Quit application + Salir de la aplicación + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + &Opciones + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + Cambiar la contraseña usada para la encriptación de la cartera + + + + &Unlock Wallet... + + + + + Unlock wallet + Desbloquear cartera. + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Archivo + + + + &Settings + &Configuraciones + + + + &Help + &Ayuda + + + + Tabs toolbar + Pestañas + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sincronizando con la red... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Actualizado al dia + + + + Catching up... + Resiviendo... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Enviar Transacción + + + + Incoming transaction + Transacción entrante + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + La cartera esta <b>encriptada</b> y <b>desbloqueada</b> actualmente + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + La cartera esta <b>encriptada</b> y <b>bloqueada</b> actualmente + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + + + + + + + %n day(s) + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_es_UY.qm b/src/qt/locale/triangles_es_UY.qm new file mode 100644 index 0000000..0bea981 Binary files /dev/null and b/src/qt/locale/triangles_es_UY.qm differ diff --git a/src/qt/locale/bitcoin_es_UY.ts b/src/qt/locale/triangles_es_UY.ts similarity index 56% rename from src/qt/locale/bitcoin_es_UY.ts rename to src/qt/locale/triangles_es_UY.ts index 45a468a..3b1ee23 100644 --- a/src/qt/locale/bitcoin_es_UY.ts +++ b/src/qt/locale/triangles_es_UY.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Doble clic para editar etiqueta o dirección - + Create a new address Crear una nueva dirección @@ -52,69 +53,69 @@ This product includes software developed by the OpenSSL Project for use in the O Copia la dirección seleccionada al portapapeles del sistema - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Borrar Copy &Label - + &Edit - + Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etiqueta @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,428 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - Sincronizando con la red... - - - - &Overview - &Vista previa - - - - Show general overview of wallet - Mostrar descripción general del monedero - - - - &Transactions - &transaciones - - - - Browse transaction history - Buscar en el historial de transacciones - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - Salir de la aplicacion - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - &Opciones... - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - Cambie la clave utilizada para el cifrado del monedero - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Archivo - - - - &Settings - &Configuracion - - - - &Help - &Ayuda - - - - Tabs toolbar - Barra de herramientas - - - - Actions toolbar - - - - - - [testnet] - [prueba_de_red] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - A la fecha - - - - Catching up... - Ponerse al dia... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transaccion enviada - - - - Incoming transaction - Transacción entrante - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - El Monedero esta <b>cifrado</b> y actualmente <b>desbloqueado</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - El Monedero esta <b>cifrado</b> y actualmente <b>bloqueado</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,77 +315,77 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + Amount - + Label - + Etiqueta @@ -820,118 +400,118 @@ Address: %4 Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -999,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1009,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nueva dirección de recepción - + New sending address Nueva dirección de envío - + Edit receiving address Editar dirección de recepcion - + Edit sending address Editar dirección de envío - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. La dirección introducida "% 1" ya está en la libreta de direcciones. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. No se puede abrir el monedero. @@ -1056,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiqueta + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (Sin etiqueta) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copia la dirección seleccionada al portapapeles del sistema + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Borrar + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Archivos separados por coma (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1106,209 +1032,209 @@ This label turns red, if the priority is smaller than "medium". &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1319,76 +1245,104 @@ This label turns red, if the priority is smaller than "medium". Formulario - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Transacciones recientes</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,117 +1561,118 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Enviar monedas Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Enviar a varios destinatarios a la vez Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1726,8 +1681,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1737,57 +1692,57 @@ This label turns red, if the priority is smaller than "medium". S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1797,17 +1752,17 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + @@ -1817,32 +1772,37 @@ This label turns red, if the priority is smaller than "medium". The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formulario @@ -1874,24 +1834,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Introduzca una etiqueta para esta dirección para añadirla a su libreta de direcciones + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiqueta: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1911,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar la dirección desde el portapapeles + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Enviar a varios destinatarios a la vez + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + Confirmar el envío + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulario + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar la dirección desde el portapapeles + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Introduzca una etiqueta para esta dirección para añadirla a su libreta de direcciones + + + + &Label: + &Etiqueta: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,29 +2105,29 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1967,76 +2148,80 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2109,37 +2294,43 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + %1/offline - + %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + + @@ -2149,128 +2340,131 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + Amount - + true - + false - + - + , has not been successfully broadcast yet - + @@ -2283,25 +2477,25 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date Fecha Type - + @@ -2311,7 +2505,7 @@ This label turns red, if the priority is smaller than "medium". Amount - + @@ -2321,102 +2515,110 @@ This label turns red, if the priority is smaller than "medium". Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + Received with - + Received from - + Sent to - + Payment to yourself - + Mined - + (n/a) - + - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2425,107 +2627,107 @@ This label turns red, if the priority is smaller than "medium". All - + Today - + This week - + This month - + Last month - + This year - + Range... - + Received with - + Sent to - + To yourself - + Mined - + Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + @@ -2535,7 +2737,7 @@ This label turns red, if the priority is smaller than "medium". Confirmed - + @@ -2545,7 +2747,7 @@ This label turns red, if the priority is smaller than "medium". Type - + @@ -2560,726 +2762,1196 @@ This label turns red, if the priority is smaller than "medium". Amount - + ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com - + - - Find peers using internet relay chat (default: 0) - + + Specify configuration file (default: triangles.conf) + - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + &Vista previa + + + + Show general overview of wallet + Mostrar descripción general del monedero + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &transaciones + + + + Browse transaction history + Buscar en el historial de transacciones + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + Salir de la aplicacion + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + &Opciones... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + Cambie la clave utilizada para el cifrado del monedero + + + + &Unlock Wallet... + + + + + Unlock wallet + Monedero destrabado + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Archivo + + + + &Settings + &Configuracion + + + + &Help + &Ayuda + + + + Tabs toolbar + Barra de herramientas + + + + Actions toolbar + + + + + + [testnet] + [prueba_de_red] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sincronizando con la red... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + A la fecha + + + + Catching up... + Ponerse al dia... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transaccion enviada + + + + Incoming transaction + Transacción entrante + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + El Monedero esta <b>cifrado</b> y actualmente <b>desbloqueado</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + El Monedero esta <b>cifrado</b> y actualmente <b>bloqueado</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + + + + + + + %n day(s) + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_et.qm b/src/qt/locale/triangles_et.qm similarity index 50% rename from src/qt/locale/bitcoin_et.qm rename to src/qt/locale/triangles_et.qm index 19609e4..b2ece78 100644 Binary files a/src/qt/locale/bitcoin_et.qm and b/src/qt/locale/triangles_et.qm differ diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/triangles_et.ts similarity index 66% rename from src/qt/locale/bitcoin_et.ts rename to src/qt/locale/triangles_et.ts index 08398d6..0cbe191 100644 --- a/src/qt/locale/bitcoin_et.ts +++ b/src/qt/locale/triangles_et.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS Address Book - + - + Double-click to edit address or label Topeltklõps aadressi või märgise muutmiseks - + Create a new address Loo uus aadress @@ -57,52 +58,52 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS Kopeeri märgistatud aadress vahemällu - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Aadressi kopeerimine Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Kustuta märgistatud aadress loetelust - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Kinnita Sõnum - + + These are your Triangles 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. + + + + &Delete &Kustuta @@ -119,7 +120,7 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS Export Address Book Data - + @@ -129,18 +130,18 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Silt @@ -180,12 +181,12 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,430 +307,6 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS Rahakoti salafraasi muutmine õnnestus. - - BitcoinGUI - - - Sign &message... - Signeeri &sõnum - - - - Synchronizing with network... - Võrgusünkimine... - - - - &Overview - &Ülevaade - - - - Show general overview of wallet - Kuva rahakoti üld-ülevaade - - - - &Transactions - &Tehingud - - - - Browse transaction history - Sirvi tehingute ajalugu - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - V&älju - - - - Quit application - Väljumine - - - - Show information about buynowcoin - - - - - About &Qt - Teave &Qt kohta - - - - Show information about Qt - Kuva Qt kohta käiv info - - - - &Options... - &Valikud... - - - - &Encrypt Wallet... - &Krüpteeri Rahakott - - - - &Backup Wallet... - &Varunda Rahakott - - - - &Change Passphrase... - &Salafraasi muutmine - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Varunda rahakott teise asukohta - - - - Change the passphrase used for wallet encryption - Rahakoti krüpteerimise salafraasi muutmine - - - - &Debug window - &Debugimise aken - - - - Open debugging and diagnostic console - Ava debugimise ja diagnostika konsool - - - - &Verify message... - &Kontrolli sõnumit... - - - - buynowcoin - - - - - Wallet - Rahakott - - - - &About buynowcoin - - - - - &Show / Hide - &Näita / Peida - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Fail - - - - &Settings - &Seaded - - - - &Help - &Abi - - - - Tabs toolbar - Vahelehe tööriistariba - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Ajakohane - - - - Catching up... - Jõuan... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Saadetud tehing - - - - Incoming transaction - Sisenev tehing - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Kuupäev: %1⏎ -Summa: %2⏎ -Tüüp: %3⏎ -Aadress: %4⏎ - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Rahakott on <b>krüpteeritud</b> ning hetkel <b>avatud</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Rahakott on <b>krüpteeritud</b> ning hetkel <b>suletud</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n tund%n tundi - - - - %n day(s) - %n päev%n päeva - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -743,17 +320,17 @@ Aadress: %4⏎ Coin Control - + Quantity: - + Bytes: - + @@ -763,47 +340,47 @@ Aadress: %4⏎ Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -813,7 +390,7 @@ Aadress: %4⏎ Label - + Silt @@ -828,7 +405,7 @@ Aadress: %4⏎ Confirmations - + @@ -838,7 +415,7 @@ Aadress: %4⏎ Priority - + @@ -864,82 +441,82 @@ Aadress: %4⏎ Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -948,7 +525,7 @@ Aadress: %4⏎ This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -957,7 +534,7 @@ Aadress: %4⏎ This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -966,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -984,12 +561,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1007,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1017,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Uus sissetulev aadress - + New sending address Uus väljaminev aadress - + Edit receiving address Sissetulevate aadresside muutmine - + Edit sending address Väljaminevate aadresside muutmine - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Selline aadress on juba olemas: "%1" - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Rahakotti ei avatud @@ -1064,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Kasutus: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tüüp + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Silt + + + + To Address + + + + + From Address + + + + + Message + Sõnum + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (silti pole) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopeeri märgistatud aadress vahemällu + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Kustuta märgistatud aadress loetelust + + + + &Delete + &Kustuta + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Komaeraldatud fail (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1119,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1129,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1163,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1173,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1189,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1248,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1263,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1274,12 +1197,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1294,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1305,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1327,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". Vorm - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1350,12 +1273,12 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + @@ -1368,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". Mitte aegunud mine'itud jääk - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Uuesti saadetud tehingud</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1404,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Summa: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1511,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1541,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1565,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1580,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Puhasta konsool - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1615,44 +1566,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Müntide saatmine Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1664,51 +1616,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Saatmine mitmele korraga @@ -1720,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1734,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1748,14 +1700,14 @@ This label turns red, if the priority is smaller than "medium". S&aada - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1765,37 +1717,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1805,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1840,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1860,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1868,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Vorm @@ -1882,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Aadressiraamatusse sisestamiseks märgista aadress + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Märgis - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1919,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Kleebi aadress vahemälust + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Saatmine mitmele korraga + + + + Add &Recipient + Lisa &Saaja + + + + Remove all transaction fields + + + + + Clear &All + Puhasta &Kõik + + + + Confirm the send action + Saatmise kinnitamine + + + + S&end + S&aada + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Saaja aadress ei ole kehtiv, palun kontrolli. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Ühe saatmisega topelt-adressaati olla ei tohi. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Vorm + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Kleebi aadress vahemälust + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Aadressiraamatusse sisestamiseks märgista aadress + + + + &Label: + &Märgis + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1947,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1984,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Tühjenda kõik sõnumi allkirjastamise väljad @@ -2011,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Tühjenda kõik sõnumi kinnitamise väljad - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Signatuuri genereerimiseks vajuta "Allkirjasta Sõnum" + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2117,12 +2299,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2147,7 +2332,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , levita läbi %n node'i, levita läbi %n node'i + + , levita läbi %n node'i + , levita läbi %n node'i + @@ -2193,14 +2381,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Krediit - + matures in %n more block(s) - aegub %n bloki pärastaegub %n bloki pärast + + aegub %n bloki pärast + aegub %n bloki pärast + @@ -2211,12 +2402,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Deebet - + Transaction fee Tehingu tasu @@ -2236,14 +2427,14 @@ This label turns red, if the priority is smaller than "medium". Kommentaar - + Transaction ID Tehingu ID - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2276,7 +2467,7 @@ This label turns red, if the priority is smaller than "medium". vale - + , has not been successfully broadcast yet , veel esitlemata @@ -2302,7 +2493,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Kuupäev @@ -2334,32 +2525,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Avaneb %n bloki pärastAvaneb %n bloki pärast + + Avaneb %n bloki pärast + Avaneb %n bloki pärast + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2402,7 +2601,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Tehingu staatus. Kinnituste arvu kuvamiseks liigu hiire noolega selle peale. @@ -2533,7 +2732,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2578,12 +2777,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2597,32 +2796,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Kasutus: - - Send command to -server or buynowcoind - - - - + List commands Käskluste loetelu @@ -2637,19 +2818,9 @@ This label turns red, if the priority is smaller than "medium". Valikud: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2664,12 +2835,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2689,12 +2860,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2714,22 +2885,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2739,22 +2910,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2779,12 +2950,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2792,12 +2963,7 @@ This label turns red, if the priority is smaller than "medium". Hoiatus: -paytxfee on seatud väga kõrgeks! See on sinu poolt makstav tehingu lisatasu. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Hoiatus: ilmnes tõrge wallet.dat faili lugemisel! Võtmed on terved, kuid tehingu andmed või aadressiraamatu kirjed võivad olla kadunud või vigased. @@ -2834,22 +3000,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2869,27 +3035,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL valikud: (vaata Bitcoini Wikist või SSL sätete juhendist) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL valikud: (vaata Trianglesi Wikist või SSL sätete juhendist) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2899,12 +3065,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2925,7 +3091,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2940,7 +3106,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2950,17 +3116,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2978,34 +3154,39 @@ This label turns red, if the priority is smaller than "medium". JSON-RPC ühenduste salasõna - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3030,17 +3211,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3060,17 +3241,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3090,17 +3271,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3110,27 +3291,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Selle arvutiga ei ole võimalik siduda %s külge (katse nurjus %d, %s tõttu) Connect through socks proxy - + @@ -3145,7 +3316,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3153,17 +3324,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Viga wallet.dat käivitamisel. Vigane rahakkott - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Viga wallet.dat käivitamisel @@ -3200,12 +3361,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3223,39 +3384,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Klotside indeksi laadimine... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Lisa node ning hoia ühendus avatud - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Rahakoti laadimine... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Rahakoti vanandamine ebaõnnestus Cannot initialize keypool - + @@ -3292,4 +3483,485 @@ If the file does not exist, create it with owner-readable-only file permissions. Kui seda faili ei ole, loo see ainult-omanikule-lugemiseks faili õigustes. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Rahakott + + + + &Overview + &Ülevaade + + + + Show general overview of wallet + Kuva rahakoti üld-ülevaade + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Tehingud + + + + Browse transaction history + Sirvi tehingute ajalugu + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + V&älju + + + + Quit application + Väljumine + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Teave &Qt kohta + + + + Show information about Qt + Kuva Qt kohta käiv info + + + + &Options... + &Valikud... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Näita / Peida + + + + &Encrypt Wallet... + &Krüpteeri Rahakott + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Varunda Rahakott + + + + Backup wallet to another location + Varunda rahakott teise asukohta + + + + &Change Passphrase... + &Salafraasi muutmine + + + + Change the passphrase used for wallet encryption + Rahakoti krüpteerimise salafraasi muutmine + + + + &Unlock Wallet... + + + + + Unlock wallet + Tee rahakott lukust lahti. + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Signeeri &sõnum + + + + &Verify message... + &Kontrolli sõnumit... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + &Debugimise aken + + + + Open debugging and diagnostic console + Ava debugimise ja diagnostika konsool + + + + &File + &Fail + + + + &Settings + &Seaded + + + + &Help + &Abi + + + + Tabs toolbar + Vahelehe tööriistariba + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Võrgusünkimine... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Ajakohane + + + + Catching up... + Jõuan... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Saadetud tehing + + + + Incoming transaction + Sisenev tehing + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Kuupäev: %1⏎ +Summa: %2⏎ +Tüüp: %3⏎ +Aadress: %4⏎ + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Rahakott on <b>krüpteeritud</b> ning hetkel <b>avatud</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Rahakott on <b>krüpteeritud</b> ning hetkel <b>suletud</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n tund + %n tundi + + + + + %n day(s) + + %n päev + %n päeva + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_eu_ES.qm b/src/qt/locale/triangles_eu_ES.qm similarity index 53% rename from src/qt/locale/bitcoin_eu_ES.qm rename to src/qt/locale/triangles_eu_ES.qm index e265b8c..e5f3639 100644 Binary files a/src/qt/locale/bitcoin_eu_ES.qm and b/src/qt/locale/triangles_eu_ES.qm differ diff --git a/src/qt/locale/bitcoin_eu_ES.ts b/src/qt/locale/triangles_eu_ES.ts similarity index 58% rename from src/qt/locale/bitcoin_eu_ES.ts rename to src/qt/locale/triangles_eu_ES.ts index b581a1b..2190d35 100644 --- a/src/qt/locale/bitcoin_eu_ES.ts +++ b/src/qt/locale/triangles_eu_ES.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Klik bikoitza helbidea edo etiketa editatzeko - + Create a new address Sortu helbide berria @@ -52,69 +53,69 @@ This product includes software developed by the OpenSSL Project for use in the O Kopiatu hautatutako helbidea sistemaren arbelera - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Ezabatu Copy &Label - + &Edit - + Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etiketa @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,428 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - Sarearekin sinkronizatzen... - - - - &Overview - &Gainbegiratu - - - - Show general overview of wallet - Ikusi zorroaren begirada orokorra - - - - &Transactions - &Transakzioak - - - - Browse transaction history - Ikusi transakzioen historia - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - Irten - - - - Quit application - Irten aplikaziotik - - - - Show information about buynowcoin - - - - - About &Qt - &Qt-ari buruz - - - - Show information about Qt - Erakutsi Bitcoin-i buruzko informazioa - - - - &Options... - &Aukerak... - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - Aldatu zorroa enkriptatzeko erabilitako pasahitza - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Artxiboa - - - - &Settings - &Ezarpenak - - - - &Help - &Laguntza - - - - Tabs toolbar - Fitxen tresna-barra - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Egunean - - - - Catching up... - Eguneratzen... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Bidalitako transakzioa - - - - Incoming transaction - Sarrerako transakzioa - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Zorroa <b>enkriptatuta</b> eta <b>desblokeatuta</b> dago une honetan - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Zorroa <b>enkriptatuta</b> eta <b>blokeatuta</b> dago une honetan - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,17 +315,17 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + @@ -755,47 +335,47 @@ Address: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -805,7 +385,7 @@ Address: %4 Label - + Etiketa @@ -820,17 +400,17 @@ Address: %4 Confirmations - + Confirmed - + Priority - + @@ -846,92 +426,92 @@ Address: %4 Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -999,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1009,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Jasotzeko helbide berria - + New sending address Bidaltzeko helbide berria - + Edit receiving address Editatu jasotzeko helbidea - + Edit sending address Editatu bidaltzeko helbidea - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Sartu berri den helbidea, "%1", helbide-liburuan dago jadanik. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Ezin desblokeatu zorroa. @@ -1056,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Mota + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiketa + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (etiketarik ez) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopiatu hautatutako helbidea sistemaren arbelera + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Ezabatu + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Komaz bereizitako artxiboa (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1106,209 +1032,209 @@ This label turns red, if the priority is smaller than "medium". &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1319,76 +1245,104 @@ This label turns red, if the priority is smaller than "medium". Inprimakia - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Azken transakzioak</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Kopurua Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,44 +1561,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Bidali txanponak Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1656,68 +1611,68 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Bidali hainbat jasotzaileri batera Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1726,8 +1681,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1737,57 +1692,57 @@ This label turns red, if the priority is smaller than "medium". S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1797,17 +1752,17 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + @@ -1817,32 +1772,37 @@ This label turns red, if the priority is smaller than "medium". The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Inprimakia @@ -1874,24 +1834,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Sartu etiketa bat helbide honetarako, eta gehitu zure helbide-liburuan + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiketa: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1911,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Itsatsi helbidea arbeletik + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Bidali hainbat jasotzaileri batera + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + Berretsi bidaltzeko ekintza + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Inprimakia + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Itsatsi helbidea arbeletik + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Sartu etiketa bat helbide honetarako, eta gehitu zure helbide-liburuan + + + + &Label: + &Etiketa: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,29 +2105,29 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1967,76 +2148,80 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2109,17 +2294,20 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + %1/offline - + @@ -2134,12 +2322,15 @@ This label turns red, if the priority is smaller than "medium". Status - + , broadcast through %n node(s) - + + + + @@ -2149,108 +2340,111 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2260,15 +2454,15 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet , ez da arrakastaz emititu oraindik @@ -2294,7 +2488,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Data @@ -2326,32 +2520,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2371,7 +2573,7 @@ This label turns red, if the priority is smaller than "medium". Received from - + @@ -2394,7 +2596,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Transakzioaren egoera. Pasatu sagua gainetik konfirmazio kopurua ikusteko. @@ -2505,27 +2707,27 @@ This label turns red, if the priority is smaller than "medium". Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + @@ -2535,7 +2737,7 @@ This label turns red, if the priority is smaller than "medium". Confirmed - + @@ -2565,56 +2767,38 @@ This label turns red, if the priority is smaller than "medium". ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands Komandoen lista @@ -2629,470 +2813,465 @@ This label turns red, if the priority is smaller than "medium". Aukerak - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + Allow JSON-RPC connections from specified IP address - + Send commands to node running on <ip> (default: 127.0.0.1) - + Execute command when the best block changes (%s in cmd is replaced by block hash) - + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + Upgrade wallet to latest format - + Set key pool size to <n> (default: 100) - + Rescan the block chain for missing wallet transactions - + How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + Use OpenSSL (https) for JSON-RPC connections - + Server certificate file (default: server.cert) - + Server private key (default: server.pem) - + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3102,157 +3281,172 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) - + Connect through socks proxy - + Allow DNS lookups for -addnode, -seednode and -connect - + Loading addresses... - + Error loading blkindex.dat - + Error loading wallet.dat: Wallet corrupted - + - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat - + Invalid -proxy address: '%s' - + Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + Invalid amount for -paytxfee=<amount>: '%s' - + Error: could not start node - + Sending... - + Invalid amount - + Insufficient funds - + Loading block index... - + - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + @@ -3267,19 +3461,497 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + &Gainbegiratu + + + + Show general overview of wallet + Ikusi zorroaren begirada orokorra + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transakzioak + + + + Browse transaction history + Ikusi transakzioen historia + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + Irten + + + + Quit application + Irten aplikaziotik + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + &Qt-ari buruz + + + + Show information about Qt + Erakutsi Triangles-i buruzko informazioa + + + + &Options... + &Aukerak... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + Aldatu zorroa enkriptatzeko erabilitako pasahitza + + + + &Unlock Wallet... + + + + + Unlock wallet + Desblokeatu zorroa + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Artxiboa + + + + &Settings + &Ezarpenak + + + + &Help + &Laguntza + + + + Tabs toolbar + Fitxen tresna-barra + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sarearekin sinkronizatzen... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Egunean + + + + Catching up... + Eguneratzen... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Bidalitako transakzioa + + + + Incoming transaction + Sarrerako transakzioa + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Zorroa <b>enkriptatuta</b> eta <b>desblokeatuta</b> dago une honetan + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Zorroa <b>enkriptatuta</b> eta <b>blokeatuta</b> dago une honetan + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + + + + + + + %n day(s) + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_fa.qm b/src/qt/locale/triangles_fa.qm similarity index 50% rename from src/qt/locale/bitcoin_fa.qm rename to src/qt/locale/triangles_fa.qm index 7a58a7f..d8bb560 100644 Binary files a/src/qt/locale/bitcoin_fa.qm and b/src/qt/locale/triangles_fa.qm differ diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/triangles_fa.ts similarity index 67% rename from src/qt/locale/bitcoin_fa.ts rename to src/qt/locale/triangles_fa.ts index 4c66eb9..97ec8ab 100644 --- a/src/qt/locale/bitcoin_fa.ts +++ b/src/qt/locale/triangles_fa.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label برای ویرایش نشانی یا برچسب دوبار کلیک کنید - + Create a new address ایجاد نشانی جدید @@ -52,52 +53,52 @@ This product includes software developed by the OpenSSL Project for use in the O نشانی انتخاب شده را در حافظهٔ سیستم کپی کن! - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &کپی نشانی Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list حذف نشانی انتخاب‌شده از لیست - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &شناسایی پیام - + + These are your Triangles 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. + + + + &Delete &حذف @@ -114,7 +115,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label برچسب @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,7 +231,7 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -301,431 +302,6 @@ This product includes software developed by the OpenSSL Project for use in the O گذرواژهٔ کیف پول با موفقیت عوض شد. - - BitcoinGUI - - - Sign &message... - &امضای پیام... - - - - Synchronizing with network... - همگام‌سازی با شبکه... - - - - &Overview - &بررسی اجمالی - - - - Show general overview of wallet - نمایش بررسی اجمالی کیف پول - - - - &Transactions - &تراکنش‌ها - - - - Browse transaction history - مرور تاریخچهٔ تراکنش‌ها - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &خروج - - - - Quit application - خروج از برنامه - - - - Show information about buynowcoin - - - - - About &Qt - دربارهٔ &کیوت - - - - Show information about Qt - نمایش اطلاعات دربارهٔ کیوت - - - - &Options... - &تنظیمات... - - - - &Encrypt Wallet... - &رمزنگاری کیف پول... - - - - &Backup Wallet... - &پیشتیبان‌گیری از کیف پول... - - - - &Change Passphrase... - &تغییر گذرواژه... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - تهیهٔ پشتیبان از کیف پول در یک مکان دیگر - - - - Change the passphrase used for wallet encryption - تغییر گذرواژهٔ مورد استفاده در رمزنگاری کیف پول - - - - &Debug window - پنجرهٔ ا&شکال‌زدایی - - - - Open debugging and diagnostic console - باز کردن کنسول خطایابی و اشکال‌زدایی - - - - &Verify message... - با&زبینی پیام... - - - - buynowcoin - - - - - Wallet - کیف پول - - - - &About buynowcoin - - - - - &Show / Hide - &نمایش/ عدم نمایش - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &پرونده - - - - &Settings - &تنظیمات - - - - &Help - &کمک‌رسانی - - - - Tabs toolbar - نوارابزار برگه‌ها - - - - Actions toolbar - - - - - - [testnet] - [شبکهٔ آزمایش] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - وضعیت به‌روز - - - - Catching up... - به‌روز رسانی... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - تراکنش ارسال شد - - - - Incoming transaction - تراکنش دریافت شد - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - تاریخ: %1 -مبلغ: %2 -نوع: %3 -نشانی: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - کیف پول <b>رمزنگاری شده</b> است و هم‌اکنون <b>باز</b> است - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - کیف پول <b>رمزنگاری شده</b> است و هم‌اکنون <b>قفل</b> است - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n ساعت - - - - %n day(s) - %n روز - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -739,17 +315,17 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + @@ -759,47 +335,47 @@ Address: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -809,7 +385,7 @@ Address: %4 Label - + برچسب @@ -824,7 +400,7 @@ Address: %4 Confirmations - + @@ -834,7 +410,7 @@ Address: %4 Priority - + @@ -860,82 +436,82 @@ Address: %4 Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -944,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -953,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -962,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -980,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1003,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1013,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address نشانی دریافتی جدید - + New sending address نشانی ارسالی جدید - + Edit receiving address ویرایش نشانی دریافتی - + Edit sending address ویرایش نشانی ارسالی - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. نشانی وارد شده «%1» در حال حاضر در دفترچه وجود دارد. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. نمی‌توان کیف پول را رمزگشایی کرد. @@ -1060,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + استفاده: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + نوع + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + برچسب + + + + To Address + + + + + From Address + + + + + Message + پیام + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (بدون برچسب) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + نشانی انتخاب شده را در حافظهٔ سیستم کپی کن! + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + حذف نشانی انتخاب‌شده از لیست + + + + &Delete + &حذف + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + پروندهٔ نوع CSV جداشونده با کاما (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1115,7 +1037,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1125,32 +1047,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1159,8 +1081,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1169,13 +1091,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1185,7 +1107,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1244,8 +1166,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1259,8 +1181,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1270,12 +1192,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1290,7 +1212,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1301,13 +1223,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1323,20 +1245,20 @@ This label turns red, if the priority is smaller than "medium". فرم - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1346,7 +1268,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1364,29 +1286,57 @@ This label turns red, if the priority is smaller than "medium". تراز استخراج شده از معدن که هنوز بالغ نشده است - + Total: جمع کل: - + Your current total balance تراز کل فعلی شما - + <b>Recent transactions</b> <b>تراکنش‌های اخیر</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1400,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + مبلغ: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1507,7 +1457,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1537,17 +1487,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1561,13 +1506,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1576,18 +1521,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console پاکسازی کنسول - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1611,44 +1561,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins ارسال سکه Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1660,51 +1611,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once ارسال به چند دریافت‌کنندهٔ به‌طور همزمان @@ -1716,7 +1667,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1730,8 +1681,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1744,14 +1695,14 @@ This label turns red, if the priority is smaller than "medium". &ارسال - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1761,37 +1712,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1801,12 +1752,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1836,17 +1787,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1856,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1864,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". Form - + فرم @@ -1878,24 +1834,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book برای این نشانی یک برچسب وارد کنید تا در دفترچهٔ آدرس ذخیره شود + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &برچسب: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1915,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + چسباندن نشانی از حافظهٔ سیستم + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + ارسال به چند دریافت‌کنندهٔ به‌طور همزمان + + + + Add &Recipient + &دریافت‌کنندهٔ جدید + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + عملیات ارسال را تأیید کنید + + + + S&end + &ارسال + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + نشانی گیرنده معتبر نیست؛ لطفا دوباره بررسی کنید. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + یک نشانی تکراری پیدا شد. در هر عملیات ارسال، به هر نشانی فقط مبلغ می‌توان ارسال کرد. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + فرم + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + چسباندن نشانی از حافظهٔ سیستم + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + برای این نشانی یک برچسب وارد کنید تا در دفترچهٔ آدرس ذخیره شود + + + + &Label: + &برچسب: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1943,14 +2120,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1980,11 +2157,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields بازنشانی تمام فیلدهای پیام @@ -2007,34 +2189,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields بازنشانی تمام فیلدهای پیام - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature برای ایجاد یک امضای جدید روی «امضای پیام» کلیک کنید + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2113,12 +2294,14 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + conflicted - + @@ -2143,7 +2326,9 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - ، پخش از طریق %n گره + + ، پخش از طریق %n گره + @@ -2189,14 +2374,16 @@ This label turns red, if the priority is smaller than "medium". - + Credit بدهی - + matures in %n more block(s) - بلوغ در %n بلوک دیگر + + بلوغ در %n بلوک دیگر + @@ -2207,12 +2394,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit اعتبار - + Transaction fee هزینهٔ تراکنش @@ -2232,14 +2419,14 @@ This label turns red, if the priority is smaller than "medium". نظر - + Transaction ID شناسهٔ تراکنش - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2272,7 +2459,7 @@ This label turns red, if the priority is smaller than "medium". نادرست - + , has not been successfully broadcast yet ، هنوز با موفقیت ارسال نشده @@ -2298,7 +2485,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date تاریخ @@ -2330,32 +2517,39 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - باز برای %n بلوک دیگر + + باز برای %n بلوک دیگر + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2398,7 +2592,7 @@ This label turns red, if the priority is smaller than "medium". (ناموجود) - + Transaction status. Hover over this field to show number of confirmations. وضعیت تراکنش. نشانگر را روی این فیلد نگه دارید تا تعداد تأییدیه‌ها نشان داده شود. @@ -2529,7 +2723,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2574,12 +2768,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2593,32 +2787,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: استفاده: - - Send command to -server or buynowcoind - - - - + List commands نمایش لیست فرمان‌ها @@ -2633,19 +2809,9 @@ This label turns red, if the priority is smaller than "medium". گزینه‌ها: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2660,12 +2826,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2685,12 +2851,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2710,22 +2876,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2735,22 +2901,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2770,17 +2936,17 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2788,24 +2954,19 @@ This label turns red, if the priority is smaller than "medium". هشدار: مبلغ paytxfee بسیار بالایی تنظیم شده است! این مبلغ هزینه‌ای است که شما برای تراکنش‌ها پرداخت می‌کنید. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + @@ -2830,22 +2991,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2865,27 +3026,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - گزینه ssl (به ویکیbitcoin برای راهنمای راه اندازی ssl مراجعه شود) + SSL options: (see the Triangles Wiki for SSL setup instructions) + گزینه ssl (به ویکیtriangles برای راهنمای راه اندازی ssl مراجعه شود) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2895,12 +3056,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2921,7 +3082,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2936,7 +3097,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2946,17 +3107,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2966,7 +3137,7 @@ This label turns red, if the priority is smaller than "medium". wallet.dat corrupt, salvage failed - + @@ -2974,34 +3145,39 @@ This label turns red, if the priority is smaller than "medium". JSON-RPC عبارت عبور برای ارتباطات - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3026,17 +3202,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3056,17 +3232,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3086,17 +3262,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3106,27 +3282,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) امکان اتصال به %s از این رایانه وجود ندارد ( bind returned error %d, %s) Connect through socks proxy - + @@ -3141,7 +3307,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3149,17 +3315,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f خطا در بارگیری wallet.dat: کیف پول خراب شده است - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat خطا در بارگیری wallet.dat @@ -3196,12 +3352,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3219,39 +3375,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f بار گیری شاخص بلوک - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open به اتصال یک گره اضافه کنید و اتصال را باز نگاه دارید - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... بار گیری والت - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet امکان تنزل نسخه در wallet وجود ندارد Cannot initialize keypool - + @@ -3287,4 +3473,476 @@ If the file does not exist, create it with owner-readable-only file permissions. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + کیف پول + + + + &Overview + &بررسی اجمالی + + + + Show general overview of wallet + نمایش بررسی اجمالی کیف پول + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &تراکنش‌ها + + + + Browse transaction history + مرور تاریخچهٔ تراکنش‌ها + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &خروج + + + + Quit application + خروج از برنامه + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + دربارهٔ &کیوت + + + + Show information about Qt + نمایش اطلاعات دربارهٔ کیوت + + + + &Options... + &تنظیمات... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &نمایش/ عدم نمایش + + + + &Encrypt Wallet... + &رمزنگاری کیف پول... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &پیشتیبان‌گیری از کیف پول... + + + + Backup wallet to another location + تهیهٔ پشتیبان از کیف پول در یک مکان دیگر + + + + &Change Passphrase... + &تغییر گذرواژه... + + + + Change the passphrase used for wallet encryption + تغییر گذرواژهٔ مورد استفاده در رمزنگاری کیف پول + + + + &Unlock Wallet... + + + + + Unlock wallet + باز کردن قفل کیف پول + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + &امضای پیام... + + + + &Verify message... + با&زبینی پیام... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + پنجرهٔ ا&شکال‌زدایی + + + + Open debugging and diagnostic console + باز کردن کنسول خطایابی و اشکال‌زدایی + + + + &File + &پرونده + + + + &Settings + &تنظیمات + + + + &Help + &کمک‌رسانی + + + + Tabs toolbar + نوارابزار برگه‌ها + + + + Actions toolbar + + + + + + [testnet] + [شبکهٔ آزمایش] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + همگام‌سازی با شبکه... + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + وضعیت به‌روز + + + + Catching up... + به‌روز رسانی... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + تراکنش ارسال شد + + + + Incoming transaction + تراکنش دریافت شد + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + تاریخ: %1 +مبلغ: %2 +نوع: %3 +نشانی: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + کیف پول <b>رمزنگاری شده</b> است و هم‌اکنون <b>باز</b> است + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + کیف پول <b>رمزنگاری شده</b> است و هم‌اکنون <b>قفل</b> است + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + %n ساعت + + + + + %n day(s) + + %n روز + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_fa_IR.qm b/src/qt/locale/triangles_fa_IR.qm new file mode 100644 index 0000000..7dee5e9 Binary files /dev/null and b/src/qt/locale/triangles_fa_IR.qm differ diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/triangles_fa_IR.ts similarity index 62% rename from src/qt/locale/bitcoin_fa_IR.ts rename to src/qt/locale/triangles_fa_IR.ts index 5accc38..d600098 100644 --- a/src/qt/locale/bitcoin_fa_IR.ts +++ b/src/qt/locale/triangles_fa_IR.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label برای ویرایش حساب و یا برچسب دوبار کلیک نمایید - + Create a new address گشایش حسابی جدید @@ -52,52 +53,52 @@ This product includes software developed by the OpenSSL Project for use in the O کپی کردن حساب انتخاب شده به حافظه سیستم - کلیپ بورد - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address و کپی آدرس Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete و حذف @@ -114,7 +115,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label برچسب @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,429 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - امضا و پیام - - - - Synchronizing with network... - به روز رسانی با شبکه... - - - - &Overview - و بازبینی - - - - Show general overview of wallet - نمای کلی از wallet را نشان بده - - - - &Transactions - و تراکنش - - - - Browse transaction history - تاریخچه تراکنش را باز کن - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - خروج - - - - Quit application - از "درخواست نامه"/ application خارج شو - - - - Show information about buynowcoin - - - - - About &Qt - درباره و QT - - - - Show information about Qt - نمایش اطلاعات درباره QT - - - - &Options... - و انتخابها - - - - &Encrypt Wallet... - و رمزگذاری wallet - - - - &Backup Wallet... - و گرفتن نسخه پیشتیبان از wallet - - - - &Change Passphrase... - تغییر رمز/پَس فرِیز - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - گرفتن نسخه پیشتیبان در آدرسی دیگر - - - - Change the passphrase used for wallet encryption - رمز مربوط به رمزگذاریِ wallet را تغییر دهید - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - کیف پول - - - - &About buynowcoin - - - - - &Show / Hide - &نمایش/ عدم نمایش و - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - و فایل - - - - &Settings - و تنظیمات - - - - &Help - و راهنما - - - - Tabs toolbar - نوار ابزار - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - روزآمد - - - - Catching up... - در حال روزآمد سازی.. - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - ارسال تراکنش - - - - Incoming transaction - تراکنش دریافتی - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - تاریخ: %1⏎ میزان وجه : %2⏎ نوع: %3⏎ آدرس: %4⏎ - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - wallet رمزگذاری شد و در حال حاضر از حالت قفل در آمده است - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - wallet رمزگذاری شد و در حال حاضر قفل است - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -736,17 +315,17 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + @@ -756,47 +335,47 @@ Address: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -806,7 +385,7 @@ Address: %4 Label - + برچسب @@ -821,7 +400,7 @@ Address: %4 Confirmations - + @@ -831,7 +410,7 @@ Address: %4 Priority - + @@ -852,87 +431,87 @@ Address: %4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -941,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -950,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -959,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -977,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1000,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1010,41 +589,46 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address حساب دریافت کننده جدید - + New sending address حساب ارسال کننده جدید - + Edit receiving address ویرایش حساب دریافت کننده - + Edit sending address ویرایش حساب ارسال کننده - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. حساب وارد شده «1%» از پیش در دفترچه حساب ها موجود است. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. عدم توانیی برای قفل گشایی wallet @@ -1058,44 +642,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + میزان استفاده: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + برچسب + + + + To Address + + + + + From Address + + + + + Message + پیام + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (برچسب ندارد) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + کپی کردن حساب انتخاب شده به حافظه سیستم - کلیپ بورد + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + و حذف + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1108,157 +1033,157 @@ This label turns red, if the priority is smaller than "medium". &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1268,12 +1193,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1288,7 +1213,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1299,18 +1224,18 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1321,20 +1246,20 @@ This label turns red, if the priority is smaller than "medium". فرم - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1344,47 +1269,75 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> تراکنشهای اخیر - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1398,57 +1351,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + میزان وجه: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1470,7 +1423,7 @@ This label turns red, if the priority is smaller than "medium". N/A - + @@ -1480,17 +1433,17 @@ This label turns red, if the priority is smaller than "medium". &Information - + Using OpenSSL version - + Startup time - + @@ -1505,7 +1458,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1520,82 +1473,82 @@ This label turns red, if the priority is smaller than "medium". Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1609,44 +1562,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins سکه های ارسالی Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1658,68 +1612,68 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once ارسال همزمان به گیرنده های متعدد Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1728,8 +1682,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1742,14 +1696,14 @@ This label turns red, if the priority is smaller than "medium". و ارسال - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1759,37 +1713,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1799,17 +1753,17 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + @@ -1824,27 +1778,32 @@ This label turns red, if the priority is smaller than "medium". The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1854,7 +1813,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1862,7 +1821,7 @@ This label turns red, if the priority is smaller than "medium". Form - + فرم @@ -1876,24 +1835,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book یک برچسب برای این آدرس بنویسید تا به دفترچه آدرسهای شما اضافه شود + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: و برچسب - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1913,12 +1882,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt و A + + + + Paste address from clipboard + آدرس را بر کلیپ بورد کپی کنید + + + + Alt+P + Alt و P + + + + Send to multiple recipients at once + ارسال همزمان به گیرنده های متعدد + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + تایید عملیات ارسال + + + + S&end + و ارسال + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + فرم + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt و A + + + + Paste address from clipboard + آدرس را بر کلیپ بورد کپی کنید + + + + Alt+P + Alt و P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + یک برچسب برای این آدرس بنویسید تا به دفترچه آدرسهای شما اضافه شود + + + + &Label: + و برچسب + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1926,7 +2106,7 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + @@ -1937,18 +2117,18 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1969,76 +2149,80 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2046,59 +2230,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2111,17 +2295,19 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + conflicted - + %1/offline - + @@ -2136,12 +2322,14 @@ This label turns red, if the priority is smaller than "medium". Status - + , broadcast through %n node(s) - + + + @@ -2151,31 +2339,31 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + @@ -2187,37 +2375,39 @@ This label turns red, if the priority is smaller than "medium". - + Credit - + - + matures in %n more block(s) - + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + @@ -2227,32 +2417,32 @@ This label turns red, if the priority is smaller than "medium". Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2262,15 +2452,15 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet ، هنوز با موفقیت ارسال نگردیده است @@ -2296,7 +2486,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date تاریخ @@ -2328,32 +2518,39 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2396,7 +2593,7 @@ This label turns red, if the priority is smaller than "medium". خالی - + Transaction status. Hover over this field to show number of confirmations. وضعیت تراکنش. با اشاره به این بخش تعداد تاییدها نمایش داده می شود @@ -2512,7 +2709,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2522,12 +2719,12 @@ This label turns red, if the priority is smaller than "medium". Show transaction details - + Export Transaction Data - + @@ -2572,12 +2769,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2591,32 +2788,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: میزان استفاده: - - Send command to -server or buynowcoind - - - - + List commands فهرست دستورها @@ -2631,19 +2810,9 @@ This label turns red, if the priority is smaller than "medium". انتخابها: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2658,12 +2827,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2673,22 +2842,22 @@ This label turns red, if the priority is smaller than "medium". Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2703,27 +2872,27 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2733,22 +2902,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2763,127 +2932,117 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + @@ -2893,22 +3052,22 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + @@ -2919,22 +3078,22 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2944,27 +3103,37 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + @@ -2972,34 +3141,39 @@ This label turns red, if the priority is smaller than "medium". رمز برای ارتباطاتِ JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3019,22 +3193,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3054,17 +3228,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3084,17 +3258,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3104,32 +3278,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) - + Connect through socks proxy - + Allow DNS lookups for -addnode, -seednode and -connect - + @@ -3139,7 +3303,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3147,44 +3311,34 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f خطا در هنگام لود شدن wallet.dat: Wallet corrupted - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat خطا در هنگام لود شدن wallet.dat Invalid -proxy address: '%s' - + Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + @@ -3194,12 +3348,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3217,39 +3371,74 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f لود شدن نمایه بلاکها.. - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open یک گره برای اتصال اضافه کنید و تلاش کنید تا اتصال را باز نگاه دارید - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - - + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... wallet در حال لود شدن است... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet قابلیت برگشت به نسخه قبلی برای wallet امکان پذیر نیست Cannot initialize keypool - + @@ -3285,4 +3474,473 @@ If the file does not exist, create it with owner-readable-only file permissions. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + کیف پول + + + + &Overview + و بازبینی + + + + Show general overview of wallet + نمای کلی از wallet را نشان بده + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + و تراکنش + + + + Browse transaction history + تاریخچه تراکنش را باز کن + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + خروج + + + + Quit application + از "درخواست نامه"/ application خارج شو + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + درباره و QT + + + + Show information about Qt + نمایش اطلاعات درباره QT + + + + &Options... + و انتخابها + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &نمایش/ عدم نمایش و + + + + &Encrypt Wallet... + و رمزگذاری wallet + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + و گرفتن نسخه پیشتیبان از wallet + + + + Backup wallet to another location + گرفتن نسخه پیشتیبان در آدرسی دیگر + + + + &Change Passphrase... + تغییر رمز/پَس فرِیز + + + + Change the passphrase used for wallet encryption + رمز مربوط به رمزگذاریِ wallet را تغییر دهید + + + + &Unlock Wallet... + + + + + Unlock wallet + باز کردن قفل wallet + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + امضا و پیام + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + و فایل + + + + &Settings + و تنظیمات + + + + &Help + و راهنما + + + + Tabs toolbar + نوار ابزار + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + به روز رسانی با شبکه... + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + روزآمد + + + + Catching up... + در حال روزآمد سازی.. + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + ارسال تراکنش + + + + Incoming transaction + تراکنش دریافتی + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + تاریخ: %1⏎ میزان وجه : %2⏎ نوع: %3⏎ آدرس: %4⏎ + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + wallet رمزگذاری شد و در حال حاضر از حالت قفل در آمده است + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + wallet رمزگذاری شد و در حال حاضر قفل است + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + + + + + + %n day(s) + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_fi.qm b/src/qt/locale/triangles_fi.qm new file mode 100644 index 0000000..210aed7 Binary files /dev/null and b/src/qt/locale/triangles_fi.qm differ diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/triangles_fi.ts similarity index 67% rename from src/qt/locale/bitcoin_fi.ts rename to src/qt/locale/triangles_fi.ts index c6fd58f..12349de 100644 --- a/src/qt/locale/bitcoin_fi.ts +++ b/src/qt/locale/triangles_fi.ts @@ -1,25 +1,30 @@ - + + + AboutDialog - About buynowcoin - Tietoa buynowcoinista + About Triangles + Tietoa trianglesista + + + <b>triangles</b> version + <b>triangles</b> versio - <b>buynowcoin</b> version - <b>buynowcoin</b> versio + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -43,12 +48,17 @@ Tämä tuote sisältää OpenSSL-projektin kehittämää ohjelmistoa OpenSSL-ty Osoitekirja - + + These are your Triangles 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. + + + + Double-click to edit address or label Kaksoisnapauta muokataksesi osoitetta tai nimikettä - + Create a new address Luo uusi osoite @@ -58,17 +68,21 @@ Tämä tuote sisältää OpenSSL-projektin kehittämää ohjelmistoa OpenSSL-ty Kopioi valittu osoite järjestelmän leikepöydälle - + + Sign a message to prove you own a TRI address + + + + &New Address &Uusi osoite - - These are your buynowcoin 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. - Nämä ovat buynowcoin-osoitteesi rahansiirtojen vastaanottoa varten. Jos haluat, voit antaa jokaiselle lähettäjälle oman osoitteen jotta voit pitää kirjaa sinulle rahaa siirtäneistä henkilöistä. + These are your triangles 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. + Nämä ovat triangles-osoitteesi rahansiirtojen vastaanottoa varten. Jos haluat, voit antaa jokaiselle lähettäjälle oman osoitteen jotta voit pitää kirjaa sinulle rahaa siirtäneistä henkilöistä. - + &Copy Address &Kopioi osoite @@ -78,27 +92,30 @@ Tämä tuote sisältää OpenSSL-projektin kehittämää ohjelmistoa OpenSSL-ty Näytä &QR-koodi - - Sign a message to prove you own a buynowcoin address - Allekirjoita viesti osoittaaksesi buynowcoin-osoitteesi omistajuus + Sign a message to prove you own a triangles address + Allekirjoita viesti osoittaaksesi triangles-osoitteesi omistajuus - + Sign &Message Allekirjoita &Viesti - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Poista valittu osoite listalta - - Verify a message to ensure it was signed with a specified buynowcoin address - Vahvista viesti varmistaaksesi että kyseinen buynowcoin-osoitteesi on allekirjoittanut sen + Verify a message to ensure it was signed with a specified triangles address + Vahvista viesti varmistaaksesi että kyseinen triangles-osoitteesi on allekirjoittanut sen - + &Verify Message &Varmista viesti @@ -141,7 +158,7 @@ Tämä tuote sisältää OpenSSL-projektin kehittämää ohjelmistoa OpenSSL-ty AddressTableModel - + Label Nimi @@ -244,7 +261,12 @@ Tämä tuote sisältää OpenSSL-projektin kehittämää ohjelmistoa OpenSSL-ty Haluatko varmasti salata lompakkosi? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. TÄRKEÄÄ: Kaikki vanhat lompakon varmuuskopiot tulisi korvata uusilla suojatuilla varmuuskopioilla. Turvallisuussyistä edelliset varmuuskopiot muuttuvat käyttökelvottomiksi, kun aloitat uuden salatun lompakon käytön. @@ -261,12 +283,11 @@ Tämä tuote sisältää OpenSSL-projektin kehittämää ohjelmistoa OpenSSL-ty Lompakko salattu - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin-ohjelma sulkee itsensä päättääkseen salauksen luonnin. Muista, että lompakon salaaminen ei täysin turvaa kolikoitasi haittaohjelmien aiheuttamien varkauksien uhalta. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles-ohjelma sulkee itsensä päättääkseen salauksen luonnin. Muista, että lompakon salaaminen ei täysin turvaa kolikoitasi haittaohjelmien aiheuttamien varkauksien uhalta. - + @@ -307,430 +328,6 @@ Tämä tuote sisältää OpenSSL-projektin kehittämää ohjelmistoa OpenSSL-ty Lompakon tunnuslause vaihdettiin onnistuneesti. - - BitcoinGUI - - - Sign &message... - Allekirjoita &viesti... - - - - Synchronizing with network... - Synkronoidaan verkon kanssa... - - - - &Overview - &Yleisnäkymä - - - - Show general overview of wallet - Lompakon tilanteen yleiskatsaus - - - - &Transactions - &Rahansiirrot - - - - Browse transaction history - Selaa rahansiirtohistoriaa - - - - &Address Book - %Osoitekirja - - - - Edit the list of stored addresses and labels - Muokkaa tallennettujen osoitteiden ja nimien listaa - - - - &Receive coins - &Vastaanota kolikoita - - - - Show the list of addresses for receiving payments - Näytä osoitelista vastaanottaaksesi maksuja - - - - &Send coins - &Lähetä kolikoita - - - - E&xit - L&opeta - - - - Quit application - Sulje ohjelma - - - - Show information about buynowcoin - Näytä tietoja buynowcoinista - - - - About &Qt - Tietoja &Qt - - - - Show information about Qt - Näytä tietoja Qt:sta - - - - &Options... - &Asetukset... - - - - &Encrypt Wallet... - &Salaa lompakko... - - - - &Backup Wallet... - &Varmuuskopioi lompakko... - - - - &Change Passphrase... - &Vaihda tunnuslause... - - - - ~%n block(s) remaining - ~%n lohko jäljellä~%n lohkoa jäljellä - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Ladattu %1 lohkoa %2 lohkosta rahansiirtohistoriassa (%3% ladattu). - - - - &Export... - Vie... - - - - Send coins to a buynowcoin address - Lähetä kolikkoja buynowcoin osoitteeseen - - - - Modify configuration options for buynowcoin - Mukauta buynowcoinin konfigurointiasetuksia - - - - Export the data in the current tab to a file - Vie data tämänhetkisestä välilehdestä tiedostoon - - - - Encrypt or decrypt wallet - Salaa tai pura salaus lompakosta - - - - Backup wallet to another location - Varmuuskopioi lompakko toiseen sijaintiin - - - - Change the passphrase used for wallet encryption - Vaihda lompakon salaukseen käytettävä tunnuslause - - - - &Debug window - &Testausikkuna - - - - Open debugging and diagnostic console - Avaa debuggaus- ja diagnostiikkakonsoli - - - - &Verify message... - &Vahvista viesti... - - - - buynowcoin - buynowcoin - - - - Wallet - Lompakko - - - - &About buynowcoin - &Tietoa buynowcoinista - - - - &Show / Hide - &Näytä / Piilota - - - - Unlock wallet - Avaa Lompakko - - - - &Lock Wallet - &Lukitse Lompakko - - - - Lock wallet - Lukitse lompakko - - - - &File - &Tiedosto - - - - &Settings - &Asetukset - - - - &Help - &Apua - - - - Tabs toolbar - Välilehtipalkki - - - - Actions toolbar - Toimintopalkki - - - - - [testnet] - [testnet] - - - - - buynowcoin client - buynowcoin-asiakas - - - - %n active connection(s) to buynowcoin network - %n aktiivinen yhteys buynowcoin-verkkoon%n aktiivista yhteyttä buynowcoin-verkkoon - - - - Downloaded %1 blocks of transaction history. - Ladattu %1 lohkoa rahansiirtohistoriasta. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Osakkaana.<br>Osuutesi on %1<br>Verkon osuus on %2<br>Odotettu aika palkkion ansaitsemiselle on %3 - - - - Not staking because wallet is locked - Ei osakkaana koska lompakko on lukittu - - - - Not staking because wallet is offline - Ei osakkaana koska lompakko on offline-tilassa - - - - Not staking because wallet is syncing - Ei osakkaana koska lompakko synkronoituu - - - - Not staking because you don't have mature coins - Ei osakkaana koska sinulle ei ole erääntynyt kolikoita - - - - %n second(s) ago - %n sekunti sitten%n sekuntia sitten - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - &Aukaise lompakko - - - - %n minute(s) ago - %n minuutti sitten%n minuuttia sitten - - - - %n hour(s) ago - %n tunti sitten%n tuntia sitten - - - - %n day(s) ago - %n päivä sitten%n päivää sitten - - - - Up to date - Rahansiirtohistoria on ajan tasalla - - - - Catching up... - Saavutetaan verkkoa... - - - - Last received block was generated %1. - Viimeinen vastaanotettu lohko generoitu %1. - - - - 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? - Tämä rahansiirto ylittää siirtorajan. Voit silti lähettää sen %1 rahansiirtopalkkiota vastaan, joka siirretään rahansiirtoasi käsitteleville solmuille jotta se auttaisi ja tukisi verkkoa. Haluatko maksaa rahansiirtopalkkion? - - - - Confirm transaction fee - Hyväksy rahansiirtopalkkio - - - - Sent transaction - Lähetetyt rahansiirrot - - - - Incoming transaction - Saapuva rahansiirto - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Päivä: %1 -Määrä: %2 -Tyyppi: %3 -Osoite: %4 - - - - - URI handling - URI-merkkijonojen käsittely - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URI-merkkijonoa ei voida jäsentää! Tämä voi johtua väärästä buynowcoin-osoitteesta tai väärässä muodossa olevista URI-parametreistä. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Lompakko on <b>salattu</b> ja tällä hetkellä <b>avoinna</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Lompakko on <b>salattu</b> ja tällä hetkellä <b>lukittuna</b> - - - - Backup Wallet - Varmuuskopioi lompakkosi - - - - Wallet Data (*.dat) - Lompakkodata (*.dat) - - - - Backup Failed - Varmuuskopion luonti epäonnistui - - - - There was an error trying to save the wallet data to the new location. - Virhe tallentaessa lompakkotiedostoa uuteen sijaintiinsa. - - - - %n second(s) - %n sekunti%n sekuntia - - - - %n minute(s) - %n minuutti%n minuuttia - - - - %n hour(s) - %n tunti%n tuntia - - - - %n day(s) - %n päivä%n päivää - - - - Not staking - Ei osakkaana - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Vakava virhe kohdattu. buynowcoin-ohjelma ei voi enää jatkaa turvallisesti ja sulkee itsensä. - - ClientModel @@ -1035,37 +632,46 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Tämän syötteen nimike osoitekirjassa. Nimikettä voidaan muuttaa vain lähetysosoitteille. - + + &Stealth Address + + + + New receiving address Uusi vastaanottava osoite - + New sending address Uusi lähettävä osoite - + Edit receiving address Muokkaa vastaanottajan osoitetta - + Edit sending address Muokkaa lähtevää osoitetta - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Osoite "%1" on jo osoitekirjassa. - - The entered address "%1" is not a valid buynowcoin address. - Syöttämäsi osoite "%1" ei ole hyväksytty buynowcoin-osoite. + The entered address "%1" is not a valid triangles address. + Syöttämäsi osoite "%1" ei ole hyväksytty triangles-osoite. - + Could not unlock wallet. Lompakkoa ei voitu avata. @@ -1078,18 +684,22 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version versio - + + + Triangles-Qt + + + + Usage: Kulutus: @@ -1119,6 +729,347 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Näytä logo käynnistettäessä (oletus: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Laatu + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + Viesti + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (ei nimeä) + + + + MessagePage + + + Address Book + Osoitekirja + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopioi valittu osoite järjestelmän leikepöydälle + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Poista valittu osoite listalta + + + + &Delete + &Poista + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + Virhe vietäessä + + + + Could not write to file %1. + Ei voida kirjoittaa tiedostoon %1. + + OptionsDialog @@ -1152,17 +1103,15 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Varattuna - - Automatically start buynowcoin after logging in to the system. - Käynnistä buynowcoin-asiakasohjelma automaattisesti kun olet kirjautunut järjestelmään. + Automatically start triangles after logging in to the system. + Käynnistä triangles-asiakasohjelma automaattisesti kun olet kirjautunut järjestelmään. - - &Start buynowcoin on system login - %Käynnistä buynowcoin-asiakasohjelma kirjautuessasi + &Start triangles on system login + %Käynnistä triangles-asiakasohjelma kirjautuessasi - + 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. Irroita lohko- ja osoitetietokannat lopetettaessa. Tämä tarkoittaa, että tietokannat voidaan siirtää eri hakemistoon mutta se hidastaa ohjelman sammumista. Lompakko on aina irroitettuna. @@ -1177,19 +1126,37 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. &Verkko - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Avaa buynowcoin-asiakkaalle automaattisesti portti reitittimestä. Tämä toimii vain, kun reitittimesi tukee UPnP:tä ja se on aktivoituna. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Avaa triangles-asiakkaalle automaattisesti portti reitittimestä. Tämä toimii vain, kun reitittimesi tukee UPnP:tä ja se on aktivoituna. - + Map port using &UPnP Portin uudelleenohjaus &UPnP:llä - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Yhdistä buynowcoin-verkkoon SOCKS-välityspalvelimen lävitse. (esim. yhdistettäessä Tor:n läpi). + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Yhdistä triangles-verkkoon SOCKS-välityspalvelimen lävitse. (esim. yhdistettäessä Tor:n läpi). + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1244,7 +1211,7 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. 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. - Ikkunaa suljettaessa vain pienentää Bitcoin-ohjelman ikkunan lopettamatta itse ohjelmaa. Kun tämä asetus on valittuna, ohjelman voi sulkea vain valitsemalla Lopeta ohjelman valikosta. + Ikkunaa suljettaessa vain pienentää Triangles-ohjelman ikkunan lopettamatta itse ohjelmaa. Kun tämä asetus on valittuna, ohjelman voi sulkea vain valitsemalla Lopeta ohjelman valikosta. @@ -1263,26 +1230,34 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - Käyttöliittymän kieli voidaan valita tästä. Tämä asetus tulee voimaan vasta buynowcoin-asiakasohjelman uudelleenkäynnistyksen jälkeen. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + Käyttöliittymän kieli voidaan valita tästä. Tämä asetus tulee voimaan vasta triangles-asiakasohjelman uudelleenkäynnistyksen jälkeen. + + + &Unit to show amounts in: - Yksikkö jona bitcoin-määrät näytetään + Yksikkö jona triangles-määrät näytetään Choose the default subdivision unit to show in the interface and when sending coins. - Valitse mitä yksikköä käytetään ensisijaisesti bitcoin-määrien näyttämiseen. + Valitse mitä yksikköä käytetään ensisijaisesti triangles-määrien näyttämiseen. - - Whether to show buynowcoin addresses in the transaction list or not. - Näytä tai piilota buynowcoin-osoitteet rahansiirtolistassa. + Whether to show triangles addresses in the transaction list or not. + Näytä tai piilota triangles-osoitteet rahansiirtolistassa. - + &Display addresses in transaction list &Näytä osoitteet rahansiirrot listassa @@ -1325,8 +1300,12 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - This setting will take effect after restarting buynowcoin. - Tämä asetus tulee voimaan vasta buynowcoin-asiakasohjelman uudelleenkäynnistyksen jälkeen. + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Tämä asetus tulee voimaan vasta triangles-asiakasohjelman uudelleenkäynnistyksen jälkeen. @@ -1342,13 +1321,11 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Lomake - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - Näytettävät tiedot voivat olla vanhentuneet. Lompakkosi synkronoituu automaattisesti buynowcoin-verkon kanssa kun yhteys on muodostettu, mutta tätä prosessia ei ole viety vielä päätökseen. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + Näytettävät tiedot voivat olla vanhentuneet. Lompakkosi synkronoituu automaattisesti triangles-verkon kanssa kun yhteys on muodostettu, mutta tätä prosessia ei ole viety vielä päätökseen. - + Stake: Vaihdos: @@ -1383,27 +1360,61 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Louhittu saldo, joka ei ole vielä kypsynyt - + Total: Yhteensä: - + Your current total balance - Tililläsi tällä hetkellä olevien Bitcoinien määrä + Tililläsi tällä hetkellä olevien Trianglesien määrä - + <b>Recent transactions</b> <b>Viimeisimmät rahansiirrot</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Kaikki vahvistamattomat rahansiirrot yhteensä, joita ei vielä lasketa saldoosi. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Kolikoiden kokoinaismäärä, jotka eivät vielä ole laskettu tämänhetkiseen saldoon. @@ -1504,7 +1515,17 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. T&ietoa - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Käytössä oleva OpenSSL-versio @@ -1549,7 +1570,17 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Viimeisimmän lohkon aika - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Avaa @@ -1559,12 +1590,11 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Komentokehotteen ominaisuudet - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Näytä buynowcoin-Qt:n avustusohje saadaksesi listan käytettävistä buynowcoinin komentokehotteen määritteistä. + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Näytä triangles-Qt:n avustusohje saadaksesi listan käytettävistä trianglesin komentokehotteen määritteistä. - + &Show %Näytä @@ -1579,34 +1609,35 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Kääntöpäiväys - - buynowcoin - Debug window - buynowcoin - Debug-ikkuna + triangles - Debug window + triangles - Debug-ikkuna - - buynowcoin Core - buynowcoinin ydin + triangles Core + trianglesin ydin - + Debug log file Debug lokitiedosto - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Avaa buynowcoin-asiakasohjelman debug-lokitiedosto nykyisestä hakemistostaan. Tämä voi kestää muutaman sekunnin avattaessa suuria lokitiedostoja. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Avaa triangles-asiakasohjelman debug-lokitiedosto nykyisestä hakemistostaan. Tämä voi kestää muutaman sekunnin avattaessa suuria lokitiedostoja. - + Clear console Tyhjennä konsoli + + Welcome to the triangles RPC console. + Tervetuloa trianglesin RPC-konsoliin. + - Welcome to the buynowcoin RPC console. - Tervetuloa buynowcoinin RPC-konsoliin. + Welcome to the Triangles RPC console. + @@ -1630,8 +1661,9 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. + Send Coins - Lähetä Bitcoineja + Lähetä Triangleseja @@ -1654,7 +1686,7 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Ei tarpeeksi varoja! - + Quantity: Määrä: @@ -1674,13 +1706,17 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Amount: Määrä: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1723,7 +1759,7 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. erikseen määritetty vaihtorahaosoite - + Send to multiple recipients at once Lähetä monelle vastaanottajalle @@ -1749,8 +1785,12 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1763,9 +1803,13 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. &Lähetä - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Syötä buynowcoin-osoite (esim. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Syötä triangles-osoite (esim. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1815,7 +1859,7 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Confirm send coins - Hyväksy Bitcoinien lähettäminen + Hyväksy Trianglesien lähettäminen @@ -1835,7 +1879,7 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. The amount to pay must be larger than 0. - Maksettavan summan tulee olla suurempi kuin 0 Bitcoinia. + Maksettavan summan tulee olla suurempi kuin 0 Trianglesia. @@ -1862,10 +1906,19 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. 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. Virhe: Rahansiirto evätty. Tämä voi tapahtua kun jotkut kolikot lompakossasi ovat jo käytetty, kuten myös tilanteessa jos käytit wallet.dat-tiedoston kopiota ja rahat olivat käytetty kopiossa, mutta eivät ole merkitty käytetyiksi tässä. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - VAROITUS: Epäkelpo buynowcoin-osoite + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + VAROITUS: Epäkelpo triangles-osoite @@ -1897,19 +1950,29 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - + Enter a label for this address to add it to your address book Anna nimi tälle osoitteelle, jos haluat lisätä sen osoitekirjaan + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Nimi: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Osoite, johon maksu lähetetään (esim. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Osoite, johon maksu lähetetään (esim. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1936,10 +1999,225 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Remove this recipient Poista tämä vastaanottaja + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Syötä triangles-osoite (esim. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Syötä buynowcoin-osoite (esim. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Valitse osoite osoitekirjasta + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Liitä osoite leikepöydältä + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Lähetä monelle vastaanottajalle + + + + Add &Recipient + Lisää &Vastaanottaja + + + + Remove all transaction fields + Tyhjennä kaikki rahansiirtokentät + + + + Clear &All + + + + + Confirm the send action + Vahvista lähetys + + + + S&end + &Lähetä + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b>:sta %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Oletko varma että haluat lähettää %1? + + + + and + ja + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Vastaanottajan osoite on virheellinen. Tarkista osoite. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Sama osoite toistuu useamman kerran. Samaan osoitteeseen voi lähettää vain kerran per maksu. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Valitse osoite osoitekirjasta + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Liitä osoite leikepöydältä + + + + Alt+P + Alt+P + + + + Remove this recipient + Poista tämä vastaanottaja + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Anna nimi tälle osoitteelle, jos haluat lisätä sen osoitekirjaan + + + + &Label: + &Nimi: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1962,8 +2240,8 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Osoite, jolle viesti kirjataan (esim. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Osoite, jolle viesti kirjataan (esim. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1999,11 +2277,20 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - Sign the message to prove you own this buynowcoin address - Allekirjoita viesti vahvistaaksesi, että omistat tämän buynowcoin-osoitteen + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Allekirjoita viesti vahvistaaksesi, että omistat tämän triangles-osoitteen + + + Reset all sign message fields Tyhjennä kaikki allekirjoita-viesti-kentät @@ -2026,34 +2313,45 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Osoite, jolla viesti on allekirjoitettu (esim. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Osoite, jolla viesti on allekirjoitettu (esim. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Vahvista viesti varmistaaksesi että se on allekirjoitettu kyseisellä buynowcoin-osoitteella + Verify the message to ensure it was signed with the specified triangles address + Vahvista viesti varmistaaksesi että se on allekirjoitettu kyseisellä triangles-osoitteella - + Reset all verify message fields Tyhjennä kaikki varmista-viesti-kentät - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Syötä buynowcoin-osoite (esim. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Syötä triangles-osoite (esim. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Klikkaa "Allekirjoita Viesti luodaksesi allekirjoituksen + + Enter triangles signature + Syötä triangles-allekirjoitus + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Syötä buynowcoin-allekirjoitus + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2132,7 +2430,10 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Open for %n block(s) - Avoinna %n:lle lohkolleAvoinna %n lohkolle + + Avoinna %n:lle lohkolle + Avoinna %n lohkolle + @@ -2162,7 +2463,10 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. , broadcast through %n node(s) - lähetetty %n noodin läpilähetetty %n noodin läpi + + lähetetty %n noodin läpi + lähetetty %n noodin läpi + @@ -2208,14 +2512,17 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - + Credit Credit - + matures in %n more block(s) - kypsyy %n lohkon kuluttuakypsyy %n lohkon kuluttua + + kypsyy %n lohkon kuluttua + kypsyy %n lohkon kuluttua + @@ -2226,12 +2533,12 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - + Debit Debit - + Transaction fee Maksukulu @@ -2251,14 +2558,18 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Viesti - + Transaction ID Siirtotunnus + Generated coins must mature 60 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. + Luotujen kolikoiden on eräännyttävä 510 lohkon ajan ennenkuin niitä voidaan käyttää. Kun loit tämän lohkon, se oli lähetetty verkkoon lohkoketjuun lisättäväksi. Jos lohkon siirtyminen ketjuun epäonnistuu, tilaksi muuttuu "ei hyväksytty" ja sillon sitä ei voida käyttää. Tämä voi tapahtua joskus jos toinen verkon noodi luo lohkon muutaman sekunnin sisällä luodusta lohkostasi. {60 ?} + + Generated coins must mature 510 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. - Luotujen kolikoiden on eräännyttävä 510 lohkon ajan ennenkuin niitä voidaan käyttää. Kun loit tämän lohkon, se oli lähetetty verkkoon lohkoketjuun lisättäväksi. Jos lohkon siirtyminen ketjuun epäonnistuu, tilaksi muuttuu "ei hyväksytty" ja sillon sitä ei voida käyttää. Tämä voi tapahtua joskus jos toinen verkon noodi luo lohkon muutaman sekunnin sisällä luodusta lohkostasi. + Luotujen kolikoiden on eräännyttävä 510 lohkon ajan ennenkuin niitä voidaan käyttää. Kun loit tämän lohkon, se oli lähetetty verkkoon lohkoketjuun lisättäväksi. Jos lohkon siirtyminen ketjuun epäonnistuu, tilaksi muuttuu "ei hyväksytty" ja sillon sitä ei voida käyttää. Tämä voi tapahtua joskus jos toinen verkon noodi luo lohkon muutaman sekunnin sisällä luodusta lohkostasi. @@ -2291,7 +2602,7 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. epätosi - + , has not been successfully broadcast yet , ei ole vielä onnistuneesti lähetetty @@ -2317,7 +2628,7 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. TransactionTableModel - + Date Päivämäärä @@ -2349,10 +2660,18 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Open for %n more block(s) - Avoinna %n lohkolleAvoinna %n lohkolle + + Avoinna %n lohkolle + Avoinna %n lohkolle + - + + Narration + + + + Offline Offline-tila @@ -2417,7 +2736,7 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. (ei saatavilla) - + Transaction status. Hover over this field to show number of confirmations. Rahansiirron tila. Siirrä osoitin kentän päälle nähdäksesi vahvistusten lukumäärä. @@ -2434,7 +2753,7 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Destination address of transaction. - Rahansiirron kohteen Bitcoin-osoite + Rahansiirron kohteen Triangles-osoite @@ -2612,29 +2931,20 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - WalletModel + Triangles-core - - Sending... - Lähetetään... - - - - bitcoin-core - - - buynowcoin version - buynowcoinin versio + triangles version + trianglesin versio - + Usage: Käyttö: - Send command to -server or buynowcoind - Syötä komento kohteeseen -server tai buynowcoind + Send command to -server or trianglesd + Syötä komento kohteeseen -server tai trianglesd @@ -2653,13 +2963,13 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - Specify configuration file (default: buynowcoin.conf) - Määritä asetustiedosto (oletus: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Määritä asetustiedosto (oletus: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Määritä prosessitiedosto (oletus: buynowcoin.pid) + Specify pid file (default: trianglesd.pid) + Määritä prosessitiedosto (oletus: triangles.pid) @@ -2672,7 +2982,22 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Määritä data-hakemisto - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Aseta tietokannan välimuistin koko megatavuina (oletus: 25) @@ -2807,12 +3132,11 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Varoitus: -paytxfee on asetettu erittäin korkeaksi! Tämä on maksukulu jonka tulet maksamaan kun lähetät siirron. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Varoitus: Tarkista, että tietokoneesi aika ja päivämäärä ovat oikeassa! Jos kellosi on väärässä, buynowcoin ei toimi oikein. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Varoitus: Tarkista, että tietokoneesi aika ja päivämäärä ovat oikeassa! Jos kellosi on väärässä, triangles ei toimi oikein. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Varoitus: Virhe luettaessa wallet.dat-tiedostoa! Kaikki avaimet luettiin oikein, mutta rahansiirtodata tai osoitekirjan kentät voivat olla puuttuvat tai väärät. @@ -2898,8 +3222,8 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL asetukset (katso Bitcoin Wikistä tarkemmat SSL ohjeet) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL asetukset (katso Triangles Wikistä tarkemmat SSL ohjeet) @@ -2959,17 +3283,52 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Käytä välityspalvelinta saavuttaaksesi tor:n piilotetut palvelut (oletus: sama kuin -proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Käyttäjätunnus JSON-RPC-yhteyksille - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Tarkistetaan tietokannan eheyttä... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! VAROITUS: synkronoidun tallennuspisteen rikkomista havaittu, mutta ohitettu! @@ -2994,31 +3353,30 @@ Tämä tarkoittaa, että ainakin %2 rahansiirtopalkkio tarvitaan. Salasana JSON-RPC-yhteyksille - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, sinun on asetettava rpcpassword asetustiedostoon: + %s, sinun on asetettava rpcpassword asetustiedostoon: %s On suositeltavaa, että käytät seuraavaa arvottua salasanaa: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (Sinun ei tarvitse muistaa tätä salasanaa) Käyttäjänimen ja salasanan EI TULE OLLA SAMOJA. Jos tiedostoa ei ole olemassa, luo se asettaen samalla omistajan lukuoikeudet. -On myös suositeltavaa asettaa alertnotify jolloin olet tiedotettu ongelmista; esimerkiksi: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +On myös suositeltavaa asettaa alertnotify jolloin olet tiedotettu ongelmista; esimerkiksi: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - + Find peers using internet relay chat (default: 0) Etsi vertaisiasi käyttäen Internet Relay Chatia (oletus: 1) {0)?} @@ -3138,17 +3496,15 @@ On myös suositeltavaa asettaa alertnotify jolloin olet tiedotettu ongelmista; e Lompakko %s on datahakemiston %s ulkopuolella. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Ei voida saavuttaa lukkoa datatiedostossa %s. buynowcoin-asiakasohjelma on ehkä jo käynnissä. + Cannot obtain a lock on data directory %s. triangles is probably already running. + Ei voida saavuttaa lukkoa datatiedostossa %s. triangles-asiakasohjelma on ehkä jo käynnissä. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Kytkeytyminen %s tällä tietokonella ei onnistu (kytkeytyminen palautti virheen %d, %s) @@ -3178,17 +3534,15 @@ On myös suositeltavaa asettaa alertnotify jolloin olet tiedotettu ongelmista; e Virhe ladattaessa wallet.dat-tiedostoa: Lompakko vioittunut - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Virhe ladattaessa wallet.dat-tiedostoa: Lompakko tarvitsee uudemman version buynowcoin-asiakasohjelmasta + Error loading wallet.dat: Wallet requires newer version of triangles + Virhe ladattaessa wallet.dat-tiedostoa: Lompakko tarvitsee uudemman version triangles-asiakasohjelmasta - - Wallet needed to be rewritten: restart buynowcoin to complete - Lompakko on kirjoitettava uudelleen: käynnistä buynowcoin-asiakasohjelma uudelleen päättääksesi toiminnon + Wallet needed to be rewritten: restart triangles to complete + Lompakko on kirjoitettava uudelleen: käynnistä triangles-asiakasohjelma uudelleen päättääksesi toiminnon - + Error loading wallet.dat Virhe ladattaessa wallet.dat-tiedostoa @@ -3253,12 +3607,11 @@ On myös suositeltavaa asettaa alertnotify jolloin olet tiedotettu ongelmista; e Linää solmu mihin liittyä pitääksesi yhteyden auki - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Ei voitu liittää %s tällä tietokoneella. buynowcoin-asiakasohjelma on jo ehkä päällä. + Unable to bind to %s on this computer. triangles is probably already running. + Ei voitu liittää %s tällä tietokoneella. triangles-asiakasohjelma on jo ehkä päällä. - + Fee per KB to add to transactions you send Rahansiirtopalkkio kilotavua kohden lähetettäviin rahansiirtoihisi @@ -3317,4 +3670,524 @@ If the file does not exist, create it with owner-readable-only file permissions. Jos tiedostoa ei ole, niin luo se ainoastaan omistajan kirjoitusoikeuksin. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Lompakko + + + + &Overview + &Yleisnäkymä + + + + Show general overview of wallet + Lompakon tilanteen yleiskatsaus + + + + &Send coins + &Lähetä kolikoita + + + + Send coins to a TRI address + + + + + &Receive coins + &Vastaanota kolikoita + + + + Show the list of addresses for receiving payments + Näytä osoitelista vastaanottaaksesi maksuja + + + + &Transactions + &Rahansiirrot + + + + Browse transaction history + Selaa rahansiirtohistoriaa + + + + &Address Book + %Osoitekirja + + + + Edit the list of stored addresses and labels + Muokkaa tallennettujen osoitteiden ja nimien listaa + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + L&opeta + + + + Quit application + Sulje ohjelma + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Tietoja &Qt + + + + Show information about Qt + Näytä tietoja Qt:sta + + + + &Options... + &Asetukset... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Näytä / Piilota + + + + &Encrypt Wallet... + &Salaa lompakko... + + + + Encrypt or decrypt wallet + Salaa tai pura salaus lompakosta + + + + &Backup Wallet... + &Varmuuskopioi lompakko... + + + + Backup wallet to another location + Varmuuskopioi lompakko toiseen sijaintiin + + + + &Change Passphrase... + &Vaihda tunnuslause... + + + + Change the passphrase used for wallet encryption + Vaihda lompakon salaukseen käytettävä tunnuslause + + + + &Unlock Wallet... + &Aukaise lompakko + + + + Unlock wallet + Avaa Lompakko + + + + &Lock Wallet + &Lukitse Lompakko + + + + Lock wallet + Lukitse lompakko + + + + Sign &message... + Allekirjoita &viesti... + + + + &Verify message... + &Vahvista viesti... + + + + &Export... + Vie... + + + + Export the data in the current tab to a file + Vie data tämänhetkisestä välilehdestä tiedostoon + + + + &Debug window + &Testausikkuna + + + + Open debugging and diagnostic console + Avaa debuggaus- ja diagnostiikkakonsoli + + + + &File + &Tiedosto + + + + &Settings + &Asetukset + + + + &Help + &Apua + + + + Tabs toolbar + Välilehtipalkki + + + + Actions toolbar + Toimintopalkki + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Synkronoidaan verkon kanssa... + + + + ~%n block(s) remaining + + ~%n lohko jäljellä + ~%n lohkoa jäljellä + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Ladattu %1 lohkoa %2 lohkosta rahansiirtohistoriassa (%3% ladattu). + + + + Downloaded %1 blocks of transaction history. + Ladattu %1 lohkoa rahansiirtohistoriasta. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + %n sekunti sitten + %n sekuntia sitten + + + + + %n minute(s) ago + + %n minuutti sitten + %n minuuttia sitten + + + + + %n hour(s) ago + + %n tunti sitten + %n tuntia sitten + + + + + %n day(s) ago + + %n päivä sitten + %n päivää sitten + + + + + Up to date + Rahansiirtohistoria on ajan tasalla + + + + Catching up... + Saavutetaan verkkoa... + + + + Last received block was generated %1. + Viimeinen vastaanotettu lohko generoitu %1. + + + + 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? + Tämä rahansiirto ylittää siirtorajan. Voit silti lähettää sen %1 rahansiirtopalkkiota vastaan, joka siirretään rahansiirtoasi käsitteleville solmuille jotta se auttaisi ja tukisi verkkoa. Haluatko maksaa rahansiirtopalkkion? + + + + Confirm transaction fee + Hyväksy rahansiirtopalkkio + + + + Sent transaction + Lähetetyt rahansiirrot + + + + Incoming transaction + Saapuva rahansiirto + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Päivä: %1 +Määrä: %2 +Tyyppi: %3 +Osoite: %4 + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + URI-merkkijonojen käsittely + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Lompakko on <b>salattu</b> ja tällä hetkellä <b>avoinna</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Lompakko on <b>salattu</b> ja tällä hetkellä <b>lukittuna</b> + + + + Backup Wallet + Varmuuskopioi lompakkosi + + + + Wallet Data (*.dat) + Lompakkodata (*.dat) + + + + Backup Failed + Varmuuskopion luonti epäonnistui + + + + There was an error trying to save the wallet data to the new location. + Virhe tallentaessa lompakkotiedostoa uuteen sijaintiinsa. + + + + %n second(s) + + %n sekunti + %n sekuntia + + + + + %n minute(s) + + %n minuutti + %n minuuttia + + + + + %n hour(s) + + %n tunti + %n tuntia + + + + + %n day(s) + + %n päivä + %n päivää + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Osakkaana.<br>Osuutesi on %1<br>Verkon osuus on %2<br>Odotettu aika palkkion ansaitsemiselle on %3 + + + + Not staking because wallet is locked + Ei osakkaana koska lompakko on lukittu + + + + Not staking because wallet is offline + Ei osakkaana koska lompakko on offline-tilassa + + + + Not staking because wallet is syncing + Ei osakkaana koska lompakko synkronoituu + + + + Not staking because you don't have mature coins + Ei osakkaana koska sinulle ei ole erääntynyt kolikoita + + + + Not staking + Ei osakkaana + + + Show information about triangles + Näytä tietoja trianglesista + + + Send coins to a triangles address + Lähetä kolikkoja triangles osoitteeseen + + + Modify configuration options for triangles + Mukauta trianglesin konfigurointiasetuksia + + + triangles + triangles + + + &About triangles + &Tietoa trianglesista + + + triangles client + triangles-asiakas + + + %n active connection(s) to triangles network + + %n aktiivinen yhteys triangles-verkkoon + %n aktiivista yhteyttä triangles-verkkoon + + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URI-merkkijonoa ei voida jäsentää! Tämä voi johtua väärästä triangles-osoitteesta tai väärässä muodossa olevista URI-parametreistä. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Vakava virhe kohdattu. triangles-ohjelma ei voi enää jatkaa turvallisesti ja sulkee itsensä. + + + + WalletModel + + + Sending... + Lähetetään... + + + diff --git a/src/qt/locale/triangles_fr.qm b/src/qt/locale/triangles_fr.qm new file mode 100644 index 0000000..a737d81 Binary files /dev/null and b/src/qt/locale/triangles_fr.qm differ diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/triangles_fr.ts similarity index 67% rename from src/qt/locale/bitcoin_fr.ts rename to src/qt/locale/triangles_fr.ts index 46025ba..6cfb326 100644 --- a/src/qt/locale/bitcoin_fr.ts +++ b/src/qt/locale/triangles_fr.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin - Au sujet de buynowcoin + About Triangles + Au sujet de triangles + + + <b>triangles</b> version + Version de <b>triangles</b> + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + Copyright © 2009-2014 Les développeurs Triangles +Copyright © 2012-2014 Les développeurs Triangles +Copyright © 2014 Les développeurs triangles - <b>buynowcoin</b> version - Version de <b>buynowcoin</b> + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - Copyright © 2009-2014 Les développeurs Bitcoin -Copyright © 2012-2014 Les développeurs NovaCoin -Copyright © 2014 Les développeurs buynowcoin +Copyright © 2014 Triangles team + - + This is experimental software. @@ -44,12 +55,17 @@ This product includes software developed by the OpenSSL Project for use in the O Répertoire d'adresses - + + These are your Triangles 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. + + + + Double-click to edit address or label Double cliquer afin de modifier l'adresse ou l'étiquette - + Create a new address Créer une nouvelle adresse @@ -59,17 +75,21 @@ This product includes software developed by the OpenSSL Project for use in the O Copier l'adresse sélectionnée vers le presse-papier système - + + Sign a message to prove you own a TRI address + + + + &New Address &Nouvelle adresse - - These are your buynowcoin 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. - Ce sont vos adresses pour recevoir vos paiements. Vous pouvez utiliser une adresse différente pour chaque réception afin d'identifier facilement le payeur. + These are your triangles 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. + Ce sont vos adresses pour recevoir vos paiements. Vous pouvez utiliser une adresse différente pour chaque réception afin d'identifier facilement le payeur. - + &Copy Address &Copier l'adresse @@ -79,27 +99,30 @@ This product includes software developed by the OpenSSL Project for use in the O Montrer le &QR Code - - Sign a message to prove you own a buynowcoin address - Signer un message afin de valider l'identité de votre adresse buynowcoin + Sign a message to prove you own a triangles address + Signer un message afin de valider l'identité de votre adresse triangles - + Sign &Message Signer le &message - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Effacer l'adresse actuellement sélectionnée de la liste - - Verify a message to ensure it was signed with a specified buynowcoin address - Vérifier un message pour s'assurer qu'il vient d'un adresse buynowcoin spécifique. + Verify a message to ensure it was signed with a specified triangles address + Vérifier un message pour s'assurer qu'il vient d'un adresse triangles spécifique. - + &Verify Message &Vérifier un message @@ -142,7 +165,7 @@ This product includes software developed by the OpenSSL Project for use in the O AddressTableModel - + Label Étiquette @@ -237,7 +260,7 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - Avertissement : Si vous chiffrez votre portefeuille et perdez votre passphrase, vous ne pourrez <b>plus accéder à vos buynowcoins</b>! + Avertissement : Si vous chiffrez votre portefeuille et perdez votre passphrase, vous ne pourrez <b>plus accéder à vos triangless</b>! @@ -245,7 +268,12 @@ This product includes software developed by the OpenSSL Project for use in the O Êtes-vous sûr de vouloir chiffrer votre portefeuille ? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. IMPORTANT : Toute sauvegarde précédente de votre fichier de portefeuille devrait être remplacée par le nouveau fichier de portefeuille chiffré. Pour des raisons de sécurité, les sauvegardes précédentes de votre fichier de portefeuille non chiffré deviendront inutilisables dès lors que vous commencerez à utiliser le nouveau portefeuille chiffré. @@ -262,12 +290,11 @@ This product includes software developed by the OpenSSL Project for use in the O Portefeuille chiffré - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - L'application buynowcoin va désormais se terminer afin de finaliser le processus de chiffrage. Merci de noter que le chiffrage du portefeuille ne garantit pas de se prémunir du vol via utilisation de malware, qui auraient pu infecter votre ordinateur. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + L'application triangles va désormais se terminer afin de finaliser le processus de chiffrage. Merci de noter que le chiffrage du portefeuille ne garantit pas de se prémunir du vol via utilisation de malware, qui auraient pu infecter votre ordinateur. - + @@ -308,431 +335,6 @@ This product includes software developed by the OpenSSL Project for use in the O La phrase de passe du portefeuille a été modifiée avec succès. - - BitcoinGUI - - - Sign &message... - Signer le &message... - - - - Synchronizing with network... - Synchronisation avec le réseau en cours… - - - - &Overview - &Vue d'ensemble - - - - Show general overview of wallet - Afficher une vue d’ensemble du portefeuille - - - - &Transactions - &Transactions - - - - Browse transaction history - Parcourir l'historique des transactions - - - - &Address Book - Carnet d'adresses - - - - Edit the list of stored addresses and labels - Éditer la liste d'adresses et étiquettes - - - - &Receive coins - &Recevoir des monnaies - - - - Show the list of addresses for receiving payments - Montrer la liste d'adresses de réception de paiements - - - - &Send coins - &Envoyer des monnaies - - - - E&xit - Q&uitter - - - - Quit application - Quitter l’application - - - - Show information about buynowcoin - Afficher des informations au sujet de buynowcoin - - - - About &Qt - À propos de &Qt - - - - Show information about Qt - Afficher les informations au sujet de Qt - - - - &Options... - &Options… - - - - &Encrypt Wallet... - &Chiffrer le portefeuille... - - - - &Backup Wallet... - Sauvegarder le &portefeuille... - - - - &Change Passphrase... - &Changer la phrase de passe... - - - - ~%n block(s) remaining - ~%n blocks restants~%n blocs restants - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Téléchargement des blocks de l'historique des transactions : 1% sur 2% (%3% effectués). - - - - &Export... - &Exporter... - - - - Send coins to a buynowcoin address - Envoyer des monnaies vers une adresse buynowcoin - - - - Modify configuration options for buynowcoin - Modification des options de configuration de buynowcoin - - - - Export the data in the current tab to a file - Export des données de l'onglet courant vers un fichier - - - - Encrypt or decrypt wallet - Chiffrer ou déchiffrer le portefeuille - - - - Backup wallet to another location - Sauvegarder le portefeuille vers un autre emplacement - - - - Change the passphrase used for wallet encryption - Modifier la phrase de passe utilisée pour le chiffrement du portefeuille - - - - &Debug window - &Fenêtre de débogage - - - - Open debugging and diagnostic console - Ouvrir la console de débogage et de diagnostic - - - - &Verify message... - &Vérifier un message... - - - - buynowcoin - buynowcoin - - - - Wallet - Portefeuille - - - - &About buynowcoin - &Au sujet de buynowcoin - - - - &Show / Hide - &Montrer / Masquer - - - - Unlock wallet - Déverrouiller le portefeuille - - - - &Lock Wallet - &Verrouiller le portefeuille - - - - Lock wallet - Verrouiller le portefeuille - - - - &File - &Fichier - - - - &Settings - &Paramètres - - - - &Help - &Aide - - - - Tabs toolbar - Barre d'onglets - - - - Actions toolbar - Barre d'actions - - - - - [testnet] - [testnet] - - - - - buynowcoin client - Client buynowcoin - - - - %n active connection(s) to buynowcoin network - %n connexion active au réseau buynowcoin%n connexions actives au réseau buynowcoin - - - - Downloaded %1 blocks of transaction history. - Téléchargement de blocs de l'historique de transactions : 1% blocks - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Staking.<br>Votre poids est de %1<br>Le poids du réseau est de %2<br>Temps estimé avant récompense %3 - - - - Not staking because wallet is locked - Pas de staking car votre portefeuille est verouillé - - - - Not staking because wallet is offline - Pas de staking car votre portefeuille est hors ligne - - - - Not staking because wallet is syncing - Pas de staking car votre portefeuille est en cours de synchronisation - - - - Not staking because you don't have mature coins - Pas de staking car vos monnaies ne sont pas encore matures - - - - %n second(s) ago - il y a %n secondeil y a %n secondes - - - - About buynowcoin card - Au sujet de la carte buynowcoin - - - - Show information about buynowcoin card - Informations sur la carte buynowcoin - - - - &Unlock Wallet... - &Déverrouiller le portefeuille - - - - %n minute(s) ago - il y a %n minuteil y a %n minutes - - - - %n hour(s) ago - il y a %n heureil y a %n heures - - - - %n day(s) ago - il y a %n jouril y a %n jours - - - - Up to date - À jour - - - - Catching up... - Rattrapage en cours… - - - - Last received block was generated %1. - Le dernier block reçu à été généré %1. - - - - 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? - Cette transaction dépasse la limite autorisée. Vous pouvez tout de même effectuer cette opération, moyennant %1 de frais, qui seront envoyés aux noeuds qui valideront cette transaction, et dont l'objectif vise à supporter le réseau. Souhaitez-vous payer ces frais ? - - - - Confirm transaction fee - Confirmer le paiement des frais de transaction - - - - Sent transaction - Transaction envoyée - - - - Incoming transaction - Transaction entrante - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Date : %1 -Montant : %2 -Type : %3 -Adresse : %4 - - - - - - URI handling - Prise en charge de l'URL - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - L'adresse du portefeuille buynowcoin n'as pas pu être correctement identifiée, car invalide ou malformée. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Le portefeuille est <b>chiffré</b> et est actuellement <b>déverrouillé</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Le portefeuille est <b>chiffré</b> et actuellement <b>verrouillé</b> - - - - Backup Wallet - Sauvegarder le portefeuille - - - - Wallet Data (*.dat) - Données liées au portefeuille (*.dat) - - - - Backup Failed - Echec de la sauvegarde - - - - There was an error trying to save the wallet data to the new location. - Une erreur a été rencontrée lors de la sauvegarde du portefeuille vers la nouvelle destination. - - - - %n second(s) - %n seconde%n secondes - - - - %n minute(s) - %n minute%n minutes - - - - %n hour(s) - %n heure%n heures - - - - %n day(s) - %n jour%n jours - - - - Not staking - Pas de staking - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Une erreur fatale a été rencontrée. L'application buynowcoin ne peut plus être s'exécuter de façon correcte et doit se terminer. - - ClientModel @@ -1037,37 +639,46 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.L'adresse associée à cette entrée du carnet d'adresse. Seules les adresses d'envoi peuvent être modifiées. - + + &Stealth Address + + + + New receiving address Nouvelle adresse de réception - + New sending address Nouvelle adresse d’envoi - + Edit receiving address Modifier l’adresse de réception - + Edit sending address Modifier l’adresse d'envoi - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. L’adresse fournie « %1 » est déjà présente dans le carnet d'adresses. - - The entered address "%1" is not a valid buynowcoin address. - L'adresse "%1" renseignée n'est pas une adresse buynowcoin valide. + The entered address "%1" is not a valid triangles address. + L'adresse "%1" renseignée n'est pas une adresse triangles valide. - + Could not unlock wallet. Impossible de déverrouiller le portefeuille. @@ -1080,18 +691,22 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version version - + + + Triangles-Qt + + + + Usage: Utilisation: @@ -1121,6 +736,347 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Affichage de l'écran de démarrage (défaut: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Type + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Étiquette + + + + To Address + + + + + From Address + + + + + Message + Message + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + Répertoire d'adresses + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copier l'adresse sélectionnée vers le presse-papier système + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Effacer l'adresse actuellement sélectionnée de la liste + + + + &Delete + &Supprimer + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + Erreur lors de l'export + + + + Could not write to file %1. + + + OptionsDialog @@ -1154,17 +1110,15 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Réserve - - Automatically start buynowcoin after logging in to the system. - Démarrage automatique du client buynowcoin lors de la connexion au système + Automatically start triangles after logging in to the system. + Démarrage automatique du client triangles lors de la connexion au système - - &Start buynowcoin on system login - &Démarrage du client buynowcoin à la connexion au système + &Start triangles on system login + &Démarrage du client triangles à la connexion au système - + 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. Détacher la base des block et adresses à la fermeture. Vous pourrez les utiliser dans un autre dossier mais cela ralenti la fermeture. Le portefeuille est lui toujours détaché. @@ -1179,19 +1133,37 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.&Réseau - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Ouverture automatique du port client de buynowcoin sur le routeur. Ceci ne fonctionne que dans le cas où le support UPnP sur votre routeur existe et est actif. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Ouverture automatique du port client de triangles sur le routeur. Ceci ne fonctionne que dans le cas où le support UPnP sur votre routeur existe et est actif. - + Map port using &UPnP Mapper le port avec l'&UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Connexion au réseau buynowcoin à travers un proxy SOCKS (e.g. Connexion via le réseau Tor). + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Connexion au réseau triangles à travers un proxy SOCKS (e.g. Connexion via le réseau Tor). + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1265,11 +1237,20 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - La langue d'interface de l'utilisateur peut être définie ici. Les modification seront prises en compte après redémarrage de l'application buynowcoin + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + La langue d'interface de l'utilisateur peut être définie ici. Les modification seront prises en compte après redémarrage de l'application triangles + + + &Unit to show amounts in: &Unité d'affichage des montants: @@ -1279,12 +1260,11 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Choisissez la sous-unité par défaut pour l'affichage dans l'interface et lors de l'envoi de pièces. - - Whether to show buynowcoin addresses in the transaction list or not. - Afficher les adresses buynowcoin au sein de la liste de transactions + Whether to show triangles addresses in the transaction list or not. + Afficher les adresses triangles au sein de la liste de transactions - + &Display addresses in transaction list &Afficher les adresses sur la liste des transactions @@ -1327,8 +1307,12 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - This setting will take effect after restarting buynowcoin. - Les paramètres prendront effet après redémarrage du client buynowcoin + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Les paramètres prendront effet après redémarrage du client triangles @@ -1344,13 +1328,11 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Formulaire - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - Les informations affichées peuvent être obsolètes. Votre portefeuille se synchronise automatiquement avec le réseau buynowcoin mais ce processus n'est pas encore terminé. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + Les informations affichées peuvent être obsolètes. Votre portefeuille se synchronise automatiquement avec le réseau triangles mais ce processus n'est pas encore terminé. - + Stake: Stake: @@ -1385,27 +1367,61 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Le solde généré n'est pas encore mature - + Total: Total: - + Your current total balance Votre solde total actuel - + <b>Recent transactions</b> <b>Transactions récentes</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Montant total des transactions nécessitant confirmation, et ne figurant pas encore dans le solde actuel - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Montant total des transactions en "staking" et ne figurant pas encore dans le solde actuel @@ -1506,7 +1522,17 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.&Informations - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Version d'OpenSSL utilisée @@ -1551,7 +1577,17 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Horodatage du dernier bloc - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Ouvrir @@ -1561,12 +1597,11 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Options de ligne de commande - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Afficher le message d'aide buynowcoin-Qt afin d'obtenir la liste des options de de L'outil en ligne de commande buynowcoin + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Afficher le message d'aide triangles-Qt afin d'obtenir la liste des options de de L'outil en ligne de commande triangles - + &Show &Afficher @@ -1581,34 +1616,35 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Date de compilation - - buynowcoin - Debug window - buynowcoin - Fenêtre de déboggage + triangles - Debug window + triangles - Fenêtre de déboggage - - buynowcoin Core - buynowcoin Core + triangles Core + triangles Core - + Debug log file Journal de débogage - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Ouvrir le fichier journal de debug buynowcoin au sein du répertoire courant. Cette opération peut prendre quelques secondes dans le cas de fichiers journaux volumineux. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Ouvrir le fichier journal de debug triangles au sein du répertoire courant. Cette opération peut prendre quelques secondes dans le cas de fichiers journaux volumineux. - + Clear console Nettoyer la console + + Welcome to the triangles RPC console. + Bienvenue sur la console RPC de triangles. + - Welcome to the buynowcoin RPC console. - Bienvenue sur la console RPC de buynowcoin. + Welcome to the Triangles RPC console. + @@ -1632,6 +1668,7 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. + Send Coins Envoyer des monnaies @@ -1656,7 +1693,7 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Fonds insuffisants! - + Quantity: Quantité: @@ -1676,13 +1713,17 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Amount: Montant: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1725,7 +1766,7 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.adresse de change personnalisée - + Send to multiple recipients at once Envoyer à plusieurs destinataires à la fois @@ -1751,8 +1792,12 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1765,9 +1810,13 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.E&nvoyer - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Entrer une adresse buynowcoin (par ex: Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Entrer une adresse triangles (par ex: TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1864,10 +1913,19 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.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. Erreur: La transaction a été rejetée. Cela peut se produire si une quantité d'argent de votre portefeuille a déjà été dépensée, comme dans le cas où une copie du fichier wallet.dat aurait été utilisée afin d'effectuer des dépenses, à la place du fichier courant. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - AVERTISSEMENT: Adresse buynowcoin Invalide + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + AVERTISSEMENT: Adresse triangles Invalide @@ -1877,7 +1935,7 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. WARNING: unknown change address - AVERTISSEMENT: Adresse buynowcoin Invalide + AVERTISSEMENT: Adresse triangles Invalide @@ -1899,19 +1957,29 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - + Enter a label for this address to add it to your address book Saisir une étiquette pour cette adresse afin de l’ajouter à votre carnet d’adresses + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Étiquette : - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adresse destinataire du paiement (ex: Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adresse destinataire du paiement (ex: TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1938,10 +2006,225 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Remove this recipient Supprimer ce destinataire + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Entrer une adresse triangles (ex: TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Entrer une adresse buynowcoin (ex: Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Choisir une adresse du carnet d'adresse + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Envoyer à plusieurs destinataires à la fois + + + + Add &Recipient + Ajouter un &Destinataire + + + + Remove all transaction fields + Réinitialiser tous les champs liés à la transaction + + + + Clear &All + &Tout nettoyer + + + + Confirm the send action + Confirmer l’action d'envoi + + + + S&end + E&nvoyer + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> à %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Etes-vous sûr de vouloir envoyer %1? + + + + and + et + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + L'adresse du destinataire n’est pas valide, veuillez la vérifier. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Adresse indentique trouvée, il n'est possible d'envoyer qu'une fois à chaque adresse par opération d'envoi. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulaire + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Choisir une adresse du carnet d'adresse + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + Supprimer ce destinataire + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Saisir une étiquette pour cette adresse afin de l’ajouter à votre carnet d’adresses + + + + &Label: + &Étiquette : + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1964,8 +2247,8 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Entrer une adresse buynowcoin (ex: Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Entrer une adresse triangles (ex: TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -2001,11 +2284,20 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - Sign the message to prove you own this buynowcoin address - Signer le message afin de prouver l'identité de votre adresse buynowcoin + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Signer le message afin de prouver l'identité de votre adresse triangles + + + Reset all sign message fields Réinitialiser tous les champs de signature de message @@ -2028,34 +2320,45 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - L'adresse avec laquelle le message à été signé (ex: Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + L'adresse avec laquelle le message à été signé (ex: TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Vérifier le message afin de vous assurer qu'il provient de l'adresse buynowcoin spécifiée. + Verify the message to ensure it was signed with the specified triangles address + Vérifier le message afin de vous assurer qu'il provient de l'adresse triangles spécifiée. - + Reset all verify message fields Réinitialiser tous les champs de vérification de message - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Entrer une adresse buynowcoin (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Entrer une adresse triangles (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Cliquer sur « Signer le message » pour générer la signature + + Enter triangles signature + Entrer une signature triangles + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Entrer une signature buynowcoin + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2134,7 +2437,10 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. Open for %n block(s) - Ouvert pour %n blocOuvert pour %n blocks + + Ouvert pour %n bloc + Ouvert pour %n blocks + @@ -2164,7 +2470,10 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. , broadcast through %n node(s) - , diffusée à travers %n nœud, diffusée à travers %n nœuds + + , diffusée à travers %n nœud + , diffusée à travers %n nœuds + @@ -2210,14 +2519,17 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - + Credit Crédit - + matures in %n more block(s) - arrive à maturité dans %n bloc de plusarrive à maturité dans %n blocks supplémentaires + + arrive à maturité dans %n bloc de plus + arrive à maturité dans %n blocks supplémentaires + @@ -2228,12 +2540,12 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - + Debit Débit - + Transaction fee Frais de transaction @@ -2253,14 +2565,18 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Commentaire - + Transaction ID ID de la transaction + Generated coins must mature 60 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. + Les pièces de monnaie générées nécessitent une maturation de 510 blocks avant de pouvoir être utilisées. Lors de la génération d'un blokc, celui-ci est diffusé sur le réseau afin d'être ajouté à la chaîne de blocks. En cas d'échec, son état passera en "non accepté" et celui-ci ne pourra pas être dépensé. Cela peut occasionnellement se produire, lorsqu'un noeud différent génère un block à quelques secondes d'intervalle du vôtre. {60 ?} + + Generated coins must mature 510 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. - Les pièces de monnaie générées nécessitent une maturation de 510 blocks avant de pouvoir être utilisées. Lors de la génération d'un blokc, celui-ci est diffusé sur le réseau afin d'être ajouté à la chaîne de blocks. En cas d'échec, son état passera en "non accepté" et celui-ci ne pourra pas être dépensé. Cela peut occasionnellement se produire, lorsqu'un noeud différent génère un block à quelques secondes d'intervalle du vôtre. + Les pièces de monnaie générées nécessitent une maturation de 510 blocks avant de pouvoir être utilisées. Lors de la génération d'un blokc, celui-ci est diffusé sur le réseau afin d'être ajouté à la chaîne de blocks. En cas d'échec, son état passera en "non accepté" et celui-ci ne pourra pas être dépensé. Cela peut occasionnellement se produire, lorsqu'un noeud différent génère un block à quelques secondes d'intervalle du vôtre. @@ -2293,7 +2609,7 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.faux - + , has not been successfully broadcast yet , n’a pas encore été diffusée avec succès @@ -2319,7 +2635,7 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. TransactionTableModel - + Date Date @@ -2351,10 +2667,18 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. Open for %n more block(s) - Ouvert pour %n bloc de plusOuvert pour %n blocs de plus + + Ouvert pour %n bloc de plus + Ouvert pour %n blocs de plus + - + + Narration + + + + Offline Hors ligne @@ -2419,7 +2743,7 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.(n.d) - + Transaction status. Hover over this field to show number of confirmations. État de la transaction. Laissez le pointeur de la souris sur ce champ pour voir le nombre de confirmations. @@ -2614,29 +2938,20 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - WalletModel + Triangles-core - - Sending... - Envoi... - - - - bitcoin-core - - - buynowcoin version - Version buynowcoin + triangles version + Version triangles - + Usage: Utilisation: - Send command to -server or buynowcoind - Envoyer commande à -server ou buynowcoind + Send command to -server or trianglesd + Envoyer commande à -server ou trianglesd @@ -2655,13 +2970,13 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - Specify configuration file (default: buynowcoin.conf) - Spécifier le fichier de configuration (par défaut: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Spécifier le fichier de configuration (par défaut: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Spécifier le fichier pid (par défaut: buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + Spécifier le fichier pid (par défaut: trianglesd.pid) @@ -2674,7 +2989,22 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Spécifier le répertoire de données - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Définir la taille du cache de base de données en mégaoctets (par défaut : 25) @@ -2809,12 +3139,11 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Attention : -paytxfee est réglée sur un montant très élevé ! Il s'agit des frais de transaction que vous payerez si vous envoyez une transaction. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Avertissement: Veuillez vérifier la date et l'heure de votre ordinateur. buynowcoin ne pourra pas fonctionner correctement si l'horloge est réglée de façon incorrecte + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Avertissement: Veuillez vérifier la date et l'heure de votre ordinateur. triangles ne pourra pas fonctionner correctement si l'horloge est réglée de façon incorrecte - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Avertissement : une erreur est survenue lors de la lecture de wallet.dat ! Toutes les clefs ont été lues correctement mais les données de transaction ou les entrées du carnet d'adresses sont peut-être incorrectes ou manquantes. @@ -2900,8 +3229,8 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires. - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Options SSL : (voir le Wiki de Bitcoin pour les instructions de configuration du SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Options SSL : (voir le Wiki de Triangles pour les instructions de configuration du SSL) @@ -2961,17 +3290,52 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Utiliser un proxy pour atteindre les services cachés (par défaut: équivalent à -proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Nom d'utilisateur pour les connexions JSON-RPC - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Vérification d'intégrité de la base de données... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! ATTENTION : violation du checkpoint de synchronisation, mais ignorée! @@ -2996,32 +3360,31 @@ Cela implique que des frais à hauteur d'au moins %2 seront nécessaires.Mot de passe pour les connexions JSON-RPC - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, vous devez définir un mot de passe rpc 'rpcpassword' au sein du fichier de configuration: + %s, vous devez définir un mot de passe rpc 'rpcpassword' au sein du fichier de configuration: %s Il est recommandé d'utiliser le mot de passe aléatoire suivant: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (il n'est pas nécessaire de retenir ce mot de passe) Le nom d'utilisateur et le mot de passe doivent IMPERATIVEMENT être différents. Si le fichier n'existe pas, il est nécessaire de le créer, avec les droit de lecture au propriétaire seulement. Il est également recommandé d'utiliser l'option alertnotify afin d'être notifié des problèmes; -par exemple: alertnotify=echo %%s | mail -s "Alerte buynowcoin" admin@foo.com +par exemple: alertnotify=echo %%s | mail -s "Alerte triangles" admin@foo.com - + Find peers using internet relay chat (default: 0) Find peers using internet relay chat (default: 1) {0)?} @@ -3141,17 +3504,15 @@ par exemple: alertnotify=echo %%s | mail -s "Alerte buynowcoin" admin@ Le portefeuille %s réside en dehors répertoire de données %s - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Echec lors de la tentative de verrouillage des données du répertoire %s. L'application buynowcoin est probablement déjà en cours d'exécution + Cannot obtain a lock on data directory %s. triangles is probably already running. + Echec lors de la tentative de verrouillage des données du répertoire %s. L'application triangles est probablement déjà en cours d'exécution - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Impossible de se lier à %s sur cet ordinateur (bind a retourné l'erreur %d, %s) @@ -3181,17 +3542,15 @@ par exemple: alertnotify=echo %%s | mail -s "Alerte buynowcoin" admin@ Erreur lors du chargement de wallet.dat: portefeuille corrompu - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Erreur de chargement du fichier wallet.dat: le portefeuille nécessite une version plus récente de l'application buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Erreur de chargement du fichier wallet.dat: le portefeuille nécessite une version plus récente de l'application triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - Le portefeuille nécessite d'être réédité : Merci de relancer l'application buynowcoin + Wallet needed to be rewritten: restart triangles to complete + Le portefeuille nécessite d'être réédité : Merci de relancer l'application triangles - + Error loading wallet.dat Erreur lors du chargement du fichier wallet.dat @@ -3256,12 +3615,11 @@ par exemple: alertnotify=echo %%s | mail -s "Alerte buynowcoin" admin@ Ajouter un nœud auquel se connecter et tenter de garder la connexion ouverte - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Connexion au port %s impossible. L'application buynowcoin est probablement déjà en cours d'exécution + Unable to bind to %s on this computer. triangles is probably already running. + Connexion au port %s impossible. L'application triangles est probablement déjà en cours d'exécution - + Fee per KB to add to transactions you send Frais par KB à ajouter à vos transactions sortantes @@ -3320,4 +3678,533 @@ If the file does not exist, create it with owner-readable-only file permissions. Si le fichier n'existe pas, créez-le avec les droits de lecture seule accordés au propriétaire. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Portefeuille + + + + &Overview + &Vue d'ensemble + + + + Show general overview of wallet + Afficher une vue d’ensemble du portefeuille + + + + &Send coins + &Envoyer des monnaies + + + + Send coins to a TRI address + + + + + &Receive coins + &Recevoir des monnaies + + + + Show the list of addresses for receiving payments + Montrer la liste d'adresses de réception de paiements + + + + &Transactions + &Transactions + + + + Browse transaction history + Parcourir l'historique des transactions + + + + &Address Book + Carnet d'adresses + + + + Edit the list of stored addresses and labels + Éditer la liste d'adresses et étiquettes + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + Q&uitter + + + + Quit application + Quitter l’application + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + À propos de &Qt + + + + Show information about Qt + Afficher les informations au sujet de Qt + + + + &Options... + &Options… + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Montrer / Masquer + + + + &Encrypt Wallet... + &Chiffrer le portefeuille... + + + + Encrypt or decrypt wallet + Chiffrer ou déchiffrer le portefeuille + + + + &Backup Wallet... + Sauvegarder le &portefeuille... + + + + Backup wallet to another location + Sauvegarder le portefeuille vers un autre emplacement + + + + &Change Passphrase... + &Changer la phrase de passe... + + + + Change the passphrase used for wallet encryption + Modifier la phrase de passe utilisée pour le chiffrement du portefeuille + + + + &Unlock Wallet... + &Déverrouiller le portefeuille + + + + Unlock wallet + Déverrouiller le portefeuille + + + + &Lock Wallet + &Verrouiller le portefeuille + + + + Lock wallet + Verrouiller le portefeuille + + + + Sign &message... + Signer le &message... + + + + &Verify message... + &Vérifier un message... + + + + &Export... + &Exporter... + + + + Export the data in the current tab to a file + Export des données de l'onglet courant vers un fichier + + + + &Debug window + &Fenêtre de débogage + + + + Open debugging and diagnostic console + Ouvrir la console de débogage et de diagnostic + + + + &File + &Fichier + + + + &Settings + &Paramètres + + + + &Help + &Aide + + + + Tabs toolbar + Barre d'onglets + + + + Actions toolbar + Barre d'actions + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Synchronisation avec le réseau en cours… + + + + ~%n block(s) remaining + + ~%n blocks restants + ~%n blocs restants + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Téléchargement des blocks de l'historique des transactions : 1% sur 2% (%3% effectués). + + + + Downloaded %1 blocks of transaction history. + Téléchargement de blocs de l'historique de transactions : 1% blocks + + + + Current difficulty is %1. + + + + + %n second(s) ago + + il y a %n seconde + il y a %n secondes + + + + + %n minute(s) ago + + il y a %n minute + il y a %n minutes + + + + + %n hour(s) ago + + il y a %n heure + il y a %n heures + + + + + %n day(s) ago + + il y a %n jour + il y a %n jours + + + + + Up to date + À jour + + + + Catching up... + Rattrapage en cours… + + + + Last received block was generated %1. + Le dernier block reçu à été généré %1. + + + + 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? + Cette transaction dépasse la limite autorisée. Vous pouvez tout de même effectuer cette opération, moyennant %1 de frais, qui seront envoyés aux noeuds qui valideront cette transaction, et dont l'objectif vise à supporter le réseau. Souhaitez-vous payer ces frais ? + + + + Confirm transaction fee + Confirmer le paiement des frais de transaction + + + + Sent transaction + Transaction envoyée + + + + Incoming transaction + Transaction entrante + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Date : %1 +Montant : %2 +Type : %3 +Adresse : %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + Prise en charge de l'URL + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Le portefeuille est <b>chiffré</b> et est actuellement <b>déverrouillé</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Le portefeuille est <b>chiffré</b> et actuellement <b>verrouillé</b> + + + + Backup Wallet + Sauvegarder le portefeuille + + + + Wallet Data (*.dat) + Données liées au portefeuille (*.dat) + + + + Backup Failed + Echec de la sauvegarde + + + + There was an error trying to save the wallet data to the new location. + Une erreur a été rencontrée lors de la sauvegarde du portefeuille vers la nouvelle destination. + + + + %n second(s) + + %n seconde + %n secondes + + + + + %n minute(s) + + %n minute + %n minutes + + + + + %n hour(s) + + %n heure + %n heures + + + + + %n day(s) + + %n jour + %n jours + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Staking.<br>Votre poids est de %1<br>Le poids du réseau est de %2<br>Temps estimé avant récompense %3 + + + + Not staking because wallet is locked + Pas de staking car votre portefeuille est verouillé + + + + Not staking because wallet is offline + Pas de staking car votre portefeuille est hors ligne + + + + Not staking because wallet is syncing + Pas de staking car votre portefeuille est en cours de synchronisation + + + + Not staking because you don't have mature coins + Pas de staking car vos monnaies ne sont pas encore matures + + + + Not staking + Pas de staking + + + Show information about triangles + Afficher des informations au sujet de triangles + + + Send coins to a triangles address + Envoyer des monnaies vers une adresse triangles + + + Modify configuration options for triangles + Modification des options de configuration de triangles + + + triangles + triangles + + + &About triangles + &Au sujet de triangles + + + triangles client + Client triangles + + + %n active connection(s) to triangles network + + %n connexion active au réseau triangles + %n connexions actives au réseau triangles + + + + About triangles card + Au sujet de la carte triangles + + + Show information about triangles card + Informations sur la carte triangles + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + L'adresse du portefeuille triangles n'as pas pu être correctement identifiée, car invalide ou malformée. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Une erreur fatale a été rencontrée. L'application triangles ne peut plus être s'exécuter de façon correcte et doit se terminer. + + + + WalletModel + + + Sending... + Envoi... + + + diff --git a/src/qt/locale/triangles_fr_CA.qm b/src/qt/locale/triangles_fr_CA.qm new file mode 100644 index 0000000..ce32e60 Binary files /dev/null and b/src/qt/locale/triangles_fr_CA.qm differ diff --git a/src/qt/locale/bitcoin_fr_CA.ts b/src/qt/locale/triangles_fr_CA.ts similarity index 67% rename from src/qt/locale/bitcoin_fr_CA.ts rename to src/qt/locale/triangles_fr_CA.ts index a117d8c..946b2ad 100644 --- a/src/qt/locale/bitcoin_fr_CA.ts +++ b/src/qt/locale/triangles_fr_CA.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin - Au sujet de buynowcoin + About Triangles + Au sujet de triangles + + + <b>triangles</b> version + Version de <b>triangles</b> + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + Copyright © 2009-2014 Les développeurs Triangles +Copyright © 2012-2014 Les développeurs Triangles +Copyright © 2014 Les développeurs triangles - <b>buynowcoin</b> version - Version de <b>buynowcoin</b> + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - Copyright © 2009-2014 Les développeurs Bitcoin -Copyright © 2012-2014 Les développeurs NovaCoin -Copyright © 2014 Les développeurs buynowcoin +Copyright © 2014 Triangles team + - + This is experimental software. @@ -44,12 +55,17 @@ This product includes software developed by the OpenSSL Project for use in the O Répertoire d'adresses - + + These are your Triangles 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. + + + + Double-click to edit address or label Double cliquer afin de modifier l'adresse ou l'étiquette - + Create a new address Créer une nouvelle adresse @@ -59,17 +75,21 @@ This product includes software developed by the OpenSSL Project for use in the O Copier l'adresse sélectionnée vers le presse-papier système - + + Sign a message to prove you own a TRI address + + + + &New Address &Nouvelle adresse - - These are your buynowcoin 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. - Ce sont vos adresses pour recevoir vos paiements. Vous pouvez utiliser une adresse différente pour chaque réception afin d'identifier facilement le payeur. + These are your triangles 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. + Ce sont vos adresses pour recevoir vos paiements. Vous pouvez utiliser une adresse différente pour chaque réception afin d'identifier facilement le payeur. - + &Copy Address &Copier l'adresse @@ -79,27 +99,30 @@ This product includes software developed by the OpenSSL Project for use in the O Montrer le &QR Code - - Sign a message to prove you own a buynowcoin address - Signer un message afin de valider l'identité de votre adresse buynowcoin + Sign a message to prove you own a triangles address + Signer un message afin de valider l'identité de votre adresse triangles - + Sign &Message Signer le &message - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Effacer l'adresse actuellement sélectionnée de la liste - - Verify a message to ensure it was signed with a specified buynowcoin address - Vérifier un message pour s'assurer qu'il vient d'un adresse buynowcoin spécifique. + Verify a message to ensure it was signed with a specified triangles address + Vérifier un message pour s'assurer qu'il vient d'un adresse triangles spécifique. - + &Verify Message &Vérifier un message @@ -142,7 +165,7 @@ This product includes software developed by the OpenSSL Project for use in the O AddressTableModel - + Label Étiquette @@ -237,7 +260,7 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - ATTENTION : Si vous cryptez votre portefeuille et perdez votre passphrase, vous ne pourrez plus accéder à vos buynowcoins + ATTENTION : Si vous cryptez votre portefeuille et perdez votre passphrase, vous ne pourrez plus accéder à vos triangless @@ -245,7 +268,12 @@ This product includes software developed by the OpenSSL Project for use in the O Êtes-vous sûr de vouloir crypter votre portefeuille ? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. IMPORTANT : Toute sauvegarde précédente de votre fichier de portefeuille devrait être remplacée par le nouveau fichier de portefeuille crypté. Pour des raisons de sécurité, les sauvegardes précédentes de votre fichier de portefeuille non crypté deviendront inutilisables dès lors que vous commencerez à utiliser le nouveau portefeuille crypté. @@ -262,12 +290,11 @@ This product includes software developed by the OpenSSL Project for use in the O Portefeuille crypté - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - L'application buynowcoin va désormais se terminer afin de finaliser le processus de cryptage. Merci de noter que le cryptage du portefeuille ne garantit pas de se prémunir du vol via l'utilisation de malware, qui auraient pu infecter votre ordinateur. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + L'application triangles va désormais se terminer afin de finaliser le processus de cryptage. Merci de noter que le cryptage du portefeuille ne garantit pas de se prémunir du vol via l'utilisation de malware, qui auraient pu infecter votre ordinateur. - + @@ -308,431 +335,6 @@ This product includes software developed by the OpenSSL Project for use in the O La phrase de passe du portefeuille a été modifiée avec succès. - - BitcoinGUI - - - Sign &message... - Signer le &message... - - - - Synchronizing with network... - Synchronisation avec le réseau en cours… - - - - &Overview - &Vue d'ensemble - - - - Show general overview of wallet - Afficher une vue d’ensemble du portefeuille - - - - &Transactions - &Transactions - - - - Browse transaction history - Parcourir l'historique des transactions - - - - &Address Book - Carnet d'adresses - - - - Edit the list of stored addresses and labels - Éditer la liste d'adresses et libellés - - - - &Receive coins - &Recevoir des monnaies - - - - Show the list of addresses for receiving payments - Montrer la liste d'adresses de réception des paiements - - - - &Send coins - &Envoyer des monnaies - - - - E&xit - Q&uitter - - - - Quit application - Quitter l’application - - - - Show information about buynowcoin - Afficher des informations au sujet du buynowcoin - - - - About &Qt - À propos de &Qt - - - - Show information about Qt - Afficher des informations sur Qt - - - - &Options... - &Options… - - - - &Encrypt Wallet... - &Crypter le portefeuille... - - - - &Backup Wallet... - Sauvegarder le &portefeuille... - - - - &Change Passphrase... - &Changer la phrase de passe... - - - - ~%n block(s) remaining - ~%n blocks restants~%n blocs restants - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Téléchargement des blocks de l'historique des transactions : 1% sur 2% (%3% effectués). - - - - &Export... - &Export... - - - - Send coins to a buynowcoin address - Envoyer des monnaies vers une adresse buynowcoin - - - - Modify configuration options for buynowcoin - Modification des options de configuration de buynowcoin - - - - Export the data in the current tab to a file - Export des données de l'onglet courant vers un fichier - - - - Encrypt or decrypt wallet - Crypter ou décrypter le portefeuille - - - - Backup wallet to another location - Sauvegarder le portefeuille vers un autre emplacement - - - - Change the passphrase used for wallet encryption - Modifier la phrase de passe utilisée pour le cryptage du portefeuille - - - - &Debug window - &Fenêtre de débogage - - - - Open debugging and diagnostic console - Ouvrir une console de débogage et de diagnostic - - - - &Verify message... - &Vérifier un message... - - - - buynowcoin - buynowcoin - - - - Wallet - Portefeuille - - - - &About buynowcoin - A propos de buynowcoin - - - - &Show / Hide - &Afficher / Cacher - - - - Unlock wallet - Déverrouiller le portefeuille - - - - &Lock Wallet - &Verrouiller le portefeuille - - - - Lock wallet - Verrouiller le portefeuille - - - - &File - &Fichier - - - - &Settings - &Réglages - - - - &Help - &Aide - - - - Tabs toolbar - Barre d'outils des onglets - - - - Actions toolbar - Barre d'actions - - - - - [testnet] - [testnet] - - - - - buynowcoin client - Client buynowcoin - - - - %n active connection(s) to buynowcoin network - %n connexion active au réseau buynowcoin%n connexions actives au réseau buynowcoin - - - - Downloaded %1 blocks of transaction history. - Téléchargement de blocs de l'historique de transactions : 1% blocks - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Staking.<br>Votre poids est de %1<br>Le poids du réseau est de %2<br>Temps estimé avant récompense %3 - - - - Not staking because wallet is locked - Ne stack pas, votre portefeuilles est verouillé - - - - Not staking because wallet is offline - Ne stack pas, votre portefeuilles est hors ligne - - - - Not staking because wallet is syncing - Ne stack pas, votre portefeuille est en cours de synchronisation - - - - Not staking because you don't have mature coins - Ne stack pas, vos monnaies ne sont pas encore matures - - - - %n second(s) ago - il y a %n secondeil y a %n secondes - - - - About buynowcoin card - Au sujet de la carte buynowcoin - - - - Show information about buynowcoin card - Informations sur la carte buynowcoin - - - - &Unlock Wallet... - &Déverrouiller le portefeuille - - - - %n minute(s) ago - il y a %n minuteil y a %n minutes - - - - %n hour(s) ago - il y a %n heureil y a %n heures - - - - %n day(s) ago - il y a %n jouril y a %n jours - - - - Up to date - À jour - - - - Catching up... - Rattrapage en cours… - - - - Last received block was generated %1. - Le dernier block reçu à été généré %1. - - - - 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? - Cette transaction dépasse la limite autorisée. Vous pouvez tout de même effectuer cette opération, moyennant %1 de frais, qui seront envoyés aux noeuds qui valideront cette transaction, et dont l'objectif vise à supporter le réseau. Etes-vous d'accord pour payer ces frais ? - - - - Confirm transaction fee - Confirmer le Paiement des frais de transaction - - - - Sent transaction - Transaction envoyée - - - - Incoming transaction - Transaction entrante - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Date : %1 -Montant : %2 -Type : %3 -Adresse : %4 - - - - - - URI handling - Prise en charge de l'URL - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - L'adresse du portefeuille buynowcoin n'as pas pu être correctement identifiée, car invalide ou malformée. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Le portefeuille est <b>crypté</b> et est actuellement <b>déverrouillé</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Le portefeuille est <b>crypté</b> et actuellement <b>verrouillé</b> - - - - Backup Wallet - Sauvegarder le portefeuille - - - - Wallet Data (*.dat) - Données liées au portefeuille (*.dat) - - - - Backup Failed - Echec de la sauvegarde - - - - There was an error trying to save the wallet data to the new location. - Une erreur a été rencontrée lors de la tentative de sauvegarde du portefeuille vers la nouvelle destination. - - - - %n second(s) - %n seconde%n secondes - - - - %n minute(s) - %n minute%n minutes - - - - %n hour(s) - %n heure%n heures - - - - %n day(s) - %n jour%n jours - - - - Not staking - Pas de stacking - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Une erreur fatale a été rencontrée. L'application buynowcoin ne peut plus être s'exécuter de façon correcte et doit se terminer. - - ClientModel @@ -1037,37 +639,46 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent L'intitulé associé à cette entrée du carnet d'adresse. Seules les adresses d'envoi peuvent être modifiées. - + + &Stealth Address + + + + New receiving address Nouvelle adresse de réception - + New sending address Nouvelle adresse d’envoi - + Edit receiving address Modifier l’adresse de réception - + Edit sending address Modifier l’adresse d'envoi - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. L’adresse fournie « %1 » est déjà présente dans le carnet d'adresses. - - The entered address "%1" is not a valid buynowcoin address. - L'adresse "%1" renseignée n'est pas une adresse buynowcoin valide. + The entered address "%1" is not a valid triangles address. + L'adresse "%1" renseignée n'est pas une adresse triangles valide. - + Could not unlock wallet. Impossible de déverrouiller le portefeuille. @@ -1080,18 +691,22 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version version - + + + Triangles-Qt + + + + Usage: Utilisation: @@ -1121,6 +736,347 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Affichage de l'écran de démarrage (défaut: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Type + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + Message + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + Répertoire d'adresses + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copier l'adresse sélectionnée vers le presse-papier système + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Effacer l'adresse actuellement sélectionnée de la liste + + + + &Delete + &Supprimer + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + Erreur lors de l'export + + + + Could not write to file %1. + + + OptionsDialog @@ -1154,17 +1110,15 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Réserve - - Automatically start buynowcoin after logging in to the system. - Démarrage automatique du client buynowcoin lors de la connexion au système + Automatically start triangles after logging in to the system. + Démarrage automatique du client triangles lors de la connexion au système - - &Start buynowcoin on system login - &Démarrage du client buynowcoin à la connexion au système + &Start triangles on system login + &Démarrage du client triangles à la connexion au système - + 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. Détacher la base des block et adresses à la fermeture. Vous pourrez les utiliser dans un autre dossier mais cela ralenti la fermeture. Le portefeuille est lui toujours détaché. @@ -1179,19 +1133,37 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent &Réseau - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Ouverture automatique du port client de buynowcoin sur le routeur. Ceci ne fonctionne que dans le cas où le support UPnP sur votre routeur existe et est actif. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Ouverture automatique du port client de triangles sur le routeur. Ceci ne fonctionne que dans le cas où le support UPnP sur votre routeur existe et est actif. - + Map port using &UPnP Mapper le port avec l'&UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Connexion au réseau buynowcoin à travers un proxy SOCKS (e.g. Connexion via le réseau Tor). + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Connexion au réseau triangles à travers un proxy SOCKS (e.g. Connexion via le réseau Tor). + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1265,11 +1237,20 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - La langue d'interface de de l'utilisateur peut être définie ici. Ces modification seront effectives après redémarrage de l'application buynowcoin + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + La langue d'interface de de l'utilisateur peut être définie ici. Ces modification seront effectives après redémarrage de l'application triangles + + + &Unit to show amounts in: &Unité d'affichage des montants : @@ -1279,12 +1260,11 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Choisissez la sous-unité par défaut pour l'affichage dans l'interface et lors de l'envoi de pièces. - - Whether to show buynowcoin addresses in the transaction list or not. - Afficher les adresses buynowcoin au sein de la liste de transactions + Whether to show triangles addresses in the transaction list or not. + Afficher les adresses triangles au sein de la liste de transactions - + &Display addresses in transaction list &Afficher les adresses sur la liste des transactions @@ -1327,8 +1307,12 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - This setting will take effect after restarting buynowcoin. - Les paramètres prendront effet après redémarrage du client buynowcoin + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Les paramètres prendront effet après redémarrage du client triangles @@ -1344,13 +1328,11 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Formulaire - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - Les informations affichées peuvent être obsolètes. Votre portefeuille se synchronise automatiquement avec le réseau buynowcoin mais ce processus n'est pas encore terminé. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + Les informations affichées peuvent être obsolètes. Votre portefeuille se synchronise automatiquement avec le réseau triangles mais ce processus n'est pas encore terminé. - + Stake: Stake: @@ -1385,27 +1367,61 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Le solde généré n'est pas encore mature - + Total: Total : - + Your current total balance Votre solde total actuel - + <b>Recent transactions</b> <b>Transactions récentes</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Montant total des transactions nécessitant confirmation, et ne figurant pas encore dans la balance actuelle - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Montant total des transactions en "staking" et ne figurant pas encore dans la balance actuelle @@ -1506,7 +1522,17 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent &Informations - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Version d'OpenSSL utilisée @@ -1551,7 +1577,17 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Horodatage du dernier block - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Ouvrir @@ -1561,12 +1597,11 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Options de ligne de commande - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Afficher le message d'aide buynowcoin-Qt afin d'obtenir la liste des options de de L'outil en ligne de commande buynowcoin + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Afficher le message d'aide triangles-Qt afin d'obtenir la liste des options de de L'outil en ligne de commande triangles - + &Show &Afficher @@ -1581,34 +1616,35 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Date de compilation - - buynowcoin - Debug window - buynowcoin - Fenêtre de déboggage + triangles - Debug window + triangles - Fenêtre de déboggage - - buynowcoin Core - buynowcoin Core + triangles Core + triangles Core - + Debug log file Journal de débogage - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Ouvrir le fichier journal de debug buynowcoin au sein du répertoire courant. Cette opération peut prendre quelques secondes dans le cas de fichiers journaux volumineux. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Ouvrir le fichier journal de debug triangles au sein du répertoire courant. Cette opération peut prendre quelques secondes dans le cas de fichiers journaux volumineux. - + Clear console Nettoyer la console + + Welcome to the triangles RPC console. + Bienvenue sur la console triangles RPC. + - Welcome to the buynowcoin RPC console. - Bienvenue sur la console buynowcoin RPC. + Welcome to the Triangles RPC console. + @@ -1632,6 +1668,7 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent + Send Coins Envoyer des monnaies @@ -1656,7 +1693,7 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Fonds insuffisants ! - + Quantity: Quantité : @@ -1676,13 +1713,17 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Amount: Montant : + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1725,7 +1766,7 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent adresse de change personnalisée - + Send to multiple recipients at once Envoyer à plusieurs destinataires à la fois @@ -1751,8 +1792,12 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1765,9 +1810,13 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent E&nvoyer - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Entrer une adresse buynowcoin (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Entrer une adresse triangles (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1864,10 +1913,19 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent 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. Erreur: La transaction a été rejetée. Cela peut se produire si une quantité d'argent de votre portefeuille a déjà été dépensée, comme dans le cas où une copie du fichier wallet.dat aurait été utilisée afin d'effectuer des dépenses, à la place du fichier courant. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - AVERTISSEMENT: Adresse buynowcoin Invalide + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + AVERTISSEMENT: Adresse triangles Invalide @@ -1877,7 +1935,7 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent WARNING: unknown change address - AVERTISSEMET: Adresse buynowcoin Invalide + AVERTISSEMET: Adresse triangles Invalide @@ -1899,19 +1957,29 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - + Enter a label for this address to add it to your address book Saisir une étiquette pour cette adresse afin de l’ajouter à votre carnet d’adresses + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Étiquette : - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adresse destinataire du paiement ( ex : Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adresse destinataire du paiement ( ex : TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1938,10 +2006,225 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Remove this recipient Supprimer ce destinataire + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Entrer une adresse triangles (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Entrer une adresse buynowcoin (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Choisir une adresse du carnet d'adresse + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Envoyer à plusieurs destinataires à la fois + + + + Add &Recipient + Ajouter un &destinataire + + + + Remove all transaction fields + Réinitialiser tous les champs liés à la transaction + + + + Clear &All + &Tout nettoyer + + + + Confirm the send action + Confirmer l’action d'envoi + + + + S&end + E&nvoyer + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Etes-vous sûr de vouloir envoyer %1? + + + + and + et + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + L'adresse du destinataire n’est pas valide, veuillez la vérifier. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Adresse indentique trouvée, il n'est possible d'envoyer qu'une fois à chaque adresse par opération d'envoi. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulaire + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Choisir une adresse du carnet d'adresse + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + Supprimer ce destinataire + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Saisir une étiquette pour cette adresse afin de l’ajouter à votre carnet d’adresses + + + + &Label: + &Étiquette : + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1964,8 +2247,8 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Entrer une adresse buynowcoin (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Entrer une adresse triangles (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -2001,11 +2284,20 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - Sign the message to prove you own this buynowcoin address - Signer le message afin de prouver l'identité de votre adresse buynowcoin + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Signer le message afin de prouver l'identité de votre adresse triangles + + + Reset all sign message fields Réinitialiser tous les champs de signature de message @@ -2028,34 +2320,45 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - L'adresse avec laquelle le message à été signé (ex: Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + L'adresse avec laquelle le message à été signé (ex: TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Vérifier un message pour s'assurer qu'il vient d'un adresse buynowcoin spécifique. + Verify the message to ensure it was signed with the specified triangles address + Vérifier un message pour s'assurer qu'il vient d'un adresse triangles spécifique. - + Reset all verify message fields Réinitialiser tous les champs de vérification de message - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Entrer une adresse buynowcoin (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Entrer une adresse triangles (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Cliquez sur « Signer le message » pour générer la signature + + Enter triangles signature + Entrer une signature triangles + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Entrer une signature buynowcoin + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2134,7 +2437,10 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Open for %n block(s) - Ouvert pour %n blocOuvert pour %n blocks + + Ouvert pour %n bloc + Ouvert pour %n blocks + @@ -2164,7 +2470,10 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent , broadcast through %n node(s) - , diffusée à travers %n nœud, diffusée à travers %n nœuds + + , diffusée à travers %n nœud + , diffusée à travers %n nœuds + @@ -2210,14 +2519,17 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - + Credit Crédit - + matures in %n more block(s) - arrive à maturité dans %n bloc de plusarrive à maturité dans %n blocks supplémentaires + + arrive à maturité dans %n bloc de plus + arrive à maturité dans %n blocks supplémentaires + @@ -2228,12 +2540,12 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - + Debit Débit - + Transaction fee Frais de transaction @@ -2253,14 +2565,18 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Commentaire - + Transaction ID ID de la transaction + Generated coins must mature 60 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. + Les pièces de monnaie générées nécessitent une maturation de 510 blocks avant de pouvoir être utilisées. Lors de la génération d'un blokc, celui-ci est diffusé sur le réseau afin d'être ajouté à la chaîne de blocks. En cas d'échec, son état passera en "non accepté" et celui-ci ne pourra pas être dépensé. Cela peut occasionnellement se produire, lorsqu'un noeud différent génère un block à quelques secondes d'intervalle du vôtre. {60 ?} + + Generated coins must mature 510 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. - Les pièces de monnaie générées nécessitent une maturation de 510 blocks avant de pouvoir être utilisées. Lors de la génération d'un blokc, celui-ci est diffusé sur le réseau afin d'être ajouté à la chaîne de blocks. En cas d'échec, son état passera en "non accepté" et celui-ci ne pourra pas être dépensé. Cela peut occasionnellement se produire, lorsqu'un noeud différent génère un block à quelques secondes d'intervalle du vôtre. + Les pièces de monnaie générées nécessitent une maturation de 510 blocks avant de pouvoir être utilisées. Lors de la génération d'un blokc, celui-ci est diffusé sur le réseau afin d'être ajouté à la chaîne de blocks. En cas d'échec, son état passera en "non accepté" et celui-ci ne pourra pas être dépensé. Cela peut occasionnellement se produire, lorsqu'un noeud différent génère un block à quelques secondes d'intervalle du vôtre. @@ -2293,7 +2609,7 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent faux - + , has not been successfully broadcast yet , n’a pas encore été diffusée avec succès @@ -2319,7 +2635,7 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent TransactionTableModel - + Date Date @@ -2351,10 +2667,18 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Open for %n more block(s) - Ouvert pour %n bloc de plusOuvert pour %n blocs de plus + + Ouvert pour %n bloc de plus + Ouvert pour %n blocs de plus + - + + Narration + + + + Offline Hors ligne @@ -2419,7 +2743,7 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent (n.d) - + Transaction status. Hover over this field to show number of confirmations. État de la transaction. Laissez le pointeur de la souris sur ce champ pour voir le nombre de confirmations. @@ -2614,29 +2938,20 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - WalletModel + Triangles-core - - Sending... - Envoi... - - - - bitcoin-core - - - buynowcoin version - Version buynowcoin + triangles version + Version triangles - + Usage: Utilisation : - Send command to -server or buynowcoind - Envoyer commande à -server ou buynowcoind + Send command to -server or trianglesd + Envoyer commande à -server ou trianglesd @@ -2655,13 +2970,13 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - Specify configuration file (default: buynowcoin.conf) - Spécifier le fichier de configuration (defaut: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Spécifier le fichier de configuration (defaut: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Spécifier le fichier pid (defaut: buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + Spécifier le fichier pid (defaut: trianglesd.pid) @@ -2675,7 +2990,22 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Spécifier le répertoire de données - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Définir la taille du tampon en mégaoctets (par défaut : 25) @@ -2810,12 +3140,11 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Attention : -paytxfee est réglée sur un montant très élevé ! Il s'agit des frais de transaction que vous payerez si vous envoyez une transaction. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Avertissement: Veuillez vérifier la date et l'heure de votre ordinateur. buynowcoin ne pourra pas fonctionner correctement si l'horloge est réglée de façon incorrecte + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Avertissement: Veuillez vérifier la date et l'heure de votre ordinateur. triangles ne pourra pas fonctionner correctement si l'horloge est réglée de façon incorrecte - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Avertissement : une erreur est survenue lors de la lecture de wallet.dat ! Toutes les clefs ont été lues correctement mais les données de transaction ou les entrées du carnet d'adresses sont peut-être incorrectes ou manquantes. @@ -2901,8 +3230,8 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Options SSL : (voir le Wiki de Bitcoin pour les instructions de configuration du SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Options SSL : (voir le Wiki de Triangles pour les instructions de configuration du SSL) @@ -2962,17 +3291,52 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Utiliser un proxy pour atteindre les services cachés (défaut: équivalent à -proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Nom d'utilisateur pour les connexions JSON-RPC - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Vérification d'intégrité de la base de données... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! ATTENTION : violation du checkpoint de synchronisation, mais ignorée! @@ -2997,32 +3361,31 @@ Les montants inférieurs à 0.546 fois les frais minimum de relais apparaissent Mot de passe pour les connexions JSON-RPC - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, vous devez définir un mot de passe rpc 'rpcpassword' au sein du fichier de configuration: + %s, vous devez définir un mot de passe rpc 'rpcpassword' au sein du fichier de configuration: %s Il est recommandé d'utiliser le mot de passe aléatoire suivant: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (il n'est pas nécessaire de retenir ce mot de passe) Le nom d'utilisateur et le mot de passe doivent IMPERATIVEMENT être différents. Si le fichier n'existe pas, il est nécessaire de le créer, avec les droit de lecture au propriétaire seulement. Il est également recommandé d'utiliser l'option alertnotify afin d'être notifié des problèmes; -par exemple: alertnotify=echo %%s | mail -s "Alerte buynowcoin" admin@foo.com +par exemple: alertnotify=echo %%s | mail -s "Alerte triangles" admin@foo.com - + Find peers using internet relay chat (default: 0) Find peers using internet relay chat (default: 1) {0)?} @@ -3142,17 +3505,15 @@ par exemple: alertnotify=echo %%s | mail -s "Alerte buynowcoin" admin@ Le portefeuille %s réside en dehors répertoire de données %s - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Echec lors de la tentative de verrouillage des données du répertoire %s. L'application buynowcoin est probablement déjà en cours d'exécution + Cannot obtain a lock on data directory %s. triangles is probably already running. + Echec lors de la tentative de verrouillage des données du répertoire %s. L'application triangles est probablement déjà en cours d'exécution - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Impossible de se lier à %s sur cet ordinateur (bind a retourné l'erreur %d, %s) @@ -3182,17 +3543,15 @@ par exemple: alertnotify=echo %%s | mail -s "Alerte buynowcoin" admin@ Erreur lors du chargement de wallet.dat : portefeuille corrompu - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Erreur de chargement du fichier wallet.dat: le portefeuille nécessite une version plus récente de l'application buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Erreur de chargement du fichier wallet.dat: le portefeuille nécessite une version plus récente de l'application triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - le portefeuille nécessite d'être réédité : Merci de relancer l'application buynowcoin + Wallet needed to be rewritten: restart triangles to complete + le portefeuille nécessite d'être réédité : Merci de relancer l'application triangles - + Error loading wallet.dat Erreur lors du chargement de wallet.dat @@ -3257,12 +3616,11 @@ par exemple: alertnotify=echo %%s | mail -s "Alerte buynowcoin" admin@ Ajouter un nœud auquel se connecter et tenter de garder la connexion ouverte - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Connexion au port %s impossible. L'application buynowcoin est probablement déjà en cours d'exécution + Unable to bind to %s on this computer. triangles is probably already running. + Connexion au port %s impossible. L'application triangles est probablement déjà en cours d'exécution - + Fee per KB to add to transactions you send Frais par KB à ajouter à vos transactions sortantes @@ -3321,4 +3679,533 @@ If the file does not exist, create it with owner-readable-only file permissions. Si le fichier n'existe pas, créez-le avec les droits de lecture seule accordés au propriétaire. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Portefeuille + + + + &Overview + &Vue d'ensemble + + + + Show general overview of wallet + Afficher une vue d’ensemble du portefeuille + + + + &Send coins + &Envoyer des monnaies + + + + Send coins to a TRI address + + + + + &Receive coins + &Recevoir des monnaies + + + + Show the list of addresses for receiving payments + Montrer la liste d'adresses de réception des paiements + + + + &Transactions + &Transactions + + + + Browse transaction history + Parcourir l'historique des transactions + + + + &Address Book + Carnet d'adresses + + + + Edit the list of stored addresses and labels + Éditer la liste d'adresses et libellés + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + Q&uitter + + + + Quit application + Quitter l’application + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + À propos de &Qt + + + + Show information about Qt + Afficher des informations sur Qt + + + + &Options... + &Options… + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Afficher / Cacher + + + + &Encrypt Wallet... + &Crypter le portefeuille... + + + + Encrypt or decrypt wallet + Crypter ou décrypter le portefeuille + + + + &Backup Wallet... + Sauvegarder le &portefeuille... + + + + Backup wallet to another location + Sauvegarder le portefeuille vers un autre emplacement + + + + &Change Passphrase... + &Changer la phrase de passe... + + + + Change the passphrase used for wallet encryption + Modifier la phrase de passe utilisée pour le cryptage du portefeuille + + + + &Unlock Wallet... + &Déverrouiller le portefeuille + + + + Unlock wallet + Déverrouiller le portefeuille + + + + &Lock Wallet + &Verrouiller le portefeuille + + + + Lock wallet + Verrouiller le portefeuille + + + + Sign &message... + Signer le &message... + + + + &Verify message... + &Vérifier un message... + + + + &Export... + &Export... + + + + Export the data in the current tab to a file + Export des données de l'onglet courant vers un fichier + + + + &Debug window + &Fenêtre de débogage + + + + Open debugging and diagnostic console + Ouvrir une console de débogage et de diagnostic + + + + &File + &Fichier + + + + &Settings + &Réglages + + + + &Help + &Aide + + + + Tabs toolbar + Barre d'outils des onglets + + + + Actions toolbar + Barre d'actions + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Synchronisation avec le réseau en cours… + + + + ~%n block(s) remaining + + ~%n blocks restants + ~%n blocs restants + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Téléchargement des blocks de l'historique des transactions : 1% sur 2% (%3% effectués). + + + + Downloaded %1 blocks of transaction history. + Téléchargement de blocs de l'historique de transactions : 1% blocks + + + + Current difficulty is %1. + + + + + %n second(s) ago + + il y a %n seconde + il y a %n secondes + + + + + %n minute(s) ago + + il y a %n minute + il y a %n minutes + + + + + %n hour(s) ago + + il y a %n heure + il y a %n heures + + + + + %n day(s) ago + + il y a %n jour + il y a %n jours + + + + + Up to date + À jour + + + + Catching up... + Rattrapage en cours… + + + + Last received block was generated %1. + Le dernier block reçu à été généré %1. + + + + 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? + Cette transaction dépasse la limite autorisée. Vous pouvez tout de même effectuer cette opération, moyennant %1 de frais, qui seront envoyés aux noeuds qui valideront cette transaction, et dont l'objectif vise à supporter le réseau. Etes-vous d'accord pour payer ces frais ? + + + + Confirm transaction fee + Confirmer le Paiement des frais de transaction + + + + Sent transaction + Transaction envoyée + + + + Incoming transaction + Transaction entrante + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Date : %1 +Montant : %2 +Type : %3 +Adresse : %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + Prise en charge de l'URL + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Le portefeuille est <b>crypté</b> et est actuellement <b>déverrouillé</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Le portefeuille est <b>crypté</b> et actuellement <b>verrouillé</b> + + + + Backup Wallet + Sauvegarder le portefeuille + + + + Wallet Data (*.dat) + Données liées au portefeuille (*.dat) + + + + Backup Failed + Echec de la sauvegarde + + + + There was an error trying to save the wallet data to the new location. + Une erreur a été rencontrée lors de la tentative de sauvegarde du portefeuille vers la nouvelle destination. + + + + %n second(s) + + %n seconde + %n secondes + + + + + %n minute(s) + + %n minute + %n minutes + + + + + %n hour(s) + + %n heure + %n heures + + + + + %n day(s) + + %n jour + %n jours + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Staking.<br>Votre poids est de %1<br>Le poids du réseau est de %2<br>Temps estimé avant récompense %3 + + + + Not staking because wallet is locked + Ne stack pas, votre portefeuilles est verouillé + + + + Not staking because wallet is offline + Ne stack pas, votre portefeuilles est hors ligne + + + + Not staking because wallet is syncing + Ne stack pas, votre portefeuille est en cours de synchronisation + + + + Not staking because you don't have mature coins + Ne stack pas, vos monnaies ne sont pas encore matures + + + + Not staking + Pas de stacking + + + Show information about triangles + Afficher des informations au sujet du triangles + + + Send coins to a triangles address + Envoyer des monnaies vers une adresse triangles + + + Modify configuration options for triangles + Modification des options de configuration de triangles + + + triangles + triangles + + + &About triangles + A propos de triangles + + + triangles client + Client triangles + + + %n active connection(s) to triangles network + + %n connexion active au réseau triangles + %n connexions actives au réseau triangles + + + + About triangles card + Au sujet de la carte triangles + + + Show information about triangles card + Informations sur la carte triangles + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + L'adresse du portefeuille triangles n'as pas pu être correctement identifiée, car invalide ou malformée. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Une erreur fatale a été rencontrée. L'application triangles ne peut plus être s'exécuter de façon correcte et doit se terminer. + + + + WalletModel + + + Sending... + Envoi... + + + diff --git a/src/qt/locale/bitcoin_gl.qm b/src/qt/locale/triangles_gl.qm similarity index 53% rename from src/qt/locale/bitcoin_gl.qm rename to src/qt/locale/triangles_gl.qm index 58d5e17..f775cb4 100644 Binary files a/src/qt/locale/bitcoin_gl.qm and b/src/qt/locale/triangles_gl.qm differ diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/triangles_gl.ts similarity index 68% rename from src/qt/locale/bitcoin_gl.ts rename to src/qt/locale/triangles_gl.ts index 69c8a8e..1f25c13 100644 --- a/src/qt/locale/bitcoin_gl.ts +++ b/src/qt/locale/triangles_gl.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op Address Book - + - + Double-click to edit address or label Doble click para editar a dirección ou a etiqueta - + Create a new address Crear unha nova dirección @@ -57,52 +58,52 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op Copiar a dirección seleccionada ao cartafol - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Copiar Dirección Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Borrar a dirección actualmente seleccionada da listaxe - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Verificar Mensaxe - + + These are your Triangles 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. + + + + &Delete &Borrar @@ -119,7 +120,7 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op Export Address Book Data - + @@ -129,18 +130,18 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etiqueta @@ -180,12 +181,12 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,431 +307,6 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op Cambiouse con éxito o contrasinal do moedeiro. - - BitcoinGUI - - - Sign &message... - &Asinar mensaxe... - - - - Synchronizing with network... - Sincronizando coa rede... - - - - &Overview - &Vista xeral - - - - Show general overview of wallet - Amosar vista xeral do moedeiro - - - - &Transactions - &Transacciones - - - - Browse transaction history - Navegar historial de transaccións - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Saír - - - - Quit application - Saír da aplicación - - - - Show information about buynowcoin - - - - - About &Qt - Acerca de &Qt - - - - Show information about Qt - Amosar información acerca de Qt - - - - &Options... - &Opcións... - - - - &Encrypt Wallet... - &Encriptar Moedeiro... - - - - &Backup Wallet... - Copia de &Seguridade do Moedeiro... - - - - &Change Passphrase... - &Cambiar contrasinal... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Facer copia de seguridade do moedeiro noutra localización - - - - Change the passphrase used for wallet encryption - Cambiar o contrasinal empregado para a encriptación do moedeiro - - - - &Debug window - Ventana de &Depuración - - - - Open debugging and diagnostic console - Abrir consola de depuración e diagnóstico - - - - &Verify message... - &Verificar mensaxe... - - - - buynowcoin - - - - - Wallet - Moedeiro - - - - &About buynowcoin - - - - - &Show / Hide - &Amosar/Agachar - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Arquivo - - - - &Settings - Axus&tes - - - - &Help - A&xuda - - - - Tabs toolbar - Barra de ferramentas - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Actualizado - - - - Catching up... - Poñendo ao día... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transacción enviada - - - - Incoming transaction - Transacción entrante - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Data: %1 -Cantidade: %2 -Tipo: %3 -Dirección: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - O moedeiro está <b>encriptado</b> e actualmente <b>desbloqueado</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - O moedeiro está <b>encriptado</b> e actualmente <b>bloqueado</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n hora%n horas - - - - %n day(s) - %n día%n días - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -744,7 +320,7 @@ Dirección: %4 Coin Control - + @@ -774,7 +350,7 @@ Dirección: %4 Low Output: - + @@ -784,7 +360,7 @@ Dirección: %4 After Fee: - + @@ -814,7 +390,7 @@ Dirección: %4 Label - + Etiqueta @@ -890,7 +466,7 @@ Dirección: %4 Copy low output - + @@ -915,7 +491,7 @@ Dirección: %4 medium - + @@ -935,7 +511,7 @@ Dirección: %4 DUST - + @@ -949,7 +525,7 @@ Dirección: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -958,7 +534,7 @@ Dirección: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -967,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -985,7 +561,7 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + @@ -1008,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1018,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nova dirección para recibir - + New sending address Nova dirección para enviar - + Edit receiving address Modificar dirección para recibir - + Edit sending address Modificar dirección para enviar - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. A dirección introducida "%1" xa está no libro de direccións. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Non se puido desbloquear o moedeiro. @@ -1065,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Emprego: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipo + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiqueta + + + + To Address + + + + + From Address + + + + + Message + Mensaxe + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (sen etiqueta) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copiar a dirección seleccionada ao cartafol + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Borrar a dirección actualmente seleccionada da listaxe + + + + &Delete + &Borrar + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Arquivo separado por comas (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1120,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1130,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1164,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1174,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1190,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1249,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1264,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1275,12 +1197,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1295,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1306,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1328,15 +1250,15 @@ This label turns red, if the priority is smaller than "medium". Formulario - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + @@ -1351,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1369,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". O balance minado todavía non madurou - + Total: Total: - + Your current total balance O teu balance actual total - + <b>Recent transactions</b> <b>Transaccións recentes</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1405,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Importe: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1512,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1542,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1566,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1581,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Limpar consola - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1616,31 +1566,32 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Moedas Enviadas Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: Cantidade: @@ -1648,7 +1599,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1665,8 +1616,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1676,7 +1627,7 @@ This label turns red, if the priority is smaller than "medium". medium - + @@ -1686,30 +1637,30 @@ This label turns red, if the priority is smaller than "medium". Low Output: - + no - + non After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Enviar a múltiples receptores á vez @@ -1721,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1735,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1749,9 +1700,9 @@ This label turns red, if the priority is smaller than "medium". &Enviar - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1786,7 +1737,7 @@ This label turns red, if the priority is smaller than "medium". Copy low output - + @@ -1796,7 +1747,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1806,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1841,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1861,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1869,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formulario @@ -1883,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Introduce unha etiqueta para esta dirección para engadila ao teu libro de direccións + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiqueta: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1920,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar dirección dende portapapeis + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Enviar a múltiples receptores á vez + + + + Add &Recipient + Engadir &Receptor + + + + Remove all transaction fields + + + + + Clear &All + Limpar &Todo + + + + Confirm the send action + Confirmar a acción de envío + + + + S&end + &Enviar + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + A dirección de recepción non é válida, por favor compróbea. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Atopouse dirección duplicada, so se pode enviar a cada dirección unha vez por operación. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulario + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar dirección dende portapapeis + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Introduce unha etiqueta para esta dirección para engadila ao teu libro de direccións + + + + &Label: + &Etiqueta: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1948,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1985,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Restaurar todos os campos de sinatura de mensaxe @@ -2012,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Restaurar todos os campos de verificación de mensaxe - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Click en "Asinar Mensaxe" para xerar sinatura + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2118,12 +2299,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2148,7 +2332,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , propagado a % nodo, propagado a % nodos + + , propagado a % nodo + , propagado a % nodos + @@ -2194,14 +2381,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Crédito - + matures in %n more block(s) - madura nun bloque máismadura en %n bloques máis + + madura nun bloque máis + madura en %n bloques máis + @@ -2212,12 +2402,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Débito - + Transaction fee Tarifa de transacción @@ -2237,14 +2427,14 @@ This label turns red, if the priority is smaller than "medium". Comentario - + Transaction ID ID de Transacción - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2277,7 +2467,7 @@ This label turns red, if the priority is smaller than "medium". falso - + , has not been successfully broadcast yet , non foi propagado con éxito todavía @@ -2303,7 +2493,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Data @@ -2335,32 +2525,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Abrir para %n bloque máisAbrir para %n bloques máis + + Abrir para %n bloque máis + Abrir para %n bloques máis + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2403,7 +2601,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Estado da transacción. Pasa por riba deste campo para amosar o número de confirmacións. @@ -2534,7 +2732,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2579,12 +2777,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2598,32 +2796,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Emprego: - - Send command to -server or buynowcoind - - - - + List commands Listar comandos @@ -2638,17 +2818,7 @@ This label turns red, if the priority is smaller than "medium". Opcións: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) Especificar arquivo do moedeiro (dentro do directorio de datos) @@ -2665,12 +2835,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2690,12 +2860,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2715,22 +2885,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2740,22 +2910,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2780,12 +2950,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2793,12 +2963,7 @@ This label turns red, if the priority is smaller than "medium". Precaución: -paytxfee está posto moi algo! Esta é a tarifa de transacción que ti pagarás se envías unha transacción. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Precaución: erro lendo wallet.dat! Tódalas claves lidas correctamente, pero os datos de transacción ou as entradas do libro de direccións podrían estar ausentes ou incorrectos. @@ -2835,22 +3000,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2870,27 +3035,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Opcións SSL: (ver ńa Wiki Bitcoin as instrucción de configuración de SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Opcións SSL: (ver ńa Wiki Triangles as instrucción de configuración de SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2900,12 +3065,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2926,7 +3091,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2941,7 +3106,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2951,17 +3116,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2979,34 +3154,39 @@ This label turns red, if the priority is smaller than "medium". Contrasinal para conexións JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3031,17 +3211,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3061,17 +3241,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3091,17 +3271,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3111,27 +3291,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Imposible enlazar con %s neste ordenador (enlace devolveu erro %d, %s) Connect through socks proxy - + @@ -3146,7 +3316,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3154,17 +3324,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Erro cargando wallet.dat: Moedeiro corrupto - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Erro cargando wallet.dat @@ -3201,12 +3361,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3224,39 +3384,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Cargando índice de bloques... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Engadir un nodo ao que conectarse e tentar manter a conexión aberta - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Cargando moedeiro... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Non se pode desactualizar o moedeiro Cannot initialize keypool - + @@ -3293,4 +3483,486 @@ If the file does not exist, create it with owner-readable-only file permissions. Se o arquivo non existe, debes crealo con permisos de so lectura para o propietario. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Moedeiro + + + + &Overview + &Vista xeral + + + + Show general overview of wallet + Amosar vista xeral do moedeiro + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transacciones + + + + Browse transaction history + Navegar historial de transaccións + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Saír + + + + Quit application + Saír da aplicación + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Acerca de &Qt + + + + Show information about Qt + Amosar información acerca de Qt + + + + &Options... + &Opcións... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Amosar/Agachar + + + + &Encrypt Wallet... + &Encriptar Moedeiro... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + Copia de &Seguridade do Moedeiro... + + + + Backup wallet to another location + Facer copia de seguridade do moedeiro noutra localización + + + + &Change Passphrase... + &Cambiar contrasinal... + + + + Change the passphrase used for wallet encryption + Cambiar o contrasinal empregado para a encriptación do moedeiro + + + + &Unlock Wallet... + + + + + Unlock wallet + Desbloquear moedeiro + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + &Asinar mensaxe... + + + + &Verify message... + &Verificar mensaxe... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + Ventana de &Depuración + + + + Open debugging and diagnostic console + Abrir consola de depuración e diagnóstico + + + + &File + &Arquivo + + + + &Settings + Axus&tes + + + + &Help + A&xuda + + + + Tabs toolbar + Barra de ferramentas + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sincronizando coa rede... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Actualizado + + + + Catching up... + Poñendo ao día... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transacción enviada + + + + Incoming transaction + Transacción entrante + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Data: %1 +Cantidade: %2 +Tipo: %3 +Dirección: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + O moedeiro está <b>encriptado</b> e actualmente <b>desbloqueado</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + O moedeiro está <b>encriptado</b> e actualmente <b>bloqueado</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n hora + %n horas + + + + + %n day(s) + + %n día + %n días + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_he.qm b/src/qt/locale/triangles_he.qm similarity index 54% rename from src/qt/locale/bitcoin_he.qm rename to src/qt/locale/triangles_he.qm index 63c70c2..b20cf0f 100644 Binary files a/src/qt/locale/bitcoin_he.qm and b/src/qt/locale/triangles_he.qm differ diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/triangles_he.ts similarity index 68% rename from src/qt/locale/bitcoin_he.ts rename to src/qt/locale/triangles_he.ts index 9dd5e44..fcde5c6 100644 --- a/src/qt/locale/bitcoin_he.ts +++ b/src/qt/locale/triangles_he.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label לחץ לחיצה כפולה לערוך כתובת או תוית - + Create a new address יצירת כתובת חדשה @@ -57,52 +58,52 @@ This product includes software developed by the OpenSSL Project for use in the O העתק את הכתובת המסומנת ללוח העריכה - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address העתק כתובת Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list מחק את הכתובת שנבחרה מהרשימה - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + אמת הודעה - + + These are your Triangles 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. + + + + &Delete &מחק @@ -119,7 +120,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -129,18 +130,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label תוית @@ -180,12 +181,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,430 +307,6 @@ This product includes software developed by the OpenSSL Project for use in the O סיסמת הארנק שונתה בהצלחה. - - BitcoinGUI - - - Sign &message... - חתום על הודעה - - - - Synchronizing with network... - מסתנכרן עם הרשת... - - - - &Overview - &סקירה - - - - Show general overview of wallet - הצג סקירה כללית של הארנק - - - - &Transactions - &פעולות - - - - Browse transaction history - דפדף בהיסטוריית הפעולות - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - י&ציאה - - - - Quit application - סגור תוכנה - - - - Show information about buynowcoin - - - - - About &Qt - אודות Qt - - - - Show information about Qt - הצג מידע על Qt - - - - &Options... - &אפשרויות - - - - &Encrypt Wallet... - הצפן ארנק - - - - &Backup Wallet... - גיבוי ארנק - - - - &Change Passphrase... - שנה סיסמא - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - גיבוי הארנק למקום אחר - - - - Change the passphrase used for wallet encryption - שנה את הסיסמה להצפנת הארנק - - - - &Debug window - חלון ניפוי - - - - Open debugging and diagnostic console - פתח את לוח הבקרה לאבחון וניפוי - - - - &Verify message... - אמת הודעה... - - - - buynowcoin - - - - - Wallet - ארנק - - - - &About buynowcoin - - - - - &Show / Hide - הצג / הסתר - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &קובץ - - - - &Settings - ה&גדרות - - - - &Help - &עזרה - - - - Tabs toolbar - סרגל כלים טאבים - - - - Actions toolbar - - - - - - [testnet] - [רשת-בדיקה] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - עדכני - - - - Catching up... - מתעדכן... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - פעולה שנשלחה - - - - Incoming transaction - פעולה שהתקבלה - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - תאריך: %1 -כמות: %2 -סוג: %3 -כתובת: %4 - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - הארנק <b>מוצפן</b> וכרגע <b>פתוח</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - הארנק <b>מוצפן</b> וכרגע <b>נעול</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n שעה%n שעות - - - - %n day(s) - %n יום%n ימים - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -743,7 +320,7 @@ Address: %4 Coin Control - + @@ -773,7 +350,7 @@ Address: %4 Low Output: - + @@ -813,7 +390,7 @@ Address: %4 Label - + תוית @@ -874,12 +451,12 @@ Address: %4 Copy after fee - + Copy bytes - + @@ -889,12 +466,12 @@ Address: %4 Copy low output - + Copy change - + @@ -934,7 +511,7 @@ Address: %4 DUST - + @@ -948,7 +525,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -957,7 +534,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -966,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1007,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1017,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address כתובת חדשה לקבלה - + New sending address כתובת חדשה לשליחה - + Edit receiving address ערוך כתובת לקבלה - + Edit sending address ערוך כתובת לשליחה - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. הכתובת שהכנסת "%1" כבר נמצאת בפנקס הכתובות. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. פתיחת הארנק נכשלה. @@ -1064,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + שימוש: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + סוג + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + תוית + + + + To Address + + + + + From Address + + + + + Message + הודעה + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (ללא תוית) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + העתק את הכתובת המסומנת ללוח העריכה + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + מחק את הכתובת שנבחרה מהרשימה + + + + &Delete + &מחק + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + קובץ מופרד בפסיקים (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1119,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1129,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1163,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1173,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1189,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1248,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1263,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1274,12 +1197,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1294,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1305,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1327,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". טופס - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1350,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1368,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". מאזן שנכרה וטרם הבשיל - + Total: סך הכול: - + Your current total balance סך כל היתרה הנוכחית שלך - + <b>Recent transactions</b> <b>פעולות אחרונות</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1404,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + כמות: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1511,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1541,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1565,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1580,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console נקה לוח בקרה - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1615,6 +1566,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins שלח מטבעות @@ -1626,7 +1578,7 @@ This label turns red, if the priority is smaller than "medium". Inputs... - + @@ -1639,7 +1591,7 @@ This label turns red, if the priority is smaller than "medium". אין מספיק כספים! - + Quantity: כמות: @@ -1647,7 +1599,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1664,8 +1616,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1675,7 +1627,7 @@ This label turns red, if the priority is smaller than "medium". medium - + בינוני @@ -1685,12 +1637,12 @@ This label turns red, if the priority is smaller than "medium". Low Output: - + no - + לא @@ -1700,15 +1652,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once שלח למספר מקבלים בו-זמנית @@ -1720,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1734,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1748,9 +1700,9 @@ This label turns red, if the priority is smaller than "medium". שלח - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1770,12 +1722,12 @@ This label turns red, if the priority is smaller than "medium". Copy after fee - + Copy bytes - + @@ -1785,17 +1737,17 @@ This label turns red, if the priority is smaller than "medium". Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1805,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1840,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1860,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1868,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + טופס @@ -1882,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book הכנס תוית לכתובת הזאת כדי להכניס לפנקס הכתובות + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: ת&וית: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1919,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + שלח למספר מקבלים בו-זמנית + + + + Add &Recipient + הוסף מקבל + + + + Remove all transaction fields + + + + + Clear &All + נקה הכל + + + + Confirm the send action + אשר את פעולת השליחה + + + + S&end + שלח + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + כתובת המקבל אינה תקינה, אנא בדוק שנית. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + כתובת כפולה נמצאה, ניתן לשלוח לכל כתובת רק פעם אחת בכל פעולת שליחה. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + טופס + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + הכנס תוית לכתובת הזאת כדי להכניס לפנקס הכתובות + + + + &Label: + ת&וית: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1947,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1984,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields אפס את כל שדות החתימה על הודעה @@ -2011,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields אפס את כל שדות אימות הודעה - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature לחץ "חתום על ההודעה" כדי לחולל חתימה + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2117,12 +2299,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2147,7 +2332,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , הופץ דרך צומת אחד, הופץ דרך %n צמתים + + , הופץ דרך צומת אחד + , הופץ דרך %n צמתים + @@ -2193,14 +2381,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit זיכוי - + matures in %n more block(s) - מבשיל בעוד בלוק אחדמבשיל בעוד %n בלוקים + + מבשיל בעוד בלוק אחד + מבשיל בעוד %n בלוקים + @@ -2211,12 +2402,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit חיוב - + Transaction fee עמלת פעולה @@ -2236,14 +2427,14 @@ This label turns red, if the priority is smaller than "medium". הערה - + Transaction ID זיהוי פעולה - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2276,7 +2467,7 @@ This label turns red, if the priority is smaller than "medium". שקר - + , has not been successfully broadcast yet , טרם שודר בהצלחה @@ -2302,7 +2493,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date תאריך @@ -2334,32 +2525,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - פתח למשך בלוק %n יותרפתח למשך %n בלוקים נוספים + + פתח למשך בלוק %n יותר + פתח למשך %n בלוקים נוספים + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2402,7 +2601,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. מצב הפעולה. השהה את הסמן מעל שדה זה כדי לראות את מספר האישורים. @@ -2533,7 +2732,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2578,12 +2777,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2597,32 +2796,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: שימוש: - - Send command to -server or buynowcoind - - - - + List commands רשימת פקודות @@ -2637,19 +2818,9 @@ This label turns red, if the priority is smaller than "medium". אפשרויות: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2664,12 +2835,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2689,12 +2860,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2714,22 +2885,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2739,22 +2910,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2779,12 +2950,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2792,12 +2963,7 @@ This label turns red, if the priority is smaller than "medium". אזהרה: -paytxfee נקבע לערך מאד גבוה! זוהי עמלת הפעולה שתשלם אם אתה שולח פעולה. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. אזהרה: שגיאה בקריאת wallet.dat! כל המתפחות נקראו באופן תקין, אך נתוני הפעולות או ספר הכתובות עלולים להיות חסרים או שגויים. @@ -2834,22 +3000,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2869,27 +3035,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) + SSL options: (see the Triangles Wiki for SSL setup instructions) אפשרויות SSL: (ראה את הויקי של ביטקוין עבור הוראות הגדרת SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2899,12 +3065,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2925,7 +3091,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2940,7 +3106,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2950,17 +3116,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2978,34 +3154,39 @@ This label turns red, if the priority is smaller than "medium". סיסמה לחיבורי JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3030,17 +3211,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3060,17 +3241,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3090,17 +3271,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3110,27 +3291,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) לא מסוגל לקשור ל-%s במחשב זה (הקשירה החזירה שגיאה %d, %s) Connect through socks proxy - + @@ -3145,7 +3316,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3153,17 +3324,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f שגיאה בטעינת הקובץ wallet.dat: הארנק מושחת - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat שגיאה בטעינת הקובץ wallet.dat @@ -3200,12 +3361,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3223,39 +3384,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f טוען את אינדקס הבלוקים... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open הוסף צומת להתחברות ונסה לשמור את החיבור פתוח - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... טוען ארנק... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet לא יכול להוריד דרגת הארנק Cannot initialize keypool - + @@ -3292,4 +3483,485 @@ If the file does not exist, create it with owner-readable-only file permissions. אם הקובץ אינו קיים, צור אותו עם הרשאות קריאה לבעלים בלבד. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + ארנק + + + + &Overview + &סקירה + + + + Show general overview of wallet + הצג סקירה כללית של הארנק + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &פעולות + + + + Browse transaction history + דפדף בהיסטוריית הפעולות + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + י&ציאה + + + + Quit application + סגור תוכנה + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + אודות Qt + + + + Show information about Qt + הצג מידע על Qt + + + + &Options... + &אפשרויות + + + + Modify configuration options for Triangles + + + + + &Show / Hide + הצג / הסתר + + + + &Encrypt Wallet... + הצפן ארנק + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + גיבוי ארנק + + + + Backup wallet to another location + גיבוי הארנק למקום אחר + + + + &Change Passphrase... + שנה סיסמא + + + + Change the passphrase used for wallet encryption + שנה את הסיסמה להצפנת הארנק + + + + &Unlock Wallet... + + + + + Unlock wallet + פתיחת ארנק + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + חתום על הודעה + + + + &Verify message... + אמת הודעה... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + חלון ניפוי + + + + Open debugging and diagnostic console + פתח את לוח הבקרה לאבחון וניפוי + + + + &File + &קובץ + + + + &Settings + ה&גדרות + + + + &Help + &עזרה + + + + Tabs toolbar + סרגל כלים טאבים + + + + Actions toolbar + + + + + + [testnet] + [רשת-בדיקה] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + מסתנכרן עם הרשת... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + עדכני + + + + Catching up... + מתעדכן... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + פעולה שנשלחה + + + + Incoming transaction + פעולה שהתקבלה + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + תאריך: %1 +כמות: %2 +סוג: %3 +כתובת: %4 + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + הארנק <b>מוצפן</b> וכרגע <b>פתוח</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + הארנק <b>מוצפן</b> וכרגע <b>נעול</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n שעה + %n שעות + + + + + %n day(s) + + %n יום + %n ימים + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_hi_IN.qm b/src/qt/locale/triangles_hi_IN.qm similarity index 61% rename from src/qt/locale/bitcoin_hi_IN.qm rename to src/qt/locale/triangles_hi_IN.qm index 6ff541a..b090702 100644 Binary files a/src/qt/locale/bitcoin_hi_IN.qm and b/src/qt/locale/triangles_hi_IN.qm differ diff --git a/src/qt/locale/bitcoin_hi_IN.ts b/src/qt/locale/triangles_hi_IN.ts similarity index 60% rename from src/qt/locale/bitcoin_hi_IN.ts rename to src/qt/locale/triangles_hi_IN.ts index 62712bc..241e900 100644 --- a/src/qt/locale/bitcoin_hi_IN.ts +++ b/src/qt/locale/triangles_hi_IN.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label दो बार क्लिक करे पता या लेबल संपादन करने के लिए ! - + Create a new address नया पता लिखिए ! @@ -52,52 +53,52 @@ This product includes software developed by the OpenSSL Project for use in the O चुनिन्दा पते को सिस्टम क्लिपबोर्ड पर कापी करे ! - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &पता कॉपी करे Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &मिटाए !! @@ -114,7 +115,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label लेबल @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,432 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - नेटवर्क से समकालिक (मिल) रहा है ... - - - - &Overview - &विवरण - - - - Show general overview of wallet - वॉलेट का सामानया विवरण दिखाए ! - - - - &Transactions - & लेन-देन - - - - - Browse transaction history - देखिए पुराने लेन-देन के विवरण ! - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - बाहर जायें - - - - Quit application - अप्लिकेशन से बाहर निकलना ! - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - &विकल्प - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - &बैकप वॉलेट - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - पहचान शब्द/अक्षर जो वॉलेट एनक्रिपशन के लिए इस्तेमाल किया है उसे बदलिए! - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - वॉलेट - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &फाइल - - - - &Settings - &सेट्टिंग्स - - - - &Help - &मदद - - - - Tabs toolbar - टैबस टूलबार - - - - Actions toolbar - - - - - - [testnet] - [टेस्टनेट] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - नवीनतम - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - भेजी ट्रांजक्शन - - - - Incoming transaction - प्राप्त हुई ट्रांजक्शन - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - तारीख: %1\n -राशि: %2\n -टाइप: %3\n -पता:%4\n - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - वॉलेट एन्क्रिप्टेड है तथा अभी लॉक्ड नहीं है - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - वॉलेट एन्क्रिप्टेड है तथा अभी लॉक्ड है - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n घंटा%n घंटे - - - - %n day(s) - %n दिन%n दिनो - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -731,7 +307,7 @@ Address: %4 Network Alert - + @@ -739,17 +315,17 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + @@ -759,47 +335,47 @@ Address: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -809,7 +385,7 @@ Address: %4 Label - + लेबल @@ -824,7 +400,7 @@ Address: %4 Confirmations - + @@ -834,7 +410,7 @@ Address: %4 Priority - + @@ -855,87 +431,87 @@ Address: %4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -944,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -953,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -962,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -980,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1003,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1013,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address नया स्वीकार्य पता - + New sending address नया भेजने वाला पता - + Edit receiving address एडिट स्वीकार्य पता - + Edit sending address एडिट भेजने वाला पता - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. डाला गया पता "%1" एड्रेस बुक में पहले से ही मोजूद है| - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. वॉलेट को unlock नहीं किया जा सकता| @@ -1060,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + खपत : command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + टाइप + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + लेबल + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (कोई लेबल नही !) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + चुनिन्दा पते को सिस्टम क्लिपबोर्ड पर कापी करे ! + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &मिटाए !! + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1110,172 +1032,172 @@ This label turns red, if the priority is smaller than "medium". &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1290,29 +1212,29 @@ This label turns red, if the priority is smaller than "medium". &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1323,20 +1245,20 @@ This label turns red, if the priority is smaller than "medium". फार्म - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1346,53 +1268,81 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>हाल का लेन-देन</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1400,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + राशि : Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1458,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1478,127 +1428,127 @@ This label turns red, if the priority is smaller than "medium". Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1612,44 +1562,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins सिक्के भेजें| Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1661,68 +1612,68 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once एक साथ कई प्राप्तकर्ताओं को भेजें Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1731,8 +1682,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1742,17 +1693,17 @@ This label turns red, if the priority is smaller than "medium". S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1762,37 +1713,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1802,17 +1753,17 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + @@ -1822,32 +1773,37 @@ This label turns red, if the priority is smaller than "medium". The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1857,7 +1813,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1865,7 +1821,7 @@ This label turns red, if the priority is smaller than "medium". Form - + फार्म @@ -1879,24 +1835,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book आपकी एड्रेस बुक में इस एड्रेस के लिए एक लेबल लिखें + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: लेबल: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1916,12 +1882,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt-A + + + + Paste address from clipboard + Clipboard से एड्रेस paste करें + + + + Alt+P + Alt-P + + + + Send to multiple recipients at once + एक साथ कई प्राप्तकर्ताओं को भेजें + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + भेजने की पुष्टि करें + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + फार्म + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt-A + + + + Paste address from clipboard + Clipboard से एड्रेस paste करें + + + + Alt+P + Alt-P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + आपकी एड्रेस बुक में इस एड्रेस के लिए एक लेबल लिखें + + + + &Label: + लेबल: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1929,29 +2106,29 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1972,76 +2149,80 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2049,59 +2230,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2114,17 +2295,20 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + %1/offline - + @@ -2139,12 +2323,15 @@ This label turns red, if the priority is smaller than "medium". Status - + , broadcast through %n node(s) - + + + + @@ -2154,108 +2341,111 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2273,7 +2463,7 @@ This label turns red, if the priority is smaller than "medium". ग़लत - + , has not been successfully broadcast yet , अभी तक सफलतापूर्वक प्रसारित नहीं किया गया है @@ -2299,7 +2489,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date taareek @@ -2331,32 +2521,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2399,7 +2597,7 @@ This label turns red, if the priority is smaller than "medium". (लागू नहीं) - + Transaction status. Hover over this field to show number of confirmations. ट्रांसेक्शन स्तिथि| पुष्टियों की संख्या जानने के लिए इस जगह पर माउस लायें| @@ -2515,7 +2713,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2525,12 +2723,12 @@ This label turns red, if the priority is smaller than "medium". Show transaction details - + Export Transaction Data - + @@ -2575,12 +2773,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2594,32 +2792,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: खपत : - - Send command to -server or buynowcoind - - - - + List commands commands की लिस्ट बनाएं @@ -2634,19 +2814,9 @@ This label turns red, if the priority is smaller than "medium". विकल्प: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2656,102 +2826,102 @@ This label turns red, if the priority is smaller than "medium". Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2766,373 +2936,368 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + Allow JSON-RPC connections from specified IP address - + Send commands to node running on <ip> (default: 127.0.0.1) - + Execute command when the best block changes (%s in cmd is replaced by block hash) - + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + Upgrade wallet to latest format - + Set key pool size to <n> (default: 100) - + Rescan the block chain for missing wallet transactions - + How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + Use OpenSSL (https) for JSON-RPC connections - + Server certificate file (default: server.cert) - + Server private key (default: server.pem) - + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + This help message - + Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) - + Connect through socks proxy - + Allow DNS lookups for -addnode, -seednode and -connect - + @@ -3142,67 +3307,57 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + Error loading wallet.dat: Wallet corrupted - + - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat - + Invalid -proxy address: '%s' - + Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + Invalid amount for -paytxfee=<amount>: '%s' - + Error: could not start node - + Sending... - + @@ -3212,7 +3367,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Insufficient funds - + @@ -3220,44 +3375,79 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f ब्लॉक इंडेक्स आ रहा है... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... वॉलेट आ रहा है... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + @@ -3272,7 +3462,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f To use the %s option - + @@ -3284,7 +3474,489 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + वॉलेट + + + + &Overview + &विवरण + + + + Show general overview of wallet + वॉलेट का सामानया विवरण दिखाए ! + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + & लेन-देन + + + + + Browse transaction history + देखिए पुराने लेन-देन के विवरण ! + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + बाहर जायें + + + + Quit application + अप्लिकेशन से बाहर निकलना ! + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + &विकल्प + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &बैकप वॉलेट + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + पहचान शब्द/अक्षर जो वॉलेट एनक्रिपशन के लिए इस्तेमाल किया है उसे बदलिए! + + + + &Unlock Wallet... + + + + + Unlock wallet + वॉलेट खोलिए + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &फाइल + + + + &Settings + &सेट्टिंग्स + + + + &Help + &मदद + + + + Tabs toolbar + टैबस टूलबार + + + + Actions toolbar + + + + + + [testnet] + [टेस्टनेट] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + नेटवर्क से समकालिक (मिल) रहा है ... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + नवीनतम + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + भेजी ट्रांजक्शन + + + + Incoming transaction + प्राप्त हुई ट्रांजक्शन + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + तारीख: %1\n +राशि: %2\n +टाइप: %3\n +पता:%4\n + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + वॉलेट एन्क्रिप्टेड है तथा अभी लॉक्ड नहीं है + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + वॉलेट एन्क्रिप्टेड है तथा अभी लॉक्ड है + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n घंटा + %n घंटे + + + + + %n day(s) + + %n दिन + %n दिनो + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_hr.qm b/src/qt/locale/triangles_hr.qm new file mode 100644 index 0000000..dfb78df Binary files /dev/null and b/src/qt/locale/triangles_hr.qm differ diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/triangles_hr.ts similarity index 63% rename from src/qt/locale/bitcoin_hr.ts rename to src/qt/locale/triangles_hr.ts index 2e6a404..5f40566 100644 --- a/src/qt/locale/bitcoin_hr.ts +++ b/src/qt/locale/triangles_hr.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Dvostruki klik za uređivanje adrese ili oznake - + Create a new address Dodajte novu adresu @@ -52,52 +53,52 @@ This product includes software developed by the OpenSSL Project for use in the O Kopiraj trenutno odabranu adresu u međuspremnik - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Kopirati adresu Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + &Potvrdite poruku + + + + These are your Triangles 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. + + + + &Delete &Brisanje @@ -114,7 +115,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Oznaka @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,7 +231,7 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -240,7 +241,7 @@ This product includes software developed by the OpenSSL Project for use in the O IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -301,437 +302,12 @@ This product includes software developed by the OpenSSL Project for use in the O Lozinka novčanika je uspješno promijenjena. - - BitcoinGUI - - - Sign &message... - &Potpišite poruku... - - - - Synchronizing with network... - Usklađivanje s mrežom ... - - - - &Overview - &Pregled - - - - Show general overview of wallet - Prikaži opći pregled novčanika - - - - &Transactions - &Transakcije - - - - Browse transaction history - Pretraži povijest transakcija - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Izlaz - - - - Quit application - Izlazak iz programa - - - - Show information about buynowcoin - - - - - About &Qt - Više o &Qt - - - - Show information about Qt - Prikaži informacije o Qt - - - - &Options... - &Postavke - - - - &Encrypt Wallet... - &Šifriraj novčanik... - - - - &Backup Wallet... - &Backup novčanika... - - - - &Change Passphrase... - &Promijena lozinke... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Napravite sigurnosnu kopiju novčanika na drugoj lokaciji - - - - Change the passphrase used for wallet encryption - Promijenite lozinku za šifriranje novčanika - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - &Potvrdite poruku... - - - - buynowcoin - - - - - Wallet - Novčanik - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Datoteka - - - - &Settings - &Konfiguracija - - - - &Help - &Pomoć - - - - Tabs toolbar - Traka kartica - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Ažurno - - - - Catching up... - Ažuriranje... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Poslana transakcija - - - - Incoming transaction - Dolazna transakcija - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Datum:%1 -Iznos:%2 -Tip:%3 -Adresa:%4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Novčanik je <b>šifriran</b> i trenutno <b>otključan</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Novčanik je <b>šifriran</b> i trenutno <b>zaključan</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel Network Alert - + @@ -739,17 +315,17 @@ Adresa:%4 Coin Control - + Quantity: - + Bytes: - + @@ -759,47 +335,47 @@ Adresa:%4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -809,7 +385,7 @@ Adresa:%4 Label - + Oznaka @@ -824,7 +400,7 @@ Adresa:%4 Confirmations - + @@ -834,7 +410,7 @@ Adresa:%4 Priority - + @@ -855,87 +431,87 @@ Adresa:%4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -944,7 +520,7 @@ Adresa:%4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -953,7 +529,7 @@ Adresa:%4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -962,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -980,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1003,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1013,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nova adresa za primanje - + New sending address Nova adresa za slanje - + Edit receiving address Uredi adresu za primanje - + Edit sending address Uredi adresu za slanje - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Upisana adresa "%1" je već u adresaru. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Ne mogu otključati novčanik. @@ -1060,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Upotreba: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tip + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Oznaka + + + + To Address + + + + + From Address + + + + + Message + Poruka + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (bez oznake) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopiraj trenutno odabranu adresu u međuspremnik + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Brisanje + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1115,7 +1037,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1125,32 +1047,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1159,8 +1081,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1169,13 +1091,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1185,12 +1107,12 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + @@ -1205,7 +1127,7 @@ This label turns red, if the priority is smaller than "medium". SOCKS version of the proxy (e.g. 5) - + @@ -1240,12 +1162,12 @@ This label turns red, if the priority is smaller than "medium". User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1255,12 +1177,12 @@ This label turns red, if the priority is smaller than "medium". Choose the default subdivision unit to show in the interface and when sending coins. - Izaberite željeni najmanji dio bitcoina koji će biti prikazan u sučelju i koji će se koristiti za plaćanje. + Izaberite željeni najmanji dio trianglesa koji će biti prikazan u sučelju i koji će se koristiti za plaćanje. - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1270,12 +1192,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1290,7 +1212,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1301,18 +1223,18 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1323,20 +1245,20 @@ This label turns red, if the priority is smaller than "medium". Oblik - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1346,53 +1268,81 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: Ukupno: - + Your current total balance - + - + <b>Recent transactions</b> <b>Nedavne transakcije</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1400,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Iznos: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1492,7 +1442,7 @@ This label turns red, if the priority is smaller than "medium". Startup time - + @@ -1507,7 +1457,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1537,17 +1487,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1557,47 +1502,52 @@ This label turns red, if the priority is smaller than "medium". Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Očisti konzolu - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1611,44 +1561,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Slanje novca Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1660,51 +1611,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Pošalji k nekoliko primatelja odjednom @@ -1716,7 +1667,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1730,8 +1681,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1744,14 +1695,14 @@ This label turns red, if the priority is smaller than "medium". &Pošalji - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1761,37 +1712,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1801,12 +1752,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1836,17 +1787,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1856,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1864,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Oblik @@ -1878,24 +1834,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Unesite oznaku za ovu adresu kako bi ju dodali u vaš adresar + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Oznaka: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1915,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Zalijepi adresu iz međuspremnika + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Pošalji k nekoliko primatelja odjednom + + + + Add &Recipient + &Dodaj primatelja + + + + Remove all transaction fields + + + + + Clear &All + Obriši &sve + + + + Confirm the send action + Potvrdi akciju slanja + + + + S&end + &Pošalji + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Adresa primatelja je nevaljala, molimo provjerite je ponovo. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Pronašli smo adresu koja se ponavlja. U svakom plaćanju program može svaku adresu koristiti samo jedanput. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Oblik + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Zalijepi adresu iz međuspremnika + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Unesite oznaku za ovu adresu kako bi ju dodali u vaš adresar + + + + &Label: + &Oznaka: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1928,7 +2105,7 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + @@ -1943,14 +2120,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1976,17 +2153,22 @@ This label turns red, if the priority is smaller than "medium". Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + @@ -2003,44 +2185,43 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2048,13 +2229,13 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + @@ -2064,12 +2245,12 @@ This label turns red, if the priority is smaller than "medium". Private key for the entered address is not available. - + Message signing failed. - + @@ -2079,28 +2260,28 @@ This label turns red, if the priority is smaller than "medium". The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2113,12 +2294,16 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + + conflicted - + @@ -2143,7 +2328,11 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + + + @@ -2189,14 +2378,18 @@ This label turns red, if the priority is smaller than "medium". - + Credit Uplaćeno - + matures in %n more block(s) - + + + + + @@ -2207,12 +2400,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Zaduženje - + Transaction fee Naknada za transakciju @@ -2232,19 +2425,19 @@ This label turns red, if the priority is smaller than "medium". Komentar - + Transaction ID ID transakcije - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + @@ -2264,15 +2457,15 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet , još nije bio uspješno emitiran @@ -2298,7 +2491,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Datum @@ -2330,32 +2523,41 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2398,7 +2600,7 @@ This label turns red, if the priority is smaller than "medium". (n/d) - + Transaction status. Hover over this field to show number of confirmations. Status transakcije @@ -2514,7 +2716,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2524,12 +2726,12 @@ This label turns red, if the priority is smaller than "medium". Show transaction details - + Export Transaction Data - + @@ -2574,12 +2776,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2593,32 +2795,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Upotreba: - - Send command to -server or buynowcoind - - - - + List commands Prikaži komande @@ -2633,19 +2817,9 @@ This label turns red, if the priority is smaller than "medium". Postavke: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2660,12 +2834,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2675,22 +2849,22 @@ This label turns red, if the priority is smaller than "medium". Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2705,27 +2879,27 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2735,22 +2909,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2765,22 +2939,22 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2788,24 +2962,19 @@ This label turns red, if the priority is smaller than "medium". Upozorenje: -paytxfee je podešen na preveliki iznos. To je iznos koji ćete platiti za obradu transakcije. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + @@ -2820,72 +2989,72 @@ This label turns red, if the priority is smaller than "medium". Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL postavke: (za detalje o podešavanju SSL opcija vidi Bitcoin Wiki) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL postavke: (za detalje o podešavanju SSL opcija vidi Triangles Wiki) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2895,12 +3064,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2910,7 +3079,7 @@ This label turns red, if the priority is smaller than "medium". Shrink debug.log file on client startup (default: 1 when no -debug) - + @@ -2921,7 +3090,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2936,7 +3105,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2946,27 +3115,37 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + @@ -2974,34 +3153,39 @@ This label turns red, if the priority is smaller than "medium". Lozinka za JSON-RPC veze - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3021,22 +3205,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3056,17 +3240,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3086,17 +3270,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3106,27 +3290,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Program ne može koristiti %s na ovom računalu (bind returned error %d, %s) Connect through socks proxy - + @@ -3141,7 +3315,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3149,17 +3323,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Greška kod učitavanja wallet.dat: Novčanik pokvaren - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Greška kod učitavanja wallet.dat @@ -3171,22 +3335,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + @@ -3196,12 +3360,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3219,39 +3383,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Učitavanje indeksa blokova... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Unesite nod s kojim se želite spojiti and attempt to keep the connection open - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Učitavanje novčanika... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Nije moguće novčanik vratiti na prijašnju verziju. Cannot initialize keypool - + @@ -3271,7 +3465,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f To use the %s option - + @@ -3283,7 +3477,499 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Novčanik + + + + &Overview + &Pregled + + + + Show general overview of wallet + Prikaži opći pregled novčanika + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transakcije + + + + Browse transaction history + Pretraži povijest transakcija + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Izlaz + + + + Quit application + Izlazak iz programa + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Više o &Qt + + + + Show information about Qt + Prikaži informacije o Qt + + + + &Options... + &Postavke + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + &Šifriraj novčanik... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Backup novčanika... + + + + Backup wallet to another location + Napravite sigurnosnu kopiju novčanika na drugoj lokaciji + + + + &Change Passphrase... + &Promijena lozinke... + + + + Change the passphrase used for wallet encryption + Promijenite lozinku za šifriranje novčanika + + + + &Unlock Wallet... + + + + + Unlock wallet + Otključaj novčanik + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + &Potpišite poruku... + + + + &Verify message... + &Potvrdite poruku... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Datoteka + + + + &Settings + &Konfiguracija + + + + &Help + &Pomoć + + + + Tabs toolbar + Traka kartica + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Usklađivanje s mrežom ... + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + Ažurno + + + + Catching up... + Ažuriranje... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Poslana transakcija + + + + Incoming transaction + Dolazna transakcija + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Datum:%1 +Iznos:%2 +Tip:%3 +Adresa:%4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Novčanik je <b>šifriran</b> i trenutno <b>otključan</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Novčanik je <b>šifriran</b> i trenutno <b>zaključan</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + + + + + + + + %n day(s) + + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_hu.qm b/src/qt/locale/triangles_hu.qm new file mode 100644 index 0000000..81f1ac9 Binary files /dev/null and b/src/qt/locale/triangles_hu.qm differ diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/triangles_hu.ts similarity index 66% rename from src/qt/locale/bitcoin_hu.ts rename to src/qt/locale/triangles_hu.ts index 52b0bdc..594b6fe 100644 --- a/src/qt/locale/bitcoin_hu.ts +++ b/src/qt/locale/triangles_hu.ts @@ -1,25 +1,30 @@ - + + + AboutDialog - About buynowcoin - A buynowcoin-ról + About Triangles + A triangles-ról + + + <b>triangles</b> version + <b>triangles</b> verzió - <b>buynowcoin</b> version - <b>buynowcoin</b> verzió + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -41,12 +46,17 @@ Ez a termék tartalmaz az OpenSSL Project által az OpenSSL Toolkit-hez (http:// Címjegyzék - + + These are your Triangles 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. + + + + Double-click to edit address or label Kattints duplán a cím vagy címke szerkesztéséhez - + Create a new address Új cím létrehozása @@ -56,17 +66,21 @@ Ez a termék tartalmaz az OpenSSL Project által az OpenSSL Toolkit-hez (http:// A kiválasztott cím másolása a vágólapra - + + Sign a message to prove you own a TRI address + + + + &New Address &Új Cím - - These are your buynowcoin 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. - Ezek a buynowcoin-címeid a fizetések fogadásához. Érdemes minden küldőnek egy külön címet létrehozni, hogy könnyebben követhesd személyenként a tranzakciókat. + These are your triangles 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. + Ezek a triangles-címeid a fizetések fogadásához. Érdemes minden küldőnek egy külön címet létrehozni, hogy könnyebben követhesd személyenként a tranzakciókat. - + &Copy Address &Cím Másolása @@ -76,27 +90,30 @@ Ez a termék tartalmaz az OpenSSL Project által az OpenSSL Toolkit-hez (http:// &QR Kód Mutatása - - Sign a message to prove you own a buynowcoin address - Írj alá egy üzenetet, hogy bizonyíthasd egy buynowcoin-cím birtoklását + Sign a message to prove you own a triangles address + Írj alá egy üzenetet, hogy bizonyíthasd egy triangles-cím birtoklását - + Sign &Message &Üzenet Aláírása - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list A kiválasztott cím törlése a listáról - - Verify a message to ensure it was signed with a specified buynowcoin address - Hitelesíts egy üzenetet ahhoz, hogy bebizonyosodjon buynowcoin-cím alapján a feladó kiléte + Verify a message to ensure it was signed with a specified triangles address + Hitelesíts egy üzenetet ahhoz, hogy bebizonyosodjon triangles-cím alapján a feladó kiléte - + &Verify Message Üzenet &Hitelesítése @@ -139,7 +156,7 @@ Ez a termék tartalmaz az OpenSSL Project által az OpenSSL Toolkit-hez (http:// AddressTableModel - + Label Címke @@ -250,7 +267,7 @@ Ez a termék tartalmaz az OpenSSL Project által az OpenSSL Toolkit-hez (http:// Warning: The Caps Lock key is on! - + @@ -260,8 +277,8 @@ Ez a termék tartalmaz az OpenSSL Project által az OpenSSL Toolkit-hez (http:// - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -305,431 +322,6 @@ Ez a termék tartalmaz az OpenSSL Project által az OpenSSL Toolkit-hez (http:// Jelszó megváltoztatva. - - BitcoinGUI - - - Sign &message... - Üzenet aláírása... - - - - Synchronizing with network... - Szinkronizálás a hálózattal... - - - - &Overview - &Áttekintés - - - - Show general overview of wallet - Tárca általános áttekintése - - - - &Transactions - &Tranzakciók - - - - Browse transaction history - Tranzakciótörténet megtekintése - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Kilépés - - - - Quit application - Kilépés - - - - Show information about buynowcoin - - - - - About &Qt - A &Qt-ról - - - - Show information about Qt - Információk a Qt ról - - - - &Options... - &Opciók... - - - - &Encrypt Wallet... - Tárca &kódolása... - - - - &Backup Wallet... - &Bisztonsági másolat készítése a Tárcáról - - - - &Change Passphrase... - Jelszó &megváltoztatása... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Biztonsági másolat készítése a Tárcáról egy másik helyre - - - - Change the passphrase used for wallet encryption - Tárcakódoló jelszó megváltoztatása - - - - &Debug window - &Debug ablak - - - - Open debugging and diagnostic console - Hibakereső és diagnosztikai konzol megnyitása - - - - &Verify message... - Üzenet &valódiságának ellenőrzése - - - - buynowcoin - - - - - Wallet - Tárca - - - - &About buynowcoin - - - - - &Show / Hide - &Mutat / Elrejt - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Fájl - - - - &Settings - &Beállítások - - - - &Help - &Súgó - - - - Tabs toolbar - Fül eszköztár - - - - Actions toolbar - - - - - - [testnet] - [teszthálózat] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Naprakész - - - - Catching up... - Frissítés... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Tranzakció elküldve. - - - - Incoming transaction - Beérkező tranzakció - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Dátum: %1 -Összeg: %2 -Típus: %3 -Cím: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Tárca <b>kódolva</b> és jelenleg <b>nyitva</b>. - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Tárca <b>kódolva</b> és jelenleg <b>zárva</b>. - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -743,17 +335,17 @@ Cím: %4 Coin Control - + Quantity: - + Bytes: - + @@ -763,47 +355,47 @@ Cím: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -813,7 +405,7 @@ Cím: %4 Label - + Címke @@ -828,7 +420,7 @@ Cím: %4 Confirmations - + @@ -838,7 +430,7 @@ Cím: %4 Priority - + @@ -864,82 +456,82 @@ Cím: %4 Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -948,7 +540,7 @@ Cím: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -957,7 +549,7 @@ Cím: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -966,14 +558,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -984,12 +576,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1007,7 +599,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1017,40 +609,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Új fogadó cím - + New sending address Új küldő cím - + Edit receiving address Fogadó cím szerkesztése - + Edit sending address Küldő cím szerkesztése - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. A megadott "%1" cím már szerepel a címjegyzékben. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Tárca feloldása sikertelen @@ -1064,44 +661,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Használat: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Típus + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Címke + + + + To Address + + + + + From Address + + + + + Message + Üzenet + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (nincs címke) + + + + MessagePage + + + Address Book + Címjegyzék + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + A kiválasztott cím másolása a vágólapra + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + A kiválasztott cím törlése a listáról + + + + &Delete + &Törlés + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Vesszővel elválasztott fájl (*.csv) + + + + Error exporting + Hiba exportálás + + + + Could not write to file %1. + Nem lehetett írni a fájlt a következő helyen: %1. @@ -1119,7 +1057,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1129,32 +1067,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1163,8 +1101,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1173,13 +1111,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1189,7 +1127,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1248,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1263,8 +1201,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1274,12 +1212,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1294,7 +1232,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1305,13 +1243,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1327,20 +1265,20 @@ This label turns red, if the priority is smaller than "medium". Űrlap - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1350,7 +1288,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1368,29 +1306,57 @@ This label turns red, if the priority is smaller than "medium". Bányászott egyenleg amely még nem érett be. - + Total: Összesen: - + Your current total balance Aktuális egyenleged - + <b>Recent transactions</b> <b>Legutóbbi tranzakciók</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1404,57 +1370,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Összeg: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1511,7 +1477,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1541,17 +1507,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1565,13 +1526,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1580,18 +1541,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Konzol törlése - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1615,44 +1581,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Érmék küldése Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1664,51 +1631,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Küldés több címzettnek egyszerre @@ -1720,7 +1687,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1734,8 +1701,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1748,14 +1715,14 @@ This label turns red, if the priority is smaller than "medium". &Küldés - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1765,37 +1732,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1805,12 +1772,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1825,7 +1792,7 @@ This label turns red, if the priority is smaller than "medium". The amount exceeds your balance. - Nincs ennyi bitcoin az egyenlegeden. + Nincs ennyi triangles az egyenlegeden. @@ -1840,17 +1807,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1860,7 +1832,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1868,7 +1840,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Űrlap @@ -1882,25 +1854,35 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Milyen címkével kerüljön be ez a cím a címtáradba? + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: Címke: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1920,12 +1902,224 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Cím beillesztése a vágólapról + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Küldés több címzettnek egyszerre + + + + Add &Recipient + &Címzett hozzáadása + + + + Remove all transaction fields + + + + + Clear &All + Mindent &töröl + + + + Confirm the send action + Küldés megerősítése + + + + S&end + &Küldés + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + A címzett címe érvénytelen, kérlek, ellenőrizd. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Többször szerepel ugyanaz a cím. Egy küldési műveletben egy címre csak egyszer lehet küldeni. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Űrlap + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Cím beillesztése a vágólapról + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Milyen címkével kerüljön be ez a cím a címtáradba? + + + + + &Label: + Címke: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1933,7 +2127,7 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + @@ -1948,14 +2142,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1985,13 +2179,18 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + @@ -2012,34 +2211,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2059,17 +2257,17 @@ This label turns red, if the priority is smaller than "medium". The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + @@ -2095,7 +2293,7 @@ This label turns red, if the priority is smaller than "medium". The signature did not match the message digest. - + @@ -2118,17 +2316,19 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + conflicted - + %1/offline - + @@ -2148,7 +2348,9 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + @@ -2158,7 +2360,7 @@ This label turns red, if the priority is smaller than "medium". Source - + @@ -2194,14 +2396,16 @@ This label turns red, if the priority is smaller than "medium". - + Credit Jóváírás - + matures in %n more block(s) - + + + @@ -2212,12 +2416,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Terhelés - + Transaction fee Tranzakciós díj @@ -2237,14 +2441,14 @@ This label turns red, if the priority is smaller than "medium". Megjegyzés - + Transaction ID Tranzakcióazonosító - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2277,7 +2481,7 @@ This label turns red, if the priority is smaller than "medium". hamis - + , has not been successfully broadcast yet , még nem sikerült elküldeni. @@ -2303,7 +2507,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Dátum @@ -2335,32 +2539,39 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2403,7 +2614,7 @@ This label turns red, if the priority is smaller than "medium". (nincs) - + Transaction status. Hover over this field to show number of confirmations. Tranzakció állapota. Húzd ide a kurzort, hogy lásd a megerősítések számát. @@ -2534,7 +2745,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2579,12 +2790,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Hiba exportálás Could not write to file %1. - + Nem lehetett írni a fájlt a következő helyen: %1. @@ -2598,32 +2809,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Használat: - - Send command to -server or buynowcoind - - - - + List commands Parancsok kilistázása @@ -2641,19 +2834,9 @@ This label turns red, if the priority is smaller than "medium". - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2669,12 +2852,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2694,12 +2877,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2714,27 +2897,27 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2745,22 +2928,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2777,22 +2960,22 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2800,29 +2983,24 @@ This label turns red, if the priority is smaller than "medium". Figyelem: a -paytxfee nagyon magas. Ennyi tranzakciós díjat fogsz fizetni, ha elküldöd a tranzakciót. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + @@ -2832,7 +3010,7 @@ This label turns red, if the priority is smaller than "medium". Discover own IP address (default: 1 when listening and no -externalip) - + @@ -2842,62 +3020,62 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL-opciók: (lásd a Bitcoin Wiki SSL-beállítási instrukcióit) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL-opciók: (lásd a Triangles Wiki SSL-beállítási instrukcióit) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2907,22 +3085,22 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + @@ -2933,7 +3111,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2948,7 +3126,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2959,27 +3137,37 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + @@ -2988,34 +3176,39 @@ This label turns red, if the priority is smaller than "medium". - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3042,17 +3235,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3074,17 +3267,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3107,17 +3300,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3128,27 +3321,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) A %s nem elérhető ezen a gépen (bind returned error %d, %s) Connect through socks proxy - + @@ -3163,7 +3346,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3171,17 +3354,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Hiba a wallet.dat betöltése közben: meghibásodott tárca - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Hiba az wallet.dat betöltése közben @@ -3218,12 +3391,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3233,7 +3406,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Insufficient funds - Nincs elég bitcoinod. + Nincs elég trianglesod. @@ -3241,39 +3414,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Blokkindex betöltése... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Elérendő csomópont megadása and attempt to keep the connection open - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Tárca betöltése... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Nem sikerült a Tárca visszaállítása a korábbi verzióra Cannot initialize keypool - + @@ -3310,4 +3513,476 @@ If the file does not exist, create it with owner-readable-only file permissions. Ha a fájl nem létezik, hozd létre 'csak a felhasználó által olvasható' fájl engedéllyel - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Tárca + + + + &Overview + &Áttekintés + + + + Show general overview of wallet + Tárca általános áttekintése + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Tranzakciók + + + + Browse transaction history + Tranzakciótörténet megtekintése + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Kilépés + + + + Quit application + Kilépés + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + A &Qt-ról + + + + Show information about Qt + Információk a Qt ról + + + + &Options... + &Opciók... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Mutat / Elrejt + + + + &Encrypt Wallet... + Tárca &kódolása... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Bisztonsági másolat készítése a Tárcáról + + + + Backup wallet to another location + Biztonsági másolat készítése a Tárcáról egy másik helyre + + + + &Change Passphrase... + Jelszó &megváltoztatása... + + + + Change the passphrase used for wallet encryption + Tárcakódoló jelszó megváltoztatása + + + + &Unlock Wallet... + + + + + Unlock wallet + Tárca feloldása + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Üzenet aláírása... + + + + &Verify message... + Üzenet &valódiságának ellenőrzése + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + &Debug ablak + + + + Open debugging and diagnostic console + Hibakereső és diagnosztikai konzol megnyitása + + + + &File + &Fájl + + + + &Settings + &Beállítások + + + + &Help + &Súgó + + + + Tabs toolbar + Fül eszköztár + + + + Actions toolbar + + + + + + [testnet] + [teszthálózat] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + Szinkronizálás a hálózattal... + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + Naprakész + + + + Catching up... + Frissítés... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Tranzakció elküldve. + + + + Incoming transaction + Beérkező tranzakció + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Dátum: %1 +Összeg: %2 +Típus: %3 +Cím: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Tárca <b>kódolva</b> és jelenleg <b>nyitva</b>. + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Tárca <b>kódolva</b> és jelenleg <b>zárva</b>. + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + + + + + + %n day(s) + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_id_ID.qm b/src/qt/locale/triangles_id_ID.qm new file mode 100644 index 0000000..1f04d0f Binary files /dev/null and b/src/qt/locale/triangles_id_ID.qm differ diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/triangles_id_ID.ts similarity index 63% rename from src/qt/locale/bitcoin_id_ID.ts rename to src/qt/locale/triangles_id_ID.ts index 89a92a3..feb860e 100644 --- a/src/qt/locale/bitcoin_id_ID.ts +++ b/src/qt/locale/triangles_id_ID.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Klik-ganda untuk mengubah alamat atau label - + Create a new address Buat alamat baru @@ -52,52 +53,52 @@ This product includes software developed by the OpenSSL Project for use in the O Salin alamat yang dipilih ke clipboard - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Salin Alamat Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Hapus @@ -114,7 +115,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Label @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,432 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - Pesan &penanda... - - - - Synchronizing with network... - Sinkronisasi dengan jaringan... - - - - &Overview - &Kilasan - - - - Show general overview of wallet - Tampilkan kilasan umum dari dompet - - - - &Transactions - &Transaksi - - - - Browse transaction history - Jelajah sejarah transaksi - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - K&eluar - - - - Quit application - Keluar dari aplikasi - - - - Show information about buynowcoin - - - - - About &Qt - Mengenai &Qt - - - - Show information about Qt - Tampilkan informasi mengenai Qt - - - - &Options... - &Pilihan... - - - - &Encrypt Wallet... - %Enkripsi Dompet... - - - - &Backup Wallet... - &Cadangkan Dompet... - - - - &Change Passphrase... - &Ubah Kata Kunci... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Cadangkan dompet ke lokasi lain - - - - Change the passphrase used for wallet encryption - Ubah kata kunci yang digunakan untuk enkripsi dompet - - - - &Debug window - &Jendela Debug - - - - Open debugging and diagnostic console - Buka konsol debug dan diagnosa - - - - &Verify message... - &Verifikasi pesan... - - - - buynowcoin - - - - - Wallet - Dompet - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Berkas - - - - &Settings - &Pengaturan - - - - &Help - &Bantuan - - - - Tabs toolbar - Baris tab - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Terbaru - - - - Catching up... - Menyusul... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transaksi terkirim - - - - Incoming transaction - Transaksi diterima - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Tanggal: %1 -Jumlah: %2 -Jenis: %3 -Alamat: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Dompet saat ini <b>terenkripsi</b> dan <b>terbuka</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Dompet saat ini <b>terenkripsi</b> dan <b>terkunci</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -739,17 +315,17 @@ Alamat: %4 Coin Control - + Quantity: - + Bytes: - + @@ -759,47 +335,47 @@ Alamat: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -809,7 +385,7 @@ Alamat: %4 Label - + Label @@ -824,7 +400,7 @@ Alamat: %4 Confirmations - + @@ -834,7 +410,7 @@ Alamat: %4 Priority - + @@ -855,87 +431,87 @@ Alamat: %4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -944,7 +520,7 @@ Alamat: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -953,7 +529,7 @@ Alamat: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -962,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -980,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1003,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1013,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Alamat menerima baru - + New sending address Alamat mengirim baru - + Edit receiving address Ubah alamat menerima - + Edit sending address Ubah alamat mengirim - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Alamat yang dimasukkan "%1" sudah ada di dalam buku alamat. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Tidak dapat membuka dompet. @@ -1060,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Penggunaan: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Jenis + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Label + + + + To Address + + + + + From Address + + + + + Message + Pesan: + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (tidak ada label) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Salin alamat yang dipilih ke clipboard + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Hapus + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1115,7 +1037,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1125,32 +1047,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1159,8 +1081,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1169,13 +1091,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1185,7 +1107,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1225,7 +1147,7 @@ This label turns red, if the priority is smaller than "medium". 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. - + @@ -1244,8 +1166,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1255,12 +1177,12 @@ This label turns red, if the priority is smaller than "medium". Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1270,12 +1192,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1290,7 +1212,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1301,13 +1223,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1323,20 +1245,20 @@ This label turns red, if the priority is smaller than "medium". Formulir - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1346,47 +1268,75 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Transaksi sebelumnya</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1400,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Jumlah: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1487,7 +1437,7 @@ This label turns red, if the priority is smaller than "medium". Using OpenSSL version - + @@ -1507,7 +1457,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1537,17 +1487,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1561,33 +1506,38 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Bersihkan konsol - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1611,44 +1561,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Kirim Koin Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1660,63 +1611,63 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Kirim ke beberapa penerima sekaligus Add &Recipient - + Remove all transaction fields - + @@ -1730,8 +1681,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1741,17 +1692,17 @@ This label turns red, if the priority is smaller than "medium". S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1761,37 +1712,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1801,17 +1752,17 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + @@ -1836,17 +1787,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1856,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1864,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formulir @@ -1878,24 +1834,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Masukkan label bagi alamat ini untuk menambahkannya ke buku alamat Anda + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Label: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1915,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+J + + + + Paste address from clipboard + Tempel alamat dari salinan + + + + Alt+P + Alt+B + + + + Send to multiple recipients at once + Kirim ke beberapa penerima sekaligus + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + Hapus %Semua + + + + Confirm the send action + Konfirmasi aksi pengiriman + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Ditemukan alamat ganda, hanya dapat mengirim ke tiap alamat sekali per operasi pengiriman. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulir + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+J + + + + Paste address from clipboard + Tempel alamat dari salinan + + + + Alt+P + Alt+B + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Masukkan label bagi alamat ini untuk menambahkannya ke buku alamat Anda + + + + &Label: + &Label: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1928,29 +2105,29 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1971,22 +2148,27 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + @@ -1998,43 +2180,42 @@ This label turns red, if the priority is smaller than "medium". &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2054,53 +2235,53 @@ This label turns red, if the priority is smaller than "medium". The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2113,17 +2294,19 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + conflicted - + %1/offline - + @@ -2143,7 +2326,9 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + @@ -2153,12 +2338,12 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + @@ -2177,49 +2362,51 @@ This label turns red, if the priority is smaller than "medium". own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + @@ -2229,22 +2416,22 @@ This label turns red, if the priority is smaller than "medium". Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + @@ -2254,7 +2441,7 @@ This label turns red, if the priority is smaller than "medium". Inputs - + @@ -2264,15 +2451,15 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet , belum berhasil disiarkan @@ -2298,7 +2485,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Tanggal @@ -2330,32 +2517,39 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2398,7 +2592,7 @@ This label turns red, if the priority is smaller than "medium". (t/s) - + Transaction status. Hover over this field to show number of confirmations. Status transaksi. Arahkan ke bagian ini untuk menampilkan jumlah konfrimasi. @@ -2514,7 +2708,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2529,7 +2723,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2574,12 +2768,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2593,32 +2787,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Penggunaan: - - Send command to -server or buynowcoind - - - - + List commands Daftar perintah @@ -2633,19 +2809,9 @@ This label turns red, if the priority is smaller than "medium". Pilihan: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2660,12 +2826,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2685,12 +2851,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2705,27 +2871,27 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2735,22 +2901,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2765,127 +2931,117 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + @@ -2895,48 +3051,48 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2946,27 +3102,37 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + @@ -2974,34 +3140,39 @@ This label turns red, if the priority is smaller than "medium". Kata sandi untuk hubungan JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3021,22 +3192,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3056,17 +3227,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3086,17 +3257,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3106,27 +3277,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Tidak dapat mengikat ke %s dengan komputer ini (ikatan gagal %d, %s) Connect through socks proxy - + @@ -3141,7 +3302,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3149,17 +3310,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Gagal memuat wallet.dat: Dompet rusak - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Gagal memuat wallet.dat @@ -3196,12 +3347,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3219,39 +3370,74 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Memuat indeks blok... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Tambahkan node untuk dihubungkan dan upaya untuk menjaga hubungan tetap terbuka - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - - + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Memuat dompet... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Tidak dapat menurunkan versi dompet Cannot initialize keypool - + @@ -3288,4 +3474,476 @@ If the file does not exist, create it with owner-readable-only file permissions. Jika berkas tidak ada, buatlah dengan permisi berkas hanya-dapat-dibaca-oleh-pemilik. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Dompet + + + + &Overview + &Kilasan + + + + Show general overview of wallet + Tampilkan kilasan umum dari dompet + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transaksi + + + + Browse transaction history + Jelajah sejarah transaksi + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + K&eluar + + + + Quit application + Keluar dari aplikasi + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Mengenai &Qt + + + + Show information about Qt + Tampilkan informasi mengenai Qt + + + + &Options... + &Pilihan... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + %Enkripsi Dompet... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Cadangkan Dompet... + + + + Backup wallet to another location + Cadangkan dompet ke lokasi lain + + + + &Change Passphrase... + &Ubah Kata Kunci... + + + + Change the passphrase used for wallet encryption + Ubah kata kunci yang digunakan untuk enkripsi dompet + + + + &Unlock Wallet... + + + + + Unlock wallet + Buka dompet + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Pesan &penanda... + + + + &Verify message... + &Verifikasi pesan... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + &Jendela Debug + + + + Open debugging and diagnostic console + Buka konsol debug dan diagnosa + + + + &File + &Berkas + + + + &Settings + &Pengaturan + + + + &Help + &Bantuan + + + + Tabs toolbar + Baris tab + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + Sinkronisasi dengan jaringan... + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + Terbaru + + + + Catching up... + Menyusul... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transaksi terkirim + + + + Incoming transaction + Transaksi diterima + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Tanggal: %1 +Jumlah: %2 +Jenis: %3 +Alamat: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Dompet saat ini <b>terenkripsi</b> dan <b>terbuka</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Dompet saat ini <b>terenkripsi</b> dan <b>terkunci</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + + + + + + %n day(s) + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_it.qm b/src/qt/locale/triangles_it.qm new file mode 100644 index 0000000..1c9d75a Binary files /dev/null and b/src/qt/locale/triangles_it.qm differ diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/triangles_it.ts similarity index 69% rename from src/qt/locale/bitcoin_it.ts rename to src/qt/locale/triangles_it.ts index 248a351..f0bc237 100644 --- a/src/qt/locale/bitcoin_it.ts +++ b/src/qt/locale/triangles_it.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso Address Book - + - + Double-click to edit address or label Fai doppio click per modificare o cancellare l'etichetta - + Create a new address Crea un nuovo indirizzo @@ -57,52 +58,52 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso Copia l'indirizzo attualmente selezionato nella clipboard - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Copia l'indirizzo Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Cancella l'indirizzo attualmente selezionato dalla lista - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Verifica Messaggio - + + These are your Triangles 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. + + + + &Delete &Cancella @@ -119,7 +120,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso Export Address Book Data - + @@ -129,18 +130,18 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etichetta @@ -180,12 +181,12 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,432 +307,6 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso Passphrase del portamonete modificata con successo. - - BitcoinGUI - - - Sign &message... - Firma il &messaggio... - - - - Synchronizing with network... - Sto sincronizzando con la rete... - - - - &Overview - &Sintesi - - - - Show general overview of wallet - Mostra lo stato generale del portamonete - - - - &Transactions - &Transazioni - - - - Browse transaction history - Cerca nelle transazioni - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Esci - - - - Quit application - Chiudi applicazione - - - - Show information about buynowcoin - - - - - About &Qt - Informazioni su &Qt - - - - Show information about Qt - Mostra informazioni su Qt - - - - &Options... - &Opzioni... - - - - &Encrypt Wallet... - &Cifra il portamonete... - - - - &Backup Wallet... - &Backup Portamonete... - - - - &Change Passphrase... - &Cambia la passphrase... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Backup portamonete in un'altra locazione - - - - Change the passphrase used for wallet encryption - Cambia la passphrase per la cifratura del portamonete - - - - &Debug window - Finestra &Debug - - - - Open debugging and diagnostic console - Apri la console di degugging e diagnostica - - - - &Verify message... - &Verifica messaggio... - - - - buynowcoin - - - - - Wallet - Portamonete - - - - &About buynowcoin - - - - - &Show / Hide - &Mostra/Nascondi - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &File - - - - &Settings - &Impostazioni - - - - &Help - &Aiuto - - - - Tabs toolbar - Barra degli strumenti "Tabs" - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Aggiornato - - - - Catching up... - In aggiornamento... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transazione inviata - - - - Incoming transaction - Transazione ricevuta - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Data: %1 -Quantità: %2 -Tipo: %3 -Indirizzo: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Il portamonete è <b>cifrato</b> e attualmente <b>sbloccato</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Il portamonete è <b>cifrato</b> e attualmente <b>bloccato</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n ora%n ore - - - - %n day(s) - %n giorno%n giorni - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -745,7 +320,7 @@ Indirizzo: %4 Coin Control - + @@ -815,7 +390,7 @@ Indirizzo: %4 Label - + Etichetta @@ -936,7 +511,7 @@ Indirizzo: %4 DUST - + @@ -950,7 +525,7 @@ Indirizzo: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -959,7 +534,7 @@ Indirizzo: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -968,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1009,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1019,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nuovo indirizzo di ricezione - + New sending address Nuovo indirizzo d'invio - + Edit receiving address Modifica indirizzo di ricezione - + Edit sending address Modifica indirizzo d'invio - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. L'indirizzo inserito "%1" è già in rubrica. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Impossibile sbloccare il portamonete. @@ -1066,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Utilizzo: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipo + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etichetta + + + + To Address + + + + + From Address + + + + + Message + Messaggio + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (nessuna etichetta) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copia l'indirizzo attualmente selezionato nella clipboard + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Cancella l'indirizzo attualmente selezionato dalla lista + + + + &Delete + &Cancella + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Testo CSV (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1121,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1131,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1165,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1175,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1191,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1250,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1265,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1281,7 +1202,7 @@ This label turns red, if the priority is smaller than "medium". Display coin &control features (experts only!) - + @@ -1296,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1307,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1329,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". Modulo - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1352,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1370,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". Importo scavato che non è ancora maturato - + Total: Totale: - + Your current total balance Saldo totale attuale - + <b>Recent transactions</b> <b>Transazioni recenti</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1406,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Importo: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1513,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1543,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1567,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1582,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Svuota console - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1617,8 +1566,9 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - Spedisci Bitcoin + Spedisci Triangles @@ -1641,7 +1591,7 @@ This label turns red, if the priority is smaller than "medium". Fondi insufficienti! - + Quantity: Quantità: @@ -1649,7 +1599,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1666,8 +1616,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1677,7 +1627,7 @@ This label turns red, if the priority is smaller than "medium". medium - + media @@ -1692,7 +1642,7 @@ This label turns red, if the priority is smaller than "medium". no - + no @@ -1702,15 +1652,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once Spedisci a diversi beneficiari in una volta sola @@ -1722,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1736,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1750,9 +1700,9 @@ This label turns red, if the priority is smaller than "medium". &Spedisci - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1797,22 +1747,22 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + Confirm send coins - Conferma la spedizione di bitcoin + Conferma la spedizione di triangles Are you sure you want to send %1? - + and - + @@ -1842,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1862,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1870,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Modulo @@ -1884,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Inserisci un'etichetta per questo indirizzo, per aggiungerlo nella rubrica + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etichetta - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1921,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Incollare l'indirizzo dagli appunti + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Spedisci a diversi beneficiari in una volta sola + + + + Add &Recipient + &Aggiungi beneficiario + + + + Remove all transaction fields + + + + + Clear &All + Cancella &tutto + + + + Confirm the send action + Conferma la spedizione + + + + S&end + &Spedisci + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + L'indirizzo del beneficiario non è valido, per cortesia controlla. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Trovato un indirizzo doppio, si può spedire solo una volta a ciascun indirizzo in una singola operazione. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Modulo + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Incollare l'indirizzo dagli appunti + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Inserisci un'etichetta per questo indirizzo, per aggiungerlo nella rubrica + + + + &Label: + &Etichetta + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1949,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1986,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Reimposta tutti i campi della firma @@ -2013,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Reimposta tutti i campi della verifica messaggio - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Clicca "Firma il messaggio" per ottenere la firma + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2060,7 +2240,7 @@ This label turns red, if the priority is smaller than "medium". The entered address does not refer to a key. - L'indirizzo bitcoin inserito non è associato a nessuna chiave. + L'indirizzo triangles inserito non è associato a nessuna chiave. @@ -2119,7 +2299,10 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + @@ -2149,7 +2332,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , trasmesso attraverso %n nodo, trasmesso attraverso %n nodi + + , trasmesso attraverso %n nodo + , trasmesso attraverso %n nodi + @@ -2195,14 +2381,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Credito - + matures in %n more block(s) - matura in %n ulteriore bloccomatura in altri %n blocchi + + matura in %n ulteriore blocco + matura in altri %n blocchi + @@ -2213,12 +2402,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debito - + Transaction fee Commissione transazione @@ -2238,14 +2427,14 @@ This label turns red, if the priority is smaller than "medium". Commento - + Transaction ID ID della transazione - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2278,7 +2467,7 @@ This label turns red, if the priority is smaller than "medium". falso - + , has not been successfully broadcast yet , non è stato ancora trasmesso con successo @@ -2304,7 +2493,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Data @@ -2336,10 +2525,18 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Aperto per %n altro bloccoAperto per altri %n blocchi + + Aperto per %n altro blocco + Aperto per altri %n blocchi + - + + Narration + + + + Offline Offline @@ -2404,7 +2601,7 @@ This label turns red, if the priority is smaller than "medium". (N / a) - + Transaction status. Hover over this field to show number of confirmations. Stato della transazione. Passare con il mouse su questo campo per vedere il numero di conferme. @@ -2535,7 +2732,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2580,12 +2777,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2599,32 +2796,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Utilizzo: - - Send command to -server or buynowcoind - - - - + List commands Lista comandi @@ -2642,17 +2821,7 @@ This label turns red, if the priority is smaller than "medium". - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) Specifica il file portafoglio (nella cartella dati) @@ -2670,12 +2839,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2695,12 +2864,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2720,22 +2889,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2746,22 +2915,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2788,12 +2957,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2801,12 +2970,7 @@ This label turns red, if the priority is smaller than "medium". Attenzione: -paytxfee è molto alta. Questa è la commissione che si paga quando si invia una transazione. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Attenzione: errore di lettura di wallet.dat! Tutte le chiave lette correttamente, ma i dati delle transazioni o le voci in rubrica potrebbero mancare o non essere corretti. @@ -2843,22 +3007,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2878,27 +3042,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Opzioni SSL: (vedi il wiki di Bitcoin per le istruzioni di configurazione SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Opzioni SSL: (vedi il wiki di Triangles per le istruzioni di configurazione SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2908,12 +3072,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2934,7 +3098,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2949,7 +3113,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2960,17 +3124,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2989,34 +3163,39 @@ This label turns red, if the priority is smaller than "medium". - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3042,17 +3221,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3073,17 +3252,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3104,17 +3283,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3125,27 +3304,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Impossibile collegarsi alla %s su questo computer (bind returned error %d, %s) Connect through socks proxy - + @@ -3161,7 +3330,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3169,17 +3338,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Errore caricamento wallet.dat: Wallet corrotto - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Errore caricamento wallet.dat @@ -3216,12 +3375,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3239,39 +3398,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Caricamento dell'indice del blocco... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Elérendő csomópont megadása and attempt to keep the connection open - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Caricamento portamonete... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Non è possibile retrocedere il wallet Cannot initialize keypool - + @@ -3306,4 +3495,487 @@ If the file does not exist, create it with owner-readable-only file permissions. Devi settare rpcpassword=<password> nel file di configurazione: %s Se il file non esiste, crealo con i permessi di amministratore - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Portamonete + + + + &Overview + &Sintesi + + + + Show general overview of wallet + Mostra lo stato generale del portamonete + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transazioni + + + + Browse transaction history + Cerca nelle transazioni + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Esci + + + + Quit application + Chiudi applicazione + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Informazioni su &Qt + + + + Show information about Qt + Mostra informazioni su Qt + + + + &Options... + &Opzioni... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Mostra/Nascondi + + + + &Encrypt Wallet... + &Cifra il portamonete... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Backup Portamonete... + + + + Backup wallet to another location + Backup portamonete in un'altra locazione + + + + &Change Passphrase... + &Cambia la passphrase... + + + + Change the passphrase used for wallet encryption + Cambia la passphrase per la cifratura del portamonete + + + + &Unlock Wallet... + + + + + Unlock wallet + Sblocca il portamonete + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Firma il &messaggio... + + + + &Verify message... + &Verifica messaggio... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + Finestra &Debug + + + + Open debugging and diagnostic console + Apri la console di degugging e diagnostica + + + + &File + &File + + + + &Settings + &Impostazioni + + + + &Help + &Aiuto + + + + Tabs toolbar + Barra degli strumenti "Tabs" + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sto sincronizzando con la rete... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Aggiornato + + + + Catching up... + In aggiornamento... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transazione inviata + + + + Incoming transaction + Transazione ricevuta + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Data: %1 +Quantità: %2 +Tipo: %3 +Indirizzo: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Il portamonete è <b>cifrato</b> e attualmente <b>sbloccato</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Il portamonete è <b>cifrato</b> e attualmente <b>bloccato</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n ora + %n ore + + + + + %n day(s) + + %n giorno + %n giorni + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_ja.qm b/src/qt/locale/triangles_ja.qm new file mode 100644 index 0000000..64e25b7 Binary files /dev/null and b/src/qt/locale/triangles_ja.qm differ diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/triangles_ja.ts similarity index 68% rename from src/qt/locale/bitcoin_ja.ts rename to src/qt/locale/triangles_ja.ts index cbdae25..69f8a61 100644 --- a/src/qt/locale/bitcoin_ja.ts +++ b/src/qt/locale/triangles_ja.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin + About Triangles ブラックコインについて + + <b>triangles</b> version + <b>ブラックコイン</b>バージョン + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + コピーライト © 2009-2014 The Bitcoin developers +コピーライト © 2014 Triangles team +コピーライト © 2014 The triangles developers + - <b>buynowcoin</b> version - <b>ブラックコイン</b>バージョン + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - コピーライト © 2009-2014 The Bitcoin developers -コピーライト © 2012-2014 The NovaCoin developers -コピーライト © 2014 The buynowcoin developers +Copyright © 2014 Triangles team + - + This is experimental software. @@ -44,12 +55,17 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。 アドレス帳 - + + These are your Triangles 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. + + + + Double-click to edit address or label アドレスまたはラベルを編集するにはダブルクリック - + Create a new address 新規アドレスの作成 @@ -59,17 +75,21 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。 現在選択されているアドレスをシステムのクリップボードにコピーする - + + Sign a message to prove you own a TRI address + + + + &New Address 新しいアドレス - - These are your buynowcoin 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. - これは支払いを受けるためのブラックコインのアドレス。支払い管理をするのため、各送信者へ、それぞれのアドレスを伝えたほうがいいです。 + These are your triangles 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. + これは支払いを受けるためのブラックコインのアドレス。支払い管理をするのため、各送信者へ、それぞれのアドレスを伝えたほうがいいです。 - + &Copy Address アドレスをコピー (&C) @@ -79,27 +99,30 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。 QRコードを表す - - Sign a message to prove you own a buynowcoin address - 所有権の証明するためのメサッジを署名する。 + Sign a message to prove you own a triangles address + 所有権の証明するためのメサッジを署名する。 - + Sign &Message メサッジを署名する。 - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list 選択されたアドレスを一覧から削除する - - Verify a message to ensure it was signed with a specified buynowcoin address - 受け取ったメッセージの署名を確保のため、メッセージを確認する。 + Verify a message to ensure it was signed with a specified triangles address + 受け取ったメッセージの署名を確保のため、メッセージを確認する。 - + &Verify Message メッセージを確認する。 @@ -142,7 +165,7 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。 AddressTableModel - + Label ラベル @@ -245,7 +268,12 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。 ウォレットを暗号化、よろしいですか? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. 重要: 過去のウォレット ファイルのバックアップは、暗号化された新しいウォレット ファイルに取り替える必要があります。セキュリティ上の理由により、暗号化された新しいウォレットを使い始めると、暗号化されていないウォレット ファイルのバックアップはすぐに使えなくなります。 @@ -262,12 +290,11 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。 ウォレットは暗号化されました - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - ただいま、暗号化手順を完成するため、ブラックコインQTは閉じます。尚、ウォレットを暗号化をされたにしても、PCのウイルスから盗難防止の報償できないことを、ご理解をお願い足します。 + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + ただいま、暗号化手順を完成するため、ブラックコインQTは閉じます。尚、ウォレットを暗号化をされたにしても、hackのウイルスから盗難防止の報償できないことを、ご理解をお願い足します。 - + @@ -308,430 +335,6 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。 ウォレットのパスフレーズの変更が成功しました。 - - BitcoinGUI - - - Sign &message... - メッセージの署名... (&m) - - - - Synchronizing with network... - ネットワークに同期中…… - - - - &Overview - 概要(&O) - - - - Show general overview of wallet - ウォレットの概要を見る - - - - &Transactions - 処理(&T) - - - - Browse transaction history - 処理履歴を閲覧 - - - - &Address Book - アドレス帳 - - - - Edit the list of stored addresses and labels - 保存されたアドレスとラベルの編集 - - - - &Receive coins - コインを受け取る - - - - Show the list of addresses for receiving payments - 支払いを受けるためのアドレスリストを表示 - - - - &Send coins - コインを送る - - - - E&xit - 終了(&E) - - - - Quit application - アプリケーションを終了 - - - - Show information about buynowcoin - ブラックコインの情報を表示 - - - - About &Qt - Qt について(&Q) - - - - Show information about Qt - Qt の情報を表示 - - - - &Options... - オプション... (&O) - - - - &Encrypt Wallet... - ウォレットの暗号化... (&E) - - - - &Backup Wallet... - ウォレットのバックアップ... (&B) - - - - &Change Passphrase... - パスフレーズの変更... (&C) - - - - ~%n block(s) remaining - ~%n ブロックが残っている - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - 処理の履歴の%1 / %2 ブロックをダウンロードしました。(%3% 完成) - - - - &Export... - (&E)書き出す... - - - - Send coins to a buynowcoin address - ブラックコインアドレスへコインを送る - - - - Modify configuration options for buynowcoin - ブラックコインの設定を変化する - - - - Export the data in the current tab to a file - 現在のタブのデータをファイルへ書き出す - - - - Encrypt or decrypt wallet - ウォレットを暗号化か暗号化を解除する - - - - Backup wallet to another location - ウォレットを他の場所にバックアップ - - - - Change the passphrase used for wallet encryption - ウォレット暗号化用パスフレーズの変更 - - - - &Debug window - デバッグ ウインドウ (&D) - - - - Open debugging and diagnostic console - デバッグと診断コンソールを開く - - - - &Verify message... - メッセージの検証... (&V) - - - - buynowcoin - ブラックコイン - - - - Wallet - ウォレット - - - - &About buynowcoin - ブラックコインについて - - - - &Show / Hide - 見る/隠す (&S) - - - - Unlock wallet - ウォレットをアンロックする - - - - &Lock Wallet - (&L)ウォレットをロックする - - - - Lock wallet - ウォレットをロックする - - - - &File - ファイル(&F) - - - - &Settings - 設定(&S) - - - - &Help - ヘルプ(&H) - - - - Tabs toolbar - タブツールバー - - - - Actions toolbar - 活動ツールバー - - - - - [testnet] - [testnet] - - - - - buynowcoin client - ブラックコインクライアントソフトウェア - - - - %n active connection(s) to buynowcoin network - ブラックコインネットワークへの%n アクティブな接続 - - - - Downloaded %1 blocks of transaction history. - 処理履歴の%1ブロックをダウンロードしました。 - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - 賭けている。<br>重さは%1<br>ネットワークの重さは%2<br>報酬をもらう時間の推測は%3 - - - - Not staking because wallet is locked - ウォレットをロックされたため、賭けていません - - - - Not staking because wallet is offline - ウォレットはオフラインで、賭けていません - - - - Not staking because wallet is syncing - ウォレットは同期最中ため、賭けていません。 - - - - Not staking because you don't have mature coins - コインはまだ成長できていないため、賭けていません。 - - - - %n second(s) ago - %n 秒前 - - - - About buynowcoin card - ブラックコインカードについて - - - - Show information about buynowcoin card - バラックコインカードの情報を表示する - - - - &Unlock Wallet... - &ウォレットをアンロック... - - - - %n minute(s) ago - %n 分前 - - - - %n hour(s) ago - %n 時間前 - - - - %n day(s) ago - %n 日間前 - - - - Up to date - バージョンは最新です - - - - Catching up... - 追跡中... - - - - Last received block was generated %1. - 最新ブロックは%1に生成されました。 - - - - 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? - この処理は大きさの制限を超えている。%1料金を払ったばい、通信可能性です。料金は手続きをするノードへ支払って、ネットワークのサッポートになります。料金を払いますか。 - - - - Confirm transaction fee - 処理手数料を確認する - - - - Sent transaction - 送金処理 - - - - Incoming transaction - 着金処理 - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - 日付: %1 -総額: %2 -種類: %3 -アドレス: %4 - - - - - URI handling - URIの取り扱い - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URIのパーズができませんでした!。原因は無効なブラックコインアドレスか不正なURIパラメータ。 - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - ウォレットは<b>暗号化されて、アンロックされています</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - ウォレットは<b>暗号化されて、ロックされています</b> - - - - Backup Wallet - ウォレットのバックアップ - - - - Wallet Data (*.dat) - ウォレットのデータ (*.dat) - - - - Backup Failed - バックアップは失敗しました - - - - There was an error trying to save the wallet data to the new location. - ウォレットのデータが新しい場所へ保存するにはエラーになりました。 - - - - %n second(s) - %n 秒 - - - - %n minute(s) - %n 分 - - - - %n hour(s) - %n 時間 - - - - %n day(s) - %n 日間 - - - - Not staking - 賭けていません - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - 致命的エラー。安全に続きができないため、バラックコインQTは閉じます。 - - ClientModel @@ -1036,37 +639,46 @@ This label turns red, if the priority is smaller than "medium". このアドレス帳の入力のアドレス。通信アドレスした変更ができない。 - + + &Stealth Address + + + + New receiving address 新しい受信アドレス - + New sending address 新しい送信アドレス - + Edit receiving address 受信アドレスを編集 - + Edit sending address 送信アドレスを編集 - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. 入力されたアドレス "%1" は既にアドレス帳にあります。 - - The entered address "%1" is not a valid buynowcoin address. - 入力されたアドレス "%1" 、有効なブラックコインアドレスではない。 + The entered address "%1" is not a valid triangles address. + 入力されたアドレス "%1" 、有効なブラックコインアドレスではない。 - + Could not unlock wallet. ウォレットをアンロックできませんでした。 @@ -1079,18 +691,22 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - - buynowcoin-Qt - ブラックコインQT + triangles-Qt + ブラックコインQT - + version バージョン - + + + Triangles-Qt + + + + Usage: 使用法 @@ -1120,6 +736,347 @@ This label turns red, if the priority is smaller than "medium". スタートでスプラッシュスクリーンを表示(デフォルト:1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + タイプ + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + メッセージ + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (ラベル無し) + + + + MessagePage + + + Address Book + アドレス帳 + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + 現在選択されているアドレスをシステムのクリップボードにコピーする + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + 選択されたアドレスを一覧から削除する + + + + &Delete + 削除 + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + エラーを書き出す + + + + Could not write to file %1. + ファイルを書き込めなかった。%1 + + OptionsDialog @@ -1153,17 +1110,15 @@ This label turns red, if the priority is smaller than "medium". 貯金 - - Automatically start buynowcoin after logging in to the system. - システムのログイン次第、自動的にブラックコインをスタート。 + Automatically start triangles after logging in to the system. + システムのログイン次第、自動的にブラックコインをスタート。 - - &Start buynowcoin on system login - システムログイン次第、ブラックコインをスタート + &Start triangles on system login + システムログイン次第、ブラックコインをスタート - + 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. シャットダウンするとき、ブロックとアドレスのデータベースを切り離す。すると、別のディレクトリへ移動できますが、シャットダウンは少し遅れます。ウォレットはいつも切り離します。 @@ -1178,19 +1133,37 @@ This label turns red, if the priority is smaller than "medium". ネットワーク (&N) - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - 自動的にルーターでブラックコインクライエントソフトウェアのポートを開く。ルーターはUPnPのサポートあり、UPnPを有効にするならできる。 + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + 自動的にルーターでブラックコインクライエントソフトウェアのポートを開く。ルーターはUPnPのサポートあり、UPnPを有効にするならできる。 - + Map port using &UPnP UPnP を使ってポートを割り当てる (&U) - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - ブラックコインのネットワークへSOCKSプロキシで接続する(例:TORで接続するばい) + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + ブラックコインのネットワークへSOCKSプロキシで接続する(例:TORで接続するばい) + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1264,11 +1237,20 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - ユーザのインターフェースの言語の設定です。リスタートの後、有効します。 + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + ユーザのインターフェースの言語の設定です。リスタートの後、有効します。 + + + &Unit to show amounts in: 額を表示する単位 (&U) : @@ -1278,12 +1260,11 @@ This label turns red, if the priority is smaller than "medium". インターフェース上の表示とコインの送信で使用する単位を選択します。 - - Whether to show buynowcoin addresses in the transaction list or not. - 処理の歴史でブラックコインのアドレスを表示する/しない。 + Whether to show triangles addresses in the transaction list or not. + 処理の歴史でブラックコインのアドレスを表示する/しない。 - + &Display addresses in transaction list 処理の履歴にアドレスを表示 (&D) @@ -1326,8 +1307,12 @@ This label turns red, if the priority is smaller than "medium". - This setting will take effect after restarting buynowcoin. - この設定はブラックコインをリスタートした後に有効する。 + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + この設定はブラックコインをリスタートした後に有効する。 @@ -1343,13 +1328,11 @@ This label turns red, if the priority is smaller than "medium". フォーム - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - 表示されている情報は時間遅れている。接続したら、ウォレットは自動的にブラックコインネットワークと同期しますが過程は完了してません。 + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + 表示されている情報は時間遅れている。接続したら、ウォレットは自動的にブラックコインネットワークと同期しますが過程は完了してません。 - + Stake: 賭け金: @@ -1384,27 +1367,61 @@ This label turns red, if the priority is smaller than "medium". 完成していない採掘された残高 - + Total: 合計: - + Your current total balance あなたの現在の残高 - + <b>Recent transactions</b> <b>最近の処理</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance 未確認の合計で、まだ現在の残高に含まれていない。 - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance 賭けているコインの合計で、まだ現在の残高に含まれていない。 @@ -1505,7 +1522,17 @@ This label turns red, if the priority is smaller than "medium". 情報 (&I) - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version 使用中の OpenSSL のバージョン @@ -1550,7 +1577,17 @@ This label turns red, if the priority is smaller than "medium". 最終ブロックの日時 - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open 開く (&O) @@ -1560,12 +1597,11 @@ This label turns red, if the priority is smaller than "medium". コマンドラインのオプション - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - ブラックコインQTのコマンドラインのヘルプ情報を表示する。 + Show the triangles-Qt help message to get a list with possible triangles command-line options. + ブラックコインQTのコマンドラインのヘルプ情報を表示する。 - + &Show (&S)表示 @@ -1580,34 +1616,35 @@ This label turns red, if the priority is smaller than "medium". ビルドの日付 - - buynowcoin - Debug window - ブラックコイン:デバッグウインドウ + triangles - Debug window + ブラックコイン:デバッグウインドウ - - buynowcoin Core - ブラックコインコア + triangles Core + ブラックコインコア - + Debug log file デバッグ用ログファイル - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - 現行のディレクトリからデバッグログファイルを開く。大きなファイルのばい、少し時間かかる。 + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + 現行のディレクトリからデバッグログファイルを開く。大きなファイルのばい、少し時間かかる。 - + Clear console コンソールをクリア + + Welcome to the triangles RPC console. + ブラックコインRPCコンソールへようこそ。 + - Welcome to the buynowcoin RPC console. - ブラックコインRPCコンソールへようこそ。 + Welcome to the Triangles RPC console. + @@ -1631,6 +1668,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins コインを送る @@ -1655,7 +1693,7 @@ This label turns red, if the priority is smaller than "medium". 資金不足! - + Quantity: 数量: @@ -1675,13 +1713,17 @@ This label turns red, if the priority is smaller than "medium". Amount: 総額: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1724,7 +1766,7 @@ This label turns red, if the priority is smaller than "medium". カスタムのお釣りのアドレス - + Send to multiple recipients at once 一度に複数の人に送る @@ -1750,8 +1792,12 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1764,9 +1810,13 @@ This label turns red, if the priority is smaller than "medium". 送る (&e) - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - ブラックコインアドレスの入力 (例;Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + ブラックコインアドレスの入力 (例;TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1863,10 +1913,19 @@ This label turns red, if the priority is smaller than "medium". 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. エラー:処理は拒否されました。ウォレットのコインをすでに費やした可能性で、wallet.datのコピーで費やしたが、現行のwallet.datとはアップデートされていない。 + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - 警告:無効なブラックコインアドレス + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + 警告:無効なブラックコインアドレス @@ -1898,19 +1957,29 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book アドレス帳に追加するには、このアドレスのラベルを入力します + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: ラベル(&L): - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - 支払いへ送るアドレス (例:Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + 支払いへ送るアドレス (例:TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1937,10 +2006,225 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient この受信者を外す + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + ブラックコインアドレスの入力 (例;TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - ブラックコインアドレスの入力 (例;Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + アドレス帳からアドレスを選択する + + + + Alt+A + Alt+A + + + + Paste address from clipboard + クリップボードからアドレスを貼付ける + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + 一度に複数の人に送る + + + + Add &Recipient + 受取人を追加 (&R) + + + + Remove all transaction fields + 全分の処理欄を削除する + + + + Clear &All + すべてクリア (&A) + + + + Confirm the send action + 送る操作を確認する + + + + S&end + 送る (&e) + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> から %2 (%3)に + + + + Confirm send messages + + + + + Are you sure you want to send %1? + %1送付、よろしいですか? + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + 受取人のアドレスが不正です。再確認してください。 + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + 重複しているアドレスが見つかりました。1回の送信で同じアドレスに送ることは出来ません。 + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + フォーム + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + アドレス帳からアドレスを選択する + + + + Alt+A + Alt+A + + + + Paste address from clipboard + クリップボードからアドレスを貼付ける + + + + Alt+P + Alt+P + + + + Remove this recipient + この受信者を外す + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + アドレス帳に追加するには、このアドレスのラベルを入力します + + + + &Label: + ラベル(&L): + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1963,8 +2247,8 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - メッセージの署名するアドレス(例:Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + メッセージの署名するアドレス(例:TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -2000,11 +2284,20 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - 所有権の証明するためこのメサッジを署名する + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + 所有権の証明するためこのメサッジを署名する + + + Reset all sign message fields メッセージ署名の内容をすべて消去します @@ -2027,34 +2320,45 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - メッセージの署名するアドレス(例:Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + メッセージの署名するアドレス(例:TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - 受け取ったメッセージの署名を確保のため、メッセージを確認する。 + Verify the message to ensure it was signed with the specified triangles address + 受け取ったメッセージの署名を確保のため、メッセージを確認する。 - + Reset all verify message fields 入力項目の内容をすべて消去します - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - ブラックコインのアドレスを入力(例:Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + ブラックコインのアドレスを入力(例:TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature 署名を作成するには"メッセージの署名"をクリック + + Enter triangles signature + ブラックコインのデジタル署名を入力 + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - ブラックコインのデジタル署名を入力 + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2133,7 +2437,9 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - %n ブロックに開いている + + %n ブロックに開いている + @@ -2163,7 +2469,9 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - %n ノードにブロードキャスト + + %n ノードにブロードキャスト + @@ -2209,14 +2517,16 @@ This label turns red, if the priority is smaller than "medium". - + Credit クレジット - + matures in %n more block(s) - %n 以上のブロックが満期 + + %n 以上のブロックが満期 + @@ -2227,12 +2537,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit 引き落とし額 - + Transaction fee 処理の手数料 @@ -2252,14 +2562,18 @@ This label turns red, if the priority is smaller than "medium". コメント - + Transaction ID 処理のID + Generated coins must mature 60 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. + コインを費やす前に発現されたコインは510ブロック間成熟しなければなりません。このブロックを発現させたときに、ブロックチェインに足すためにネットワークへ放送しました。ブロックチェインに追加失敗したばい、レベルは「受け入られていない」に変わって、費やせられない状況になります。自分のノードと他のノードと同時に新しいブロックを発現させたときに、時折に起こること。 {60 ?} + + Generated coins must mature 510 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. - コインを費やす前に発現されたコインは510ブロック間成熟しなければなりません。このブロックを発現させたときに、ブロックチェインに足すためにネットワークへ放送しました。ブロックチェインに追加失敗したばい、レベルは「受け入られていない」に変わって、費やせられない状況になります。自分のノードと他のノードと同時に新しいブロックを発現させたときに、時折に起こること。 + コインを費やす前に発現されたコインは510ブロック間成熟しなければなりません。このブロックを発現させたときに、ブロックチェインに足すためにネットワークへ放送しました。ブロックチェインに追加失敗したばい、レベルは「受け入られていない」に変わって、費やせられない状況になります。自分のノードと他のノードと同時に新しいブロックを発現させたときに、時折に起こること。 @@ -2292,7 +2606,7 @@ This label turns red, if the priority is smaller than "medium". 正しくない - + , has not been successfully broadcast yet まだブロードキャストが成功していません @@ -2318,7 +2632,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date 日付 @@ -2350,10 +2664,17 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - %n 以上のブロックを開く + + %n 以上のブロックを開く + - + + Narration + + + + Offline オフライン @@ -2418,7 +2739,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. 処理の状況。この欄の上にカーソルを置くと検証の数を表示します。 @@ -2613,29 +2934,20 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - 通信中... - - - - bitcoin-core - - - buynowcoin version - ブラックコインバージョン + triangles version + ブラックコインバージョン - + Usage: 使用法: - Send command to -server or buynowcoind - -server か buynowcoindへコマンドを送る。 + Send command to -server or trianglesd + -server か trianglesdへコマンドを送る。 @@ -2654,13 +2966,13 @@ This label turns red, if the priority is smaller than "medium". - Specify configuration file (default: buynowcoin.conf) - 設定ファイルを特定する (デファルト: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + 設定ファイルを特定する (デファルト: triangles.conf) - Specify pid file (default: buynowcoind.pid) - pid ファイルを特定する (デフォルト: buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + pid ファイルを特定する (デフォルト: trianglesd.pid) @@ -2673,7 +2985,22 @@ This label turns red, if the priority is smaller than "medium". データ ディレクトリの指定 - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) データベースのキャッシュサイズをメガバイトで設定 (初期値: 25) @@ -2808,12 +3135,11 @@ This label turns red, if the priority is smaller than "medium". 警告: -paytxfee が非常に高く設定されています! これは処理を送信する場合に支払う取引手数料です。 - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - 警告:コンピュータの日付と時間を調べてください。時間ずらしかったばい、ブラックコイン QTは正しく行動しない。 + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + 警告:コンピュータの日付と時間を調べてください。時間ずらしかったばい、ブラックコイン QTは正しく行動しない。 - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. 警告: wallet.dat の読み込みエラー! すべてのキーは正しく読み取れますが、処理のデータやアドレス帳のエントリが失われたか、正しくない可能性があります。 @@ -2899,8 +3225,8 @@ This label turns red, if the priority is smaller than "medium". - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL オプション: (SSLのセットアップ手順は Bitcoin Wiki をご覧下さい) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL オプション: (SSLのセットアップ手順は Triangles Wiki をご覧下さい) @@ -2960,17 +3286,52 @@ This label turns red, if the priority is smaller than "medium". プロクシーでTORヒドゥンサービス(TOR Hidden Services)を接続する(デファルト:-proxyと同じ) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections JSON-RPC 接続のユーザー名 - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... データベースの保全性を確認最中... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! 警告:シンクロナイズドチェックポイント違反を検出したが、チェックポイントを飛ばした。 @@ -2995,22 +3356,21 @@ This label turns red, if the priority is smaller than "medium". JSON-RPC 接続のパスワード - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, 設定ファイル:%sでrpcpasswordのパスワードを入力しなければならい + %s, 設定ファイル:%sでrpcpasswordのパスワードを入力しなければならい このランダムパスワードのおすすめです: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (このパサワードを覚えなくても大丈夫です) ユーザ名とパスワードは同じであってはなりません。 @@ -3020,7 +3380,7 @@ rpcpassword=%s - + Find peers using internet relay chat (default: 0) インターネットリレーチャット(IRC)でピアアを探す。(デファルト:1 {0}?) @@ -3140,17 +3500,15 @@ rpcpassword=%s %sウォレットはディレクトリ%sの外にあります。 - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - %sディレクトリにをロックオンできない。ブラックコインQTは、もう発行してるでしょう。 + Cannot obtain a lock on data directory %s. triangles is probably already running. + %sディレクトリにをロックオンできない。ブラックコインQTは、もう発行してるでしょう。 - - buynowcoin - ブラックコイン + triangles + ブラックコイン - + Unable to bind to %s on this computer (bind returned error %d, %s) このコンピュータの %s にバインドすることができません (バインドが返したエラーは %d, %s) @@ -3180,17 +3538,15 @@ rpcpassword=%s wallet.dat 読み込みエラー: ウォレットが壊れました - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - wallet.dat 読み込みエラー:  ブラックコインQTの最新バージョンが必要です + Error loading wallet.dat: Wallet requires newer version of triangles + wallet.dat 読み込みエラー:  ブラックコインQTの最新バージョンが必要です - - Wallet needed to be rewritten: restart buynowcoin to complete - ウォレットのデータをリライトしなければならい:ブラックコインQTをリスタートしてください + Wallet needed to be rewritten: restart triangles to complete + ウォレットのデータをリライトしなければならい:ブラックコインQTをリスタートしてください - + Error loading wallet.dat wallet.dat 読み込みエラー @@ -3255,12 +3611,11 @@ rpcpassword=%s 接続するノードを追加し接続を持続するように試します - - Unable to bind to %s on this computer. buynowcoin is probably already running. - このコンピューターで%sに結ぶことができなかった。ブラックコインQTは、もう発行してるでしょう。 + Unable to bind to %s on this computer. triangles is probably already running. + このコンピューターで%sに結ぶことができなかった。ブラックコインQTは、もう発行してるでしょう。 - + Fee per KB to add to transactions you send 送る処理を足して、KBあたりの料金 @@ -3319,4 +3674,521 @@ If the file does not exist, create it with owner-readable-only file permissions. ファイルが無い場合は、オーナーだけが読み取れる権限でファイルを作成してください。 - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + ウォレット + + + + &Overview + 概要(&O) + + + + Show general overview of wallet + ウォレットの概要を見る + + + + &Send coins + コインを送る + + + + Send coins to a TRI address + + + + + &Receive coins + コインを受け取る + + + + Show the list of addresses for receiving payments + 支払いを受けるためのアドレスリストを表示 + + + + &Transactions + 処理(&T) + + + + Browse transaction history + 処理履歴を閲覧 + + + + &Address Book + アドレス帳 + + + + Edit the list of stored addresses and labels + 保存されたアドレスとラベルの編集 + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + 終了(&E) + + + + Quit application + アプリケーションを終了 + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Qt について(&Q) + + + + Show information about Qt + Qt の情報を表示 + + + + &Options... + オプション... (&O) + + + + Modify configuration options for Triangles + + + + + &Show / Hide + 見る/隠す (&S) + + + + &Encrypt Wallet... + ウォレットの暗号化... (&E) + + + + Encrypt or decrypt wallet + ウォレットを暗号化か暗号化を解除する + + + + &Backup Wallet... + ウォレットのバックアップ... (&B) + + + + Backup wallet to another location + ウォレットを他の場所にバックアップ + + + + &Change Passphrase... + パスフレーズの変更... (&C) + + + + Change the passphrase used for wallet encryption + ウォレット暗号化用パスフレーズの変更 + + + + &Unlock Wallet... + &ウォレットをアンロック... + + + + Unlock wallet + ウォレットをアンロックする + + + + &Lock Wallet + (&L)ウォレットをロックする + + + + Lock wallet + ウォレットをロックする + + + + Sign &message... + メッセージの署名... (&m) + + + + &Verify message... + メッセージの検証... (&V) + + + + &Export... + (&E)書き出す... + + + + Export the data in the current tab to a file + 現在のタブのデータをファイルへ書き出す + + + + &Debug window + デバッグ ウインドウ (&D) + + + + Open debugging and diagnostic console + デバッグと診断コンソールを開く + + + + &File + ファイル(&F) + + + + &Settings + 設定(&S) + + + + &Help + ヘルプ(&H) + + + + Tabs toolbar + タブツールバー + + + + Actions toolbar + 活動ツールバー + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + ネットワークに同期中…… + + + + ~%n block(s) remaining + + ~%n ブロックが残っている + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + 処理の履歴の%1 / %2 ブロックをダウンロードしました。(%3% 完成) + + + + Downloaded %1 blocks of transaction history. + 処理履歴の%1ブロックをダウンロードしました。 + + + + Current difficulty is %1. + + + + + %n second(s) ago + + %n 秒前 + + + + + %n minute(s) ago + + %n 分前 + + + + + %n hour(s) ago + + %n 時間前 + + + + + %n day(s) ago + + %n 日間前 + + + + + Up to date + バージョンは最新です + + + + Catching up... + 追跡中... + + + + Last received block was generated %1. + 最新ブロックは%1に生成されました。 + + + + 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? + この処理は大きさの制限を超えている。%1料金を払ったばい、通信可能性です。料金は手続きをするノードへ支払って、ネットワークのサッポートになります。料金を払いますか。 + + + + Confirm transaction fee + 処理手数料を確認する + + + + Sent transaction + 送金処理 + + + + Incoming transaction + 着金処理 + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + 日付: %1 +総額: %2 +種類: %3 +アドレス: %4 + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + URIの取り扱い + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + ウォレットは<b>暗号化されて、アンロックされています</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + ウォレットは<b>暗号化されて、ロックされています</b> + + + + Backup Wallet + ウォレットのバックアップ + + + + Wallet Data (*.dat) + ウォレットのデータ (*.dat) + + + + Backup Failed + バックアップは失敗しました + + + + There was an error trying to save the wallet data to the new location. + ウォレットのデータが新しい場所へ保存するにはエラーになりました。 + + + + %n second(s) + + %n 秒 + + + + + %n minute(s) + + %n 分 + + + + + %n hour(s) + + %n 時間 + + + + + %n day(s) + + %n 日間 + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + 賭けている。<br>重さは%1<br>ネットワークの重さは%2<br>報酬をもらう時間の推測は%3 + + + + Not staking because wallet is locked + ウォレットをロックされたため、賭けていません + + + + Not staking because wallet is offline + ウォレットはオフラインで、賭けていません + + + + Not staking because wallet is syncing + ウォレットは同期最中ため、賭けていません。 + + + + Not staking because you don't have mature coins + コインはまだ成長できていないため、賭けていません。 + + + + Not staking + 賭けていません + + + Show information about triangles + ブラックコインの情報を表示 + + + Send coins to a triangles address + ブラックコインアドレスへコインを送る + + + Modify configuration options for triangles + ブラックコインの設定を変化する + + + triangles + ブラックコイン + + + &About triangles + ブラックコインについて + + + triangles client + ブラックコインクライアントソフトウェア + + + %n active connection(s) to triangles network + + ブラックコインネットワークへの%n アクティブな接続 + + + + About triangles card + ブラックコインカードについて + + + Show information about triangles card + バラックコインカードの情報を表示する + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URIのパーズができませんでした!。原因は無効なブラックコインアドレスか不正なURIパラメータ。 + + + A fatal error occurred. triangles can no longer continue safely and will quit. + 致命的エラー。安全に続きができないため、バラックコインQTは閉じます。 + + + + WalletModel + + + Sending... + 通信中... + + + diff --git a/src/qt/locale/bitcoin_ka.qm b/src/qt/locale/triangles_ka.qm similarity index 50% rename from src/qt/locale/bitcoin_ka.qm rename to src/qt/locale/triangles_ka.qm index 04eacd9..3cc25e5 100644 Binary files a/src/qt/locale/bitcoin_ka.qm and b/src/qt/locale/triangles_ka.qm differ diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/triangles_ka.ts similarity index 71% rename from src/qt/locale/bitcoin_ka.ts rename to src/qt/locale/triangles_ka.ts index 33b48e0..c7d069d 100644 --- a/src/qt/locale/bitcoin_ka.ts +++ b/src/qt/locale/triangles_ka.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label დააკლიკეთ ორჯერ მისამართის ან ნიშნულის შესაცვლელად - + Create a new address ახალი მისამართის შექმნა @@ -57,52 +58,52 @@ This product includes software developed by the OpenSSL Project for use in the O მონიშნული მისამართის კოპირება სისტემურ კლიპბორდში - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &მისამართის კოპირება Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list მონიშნული მისამართის წაშლა სიიდან - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + მესიჯის &ვერიფიკაცია - + + These are your Triangles 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. + + + + &Delete &წაშლა @@ -119,7 +120,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -129,18 +130,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label ნიშნული @@ -180,12 +181,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,431 +307,6 @@ This product includes software developed by the OpenSSL Project for use in the O საფულის ფრაზა-პაროლი შეცვლილია. - - BitcoinGUI - - - Sign &message... - ხელ&მოწერა - - - - Synchronizing with network... - ქსელთან სინქრონიზება... - - - - &Overview - მიმ&ოხილვა - - - - Show general overview of wallet - საფულის ზოგადი მიმოხილვა - - - - &Transactions - &ტრანსაქციები - - - - Browse transaction history - ტრანსაქციების ისტორიის დათვალიერება - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &გასვლა - - - - Quit application - გასვლა - - - - Show information about buynowcoin - - - - - About &Qt - &Qt-ს შესახებ - - - - Show information about Qt - ინფორმაცია Qt-ს შესახებ - - - - &Options... - &ოპციები - - - - &Encrypt Wallet... - საფულის &დაშიფრვა - - - - &Backup Wallet... - საფულის &არქივირება - - - - &Change Passphrase... - ფრაზა-პაროლის შე&ცვლა - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - საფულის არქივირება სხვა ადგილზე - - - - Change the passphrase used for wallet encryption - საფულის დაშიფრვის ფრაზა-პაროლის შეცვლა - - - - &Debug window - და&ხვეწის ფანჯარა - - - - Open debugging and diagnostic console - დახვეწისა და გიაგნოსტიკის კონსოლის გაშვება - - - - &Verify message... - &ვერიფიკაცია - - - - buynowcoin - - - - - Wallet - საფულე - - - - &About buynowcoin - - - - - &Show / Hide - &ჩვენება/დაფარვა - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &ფაილი - - - - &Settings - &პარამეტრები - - - - &Help - &დახმარება - - - - Tabs toolbar - ბარათების პანელი - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - განახლებულია - - - - Catching up... - ჩართვა... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - გაგზავნილი ტრანსაქციები - - - - Incoming transaction - მიღებული ტრანსაქციები - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - თარიღი: %1 -თანხა: %2 -ტიპი: %3 -მისამართი: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - საფულე <b>დაშიფრულია</b> და ამჟამად <b>განბლოკილია</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - საფულე <b>დაშიფრულია</b> და ამჟამად <b>დაბლოკილია</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -744,7 +320,7 @@ Address: %4 Coin Control - + @@ -814,7 +390,7 @@ Address: %4 Label - + ნიშნული @@ -935,7 +511,7 @@ Address: %4 DUST - + @@ -949,7 +525,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -958,7 +534,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -967,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1008,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1018,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address ახალი მიღების მისამართი - + New sending address ახალი გაგზავნის მისამართი - + Edit receiving address მიღების მისამართის შეცვლა - + Edit sending address გაგზავნის მისამართის შეცვლა - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. მისამართი "%1" უკვე არის მისამართების წიგნში. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. საფულის განბლოკვა ვერ მოხერხდა. @@ -1065,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + გამოყენება: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + ტიპი + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + ნიშნული + + + + To Address + + + + + From Address + + + + + Message + მესიჯი + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (არ არის ნიშნული) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + მონიშნული მისამართის კოპირება სისტემურ კლიპბორდში + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + მონიშნული მისამართის წაშლა სიიდან + + + + &Delete + &წაშლა + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + CSV-ფაილი (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1120,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1130,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1164,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1174,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1190,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1249,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1264,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1280,7 +1202,7 @@ This label turns red, if the priority is smaller than "medium". Display coin &control features (experts only!) - + @@ -1295,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1306,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1328,15 +1250,15 @@ This label turns red, if the priority is smaller than "medium". ფორმა - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + @@ -1351,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1369,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". მოპოვებული თანხა, რომელიც ჯერ არ არის მზადყოფნაში - + Total: სულ: - + Your current total balance თქვენი სრული მიმდინარე ბალანსი - + <b>Recent transactions</b> <b>ბოლო ტრანსაქციები</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1405,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + თანხა: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1512,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1542,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1566,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1581,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console კონსოლის გასუფთავება - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1616,6 +1566,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins მონეტების გაგზავნა @@ -1640,7 +1591,7 @@ This label turns red, if the priority is smaller than "medium". არ არის საკმარისი თანხა! - + Quantity: რაოდენობა: @@ -1648,7 +1599,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1665,8 +1616,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1676,7 +1627,7 @@ This label turns red, if the priority is smaller than "medium". medium - + საშუალო @@ -1691,7 +1642,7 @@ This label turns red, if the priority is smaller than "medium". no - + არა @@ -1701,15 +1652,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once გაგზავნა რამდენიმე რეციპიენტთან ერთდროულად @@ -1721,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1735,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1749,9 +1700,9 @@ This label turns red, if the priority is smaller than "medium". გაგ&ზავნა - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1796,7 +1747,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1806,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1841,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1861,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1869,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + ფორმა @@ -1883,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book შეიყვანეთ ამ მისამართის ნიშნული მისამართების წიგნში დასამატებლად + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: ნიშნუ&ლი: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1920,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + მისამართის ჩასმა კლიპბორდიდან + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + გაგზავნა რამდენიმე რეციპიენტთან ერთდროულად + + + + Add &Recipient + &რეციპიენტის დამატება + + + + Remove all transaction fields + + + + + Clear &All + გ&ასუფთავება + + + + Confirm the send action + გაგზავნის დადასტურება + + + + S&end + გაგ&ზავნა + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + მიმღების მისამართი არასწორია, შეამოწმეთ. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + მისამართები დუბლირებულია, დაშვებულია ერთ ჯერზე თითო მისამართზე ერთხელ გაგზავნა. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + ფორმა + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + მისამართის ჩასმა კლიპბორდიდან + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + შეიყვანეთ ამ მისამართის ნიშნული მისამართების წიგნში დასამატებლად + + + + &Label: + ნიშნუ&ლი: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1948,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1985,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields ხელმოწერის ყველა ველის წაშლა @@ -2012,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields ვერიფიკაციის ყველა ველის წაშლა - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature ხელმოწერის გენერირებისათვის დააჭირეთ "მესიჯის ხელმოწერა"-ს + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2118,12 +2299,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2148,7 +2332,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + + @@ -2194,14 +2381,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit კრედიტი - + matures in %n more block(s) - + + + + @@ -2212,12 +2402,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit დებიტი - + Transaction fee ტრანსაქციის საფასური - საკომისიო @@ -2237,14 +2427,14 @@ This label turns red, if the priority is smaller than "medium". შენიშვნა - + Transaction ID ტრანსაქციის ID - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2277,7 +2467,7 @@ This label turns red, if the priority is smaller than "medium". მცდარი - + , has not been successfully broadcast yet , დაგზავნა არ არის წარმატებით დასრულებული @@ -2303,7 +2493,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date თარიღი @@ -2335,27 +2525,35 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + @@ -2403,7 +2601,7 @@ This label turns red, if the priority is smaller than "medium". (მიუწვდ.) - + Transaction status. Hover over this field to show number of confirmations. ტრანსაქციის სტატუსი. ველზე კურსორის შეყვანისას გამოჩნდება დასტურების რაოდენობა. @@ -2534,7 +2732,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2579,12 +2777,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2598,32 +2796,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: გამოყენება: - - Send command to -server or buynowcoind - - - - + List commands ბრძანებები @@ -2638,17 +2818,7 @@ This label turns red, if the priority is smaller than "medium". ოპციები: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) მიუთითეთ საფულის ფაილი (კატალოგში) @@ -2665,12 +2835,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2690,12 +2860,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2715,22 +2885,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2740,22 +2910,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2780,12 +2950,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2793,12 +2963,7 @@ This label turns red, if the priority is smaller than "medium". ყურადღება: ძალიან მაღალია -paytxfee - საკომისო, რომელსაც თქვენ გადაიხდით ამ ტრანსაქციის გაგზავნის საფასურად. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. ყურადღება: არ იკითხება wallet.dat! ყველა გასაღები წაკითხულია, მაგრამ გამორჩენილი ან არასწორია ტრანსაქციის თარიღი ან ჩანაწერები მისამართების წიგნში. @@ -2835,22 +3000,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2870,27 +3035,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL ოპციები: (იხილე Bitcoin Wiki-ში SSL-ს მოწყობის ინსტრუქციები) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL ოპციები: (იხილე Triangles Wiki-ში SSL-ს მოწყობის ინსტრუქციები) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2900,12 +3065,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2926,7 +3091,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2941,7 +3106,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2951,17 +3116,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2979,34 +3154,39 @@ This label turns red, if the priority is smaller than "medium". პაროლი JSON-RPC-შეერთებისათვის - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3031,17 +3211,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3061,17 +3241,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3091,17 +3271,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3111,27 +3291,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) ვერ ხერხდება მიბმა %s-თან ამ კომპიუტერზე (მიღებულია შეცდომა %d, %s) Connect through socks proxy - + @@ -3146,7 +3316,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3154,17 +3324,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f არ იტვირთება wallet.dat: საფულე დაზიანებულია - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat არ იტვირთება wallet.dat @@ -3201,12 +3361,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3224,39 +3384,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f ბლოკების ინდექსის ჩატვირთვა... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open მისაერთებელი კვანძის დამატება და მიერთების შეძლებისდაგვარად შენარჩუნება - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... საფულის ჩატვირთვა... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet საფულის ძველ ვერსიაზე გადაყვანა შეუძლებელია Cannot initialize keypool - + @@ -3293,4 +3483,486 @@ If the file does not exist, create it with owner-readable-only file permissions. თუ ეს ფაილი არ არსებობს, შექმენით იგი უფლებებით owner-readable-only. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + საფულე + + + + &Overview + მიმ&ოხილვა + + + + Show general overview of wallet + საფულის ზოგადი მიმოხილვა + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &ტრანსაქციები + + + + Browse transaction history + ტრანსაქციების ისტორიის დათვალიერება + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &გასვლა + + + + Quit application + გასვლა + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + &Qt-ს შესახებ + + + + Show information about Qt + ინფორმაცია Qt-ს შესახებ + + + + &Options... + &ოპციები + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &ჩვენება/დაფარვა + + + + &Encrypt Wallet... + საფულის &დაშიფრვა + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + საფულის &არქივირება + + + + Backup wallet to another location + საფულის არქივირება სხვა ადგილზე + + + + &Change Passphrase... + ფრაზა-პაროლის შე&ცვლა + + + + Change the passphrase used for wallet encryption + საფულის დაშიფრვის ფრაზა-პაროლის შეცვლა + + + + &Unlock Wallet... + + + + + Unlock wallet + საფულის განბლოკვა + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + ხელ&მოწერა + + + + &Verify message... + &ვერიფიკაცია + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + და&ხვეწის ფანჯარა + + + + Open debugging and diagnostic console + დახვეწისა და გიაგნოსტიკის კონსოლის გაშვება + + + + &File + &ფაილი + + + + &Settings + &პარამეტრები + + + + &Help + &დახმარება + + + + Tabs toolbar + ბარათების პანელი + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + ქსელთან სინქრონიზება... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + განახლებულია + + + + Catching up... + ჩართვა... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + გაგზავნილი ტრანსაქციები + + + + Incoming transaction + მიღებული ტრანსაქციები + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + თარიღი: %1 +თანხა: %2 +ტიპი: %3 +მისამართი: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + საფულე <b>დაშიფრულია</b> და ამჟამად <b>განბლოკილია</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + საფულე <b>დაშიფრულია</b> და ამჟამად <b>დაბლოკილია</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + + + + + + + %n day(s) + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_kk_KZ.qm b/src/qt/locale/triangles_kk_KZ.qm similarity index 60% rename from src/qt/locale/bitcoin_kk_KZ.qm rename to src/qt/locale/triangles_kk_KZ.qm index 45cdd9d..f2fefdc 100644 Binary files a/src/qt/locale/bitcoin_kk_KZ.qm and b/src/qt/locale/triangles_kk_KZ.qm differ diff --git a/src/qt/locale/bitcoin_kk_KZ.ts b/src/qt/locale/triangles_kk_KZ.ts similarity index 55% rename from src/qt/locale/bitcoin_kk_KZ.ts rename to src/qt/locale/triangles_kk_KZ.ts index f2b9f46..af96f2d 100644 --- a/src/qt/locale/bitcoin_kk_KZ.ts +++ b/src/qt/locale/triangles_kk_KZ.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Адресті немесе белгіні өзгерту үшін екі рет шертіңіз - + Create a new address Жаңа адрес енгізу @@ -52,69 +53,69 @@ This product includes software developed by the OpenSSL Project for use in the O Таңдаған адресті тізімнен жою - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete Жою Copy &Label - + &Edit - + Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label таңба @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -220,44 +221,44 @@ This product includes software developed by the OpenSSL Project for use in the O Enter the old and new passphrase to the wallet. - + Confirm wallet encryption - + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + Wallet encrypted - + - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -265,461 +266,40 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet encryption failed - + Wallet encryption failed due to an internal error. Your wallet was not encrypted. - + The supplied passphrases do not match. - + Wallet unlock failed - + The passphrase entered for the wallet decryption was incorrect. - + Wallet decryption failed - + Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - - - - - &Overview - - - - - Show general overview of wallet - - - - - &Transactions - - - - - Browse transaction history - - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - - - - - &Settings - - - - - &Help - - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,77 +315,77 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + Amount - + Label - + таңба @@ -815,123 +395,123 @@ Address: %4 Date - + Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -989,111 +569,457 @@ This label turns red, if the priority is smaller than "medium". Edit Address - + &Label - + The label associated with this address book entry - + &Address - + The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + Could not unlock wallet. - + New key generation failed. - + GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + таңба + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (таңбасыз) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Таңдаған адресті тізімнен жою + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + Жою + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1101,214 +1027,214 @@ This label turns red, if the priority is smaller than "medium". Options - + &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1316,79 +1242,107 @@ This label turns red, if the priority is smaller than "medium". Form - + - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> - + - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,242 +1561,248 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - + Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once - + Add &Recipient - + Remove all transaction fields - + Clear &All - + Balance: - + - 123.456 BTC - + 123.456 TRI + Confirm the send action - + S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,63 +1820,284 @@ This label turns red, if the priority is smaller than "medium". Form - + A&mount: - + Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: - + - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,119 +2105,123 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2104,178 +2289,187 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Open for %n block(s) - + + + + conflicted - + %1/offline - + %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + + Date - + Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + Amount - + true - + false - + - + , has not been successfully broadcast yet - + unknown - + @@ -2283,25 +2477,25 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date - + Type - + @@ -2311,112 +2505,120 @@ This label turns red, if the priority is smaller than "medium". Amount - + Open until %1 - + Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + Received with - + Received from - + Sent to - + Payment to yourself - + Mined - + (n/a) - + - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2425,107 +2627,107 @@ This label turns red, if the priority is smaller than "medium". All - + Today - + This week - + This month - + Last month - + This year - + Range... - + Received with - + Sent to - + To yourself - + Mined - + Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + @@ -2535,17 +2737,17 @@ This label turns red, if the priority is smaller than "medium". Confirmed - + Date - + Type - + @@ -2560,726 +2762,1196 @@ This label turns red, if the priority is smaller than "medium". Amount - + ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com - + - - Find peers using internet relay chat (default: 0) - + + Specify configuration file (default: triangles.conf) + - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + + + + + Browse transaction history + + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + Әмиянізді қоршаудан шығару + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + + + + + + + %n day(s) + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_ko_KR.qm b/src/qt/locale/triangles_ko_KR.qm similarity index 54% rename from src/qt/locale/bitcoin_ko_KR.qm rename to src/qt/locale/triangles_ko_KR.qm index c11b6b2..afb9d6a 100644 Binary files a/src/qt/locale/bitcoin_ko_KR.qm and b/src/qt/locale/triangles_ko_KR.qm differ diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/triangles_ko_KR.ts similarity index 68% rename from src/qt/locale/bitcoin_ko_KR.ts rename to src/qt/locale/triangles_ko_KR.ts index f890d9b..2754cee 100644 --- a/src/qt/locale/bitcoin_ko_KR.ts +++ b/src/qt/locale/triangles_ko_KR.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http Address Book - + - + Double-click to edit address or label 주소 또는 표를 편집하기 위해 더블클릭 하시오 - + Create a new address 새 주소 만들기 @@ -57,52 +58,52 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http 현재 선택한 주소를 시스템 클립보드로 복사하기 - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address 계좌 복사(&C) Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list 현재 목록에 선택한 주소 삭제 - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + 메시지 검증(&V) - + + These are your Triangles 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. + + + + &Delete &삭제 @@ -119,7 +120,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http Export Address Book Data - + @@ -129,18 +130,18 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http Error exporting - + Could not write to file %1. - + AddressTableModel - + Label @@ -180,12 +181,12 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -245,7 +246,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + @@ -261,8 +262,8 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,431 +307,6 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http 지갑 비밀번호가 성공적으로 변경되었습니다 - - BitcoinGUI - - - Sign &message... - 메시지 서명&... - - - - Synchronizing with network... - 네트워크와 동기화중... - - - - &Overview - &개요 - - - - Show general overview of wallet - 지갑의 일반적 개요를 보여 줍니다. - - - - &Transactions - &거래 - - - - Browse transaction history - 거래내역을 검색합니다. - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - 나가기(&X) - - - - Quit application - 적용 중단 - - - - Show information about buynowcoin - - - - - About &Qt - Qt 정보(&Q) - - - - Show information about Qt - Qt 정보를 표시합니다 - - - - &Options... - &옵션 - - - - &Encrypt Wallet... - 지갑 암호화&... - - - - &Backup Wallet... - 지갑 백업&... - - - - &Change Passphrase... - 암호문 변경&... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - 지갑을 다른장소에 백업 - - - - Change the passphrase used for wallet encryption - 지갑 암호화에 사용되는 암호를 변경합니다 - - - - &Debug window - 디버그 창& - - - - Open debugging and diagnostic console - 디버깅 및 진단 콘솔을 엽니다 - - - - &Verify message... - 메시지 확인&... - - - - buynowcoin - - - - - Wallet - 지갑 - - - - &About buynowcoin - - - - - &Show / Hide - 보이기/숨기기(&S) - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &파일 - - - - &Settings - &설정 - - - - &Help - &도움말 - - - - Tabs toolbar - 툴바 색인표 - - - - Actions toolbar - - - - - - [testnet] - [테스트넷] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - 현재까지 - - - - Catching up... - 따라잡기... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - 거래 보내기 - - - - Incoming transaction - 거래 들어오는 중 - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - 날짜: %1 -거래액: %2 -형식: %3 -주소: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - 지갑이 암호화 되었고 현재 차단해제 되었습니다 - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - 지갑이 암호화 되었고 현재 잠겨져 있습니다 - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - 시간 - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -744,7 +320,7 @@ Address: %4 Coin Control - + @@ -774,7 +350,7 @@ Address: %4 Low Output: - + @@ -789,12 +365,12 @@ Address: %4 Change: - + (un)select all - + @@ -814,7 +390,7 @@ Address: %4 Label - + @@ -890,12 +466,12 @@ Address: %4 Copy low output - + Copy change - + @@ -930,12 +506,12 @@ Address: %4 lowest - + DUST - + @@ -949,7 +525,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -958,7 +534,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -967,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -990,7 +566,7 @@ This label turns red, if the priority is smaller than "medium". (change) - + @@ -1008,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1018,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address 새로 받는 주소 - + New sending address 새로 보내는 주소 - + Edit receiving address 받는 주소 편집 - + Edit sending address 보내는 주소 편집 - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. 입력된 주소는"%1" 이미 주소록에 있습니다. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. 지갑을 열 수 없습니다. @@ -1065,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + 사용법: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + 메시지 + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + 현재 선택한 주소를 시스템 클립보드로 복사하기 + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + 현재 목록에 선택한 주소 삭제 + + + + &Delete + &삭제 + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + 각각의 파일에 쉼표하기(*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1120,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1130,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1164,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1174,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1190,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1249,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1264,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1275,12 +1197,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1295,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1306,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1328,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". 유형 - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1351,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1369,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". 아직 사용 가능하지 않은 채굴된 잔액 - + Total: 총액: - + Your current total balance 당신의 현재 총액 - + <b>Recent transactions</b> <b>최근 거래내역</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1405,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1512,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1542,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1566,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1581,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console 콘솔 초기화 - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1616,6 +1566,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins 코인들 보내기 @@ -1627,7 +1578,7 @@ This label turns red, if the priority is smaller than "medium". Inputs... - + @@ -1640,7 +1591,7 @@ This label turns red, if the priority is smaller than "medium". 자금이 부족합니다! - + Quantity: 수량: @@ -1648,7 +1599,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1665,8 +1616,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1676,7 +1627,7 @@ This label turns red, if the priority is smaller than "medium". medium - + @@ -1686,12 +1637,12 @@ This label turns red, if the priority is smaller than "medium". Low Output: - + no - + 아니요 @@ -1701,15 +1652,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once 다수의 수령인들에게 한번에 보내기 @@ -1721,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1735,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1749,9 +1700,9 @@ This label turns red, if the priority is smaller than "medium". 보내기(&E) - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1786,17 +1737,17 @@ This label turns red, if the priority is smaller than "medium". Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1806,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1841,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1861,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1869,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + 유형 @@ -1883,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book 당신의 주소록에 이 주소를 추가하기 위하여 표를 입역하세요 + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: 표: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1920,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + 클립보드로 부터 주소를 붙이세요 + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + 다수의 수령인들에게 한번에 보내기 + + + + Add &Recipient + 수령인 추가하기 + + + + Remove all transaction fields + + + + + Clear &All + 모두 지우기(&A) + + + + Confirm the send action + 전송 기능 확인 + + + + S&end + 보내기(&E) + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + 수령인 주소가 정확하지 않습니다. 재확인 바랍니다 + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + 두개 이상의 주소입니다. 한번에 하나의 주소에만 작업할 수 있습니다. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + 유형 + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + 클립보드로 부터 주소를 붙이세요 + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + 당신의 주소록에 이 주소를 추가하기 위하여 표를 입역하세요 + + + + &Label: + 표: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1948,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1985,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields 메시지 필드의 모든 서명 재설정 @@ -2008,38 +2190,37 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields 모든 검증 메시지 필드 재설정 - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature 서명을 만들려면 "메시지 서명"을 누르십시오 + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2118,7 +2299,9 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + @@ -2148,7 +2331,9 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + @@ -2194,14 +2379,16 @@ This label turns red, if the priority is smaller than "medium". - + Credit 예금 - + matures in %n more block(s) - + + + @@ -2212,12 +2399,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit 차변 - + Transaction fee 송금 수수료 @@ -2237,14 +2424,14 @@ This label turns red, if the priority is smaller than "medium". 설명 - + Transaction ID 송금 ID - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2277,7 +2464,7 @@ This label turns red, if the priority is smaller than "medium". 거짓 - + , has not been successfully broadcast yet . 아직 성공적으로 통보하지 않음 @@ -2303,7 +2490,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date 날짜 @@ -2335,10 +2522,17 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + - + + Narration + + + + Offline 오프라인 @@ -2350,7 +2544,7 @@ This label turns red, if the priority is smaller than "medium". Confirming (%1 of %2 recommended confirmations) - + @@ -2360,7 +2554,7 @@ This label turns red, if the priority is smaller than "medium". Immature (%1 confirmations, will be available after %2) - + @@ -2403,7 +2597,7 @@ This label turns red, if the priority is smaller than "medium". (없음) - + Transaction status. Hover over this field to show number of confirmations. 거래상황. 마우스를 올리면 승인횟수가 표시됩니다. @@ -2534,7 +2728,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2579,12 +2773,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2598,32 +2792,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: 사용법: - - Send command to -server or buynowcoind - - - - + List commands 커맨드 목록 @@ -2638,17 +2814,7 @@ This label turns red, if the priority is smaller than "medium". 옵션: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) 데이터 폴더 안에 지갑 파일을 선택하세요. @@ -2665,12 +2831,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2690,12 +2856,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2715,22 +2881,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2740,22 +2906,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2775,17 +2941,17 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2793,19 +2959,14 @@ This label turns red, if the priority is smaller than "medium". 경고: -paytxfee값이 너무 큽니다! 이 값은 송금할때 지불할 송금 수수료입니다. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + @@ -2825,72 +2986,72 @@ This label turns red, if the priority is smaller than "medium". Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) + SSL options: (see the Triangles Wiki for SSL setup instructions) SSL 옵션: (SSL 설정 절차를 보혀면 비트코인 위키를 참조하십시오) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2900,12 +3061,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2926,22 +3087,22 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2951,17 +3112,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2979,34 +3150,39 @@ This label turns red, if the priority is smaller than "medium". JSON-RPC 연결에 사용할 암호 - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3026,22 +3202,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3061,17 +3237,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3091,17 +3267,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3111,27 +3287,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) 이 컴퓨터의 %s에 바인딩할 수 없습니다 (바인딩 과정에 %d 오류 발생, %s) Connect through socks proxy - + @@ -3146,7 +3312,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3154,17 +3320,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f wallet.dat 불러오기 에러: 지갑 오류 - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat wallet.dat 불러오기 에러 @@ -3201,12 +3357,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3224,39 +3380,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f 블럭 인덱스를 불러오는 중... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open - + - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... 지갑을 불러오는 중... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet 지갑을 다운그레이드 할 수 없습니다 Cannot initialize keypool - + @@ -3293,4 +3479,476 @@ If the file does not exist, create it with owner-readable-only file permissions. 파일이 없으면 소유자 읽기 전용 파일 권한으로 만들어야 합니다. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + 지갑 + + + + &Overview + &개요 + + + + Show general overview of wallet + 지갑의 일반적 개요를 보여 줍니다. + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &거래 + + + + Browse transaction history + 거래내역을 검색합니다. + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + 나가기(&X) + + + + Quit application + 적용 중단 + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Qt 정보(&Q) + + + + Show information about Qt + Qt 정보를 표시합니다 + + + + &Options... + &옵션 + + + + Modify configuration options for Triangles + + + + + &Show / Hide + 보이기/숨기기(&S) + + + + &Encrypt Wallet... + 지갑 암호화&... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + 지갑 백업&... + + + + Backup wallet to another location + 지갑을 다른장소에 백업 + + + + &Change Passphrase... + 암호문 변경&... + + + + Change the passphrase used for wallet encryption + 지갑 암호화에 사용되는 암호를 변경합니다 + + + + &Unlock Wallet... + + + + + Unlock wallet + 지갑 열기 + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + 메시지 서명&... + + + + &Verify message... + 메시지 확인&... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + 디버그 창& + + + + Open debugging and diagnostic console + 디버깅 및 진단 콘솔을 엽니다 + + + + &File + &파일 + + + + &Settings + &설정 + + + + &Help + &도움말 + + + + Tabs toolbar + 툴바 색인표 + + + + Actions toolbar + + + + + + [testnet] + [테스트넷] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + 네트워크와 동기화중... + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + 현재까지 + + + + Catching up... + 따라잡기... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + 거래 보내기 + + + + Incoming transaction + 거래 들어오는 중 + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + 날짜: %1 +거래액: %2 +형식: %3 +주소: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + 지갑이 암호화 되었고 현재 차단해제 되었습니다 + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + 지갑이 암호화 되었고 현재 잠겨져 있습니다 + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + 시간 + + + + + %n day(s) + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_ky.qm b/src/qt/locale/triangles_ky.qm new file mode 100644 index 0000000..aa1c845 Binary files /dev/null and b/src/qt/locale/triangles_ky.qm differ diff --git a/src/qt/locale/bitcoin_ky.ts b/src/qt/locale/triangles_ky.ts similarity index 55% rename from src/qt/locale/bitcoin_ky.ts rename to src/qt/locale/triangles_ky.ts index 89e044d..6b1d7f6 100644 --- a/src/qt/locale/bitcoin_ky.ts +++ b/src/qt/locale/triangles_ky.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,110 +35,110 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label - + - + Create a new address Жаң даректи жасоо Copy the currently selected address to the system clipboard - + - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete Ө&чүрүү Copy &Label - + &Edit - + Export Address Book Data - + Comma separated file (*.csv) - + Error exporting - + Could not write to file %1. - + AddressTableModel - + Label - + @@ -155,109 +156,109 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + Enter passphrase - + New passphrase - + Repeat new passphrase - + Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + 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>. - + Encrypt wallet - + This operation needs your wallet passphrase to unlock the wallet. - + Unlock wallet - + This operation needs your wallet passphrase to decrypt the wallet. - + Decrypt wallet - + Change passphrase - + Enter the old and new passphrase to the wallet. - + Confirm wallet encryption - + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + Wallet encrypted - + - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -265,461 +266,40 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet encryption failed - + Wallet encryption failed due to an internal error. Your wallet was not encrypted. - + The supplied passphrases do not match. - + Wallet unlock failed - + The passphrase entered for the wallet decryption was incorrect. - + Wallet decryption failed - + Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - - - - - &Overview - - - - - Show general overview of wallet - - - - - &Transactions - &Транзакциялар - - - - Browse transaction history - - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - Билдирүүнү &текшерүү... - - - - buynowcoin - - - - - Wallet - Капчык - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Файл - - - - &Settings - - - - - &Help - &Жардам - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Жаңыланган - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,77 +315,77 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + Amount - + Label - + @@ -820,118 +400,118 @@ Address: %4 Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -989,17 +569,17 @@ This label turns red, if the priority is smaller than "medium". Edit Address - + &Label - + The label associated with this address book entry - + @@ -1009,91 +589,437 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + Could not unlock wallet. - + New key generation failed. - + GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + Билдирүү + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (аты жок) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + Ө&чүрүү + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1101,52 +1027,52 @@ This label turns red, if the priority is smaller than "medium". Options - + &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1155,33 +1081,33 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + @@ -1191,17 +1117,17 @@ This label turns red, if the priority is smaller than "medium". Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + @@ -1211,67 +1137,67 @@ This label turns red, if the priority is smaller than "medium". Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1286,7 +1212,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1297,18 +1223,18 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1316,23 +1242,23 @@ This label turns red, if the priority is smaller than "medium". Form - + - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1342,47 +1268,75 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> - + - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,62 +1422,62 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + @@ -1533,17 +1487,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1553,47 +1502,52 @@ This label turns red, if the priority is smaller than "medium". Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Консолду тазалоо - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,112 +1561,113 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - + Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once - + Add &Recipient - + Remove all transaction fields - + @@ -1722,17 +1677,17 @@ This label turns red, if the priority is smaller than "medium". Balance: - + - 123.456 BTC - + 123.456 TRI + Confirm the send action - + @@ -1740,109 +1695,114 @@ This label turns red, if the priority is smaller than "medium". &Жөнөтүү - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,43 +1820,53 @@ This label turns red, if the priority is smaller than "medium". Form - + A&mount: - + Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: - + - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + Alt+A - + @@ -1906,17 +1876,228 @@ This label turns red, if the priority is smaller than "medium". Alt+P - + Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + Даректи алмашуу буферинен коюу + + + + Alt+P + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + &Бардыгын тазалоо + + + + Confirm the send action + + + + + S&end + &Жөнөтүү + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + Даректи алмашуу буферинен коюу + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,35 +2105,35 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + Alt+A - + @@ -1962,27 +2143,32 @@ This label turns red, if the priority is smaller than "medium". Alt+P - + Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + @@ -1994,49 +2180,48 @@ This label turns red, if the priority is smaller than "medium". &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2104,17 +2289,20 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Open for %n block(s) - + + + + conflicted - + @@ -2124,22 +2312,25 @@ This label turns red, if the priority is smaller than "medium". %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + + @@ -2149,73 +2340,76 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + @@ -2225,57 +2419,57 @@ This label turns red, if the priority is smaller than "medium". Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + Amount - + true - + false - + - + , has not been successfully broadcast yet - + unknown - + @@ -2283,25 +2477,25 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date Дата Type - + @@ -2311,112 +2505,120 @@ This label turns red, if the priority is smaller than "medium". Amount - + Open until %1 - + Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + Received with - + Received from - + Sent to - + Payment to yourself - + Mined - + (n/a) - + - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2425,117 +2627,117 @@ This label turns red, if the priority is smaller than "medium". All - + Today - + This week - + This month - + Last month - + This year - + Range... - + Received with - + Sent to - + To yourself - + Mined - + Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + Comma separated file (*.csv) - + Confirmed - + @@ -2545,12 +2747,12 @@ This label turns red, if the priority is smaller than "medium". Type - + Label - + @@ -2560,714 +2762,706 @@ This label turns red, if the priority is smaller than "medium". Amount - + ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com - + - - Find peers using internet relay chat (default: 0) - + + Specify configuration file (default: triangles.conf) + - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + @@ -3279,7 +3473,485 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Капчык + + + + &Overview + + + + + Show general overview of wallet + + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Транзакциялар + + + + Browse transaction history + + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + Билдирүүнү &текшерүү... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Файл + + + + &Settings + + + + + &Help + &Жардам + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Жаңыланган + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + + + + + + + %n day(s) + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_la.qm b/src/qt/locale/triangles_la.qm new file mode 100644 index 0000000..37ccfa9 Binary files /dev/null and b/src/qt/locale/triangles_la.qm differ diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/triangles_la.ts similarity index 67% rename from src/qt/locale/bitcoin_la.ts rename to src/qt/locale/triangles_la.ts index 0cc10cc..8a4b5da 100644 --- a/src/qt/locale/bitcoin_la.ts +++ b/src/qt/locale/triangles_la.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -38,15 +39,15 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op Address Book - + - + Double-click to edit address or label Dupliciter-clicca ut inscriptionem vel titulum mutes - + Create a new address Crea novam inscriptionem @@ -56,52 +57,52 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op Copia inscriptionem iam selectam in latibulum systematis - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Copia Inscriptionem Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Dele active selectam inscriptionem ex enumeratione - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Verifica Nuntium - + + These are your Triangles 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. + + + + &Delete &Dele @@ -118,7 +119,7 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op Export Address Book Data - + @@ -128,18 +129,18 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Titulus @@ -179,12 +180,12 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -234,7 +235,7 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -260,8 +261,8 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -305,431 +306,6 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op Tessera cassidilis successa est in mutando. - - BitcoinGUI - - - Sign &message... - Signa &nuntium... - - - - Synchronizing with network... - Synchronizans cum rete... - - - - &Overview - &Summarium - - - - Show general overview of wallet - Monstra generale summarium cassidilis - - - - &Transactions - &Transactiones - - - - Browse transaction history - Inspicio historiam transactionum - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - E&xi - - - - Quit application - Exi applicatione - - - - Show information about buynowcoin - - - - - About &Qt - Informatio de &Qt - - - - Show information about Qt - Monstra informationem de Qt - - - - &Options... - &Optiones - - - - &Encrypt Wallet... - &Cifra Cassidile... - - - - &Backup Wallet... - &Conserva Cassidile... - - - - &Change Passphrase... - &Muta tesseram... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Conserva cassidile in locum alium - - - - Change the passphrase used for wallet encryption - Muta tesseram utam pro cassidilis cifrando - - - - &Debug window - Fenestra &Debug - - - - Open debugging and diagnostic console - Aperi terminalem debug et diagnosticalem - - - - &Verify message... - &Verifica nuntium... - - - - buynowcoin - - - - - Wallet - Cassidile - - - - &About buynowcoin - - - - - &Show / Hide - &Monstra/Occulta - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Plica - - - - &Settings - &Configuratio - - - - &Help - &Auxilium - - - - Tabs toolbar - Tabella instrumentorum "Tabs" - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Recentissimo - - - - Catching up... - Persequens... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transactio missa - - - - Incoming transaction - Transactio incipiens - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Dies: %1 -Quantitas: %2 -Typus: %3 -Inscriptio: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Cassidile <b>cifratum</b> est et iam nunc <b>reseratum</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Cassidile <b>cifratum</b> est et iam nunc <b>seratum</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n hora%n horae - - - - %n day(s) - %n dies%n dies - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -743,17 +319,17 @@ Inscriptio: %4 Coin Control - + Quantity: - + Bytes: - + @@ -763,47 +339,47 @@ Inscriptio: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -813,7 +389,7 @@ Inscriptio: %4 Label - + Titulus @@ -828,7 +404,7 @@ Inscriptio: %4 Confirmations - + @@ -838,7 +414,7 @@ Inscriptio: %4 Priority - + @@ -864,82 +440,82 @@ Inscriptio: %4 Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -948,7 +524,7 @@ Inscriptio: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -957,7 +533,7 @@ Inscriptio: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -966,14 +542,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -984,12 +560,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1007,7 +583,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1017,40 +593,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nova inscriptio accipiendi - + New sending address Nova inscriptio mittendi - + Edit receiving address Muta inscriptionem accipiendi - + Edit sending address Muta inscriptionem mittendi - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Inserta inscriptio "%1" iam in libro inscriptionum est. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Non potuisse cassidile reserare @@ -1064,44 +645,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Usus: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Typus + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Titulus + + + + To Address + + + + + From Address + + + + + Message + Nuntius + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (nullus titulus) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copia inscriptionem iam selectam in latibulum systematis + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Dele active selectam inscriptionem ex enumeratione + + + + &Delete + &Dele + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Comma Separata Plica (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1119,7 +1041,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1129,32 +1051,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1163,8 +1085,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1173,13 +1095,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1189,7 +1111,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1248,8 +1170,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1263,8 +1185,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1274,12 +1196,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1294,7 +1216,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1305,13 +1227,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1327,20 +1249,20 @@ This label turns red, if the priority is smaller than "medium". Schema - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1350,12 +1272,12 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + @@ -1368,29 +1290,57 @@ This label turns red, if the priority is smaller than "medium". Fossum pendendum quod nondum maturum est - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Recentes transactiones</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1404,57 +1354,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Quantitas: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1511,7 +1461,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1541,17 +1491,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1565,13 +1510,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1580,18 +1525,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Vacuefac terminale - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1615,44 +1565,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Mitte Nummos Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1664,51 +1615,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Mitte pluribus accipientibus simul @@ -1720,7 +1671,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1734,8 +1685,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1748,14 +1699,14 @@ This label turns red, if the priority is smaller than "medium". &Mitte - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1765,37 +1716,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1805,12 +1756,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1840,17 +1791,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1860,7 +1816,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1868,7 +1824,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Schema @@ -1882,24 +1838,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Insero titulum huic inscriptioni ut eam in tuum librum inscriptionum addas. + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Titulus: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1919,12 +1885,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Mitte pluribus accipientibus simul + + + + Add &Recipient + Adde &Accipientem + + + + Remove all transaction fields + + + + + Clear &All + Vacuefac &Omnia + + + + Confirm the send action + Confirma actionem mittendi + + + + S&end + &Mitte + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Inscriptio accipientis non est valida, sodes reproba. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Geminata inscriptio inventa, tantum posse mittere ad quamque inscriptionem semel singulare operatione. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Schema + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Insero titulum huic inscriptioni ut eam in tuum librum inscriptionum addas. + + + + &Label: + &Titulus: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1947,14 +2124,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1984,11 +2161,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Reconstitue omnes campos signandi nuntii @@ -2011,34 +2193,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Reconstitue omnes campos verificandi nuntii - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Clicca "Signa Nuntium" ut signatio generetur + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2117,12 +2298,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2147,7 +2331,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , disseminatum per %n nodo, disseminata per %n nodis + + , disseminatum per %n nodo + , disseminata per %n nodis + @@ -2193,14 +2380,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Creditum - + matures in %n more block(s) - maturum erit in %n plure frustomaturum erit in %n pluribus frustis + + maturum erit in %n plure frusto + maturum erit in %n pluribus frustis + @@ -2211,12 +2401,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debitum - + Transaction fee Transactionis merces @@ -2236,14 +2426,14 @@ This label turns red, if the priority is smaller than "medium". Annotatio - + Transaction ID ID transactionis - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2276,7 +2466,7 @@ This label turns red, if the priority is smaller than "medium". falsum - + , has not been successfully broadcast yet , nondum prospere disseminatum est @@ -2302,7 +2492,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Dies @@ -2334,32 +2524,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Aperi pro %n plure frustoAperi pro %n pluribus frustis + + Aperi pro %n plure frusto + Aperi pro %n pluribus frustis + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2402,7 +2600,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Status transactionis. Supervola cum mure ut monstretur numerus confirmationum. @@ -2533,7 +2731,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2578,12 +2776,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2597,32 +2795,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Usus: - - Send command to -server or buynowcoind - - - - + List commands Enumera mandata @@ -2637,19 +2817,9 @@ This label turns red, if the priority is smaller than "medium". Optiones: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2664,12 +2834,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2689,12 +2859,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2714,22 +2884,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2739,22 +2909,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2779,12 +2949,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2792,12 +2962,7 @@ This label turns red, if the priority is smaller than "medium". Monitio: -paytxfee constitutum valde magnum! Hoc est merces transactionis solves si mittis transactionem. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Monitio: error legendo wallet.dat! Omnes claves recte lectae, sed data transactionum vel libri inscriptionum fortasse desint vel prava sint. @@ -2834,22 +2999,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2869,27 +3034,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Optiones SSL: (vide vici de Bitcoin pro instructionibus SSL configurationis) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Optiones SSL: (vide vici de Triangles pro instructionibus SSL configurationis) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2899,12 +3064,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2925,7 +3090,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2940,7 +3105,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2950,17 +3115,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2978,34 +3153,39 @@ This label turns red, if the priority is smaller than "medium". Tessera pro conexionibus JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3030,17 +3210,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3060,17 +3240,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3090,17 +3270,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3110,27 +3290,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Non posse conglutinare ad %s in hoc computatro (conglutinare redidit errorem %d, %s) Connect through socks proxy - + @@ -3145,7 +3315,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3153,17 +3323,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error legendi wallet.dat: Cassidile corruptum - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Error legendi wallet.dat @@ -3200,12 +3360,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3223,39 +3383,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Legens indicem frustorum... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Adice nodum cui conectere et conare sustinere conexionem apertam - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Legens cassidile... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Non posse cassidile regredi Cannot initialize keypool - + @@ -3292,4 +3482,486 @@ If the file does not exist, create it with owner-readable-only file permissions. Si plica non existat, crea eam cum permissionibus ut solus eius dominus eam legere sinatur. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Cassidile + + + + &Overview + &Summarium + + + + Show general overview of wallet + Monstra generale summarium cassidilis + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transactiones + + + + Browse transaction history + Inspicio historiam transactionum + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + E&xi + + + + Quit application + Exi applicatione + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Informatio de &Qt + + + + Show information about Qt + Monstra informationem de Qt + + + + &Options... + &Optiones + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Monstra/Occulta + + + + &Encrypt Wallet... + &Cifra Cassidile... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Conserva Cassidile... + + + + Backup wallet to another location + Conserva cassidile in locum alium + + + + &Change Passphrase... + &Muta tesseram... + + + + Change the passphrase used for wallet encryption + Muta tesseram utam pro cassidilis cifrando + + + + &Unlock Wallet... + + + + + Unlock wallet + Resera cassidile + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Signa &nuntium... + + + + &Verify message... + &Verifica nuntium... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + Fenestra &Debug + + + + Open debugging and diagnostic console + Aperi terminalem debug et diagnosticalem + + + + &File + &Plica + + + + &Settings + &Configuratio + + + + &Help + &Auxilium + + + + Tabs toolbar + Tabella instrumentorum "Tabs" + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Synchronizans cum rete... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Recentissimo + + + + Catching up... + Persequens... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transactio missa + + + + Incoming transaction + Transactio incipiens + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Dies: %1 +Quantitas: %2 +Typus: %3 +Inscriptio: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Cassidile <b>cifratum</b> est et iam nunc <b>reseratum</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Cassidile <b>cifratum</b> est et iam nunc <b>seratum</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n hora + %n horae + + + + + %n day(s) + + %n dies + %n dies + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_lt.qm b/src/qt/locale/triangles_lt.qm similarity index 50% rename from src/qt/locale/bitcoin_lt.qm rename to src/qt/locale/triangles_lt.qm index 51e5c80..c3a5495 100644 Binary files a/src/qt/locale/bitcoin_lt.qm and b/src/qt/locale/triangles_lt.qm differ diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/triangles_lt.ts similarity index 64% rename from src/qt/locale/bitcoin_lt.ts rename to src/qt/locale/triangles_lt.ts index c779c35..5fdb022 100644 --- a/src/qt/locale/bitcoin_lt.ts +++ b/src/qt/locale/triangles_lt.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -38,15 +39,15 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www. Address Book - + - + Double-click to edit address or label Spragtelėkite, kad pakeistumėte adresą arba žymę - + Create a new address Sukurti naują adresą @@ -56,52 +57,52 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www. Kopijuoti esamą adresą į mainų atmintį - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Kopijuoti adresą Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + &Patikrinti žinutę + + + + These are your Triangles 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. + + + + &Delete &Trinti @@ -118,7 +119,7 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www. Export Address Book Data - + @@ -128,18 +129,18 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www. Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Žymė @@ -179,12 +180,12 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www. Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -234,7 +235,7 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www. Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -244,7 +245,7 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www. IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + @@ -260,8 +261,8 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www. - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -305,430 +306,6 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www. Piniginės slaptažodis sėkmingai pakeistas. - - BitcoinGUI - - - Sign &message... - Pasirašyti ži&nutę... - - - - Synchronizing with network... - Sinchronizavimas su tinklu ... - - - - &Overview - &Apžvalga - - - - Show general overview of wallet - Rodyti piniginės bendrą apžvalgą - - - - &Transactions - &Sandoriai - - - - Browse transaction history - Apžvelgti sandorių istoriją - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Išeiti - - - - Quit application - Išjungti programą - - - - Show information about buynowcoin - - - - - About &Qt - Apie &Qt - - - - Show information about Qt - Rodyti informaciją apie Qt - - - - &Options... - &Parinktys... - - - - &Encrypt Wallet... - &Užšifruoti piniginę... - - - - &Backup Wallet... - &Backup piniginę... - - - - &Change Passphrase... - &Keisti slaptafrazę... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Daryti piniginės atsarginę kopiją - - - - Change the passphrase used for wallet encryption - Pakeisti slaptafrazę naudojamą piniginės užšifravimui - - - - &Debug window - &Derinimo langas - - - - Open debugging and diagnostic console - Atverti derinimo ir diagnostikos konsolę - - - - &Verify message... - &Tikrinti žinutę... - - - - buynowcoin - - - - - Wallet - Piniginė - - - - &About buynowcoin - - - - - &Show / Hide - &Rodyti / Slėpti - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Failas - - - - &Settings - &Nustatymai - - - - &Help - &Pagalba - - - - Tabs toolbar - Kortelių įrankinė - - - - Actions toolbar - - - - - - [testnet] - [testavimotinklas] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Atnaujinta - - - - Catching up... - Vejamasi... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Sandoris nusiųstas - - - - Incoming transaction - Ateinantis sandoris - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Data: %1 -Suma: %2 -Tipas: %3 -Adresas: %4 - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Piniginė <b>užšifruota</b> ir šiuo metu <b>atrakinta</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Piniginė <b>užšifruota</b> ir šiuo metu <b>užrakinta</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n valanda%n valandos%n valandų - - - - %n day(s) - %n diena%n dienos%n dienų - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -742,17 +319,17 @@ Adresas: %4 Coin Control - + Quantity: - + Bytes: - + @@ -762,47 +339,47 @@ Adresas: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -812,7 +389,7 @@ Adresas: %4 Label - + Žymė @@ -827,7 +404,7 @@ Adresas: %4 Confirmations - + @@ -837,7 +414,7 @@ Adresas: %4 Priority - + @@ -858,87 +435,87 @@ Adresas: %4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -947,7 +524,7 @@ Adresas: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -956,7 +533,7 @@ Adresas: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -965,14 +542,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -983,12 +560,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1006,7 +583,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1016,40 +593,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Naujas gavimo adresas - + New sending address Naujas siuntimo adresas - + Edit receiving address Keisti gavimo adresą - + Edit sending address Keisti siuntimo adresą - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Įvestas adresas „%1“ jau yra adresų knygelėje. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Nepavyko atrakinti piniginės. @@ -1063,44 +645,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Naudojimas: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipas + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Žymė + + + + To Address + + + + + From Address + + + + + Message + Žinutė + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (nėra žymės) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopijuoti esamą adresą į mainų atmintį + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Trinti + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1118,7 +1041,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1128,32 +1051,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1162,8 +1085,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1172,13 +1095,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1188,7 +1111,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1247,8 +1170,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1262,8 +1185,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1273,12 +1196,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1293,7 +1216,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1304,13 +1227,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1326,20 +1249,20 @@ This label turns red, if the priority is smaller than "medium". Forma - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1349,12 +1272,12 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + @@ -1364,32 +1287,60 @@ This label turns red, if the priority is smaller than "medium". Mined balance that has not yet matured - + - + Total: Viso: - + Your current total balance Jūsų balansas - + <b>Recent transactions</b> <b>Naujausi sandoriai</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1403,57 +1354,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Suma: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1510,7 +1461,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1525,7 +1476,7 @@ This label turns red, if the priority is smaller than "medium". Estimated total blocks - + @@ -1540,17 +1491,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1564,13 +1510,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1579,28 +1525,33 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Išvalyti konsolę - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1614,44 +1565,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Siųsti monetas Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1663,51 +1615,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Siųsti keliems gavėjams vienu metu @@ -1719,7 +1671,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1733,8 +1685,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1747,14 +1699,14 @@ This label turns red, if the priority is smaller than "medium". &Siųsti - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1764,37 +1716,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1804,12 +1756,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1839,17 +1791,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1859,7 +1816,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1867,7 +1824,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Forma @@ -1881,24 +1838,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Įveskite žymę šiam adresui kad galėtumėte įtraukti ją į adresų knygelę + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: Ž&ymė: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1918,12 +1885,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Įvesti adresą iš mainų atminties + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Siųsti keliems gavėjams vienu metu + + + + Add &Recipient + &A Pridėti gavėją + + + + Remove all transaction fields + + + + + Clear &All + Išvalyti &viską + + + + Confirm the send action + Patvirtinti siuntimo veiksmą + + + + S&end + &Siųsti + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Negaliojantis gavėjo adresas. Patikrinkite. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Rastas adreso dublikatas. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Forma + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Įvesti adresą iš mainų atminties + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Įveskite žymę šiam adresui kad galėtumėte įtraukti ją į adresų knygelę + + + + &Label: + Ž&ymė: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1931,7 +2109,7 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + @@ -1942,18 +2120,18 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1979,17 +2157,22 @@ This label turns red, if the priority is smaller than "medium". Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + @@ -2006,38 +2189,37 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Spragtelėkite "Registruotis žinutę" tam, kad gauti parašą + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2057,7 +2239,7 @@ This label turns red, if the priority is smaller than "medium". The entered address does not refer to a key. - + @@ -2067,7 +2249,7 @@ This label turns red, if the priority is smaller than "medium". Private key for the entered address is not available. - + @@ -2116,12 +2298,16 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + + conflicted - + @@ -2146,7 +2332,11 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + + + @@ -2192,14 +2382,18 @@ This label turns red, if the priority is smaller than "medium". - + Credit Kreditas - + matures in %n more block(s) - + + + + + @@ -2210,12 +2404,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debitas - + Transaction fee Sandorio mokestis @@ -2235,14 +2429,14 @@ This label turns red, if the priority is smaller than "medium". Komentaras - + Transaction ID Sandorio ID - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2257,7 +2451,7 @@ This label turns red, if the priority is smaller than "medium". Inputs - + @@ -2275,7 +2469,7 @@ This label turns red, if the priority is smaller than "medium". netiesa - + , has not been successfully broadcast yet , transliavimas dar nebuvo sėkmingas @@ -2301,7 +2495,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Data @@ -2333,32 +2527,41 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2401,7 +2604,7 @@ This label turns red, if the priority is smaller than "medium". nepasiekiama - + Transaction status. Hover over this field to show number of confirmations. Sandorio būklė. Užvedus pelės žymeklį ant šios srities matysite patvirtinimų skaičių. @@ -2517,7 +2720,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2532,7 +2735,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2577,12 +2780,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2596,32 +2799,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Naudojimas: - - Send command to -server or buynowcoind - - - - + List commands Komandų sąrašas @@ -2636,19 +2821,9 @@ This label turns red, if the priority is smaller than "medium". Parinktys: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2658,17 +2833,17 @@ This label turns red, if the priority is smaller than "medium". Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2678,22 +2853,22 @@ This label turns red, if the priority is smaller than "medium". Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2708,27 +2883,27 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2738,22 +2913,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2768,22 +2943,22 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2791,29 +2966,24 @@ This label turns red, if the priority is smaller than "medium". Įspėjimas: -paytxfee yra nustatytas per didelis. Tai sandorio mokestis, kurį turėsite mokėti, jei siųsite sandorį. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + @@ -2823,32 +2993,32 @@ This label turns red, if the priority is smaller than "medium". Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2863,32 +3033,32 @@ This label turns red, if the priority is smaller than "medium". Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL opcijos (žr.e Bitcoin Wiki for SSL setup instructions) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL opcijos (žr.e Triangles Wiki for SSL setup instructions) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2898,22 +3068,22 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + @@ -2924,7 +3094,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2939,7 +3109,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2949,27 +3119,37 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + @@ -2977,34 +3157,39 @@ This label turns red, if the priority is smaller than "medium". Slaptažodis JSON-RPC sujungimams - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3019,27 +3204,27 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when the best block changes (%s in cmd is replaced by block hash) - + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3059,17 +3244,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3089,17 +3274,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3109,27 +3294,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Nepavyko susieti šiame kompiuteryje prievado %s (bind returned error %d, %s) Connect through socks proxy - + @@ -3144,7 +3319,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3152,17 +3327,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f wallet.dat pakrovimo klaida, wallet.dat sugadintas - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat wallet.dat pakrovimo klaida @@ -3174,22 +3339,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + @@ -3199,12 +3364,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3222,44 +3387,74 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Įkeliamas blokų indeksas... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Pridėti mazgą prie sujungti su and attempt to keep the connection open - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Užkraunama piniginė... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + @@ -3274,7 +3469,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f To use the %s option - + @@ -3286,7 +3481,498 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Piniginė + + + + &Overview + &Apžvalga + + + + Show general overview of wallet + Rodyti piniginės bendrą apžvalgą + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Sandoriai + + + + Browse transaction history + Apžvelgti sandorių istoriją + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Išeiti + + + + Quit application + Išjungti programą + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Apie &Qt + + + + Show information about Qt + Rodyti informaciją apie Qt + + + + &Options... + &Parinktys... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Rodyti / Slėpti + + + + &Encrypt Wallet... + &Užšifruoti piniginę... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Backup piniginę... + + + + Backup wallet to another location + Daryti piniginės atsarginę kopiją + + + + &Change Passphrase... + &Keisti slaptafrazę... + + + + Change the passphrase used for wallet encryption + Pakeisti slaptafrazę naudojamą piniginės užšifravimui + + + + &Unlock Wallet... + + + + + Unlock wallet + Atrakinti piniginę + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Pasirašyti ži&nutę... + + + + &Verify message... + &Tikrinti žinutę... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + &Derinimo langas + + + + Open debugging and diagnostic console + Atverti derinimo ir diagnostikos konsolę + + + + &File + &Failas + + + + &Settings + &Nustatymai + + + + &Help + &Pagalba + + + + Tabs toolbar + Kortelių įrankinė + + + + Actions toolbar + + + + + + [testnet] + [testavimotinklas] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Sinchronizavimas su tinklu ... + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + Atnaujinta + + + + Catching up... + Vejamasi... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Sandoris nusiųstas + + + + Incoming transaction + Ateinantis sandoris + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Data: %1 +Suma: %2 +Tipas: %3 +Adresas: %4 + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Piniginė <b>užšifruota</b> ir šiuo metu <b>atrakinta</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Piniginė <b>užšifruota</b> ir šiuo metu <b>užrakinta</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + %n valanda + %n valandos + %n valandų + + + + + %n day(s) + + %n diena + %n dienos + %n dienų + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_lv_LV.qm b/src/qt/locale/triangles_lv_LV.qm new file mode 100644 index 0000000..8f0e35f Binary files /dev/null and b/src/qt/locale/triangles_lv_LV.qm differ diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/triangles_lv_LV.ts similarity index 63% rename from src/qt/locale/bitcoin_lv_LV.ts rename to src/qt/locale/triangles_lv_LV.ts index dbd9557..dc850f1 100644 --- a/src/qt/locale/bitcoin_lv_LV.ts +++ b/src/qt/locale/triangles_lv_LV.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Adresi vai nosaukumu rediģē ar dubultklikšķi - + Create a new address Izveidot jaunu adresi @@ -52,52 +53,52 @@ This product includes software developed by the OpenSSL Project for use in the O Kopēt iezīmēto adresi uz starpliktuvi - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Kopēt adresi Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Dzēst @@ -114,7 +115,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Nosaukums @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,432 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - Parakstīt &ziņojumu... - - - - Synchronizing with network... - Sinhronizācija ar tīklu... - - - - &Overview - &Pārskats - - - - Show general overview of wallet - Rādīt vispārēju maciņa pārskatu - - - - &Transactions - &Transakcijas - - - - Browse transaction history - Skatīt transakciju vēsturi - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Iziet - - - - Quit application - Aizvērt programmu - - - - Show information about buynowcoin - - - - - About &Qt - Par &Qt - - - - Show information about Qt - Parādīt informāciju par Qt - - - - &Options... - &Iespējas - - - - &Encrypt Wallet... - Š&ifrēt maciņu... - - - - &Backup Wallet... - &Izveidot maciņa rezerves kopiju - - - - &Change Passphrase... - &Mainīt paroli - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Izveidot maciņa rezerves kopiju citur - - - - Change the passphrase used for wallet encryption - Mainīt maciņa šifrēšanas paroli - - - - &Debug window - &Debug logs - - - - Open debugging and diagnostic console - Atvērt atkļūdošanas un diagnostikas konsoli - - - - &Verify message... - &Pārbaudīt ziņojumu... - - - - buynowcoin - - - - - Wallet - Maciņš - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Fails - - - - &Settings - &Uzstādījumi - - - - &Help - &Palīdzība - - - - Tabs toolbar - Ciļņu rīkjosla - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Sinhronizēts - - - - Catching up... - Sinhronizējos... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transakcija nosūtīta - - - - Incoming transaction - Ienākoša transakcija - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Datums: %1 -Daudzums: %2 -Tips: %3 -Adrese: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Maciņš ir <b>šifrēts</b> un pašlaik <b>atslēgts</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Maciņš ir <b>šifrēts</b> un pašlaik <b>slēgts</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -739,17 +315,17 @@ Adrese: %4 Coin Control - + Quantity: - + Bytes: - + @@ -759,47 +335,47 @@ Adrese: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -809,7 +385,7 @@ Adrese: %4 Label - + Nosaukums @@ -824,7 +400,7 @@ Adrese: %4 Confirmations - + @@ -834,7 +410,7 @@ Adrese: %4 Priority - + @@ -855,87 +431,87 @@ Adrese: %4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -944,7 +520,7 @@ Adrese: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -953,7 +529,7 @@ Adrese: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -962,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -980,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1003,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1013,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Jauna saņemšanas adrese - + New sending address Jauna nosūtīšanas adrese - + Edit receiving address Mainīt saņemšanas adresi - + Edit sending address Mainīt nosūtīšanas adresi - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Nupat ierakstītā adrese "%1" jau atrodas adrešu grāmatā. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Nav iespējams atslēgt maciņu. @@ -1060,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Lietojums: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tips + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Nosaukums + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (bez nosaukuma) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopēt iezīmēto adresi uz starpliktuvi + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Dzēst + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Fails ar komatu kā atdalītāju (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1115,7 +1037,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1125,32 +1047,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1159,8 +1081,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1169,13 +1091,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1185,7 +1107,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1244,8 +1166,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1259,8 +1181,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1270,12 +1192,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1290,7 +1212,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1301,13 +1223,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1323,20 +1245,20 @@ This label turns red, if the priority is smaller than "medium". Forma - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1346,12 +1268,12 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + @@ -1361,32 +1283,60 @@ This label turns red, if the priority is smaller than "medium". Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Pēdējās transakcijas</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1400,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Daudzums: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1487,7 +1437,7 @@ This label turns red, if the priority is smaller than "medium". Using OpenSSL version - + @@ -1507,7 +1457,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1537,17 +1487,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1561,33 +1506,38 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Notīrīt konsoli - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1611,44 +1561,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Sūtīt bitkoinus Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1660,63 +1611,63 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Sūtīt vairākiem saņēmējiem uzreiz Add &Recipient - + Remove all transaction fields - + @@ -1730,8 +1681,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1741,17 +1692,17 @@ This label turns red, if the priority is smaller than "medium". S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1761,37 +1712,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1801,17 +1752,17 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + @@ -1836,17 +1787,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1856,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1864,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Forma @@ -1878,24 +1834,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Lai pievienotu adresi adrešu grāmatai, tai jādod nosaukums + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Nosaukums: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1915,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + ielīmēt adresi no starpliktuves + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Sūtīt vairākiem saņēmējiem uzreiz + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + &Notīrīt visu + + + + Confirm the send action + Apstiprināt nosūtīšanu + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Atrastas divas vienādas adreses, vienā nosūtīšanas reizē uz katru adresi var sūtīt tikai vienreiz. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Forma + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + ielīmēt adresi no starpliktuves + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Lai pievienotu adresi adrešu grāmatai, tai jādod nosaukums + + + + &Label: + &Nosaukums: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1928,29 +2105,29 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1971,22 +2148,27 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + @@ -1998,49 +2180,48 @@ This label turns red, if the priority is smaller than "medium". &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2048,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2113,17 +2294,21 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + + conflicted - + %1/offline - + @@ -2138,12 +2323,16 @@ This label turns red, if the priority is smaller than "medium". Status - + , broadcast through %n node(s) - + + + + + @@ -2153,108 +2342,112 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2264,15 +2457,15 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet , vēl nav veiksmīgi izziņots @@ -2298,7 +2491,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Datums @@ -2330,32 +2523,41 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2398,7 +2600,7 @@ This label turns red, if the priority is smaller than "medium". (nav pieejams) - + Transaction status. Hover over this field to show number of confirmations. Transakcijas statuss. Turiet peli virs šī lauka, lai redzētu apstiprinājumu skaitu. @@ -2514,7 +2716,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2529,7 +2731,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2574,12 +2776,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2593,32 +2795,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Lietojums: - - Send command to -server or buynowcoind - - - - + List commands Komandu saraksts @@ -2633,19 +2817,9 @@ This label turns red, if the priority is smaller than "medium". Iespējas: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2660,12 +2834,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2685,12 +2859,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2705,27 +2879,27 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2735,22 +2909,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2765,127 +2939,117 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + @@ -2895,48 +3059,48 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2946,27 +3110,37 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + @@ -2974,34 +3148,39 @@ This label turns red, if the priority is smaller than "medium". JSON-RPC savienojumu parole - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3021,22 +3200,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3056,17 +3235,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3086,17 +3265,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3106,27 +3285,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Nevar pievienoties pie %s šajā datorā (pievienošanās atgrieza kļūdu %d, %s) Connect through socks proxy - + @@ -3141,7 +3310,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3149,17 +3318,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Nevar ielādēt wallet.dat: maciņš bojāts - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Kļūda ielādējot wallet.dat @@ -3196,12 +3355,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3219,39 +3378,74 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Ielādē bloku indeksu... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Pievienot mezglu, kam pievienoties un turēt savienojumu atvērtu - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - - + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Ielādē maciņu... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Nevar maciņa formātu padarīt vecāku Cannot initialize keypool - + @@ -3288,4 +3482,496 @@ If the file does not exist, create it with owner-readable-only file permissions. Ja fails neeksistē, izveidojiet to ar atļauju lasīšanai tikai īpašniekam. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Maciņš + + + + &Overview + &Pārskats + + + + Show general overview of wallet + Rādīt vispārēju maciņa pārskatu + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transakcijas + + + + Browse transaction history + Skatīt transakciju vēsturi + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Iziet + + + + Quit application + Aizvērt programmu + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Par &Qt + + + + Show information about Qt + Parādīt informāciju par Qt + + + + &Options... + &Iespējas + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + Š&ifrēt maciņu... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Izveidot maciņa rezerves kopiju + + + + Backup wallet to another location + Izveidot maciņa rezerves kopiju citur + + + + &Change Passphrase... + &Mainīt paroli + + + + Change the passphrase used for wallet encryption + Mainīt maciņa šifrēšanas paroli + + + + &Unlock Wallet... + + + + + Unlock wallet + Atslēgt maciņu + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Parakstīt &ziņojumu... + + + + &Verify message... + &Pārbaudīt ziņojumu... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + &Debug logs + + + + Open debugging and diagnostic console + Atvērt atkļūdošanas un diagnostikas konsoli + + + + &File + &Fails + + + + &Settings + &Uzstādījumi + + + + &Help + &Palīdzība + + + + Tabs toolbar + Ciļņu rīkjosla + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Sinhronizācija ar tīklu... + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + Sinhronizēts + + + + Catching up... + Sinhronizējos... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transakcija nosūtīta + + + + Incoming transaction + Ienākoša transakcija + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Datums: %1 +Daudzums: %2 +Tips: %3 +Adrese: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Maciņš ir <b>šifrēts</b> un pašlaik <b>atslēgts</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Maciņš ir <b>šifrēts</b> un pašlaik <b>slēgts</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + + + + + + + + %n day(s) + + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_ms_MY.qm b/src/qt/locale/triangles_ms_MY.qm new file mode 100644 index 0000000..9f90ba8 Binary files /dev/null and b/src/qt/locale/triangles_ms_MY.qm differ diff --git a/src/qt/locale/bitcoin_ms_MY.ts b/src/qt/locale/triangles_ms_MY.ts similarity index 54% rename from src/qt/locale/bitcoin_ms_MY.ts rename to src/qt/locale/triangles_ms_MY.ts index 5ffe8d4..14cf4ef 100644 --- a/src/qt/locale/bitcoin_ms_MY.ts +++ b/src/qt/locale/triangles_ms_MY.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Klik dua kali untuk mengubah alamat atau label - + Create a new address Cipta alamat baru @@ -52,69 +53,69 @@ This product includes software developed by the OpenSSL Project for use in the O Salin alamat terpilih ke dalam sistem papan klip - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Padam Copy &Label - + &Edit - + Export Address Book Data - + @@ -124,20 +125,20 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label - + @@ -147,7 +148,7 @@ This product includes software developed by the OpenSSL Project for use in the O (no label) - + @@ -155,109 +156,109 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + Enter passphrase - + New passphrase - + Repeat new passphrase - + Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + 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>. - + Encrypt wallet - + This operation needs your wallet passphrase to unlock the wallet. - + Unlock wallet - + This operation needs your wallet passphrase to decrypt the wallet. - + Decrypt wallet - + Change passphrase - + Enter the old and new passphrase to the wallet. - + Confirm wallet encryption - + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + Wallet encrypted - + - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -265,461 +266,40 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet encryption failed - + Wallet encryption failed due to an internal error. Your wallet was not encrypted. - + The supplied passphrases do not match. - + Wallet unlock failed - + The passphrase entered for the wallet decryption was incorrect. - + Wallet decryption failed - + Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - - - - - &Overview - - - - - Show general overview of wallet - - - - - &Transactions - - - - - Browse transaction history - - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - Pilihan - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - - - - - &Settings - - - - - &Help - - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,77 +315,77 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + Amount - + Label - + @@ -815,123 +395,123 @@ Address: %4 Date - + Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,30 +538,30 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + (no label) - + change from %1 (%2) - + (change) - + @@ -994,12 +574,12 @@ This label turns red, if the priority is smaller than "medium". &Label - + The label associated with this address book entry - + @@ -1009,91 +589,437 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + Could not unlock wallet. - + New key generation failed. - + GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Salin alamat terpilih ke dalam sistem papan klip + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Padam + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Fail yang dipisahkan dengan koma + + + + Error exporting + + + + + Could not write to file %1. + @@ -1101,214 +1027,214 @@ This label turns red, if the priority is smaller than "medium". Options - + &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1316,79 +1242,107 @@ This label turns red, if the priority is smaller than "medium". Form - + - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> - + - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,117 +1561,118 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - + Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once - + Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1726,133 +1681,138 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + Confirm the send action - + S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + (no label) - + WARNING: unknown change address - + @@ -1860,63 +1820,284 @@ This label turns red, if the priority is smaller than "medium". Form - + A&mount: - + Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: - + - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,119 +2105,123 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2104,178 +2289,184 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Open for %n block(s) - + + + conflicted - + %1/offline - + %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + Date - + Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + Amount - + true - + false - + - + , has not been successfully broadcast yet - + unknown - + @@ -2283,25 +2474,25 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date - + Type - + @@ -2311,112 +2502,119 @@ This label turns red, if the priority is smaller than "medium". Amount - + Open until %1 - + Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + Received with - + Received from - + Sent to - + Payment to yourself - + Mined - + (n/a) - + - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2425,107 +2623,107 @@ This label turns red, if the priority is smaller than "medium". All - + Today - + This week - + This month - + Last month - + This year - + Range... - + Received with - + Sent to - + To yourself - + Mined - + Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + @@ -2535,22 +2733,22 @@ This label turns red, if the priority is smaller than "medium". Confirmed - + Date - + Type - + Label - + @@ -2560,726 +2758,1186 @@ This label turns red, if the priority is smaller than "medium". Amount - + ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com - + - - Find peers using internet relay chat (default: 0) - + + Specify configuration file (default: triangles.conf) + - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + + + + + Browse transaction history + + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + Pilihan + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + + + + + + %n day(s) + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_nb.qm b/src/qt/locale/triangles_nb.qm new file mode 100644 index 0000000..9e6018a Binary files /dev/null and b/src/qt/locale/triangles_nb.qm differ diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/triangles_nb.ts similarity index 68% rename from src/qt/locale/bitcoin_nb.ts rename to src/qt/locale/triangles_nb.ts index a982843..0b2bae9 100644 --- a/src/qt/locale/bitcoin_nb.ts +++ b/src/qt/locale/triangles_nb.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ Dette produktet inneholder programvare utviklet av OpenSSL prosjektet for bruk i Address Book - + - + Double-click to edit address or label Dobbeltklikk for å redigere adresse eller merkelapp - + Create a new address Lag en ny adresse @@ -57,52 +58,52 @@ Dette produktet inneholder programvare utviklet av OpenSSL prosjektet for bruk i Kopier den valgte adressen til systemets utklippstavle - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Kopier Adresse Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Slett den valgte adressen fra listen. - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Verifiser Melding - + + These are your Triangles 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. + + + + &Delete &Slett @@ -119,7 +120,7 @@ Dette produktet inneholder programvare utviklet av OpenSSL prosjektet for bruk i Export Address Book Data - + @@ -129,18 +130,18 @@ Dette produktet inneholder programvare utviklet av OpenSSL prosjektet for bruk i Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Merkelapp @@ -180,12 +181,12 @@ Dette produktet inneholder programvare utviklet av OpenSSL prosjektet for bruk i Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ Dette produktet inneholder programvare utviklet av OpenSSL prosjektet for bruk i Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ Dette produktet inneholder programvare utviklet av OpenSSL prosjektet for bruk i - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,431 +307,6 @@ Dette produktet inneholder programvare utviklet av OpenSSL prosjektet for bruk i Adgangsfrase for lommebok endret. - - BitcoinGUI - - - Sign &message... - Signer &melding... - - - - Synchronizing with network... - Synkroniserer med nettverk... - - - - &Overview - &Oversikt - - - - Show general overview of wallet - Vis generell oversikt over lommeboken - - - - &Transactions - &Transaksjoner - - - - Browse transaction history - Vis transaksjonshistorikk - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Avslutt - - - - Quit application - Avslutt applikasjonen - - - - Show information about buynowcoin - - - - - About &Qt - Om &Qt - - - - Show information about Qt - Vis informasjon om Qt - - - - &Options... - &Innstillinger... - - - - &Encrypt Wallet... - &Krypter Lommebok... - - - - &Backup Wallet... - Lag &Sikkerhetskopi av Lommebok... - - - - &Change Passphrase... - &Endre Adgangsfrase... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Sikkerhetskopiér lommebok til annet sted - - - - Change the passphrase used for wallet encryption - Endre adgangsfrasen brukt for kryptering av lommebok - - - - &Debug window - &Feilsøkingsvindu - - - - Open debugging and diagnostic console - Åpne konsoll for feilsøk og diagnostikk - - - - &Verify message... - &Verifiser melding... - - - - buynowcoin - - - - - Wallet - Lommebok - - - - &About buynowcoin - - - - - &Show / Hide - &Gjem / vis - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Fil - - - - &Settings - &Innstillinger - - - - &Help - &Hjelp - - - - Tabs toolbar - Verktøylinje for faner - - - - Actions toolbar - - - - - - [testnet] - [testnett] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Ajour - - - - Catching up... - Kommer ajour... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Sendt transaksjon - - - - Incoming transaction - Innkommende transaksjon - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Dato: %1 -Beløp: %2 -Type: %3 -Adresse: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Lommeboken er <b>kryptert</b> og for tiden <b>ulåst</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Lommeboken er <b>kryptert</b> og for tiden <b>låst</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n time%n timer - - - - %n day(s) - %n dag%n dager - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -744,7 +320,7 @@ Adresse: %4 Coin Control - + @@ -814,7 +390,7 @@ Adresse: %4 Label - + Merkelapp @@ -875,27 +451,27 @@ Adresse: %4 Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + @@ -935,7 +511,7 @@ Adresse: %4 DUST - + @@ -949,7 +525,7 @@ Adresse: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -958,7 +534,7 @@ Adresse: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -967,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1008,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1018,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Ny mottaksadresse - + New sending address Ny utsendingsadresse - + Edit receiving address Rediger mottaksadresse - + Edit sending address Rediger utsendingsadresse - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Den oppgitte adressen "%1" er allerede i adresseboken. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Kunne ikke låse opp lommeboken. @@ -1065,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Bruk: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Type + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Merkelapp + + + + To Address + + + + + From Address + + + + + Message + Melding + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (ingen merkelapp) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopier den valgte adressen til systemets utklippstavle + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Slett den valgte adressen fra listen. + + + + &Delete + &Slett + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Kommaseparert fil (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1120,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1130,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1164,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1174,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1190,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1249,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1260,12 +1182,12 @@ This label turns red, if the priority is smaller than "medium". Choose the default subdivision unit to show in the interface and when sending coins. - Velg standard delt enhet for visning i grensesnittet og for sending av bitcoins. + Velg standard delt enhet for visning i grensesnittet og for sending av triangless. - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1280,7 +1202,7 @@ This label turns red, if the priority is smaller than "medium". Display coin &control features (experts only!) - + @@ -1295,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1306,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1328,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". Skjema - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1351,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1369,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". Minet saldo har ikke modnet enda - + Total: Totalt: - + Your current total balance Din nåværende saldo - + <b>Recent transactions</b> <b>Siste transaksjoner</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1405,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Beløp: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1512,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1542,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1566,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1581,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Tøm konsoll - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1616,8 +1566,9 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - Send Bitcoins + Send Triangless @@ -1640,7 +1591,7 @@ This label turns red, if the priority is smaller than "medium". Utilstrekkelige midler! - + Quantity: Mengde: @@ -1648,7 +1599,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1665,8 +1616,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1676,7 +1627,7 @@ This label turns red, if the priority is smaller than "medium". medium - + medium @@ -1691,7 +1642,7 @@ This label turns red, if the priority is smaller than "medium". no - + nei @@ -1701,15 +1652,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once Send til flere enn én mottaker @@ -1721,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1735,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1749,9 +1700,9 @@ This label turns red, if the priority is smaller than "medium". S&end - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1771,47 +1722,47 @@ This label turns red, if the priority is smaller than "medium". Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - Bekreft sending av bitcoins + Bekreft sending av triangless Are you sure you want to send %1? - + and - + @@ -1841,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1861,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1869,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Skjema @@ -1883,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Skriv inn en merkelapp for denne adressen for å legge den til i din adressebok + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Merkelapp: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1920,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Lim inn adresse fra utklippstavlen + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Send til flere enn én mottaker + + + + Add &Recipient + &Legg til Mottaker + + + + Remove all transaction fields + + + + + Clear &All + Fjern &Alt + + + + Confirm the send action + Bekreft sending + + + + S&end + S&end + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Adresse for mottaker er ugyldig. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Duplikate adresser funnet. Kan bare sende én gang til hver adresse per operasjon. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Skjema + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Lim inn adresse fra utklippstavlen + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Skriv inn en merkelapp for denne adressen for å legge den til i din adressebok + + + + &Label: + &Merkelapp: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1948,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1985,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Tilbakestill alle felter for meldingssignering @@ -2012,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Tilbakestill alle felter for meldingsverifikasjon - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Klikk "Signer Melding" for å generere signatur + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2118,12 +2299,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2148,7 +2332,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , kringkast gjennom %n node, kringkast gjennom %n noder + + , kringkast gjennom %n node + , kringkast gjennom %n noder + @@ -2194,14 +2381,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Kredit - + matures in %n more block(s) - blir moden om %n blokkblir moden om %n blokker + + blir moden om %n blokk + blir moden om %n blokker + @@ -2212,12 +2402,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debet - + Transaction fee Transaksjonsgebyr @@ -2237,14 +2427,14 @@ This label turns red, if the priority is smaller than "medium". Kommentar - + Transaction ID Transaksjons-ID - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2277,7 +2467,7 @@ This label turns red, if the priority is smaller than "medium". usann - + , has not been successfully broadcast yet , har ikke blitt kringkastet uten problemer enda. @@ -2303,7 +2493,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Dato @@ -2335,32 +2525,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Åpen for %n blokk tilÅpen for %n blokker til + + Åpen for %n blokk til + Åpen for %n blokker til + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2403,7 +2601,7 @@ This label turns red, if the priority is smaller than "medium". - - + Transaction status. Hover over this field to show number of confirmations. Transaksjonsstatus. Hold muspekeren over dette feltet for å se antall bekreftelser. @@ -2534,7 +2732,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2579,12 +2777,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2598,32 +2796,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Bruk: - - Send command to -server or buynowcoind - - - - + List commands List opp kommandoer @@ -2638,17 +2818,7 @@ This label turns red, if the priority is smaller than "medium". Innstillinger: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) Angi lommebok fil (inne i data mappe) @@ -2665,12 +2835,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2690,12 +2860,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2715,22 +2885,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2740,22 +2910,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2780,12 +2950,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2793,12 +2963,7 @@ This label turns red, if the priority is smaller than "medium". Advarsel: -paytxfee er satt veldig høyt! Dette er transaksjonsgebyret du betaler når du sender transaksjoner. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Advarsel: Feil ved lesing av wallet.dat! Alle taster lest riktig, men transaksjon dataene eller adresse innlegg er kanskje manglende eller feil. @@ -2835,22 +3000,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2870,27 +3035,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL valg: (se Bitcoin Wiki for instruksjoner for oppsett av SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL valg: (se Triangles Wiki for instruksjoner for oppsett av SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2900,12 +3065,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2926,7 +3091,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2941,7 +3106,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2951,17 +3116,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2979,34 +3154,39 @@ This label turns red, if the priority is smaller than "medium". Passord for JSON-RPC forbindelser - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3031,17 +3211,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3061,17 +3241,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3091,17 +3271,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3111,27 +3291,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Kan ikke binde til %s på denne datamaskinen (bind returnerte feil %d, %s) Connect through socks proxy - + @@ -3146,7 +3316,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3154,17 +3324,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Feil ved lasting av wallet.dat: Lommeboken er skadet - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Feil ved lasting av wallet.dat @@ -3201,12 +3361,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3224,39 +3384,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Laster blokkindeks... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Legg til node for tilkobling og hold forbindelsen åpen - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Laster lommebok... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Kan ikke nedgradere lommebok Cannot initialize keypool - + @@ -3293,4 +3483,486 @@ If the file does not exist, create it with owner-readable-only file permissions. Hvis filen ikke finnes, opprett den med leserettighet kun for eier av filen. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Lommebok + + + + &Overview + &Oversikt + + + + Show general overview of wallet + Vis generell oversikt over lommeboken + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transaksjoner + + + + Browse transaction history + Vis transaksjonshistorikk + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Avslutt + + + + Quit application + Avslutt applikasjonen + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Om &Qt + + + + Show information about Qt + Vis informasjon om Qt + + + + &Options... + &Innstillinger... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Gjem / vis + + + + &Encrypt Wallet... + &Krypter Lommebok... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + Lag &Sikkerhetskopi av Lommebok... + + + + Backup wallet to another location + Sikkerhetskopiér lommebok til annet sted + + + + &Change Passphrase... + &Endre Adgangsfrase... + + + + Change the passphrase used for wallet encryption + Endre adgangsfrasen brukt for kryptering av lommebok + + + + &Unlock Wallet... + + + + + Unlock wallet + Lås opp lommebok + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Signer &melding... + + + + &Verify message... + &Verifiser melding... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + &Feilsøkingsvindu + + + + Open debugging and diagnostic console + Åpne konsoll for feilsøk og diagnostikk + + + + &File + &Fil + + + + &Settings + &Innstillinger + + + + &Help + &Hjelp + + + + Tabs toolbar + Verktøylinje for faner + + + + Actions toolbar + + + + + + [testnet] + [testnett] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Synkroniserer med nettverk... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Ajour + + + + Catching up... + Kommer ajour... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Sendt transaksjon + + + + Incoming transaction + Innkommende transaksjon + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Dato: %1 +Beløp: %2 +Type: %3 +Adresse: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Lommeboken er <b>kryptert</b> og for tiden <b>ulåst</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Lommeboken er <b>kryptert</b> og for tiden <b>låst</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n time + %n timer + + + + + %n day(s) + + %n dag + %n dager + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_nl.qm b/src/qt/locale/triangles_nl.qm new file mode 100644 index 0000000..0fe4ad2 Binary files /dev/null and b/src/qt/locale/triangles_nl.qm differ diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/triangles_nl.ts similarity index 68% rename from src/qt/locale/bitcoin_nl.ts rename to src/qt/locale/triangles_nl.ts index 13e533c..21386fa 100644 --- a/src/qt/locale/bitcoin_nl.ts +++ b/src/qt/locale/triangles_nl.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin - Over buynowcoin + About Triangles + Over triangles + + + <b>triangles</b> version + <b>triangles</b> versie + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + Copyright © 2009-2014 De Triangles ontwikkelaars +Copyright © 2012-2014 De Triangles ontwikkelaars +Copyright © 2014 De triangles ontwikkelaars - <b>buynowcoin</b> version - <b>buynowcoin</b> versie + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - Copyright © 2009-2014 De Bitcoin ontwikkelaars -Copyright © 2012-2014 De NovaCoin ontwikkelaars -Copyright © 2014 De buynowcoin ontwikkelaars +Copyright © 2014 Triangles team + - + This is experimental software. @@ -44,12 +55,17 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d Adresboek - + + These are your Triangles 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. + + + + Double-click to edit address or label Dubbelklik om het adres of label te wijzigen - + Create a new address Maak een nieuw adres aan @@ -59,17 +75,21 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d Kopieer het huidig geselecteerde adres naar het klembord - + + Sign a message to prove you own a TRI address + + + + &New Address &Nieuw adres - - These are your buynowcoin 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. - Dit zijn al jou buynowcoin adressen om betalingen mee te ontvangen. Je kunt iedere verzender een apart adres geven zodat je kunt volgen wie jou betaald. + These are your triangles 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. + Dit zijn al jou triangles adressen om betalingen mee te ontvangen. Je kunt iedere verzender een apart adres geven zodat je kunt volgen wie jou betaald. - + &Copy Address &Kopiëer Adres @@ -79,27 +99,30 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d Toon &QR Code - - Sign a message to prove you own a buynowcoin address - Teken een bericht om te bewijzen dat je een buynowcoin adres bezit. + Sign a message to prove you own a triangles address + Teken een bericht om te bewijzen dat je een triangles adres bezit. - + Sign &Message Teken &Bericht - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Verwijder het geselecteerde adres van de lijst - - Verify a message to ensure it was signed with a specified buynowcoin address - Verifieer een bericht om zeker te zijn dat deze is ondertekend met een specifiek buynowcoin adres + Verify a message to ensure it was signed with a specified triangles address + Verifieer een bericht om zeker te zijn dat deze is ondertekend met een specifiek triangles adres - + &Verify Message &Verifieer Bericht @@ -142,7 +165,7 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d AddressTableModel - + Label Label @@ -245,7 +268,12 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d Weet u zeker dat u uw portemonnee wilt versleutelen? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. BELANGRIJK: Elke eerder gemaakte backup van uw portemonneebestand dient u te vervangen door het nieuw gegenereerde, versleutelde portemonneebestand. Om veiligheidsredenen zullen eerdere backups van het niet-versleutelde portemonneebestand onbruikbaar worden zodra u uw nieuwe, versleutelde, portemonnee begint te gebruiken. @@ -262,12 +290,11 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d Portemonnee versleuteld - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin zal nu sluiten om het versleutel proces te voltooien. Onthou dat het versleutelen van je portemonnee je niet volledig beschermt tegen diefstal van munten door malware op je computer. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles zal nu sluiten om het versleutel proces te voltooien. Onthou dat het versleutelen van je portemonnee je niet volledig beschermt tegen diefstal van munten door malware op je computer. - + @@ -308,431 +335,6 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d Portemonneewachtwoord is met succes gewijzigd. - - BitcoinGUI - - - Sign &message... - &Onderteken bericht... - - - - Synchronizing with network... - Synchroniseren met netwerk... - - - - &Overview - &Overzicht - - - - Show general overview of wallet - Toon algemeen overzicht van de portemonnee - - - - &Transactions - &Transacties - - - - Browse transaction history - Blader door transactieverleden - - - - &Address Book - &Adresboek - - - - Edit the list of stored addresses and labels - Wijzig de lijst met bewaarde adressen en labels - - - - &Receive coins - &Ontvang munten - - - - Show the list of addresses for receiving payments - Toon de lijst aan adressen voor ontvangen betalingen - - - - &Send coins - Verstuur munten - - - - E&xit - &Afsluiten - - - - Quit application - Programma afsluiten - - - - Show information about buynowcoin - Toon informatie over buynowcoin - - - - About &Qt - Over &Qt - - - - Show information about Qt - Toon informatie over Qt - - - - &Options... - &Opties... - - - - &Encrypt Wallet... - &Versleutel Portemonnee... - - - - &Backup Wallet... - &Backup Portemonnee... - - - - &Change Passphrase... - &Wijzig Wachtwoord - - - - ~%n block(s) remaining - ~%n blok nodig~%n blokken nodig - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - %1 van %2 aan transactie historie blokken gedownload (%3% klaar). - - - - &Export... - &Exporteren... - - - - Send coins to a buynowcoin address - Verstuur munten naar een buynowcoin adres - - - - Modify configuration options for buynowcoin - Verander configuratie opties voor buynowcoin - - - - Export the data in the current tab to a file - Exporteer de data in de huidige tab naar een bestand - - - - Encrypt or decrypt wallet - Versleutel of ontsleutel de portemonnee - - - - Backup wallet to another location - Backup portemonnee naar een andere locatie - - - - Change the passphrase used for wallet encryption - Wijzig het wachtwoord voor uw portemonneversleuteling - - - - &Debug window - &Debugscherm - - - - Open debugging and diagnostic console - Open debugging en diagnostische console - - - - &Verify message... - &Verifiëer bericht... - - - - buynowcoin - buynowcoin - - - - Wallet - Portemonnee - - - - &About buynowcoin - &Over buynowcoin - - - - &Show / Hide - &Toon / Verberg - - - - Unlock wallet - Open portemonnee - - - - &Lock Wallet - &Sluit portemonnee - - - - Lock wallet - Sluit portemonnee - - - - &File - &Bestand - - - - &Settings - &Instellingen - - - - &Help - &Hulp - - - - Tabs toolbar - Tab-werkbalk - - - - Actions toolbar - Acties werkbalk - - - - - [testnet] - [testnetwerk] - - - - - buynowcoin client - buynowcoin client - - - - %n active connection(s) to buynowcoin network - %n actieve verbinding naar buynowcoin netwerk%n actieve verbindingen naar buynowcoin netwerk - - - - Downloaded %1 blocks of transaction history. - %1 blokken van transactie geschiedenis gedownload. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Staking. <br> Uw gewicht wordt %1 <br> Network gewicht is %2 <br> Verwachte tijd om beloning te verdienen is %3 - - - - Not staking because wallet is locked - Niet staking omdat portemonnee aan het beveiligd is - - - - Not staking because wallet is offline - Niet staking omdat portemonnee aan het offline is - - - - Not staking because wallet is syncing - Niet staking omdat portemonnee aan het synchroniseren is. - - - - Not staking because you don't have mature coins - Niet staking omdat je geen mature munten hebt - - - - %n second(s) ago - %n seconden geleden%n seconden geleden - - - - About buynowcoin card - Over buynowcoin card - - - - Show information about buynowcoin card - Toon informatie over buynowcoin card - - - - &Unlock Wallet... - Ontgrendel portemonnee... - - - - %n minute(s) ago - %n minuut geleden%n minuten geleden - - - - %n hour(s) ago - %n uur geleden%n uren geleden - - - - %n day(s) ago - %n dag geleden%n dagen geleden - - - - Up to date - Bijgewerkt - - - - Catching up... - Aan het bijwerken... - - - - Last received block was generated %1. - Laatst ontvangen blok is gegenereerd op %1. - - - - 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? - De grootte van deze transactie overschrijdt de limiet. U kan deze transactie laten uitvoeren voor een meerkost van %1, dewelke doorgestuurd wordt naar de nodes die uw transactie verwerken, alsook ter ondersteuning van het netwerk. Wil u deze meerkost betalen? - - - - Confirm transaction fee - Bevestig transactie kosten - - - - Sent transaction - Verzonden transactie - - - - Incoming transaction - Binnenkomende transactie - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Datum: %1 -Bedrag: %2 -Type: %3 -Adres: %4 - - - - - - URI handling - URI-behandeling - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URI kan niet ontleedt worden! Mogelijke oorzaken zijn een ongeldig buynowcoin adres of incorrecte URI parameters. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Portemonnee is <b>versleuteld</b> en momenteel <b>geopend</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Portemonnee is <b>versleuteld</b> en momenteel <b>gesloten</b> - - - - Backup Wallet - Backup Portemonnee - - - - Wallet Data (*.dat) - Portemonnee bestanden (*.dat) - - - - Backup Failed - Backup mislukt - - - - There was an error trying to save the wallet data to the new location. - Er was een fout opgetreden bij het opslaan van de wallet data naar de nieuwe locatie. - - - - %n second(s) - %n seconden%n seconden - - - - %n minute(s) - %n minuut%n minuten - - - - %n hour(s) - %n uur%n uur - - - - %n day(s) - %n dag%n dagen - - - - Not staking - Niet aan het staken. - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Een fatale fout . buynowcoin kan niet langer veilig doorgaan en sluit af. - - ClientModel @@ -1037,37 +639,46 @@ Dit betekend dat een fee van %2 is vereist. Het adres geassocieerd met deze notitie in het adresboek. Dit kan enkel aangepast worden bij verzend-adressen. - + + &Stealth Address + + + + New receiving address Nieuw ontvangstadres - + New sending address Nieuw adres om naar te verzenden - + Edit receiving address Bewerk ontvangstadres - + Edit sending address Bewerk adres om naar te verzenden - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Het opgegeven adres "%1" bestaat al in uw adresboek. - - The entered address "%1" is not a valid buynowcoin address. - Het ingevoerde adres "%1" is geen geldig buynowcoin adres. + The entered address "%1" is not a valid triangles address. + Het ingevoerde adres "%1" is geen geldig triangles adres. - + Could not unlock wallet. Kon de portemonnee niet openen. @@ -1080,18 +691,22 @@ Dit betekend dat een fee van %2 is vereist. GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version versie - + + + Triangles-Qt + + + + Usage: Gebruik: @@ -1121,6 +736,347 @@ Dit betekend dat een fee van %2 is vereist. Laat laadscherm zien bij het opstarten. (standaard: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Type + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Label + + + + To Address + + + + + From Address + + + + + Message + Bericht + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (geen label) + + + + MessagePage + + + Address Book + Adresboek + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopieer het huidig geselecteerde adres naar het klembord + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Verwijder het geselecteerde adres van de lijst + + + + &Delete + &Verwijder + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Kommagescheiden bestand (*.csv) + + + + Error exporting + Fout bij exporteren + + + + Could not write to file %1. + + + OptionsDialog @@ -1154,17 +1110,15 @@ Dit betekend dat een fee van %2 is vereist. Gereserveerd - - Automatically start buynowcoin after logging in to the system. - Automatisch starten van buynowcoin na inloggen van het systeem. + Automatically start triangles after logging in to the system. + Automatisch starten van triangles na inloggen van het systeem. - - &Start buynowcoin on system login - &Start buynowcoin bij systeem aanmelding + &Start triangles on system login + &Start triangles bij systeem aanmelding - + 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. Los blok en adressenbestanden bij het afsluiten. Dit betekent dat ze naar een ander data-map worden verplaatst, maar het vertraagt ​​shutdown. De portemonnee is altijd vrijstaand. @@ -1179,19 +1133,37 @@ Dit betekend dat een fee van %2 is vereist. &Netwerk - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - De buynowcoin client poort automatisch openen op de router. Dit werkt alleen wanneer uw router UPnP ondersteunt en deze is ingeschakeld. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + De triangles client poort automatisch openen op de router. Dit werkt alleen wanneer uw router UPnP ondersteunt en deze is ingeschakeld. - + Map port using &UPnP Portmapping via &UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Verbinding maken met het buynowcoin netwerk via een SOCKS proxy (bijvoorbeeld als U gebruik maakt van Tor) + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Verbinding maken met het triangles netwerk via een SOCKS proxy (bijvoorbeeld als U gebruik maakt van Tor) + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1265,11 +1237,20 @@ Dit betekend dat een fee van %2 is vereist. - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - De user interface-taal kan hier ingesteld worden. Deze instelling word toegepast na buynowcoin opnieuw op te starten. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + De user interface-taal kan hier ingesteld worden. Deze instelling word toegepast na triangles opnieuw op te starten. + + + &Unit to show amounts in: &Eenheid om bedrag in te tonen: @@ -1279,12 +1260,11 @@ Dit betekend dat een fee van %2 is vereist. Kies de standaard onderverdelingseenheid om weer te geven in uw programma, en voor het versturen van munten - - Whether to show buynowcoin addresses in the transaction list or not. - buynowcoin adressen in de transactielijst weergeven of niet + Whether to show triangles addresses in the transaction list or not. + triangles adressen in de transactielijst weergeven of niet - + &Display addresses in transaction list Toon a&dressen in de transactielijst @@ -1327,8 +1307,12 @@ Dit betekend dat een fee van %2 is vereist. - This setting will take effect after restarting buynowcoin. - Deze instelling word toegepast na een restart van buynowcoin. + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Deze instelling word toegepast na een restart van triangles. @@ -1344,13 +1328,11 @@ Dit betekend dat een fee van %2 is vereist. Vorm - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - De weergegeven informatie kan verouderd zijn, Je portemonnee synchroniseerd automatisch met het buynowcoin netwerk nadat er verbindig is gemaakt, maar dit proces is nog niet voltooid. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + De weergegeven informatie kan verouderd zijn, Je portemonnee synchroniseerd automatisch met het triangles netwerk nadat er verbindig is gemaakt, maar dit proces is nog niet voltooid. - + Stake: Stake: @@ -1385,27 +1367,61 @@ Dit betekend dat een fee van %2 is vereist. Gedolven saldo dat nog niet tot wasdom is gekomen - + Total: Totaal: - + Your current total balance Uw totale saldo - + <b>Recent transactions</b> <b>Recente transacties</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Totaal van de transacties die nog moeten worden bevestigd, en nog niet mee voor het huidige balans - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Totaal aantal munten dat was staked, en nog niet telt voor huidige balans. @@ -1506,7 +1522,17 @@ Dit betekend dat een fee van %2 is vereist. &Informatie - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Gebruikt OpenSSL versie @@ -1551,7 +1577,17 @@ Dit betekend dat een fee van %2 is vereist. Tijd laatste blok - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Open @@ -1561,12 +1597,11 @@ Dit betekend dat een fee van %2 is vereist. Commandoregel-opties - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Laat het buynowcoin-QT help bericht zien om een lijst te krijgen met mogelijke buynowcoin command-regel opties. + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Laat het triangles-QT help bericht zien om een lijst te krijgen met mogelijke triangles command-regel opties. - + &Show &Show @@ -1581,34 +1616,35 @@ Dit betekend dat een fee van %2 is vereist. Bouwdatum - - buynowcoin - Debug window - buynowcoin - Debugscherm + triangles - Debug window + triangles - Debugscherm - - buynowcoin Core - buynowcoin Kern + triangles Core + triangles Kern - + Debug log file Debug-logbestand - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Open het buynowcoin debug log bestand van de huidige data map. Dit kan een paar seconden duren voor grote log bestanden. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Open het triangles debug log bestand van de huidige data map. Dit kan een paar seconden duren voor grote log bestanden. - + Clear console Maak console leeg + + Welcome to the triangles RPC console. + Welkom bij de triangles RPC console. + - Welcome to the buynowcoin RPC console. - Welkom bij de buynowcoin RPC console. + Welcome to the Triangles RPC console. + @@ -1632,6 +1668,7 @@ Dit betekend dat een fee van %2 is vereist. + Send Coins Verstuur munten @@ -1656,7 +1693,7 @@ Dit betekend dat een fee van %2 is vereist. Onvoldoende fonds! - + Quantity: Kwantiteit @@ -1676,13 +1713,17 @@ Dit betekend dat een fee van %2 is vereist. Amount: Bedrag: + + 0.00 hack + 123.456 hack + - 0.00 BTC - 123.456 BTC + 0.00 TRI + @@ -1725,7 +1766,7 @@ Dit betekend dat een fee van %2 is vereist. handmatig veranderen adres - + Send to multiple recipients at once Verstuur aan verschillende ontvangers ineens @@ -1751,8 +1792,12 @@ Dit betekend dat een fee van %2 is vereist. - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1765,9 +1810,13 @@ Dit betekend dat een fee van %2 is vereist. &Verstuur - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Voeg een buynowcoin adres in (bijv. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Voeg een triangles adres in (bijv. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1864,10 +1913,19 @@ Dit betekend dat een fee van %2 is vereist. 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. Fout: De transactie was geweigerd, Dit kan gebeuren als sommige munten in je portemonnee al gebruikt zijn, door het gebruik van een kopie van wallet.dat en de munten in de kopie zijn niet gemarkeerd als gebruikt. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - WAARSCHUWING: Ongeldig buynowcoin adres + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + WAARSCHUWING: Ongeldig triangles adres @@ -1899,19 +1957,29 @@ Dit betekend dat een fee van %2 is vereist. - + Enter a label for this address to add it to your address book Vul een label in voor dit adres om het toe te voegen aan uw adresboek + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Label: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Het adres om naar te betalen (bijv. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Het adres om naar te betalen (bijv. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1938,10 +2006,225 @@ Dit betekend dat een fee van %2 is vereist. Remove this recipient Verwijder deze ontvanger + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Voeg een triangles adres in (bijv. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Voeg een buynowcoin adres in (bijv. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Kies adres uit adresboek + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Plak adres vanuit klembord + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Verstuur aan verschillende ontvangers ineens + + + + Add &Recipient + Voeg &Ontvanger Toe + + + + Remove all transaction fields + Verwijder alles in de invulvelden + + + + Clear &All + Verwijder &Alles + + + + Confirm the send action + Bevestig de verstuuractie + + + + S&end + &Verstuur + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b> %1 </b> to %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Weet je zeker dat je %1 wilt verzenden? + + + + and + en + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Het ontvangstadres is niet geldig, controleer uw invoer. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Dubbel adres gevonden, u kunt slechts eenmaal naar een bepaald adres verzenden per verstuurtransactie + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Vorm + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Kies adres uit adresboek + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Plak adres vanuit klembord + + + + Alt+P + Alt+P + + + + Remove this recipient + Verwijder deze ontvanger + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Vul een label in voor dit adres om het toe te voegen aan uw adresboek + + + + &Label: + &Label: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1964,8 +2247,8 @@ Dit betekend dat een fee van %2 is vereist. - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Het adres om het bericht te ondertekenen (bijv. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Het adres om het bericht te ondertekenen (bijv. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -2001,11 +2284,20 @@ Dit betekend dat een fee van %2 is vereist. - Sign the message to prove you own this buynowcoin address - Teken een bericht om te bewijzen dat je een buynowcoin adres bezit. + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Teken een bericht om te bewijzen dat je een triangles adres bezit. + + + Reset all sign message fields Verwijder alles in de invulvelden @@ -2028,34 +2320,45 @@ Dit betekend dat een fee van %2 is vereist. - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Het adres van het bericht is ondertekend met (bijv. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Het adres van het bericht is ondertekend met (bijv. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Verifieer een bericht om zeker te zijn dat deze is ondertekend met een specifiek buynowcoin adres + Verify the message to ensure it was signed with the specified triangles address + Verifieer een bericht om zeker te zijn dat deze is ondertekend met een specifiek triangles adres - + Reset all verify message fields Verwijder alles in de invulvelden - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Voeg een buynowcoin adres in (bijv. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Voeg een triangles adres in (bijv. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Klik "Onderteken Bericht" om de handtekening te genereren + + Enter triangles signature + Voer triangles handtekening in + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Voer buynowcoin handtekening in + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2134,7 +2437,10 @@ Dit betekend dat een fee van %2 is vereist. Open for %n block(s) - Open voor nog %n blokOpen voor nog %n blokken + + Open voor nog %n blok + Open voor nog %n blokken + @@ -2164,7 +2470,10 @@ Dit betekend dat een fee van %2 is vereist. , broadcast through %n node(s) - , uitgezonden naar %n node, uitgezonden naar %n nodes + + , uitgezonden naar %n node + , uitgezonden naar %n nodes + @@ -2210,14 +2519,17 @@ Dit betekend dat een fee van %2 is vereist. - + Credit Credit - + matures in %n more block(s) - komt tot wasdom na %n nieuw blokkomt tot wasdom na %n nieuwe blokken + + komt tot wasdom na %n nieuw blok + komt tot wasdom na %n nieuwe blokken + @@ -2228,12 +2540,12 @@ Dit betekend dat een fee van %2 is vereist. - + Debit Debet - + Transaction fee Transactiekosten @@ -2253,14 +2565,18 @@ Dit betekend dat een fee van %2 is vereist. Opmerking - + Transaction ID Transactie-ID: + Generated coins must mature 60 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. + Gegenereerd munten moeten 510 blokken maturen voordat ze kunnen worden besteed. Wanneer je een blok genereerd, het naar het netwerk is verzonden en toegevoegd aan de blokketen, zal de status veranderen naar "niet geaccepteerd"and kan het niet uitgegeven worden. Dit kan soms gebeuren als een ander knooppunt genereert een blok binnen een paar seconden na jou. {60 ?} + + Generated coins must mature 510 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. - Gegenereerd munten moeten 510 blokken maturen voordat ze kunnen worden besteed. Wanneer je een blok genereerd, het naar het netwerk is verzonden en toegevoegd aan de blokketen, zal de status veranderen naar "niet geaccepteerd"and kan het niet uitgegeven worden. Dit kan soms gebeuren als een ander knooppunt genereert een blok binnen een paar seconden na jou. + Gegenereerd munten moeten 510 blokken maturen voordat ze kunnen worden besteed. Wanneer je een blok genereerd, het naar het netwerk is verzonden en toegevoegd aan de blokketen, zal de status veranderen naar "niet geaccepteerd"and kan het niet uitgegeven worden. Dit kan soms gebeuren als een ander knooppunt genereert een blok binnen een paar seconden na jou. @@ -2293,7 +2609,7 @@ Dit betekend dat een fee van %2 is vereist. onwaar - + , has not been successfully broadcast yet , is nog niet met succes uitgezonden @@ -2319,7 +2635,7 @@ Dit betekend dat een fee van %2 is vereist. TransactionTableModel - + Date Datum @@ -2351,10 +2667,18 @@ Dit betekend dat een fee van %2 is vereist. Open for %n more block(s) - Open voor nog %n blokOpen voor nog %n blokken + + Open voor nog %n blok + Open voor nog %n blokken + - + + Narration + + + + Offline Offline @@ -2419,7 +2743,7 @@ Dit betekend dat een fee van %2 is vereist. (nvt) - + Transaction status. Hover over this field to show number of confirmations. Transactiestatus. Houd de muiscursor boven dit veld om het aantal bevestigingen te laten zien. @@ -2614,29 +2938,20 @@ Dit betekend dat een fee van %2 is vereist. - WalletModel + Triangles-core - - Sending... - Versturen... - - - - bitcoin-core - - - buynowcoin version - buynowcoin versie + triangles version + triangles versie - + Usage: Gebruik: - Send command to -server or buynowcoind - Verstuur commando naar -server of buynowcoind + Send command to -server or trianglesd + Verstuur commando naar -server of trianglesd @@ -2655,13 +2970,13 @@ Dit betekend dat een fee van %2 is vereist. - Specify configuration file (default: buynowcoin.conf) - Selecteer configuratie bestand (standaard: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Selecteer configuratie bestand (standaard: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Selecteer pid bestand (standaard: buynowcoin.conf) + Specify pid file (default: trianglesd.pid) + Selecteer pid bestand (standaard: triangles.conf) @@ -2674,7 +2989,22 @@ Dit betekend dat een fee van %2 is vereist. Stel datamap in - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Stel databankcachegrootte in in megabytes (standaard: 25) @@ -2809,12 +3139,11 @@ Dit betekend dat een fee van %2 is vereist. Waarschuwing: -paytxfee is zeer hoog ingesteld. Dit zijn de transactiekosten die u betaalt bij het versturen van een transactie. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Waarschuwing: Controleer of de datum en tijd van de computer juist zijn! Als uw klok verkeerd is buynowcoin zal niet goed werken. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Waarschuwing: Controleer of de datum en tijd van de computer juist zijn! Als uw klok verkeerd is triangles zal niet goed werken. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Waarschuwing: Fout bij het lezen van wallet.dat! Alle sleutels zijn in goede orde uitgelezen, maar transactiedata of adresboeklemma's zouden kunnen ontbreken of fouten bevatten. @@ -2900,8 +3229,8 @@ Dit betekend dat een fee van %2 is vereist. - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL-opties: (zie de Bitcoin wiki voor SSL-instructies) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL-opties: (zie de Triangles wiki voor SSL-instructies) @@ -2961,17 +3290,52 @@ Dit betekend dat een fee van %2 is vereist. Gebruik proxy tor verborgen diensten (standaard: zelfde als -proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Gebruikersnaam voor JSON-RPC-verbindingen - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Database integriteit wordt geverifieërd - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! WAARSCHUWING: gesynchroniseerd checkpoint overtreding is geconstateerd, maar overgeslagen! @@ -2996,31 +3360,30 @@ Dit betekend dat een fee van %2 is vereist. Wachtwoord voor JSON-RPC-verbindingen - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, u moet een rpcpassword instellen in het configuratiebestand: + %s, u moet een rpcpassword instellen in het configuratiebestand: %s Het wordt aanbevolen de volgende willekeurig wachtwoord gebruiken: -rpcuser = buynowcoinrpc +rpcuser = trianglesrpc rpcpassword = %s (je hoeft niet dit wachtwoord te onthouden) De gebruikersnaam en het wachtwoord MAG NIET hetzelfde zijn. Als het bestand niet bestaat, maakt u met leesbare-alleen-eigenaar bestandsbeheermachtigingen. Het wordt ook aanbevolen om alertnotify instellen zodat u een melding van problemen; -bijvoorbeeld: alertnotify = echo %%s | mail -s "buynowcoin Alert" admin@foo.com +bijvoorbeeld: alertnotify = echo %%s | mail -s "triangles Alert" admin@foo.com - + Find peers using internet relay chat (default: 0) Zoek peers door gebruik van Internet Relay Chat (standaard: 1) {? 0)} @@ -3140,17 +3503,15 @@ bijvoorbeeld: alertnotify = echo %%s | mail -s "buynowcoin Alert" admi Portemonnee %s bevindt zich buiten de datamap %s. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Kan een slot op data directory %s niet verkrijgen. buynowcoin wordt waarschijnlijk al uitgevoerd. + Cannot obtain a lock on data directory %s. triangles is probably already running. + Kan een slot op data directory %s niet verkrijgen. triangles wordt waarschijnlijk al uitgevoerd. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Niet in staat om aan %s te binden op deze computer (bind gaf error %d, %s) @@ -3180,17 +3541,15 @@ bijvoorbeeld: alertnotify = echo %%s | mail -s "buynowcoin Alert" admi Fout bij laden wallet.dat: Portemonnee corrupt - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Fout bij laden van wallet.dat: Portemonnee vereist een nieuwere versie van buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Fout bij laden van wallet.dat: Portemonnee vereist een nieuwere versie van triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - Portemonnee moet herschreven worden: herstart buynowcoin om te voltooien + Wallet needed to be rewritten: restart triangles to complete + Portemonnee moet herschreven worden: herstart triangles om te voltooien - + Error loading wallet.dat Fout bij laden wallet.dat @@ -3255,12 +3614,11 @@ bijvoorbeeld: alertnotify = echo %%s | mail -s "buynowcoin Alert" admi Voeg een node om naar te verbinden toe en probeer de verbinding open te houden - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Niet mogelijk om %s op deze computer. buynowcoin is waarschijnlijk al geopened. + Unable to bind to %s on this computer. triangles is probably already running. + Niet mogelijk om %s op deze computer. triangles is waarschijnlijk al geopened. - + Fee per KB to add to transactions you send Vergoeding per KB toe te voegen aan de transacties die u verzendt @@ -3319,4 +3677,533 @@ If the file does not exist, create it with owner-readable-only file permissions. Als het bestand niet bestaat, maak het dan aan, met een alleen-lezen permissie. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Portemonnee + + + + &Overview + &Overzicht + + + + Show general overview of wallet + Toon algemeen overzicht van de portemonnee + + + + &Send coins + Verstuur munten + + + + Send coins to a TRI address + + + + + &Receive coins + &Ontvang munten + + + + Show the list of addresses for receiving payments + Toon de lijst aan adressen voor ontvangen betalingen + + + + &Transactions + &Transacties + + + + Browse transaction history + Blader door transactieverleden + + + + &Address Book + &Adresboek + + + + Edit the list of stored addresses and labels + Wijzig de lijst met bewaarde adressen en labels + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Afsluiten + + + + Quit application + Programma afsluiten + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Over &Qt + + + + Show information about Qt + Toon informatie over Qt + + + + &Options... + &Opties... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Toon / Verberg + + + + &Encrypt Wallet... + &Versleutel Portemonnee... + + + + Encrypt or decrypt wallet + Versleutel of ontsleutel de portemonnee + + + + &Backup Wallet... + &Backup Portemonnee... + + + + Backup wallet to another location + Backup portemonnee naar een andere locatie + + + + &Change Passphrase... + &Wijzig Wachtwoord + + + + Change the passphrase used for wallet encryption + Wijzig het wachtwoord voor uw portemonneversleuteling + + + + &Unlock Wallet... + Ontgrendel portemonnee... + + + + Unlock wallet + Open portemonnee + + + + &Lock Wallet + &Sluit portemonnee + + + + Lock wallet + Sluit portemonnee + + + + Sign &message... + &Onderteken bericht... + + + + &Verify message... + &Verifiëer bericht... + + + + &Export... + &Exporteren... + + + + Export the data in the current tab to a file + Exporteer de data in de huidige tab naar een bestand + + + + &Debug window + &Debugscherm + + + + Open debugging and diagnostic console + Open debugging en diagnostische console + + + + &File + &Bestand + + + + &Settings + &Instellingen + + + + &Help + &Hulp + + + + Tabs toolbar + Tab-werkbalk + + + + Actions toolbar + Acties werkbalk + + + + + [testnet] + [testnetwerk] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Synchroniseren met netwerk... + + + + ~%n block(s) remaining + + ~%n blok nodig + ~%n blokken nodig + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + %1 van %2 aan transactie historie blokken gedownload (%3% klaar). + + + + Downloaded %1 blocks of transaction history. + %1 blokken van transactie geschiedenis gedownload. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + %n seconden geleden + %n seconden geleden + + + + + %n minute(s) ago + + %n minuut geleden + %n minuten geleden + + + + + %n hour(s) ago + + %n uur geleden + %n uren geleden + + + + + %n day(s) ago + + %n dag geleden + %n dagen geleden + + + + + Up to date + Bijgewerkt + + + + Catching up... + Aan het bijwerken... + + + + Last received block was generated %1. + Laatst ontvangen blok is gegenereerd op %1. + + + + 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? + De grootte van deze transactie overschrijdt de limiet. U kan deze transactie laten uitvoeren voor een meerkost van %1, dewelke doorgestuurd wordt naar de nodes die uw transactie verwerken, alsook ter ondersteuning van het netwerk. Wil u deze meerkost betalen? + + + + Confirm transaction fee + Bevestig transactie kosten + + + + Sent transaction + Verzonden transactie + + + + Incoming transaction + Binnenkomende transactie + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Datum: %1 +Bedrag: %2 +Type: %3 +Adres: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + URI-behandeling + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Portemonnee is <b>versleuteld</b> en momenteel <b>geopend</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Portemonnee is <b>versleuteld</b> en momenteel <b>gesloten</b> + + + + Backup Wallet + Backup Portemonnee + + + + Wallet Data (*.dat) + Portemonnee bestanden (*.dat) + + + + Backup Failed + Backup mislukt + + + + There was an error trying to save the wallet data to the new location. + Er was een fout opgetreden bij het opslaan van de wallet data naar de nieuwe locatie. + + + + %n second(s) + + %n seconden + %n seconden + + + + + %n minute(s) + + %n minuut + %n minuten + + + + + %n hour(s) + + %n uur + %n uur + + + + + %n day(s) + + %n dag + %n dagen + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Staking. <br> Uw gewicht wordt %1 <br> Network gewicht is %2 <br> Verwachte tijd om beloning te verdienen is %3 + + + + Not staking because wallet is locked + Niet staking omdat portemonnee aan het beveiligd is + + + + Not staking because wallet is offline + Niet staking omdat portemonnee aan het offline is + + + + Not staking because wallet is syncing + Niet staking omdat portemonnee aan het synchroniseren is. + + + + Not staking because you don't have mature coins + Niet staking omdat je geen mature munten hebt + + + + Not staking + Niet aan het staken. + + + Show information about triangles + Toon informatie over triangles + + + Send coins to a triangles address + Verstuur munten naar een triangles adres + + + Modify configuration options for triangles + Verander configuratie opties voor triangles + + + triangles + triangles + + + &About triangles + &Over triangles + + + triangles client + triangles client + + + %n active connection(s) to triangles network + + %n actieve verbinding naar triangles netwerk + %n actieve verbindingen naar triangles netwerk + + + + About triangles card + Over triangles card + + + Show information about triangles card + Toon informatie over triangles card + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URI kan niet ontleedt worden! Mogelijke oorzaken zijn een ongeldig triangles adres of incorrecte URI parameters. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Een fatale fout . triangles kan niet langer veilig doorgaan en sluit af. + + + + WalletModel + + + Sending... + Versturen... + + + diff --git a/src/qt/locale/bitcoin_pam.qm b/src/qt/locale/triangles_pam.qm similarity index 50% rename from src/qt/locale/bitcoin_pam.qm rename to src/qt/locale/triangles_pam.qm index 9b4ac7e..6ea99ca 100644 Binary files a/src/qt/locale/bitcoin_pam.qm and b/src/qt/locale/triangles_pam.qm differ diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/triangles_pam.ts similarity index 66% rename from src/qt/locale/bitcoin_pam.ts rename to src/qt/locale/triangles_pam.ts index 88e22fe..2a7e66a 100644 --- a/src/qt/locale/bitcoin_pam.ts +++ b/src/qt/locale/triangles_pam.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -37,15 +38,15 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p Address Book - + - + Double-click to edit address or label Pindutan meng makatidduang besis ban ayalilan me ing address o label - + Create a new address Maglalang kang bayung address @@ -55,52 +56,52 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p Kopyan me ing salukuyan at makipiling address keng system clipboard - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Kopyan ing address Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Ilako ya ing kasalungsungan makapiling address keng listahan - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Beripikan ing Mensayi - + + These are your Triangles 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. + + + + &Delete &Ilako @@ -117,7 +118,7 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p Export Address Book Data - + @@ -127,18 +128,18 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Label @@ -178,12 +179,12 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -233,7 +234,7 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -259,8 +260,8 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -304,431 +305,6 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p Mi-alilan ne ing passphrase na ning wallet. - - BitcoinGUI - - - Sign &message... - I-sign ing &mensayi - - - - Synchronizing with network... - Mag-sychronize ne king network... - - - - &Overview - &Overview - - - - Show general overview of wallet - Ipakit ing kabuuang lawe ning wallet - - - - &Transactions - &Transaksion - - - - Browse transaction history - Lawan ing kasalesayan ning transaksion - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - L&umwal - - - - Quit application - Tuknangan ing aplikasyon - - - - Show information about buynowcoin - - - - - About &Qt - Tungkul &Qt - - - - Show information about Qt - Magpakit impormasion tungkul king Qt - - - - &Options... - &Pipamilian... - - - - &Encrypt Wallet... - I-&Encrypt in Wallet... - - - - &Backup Wallet... - I-&Backup ing Wallet... - - - - &Change Passphrase... - &Alilan ing Passphrase... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - I-backup ing wallet king aliwang lugal - - - - Change the passphrase used for wallet encryption - Alilan ya ing passphrase a gagamitan para king wallet encryption - - - - &Debug window - I-&Debug ing awang - - - - Open debugging and diagnostic console - Ibuklat ing debugging at diagnostic console - - - - &Verify message... - &Beripikan ing message... - - - - buynowcoin - - - - - Wallet - Wallet - - - - &About buynowcoin - - - - - &Show / Hide - &Ipalto / Isalikut - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &File - - - - &Settings - &Pamag-ayus - - - - &Help - &Saup - - - - Tabs toolbar - Gamit para king Tabs - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Makatuki ya king aldo - - - - Catching up... - Catching up... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Mipadalang transaksion - - - - Incoming transaction - Paparatang a transaksion - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Aldo: %1 -Alaga: %2 -Type: %3 -Address: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Maka-<b>encrypt</b> ya ing wallet at kasalukuyan yang maka-<b>unlocked</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Maka-<b>encrypt</b> ya ing wallet at kasalukuyan yang maka-<b>locked</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -742,67 +318,67 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -812,7 +388,7 @@ Address: %4 Label - + Label @@ -827,7 +403,7 @@ Address: %4 Confirmations - + @@ -837,7 +413,7 @@ Address: %4 Priority - + @@ -858,87 +434,87 @@ Address: %4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -947,7 +523,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -956,7 +532,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -965,14 +541,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -983,12 +559,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1006,7 +582,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1016,40 +592,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Bayung address king pamagtanggap - + New sending address Bayung address king pamagpadala - + Edit receiving address Alilan ya ing address king pamagpadala - + Edit sending address Alilan ya ing address king pamagpadala - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Ing pepalub yung address "%1" ati na yu king aklat dareng address - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Ali ya bisang mag-unlock ing wallet @@ -1063,44 +644,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Pamanggamit: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Klase + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Label + + + + To Address + + + + + From Address + + + + + Message + Mensayi + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (alang label) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopyan me ing salukuyan at makipiling address keng system clipboard + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Ilako ya ing kasalungsungan makapiling address keng listahan + + + + &Delete + &Ilako + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1118,7 +1040,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1128,32 +1050,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1162,8 +1084,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1172,13 +1094,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1188,7 +1110,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1247,8 +1169,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1262,8 +1184,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1273,12 +1195,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1293,7 +1215,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1304,13 +1226,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1326,20 +1248,20 @@ This label turns red, if the priority is smaller than "medium". Form - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1349,7 +1271,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1367,29 +1289,57 @@ This label turns red, if the priority is smaller than "medium". Reng me-minang balanse a epa meg-matured - + Total: Kabuuan: - + Your current total balance Ing kekang kasalungsungan kabuuang balanse - + <b>Recent transactions</b> <b>Reng kapilan pamung transaksion</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1403,57 +1353,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1510,7 +1460,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1540,17 +1490,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1564,13 +1509,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1579,18 +1524,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console I-Clear ing console - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1614,100 +1564,101 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Magpadalang Barya Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Misanang magpadala kareng alialiuang tumanggap @@ -1719,7 +1670,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1733,8 +1684,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1747,14 +1698,14 @@ This label turns red, if the priority is smaller than "medium". Ipadala - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1764,37 +1715,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1804,12 +1755,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1839,17 +1790,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1859,7 +1815,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1867,7 +1823,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Form @@ -1881,24 +1837,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Magpalub kang label para king address a ini ban a-iabe me king aklat dareng address + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Label: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1918,12 +1884,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Misanang magpadala kareng alialiuang tumanggap + + + + Add &Recipient + Maglage &Tumanggap + + + + Remove all transaction fields + + + + + Clear &All + I-Clear &Eganagana + + + + Confirm the send action + Kumpirman ing aksion king pamagpadala + + + + S&end + Ipadala + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Ing address na ning tumanggap ali ya katanggap-tanggap, maliari pung pakilaue pasibayu. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Atin meakit a milupang address, maliari kamung magpadalang misan king metung a address king misan a pamagpadalang transaksion. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Form + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Magpalub kang label para king address a ini ban a-iabe me king aklat dareng address + + + + &Label: + &Label: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1946,14 +2123,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1983,11 +2160,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Ibalik keng dati reng ngan fields keng pamamirmang mensayi @@ -2006,38 +2188,37 @@ This label turns red, if the priority is smaller than "medium". 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Ibalik king dati reng ngan fields na ning pamag beripikang mensayi - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature I-click ing "Pirman ing Mensayi" ban agawa ya ing metung a pirma + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2116,12 +2297,14 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + conflicted - + @@ -2146,7 +2329,9 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + @@ -2192,14 +2377,16 @@ This label turns red, if the priority is smaller than "medium". - + Credit Credit - + matures in %n more block(s) - + + + @@ -2210,12 +2397,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debit - + Transaction fee Bayad king Transaksion @@ -2235,14 +2422,14 @@ This label turns red, if the priority is smaller than "medium". Komentu - + Transaction ID ID ning Transaksion - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2257,7 +2444,7 @@ This label turns red, if the priority is smaller than "medium". Inputs - + @@ -2275,7 +2462,7 @@ This label turns red, if the priority is smaller than "medium". e tutu - + , has not been successfully broadcast yet , eya matagumpeng mibalita @@ -2301,7 +2488,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Kaaldauan @@ -2333,32 +2520,39 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2401,7 +2595,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Status ning Transaksion: Itapat me babo na ning field a ini ban ipakit dala reng bilang dareng me-kumpirma na @@ -2517,7 +2711,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2532,7 +2726,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2577,12 +2771,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2596,32 +2790,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Pamanggamit: - - Send command to -server or buynowcoind - - - - + List commands Listahan dareng commands @@ -2636,19 +2812,9 @@ This label turns red, if the priority is smaller than "medium". Pipamilian: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2663,12 +2829,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2688,12 +2854,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2713,22 +2879,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2738,22 +2904,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2773,17 +2939,17 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2791,24 +2957,19 @@ This label turns red, if the priority is smaller than "medium". Kapabaluan: Sobra ya katas ing makalage king -paytxfee. Ini ing maging bayad mu para king bayad na ning transaksion istung pepadala me ing transaksion a ini. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + @@ -2833,62 +2994,62 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Pipamilian ning SSL: (lawen ye ing Bitcoin Wiki para king SSL setup instructions) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Pipamilian ning SSL: (lawen ye ing Triangles Wiki para king SSL setup instructions) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2898,12 +3059,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2913,33 +3074,33 @@ This label turns red, if the priority is smaller than "medium". Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2949,17 +3110,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2969,7 +3140,7 @@ This label turns red, if the priority is smaller than "medium". wallet.dat corrupt, salvage failed - + @@ -2977,34 +3148,39 @@ This label turns red, if the priority is smaller than "medium". Password para king JSON-RPC koneksion - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3024,22 +3200,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3059,17 +3235,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3089,17 +3265,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3109,27 +3285,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Ali ya magsilbing mag-bind keng %s kening kompyuter a ini (bind returned error %d, %s) Connect through socks proxy - + @@ -3144,7 +3310,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3152,17 +3318,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Me-mali ya ing pamag-load king wallet.dat: Me-corrupt ya ing wallet - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Me-mali ya ing pamag-load king wallet.dat @@ -3199,12 +3355,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3222,39 +3378,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Lo-load dane ing block index... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Magdagdag a node ban kumunekta at subuknan apanatili yang makabuklat ing koneksion - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Lo-load dane ing wallet... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Ali ya magsilbing i-downgrade ing wallet Cannot initialize keypool - + @@ -3291,4 +3477,476 @@ If the file does not exist, create it with owner-readable-only file permissions. Nung ing file ala ya, gawa ka gamit ing owner-readable-only file permissions. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Wallet + + + + &Overview + &Overview + + + + Show general overview of wallet + Ipakit ing kabuuang lawe ning wallet + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transaksion + + + + Browse transaction history + Lawan ing kasalesayan ning transaksion + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + L&umwal + + + + Quit application + Tuknangan ing aplikasyon + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Tungkul &Qt + + + + Show information about Qt + Magpakit impormasion tungkul king Qt + + + + &Options... + &Pipamilian... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Ipalto / Isalikut + + + + &Encrypt Wallet... + I-&Encrypt in Wallet... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + I-&Backup ing Wallet... + + + + Backup wallet to another location + I-backup ing wallet king aliwang lugal + + + + &Change Passphrase... + &Alilan ing Passphrase... + + + + Change the passphrase used for wallet encryption + Alilan ya ing passphrase a gagamitan para king wallet encryption + + + + &Unlock Wallet... + + + + + Unlock wallet + Unlock ya ing wallet + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + I-sign ing &mensayi + + + + &Verify message... + &Beripikan ing message... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + I-&Debug ing awang + + + + Open debugging and diagnostic console + Ibuklat ing debugging at diagnostic console + + + + &File + &File + + + + &Settings + &Pamag-ayus + + + + &Help + &Saup + + + + Tabs toolbar + Gamit para king Tabs + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + Mag-sychronize ne king network... + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + Makatuki ya king aldo + + + + Catching up... + Catching up... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Mipadalang transaksion + + + + Incoming transaction + Paparatang a transaksion + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Aldo: %1 +Alaga: %2 +Type: %3 +Address: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Maka-<b>encrypt</b> ya ing wallet at kasalukuyan yang maka-<b>unlocked</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Maka-<b>encrypt</b> ya ing wallet at kasalukuyan yang maka-<b>locked</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + + + + + + %n day(s) + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_pl.qm b/src/qt/locale/triangles_pl.qm similarity index 53% rename from src/qt/locale/bitcoin_pl.qm rename to src/qt/locale/triangles_pl.qm index bd7bc82..323397b 100644 Binary files a/src/qt/locale/bitcoin_pl.qm and b/src/qt/locale/triangles_pl.qm differ diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/triangles_pl.ts similarity index 68% rename from src/qt/locale/bitcoin_pl.ts rename to src/qt/locale/triangles_pl.ts index 6204404..a0cfa98 100644 --- a/src/qt/locale/bitcoin_pl.ts +++ b/src/qt/locale/triangles_pl.ts @@ -1,25 +1,30 @@ - + + + AboutDialog - About buynowcoin - O buynowcoin + About Triangles + O triangles + + + <b>triangles</b> version + <b>triangles</b> wersja - <b>buynowcoin</b> version - <b>buynowcoin</b> wersja + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -42,12 +47,17 @@ This product includes software developed by the OpenSSL Project for use in the O Książka Adresowa - + + These are your Triangles 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. + + + + Double-click to edit address or label Kliknij dwukrotnie, aby edytować adres lub etykietę - + Create a new address Utwórz nowy adres @@ -57,18 +67,22 @@ This product includes software developed by the OpenSSL Project for use in the O Skopiuj aktualnie wybrany adres do schowka - + + Sign a message to prove you own a TRI address + + + + &New Address Nowy Adres - - These are your buynowcoin 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. - Tutaj znajdują się twoje adresy do odbierania wpłat. + These are your triangles 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. + Tutaj znajdują się twoje adresy do odbierania wpłat. Możesz dodać kolejny adres dla każdego wysyłającego aby określić od kogo pochodzi wpłata. - + &Copy Address &Kopiuj adres @@ -78,27 +92,30 @@ Możesz dodać kolejny adres dla każdego wysyłającego aby określić od kogo Pokaż &Kod QR - - Sign a message to prove you own a buynowcoin address - Podpisz wiadomość by udowodnić, że jesteś właścicielem adresu buynowcoin + Sign a message to prove you own a triangles address + Podpisz wiadomość by udowodnić, że jesteś właścicielem adresu triangles - + Sign &Message Podpisz &Wiadomość - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Usuń zaznaczony adres z listy - - Verify a message to ensure it was signed with a specified buynowcoin address - Zweryfikuj wiadomość, w celu zapewnienia, że została podpisana z określonego adresu buynowcoin + Verify a message to ensure it was signed with a specified triangles address + Zweryfikuj wiadomość, w celu zapewnienia, że została podpisana z określonego adresu triangles - + &Verify Message &Zweryfikuj wiadomość @@ -141,7 +158,7 @@ Możesz dodać kolejny adres dla każdego wysyłającego aby określić od kogo AddressTableModel - + Label Etykieta @@ -181,12 +198,12 @@ Możesz dodać kolejny adres dla każdego wysyłającego aby określić od kogo Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -262,8 +279,8 @@ Możesz dodać kolejny adres dla każdego wysyłającego aby określić od kogo - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -307,431 +324,6 @@ Możesz dodać kolejny adres dla każdego wysyłającego aby określić od kogo Hasło portfela zostało pomyślnie zmienione. - - BitcoinGUI - - - Sign &message... - Podpisz wiado&mość... - - - - Synchronizing with network... - Synchronizacja z siecią... - - - - &Overview - P&odsumowanie - - - - Show general overview of wallet - Pokazuje ogólny zarys portfela - - - - &Transactions - &Transakcje - - - - Browse transaction history - Przeglądaj historię transakcji - - - - &Address Book - &Książka Adresowa - - - - Edit the list of stored addresses and labels - Edytuj listę przechowywanych adresów i etykiet - - - - &Receive coins - &Odbierz monety - - - - Show the list of addresses for receiving payments - Pokaż listę adresów do odbierania wpłat - - - - &Send coins - &Wyślij monety - - - - E&xit - &Zakończ - - - - Quit application - Zamknij program - - - - Show information about buynowcoin - Pokaż informacje dotyczące buynowcoin - - - - About &Qt - O &Qt - - - - Show information about Qt - Pokazuje informacje o Qt - - - - &Options... - &Opcje... - - - - &Encrypt Wallet... - Zaszyfruj Portf&el - - - - &Backup Wallet... - Wykonaj kopię zapasową... - - - - &Change Passphrase... - &Zmień hasło... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Pobrano %1 z %2 bloków historii transakcji (%3% gotowe). - - - - &Export... - &Exportuj - - - - Send coins to a buynowcoin address - Wyślij monety na adres buynowcoin - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Zapasowy portfel w innej lokalizacji - - - - Change the passphrase used for wallet encryption - Zmień hasło użyte do szyfrowania portfela - - - - &Debug window - &Okno debugowania - - - - Open debugging and diagnostic console - Otwórz konsolę debugowania i diagnostyki - - - - &Verify message... - &Zweryfikuj wiadomość... - - - - buynowcoin - buynowcoin - - - - Wallet - Portfel - - - - &About buynowcoin - - - - - &Show / Hide - &Pokaż / Ukryj - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Plik - - - - &Settings - P&referencje - - - - &Help - Pomo&c - - - - Tabs toolbar - Pasek zakładek - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Aktualny - - - - Catching up... - Łapanie bloków... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transakcja wysłana - - - - Incoming transaction - Transakcja przychodząca - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Data: %1 -Kwota: %2 -Typ: %3 -Adres: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Portfel jest <b>zaszyfrowany</b> i obecnie <b>niezablokowany</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Portfel jest <b>zaszyfrowany</b> i obecnie <b>zablokowany</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n godzina%n godzin%n godzin - - - - %n day(s) - %n dzień%n dni%n dni - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -745,7 +337,7 @@ Adres: %4 Coin Control - + @@ -775,7 +367,7 @@ Adres: %4 Low Output: - + @@ -815,7 +407,7 @@ Adres: %4 Label - + Etykieta @@ -891,7 +483,7 @@ Adres: %4 Copy low output - + @@ -936,7 +528,7 @@ Adres: %4 DUST - + @@ -950,7 +542,7 @@ Adres: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -959,7 +551,7 @@ Adres: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -968,14 +560,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1009,7 +601,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1019,40 +611,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Nowy adres odbiorczy - + New sending address Nowy adres wysyłania - + Edit receiving address Edytuj adres odbioru - + Edit sending address Edytuj adres wysyłania - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Wprowadzony adres "%1" już istnieje w książce adresowej. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Nie można było odblokować portfela. @@ -1066,44 +663,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Użycie: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Typ + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etykieta + + + + To Address + + + + + From Address + + + + + Message + Wiadomość + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (bez etykiety) + + + + MessagePage + + + Address Book + Książka Adresowa + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Skopiuj aktualnie wybrany adres do schowka + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Usuń zaznaczony adres z listy + + + + &Delete + &Usuń + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + Błąd exportowania + + + + Could not write to file %1. + Nie mogę zapisać do pliku %1 @@ -1121,7 +1059,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1131,32 +1069,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1165,8 +1103,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1175,13 +1113,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1191,7 +1129,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1250,8 +1188,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1265,8 +1203,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1276,12 +1214,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1296,7 +1234,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1307,13 +1245,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1329,20 +1267,20 @@ This label turns red, if the priority is smaller than "medium". Formularz - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1352,7 +1290,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1370,29 +1308,57 @@ This label turns red, if the priority is smaller than "medium". Balans wydobycia, który jeszcze nie dojrzał - + Total: Wynosi ogółem: - + Your current total balance Twoje obecne saldo - + <b>Recent transactions</b> <b>Ostatnie transakcje</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1406,57 +1372,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Kwota: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1513,7 +1479,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1543,17 +1509,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1567,13 +1528,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1582,18 +1543,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Wyczyść konsolę - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1617,31 +1583,32 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Wyślij Monety Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: Ilość: @@ -1649,7 +1616,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1666,8 +1633,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1677,7 +1644,7 @@ This label turns red, if the priority is smaller than "medium". medium - + średnia @@ -1687,12 +1654,12 @@ This label turns red, if the priority is smaller than "medium". Low Output: - + no - + nie @@ -1702,15 +1669,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once Wyślij do wielu odbiorców na raz @@ -1722,7 +1689,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1736,8 +1703,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1750,9 +1717,9 @@ This label turns red, if the priority is smaller than "medium". Wy&syłka - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1787,7 +1754,7 @@ This label turns red, if the priority is smaller than "medium". Copy low output - + @@ -1797,7 +1764,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1807,12 +1774,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1842,17 +1809,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1862,7 +1834,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1870,7 +1842,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formularz @@ -1884,24 +1856,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Wprowadź etykietę dla tego adresu by dodać go do książki adresowej + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etykieta: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1921,12 +1903,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Wklej adres ze schowka + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Wyślij do wielu odbiorców na raz + + + + Add &Recipient + Dodaj Odbio&rce + + + + Remove all transaction fields + + + + + Clear &All + Wyczyść &wszystko + + + + Confirm the send action + Potwierdź akcję wysyłania + + + + S&end + Wy&syłka + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Adres odbiorcy jest nieprawidłowy, proszę poprawić + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Znaleziono powtórzony adres, można wysłać tylko raz na każdy adres podczas operacji wysyłania. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formularz + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Wklej adres ze schowka + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Wprowadź etykietę dla tego adresu by dodać go do książki adresowej + + + + &Label: + &Etykieta: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1949,14 +2142,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1986,11 +2179,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Zresetuj wszystkie pola podpisanej wiadomości @@ -2013,34 +2211,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Resetuje wszystkie pola weryfikacji wiadomości - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Kliknij "Podpisz Wiadomość" żeby uzyskać podpis + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2119,12 +2316,16 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + + conflicted - + @@ -2149,7 +2350,11 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , emitowany przez %n węzeł, emitowany przez %n węzły, emitowany przez %n węzłów + + , emitowany przez %n węzeł + , emitowany przez %n węzły + , emitowany przez %n węzłów + @@ -2195,14 +2400,18 @@ This label turns red, if the priority is smaller than "medium". - + Credit Przypisy - + matures in %n more block(s) - potwierdzona przy %n bloku więcejpotwierdzona przy %n blokach więcejpotwierdzona przy %n blokach więcej + + potwierdzona przy %n bloku więcej + potwierdzona przy %n blokach więcej + potwierdzona przy %n blokach więcej + @@ -2213,12 +2422,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Debet - + Transaction fee Prowizja transakcji @@ -2238,14 +2447,14 @@ This label turns red, if the priority is smaller than "medium". Komentarz - + Transaction ID ID transakcji - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2278,7 +2487,7 @@ This label turns red, if the priority is smaller than "medium". fałsz - + , has not been successfully broadcast yet , nie został jeszcze pomyślnie wyemitowany @@ -2304,7 +2513,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Data @@ -2336,12 +2545,21 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + + - + + Narration + + + + Offline - + @@ -2356,12 +2574,12 @@ This label turns red, if the priority is smaller than "medium". Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2404,7 +2622,7 @@ This label turns red, if the priority is smaller than "medium". (brak) - + Transaction status. Hover over this field to show number of confirmations. Status transakcji. Najedź na pole, aby zobaczyć liczbę potwierdzeń. @@ -2535,7 +2753,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2580,12 +2798,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Błąd exportowania Could not write to file %1. - + Nie mogę zapisać do pliku %1 @@ -2599,32 +2817,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Użycie: - - Send command to -server or buynowcoind - - - - + List commands Lista poleceń @@ -2639,17 +2839,7 @@ This label turns red, if the priority is smaller than "medium". Opcje: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) Określ plik portfela (w obrębie folderu danych) @@ -2666,12 +2856,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2691,12 +2881,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2716,22 +2906,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2741,22 +2931,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2781,12 +2971,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2794,12 +2984,7 @@ This label turns red, if the priority is smaller than "medium". Ostrzeżenie: -paytxfee jest bardzo duży. To jest prowizja za transakcje, którą płacisz, gdy wysyłasz monety. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Ostrzeżenie: błąd odczytu wallet.dat! Wszystkie klucze zostały odczytane, ale może brakować pewnych danych transakcji lub wpisów w książce adresowej lub mogą one być nieprawidłowe. @@ -2836,22 +3021,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2871,27 +3056,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Opcje SSL: (odwiedź Bitcoin Wiki w celu uzyskania instrukcji) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Opcje SSL: (odwiedź Triangles Wiki w celu uzyskania instrukcji) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2901,12 +3086,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2927,7 +3112,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2942,7 +3127,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2952,17 +3137,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2980,34 +3175,39 @@ This label turns red, if the priority is smaller than "medium". Hasło do połączeń JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3032,17 +3232,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3062,17 +3262,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3092,17 +3292,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3112,27 +3312,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Nie można przywiązać %s na tym komputerze (bind returned error %d, %s) Connect through socks proxy - + @@ -3147,7 +3337,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3155,17 +3345,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Błąd ładowania wallet.dat: Uszkodzony portfel - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Błąd ładowania wallet.dat @@ -3202,12 +3382,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3225,39 +3405,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Ładowanie indeksu bloku... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Dodaj węzeł do łączenia się and attempt to keep the connection open - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Wczytywanie portfela... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Nie można dezaktualizować portfela Cannot initialize keypool - + @@ -3294,4 +3504,508 @@ If the file does not exist, create it with owner-readable-only file permissions. Jeżeli plik nie istnieje, utwórz go z uprawnieniami właściciela-tylko-do-odczytu. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Portfel + + + + &Overview + P&odsumowanie + + + + Show general overview of wallet + Pokazuje ogólny zarys portfela + + + + &Send coins + &Wyślij monety + + + + Send coins to a TRI address + + + + + &Receive coins + &Odbierz monety + + + + Show the list of addresses for receiving payments + Pokaż listę adresów do odbierania wpłat + + + + &Transactions + &Transakcje + + + + Browse transaction history + Przeglądaj historię transakcji + + + + &Address Book + &Książka Adresowa + + + + Edit the list of stored addresses and labels + Edytuj listę przechowywanych adresów i etykiet + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Zakończ + + + + Quit application + Zamknij program + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + O &Qt + + + + Show information about Qt + Pokazuje informacje o Qt + + + + &Options... + &Opcje... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Pokaż / Ukryj + + + + &Encrypt Wallet... + Zaszyfruj Portf&el + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + Wykonaj kopię zapasową... + + + + Backup wallet to another location + Zapasowy portfel w innej lokalizacji + + + + &Change Passphrase... + &Zmień hasło... + + + + Change the passphrase used for wallet encryption + Zmień hasło użyte do szyfrowania portfela + + + + &Unlock Wallet... + + + + + Unlock wallet + Odblokuj portfel + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Podpisz wiado&mość... + + + + &Verify message... + &Zweryfikuj wiadomość... + + + + &Export... + &Exportuj + + + + Export the data in the current tab to a file + + + + + &Debug window + &Okno debugowania + + + + Open debugging and diagnostic console + Otwórz konsolę debugowania i diagnostyki + + + + &File + &Plik + + + + &Settings + P&referencje + + + + &Help + Pomo&c + + + + Tabs toolbar + Pasek zakładek + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Synchronizacja z siecią... + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Pobrano %1 z %2 bloków historii transakcji (%3% gotowe). + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + Aktualny + + + + Catching up... + Łapanie bloków... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transakcja wysłana + + + + Incoming transaction + Transakcja przychodząca + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Data: %1 +Kwota: %2 +Typ: %3 +Adres: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Portfel jest <b>zaszyfrowany</b> i obecnie <b>niezablokowany</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Portfel jest <b>zaszyfrowany</b> i obecnie <b>zablokowany</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + %n godzina + %n godzin + %n godzin + + + + + %n day(s) + + %n dzień + %n dni + %n dni + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + Show information about triangles + Pokaż informacje dotyczące triangles + + + Send coins to a triangles address + Wyślij monety na adres triangles + + + triangles + triangles + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_pt_BR.qm b/src/qt/locale/triangles_pt_BR.qm new file mode 100644 index 0000000..3425fb7 Binary files /dev/null and b/src/qt/locale/triangles_pt_BR.qm differ diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/triangles_pt_BR.ts similarity index 68% rename from src/qt/locale/bitcoin_pt_BR.ts rename to src/qt/locale/triangles_pt_BR.ts index ce2c31d..46b7e8f 100644 --- a/src/qt/locale/bitcoin_pt_BR.ts +++ b/src/qt/locale/triangles_pt_BR.ts @@ -1,25 +1,30 @@ - + + + AboutDialog - About buynowcoin - Sobre o buynowcoin + About Triangles + Sobre o triangles + + + <b>triangles</b> version + <b>triangles</b> versao - <b>buynowcoin</b> version - <b>buynowcoin</b> versao + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -42,12 +47,17 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS Livro de Endereços - + + These are your Triangles 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. + + + + Double-click to edit address or label Clique duas vezes para editar o endereço ou a etiqueta - + Create a new address Criar um novo endereço @@ -57,17 +67,21 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS Copie o endereço selecionado para a área de transferência do sistema - + + Sign a message to prove you own a TRI address + + + + &New Address &Novo Endereço - - These are your buynowcoin 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. - Estes são os seus endereços buynowcoin para receber pagamentos. Você pode dar um diferente a cada remetente para que você possa acompanhar quem está pagando. + These are your triangles 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. + Estes são os seus endereços triangles para receber pagamentos. Você pode dar um diferente a cada remetente para que você possa acompanhar quem está pagando. - + &Copy Address &Copiar Endereço @@ -77,27 +91,30 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS Mostrar &QR Code - - Sign a message to prove you own a buynowcoin address - Assine a mensagem para provar que você possui um endereço buynowcoin + Sign a message to prove you own a triangles address + Assine a mensagem para provar que você possui um endereço triangles - + Sign &Message Assinar &Mensagem - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Excluir os endereços selecionados da lista - - Verify a message to ensure it was signed with a specified buynowcoin address - Verifique a mensagem para garantir que ela foi assinada com um endereço buynowcoin específico + Verify a message to ensure it was signed with a specified triangles address + Verifique a mensagem para garantir que ela foi assinada com um endereço triangles específico - + &Verify Message &Verificar Mensagem @@ -140,7 +157,7 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS AddressTableModel - + Label Rótulo @@ -243,7 +260,12 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS Tem certeza de que deseja criptografar sua carteira? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. IMPORTANTE: Qualquer backup prévio que você tenha feito do seu arquivo wallet deve ser substituído pelo novo e encriptado arquivo wallet gerado. Por razões de segurança, qualquer backup do arquivo wallet não criptografado se tornará inútil assim que você começar a usar uma nova carteira criptografada. @@ -260,12 +282,11 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS Carteira criptografada - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin vai fechar agora para concluir o processo de criptografia. Lembre-se que a criptografia de sua carteira não pode proteger totalmente suas moedas de serem roubados por malwares infectem seu computador. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles vai fechar agora para concluir o processo de criptografia. Lembre-se que a criptografia de sua carteira não pode proteger totalmente suas moedas de serem roubados por malwares infectem seu computador. - + @@ -306,430 +327,6 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS A frase de segurança da carteira foi alterada com êxito. - - BitcoinGUI - - - Sign &message... - &Assinar Mensagem... - - - - Synchronizing with network... - Sincronizando com a rede... - - - - &Overview - &Visão geral - - - - Show general overview of wallet - Mostrar visão geral da carteira - - - - &Transactions - &Transações - - - - Browse transaction history - Navegar pelo histórico de transações - - - - &Address Book - &Livro de Endereços - - - - Edit the list of stored addresses and labels - Edite a lista de endereços armazenados e rótulos - - - - &Receive coins - &Receber moedas - - - - Show the list of addresses for receiving payments - Mostrar a lista de endereços para o recebimento de pagamentos - - - - &Send coins - &Enviar moedas - - - - E&xit - S&air - - - - Quit application - Sair da aplicação - - - - Show information about buynowcoin - Mostrar informações sobre o buynowcoin - - - - About &Qt - Sobre &Qt - - - - Show information about Qt - Mostrar informações sobre o Qt - - - - &Options... - &Opções... - - - - &Encrypt Wallet... - &Criptografar Carteira... - - - - &Backup Wallet... - &Backup Carteira... - - - - &Change Passphrase... - &Mudar frase de segurança... - - - - ~%n block(s) remaining - ~%n bloco faltando~%n blocos faltando - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Baixados %1 de %2 blocos de histórico de transações (%3% completo). - - - - &Export... - &Exportar... - - - - Send coins to a buynowcoin address - Enviar moedas para um endereço buynowcoin - - - - Modify configuration options for buynowcoin - Modificar opções de configuração para buynowcoin - - - - Export the data in the current tab to a file - Exportar os dados da guia atual para um arquivo - - - - Encrypt or decrypt wallet - Cryptografar ou Decryptografar carteira - - - - Backup wallet to another location - Fazer cópia de segurança da carteira para uma outra localização - - - - Change the passphrase used for wallet encryption - Mudar a frase de segurança utilizada na criptografia da carteira - - - - &Debug window - Janela de &Depuração - - - - Open debugging and diagnostic console - Abrir console de depuração e diagnóstico - - - - &Verify message... - &Verificar mensagem... - - - - buynowcoin - buynowcoin - - - - Wallet - Carteira - - - - &About buynowcoin - Sobre o buynowcoin - - - - &Show / Hide - &Exibir/Ocultar - - - - Unlock wallet - Desbloquear carteira - - - - &Lock Wallet - &Bloquear Carteira - - - - Lock wallet - Bloquear Carteira - - - - &File - &Arquivo - - - - &Settings - &Configurações - - - - &Help - &Ajuda - - - - Tabs toolbar - Barra de ferramentas - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Atualizado - - - - Catching up... - Recuperando o atraso ... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transação enviada - - - - Incoming transaction - Transação recebida - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Data: %1 -Quantidade: %2 -Tipo: %3 -Endereço: %4 - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Carteira está <b>criptografada</b> e atualmente <b>desbloqueada</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Carteira está <b>criptografada</b> e atualmente <b>bloqueada</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n hora%n horas - - - - %n day(s) - %n dia%n dias - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -743,7 +340,7 @@ Endereço: %4 Coin Control - + @@ -813,7 +410,7 @@ Endereço: %4 Label - + @@ -934,7 +531,7 @@ Endereço: %4 DUST - + @@ -948,7 +545,7 @@ Endereço: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -957,7 +554,7 @@ Endereço: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -966,14 +563,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1007,7 +604,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1017,40 +614,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Novo endereço de recebimento - + New sending address Novo endereço de envio - + Edit receiving address Editar endereço de recebimento - + Edit sending address Editar endereço de envio - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. O endereço digitado "%1" já se encontra no catálogo de endereços. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Não foi possível destravar a carteira. @@ -1064,44 +666,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Uso: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipo + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + Mensagem + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (Sem rótulo) + + + + MessagePage + + + Address Book + Livro de Endereços + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copie o endereço selecionado para a área de transferência do sistema + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Excluir os endereços selecionados da lista + + + + &Delete + &Excluir + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Arquivo separado por vírgulas (*. csv) + + + + Error exporting + Erro ao exportar + + + + Could not write to file %1. + Não foi possível escrever no arquivo %1. @@ -1119,7 +1062,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1129,32 +1072,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1163,8 +1106,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1173,13 +1116,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1189,7 +1132,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1248,8 +1191,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1259,12 +1202,12 @@ This label turns red, if the priority is smaller than "medium". Choose the default subdivision unit to show in the interface and when sending coins. - Escolha a unidade padrão de subdivisão para interface mostrar quando enviar bitcoins. + Escolha a unidade padrão de subdivisão para interface mostrar quando enviar triangless. - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1279,7 +1222,7 @@ This label turns red, if the priority is smaller than "medium". Display coin &control features (experts only!) - + @@ -1294,7 +1237,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1305,13 +1248,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1327,20 +1270,20 @@ This label turns red, if the priority is smaller than "medium". Formulário - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1350,7 +1293,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1368,29 +1311,57 @@ This label turns red, if the priority is smaller than "medium". Saldo minerado que ainda não maturou - + Total: Total: - + Your current total balance Seu saldo total atual - + <b>Recent transactions</b> <b>Transações recentes</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1404,57 +1375,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Quantia: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1511,7 +1482,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1541,17 +1512,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1565,13 +1531,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1580,18 +1546,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Limpar console - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1615,6 +1586,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Enviar dinheiro @@ -1639,7 +1611,7 @@ This label turns red, if the priority is smaller than "medium". Saldo insuficiente! - + Quantity: Quantidade: @@ -1647,7 +1619,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1664,8 +1636,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1675,7 +1647,7 @@ This label turns red, if the priority is smaller than "medium". medium - + média @@ -1690,7 +1662,7 @@ This label turns red, if the priority is smaller than "medium". no - + não @@ -1700,15 +1672,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once Enviar para vários destinatários de uma só vez @@ -1720,7 +1692,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1734,8 +1706,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1748,9 +1720,9 @@ This label turns red, if the priority is smaller than "medium". Enviar - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1795,7 +1767,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1805,12 +1777,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1840,17 +1812,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1860,7 +1837,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1868,7 +1845,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formulário @@ -1882,24 +1859,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Digite uma etiqueta para este endereço para adicioná-lo ao catálogo de endereços + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiqueta: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1919,12 +1906,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Colar o endereço da área de transferência + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Enviar para vários destinatários de uma só vez + + + + Add &Recipient + Adicionar destinatário + + + + Remove all transaction fields + + + + + Clear &All + Limpar Tudo + + + + Confirm the send action + Confirmar o envio + + + + S&end + Enviar + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + O endereço do destinatário não é válido, favor verificar. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Endereço duplicado: pode-se enviar para cada endereço apenas uma vez por transação. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulário + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Colar o endereço da área de transferência + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Digite uma etiqueta para este endereço para adicioná-lo ao catálogo de endereços + + + + &Label: + &Etiqueta: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1947,14 +2145,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1984,11 +2182,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Limpar todos os campos de assinatura da mensagem @@ -2011,34 +2214,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Limpar todos os campos de assinatura da mensagem - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Clique em "Assinar Mensagem" para gerar a assinatura + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2117,7 +2319,10 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + @@ -2147,7 +2352,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , difundir atráves de %n nó, difundir atráves de %n nós + + , difundir atráves de %n nó + , difundir atráves de %n nós + @@ -2193,14 +2401,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Crédito - + matures in %n more block(s) - matura em mais %n blocomatura em mais %n blocos + + matura em mais %n bloco + matura em mais %n blocos + @@ -2211,12 +2422,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Débito - + Transaction fee Taxa de transação @@ -2236,14 +2447,14 @@ This label turns red, if the priority is smaller than "medium". Comentário - + Transaction ID ID da transação - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2276,7 +2487,7 @@ This label turns red, if the priority is smaller than "medium". falso - + , has not been successfully broadcast yet , ainda não foi propagada na rede com sucesso. @@ -2302,7 +2513,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Data @@ -2334,10 +2545,18 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Abrir para mais %n blocoAbrir para mais %n blocos + + Abrir para mais %n bloco + Abrir para mais %n blocos + - + + Narration + + + + Offline Offline @@ -2402,7 +2621,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Status da transação. Passe o mouse sobre este campo para mostrar o número de confirmações. @@ -2533,7 +2752,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2578,12 +2797,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Erro ao exportar Could not write to file %1. - + Não foi possível escrever no arquivo %1. @@ -2597,32 +2816,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Uso: - - Send command to -server or buynowcoind - - - - + List commands Lista de comandos @@ -2637,17 +2838,7 @@ This label turns red, if the priority is smaller than "medium". Opções: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) Especifique o arquivo da carteira (dentro do diretório de dados) @@ -2664,12 +2855,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2689,12 +2880,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2714,22 +2905,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2739,22 +2930,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2779,12 +2970,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2792,12 +2983,7 @@ This label turns red, if the priority is smaller than "medium". Cuidado: valor de -paytxfee escolhido é muito alto! Este é o valor da taxa de transação que você irá pagar se enviar a transação. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Cuidado: erro ao ler arquivo wallet.dat! Todas as chaves foram lidas corretamente, mas dados transações e do catálogo de endereços podem estar faltando ou estar incorretas. @@ -2834,22 +3020,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2869,27 +3055,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Opções SSL: (veja a Wiki do Bitcoin para instruções de configuração SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Opções SSL: (veja a Wiki do Triangles para instruções de configuração SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2899,12 +3085,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2925,7 +3111,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2940,7 +3126,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2950,17 +3136,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2978,34 +3174,39 @@ This label turns red, if the priority is smaller than "medium". Senha para conexões JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3030,17 +3231,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3060,17 +3261,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3090,17 +3291,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3110,27 +3311,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Impossível vincular a %s neste computador (bind retornou erro %d, %s) Connect through socks proxy - + @@ -3145,7 +3336,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3153,17 +3344,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Erro ao carregar wallet.dat: Carteira corrompida - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Erro ao carregar wallet.dat @@ -3200,12 +3381,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3223,39 +3404,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Carregando índice de blocos... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Adicionar um nó com o qual se conectar e tentar manter a conexão ativa - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Carregando carteira... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Não é possível fazer downgrade da carteira Cannot initialize keypool - + @@ -3292,4 +3503,505 @@ If the file does not exist, create it with owner-readable-only file permissions. Se o arquivo não existir, crie um com permissão de leitura apenas pelo dono - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Carteira + + + + &Overview + &Visão geral + + + + Show general overview of wallet + Mostrar visão geral da carteira + + + + &Send coins + &Enviar moedas + + + + Send coins to a TRI address + + + + + &Receive coins + &Receber moedas + + + + Show the list of addresses for receiving payments + Mostrar a lista de endereços para o recebimento de pagamentos + + + + &Transactions + &Transações + + + + Browse transaction history + Navegar pelo histórico de transações + + + + &Address Book + &Livro de Endereços + + + + Edit the list of stored addresses and labels + Edite a lista de endereços armazenados e rótulos + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + S&air + + + + Quit application + Sair da aplicação + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Sobre &Qt + + + + Show information about Qt + Mostrar informações sobre o Qt + + + + &Options... + &Opções... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Exibir/Ocultar + + + + &Encrypt Wallet... + &Criptografar Carteira... + + + + Encrypt or decrypt wallet + Cryptografar ou Decryptografar carteira + + + + &Backup Wallet... + &Backup Carteira... + + + + Backup wallet to another location + Fazer cópia de segurança da carteira para uma outra localização + + + + &Change Passphrase... + &Mudar frase de segurança... + + + + Change the passphrase used for wallet encryption + Mudar a frase de segurança utilizada na criptografia da carteira + + + + &Unlock Wallet... + + + + + Unlock wallet + Desbloquear carteira + + + + &Lock Wallet + &Bloquear Carteira + + + + Lock wallet + Bloquear Carteira + + + + Sign &message... + &Assinar Mensagem... + + + + &Verify message... + &Verificar mensagem... + + + + &Export... + &Exportar... + + + + Export the data in the current tab to a file + Exportar os dados da guia atual para um arquivo + + + + &Debug window + Janela de &Depuração + + + + Open debugging and diagnostic console + Abrir console de depuração e diagnóstico + + + + &File + &Arquivo + + + + &Settings + &Configurações + + + + &Help + &Ajuda + + + + Tabs toolbar + Barra de ferramentas + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sincronizando com a rede... + + + + ~%n block(s) remaining + + ~%n bloco faltando + ~%n blocos faltando + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Baixados %1 de %2 blocos de histórico de transações (%3% completo). + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Atualizado + + + + Catching up... + Recuperando o atraso ... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transação enviada + + + + Incoming transaction + Transação recebida + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Data: %1 +Quantidade: %2 +Tipo: %3 +Endereço: %4 + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Carteira está <b>criptografada</b> e atualmente <b>desbloqueada</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Carteira está <b>criptografada</b> e atualmente <b>bloqueada</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n hora + %n horas + + + + + %n day(s) + + %n dia + %n dias + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + Show information about triangles + Mostrar informações sobre o triangles + + + Send coins to a triangles address + Enviar moedas para um endereço triangles + + + Modify configuration options for triangles + Modificar opções de configuração para triangles + + + triangles + triangles + + + &About triangles + Sobre o triangles + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_pt_PT.qm b/src/qt/locale/triangles_pt_PT.qm similarity index 54% rename from src/qt/locale/bitcoin_pt_PT.qm rename to src/qt/locale/triangles_pt_PT.qm index ccff389..e955cb9 100644 Binary files a/src/qt/locale/bitcoin_pt_PT.qm and b/src/qt/locale/triangles_pt_PT.qm differ diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/triangles_pt_PT.ts similarity index 69% rename from src/qt/locale/bitcoin_pt_PT.ts rename to src/qt/locale/triangles_pt_PT.ts index d819e1e..bc741ba 100644 --- a/src/qt/locale/bitcoin_pt_PT.ts +++ b/src/qt/locale/triangles_pt_PT.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open Address Book - + - + Double-click to edit address or label Clique duas vezes para editar o endereço ou o rótulo - + Create a new address Criar um novo endereço @@ -57,52 +58,52 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open Copie o endereço selecionado para a área de transferência - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Copiar Endereço Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Apagar o endereço selecionado da lista - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + &Verificar Mensagem - + + These are your Triangles 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. + + + + &Delete E&liminar @@ -119,7 +120,7 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open Export Address Book Data - + @@ -129,18 +130,18 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Rótulo @@ -180,12 +181,12 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,431 +307,6 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open A frase de segurança da carteira foi alterada com êxito. - - BitcoinGUI - - - Sign &message... - Assinar &mensagem... - - - - Synchronizing with network... - Sincronizando com a rede... - - - - &Overview - Visã&o geral - - - - Show general overview of wallet - Mostrar visão geral da carteira - - - - &Transactions - &Transações - - - - Browse transaction history - Navegar pelo histórico de transações - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - Fec&har - - - - Quit application - Sair da aplicação - - - - Show information about buynowcoin - - - - - About &Qt - Sobre &Qt - - - - Show information about Qt - Mostrar informação sobre Qt - - - - &Options... - &Opções... - - - - &Encrypt Wallet... - E&ncriptar Carteira... - - - - &Backup Wallet... - &Guardar Carteira... - - - - &Change Passphrase... - Mudar &Palavra-passe... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Faça uma cópia de segurança da carteira para outra localização - - - - Change the passphrase used for wallet encryption - Mudar a frase de segurança utilizada na encriptação da carteira - - - - &Debug window - Janela de &depuração - - - - Open debugging and diagnostic console - Abrir consola de diagnóstico e depuração - - - - &Verify message... - &Verificar mensagem... - - - - buynowcoin - - - - - Wallet - Carteira - - - - &About buynowcoin - - - - - &Show / Hide - Mo&strar / Ocultar - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Ficheiro - - - - &Settings - Con&figurações - - - - &Help - A&juda - - - - Tabs toolbar - Barra de separadores - - - - Actions toolbar - - - - - - [testnet] - [rede de testes] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Atualizado - - - - Catching up... - Recuperando... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Transação enviada - - - - Incoming transaction - Transação recebida - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Data: %1 -Quantia: %2 -Tipo: %3 -Endereço: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - A carteira está <b>encriptada</b> e atualmente <b>desbloqueada</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - A carteira está <b>encriptada</b> e atualmente <b>bloqueada</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n hora%n horas - - - - %n day(s) - %n dia%n dias - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -744,7 +320,7 @@ Endereço: %4 Coin Control - + @@ -814,7 +390,7 @@ Endereço: %4 Label - + Rótulo @@ -935,7 +511,7 @@ Endereço: %4 DUST - + @@ -949,7 +525,7 @@ Endereço: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -958,7 +534,7 @@ Endereço: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -967,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1008,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1018,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Novo endereço de entrada - + New sending address Novo endereço de saída - + Edit receiving address Editar endereço de entrada - + Edit sending address Editar endereço de saída - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. O endereço introduzido "%1" já se encontra no livro de endereços. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Impossível desbloquear carteira. @@ -1065,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Utilização: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipo + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Rótulo + + + + To Address + + + + + From Address + + + + + Message + Mensagem + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copie o endereço selecionado para a área de transferência + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Apagar o endereço selecionado da lista + + + + &Delete + E&liminar + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1120,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1130,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1164,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1174,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1190,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1249,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1264,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1280,7 +1202,7 @@ This label turns red, if the priority is smaller than "medium". Display coin &control features (experts only!) - + @@ -1295,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1306,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1328,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". Formulário - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1351,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1369,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". O saldo minado ainda não maturou - + Total: Total: - + Your current total balance O seu saldo total actual - + <b>Recent transactions</b> <b>Transações recentes</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1405,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Quantia: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1512,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1542,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1566,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1581,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Limpar consola - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1616,6 +1566,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Enviar Moedas @@ -1640,7 +1591,7 @@ This label turns red, if the priority is smaller than "medium". Fundos insuficientes! - + Quantity: Quantidade: @@ -1648,7 +1599,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1665,8 +1616,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1676,7 +1627,7 @@ This label turns red, if the priority is smaller than "medium". medium - + médio @@ -1691,7 +1642,7 @@ This label turns red, if the priority is smaller than "medium". no - + não @@ -1701,15 +1652,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once Enviar para múltiplos destinatários de uma vez @@ -1721,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1735,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1749,9 +1700,9 @@ This label turns red, if the priority is smaller than "medium". &Enviar - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1796,7 +1747,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1806,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1841,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1861,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1869,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formulário @@ -1883,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Escreva um rótulo para este endereço para o adicionar ao seu livro de endereços + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: Rótu&lo: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1920,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Cole endereço da área de transferência + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Enviar para múltiplos destinatários de uma vez + + + + Add &Recipient + Adicionar &Destinatário + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + Confirme ação de envio + + + + S&end + &Enviar + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + O endereço de destino não é válido, por favor verifique. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Endereço duplicado encontrado, apenas poderá enviar uma vez para cada endereço por cada operação de envio. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulário + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Cole endereço da área de transferência + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Escreva um rótulo para este endereço para o adicionar ao seu livro de endereços + + + + &Label: + Rótu&lo: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1948,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1985,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Repôr todos os campos de assinatura de mensagem @@ -2012,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Repôr todos os campos de verificação de mensagem - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Clique "Assinar mensagem" para gerar a assinatura + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2118,12 +2299,15 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + @@ -2148,7 +2332,10 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , transmitida através de %n nó, transmitida através de %n nós + + , transmitida através de %n nó + , transmitida através de %n nós + @@ -2194,14 +2381,17 @@ This label turns red, if the priority is smaller than "medium". - + Credit Crédito - + matures in %n more block(s) - matura daqui por %n blocomatura daqui por %n blocos + + matura daqui por %n bloco + matura daqui por %n blocos + @@ -2212,12 +2402,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Débito - + Transaction fee Taxa de transação @@ -2237,14 +2427,14 @@ This label turns red, if the priority is smaller than "medium". Comentário - + Transaction ID ID da Transação - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2277,7 +2467,7 @@ This label turns red, if the priority is smaller than "medium". falso - + , has not been successfully broadcast yet , ainda não foi transmitida com sucesso @@ -2303,7 +2493,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Data @@ -2335,32 +2525,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Aberta por mais %n blocoAberta por mais %n blocos + + Aberta por mais %n bloco + Aberta por mais %n blocos + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2403,7 +2601,7 @@ This label turns red, if the priority is smaller than "medium". (n/d) - + Transaction status. Hover over this field to show number of confirmations. Estado da transação. Pairar por cima deste campo para mostrar o número de confirmações. @@ -2534,7 +2732,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2579,12 +2777,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2598,32 +2796,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Utilização: - - Send command to -server or buynowcoind - - - - + List commands Listar comandos @@ -2638,17 +2818,7 @@ This label turns red, if the priority is smaller than "medium". Opções: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) Especifique ficheiro de carteira (dentro da pasta de dados) @@ -2665,12 +2835,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2690,12 +2860,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2715,22 +2885,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2740,22 +2910,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2780,12 +2950,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2793,12 +2963,7 @@ This label turns red, if the priority is smaller than "medium". Atenção: -paytxfee está definida com um valor muito alto! Esta é a taxa que irá pagar se enviar uma transação. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Atenção: erro ao ler wallet.dat! Todas as chaves foram lidas correctamente, mas dados de transação ou do livro de endereços podem estar em falta ou incorrectos. @@ -2835,22 +3000,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2870,27 +3035,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Opções SSL: (ver a Wiki Bitcoin para instruções de configuração SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Opções SSL: (ver a Wiki Triangles para instruções de configuração SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2900,12 +3065,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2926,7 +3091,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2941,7 +3106,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2951,17 +3116,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2979,34 +3154,39 @@ This label turns red, if the priority is smaller than "medium". Palavra-passe para ligações JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3031,17 +3211,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3061,17 +3241,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3091,17 +3271,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3111,27 +3291,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Incapaz de vincular a %s neste computador (vínculo retornou erro %d, %s) Connect through socks proxy - + @@ -3146,7 +3316,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3154,17 +3324,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Erro ao carregar wallet.dat: Carteira danificada - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Erro ao carregar wallet.dat @@ -3201,12 +3361,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3224,39 +3384,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Carregar índice de blocos... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Adicione um nó ao qual se ligar e tentar manter a ligação aberta - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Carregar carteira... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Impossível mudar a carteira para uma versão anterior Cannot initialize keypool - + @@ -3293,4 +3483,486 @@ If the file does not exist, create it with owner-readable-only file permissions. Se o ficheiro não existir, crie-o com permissões de leitura apenas para o dono. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Carteira + + + + &Overview + Visã&o geral + + + + Show general overview of wallet + Mostrar visão geral da carteira + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transações + + + + Browse transaction history + Navegar pelo histórico de transações + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + Fec&har + + + + Quit application + Sair da aplicação + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Sobre &Qt + + + + Show information about Qt + Mostrar informação sobre Qt + + + + &Options... + &Opções... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + Mo&strar / Ocultar + + + + &Encrypt Wallet... + E&ncriptar Carteira... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Guardar Carteira... + + + + Backup wallet to another location + Faça uma cópia de segurança da carteira para outra localização + + + + &Change Passphrase... + Mudar &Palavra-passe... + + + + Change the passphrase used for wallet encryption + Mudar a frase de segurança utilizada na encriptação da carteira + + + + &Unlock Wallet... + + + + + Unlock wallet + Desbloquear carteira + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + Assinar &mensagem... + + + + &Verify message... + &Verificar mensagem... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + Janela de &depuração + + + + Open debugging and diagnostic console + Abrir consola de diagnóstico e depuração + + + + &File + &Ficheiro + + + + &Settings + Con&figurações + + + + &Help + A&juda + + + + Tabs toolbar + Barra de separadores + + + + Actions toolbar + + + + + + [testnet] + [rede de testes] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Sincronizando com a rede... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + Atualizado + + + + Catching up... + Recuperando... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Transação enviada + + + + Incoming transaction + Transação recebida + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Data: %1 +Quantia: %2 +Tipo: %3 +Endereço: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + A carteira está <b>encriptada</b> e atualmente <b>desbloqueada</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + A carteira está <b>encriptada</b> e atualmente <b>bloqueada</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + %n hora + %n horas + + + + + %n day(s) + + %n dia + %n dias + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_ro_RO.qm b/src/qt/locale/triangles_ro_RO.qm new file mode 100644 index 0000000..fa2b43f Binary files /dev/null and b/src/qt/locale/triangles_ro_RO.qm differ diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/triangles_ro_RO.ts similarity index 67% rename from src/qt/locale/bitcoin_ro_RO.ts rename to src/qt/locale/triangles_ro_RO.ts index 95e1010..82e4d1d 100644 --- a/src/qt/locale/bitcoin_ro_RO.ts +++ b/src/qt/locale/triangles_ro_RO.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin - Despre buynowcoin + About Triangles + Despre triangles + + + <b>triangles</b> version + Versiune <b>triangles</b> + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers - <b>buynowcoin</b> version - Versiune <b>buynowcoin</b> + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers +Copyright © 2014 Triangles team + - + This is experimental software. @@ -44,12 +55,17 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f Agendă - + + These are your Triangles 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. + + + + Double-click to edit address or label Dublu-click pentru a edita adresa sau eticheta - + Create a new address Creează o adresă nouă @@ -59,17 +75,21 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f Copiază adresa selectată în clipboard - + + Sign a message to prove you own a TRI address + + + + &New Address Adresă nouă - - These are your buynowcoin 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. - Acestea sunt adresele buynowcoin pentru a primi plăți. Poate doriți sa dați o adresa noua fiecarui expeditor pentru a putea ține evidența la cine efectuează plăti. + These are your triangles 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. + Acestea sunt adresele triangles pentru a primi plăți. Poate doriți sa dați o adresa noua fiecarui expeditor pentru a putea ține evidența la cine efectuează plăti. - + &Copy Address &Copiază adresa @@ -79,27 +99,30 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f Arată cod &QR - - Sign a message to prove you own a buynowcoin address - Semnează un mesaj pentru a dovedi că dețineti o adresă buynowcoin + Sign a message to prove you own a triangles address + Semnează un mesaj pentru a dovedi că dețineti o adresă triangles - + Sign &Message Semnează &Mesajul - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Sterge adresele curent selectate din lista - - Verify a message to ensure it was signed with a specified buynowcoin address - Verifică un mesaj pentru a vă asigura că a fost semnat cu o anumită adresă buynowcoin + Verify a message to ensure it was signed with a specified triangles address + Verifică un mesaj pentru a vă asigura că a fost semnat cu o anumită adresă triangles - + &Verify Message &Verifică mesajul @@ -142,7 +165,7 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f AddressTableModel - + Label Etichetă @@ -245,7 +268,12 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f Sunteţi sigur că doriţi să criptaţi portofelul electronic? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. IMPORTANT: Orice copie de siguranta facuta in prealabil portofelului dumneavoastra ar trebui inlocuita cu cea generata cel mai recent fisier criptat al portofelului. Pentru siguranta, copiile de siguranta vechi ale portofelului ne-criptat vor deveni inutile de indata ce veti incepe folosirea noului fisier criptat al portofelului. @@ -262,12 +290,11 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f Portofel criptat - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin se va inchide pentru a termina procesul de encriptie. Amintiți-vă, criptarea portofelul dumneavoastră nu poate proteja pe deplin monedele dvs. de a fi furate de infectarea cu malware a computerului. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles se va inchide pentru a termina procesul de encriptie. Amintiți-vă, criptarea portofelul dumneavoastră nu poate proteja pe deplin monedele dvs. de a fi furate de infectarea cu malware a computerului. - + @@ -308,431 +335,6 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f Parola portofelului electronic a fost schimbată. - - BitcoinGUI - - - Sign &message... - Semnează &mesaj... - - - - Synchronizing with network... - Se sincronizează cu rețeaua... - - - - &Overview - &Imagine de ansamblu - - - - Show general overview of wallet - Arată o stare generală de ansamblu a portofelului - - - - &Transactions - &Tranzacții - - - - Browse transaction history - Răsfoiește istoricul tranzacțiilor - - - - &Address Book - Agendă - - - - Edit the list of stored addresses and labels - Editează lista de adrese si etichete stocate - - - - &Receive coins - Primește monede - - - - Show the list of addresses for receiving payments - Arată lista de adrese pentru primire plăți - - - - &Send coins - &Trimite monede - - - - E&xit - &Ieșire - - - - Quit application - Închide aplicația - - - - Show information about buynowcoin - Arată informații despre buynowcoin - - - - About &Qt - Despre &Qt - - - - Show information about Qt - Arată informații despre Qt - - - - &Options... - &Setări... - - - - &Encrypt Wallet... - Criptează portofelul electronic... - - - - &Backup Wallet... - &Fă o copie de siguranță a portofelului... - - - - &Change Passphrase... - S&chimbă parola... - - - - ~%n block(s) remaining - ~%n bloc rămas~%n blocuri rămase~%n blocuri rămase - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Descărcat %1 din %2 blocuri din istoricul tranzacțiilor(%3% terminat). - - - - &Export... - &Exportă - - - - Send coins to a buynowcoin address - Trimite monede către o adresă buynowcoin - - - - Modify configuration options for buynowcoin - Modifică opțiuni de configurare pentru buynowcoin - - - - Export the data in the current tab to a file - Exportă datele din tab-ul curent într-un fișier - - - - Encrypt or decrypt wallet - Criptează sau decriptează portofelul - - - - Backup wallet to another location - Creează o copie de rezervă a portofelului într-o locație diferită - - - - Change the passphrase used for wallet encryption - Schimbă fraza de acces folosită pentru criptarea portofelului - - - - &Debug window - Fereastră &debug - - - - Open debugging and diagnostic console - Deschide consola de debug și diagnosticare - - - - &Verify message... - &Verifică mesajul... - - - - buynowcoin - buynowcoin - - - - Wallet - Portofelul - - - - &About buynowcoin - Despre buynowcoin - - - - &Show / Hide - Arata/Ascunde - - - - Unlock wallet - Deblochează portofelul - - - - &Lock Wallet - Blochează portofelul - - - - Lock wallet - Blochează portofelul - - - - &File - &Fișier - - - - &Settings - &Setări - - - - &Help - A&jutor - - - - Tabs toolbar - Bara de file - - - - Actions toolbar - Bara de instrumente Actiuni - - - - - [testnet] - [testnet] - - - - - buynowcoin client - Clientul buynowcoin - - - - %n active connection(s) to buynowcoin network - %n conexiune activă la reteaua buynowcoin%n conexiuni active la reteaua buynowcoin%n conexiuni active la reteaua buynowcoin - - - - Downloaded %1 blocks of transaction history. - Descărcat %1 blocuri din istoricul tranzacțiilor. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Staking. <br>Greutatea este %1<br>Greutatea retelei este %2<br>Timp estimat pentru a castiga recompensa este %3 - - - - Not staking because wallet is locked - Nu este in modul stake deoarece portofelul este blocat - - - - Not staking because wallet is offline - Nu este in modul stake deoarece portofelul este offline - - - - Not staking because wallet is syncing - Nu este in modul stake deoarece portofelul se sincronizeaza - - - - Not staking because you don't have mature coins - Nu este in modul stake deoarece nu sunt destule monede maturate - - - - %n second(s) ago - %n secundă în urmă%n secunde în urmă%n secunde în urmă - - - - About buynowcoin card - Despre cardul buynowcoin - - - - Show information about buynowcoin card - Arată informații despre card buynowcoin - - - - &Unlock Wallet... - &Deblochează portofelul - - - - %n minute(s) ago - %n minut în urmă%n minute în urmă%n minute în urmă - - - - %n hour(s) ago - %n oră în urmă%n ore în urmă%n ore în urmă - - - - %n day(s) ago - %n zi în urmă%n zile în urmă%n zile în urmă - - - - Up to date - Actualizat - - - - Catching up... - Se actualizează... - - - - Last received block was generated %1. - Ultimul bloc primit a fost generat %1. - - - - 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? - Această tranzactie este peste limita admisa. Puteți sa trimiteți pentru o taxa de 1%, care este pentru nodurile care proceseaza tranzactia si ajuta la sprijinirea retelei. Vrei să plătești taxa? - - - - Confirm transaction fee - Confirmă comisinoul tranzacției - - - - Sent transaction - Tranzacție expediată - - - - Incoming transaction - Tranzacție recepționată - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Data: %1 -Suma: %2 -Tipul: %3 -Adresa: %4 - - - - - - URI handling - Manipulare URI - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URI nu poate fi parsatt! Cauza poate fi o adresa buynowcoin invalidă sau parametrii URI malformați. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Portofelul este <b>criptat</b> iar în momentul de față este <b>deblocat</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Portofelul este <b>criptat</b> iar în momentul de față este <b>blocat</b> - - - - Backup Wallet - Fă o copie de siguranță a portofelului - - - - Wallet Data (*.dat) - Date portofel(*.dat) - - - - Backup Failed - Copia de rezerva a esuat - - - - There was an error trying to save the wallet data to the new location. - Eroare la încercarea de a salva datele portofelului în noua locaţie. - - - - %n second(s) - %n secundă%n secunde%n secunde - - - - %n minute(s) - %n minut%n minute%n minute - - - - %n hour(s) - %n oră%n ore%n ore - - - - %n day(s) - %n zi%n zile%n zile - - - - Not staking - Not staking - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - A apărut o eroare fatală. buynowcoin nu mai poate continua în condiții de siguranță și va iesi. - - ClientModel @@ -1037,37 +639,46 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Adresa asociată cu această intrare în agendă. Acest lucru poate fi modificat numai pentru adresele de trimitere. - + + &Stealth Address + + + + New receiving address Noua adresă de primire - + New sending address Noua adresă de trimitere - + Edit receiving address Editează adresa de primire - + Edit sending address Editează adresa de trimitere - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Adresa introdusă "%1" se află deja în lista de adrese. - - The entered address "%1" is not a valid buynowcoin address. - Adresa introdusă "%1" nu este o adresă buynowcoin validă + The entered address "%1" is not a valid triangles address. + Adresa introdusă "%1" nu este o adresă triangles validă - + Could not unlock wallet. Portofelul nu a putut fi deblocat. @@ -1080,18 +691,22 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version versiune - + + + Triangles-Qt + + + + Usage: Utilizare: @@ -1121,6 +736,347 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Afișează ecran splash la pornire (implicit: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tipul + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etichetă + + + + To Address + + + + + From Address + + + + + Message + Mesaj + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (fără etichetă) + + + + MessagePage + + + Address Book + Agendă + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Copiază adresa selectată în clipboard + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Sterge adresele curent selectate din lista + + + + &Delete + Ște&rge + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + Eroare la exportare + + + + Could not write to file %1. + Nu s-a putut scrie în fișier %1. + + OptionsDialog @@ -1154,17 +1110,15 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Rezervă - - Automatically start buynowcoin after logging in to the system. - Pornește buynowcoin imdiat după logarea în sistem + Automatically start triangles after logging in to the system. + Pornește triangles imdiat după logarea în sistem - - &Start buynowcoin on system login - $Pornește buynowcoin la logarea în sistem + &Start triangles on system login + $Pornește triangles la logarea în sistem - + 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. Detașați bloc și baze de date de adrese la închidere. Acest lucru înseamnă că pot fi mutate într-u alt director de date, dar incetineste închiderea. Portofelul este întotdeauna detașat. @@ -1179,19 +1133,37 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară &Retea - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Deschide automat portul pentru cientul buynowcoin pe router. Aces lucru este posibil doara daca routerul suporta UPnP si este activat + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Deschide automat portul pentru cientul triangles pe router. Aces lucru este posibil doara daca routerul suporta UPnP si este activat - + Map port using &UPnP Mapeaza portul folosind &UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Conecteaza la reteaua buynowcoin prinr-un proxy SOCKS(ex. cand te conectezi prin Tor) + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Conecteaza la reteaua triangles prinr-un proxy SOCKS(ex. cand te conectezi prin Tor) + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1265,26 +1237,34 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - Limba interfeței utilizator poate fi setat aici. Această setare va avea efect după repornirea buynowcoin. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + Limba interfeței utilizator poate fi setat aici. Această setare va avea efect după repornirea triangles. + + + &Unit to show amounts in: &Unitatea de măsură pentru afişarea sumelor: Choose the default subdivision unit to show in the interface and when sending coins. - Alege subdiviziunea folosită la afişarea interfeţei şi la trimiterea de bitcoin. + Alege subdiviziunea folosită la afişarea interfeţei şi la trimiterea de triangles. - - Whether to show buynowcoin addresses in the transaction list or not. - Dacă să arate adrese buynowcoin din lista de tranzacție sau nu. + Whether to show triangles addresses in the transaction list or not. + Dacă să arate adrese triangles din lista de tranzacție sau nu. - + &Display addresses in transaction list &Afişează adresele în lista de tranzacţii @@ -1327,13 +1307,17 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - This setting will take effect after restarting buynowcoin. - Aceasta setare va avea efect dupa repornirea buynowcoin. + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Aceasta setare va avea efect dupa repornirea triangles. The supplied proxy address is invalid. - Adresa bitcoin pe care a-ti specificat-o este invalida + Adresa triangles pe care a-ti specificat-o este invalida @@ -1344,13 +1328,11 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Form - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - Informatia afisata poate fi depasita. Portofel se sincronizează automat cu rețeaua buynowcoin după ce se stabilește o conexiune, dar acest proces nu s-a finalizat încă. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + Informatia afisata poate fi depasita. Portofel se sincronizează automat cu rețeaua triangles după ce se stabilește o conexiune, dar acest proces nu s-a finalizat încă. - + Stake: Stake: @@ -1385,27 +1367,61 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Balanta minata care nu s-a maturizat inca - + Total: Total: - + Your current total balance Balanța totală curentă - + <b>Recent transactions</b> <b>Tranzacții recente</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Total al tranzacțiilor care nu au fost confirmate încă și nu contează față de balanța curentă - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Totalul de monede care au fost in stake si nu sunt numarate in balanta curenta @@ -1506,7 +1522,17 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară &Informație - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Foloseste versiunea OpenSSL @@ -1551,7 +1577,17 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Data ultimului bloc - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Deschide @@ -1561,12 +1597,11 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Optiuni linii de comandă - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Afișa mesajul de ajutor buynowcoin-Qt pentru a obține o listă cu posibile opțiuni de linie de comandă buynowcoin. + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Afișa mesajul de ajutor triangles-Qt pentru a obține o listă cu posibile opțiuni de linie de comandă triangles. - + &Show &Arată @@ -1581,34 +1616,35 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Construit la data - - buynowcoin - Debug window - buynowcoin - fereastră depanare + triangles - Debug window + triangles - fereastră depanare - - buynowcoin Core - buynowcoin Core + triangles Core + triangles Core - + Debug log file Loguri debug - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Deschideti fisierul de depanare buynowcoin din folderul curent. Acest lucru poate dura cateva secunde pentru fisiere de log mari. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Deschideti fisierul de depanare triangles din folderul curent. Acest lucru poate dura cateva secunde pentru fisiere de log mari. - + Clear console Curăță consola + + Welcome to the triangles RPC console. + Bine ati venit la consola triangles RPC. + - Welcome to the buynowcoin RPC console. - Bine ati venit la consola buynowcoin RPC. + Welcome to the Triangles RPC console. + @@ -1632,6 +1668,7 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară + Send Coins Trimite monede @@ -1656,7 +1693,7 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Fonduri insuficiente! - + Quantity: Cantitate: @@ -1676,13 +1713,17 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Amount: Sumă: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1725,7 +1766,7 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară personalizează schimbarea adresei - + Send to multiple recipients at once Trimite simultan către mai mulți destinatari @@ -1751,8 +1792,12 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1765,9 +1810,13 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară &S Trimite - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Introduceți o adresă buynowcoin(ex:Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Introduceți o adresă triangles(ex:TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1864,10 +1913,19 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară 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. Eroare: tranzacția a fost respinsă. Acest lucru s-ar putea întâmpla în cazul în care unele dintre monedele din portofel au fost deja cheltuite, cum si cum ați utilizat o copie a wallet.dat și monedele au fost cheltuite în copie dar nu au fost marcate ca și cheltuite aici. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - Atenție: Adresă buynowcoin invalidă + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + Atenție: Adresă triangles invalidă @@ -1899,19 +1957,29 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - + Enter a label for this address to add it to your address book Introdu o etichetă pentru această adresă pentru a fi adăugată în lista ta de adrese + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etichetă: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adresa catre care trimiteti plata(ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adresa catre care trimiteti plata(ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1938,10 +2006,225 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Remove this recipient Scoateti acest destinatar + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Introduceți o adresă triangles(ex:TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Introduceți o adresă buynowcoin(ex:Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Alegeti adresa din agenda + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Trimite simultan către mai mulți destinatari + + + + Add &Recipient + &Adaugă destinatar + + + + Remove all transaction fields + Scoateți toate câmpuirile de tranzacții + + + + Clear &All + + + + + Confirm the send action + Confirmă operațiunea de trimitere + + + + S&end + &S Trimite + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Sunteți sigur că doriți să trimiteți %1? + + + + and + și + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Adresa destinatarului nu este validă, vă rugăm să o verificaţi. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + S-a descoperit o adresă care figurează de două ori. Expedierea se poate realiza către fiecare adresă doar o singură dată pe operațiune. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Alegeti adresa din agenda + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + Scoateti acest destinatar + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Introdu o etichetă pentru această adresă pentru a fi adăugată în lista ta de adrese + + + + &Label: + &Etichetă: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1964,8 +2247,8 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adresa cu care semnati mesajul(ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adresa cu care semnati mesajul(ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -2001,11 +2284,20 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - Sign the message to prove you own this buynowcoin address - Semnează un mesaj pentru a dovedi că dețineti o adresă buynowcoin + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Semnează un mesaj pentru a dovedi că dețineti o adresă triangles + + + Reset all sign message fields Reseteaza toate spatiile mesajelor semnate. @@ -2028,34 +2320,45 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adresa cu care a fost semnat mesajul(ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adresa cu care a fost semnat mesajul(ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Verifică un mesaj pentru a vă asigura că a fost semnat cu o anumită adresă buynowcoin + Verify the message to ensure it was signed with the specified triangles address + Verifică un mesaj pentru a vă asigura că a fost semnat cu o anumită adresă triangles - + Reset all verify message fields Reseteaza toate spatiile mesajelor semnate. - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Introduceți o adresă buynowcoin(ex:Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Introduceți o adresă triangles(ex:TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Click "Semneaza msajul" pentru a genera semnatura + + Enter triangles signature + Introduceti semnatura triangles + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Introduceti semnatura buynowcoin + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2134,7 +2437,11 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Open for %n block(s) - Deschde pentru încă %1 blocDeschde pentru încă %1 blocuriDeschde pentru încă %1 blocuri + + Deschde pentru încă %1 bloc + Deschde pentru încă %1 blocuri + Deschde pentru încă %1 blocuri + @@ -2164,7 +2471,11 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară , broadcast through %n node(s) - , distribuit prin %n nod, distribuit prin %n noduri, distribuit prin %n de noduri + + , distribuit prin %n nod + , distribuit prin %n noduri + , distribuit prin %n de noduri + @@ -2210,14 +2521,18 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - + Credit Credit - + matures in %n more block(s) - se maturizează în încă %n blocse maturizează în încă %n blocurise maturizează în încă %n de blocuri + + se maturizează în încă %n bloc + se maturizează în încă %n blocuri + se maturizează în încă %n de blocuri + @@ -2228,12 +2543,12 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - + Debit Debit - + Transaction fee Comisionul tranzacţiei @@ -2253,14 +2568,18 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Comentarii - + Transaction ID ID-ul tranzactiei + Generated coins must mature 60 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. + Monedele generate trebuie să se maturizeze 510 blocuri înainte de a fi cheltuite. Când ați generat acest bloc, a fost trimis la rețea pentru a fi adăugat la lanțul de blocuri. În cazul în care nu reușește să intre în lanț, starea sa se ​​va schimba in "nu a fost acceptat", și nu va putea fi cheltuit. Acest lucru se poate întâmpla din când în când, dacă un alt nod generează un bloc cu câteva secunde inaintea blocului tau. {60 ?} + + Generated coins must mature 510 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. - Monedele generate trebuie să se maturizeze 510 blocuri înainte de a fi cheltuite. Când ați generat acest bloc, a fost trimis la rețea pentru a fi adăugat la lanțul de blocuri. În cazul în care nu reușește să intre în lanț, starea sa se ​​va schimba in "nu a fost acceptat", și nu va putea fi cheltuit. Acest lucru se poate întâmpla din când în când, dacă un alt nod generează un bloc cu câteva secunde inaintea blocului tau. + Monedele generate trebuie să se maturizeze 510 blocuri înainte de a fi cheltuite. Când ați generat acest bloc, a fost trimis la rețea pentru a fi adăugat la lanțul de blocuri. În cazul în care nu reușește să intre în lanț, starea sa se ​​va schimba in "nu a fost acceptat", și nu va putea fi cheltuit. Acest lucru se poate întâmpla din când în când, dacă un alt nod generează un bloc cu câteva secunde inaintea blocului tau. @@ -2293,7 +2612,7 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Fals! - + , has not been successfully broadcast yet , nu s-a propagat încă @@ -2319,7 +2638,7 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară TransactionTableModel - + Date Data @@ -2351,10 +2670,19 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Open for %n more block(s) - Deschis pentru încă %1 blocDeschis pentru încă %1 blocuriDeschis pentru încă %1 de blocuri + + Deschis pentru încă %1 bloc + Deschis pentru încă %1 blocuri + Deschis pentru încă %1 de blocuri + - + + Narration + + + + Offline Deconectat @@ -2419,7 +2747,7 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară (n/a) - + Transaction status. Hover over this field to show number of confirmations. Starea tranzacției. Treci cu mausul peste acest câmp pentru afișarea numărului de confirmări. @@ -2614,29 +2942,20 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - WalletModel + Triangles-core - - Sending... - Se trimite... - - - - bitcoin-core - - - buynowcoin version - Versiune buynowcoin + triangles version + Versiune triangles - + Usage: Uz: - Send command to -server or buynowcoind - Trimite comanda catre server sau buynowcoind + Send command to -server or trianglesd + Trimite comanda catre server sau trianglesd @@ -2655,13 +2974,13 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - Specify configuration file (default: buynowcoin.conf) - Specifica fisier de configurare(implicit: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Specifica fisier de configurare(implicit: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Speficica fisier pid(implicit: buynowcoin.pid) + Specify pid file (default: trianglesd.pid) + Speficica fisier pid(implicit: triangles.pid) @@ -2674,7 +2993,22 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Specifică dosarul de date - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Setează mărimea cache a bazei de date în megabiți (implicit: 25) @@ -2809,12 +3143,11 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Atentie: setarea -paytxfee este foarte ridicata! Aceasta este taxa tranzactiei pe care o vei plati daca trimiti o tranzactie. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Atentie: Va rugam verificati ca timpul si data calculatorului sunt corete. Daca timpul este gresit buynowcoin nu va functiona corect. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Atentie: Va rugam verificati ca timpul si data calculatorului sunt corete. Daca timpul este gresit triangles nu va functiona corect. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Atentie: eroare la citirea fisierului wallet.dat! Toate cheile sunt citite corect, dar datele tranzactiei sau anumite intrari din agenda sunt incorecte sau lipsesc. @@ -2900,8 +3233,8 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Optiuni SSl (vezi Bitcoin wiki pentru intructiunile de instalare) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Optiuni SSl (vezi Triangles wiki pentru intructiunile de instalare) @@ -2961,17 +3294,52 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Utilizati proxy pentru a ajunge la serviciile tor (implicit: la fel ca proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Utilizator pentru conexiunile JSON-RPC - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Se verifica integritatea bazei de date... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! ATENTIONARE: s-a detectat o violare a checkpoint-ului sincronizat, dar s-a ignorat! @@ -2996,30 +3364,29 @@ Acest lucru înseamnă că o taxă de cel puțin %2 este necesară Parola pentru conexiunile JSON-RPC - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, trebuie să configurați o parolă rpc în fișierul de configurare: %s -Este recomandat să folosiți următoarea parolă generată aleator: rpcuser=buynowcoinrpc + %s, trebuie să configurați o parolă rpc în fișierul de configurare: %s +Este recomandat să folosiți următoarea parolă generată aleator: rpcuser=trianglesrpc rpcpassword=%s (nu trebuie să țineți minte această parolă) Username-ul și parola NU TREBUIE să fie aceleași. Dacă fișierul nu există, creați-l cu drepturi de citire doar de către deținător. Este deasemenea recomandat să setați alertnotify pentru a fi notificat de probleme; -de exemplu: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +de exemplu: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - + Find peers using internet relay chat (default: 0) Gaseste noduri fosoling irc (implicit: 1) {0)?} @@ -3139,17 +3506,15 @@ de exemplu: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@fo Portofelul %s este in afara directorului %s - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Nu se poate obtine un lock pe directorul de date &s. Blackoin probabil ruleaza deja. + Cannot obtain a lock on data directory %s. triangles is probably already running. + Nu se poate obtine un lock pe directorul de date &s. Blackoin probabil ruleaza deja. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Nu se poate folosi %s pe acest calculator (eroarea returnată este %d, %s) @@ -3179,17 +3544,15 @@ de exemplu: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@fo Eroare la încărcarea wallet.dat: Portofel corupt - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Eroare la încărcarea wallet.dat: Portofelul necesita o versiune mai noua de buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Eroare la încărcarea wallet.dat: Portofelul necesita o versiune mai noua de triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - A fost nevoie de rescrierea portofelului: restartați buynowcoin pentru a finaliza + Wallet needed to be rewritten: restart triangles to complete + A fost nevoie de rescrierea portofelului: restartați triangles pentru a finaliza - + Error loading wallet.dat Eroare la încărcarea wallet.dat @@ -3254,12 +3617,11 @@ de exemplu: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@fo Adaugă un nod la care te poți conecta pentru a menține conexiunea deschisă - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Imposibil de conectat %s pe acest computer. Cel mai probabil buynowcoin ruleaza + Unable to bind to %s on this computer. triangles is probably already running. + Imposibil de conectat %s pe acest computer. Cel mai probabil triangles ruleaza - + Fee per KB to add to transactions you send Comision pe kB de adaugat la tranzactiile pe care le trimiti @@ -3318,4 +3680,544 @@ If the file does not exist, create it with owner-readable-only file permissions. Dacă fișierul nu există, creează-l cu permisiuni de citire doar de către proprietar. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Portofelul + + + + &Overview + &Imagine de ansamblu + + + + Show general overview of wallet + Arată o stare generală de ansamblu a portofelului + + + + &Send coins + &Trimite monede + + + + Send coins to a TRI address + + + + + &Receive coins + Primește monede + + + + Show the list of addresses for receiving payments + Arată lista de adrese pentru primire plăți + + + + &Transactions + &Tranzacții + + + + Browse transaction history + Răsfoiește istoricul tranzacțiilor + + + + &Address Book + Agendă + + + + Edit the list of stored addresses and labels + Editează lista de adrese si etichete stocate + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Ieșire + + + + Quit application + Închide aplicația + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Despre &Qt + + + + Show information about Qt + Arată informații despre Qt + + + + &Options... + &Setări... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + Arata/Ascunde + + + + &Encrypt Wallet... + Criptează portofelul electronic... + + + + Encrypt or decrypt wallet + Criptează sau decriptează portofelul + + + + &Backup Wallet... + &Fă o copie de siguranță a portofelului... + + + + Backup wallet to another location + Creează o copie de rezervă a portofelului într-o locație diferită + + + + &Change Passphrase... + S&chimbă parola... + + + + Change the passphrase used for wallet encryption + Schimbă fraza de acces folosită pentru criptarea portofelului + + + + &Unlock Wallet... + &Deblochează portofelul + + + + Unlock wallet + Deblochează portofelul + + + + &Lock Wallet + Blochează portofelul + + + + Lock wallet + Blochează portofelul + + + + Sign &message... + Semnează &mesaj... + + + + &Verify message... + &Verifică mesajul... + + + + &Export... + &Exportă + + + + Export the data in the current tab to a file + Exportă datele din tab-ul curent într-un fișier + + + + &Debug window + Fereastră &debug + + + + Open debugging and diagnostic console + Deschide consola de debug și diagnosticare + + + + &File + &Fișier + + + + &Settings + &Setări + + + + &Help + A&jutor + + + + Tabs toolbar + Bara de file + + + + Actions toolbar + Bara de instrumente Actiuni + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Se sincronizează cu rețeaua... + + + + ~%n block(s) remaining + + ~%n bloc rămas + ~%n blocuri rămase + ~%n blocuri rămase + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Descărcat %1 din %2 blocuri din istoricul tranzacțiilor(%3% terminat). + + + + Downloaded %1 blocks of transaction history. + Descărcat %1 blocuri din istoricul tranzacțiilor. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + %n secundă în urmă + %n secunde în urmă + %n secunde în urmă + + + + + %n minute(s) ago + + %n minut în urmă + %n minute în urmă + %n minute în urmă + + + + + %n hour(s) ago + + %n oră în urmă + %n ore în urmă + %n ore în urmă + + + + + %n day(s) ago + + %n zi în urmă + %n zile în urmă + %n zile în urmă + + + + + Up to date + Actualizat + + + + Catching up... + Se actualizează... + + + + Last received block was generated %1. + Ultimul bloc primit a fost generat %1. + + + + 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? + Această tranzactie este peste limita admisa. Puteți sa trimiteți pentru o taxa de 1%, care este pentru nodurile care proceseaza tranzactia si ajuta la sprijinirea retelei. Vrei să plătești taxa? + + + + Confirm transaction fee + Confirmă comisinoul tranzacției + + + + Sent transaction + Tranzacție expediată + + + + Incoming transaction + Tranzacție recepționată + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Data: %1 +Suma: %2 +Tipul: %3 +Adresa: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + Manipulare URI + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Portofelul este <b>criptat</b> iar în momentul de față este <b>deblocat</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Portofelul este <b>criptat</b> iar în momentul de față este <b>blocat</b> + + + + Backup Wallet + Fă o copie de siguranță a portofelului + + + + Wallet Data (*.dat) + Date portofel(*.dat) + + + + Backup Failed + Copia de rezerva a esuat + + + + There was an error trying to save the wallet data to the new location. + Eroare la încercarea de a salva datele portofelului în noua locaţie. + + + + %n second(s) + + %n secundă + %n secunde + %n secunde + + + + + %n minute(s) + + %n minut + %n minute + %n minute + + + + + %n hour(s) + + %n oră + %n ore + %n ore + + + + + %n day(s) + + %n zi + %n zile + %n zile + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Staking. <br>Greutatea este %1<br>Greutatea retelei este %2<br>Timp estimat pentru a castiga recompensa este %3 + + + + Not staking because wallet is locked + Nu este in modul stake deoarece portofelul este blocat + + + + Not staking because wallet is offline + Nu este in modul stake deoarece portofelul este offline + + + + Not staking because wallet is syncing + Nu este in modul stake deoarece portofelul se sincronizeaza + + + + Not staking because you don't have mature coins + Nu este in modul stake deoarece nu sunt destule monede maturate + + + + Not staking + Not staking + + + Show information about triangles + Arată informații despre triangles + + + Send coins to a triangles address + Trimite monede către o adresă triangles + + + Modify configuration options for triangles + Modifică opțiuni de configurare pentru triangles + + + triangles + triangles + + + &About triangles + Despre triangles + + + triangles client + Clientul triangles + + + %n active connection(s) to triangles network + + %n conexiune activă la reteaua triangles + %n conexiuni active la reteaua triangles + %n conexiuni active la reteaua triangles + + + + About triangles card + Despre cardul triangles + + + Show information about triangles card + Arată informații despre card triangles + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URI nu poate fi parsatt! Cauza poate fi o adresa triangles invalidă sau parametrii URI malformați. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + A apărut o eroare fatală. triangles nu mai poate continua în condiții de siguranță și va iesi. + + + + WalletModel + + + Sending... + Se trimite... + + + diff --git a/src/qt/locale/triangles_ru.qm b/src/qt/locale/triangles_ru.qm new file mode 100644 index 0000000..9dec96f Binary files /dev/null and b/src/qt/locale/triangles_ru.qm differ diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/triangles_ru.ts similarity index 67% rename from src/qt/locale/bitcoin_ru.ts rename to src/qt/locale/triangles_ru.ts index c24ff6b..b179544 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/triangles_ru.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin - О buynowcoin + About Triangles + О triangles + + + <b>triangles</b> version + <b>triangles</b> версия + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + Все права защищены © 2009-2014 Разработчики Triangles +Все права защищены © 2012-2014 Разработчики Triangles +Все права защищены © 2014 Разработчики triangles - <b>buynowcoin</b> version - <b>buynowcoin</b> версия + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - Все права защищены © 2009-2014 Разработчики Bitcoin -Все права защищены © 2012-2014 Разработчики NovaCoin -Все права защищены © 2014 Разработчики buynowcoin +Copyright © 2014 Triangles team + - + This is experimental software. @@ -44,12 +55,17 @@ This product includes software developed by the OpenSSL Project for use in the O Адресная книга - + + These are your Triangles 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. + + + + Double-click to edit address or label Для того, чтобы изменить адрес или метку давжды кликните по изменяемому объекту - + Create a new address Создать новый адрес @@ -59,17 +75,21 @@ This product includes software developed by the OpenSSL Project for use in the O Копировать текущий выделенный адрес в буфер обмена - + + Sign a message to prove you own a TRI address + + + + &New Address &Новый адрес - - These are your buynowcoin 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. - Это Ваши адреса для получения платежей. Вы можете дать разные адреса отправителям, чтобы отслеживать, кто именно вам платит. + These are your triangles 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. + Это Ваши адреса для получения платежей. Вы можете дать разные адреса отправителям, чтобы отслеживать, кто именно вам платит. - + &Copy Address &Копировать адрес @@ -79,27 +99,30 @@ This product includes software developed by the OpenSSL Project for use in the O Показать &QR код - - Sign a message to prove you own a buynowcoin address - Подписать сообщение, чтобы доказать владение адресом buynowcoin + Sign a message to prove you own a triangles address + Подписать сообщение, чтобы доказать владение адресом triangles - + Sign &Message &Подписать сообщение - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Удалить выбранный адрес из списка - - Verify a message to ensure it was signed with a specified buynowcoin address - Проверить сообщение, чтобы убедиться, что оно было подписано указанным адресом buynowcoin + Verify a message to ensure it was signed with a specified triangles address + Проверить сообщение, чтобы убедиться, что оно было подписано указанным адресом triangles - + &Verify Message &Проверить сообщение @@ -142,7 +165,7 @@ This product includes software developed by the OpenSSL Project for use in the O AddressTableModel - + Label Метка @@ -245,7 +268,12 @@ This product includes software developed by the OpenSSL Project for use in the O Вы уверены, что хотите зашифровать ваш бумажник? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. ВАЖНО: все предыдущие резервные копии вашего кошелька должны быть заменены новым зашифрованным файлом. В целях безопасности предыдущие резервные копии нешифрованного кошелька станут бесполезны, как только вы начнёте использовать новый шифрованный кошелёк. @@ -262,12 +290,11 @@ This product includes software developed by the OpenSSL Project for use in the O Бумажник зашифрован - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - Сейчас программа закроется для завершения процесса шифрования. Помните, что шифрование вашего бумажника не может полностью защитить ваши монеты от кражи с помощью инфицирования вашего компьютера вредоносным ПО. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + Сейчас программа закроется для завершения процесса шифрования. Помните, что шифрование вашего бумажника не может полностью защитить ваши монеты от кражи с помощью инфицирования вашего компьютера вредоносным ПО. - + @@ -308,431 +335,6 @@ This product includes software developed by the OpenSSL Project for use in the O Пароль бумажника успешно изменён. - - BitcoinGUI - - - Sign &message... - &Подписать сообщение - - - - Synchronizing with network... - Синхронизация с сетью... - - - - &Overview - О&бзор - - - - Show general overview of wallet - Показать общий обзор действий с бумажником - - - - &Transactions - &Транзакции - - - - Browse transaction history - Показать историю транзакций - - - - &Address Book - &Адресная книга - - - - Edit the list of stored addresses and labels - Изменить список сохранённых адресов и меток к ним - - - - &Receive coins - &Получение монет - - - - Show the list of addresses for receiving payments - Показать список адресов для получения платежей - - - - &Send coins - Отп&равка монет - - - - E&xit - В&ыход - - - - Quit application - Закрыть приложение - - - - Show information about buynowcoin - Показать информацию о buynowcoin'е - - - - About &Qt - О &Qt - - - - Show information about Qt - Показать информацию о Qt - - - - &Options... - Оп&ции... - - - - &Encrypt Wallet... - &Зашифровать бумажник - - - - &Backup Wallet... - &Сделать резервную копию бумажника - - - - &Change Passphrase... - &Изменить пароль - - - - ~%n block(s) remaining - остался ~%n блокосталось ~%n блоковосталось ~%n блоков - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Загружено %1 из %2 блоков истории операций (%3% завершено). - - - - &Export... - &Экспорт... - - - - Send coins to a buynowcoin address - Отправить монеты на указанный адрес buynowcoin - - - - Modify configuration options for buynowcoin - Изменить параметры конфигурации buynowcoin - - - - Export the data in the current tab to a file - Экспортировать данные из вкладки в файл - - - - Encrypt or decrypt wallet - Зашифровать или расшифровать бумажник - - - - Backup wallet to another location - Сделать резервную копию бумажника в другом месте - - - - Change the passphrase used for wallet encryption - Изменить пароль шифрования бумажника - - - - &Debug window - &Окно отладки - - - - Open debugging and diagnostic console - Открыть консоль отладки и диагностики - - - - &Verify message... - &Проверить сообщение... - - - - buynowcoin - buynowcoin - - - - Wallet - Бумажник - - - - &About buynowcoin - &О buynowcoin - - - - &Show / Hide - &Показать / Скрыть - - - - Unlock wallet - Разблокировать бумажник - - - - &Lock Wallet - &Заблокировать бумажник - - - - Lock wallet - Заблокировать бумажник - - - - &File - &Файл - - - - &Settings - &Настройки - - - - &Help - &Помощь - - - - Tabs toolbar - Панель вкладок - - - - Actions toolbar - Панель действий - - - - - [testnet] - [тестовая сеть] - - - - - buynowcoin client - buynowcoin клиент - - - - %n active connection(s) to buynowcoin network - %n активное соединение с сетью%n активных соединений с сетью%n активных соединений с сетью - - - - Downloaded %1 blocks of transaction history. - Загружено %1 блоков истории транзакций. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Участвуем в доле.<br>Ваш вес %1<br>Вес сети %2<br>Ожидаемое время получения награды %3 - - - - Not staking because wallet is locked - Не участвуем в доле, так как кошелёк заблокирован - - - - Not staking because wallet is offline - Не участвуем в доле, так как кошелёк оффлайн - - - - Not staking because wallet is syncing - Не участвуем в доле, так как кошелёк синхронизируется - - - - Not staking because you don't have mature coins - Не участвуем в доле, так как нет зрелых монет - - - - %n second(s) ago - %n секунду назад%n секунды назад%n секунд назад - - - - About buynowcoin card - О карте buynowcoin - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - &Разблокировать бумажник - - - - %n minute(s) ago - %n минуту назад%n минуты назад%n минут назад - - - - %n hour(s) ago - %n час назад%n часа назад%n часов назад - - - - %n day(s) ago - %n день назад%n дня назад%n дней назад - - - - Up to date - Синхронизировано - - - - Catching up... - Синхронизируется... - - - - Last received block was generated %1. - Последний полученный блок был сгенерирован %1. - - - - 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? - Данная транзакция превышает предельно допустимый размер. Но Вы можете всё равно совершить её, добавив комиссию в %1, которая отправится тем узлам, которые обработают Вашу транзакцию, и поможет поддержать сеть. Вы хотите добавить комиссию? - - - - Confirm transaction fee - Подтвердите комиссию - - - - Sent transaction - Исходящая транзакция - - - - Incoming transaction - Входящая транзакция - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Дата: %1 -Количество: %2 -Тип: %3 -Адрес: %4 - - - - - - URI handling - Обработка URI - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - Не удалось обработать URI! Это может быть связано с неверным адресом buynowcoin или неправильными параметрами URI. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Бумажник <b>зашифрован</b> и в настоящее время <b>разблокирован</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Бумажник <b>зашифрован</b> и в настоящее время <b>заблокирован</b> - - - - Backup Wallet - Сделать резервную копию бумажника - - - - Wallet Data (*.dat) - Данные бумажника (*.dat) - - - - Backup Failed - Резервное копирование не удалось - - - - There was an error trying to save the wallet data to the new location. - При попытке сохранения данных бумажника в новое место произошла ошибка. - - - - %n second(s) - %n секунда%n секунды%n секунд - - - - %n minute(s) - %n минута%n минуты%n минут - - - - %n hour(s) - %n час%n часа%n часов - - - - %n day(s) - %n день%n дня%n дней - - - - Not staking - Не участвуем в доле - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Произошла неисправимая ошибка. buynowcoin не может безопасно продолжать работу и будет закрыт. - - ClientModel @@ -892,7 +494,7 @@ Address: %4 Copy low output - + @@ -937,7 +539,7 @@ Address: %4 DUST - + @@ -951,7 +553,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -960,7 +562,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -969,14 +571,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -987,7 +589,7 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + @@ -1023,37 +625,46 @@ This label turns red, if the priority is smaller than "medium". Адрес, связанный с данной записью. - + + &Stealth Address + + + + New receiving address Новый адрес для получения - + New sending address Новый адрес для отправки - + Edit receiving address Изменение адреса для получения - + Edit sending address Изменение адреса для отправки - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Введённый адрес «%1» уже находится в адресной книге. - - The entered address "%1" is not a valid buynowcoin address. - Введённый адрес "%1" не является правильным buynowcoin-адресом. + The entered address "%1" is not a valid triangles address. + Введённый адрес "%1" не является правильным triangles-адресом. - + Could not unlock wallet. Не удается разблокировать бумажник. @@ -1066,18 +677,22 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version версия - + + + Triangles-Qt + + + + Usage: Использование: @@ -1107,6 +722,347 @@ This label turns red, if the priority is smaller than "medium". Показывать сплэш при запуске (по умолчанию: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Тип + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Метка + + + + To Address + + + + + From Address + + + + + Message + Сообщение + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + Адресная книга + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Копировать текущий выделенный адрес в буфер обмена + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Удалить выбранный адрес из списка + + + + &Delete + &Удалить + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Текст, разделённый запятыми (*.csv) + + + + Error exporting + Ошибка экспорта + + + + Could not write to file %1. + Невозможно записать в файл %1. + + OptionsDialog @@ -1140,17 +1096,15 @@ This label turns red, if the priority is smaller than "medium". Зарезервировать - - Automatically start buynowcoin after logging in to the system. - Автоматически запускать buynowcoin после входа в систему + Automatically start triangles after logging in to the system. + Автоматически запускать triangles после входа в систему - - &Start buynowcoin on system login - &Запускать buynowcoin при входе в систему + &Start triangles on system login + &Запускать triangles при входе в систему - + 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. Отключить базы данных блоков и адресов при выходе. Это означает, что их можно будет переместить в другой каталог данных, но завершение работы будет медленнее. Бумажник всегда отключается. @@ -1165,19 +1119,37 @@ This label turns red, if the priority is smaller than "medium". &Сеть - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Автоматически открыть порт для buynowcoin-клиента на роутере. Работает только если Ваш роутер поддерживает UPnP, и данная функция включена. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Автоматически открыть порт для triangles-клиента на роутере. Работает только если Ваш роутер поддерживает UPnP, и данная функция включена. - + Map port using &UPnP Пробросить порт через &UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Подключаться к сети buynowcoin через прокси SOCKS (например, при подключении через Tor). + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Подключаться к сети triangles через прокси SOCKS (например, при подключении через Tor). + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1251,11 +1223,20 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - Здесь можно выбрать язык интерфейса. Настройки вступят в силу после перезапуска buynowcoin. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + Здесь можно выбрать язык интерфейса. Настройки вступят в силу после перезапуска triangles. + + + &Unit to show amounts in: &Отображать суммы в единицах: @@ -1265,12 +1246,11 @@ This label turns red, if the priority is smaller than "medium". Выберите единицу измерения монет при отображении и отправке. - - Whether to show buynowcoin addresses in the transaction list or not. - Показывать ли адреса buynowcoin в списке транзакций. + Whether to show triangles addresses in the transaction list or not. + Показывать ли адреса triangles в списке транзакций. - + &Display addresses in transaction list &Показывать адреса в списке транзакций @@ -1313,8 +1293,12 @@ This label turns red, if the priority is smaller than "medium". - This setting will take effect after restarting buynowcoin. - Эта настройка вступит в силу после перезапуска buynowcoin + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Эта настройка вступит в силу после перезапуска triangles @@ -1330,13 +1314,11 @@ This label turns red, if the priority is smaller than "medium". Форма - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - Отображаемая информация может быть устаревшей. Ваш бумажник автоматически синхронизируется с сетью buynowcoin после подключения, но этот процесс пока не завершён. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + Отображаемая информация может быть устаревшей. Ваш бумажник автоматически синхронизируется с сетью triangles после подключения, но этот процесс пока не завершён. - + Stake: Доля: @@ -1371,27 +1353,61 @@ This label turns red, if the priority is smaller than "medium". Баланс добытых монет, который ещё не созрел - + Total: Итого: - + Your current total balance Ваш суммарный баланс - + <b>Recent transactions</b> <b>Последние транзакции</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Общая сумма всех транзакций, которые до сих пор не подтверждены, и до сих пор не учитываются в текущем балансе - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Общая сумма всех монет, используемых для Proof-of-Stake, и не учитывающихся на балансе @@ -1492,7 +1508,17 @@ This label turns red, if the priority is smaller than "medium". &Информация - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Используется версия OpenSSL @@ -1537,7 +1563,17 @@ This label turns red, if the priority is smaller than "medium". Время последнего блока - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Открыть @@ -1547,12 +1583,11 @@ This label turns red, if the priority is smaller than "medium". Параметры командной строки - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Показать помощь по buynowcoin-Qt, чтобы получить список доступных параметров командной строки. + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Показать помощь по triangles-Qt, чтобы получить список доступных параметров командной строки. - + &Show &Показать @@ -1567,34 +1602,35 @@ This label turns red, if the priority is smaller than "medium". Дата сборки - - buynowcoin - Debug window - buynowcoin - Окно отладки + triangles - Debug window + triangles - Окно отладки - - buynowcoin Core - Ядро buynowcoin + triangles Core + Ядро triangles - + Debug log file Отладочный лог-файл - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Открыть отладочный лог-файл buynowcoin из текущего каталога данных. Это может занять несколько секунд для больших лог-файлов. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Открыть отладочный лог-файл triangles из текущего каталога данных. Это может занять несколько секунд для больших лог-файлов. - + Clear console Очистить консоль + + Welcome to the triangles RPC console. + Добро пожаловать в RPC-консоль triangles. + - Welcome to the buynowcoin RPC console. - Добро пожаловать в RPC-консоль buynowcoin. + Welcome to the Triangles RPC console. + @@ -1618,6 +1654,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Отправка @@ -1642,33 +1679,33 @@ This label turns red, if the priority is smaller than "medium". Недостаточно средств! - + Quantity: - + Количество: 0 - + Bytes: - + Размер: Amount: - + - 0.00 BTC - + 0.00 TRI + @@ -1683,12 +1720,12 @@ This label turns red, if the priority is smaller than "medium". Fee: - + Комиссия: Low Output: - + Мелкие входы: @@ -1698,12 +1735,12 @@ This label turns red, if the priority is smaller than "medium". After Fee: - + С комиссией: Change - + @@ -1711,7 +1748,7 @@ This label turns red, if the priority is smaller than "medium". адрес для сдачи - + Send to multiple recipients at once Отправить нескольким получателям одновременно @@ -1737,8 +1774,12 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1751,19 +1792,23 @@ This label turns red, if the priority is smaller than "medium". &Отправить - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Введите buynowcoin-адрес (например Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Введите triangles-адрес (например TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Копировать количество Copy amount - + @@ -1773,22 +1818,22 @@ This label turns red, if the priority is smaller than "medium". Copy after fee - + Копировать с комиссией Copy bytes - + Копировать объем Copy priority - + Копировать приоритет Copy low output - + @@ -1850,10 +1895,15 @@ This label turns red, if the priority is smaller than "medium". 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. Ошибка: В транзакции отказано. Такое может произойти, если некоторые монеты уже были потрачены, например, если Вы используете одну копию файла wallet.dat, а монеты были потрачены из другой копии, но не были отмечены как потраченные в этой. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1885,19 +1935,29 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Введите метку для данного адреса (для добавления в адресную книгу) + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Метка: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Адрес получателя платежа (например Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Адрес получателя платежа (например TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1924,10 +1984,225 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient Удалить этого получателя + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Введите triangles-адрес (например TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Введите buynowcoin-адрес (например Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Выберите адрес из адресной книги + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Вставить адрес из буфера обмена + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Отправить нескольким получателям одновременно + + + + Add &Recipient + &Добавить получателя + + + + Remove all transaction fields + Удалить все поля транзакции + + + + Clear &All + Очистить &всё + + + + Confirm the send action + Подтвердить отправку + + + + S&end + &Отправить + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> адресату %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Вы уверены, что хотите отправить %1? + + + + and + и + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Адрес получателя неверный, пожалуйста, перепроверьте. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Обнаружен дублирующийся адрес. Отправка на один и тот же адрес возможна только один раз за одну операцию отправки + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Форма + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Выберите адрес из адресной книги + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Вставить адрес из буфера обмена + + + + Alt+P + Alt+P + + + + Remove this recipient + Удалить этого получателя + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Введите метку для данного адреса (для добавления в адресную книгу) + + + + &Label: + &Метка: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1950,8 +2225,8 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Адрес, которым вы хотите подписать сообщение (напр. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Адрес, которым вы хотите подписать сообщение (напр. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1987,11 +2262,20 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - Подписать сообщение, чтобы доказать владение адресом buynowcoin + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Подписать сообщение, чтобы доказать владение адресом triangles + + + Reset all sign message fields Сбросить значения всех полей подписывания сообщений @@ -2014,34 +2298,45 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Адрес, которым было подписано сообщение (напр. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Адрес, которым было подписано сообщение (напр. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Проверить сообщение, чтобы убедиться, что оно было подписано указанным адресом buynowcoin + Verify the message to ensure it was signed with the specified triangles address + Проверить сообщение, чтобы убедиться, что оно было подписано указанным адресом triangles - + Reset all verify message fields Сбросить все поля проверки сообщения - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Введите адрес buynowcoin (напр. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Введите адрес triangles (напр. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Нажмите "Подписать сообщение" для создания подписи + + Enter triangles signature + Введите подпись triangles + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Введите подпись buynowcoin + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2120,7 +2415,11 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - Открыто для %n блокаОткрыто для %n блоковОткрыто для %n блоков + + Открыто для %n блока + Открыто для %n блоков + Открыто для %n блоков + @@ -2150,7 +2449,11 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - , разослано через %n узел, разослано через %n узла, разослано через %n узлов + + , разослано через %n узел + , разослано через %n узла + , разослано через %n узлов + @@ -2196,14 +2499,18 @@ This label turns red, if the priority is smaller than "medium". - + Credit Кредит - + matures in %n more block(s) - будет доступно через %n блокбудет доступно через %n блокабудет доступно через %n блоков + + будет доступно через %n блок + будет доступно через %n блока + будет доступно через %n блоков + @@ -2214,12 +2521,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Дебет - + Transaction fee Комиссия @@ -2239,14 +2546,18 @@ This label turns red, if the priority is smaller than "medium". Комментарий - + Transaction ID ID транзакции + Generated coins must mature 60 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. + Сгенерированные монеты должны подождать 510 блоков, прежде чем они могут быть потрачены. Когда Вы сгенерировали этот блок, он был отправлен в сеть для добавления в цепочку блоков. Если данная процедура не удастся, статус изменится на «не подтверждено», и монеты будут недействительны. Это иногда происходит в случае, если другой узел сгенерирует блок на несколько секунд раньше вас. {60 ?} + + Generated coins must mature 510 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. - Сгенерированные монеты должны подождать 510 блоков, прежде чем они могут быть потрачены. Когда Вы сгенерировали этот блок, он был отправлен в сеть для добавления в цепочку блоков. Если данная процедура не удастся, статус изменится на «не подтверждено», и монеты будут недействительны. Это иногда происходит в случае, если другой узел сгенерирует блок на несколько секунд раньше вас. + Сгенерированные монеты должны подождать 510 блоков, прежде чем они могут быть потрачены. Когда Вы сгенерировали этот блок, он был отправлен в сеть для добавления в цепочку блоков. Если данная процедура не удастся, статус изменится на «не подтверждено», и монеты будут недействительны. Это иногда происходит в случае, если другой узел сгенерирует блок на несколько секунд раньше вас. @@ -2279,7 +2590,7 @@ This label turns red, if the priority is smaller than "medium". ложь - + , has not been successfully broadcast yet , ещё не было успешно разослано @@ -2305,7 +2616,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Дата @@ -2337,10 +2648,19 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - Открыто для ещё %n блокаОткрыто для ещё %n блоковОткрыто для ещё %n блоков + + Открыто для ещё %n блока + Открыто для ещё %n блоков + Открыто для ещё %n блоков + - + + Narration + + + + Offline Оффлайн @@ -2405,7 +2725,7 @@ This label turns red, if the priority is smaller than "medium". [не доступно] - + Transaction status. Hover over this field to show number of confirmations. Статус транзакции. Подведите курсор к нужному полю для того, чтобы увидеть количество подтверждений. @@ -2600,29 +2920,20 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - Отправка.... - - - - bitcoin-core - - - buynowcoin version - Версия + triangles version + Версия - + Usage: Использование: - Send command to -server or buynowcoind - Отправить команду на -server или buynowcoind + Send command to -server or trianglesd + Отправить команду на -server или trianglesd @@ -2642,13 +2953,13 @@ This label turns red, if the priority is smaller than "medium". - Specify configuration file (default: buynowcoin.conf) - Указать конфигурационный файл (по умолчанию: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Указать конфигурационный файл (по умолчанию: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Указать pid-файл (по умолчанию: buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + Указать pid-файл (по умолчанию: trianglesd.pid) @@ -2661,7 +2972,22 @@ This label turns red, if the priority is smaller than "medium". Укажите каталог данных - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Установить размер кэша базы данных в мегабайтах (по умолчанию: 25) @@ -2698,7 +3024,7 @@ This label turns red, if the priority is smaller than "medium". Stake your coins to support network and gain reward (default: 1) - + @@ -2796,12 +3122,11 @@ This label turns red, if the priority is smaller than "medium". Внимание: установлено очень большое значение -paytxfee. Это комиссия, которую вы заплатите при проведении транзакции. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Внимание: убедитесь, что дата и время на Вашем компьютере выставлены верно. Если Ваши часы идут неправильно, buynowcoin будет работать некорректно. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Внимание: убедитесь, что дата и время на Вашем компьютере выставлены верно. Если Ваши часы идут неправильно, triangles будет работать некорректно. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Внимание: ошибка чтения wallet.dat! Все ключи восстановлены, но записи в адресной книге и истории транзакций могут быть некорректными. @@ -2853,7 +3178,7 @@ This label turns red, if the priority is smaller than "medium". Invalid amount for -reservebalance=<amount> - + @@ -2887,9 +3212,9 @@ This label turns red, if the priority is smaller than "medium". - SSL options: (see the Bitcoin Wiki for SSL setup instructions) + SSL options: (see the Triangles Wiki for SSL setup instructions) -Параметры SSL: (см. Bitcoin Wiki для инструкций по настройке SSL) +Параметры SSL: (см. Triangles Wiki для инструкций по настройке SSL) @@ -2930,7 +3255,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2958,9 +3283,19 @@ This label turns red, if the priority is smaller than "medium". Проверка целостности базы данных... - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + @@ -2983,34 +3318,29 @@ This label turns red, if the priority is smaller than "medium". Пароль для подключений JSON-RPC - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Triangles + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3040,12 +3370,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3100,12 +3430,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3118,17 +3448,15 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Кошелек %s находится вне рабочей директории %s. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Невозможно установить блокировку на рабочую директорию %s. Возможно, бумажник уже запущен. + Cannot obtain a lock on data directory %s. triangles is probably already running. + Невозможно установить блокировку на рабочую директорию %s. Возможно, бумажник уже запущен. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Невозможно привязаться к %s на этом компьютере (bind вернул ошибку %d, %s) @@ -3158,17 +3486,15 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Ошибка загрузки wallet.dat: Бумажник поврежден - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Ошибка загрузки wallet.dat: бумажник требует более новую версию buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Ошибка загрузки wallet.dat: бумажник требует более новую версию triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - Необходимо перезаписать бумажник, перезапустите buynowcoin для завершения операции + Wallet needed to be rewritten: restart triangles to complete + Необходимо перезаписать бумажник, перезапустите triangles для завершения операции - + Error loading wallet.dat Ошибка при загрузке wallet.dat @@ -3233,27 +3559,41 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Добавить узел для подключения и пытаться поддерживать соединение открытым - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Невозможно привязаться к %s на этом компьютере. Возможно, buynowcoin уже работает. + Unable to bind to %s on this computer. triangles is probably already running. + Невозможно привязаться к %s на этом компьютере. Возможно, triangles уже работает. - + Fee per KB to add to transactions you send Комиссия на килобайт, добавляемая к вашим транзакциям Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Загрузка бумажника... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Не удаётся понизить версию бумажника @@ -3297,4 +3637,540 @@ If the file does not exist, create it with owner-readable-only file permissions. Если файл не существует, создайте его и установите права доступа только для владельца. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Бумажник + + + + &Overview + О&бзор + + + + Show general overview of wallet + Показать общий обзор действий с бумажником + + + + &Send coins + Отп&равка монет + + + + Send coins to a TRI address + + + + + &Receive coins + &Получение монет + + + + Show the list of addresses for receiving payments + Показать список адресов для получения платежей + + + + &Transactions + &Транзакции + + + + Browse transaction history + Показать историю транзакций + + + + &Address Book + &Адресная книга + + + + Edit the list of stored addresses and labels + Изменить список сохранённых адресов и меток к ним + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + В&ыход + + + + Quit application + Закрыть приложение + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + О &Qt + + + + Show information about Qt + Показать информацию о Qt + + + + &Options... + Оп&ции... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Показать / Скрыть + + + + &Encrypt Wallet... + &Зашифровать бумажник + + + + Encrypt or decrypt wallet + Зашифровать или расшифровать бумажник + + + + &Backup Wallet... + &Сделать резервную копию бумажника + + + + Backup wallet to another location + Сделать резервную копию бумажника в другом месте + + + + &Change Passphrase... + &Изменить пароль + + + + Change the passphrase used for wallet encryption + Изменить пароль шифрования бумажника + + + + &Unlock Wallet... + &Разблокировать бумажник + + + + Unlock wallet + Разблокировать бумажник + + + + &Lock Wallet + &Заблокировать бумажник + + + + Lock wallet + Заблокировать бумажник + + + + Sign &message... + &Подписать сообщение + + + + &Verify message... + &Проверить сообщение... + + + + &Export... + &Экспорт... + + + + Export the data in the current tab to a file + Экспортировать данные из вкладки в файл + + + + &Debug window + &Окно отладки + + + + Open debugging and diagnostic console + Открыть консоль отладки и диагностики + + + + &File + &Файл + + + + &Settings + &Настройки + + + + &Help + &Помощь + + + + Tabs toolbar + Панель вкладок + + + + Actions toolbar + Панель действий + + + + + [testnet] + [тестовая сеть] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Синхронизация с сетью... + + + + ~%n block(s) remaining + + остался ~%n блок + осталось ~%n блоков + осталось ~%n блоков + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Загружено %1 из %2 блоков истории операций (%3% завершено). + + + + Downloaded %1 blocks of transaction history. + Загружено %1 блоков истории транзакций. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + %n секунду назад + %n секунды назад + %n секунд назад + + + + + %n minute(s) ago + + %n минуту назад + %n минуты назад + %n минут назад + + + + + %n hour(s) ago + + %n час назад + %n часа назад + %n часов назад + + + + + %n day(s) ago + + %n день назад + %n дня назад + %n дней назад + + + + + Up to date + Синхронизировано + + + + Catching up... + Синхронизируется... + + + + Last received block was generated %1. + Последний полученный блок был сгенерирован %1. + + + + 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? + Данная транзакция превышает предельно допустимый размер. Но Вы можете всё равно совершить её, добавив комиссию в %1, которая отправится тем узлам, которые обработают Вашу транзакцию, и поможет поддержать сеть. Вы хотите добавить комиссию? + + + + Confirm transaction fee + Подтвердите комиссию + + + + Sent transaction + Исходящая транзакция + + + + Incoming transaction + Входящая транзакция + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Дата: %1 +Количество: %2 +Тип: %3 +Адрес: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + Обработка URI + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Бумажник <b>зашифрован</b> и в настоящее время <b>разблокирован</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Бумажник <b>зашифрован</b> и в настоящее время <b>заблокирован</b> + + + + Backup Wallet + Сделать резервную копию бумажника + + + + Wallet Data (*.dat) + Данные бумажника (*.dat) + + + + Backup Failed + Резервное копирование не удалось + + + + There was an error trying to save the wallet data to the new location. + При попытке сохранения данных бумажника в новое место произошла ошибка. + + + + %n second(s) + + %n секунда + %n секунды + %n секунд + + + + + %n minute(s) + + %n минута + %n минуты + %n минут + + + + + %n hour(s) + + %n час + %n часа + %n часов + + + + + %n day(s) + + %n день + %n дня + %n дней + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Участвуем в доле.<br>Ваш вес %1<br>Вес сети %2<br>Ожидаемое время получения награды %3 + + + + Not staking because wallet is locked + Не участвуем в доле, так как кошелёк заблокирован + + + + Not staking because wallet is offline + Не участвуем в доле, так как кошелёк оффлайн + + + + Not staking because wallet is syncing + Не участвуем в доле, так как кошелёк синхронизируется + + + + Not staking because you don't have mature coins + Не участвуем в доле, так как нет зрелых монет + + + + Not staking + Не участвуем в доле + + + Show information about triangles + Показать информацию о triangles'е + + + Send coins to a triangles address + Отправить монеты на указанный адрес triangles + + + Modify configuration options for triangles + Изменить параметры конфигурации triangles + + + triangles + triangles + + + &About triangles + &О triangles + + + triangles client + triangles клиент + + + %n active connection(s) to triangles network + + %n активное соединение с сетью + %n активных соединений с сетью + %n активных соединений с сетью + + + + About triangles card + О карте triangles + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + Не удалось обработать URI! Это может быть связано с неверным адресом triangles или неправильными параметрами URI. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Произошла неисправимая ошибка. triangles не может безопасно продолжать работу и будет закрыт. + + + + WalletModel + + + Sending... + Отправка.... + + + diff --git a/src/qt/locale/bitcoin_sah.qm b/src/qt/locale/triangles_sah.qm similarity index 100% rename from src/qt/locale/bitcoin_sah.qm rename to src/qt/locale/triangles_sah.qm diff --git a/src/qt/locale/triangles_sah.ts b/src/qt/locale/triangles_sah.ts new file mode 100644 index 0000000..616fe17 --- /dev/null +++ b/src/qt/locale/triangles_sah.ts @@ -0,0 +1,3943 @@ + + + + + AboutDialog + + + About Triangles + + + + + <b>Triangles</b> version + + + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team + + + + + +This is experimental software. + +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. + + + + + AddressBookPage + + + Address Book + + + + + Double-click to edit address or label + Аадырыскын уларытаргар иккитэ баттаа + + + + Create a new address + + + + + Copy the currently selected address to the system clipboard + + + + + Sign a message to prove you own a TRI address + + + + + &New Address + + + + + &Copy Address + + + + + Show &QR Code + + + + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + + &Delete + + + + + Copy &Label + + + + + &Edit + + + + + Export Address Book Data + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + + + + + AddressTableModel + + + Label + + + + + Address + + + + + (no label) + + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + + + + + New passphrase + + + + + Repeat new passphrase + + + + + Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. + + + + + For staking only + + + + + 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>. + + + + + Encrypt wallet + + + + + This operation needs your wallet passphrase to unlock the wallet. + + + + + Unlock wallet + + + + + This operation needs your wallet passphrase to decrypt the wallet. + + + + + Decrypt wallet + + + + + Change passphrase + + + + + Enter the old and new passphrase to the wallet. + + + + + Confirm wallet encryption + + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! + + + + + Are you sure you wish to encrypt your wallet? + + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. + + + + + + Warning: The Caps Lock key is on! + + + + + + Wallet encrypted + + + + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + + + + + Wallet encryption failed + + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + + + + + + The supplied passphrases do not match. + + + + + Wallet unlock failed + + + + + + + The passphrase entered for the wallet decryption was incorrect. + + + + + Wallet decryption failed + + + + + Wallet passphrase was successfully changed. + + + + + ClientModel + + + Network Alert + + + + + CoinControlDialog + + + Coin Control + + + + + Quantity: + + + + + Bytes: + + + + + Amount: + + + + + Priority: + + + + + Fee: + + + + + Low Output: + + + + + no + + + + + After Fee: + + + + + Change: + + + + + (un)select all + + + + + Tree mode + + + + + List mode + + + + + Amount + + + + + Label + + + + + Address + + + + + Date + + + + + Confirmations + + + + + Confirmed + + + + + Priority + + + + + Copy address + + + + + Copy label + + + + + + Copy amount + + + + + Copy transaction ID + + + + + Copy quantity + + + + + Copy fee + + + + + Copy after fee + + + + + Copy bytes + + + + + Copy priority + + + + + Copy low output + + + + + Copy change + + + + + highest + + + + + high + + + + + medium-high + + + + + medium + + + + + low-medium + + + + + low + + + + + lowest + + + + + DUST + + + + + yes + + + + + This label turns red, if the transaction size is bigger than 10000 bytes. + + This means a fee of at least %1 per kb is required. + + Can vary +/- 1 Byte per input. + + + + + Transactions with higher priority get more likely into a block. + +This label turns red, if the priority is smaller than "medium". + + This means a fee of at least %1 per kb is required. + + + + + This label turns red, if any recipient receives an amount smaller than %1. + + This means a fee of at least %2 is required. + + Amounts below 0.546 times the minimum relay fee are shown as DUST. + + + + + This label turns red, if the change is smaller than %1. + + This means a fee of at least %2 is required. + + + + + + (no label) + + + + + change from %1 (%2) + + + + + (change) + + + + + EditAddressDialog + + + Edit Address + + + + + &Label + + + + + The label associated with this address book entry + + + + + &Address + + + + + The address associated with this address book entry. This can only be modified for sending addresses. + + + + + &Stealth Address + + + + + New receiving address + + + + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + version + + + + + + Triangles-Qt + + + + + Usage: + + + + + command-line options + + + + + UI options + + + + + Set language, for example "de_DE" (default: system locale) + + + + + Start minimized + + + + + Show splash screen on startup (default: 1) + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + + + + + OptionsDialog + + + Options + + + + + &Main + + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. + + + + + Pay transaction &fee + + + + + Reserved amount does not participate in staking and is therefore spendable at any time. + + + + + Reserve + + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + 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. + + + + + &Detach databases at shutdown + + + + + &Network + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + + + + + &Connect through SOCKS proxy: + + + + + Proxy &IP: + + + + + IP address of the proxy (e.g. 127.0.0.1) + + + + + &Port: + + + + + Port of the proxy (e.g. 9050) + + + + + SOCKS &Version: + + + + + SOCKS version of the proxy (e.g. 5) + + + + + &Window + + + + + Show only a tray icon after minimizing the window. + + + + + &Minimize to the tray instead of the taskbar + + + + + 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. + + + + + M&inimize on close + + + + + &Display + + + + + User Interface &language: + + + + + The user interface language can be set here. This setting will take effect after restarting Triangles. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show TRI addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + Whether to show coin control features or not. + + + + + Display coin &control features (experts only!) + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + + Warning + + + + + + This setting will take effect after restarting Triangles. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + + Stake: + + + + + Unconfirmed: + + + + + Wallet + + + + + Spendable: + + + + + Your current spendable balance + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + Total: + + + + + Your current total balance + + + + + <b>Recent transactions</b> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + Total of coins that was staked, and do not yet count toward the current balance + + + + + + out of sync + + + + + QRCodeDialog + + + QR Code Dialog + + + + + Request Payment + + + + + Amount: + + + + + Label: + + + + + Message: + + + + + &Save As... + + + + + Error encoding URI into QR Code. + + + + + The entered amount is invalid, please check. + + + + + Resulting URI too long, try to reduce the text for label / message. + + + + + Save QR Code + + + + + PNG Images (*.png) + + + + + RPCConsole + + + Client name + + + + + + + + + + + + + + N/A + + + + + Client version + + + + + &Information + + + + + Using OpenSSL version + + + + + Startup time + + + + + Network + + + + + Number of connections + + + + + On testnet + + + + + Block chain + + + + + Current number of blocks + + + + + Estimated total blocks + + + + + Last block time + + + + + &Open + + + + + Command-line options + + + + + &Show + + + + + &Console + + + + + Build date + + + + + Triangles - Debug window + + + + + Triangles Core + + + + + Debug log file + + + + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + + Clear console + + + + + Welcome to the Triangles RPC console. + + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + + + + + Type <b>help</b> for an overview of available commands. + + + + + SendCoinsDialog + + + + + + + + + + + Send Coins + + + + + Coin Control Features + + + + + Inputs... + + + + + automatically selected + + + + + Insufficient funds! + + + + + Quantity: + + + + + + 0 + + + + + Bytes: + + + + + Amount: + + + + + + + + 0.00 TRI + + + + + Priority: + + + + + medium + + + + + Fee: + + + + + Low Output: + + + + + no + + + + + After Fee: + + + + + Change + + + + + custom change address + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 TRI + + + + + Confirm the send action + + + + + S&end + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Copy quantity + + + + + Copy amount + + + + + Copy fee + + + + + Copy after fee + + + + + Copy bytes + + + + + Copy priority + + + + + Copy low output + + + + + Copy change + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send coins + + + + + Are you sure you want to send %1? + + + + + and + + + + + The recipient address is not valid, please recheck. + + + + + The amount to pay must be larger than 0. + + + + + The amount exceeds your balance. + + + + + The total exceeds your balance when the %1 transaction fee is included. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Transaction creation failed. + + + + + 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. + + + + + Error: Narration is too long. + + + + + WARNING: Invalid TRI address + + + + + (no label) + + + + + WARNING: unknown change address + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + + Enter a label for this address to add it to your address book + + + + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + + &Label: + + + + + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + + + + + + &Sign Message + + + + + 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. + + + + + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this TRI address + + + + + Verify the message to ensure it was signed with the specified TRI address + + + + + Reset all sign message fields + + + + + + Clear &All + + + + + + &Verify Message + + + + + 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. + + + + + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Reset all verify message fields + + + + + Click "Sign Message" to generate signature + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + + + + + + The entered address is invalid. + + + + + + + + Please check the address and try again. + + + + + + The entered address does not refer to a key. + + + + + Wallet unlock was cancelled. + + + + + Private key for the entered address is not available. + + + + + Message signing failed. + + + + + Message signed. + + + + + The signature could not be decoded. + + + + + + Please check the signature and try again. + + + + + The signature did not match the message digest. + + + + + Message verification failed. + + + + + Message verified. + + + + + TransactionDesc + + + Open until %1 + + + + + Open for %n block(s) + + + + + + + conflicted + + + + + %1/offline + + + + + %1/unconfirmed + + + + + %1 confirmations + + + + + Status + + + + + , broadcast through %n node(s) + + + + + + + Date + + + + + Source + + + + + Generated + + + + + + From + + + + + + + To + + + + + + own address + + + + + label + + + + + + + + + Credit + + + + + matures in %n more block(s) + + + + + + + not accepted + + + + + + + + Debit + + + + + Transaction fee + + + + + Net amount + + + + + Message + + + + + Comment + + + + + Transaction ID + + + + + Generated coins must mature 60 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. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + + + + + Amount + + + + + Open until %1 + + + + + Confirmed (%1 confirmations) + + + + + Open for %n more block(s) + + + + + + + Narration + + + + + Offline + + + + + Unconfirmed + + + + + Confirming (%1 of %2 recommended confirmations) + + + + + Conflicted + + + + + Immature (%1 confirmations, will be available after %2) + + + + + This block was not received by any other nodes and will probably not be accepted! + + + + + Generated but not accepted + + + + + Received with + + + + + Received from + + + + + Sent to + + + + + Payment to yourself + + + + + Mined + + + + + (n/a) + + + + + Transaction status. Hover over this field to show number of confirmations. + + + + + Date and time that the transaction was received. + + + + + Type of transaction. + + + + + Destination address of transaction. + + + + + Amount removed from or added to balance. + + + + + TransactionView + + + + All + + + + + Today + + + + + This week + + + + + This month + + + + + Last month + + + + + This year + + + + + Range... + + + + + Received with + + + + + Sent to + + + + + To yourself + + + + + Mined + + + + + Other + + + + + Enter address or label to search + + + + + Min amount + + + + + Copy address + + + + + Copy label + + + + + Copy amount + + + + + Copy transaction ID + + + + + Edit label + + + + + Show transaction details + + + + + Export Transaction Data + + + + + Comma separated file (*.csv) + + + + + Confirmed + + + + + Date + + + + + Type + + + + + Label + + + + + Address + + + + + Amount + + + + + ID + + + + + Error exporting + + + + + Could not write to file %1. + + + + + Range: + + + + + to + + + + + Triangles-core + + + Usage: + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify wallet file (within data directory) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Set database disk log size in megabytes (default: 100) + + + + + Listen for connections on <port> (default: 15714 or testnet: 25714) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + Bind to given address. Use [host]:port notation for IPv6 + + + + + Stake your coins to support network and gain reward (default: 1) + + + + + Threshold for disconnecting misbehaving peers (default: 100) + + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Detach block and address databases. Increases shutdown time (default: 0) + + + + + 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. + + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds + + + + + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) + + + + + Accept command line and JSON-RPC commands + + + + + Error: Transaction creation failed + + + + + Error: Wallet locked, unable to create transaction + + + + + Importing blockchain data file. + + + + + Importing bootstrap blockchain data file. + + + + + Run in the background as a daemon and accept commands + + + + + Use the test network + + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + + + + + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. + + + + + Attempt to recover private keys from a corrupt wallet.dat + + + + + Block creation options: + + + + + Connect only to the specified node(s) + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Find peers using DNS lookup (default: 1) + + + + + Sync checkpoints policy (default: strict) + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -reservebalance=<amount> + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + + + + + Output extra debugging information. Implies all other -debug* options + + + + + Output extra network debugging information + + + + + Prepend debug output with timestamp + + + + + Select the version of socks proxy to use (4-5, default: 5) + + + + + Send trace/debug info to console instead of debug.log file + + + + + Send trace/debug info to debugger + + + + + Set maximum block size in bytes (default: 250000) + + + + + Set minimum block size in bytes (default: 0) + + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + Unable to sign checkpoint, wrong checkpointkey? + + + + + + Use UPnP to map the listening port (default: 0) + + + + + Use UPnP to map the listening port (default: 1 when listening) + + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + + + + + Verifying database integrity... + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + + WARNING: syncronized checkpoint violation detected, but skipped! + + + + + Warning: Disk space is low! + + + + + Warning: This version is obsolete, upgrade required! + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + + Add a node to connect to and attempt to keep the connection open + + + + + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Cannot downgrade wallet + + + + + Cannot initialize keypool + + + + + Cannot write default address + + + + + Rescanning... + + + + + Done loading + + + + + To use the %s option + + + + + Error + + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + + + + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + + + + + Browse transaction history + + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + + + + + + %n day(s) + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_sk.qm b/src/qt/locale/triangles_sk.qm new file mode 100644 index 0000000..13cfcf9 Binary files /dev/null and b/src/qt/locale/triangles_sk.qm differ diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/triangles_sk.ts similarity index 67% rename from src/qt/locale/bitcoin_sk.ts rename to src/qt/locale/triangles_sk.ts index 709ebbf..08fac56 100644 --- a/src/qt/locale/bitcoin_sk.ts +++ b/src/qt/locale/triangles_sk.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin - O buynowcoin + About Triangles + O triangles + + + <b>triangles</b> version + <b>triangles</b> verzia + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers - <b>buynowcoin</b> version - <b>buynowcoin</b> verzia + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers +Copyright © 2014 Triangles team + - + This is experimental software. @@ -44,12 +55,17 @@ Tento produkt obsahuje softvér vyvinutý Projektom OpenSSL Project pre použiti Adresár - + + These are your Triangles 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. + + + + Double-click to edit address or label Dvojklikom editovať adresu alebo popis - + Create a new address Vytvoriť novú adresu @@ -59,17 +75,21 @@ Tento produkt obsahuje softvér vyvinutý Projektom OpenSSL Project pre použiti Kopírovať práve zvolenú adresu do systémového klipbordu - + + Sign a message to prove you own a TRI address + + + + &New Address &Nová Adresa - - These are your buynowcoin 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. - Toto sú vaše buynowcoin adresy pre príjem platieb. Možno budete chcieť dať inú každému odosielateľovi, takže môžete sledovať, kto Vám platí. + These are your triangles 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. + Toto sú vaše triangles adresy pre príjem platieb. Možno budete chcieť dať inú každému odosielateľovi, takže môžete sledovať, kto Vám platí. - + &Copy Address &Kopírovať adresu @@ -79,27 +99,30 @@ Tento produkt obsahuje softvér vyvinutý Projektom OpenSSL Project pre použiti Ukáž &QR Code - - Sign a message to prove you own a buynowcoin address - Podpísať správu, že vlastníte buynowcoin adresu + Sign a message to prove you own a triangles address + Podpísať správu, že vlastníte triangles adresu - + Sign &Message Podpísať &Správu - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Vymazať aktuálne vybranú adresu zo zoznamu - - Verify a message to ensure it was signed with a specified buynowcoin address - Overte správu, aby ste zabezpečili, že bola podpísaná s určitou buynowcoin adresou + Verify a message to ensure it was signed with a specified triangles address + Overte správu, aby ste zabezpečili, že bola podpísaná s určitou triangles adresou - + &Verify Message &Overte Správu @@ -142,7 +165,7 @@ Tento produkt obsahuje softvér vyvinutý Projektom OpenSSL Project pre použiti AddressTableModel - + Label Popis @@ -245,7 +268,12 @@ Tento produkt obsahuje softvér vyvinutý Projektom OpenSSL Project pre použiti Ste si istí, že si želáte zašifrovať peňaženku? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. DÔLEŽITÉ: Všetky predchádzajúce zálohy vašej peňaženky, ktoré ste vykonali by mali byť nahradené novo vytvorenou, zašifrovanou peňaženkou. Z bezpečnostných dôvodov bude predchádzajúca záloha nezašifrovanej peňaženky k ničomu, akonáhle začnete používať novú, zašifrovanú peňaženku. @@ -262,12 +290,11 @@ Tento produkt obsahuje softvér vyvinutý Projektom OpenSSL Project pre použiti Peňaženka zašifrovaná - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin sa teraz zavrie aby dokončil proces zašifrovania. Nezabudnite, že zašifrovanie vašej peňaženky nemôže plne chrániť vaše mince pred krádežou malwarom napadnutím vašeho počítača. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles sa teraz zavrie aby dokončil proces zašifrovania. Nezabudnite, že zašifrovanie vašej peňaženky nemôže plne chrániť vaše mince pred krádežou malwarom napadnutím vašeho počítača. - + @@ -308,430 +335,6 @@ Tento produkt obsahuje softvér vyvinutý Projektom OpenSSL Project pre použiti Heslo k peňaženke bolo úspešne zmenené. - - BitcoinGUI - - - Sign &message... - Podpísať &správu... - - - - Synchronizing with network... - Synchronizácia so sieťou... - - - - &Overview - &Prehľad - - - - Show general overview of wallet - Zobraziť celkový prehľad o peňaženke - - - - &Transactions - &Transakcie - - - - Browse transaction history - Prechádzať históriu transakcií - - - - &Address Book - &Zoznam - - - - Edit the list of stored addresses and labels - Úprava zoznamu uložených adries a popisov - - - - &Receive coins - &Prijať mince - - - - Show the list of addresses for receiving payments - Zobraziť zoznam adries pre príjem platieb - - - - &Send coins - &Poslať mince - - - - E&xit - &Ukončiť - - - - Quit application - Ukončiť program - - - - Show information about buynowcoin - Zobraziť informácie o buynowcoin - - - - About &Qt - O &Qt - - - - Show information about Qt - Zobrazit informácie o Qt - - - - &Options... - &Možnosti... - - - - &Encrypt Wallet... - &Zašifrovať Peňaženku... - - - - &Backup Wallet... - &Backup peňaženku... - - - - &Change Passphrase... - &Zmena Hesla... - - - - ~%n block(s) remaining - ~%n blok zostáva~%n blokov zostáva~%n blokov zostáva - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Stiahnutých %1 of %2 blokov z histórie transakcií (%3% hotovo). - - - - &Export... - &Export... - - - - Send coins to a buynowcoin address - Poslať mince na buynowcoin adresu - - - - Modify configuration options for buynowcoin - Upraviť možnosti konfigurácie pre buynowcoin - - - - Export the data in the current tab to a file - Exportovať dáta v aktuálnej karte do súboru - - - - Encrypt or decrypt wallet - Zašifrovať alebo dešifrovať peňaženku - - - - Backup wallet to another location - Zálohovať peňaženku na iné miesto - - - - Change the passphrase used for wallet encryption - Zmeniť heslo použité na šifrovanie peňaženky - - - - &Debug window - &Okno pre ladenie - - - - Open debugging and diagnostic console - Otvor konzolu pre ladenie a diagnostiku - - - - &Verify message... - Overiť správu - - - - buynowcoin - buynowcoin - - - - Wallet - Peňaženka - - - - &About buynowcoin - &O buynowcoin - - - - &Show / Hide - Zobraziť / skryť - - - - Unlock wallet - Odomknúť peňaženku - - - - &Lock Wallet - &Zamknúť peňaženku - - - - Lock wallet - Zamknúť peňaženku - - - - &File - &Súbor - - - - &Settings - &Nastavenia - - - - &Help - &Pomoc - - - - Tabs toolbar - Lišta záložiek - - - - Actions toolbar - Actions panel - - - - - [testnet] - [testovacia sieť] - - - - - buynowcoin client - buynowcoin client - - - - %n active connection(s) to buynowcoin network - %n aktívne spojenie s buynowcoin sieťov%n aktívnych spojení s buynowcoin sieťov%n aktívnych spojení s buynowcoin sieťov - - - - Downloaded %1 blocks of transaction history. - Stiahnutých %1 blokov z histórie transakcií. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Stávkovanie.<br>Vaša váha je %1<br>Sieť váha je %2<br>Odhadovaný čas na zarobenie odmeny je %3 - - - - Not staking because wallet is locked - Nestávkujem pretože peňaženka je zamknutá - - - - Not staking because wallet is offline - Nestávkujem pretože peňaženka je vypnutá - - - - Not staking because wallet is syncing - Nestávkujem pretože peňaženka sa synchronizuje - - - - Not staking because you don't have mature coins - Nestávkujem pretože nemáte odležané mince - - - - %n second(s) ago - pred %n sekundoupred %n sekundamipred %n sekundami - - - - About buynowcoin card - O buynowcoin karte - - - - Show information about buynowcoin card - Zobraziť informácie o buynowcoin karte - - - - &Unlock Wallet... - &Odomknúť Peňaženku... - - - - %n minute(s) ago - pred %n minutoupred %n minutamipred %n minutami - - - - %n hour(s) ago - pred %n hodinoupred %n hodinamipred %n hodinami - - - - %n day(s) ago - pred %n dňompred %n dňamipred %n dňami - - - - Up to date - Aktualizovaný - - - - Catching up... - Sťahujem... - - - - Last received block was generated %1. - Posledný prijatý blok bol vytvorený %1. - - - - 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? - Táto transakcia je nad limit veľkosti. Stále to môžete poslať za poplatok %1, ktorý ide uzlom spracujúcim vaše transakcie, čím pomáhajú podporovať sieť. Chcete platiť poplatok? - - - - Confirm transaction fee - Potvrdte poplatok transakcie - - - - Sent transaction - Odoslané transakcie - - - - Incoming transaction - Prijaté transakcie - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Dátum: %1 -Suma: %2 -Typ: %3 -Adresa: %4 - - - - - URI handling - URI manipulácia - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URI nemožno analyzovať! To môže byť spôsobené neplatnou buynowcoin adresu alebo chybnými URI parametrami. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Peňaženka je <b>zašifrovaná</b> a momentálne <b>odomknutá</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Peňaženka je <b>zašifrovaná</b> a momentálne <b>zamknutá</b> - - - - Backup Wallet - Zálohovanie Peňaženky - - - - Wallet Data (*.dat) - Dáta Peňaženky (*.dat) - - - - Backup Failed - Zálohovanie Zlyhalo - - - - There was an error trying to save the wallet data to the new location. - Došlo k chybe pri pokuse o uloženie dát peňaženky do nového umiestnenia. - - - - %n second(s) - %n sekunda%n sekúnd%n sekúnd - - - - %n minute(s) - %n minúta%n minút%n minút - - - - %n hour(s) - %n hodina%n hodiny%n hodín - - - - %n day(s) - %n deň%n dni%n dní - - - - Not staking - Not staking - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Došlo k závažnej chybe. buynowcoin už nemôže pokračovať bezpečne a bude ukončený. - - ClientModel @@ -1036,37 +639,46 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Adresa spojená s položkou v tomto adresári. To môže byť zmenené iba pre odosielané adresy. - + + &Stealth Address + + + + New receiving address Nová adresa pre prijímanie - + New sending address Nová adresa pre odoslanie - + Edit receiving address Upraviť prijímacie adresy - + Edit sending address Upraviť odosielaciu adresu - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Vložená adresa "%1" sa už nachádza v adresári. - - The entered address "%1" is not a valid buynowcoin address. - Zadaná adresa "%1" nie je platnou buynowcoin adresou. + The entered address "%1" is not a valid triangles address. + Zadaná adresa "%1" nie je platnou triangles adresou. - + Could not unlock wallet. Nepodarilo sa odomknúť peňaženku. @@ -1079,18 +691,22 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version verzia - + + + Triangles-Qt + + + + Usage: Použitie: @@ -1120,6 +736,347 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Zobraziť úvodnú obrazovku pri štarte (default: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Typ + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + Správa + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (bez popisu) + + + + MessagePage + + + Address Book + Adresár + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopírovať práve zvolenú adresu do systémového klipbordu + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Vymazať aktuálne vybranú adresu zo zoznamu + + + + &Delete + &Zmazať + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + Chyba pri exporte + + + + Could not write to file %1. + Nemožno zapisovať do súboru %1. + + OptionsDialog @@ -1153,17 +1110,15 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Rezerva - - Automatically start buynowcoin after logging in to the system. - Automaticky spustiť buynowcoin po prihlásení sa do systému. + Automatically start triangles after logging in to the system. + Automaticky spustiť triangles po prihlásení sa do systému. - - &Start buynowcoin on system login - &Spustiť buynowcoin pri prihlásení do systému + &Start triangles on system login + &Spustiť triangles pri prihlásení do systému - + 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. Odpojiť blok a adresa databázy pri vypnutí počítača. To znamená, že môžu byť presunuté do iného adresára dát, ale to spomaľuje vypnutie. Peňaženka je vždy odpojená. @@ -1178,19 +1133,37 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Sieť - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Automaticky otvoriť port klienta buynowcoin na routeri. To funguje iba vtedy, ak váš router podporuje UPnP a je povolené. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Automaticky otvoriť port klienta triangles na routeri. To funguje iba vtedy, ak váš router podporuje UPnP a je povolené. - + Map port using &UPnP Mapovať port pomocou &UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Pripojenie k sieti buynowcoin cez SOCKS proxy server (napr. pri pripojení cez Tor). + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Pripojenie k sieti triangles cez SOCKS proxy server (napr. pri pripojení cez Tor). + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1264,11 +1237,20 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - Jazyk používateľského rozhrania je možné tu nastaviť. Toto nastavenie sa prejaví až po reštartovaní buynowcoin. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + Jazyk používateľského rozhrania je možné tu nastaviť. Toto nastavenie sa prejaví až po reštartovaní triangles. + + + &Unit to show amounts in: &Zobrazovať hodnoty v jednotkách: @@ -1278,12 +1260,11 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Vyberte si predvolené delenie jednotiek zobrazované v rozhraní a pri odosielaní mincí. - - Whether to show buynowcoin addresses in the transaction list or not. - Či chcete zobraziť buynowcoin adresy v zozname transakcií alebo nie. + Whether to show triangles addresses in the transaction list or not. + Či chcete zobraziť triangles adresy v zozname transakcií alebo nie. - + &Display addresses in transaction list &Zobraziť adresy zo zoznamu transakcií @@ -1326,8 +1307,12 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - This setting will take effect after restarting buynowcoin. - Toto nastavenie sa prejaví až po reštartovaní buynowcoin. + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Toto nastavenie sa prejaví až po reštartovaní triangles. @@ -1343,13 +1328,11 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Forma - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - Zobrazené informácie môžu byť zastaralé. Vaša peňaženka sa automaticky synchronizuje so sieťou buynowcoin po nadviazaní spojenia, ale tento proces nie je ešte dokončený. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + Zobrazené informácie môžu byť zastaralé. Vaša peňaženka sa automaticky synchronizuje so sieťou triangles po nadviazaní spojenia, ale tento proces nie je ešte dokončený. - + Stake: V stávke: @@ -1384,27 +1367,61 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Vyťažený zostatok, ktorý nebol ešte dozretý - + Total: Celkovo: - + Your current total balance Váš súčasný celkový zostatok - + <b>Recent transactions</b> <b>Nedávne transakcie</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Súčet transakcií, ktoré neboli ešte potvrdené, a ešte nezapočítané do aktuálneho zostatku - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Súčet mincí, ktoré sú v stávke a ešte neboli započítané do aktuálneho zostatku @@ -1505,7 +1522,17 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< &Informácia - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Používa OpenSSL verziu @@ -1550,7 +1577,17 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Čas posledného bloku - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Otvoriť @@ -1560,12 +1597,11 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Možnosti príkazového riadka - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Zobraziť buynowcoin-Qt nápovedu k získaniu zoznamu pre možnosti buynowcoin príkazového riadku. + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Zobraziť triangles-Qt nápovedu k získaniu zoznamu pre možnosti triangles príkazového riadku. - + &Show &Zobraziť @@ -1580,34 +1616,35 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Dátum zostavenia - - buynowcoin - Debug window - buynowcoin - Ladiace okno + triangles - Debug window + triangles - Ladiace okno - - buynowcoin Core - buynowcoin Core + triangles Core + triangles Core - + Debug log file Súbor záznamu ladenia - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Otvorte buynowcoin ladenie log súbor z aktuálneho adresára dát. To môže trvať niekoľko sekúnd pre veľké súbory protokolu. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Otvorte triangles ladenie log súbor z aktuálneho adresára dát. To môže trvať niekoľko sekúnd pre veľké súbory protokolu. - + Clear console Vymazať konzolu + + Welcome to the triangles RPC console. + Vitajte v triangles RPC konzole. + - Welcome to the buynowcoin RPC console. - Vitajte v buynowcoin RPC konzole. + Welcome to the Triangles RPC console. + @@ -1631,8 +1668,9 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< + Send Coins - Poslať Bitcoins + Poslať Triangless @@ -1655,7 +1693,7 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Nedostatok prostriedkov! - + Quantity: Množstvo: @@ -1675,13 +1713,17 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Amount: Suma: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1724,7 +1766,7 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< vlastná zmena adresy - + Send to multiple recipients at once Poslať viacerým príjemcom naraz @@ -1750,8 +1792,12 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1764,9 +1810,13 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< &Odoslať - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Zadajte buynowcoin adresu (napr. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Zadajte triangles adresu (napr. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1816,7 +1866,7 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Confirm send coins - Potvrdiť odoslanie bitcoins + Potvrdiť odoslanie triangless @@ -1863,10 +1913,19 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< 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. Chyba: Transakcia bola zamietnutá. To môže nastať, ak niektoré z mincí vo vašej peňaženke sa už použili, ako napríklad, ak ste použili kópiu wallet.dat a mince boli použité v kópii, ale neboli označené ako použité tu. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - VAROVANIE: Neplatná buynowcoin adresa + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + VAROVANIE: Neplatná triangles adresa @@ -1898,19 +1957,29 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - + Enter a label for this address to add it to your address book Vložte popis pre túto adresu aby sa pridala do adresára + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Popis: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adresa pre poslanie platby (napr. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adresa pre poslanie platby (napr. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1937,10 +2006,225 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Remove this recipient Odstrániť tohto príjemcu + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Zadaj a triangles addresu (napr. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Zadaj a buynowcoin addresu (napr. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Vybrať adresu z adresára + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Poslať viacerým príjemcom naraz + + + + Add &Recipient + &Pridať príjemcu + + + + Remove all transaction fields + Odstráňte všetky transakčné polia + + + + Clear &All + Zmazať &všetko + + + + Confirm the send action + Potvrďte odoslanie + + + + S&end + &Odoslať + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> do %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Ste si istí, že chcete poslať %1? + + + + and + a + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Adresa príjemcu je neplatná, prosím, overte ju. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Duplikát adresy objavený, je možné poslať na každú adresu len raz v jednej odchádzajúcej transakcii. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Vybrať adresu z adresára + + + + Alt+A + Alt+A + + + + Paste address from clipboard + + + + + Alt+P + Alt+P + + + + Remove this recipient + Odstrániť tohto príjemcu + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Vložte popis pre túto adresu aby sa pridala do adresára + + + + &Label: + &Popis: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1963,8 +2247,8 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adresa na podpísanie správy (napr. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adresa na podpísanie správy (napr. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -2000,11 +2284,20 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - Sign the message to prove you own this buynowcoin address - Podpísať správu ako dôkaz, že vlastníte túto buynowcoin adresu + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Podpísať správu ako dôkaz, že vlastníte túto triangles adresu + + + Reset all sign message fields Obnoviť všetky polia podpísanie správy @@ -2027,34 +2320,45 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adresa správy bola podpísaná (napr. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adresa správy bola podpísaná (napr. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Overte správu, aby zabezpečilo, že bola podpísaná s danou buynowcoin adresu + Verify the message to ensure it was signed with the specified triangles address + Overte správu, aby zabezpečilo, že bola podpísaná s danou triangles adresu - + Reset all verify message fields Obnoviť všetky polia pre overenie správy - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Zadajte buynowcoin adresu (napr. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Zadajte triangles adresu (napr. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Kliknite "Podpísať Správu" na získanie podpisu + + Enter triangles signature + Zadajte triangles podpis + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Zadajte buynowcoin podpis + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2133,7 +2437,11 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Open for %n block(s) - Otvoriť pre %n blokOtvoriť pre %n blokovOtvoriť pre %n blokov + + Otvoriť pre %n blok + Otvoriť pre %n blokov + Otvoriť pre %n blokov + @@ -2163,7 +2471,11 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< , broadcast through %n node(s) - , vysielanie cez %n uzol, vysielanie cez %n uzlov, vysielanie cez %n uzlov + + , vysielanie cez %n uzol + , vysielanie cez %n uzlov + , vysielanie cez %n uzlov + @@ -2209,14 +2521,18 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - + Credit Kredit - + matures in %n more block(s) - dozreje o ďalší %n blokdozreje o ďalších %n blokovdozreje o ďalších %n blokov + + dozreje o ďalší %n blok + dozreje o ďalších %n blokov + dozreje o ďalších %n blokov + @@ -2227,12 +2543,12 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - + Debit Debet - + Transaction fee Transakčný poplatok @@ -2252,14 +2568,18 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Komentár - + Transaction ID ID transakcie + Generated coins must mature 60 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. + Generované mince musia zrieť 510 blokov pred tým, než môžu byť použité. Keď sa vygeneruje tento blok, bol vysielaný do siete, kde má byť pridaný do block chain. Ak sa nepodarí dostať ho do block chain, jeho stav sa zmení na "Neprijatý", a nebude použiteľný. Toto sa môže občas stať, ak iný uzol generuje blok v priebehu niekoľkých sekúnd pred Vami. {60 ?} + + Generated coins must mature 510 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. - Generované mince musia zrieť 510 blokov pred tým, než môžu byť použité. Keď sa vygeneruje tento blok, bol vysielaný do siete, kde má byť pridaný do block chain. Ak sa nepodarí dostať ho do block chain, jeho stav sa zmení na "Neprijatý", a nebude použiteľný. Toto sa môže občas stať, ak iný uzol generuje blok v priebehu niekoľkých sekúnd pred Vami. + Generované mince musia zrieť 510 blokov pred tým, než môžu byť použité. Keď sa vygeneruje tento blok, bol vysielaný do siete, kde má byť pridaný do block chain. Ak sa nepodarí dostať ho do block chain, jeho stav sa zmení na "Neprijatý", a nebude použiteľný. Toto sa môže občas stať, ak iný uzol generuje blok v priebehu niekoľkých sekúnd pred Vami. @@ -2292,7 +2612,7 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< nepravda - + , has not been successfully broadcast yet , ešte nebola úspešne odoslaná @@ -2318,7 +2638,7 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< TransactionTableModel - + Date Dátum @@ -2350,10 +2670,19 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Open for %n more block(s) - Otvoriť pre %n ďalší blokOtvoriť pre %n ďalšie blokyOtvoriť pre %n ďalšie bloky + + Otvoriť pre %n ďalší blok + Otvoriť pre %n ďalšie bloky + Otvoriť pre %n ďalšie bloky + - + + Narration + + + + Offline Offline @@ -2418,7 +2747,7 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< (n/a) - + Transaction status. Hover over this field to show number of confirmations. Status transakcie. Pohybujte myšou nad týmto poľom a zjaví sa počet potvrdení. @@ -2613,29 +2942,20 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - WalletModel + Triangles-core - - Sending... - Posielam... - - - - bitcoin-core - - - buynowcoin version - buynowcoin verzia + triangles version + triangles verzia - + Usage: Použitie: - Send command to -server or buynowcoind - Pošli príkaz na -server alebo buynowcoind + Send command to -server or trianglesd + Pošli príkaz na -server alebo trianglesd @@ -2654,13 +2974,13 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - Specify configuration file (default: buynowcoin.conf) - Zadajte konfiguračný súbor (predvolené: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Zadajte konfiguračný súbor (predvolené: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Zadajte pid súbor (predvolené: buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + Zadajte pid súbor (predvolené: trianglesd.pid) @@ -2673,7 +2993,22 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Určiť priečinok s dátami - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Veľkosť vyrovnávajúcej pamäte pre databázu v megabytoch (predvolené:25) @@ -2808,12 +3143,11 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Varovanie: -paytxfee je nastavené veľmi vysoko. Toto sú transakčné poplatky ktoré zaplatíte ak odošlete transakciu. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Upozornenie: Skontrolujte, že dátum a čas počítača sú správne! Ak je Váš čas nesprávny buynowcoin nebude pracovať správne. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Upozornenie: Skontrolujte, že dátum a čas počítača sú správne! Ak je Váš čas nesprávny triangles nebude pracovať správne. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Varovanie: Chyba pri čítaní wallet.dat! Všetky kľúče načítané správne, ale transakčné dáta alebo položky adresára môže chýbať alebo byť nesprávne. @@ -2899,8 +3233,8 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL možnosť: (pozrite Bitcoin Wiki pre návod na nastavenie SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL možnosť: (pozrite Triangles Wiki pre návod na nastavenie SSL) @@ -2960,17 +3294,52 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Použiť proxy server k získaniu Tor skrytých služieb (predvolené: rovnaká ako -proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Užívateľské meno pre JSON-RPC spojenia - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Overenie integrity databázy ... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! VAROVANIE: synchronizovaný porušený checkpoint detekovaný, ale preskočený! @@ -2995,31 +3364,30 @@ Sumy nižšie ako 0,546 násobok minimálneho poplatku sú zobrazené ako DUST.< Heslo pre JSON-rPC spojenia - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, musíte nastaviť rpcpassword v konfiguračnom súbore: + %s, musíte nastaviť rpcpassword v konfiguračnom súbore: %s Je odporúčané použiť nasledujúce náhodné heslo: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (Nemusíte si pamätať toto heslo) Užívateľské meno a heslo nesmú byť rovnaké. Ak súbor neexistuje, vytvorte ho s oprávneniami súborov vlastníkov iba na čítatanie. Odporúča sa tiež nastaviť alertnotify, takže budete upozornení na problémy; -napríklad: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +napríklad: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - + Find peers using internet relay chat (default: 0) Nájsť peerov pomocou Internet Relay Chat (predvolené: 1) {0)?} @@ -3139,17 +3507,15 @@ napríklad: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@fo Peňaženka %s bydlisko mimo dátový adresár %s. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Nemožno získať zámok na dátový adresár %s. buynowcoin už pravdepodobne beží. + Cannot obtain a lock on data directory %s. triangles is probably already running. + Nemožno získať zámok na dátový adresár %s. triangles už pravdepodobne beží. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Nemôžem sa pripojiť k %s na tomto počítači (bind vrátil chybu %d, %s) @@ -3179,17 +3545,15 @@ napríklad: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@fo Chyba načítania wallet.dat: Peňaženka je poškodená - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Chyba pri načítaní wallet.dat: Peňaženka vyžaduje novšiu verziu buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Chyba pri načítaní wallet.dat: Peňaženka vyžaduje novšiu verziu triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - Peňaženka potrebuje byť prepísaná: reštartujte buynowcoin k dokončeniu + Wallet needed to be rewritten: restart triangles to complete + Peňaženka potrebuje byť prepísaná: reštartujte triangles k dokončeniu - + Error loading wallet.dat Chyba načítania wallet.dat @@ -3254,12 +3618,11 @@ napríklad: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@fo Pridať nód na pripojenie a pokus o udržanie pripojenia otvoreného - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Nemôžem sa pripojiť na %s na tomto počítači. buynowcoin je pravdepodobne už beží. + Unable to bind to %s on this computer. triangles is probably already running. + Nemôžem sa pripojiť na %s na tomto počítači. triangles je pravdepodobne už beží. - + Fee per KB to add to transactions you send Poplatok za KB pridať do transakcií, ktoré odosielate @@ -3318,4 +3681,543 @@ If the file does not exist, create it with owner-readable-only file permissions. Ak súbor neexistuje, vytvor ho s oprávnením pre čítanie len vlastníkom (owner-readable-only) - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Peňaženka + + + + &Overview + &Prehľad + + + + Show general overview of wallet + Zobraziť celkový prehľad o peňaženke + + + + &Send coins + &Poslať mince + + + + Send coins to a TRI address + + + + + &Receive coins + &Prijať mince + + + + Show the list of addresses for receiving payments + Zobraziť zoznam adries pre príjem platieb + + + + &Transactions + &Transakcie + + + + Browse transaction history + Prechádzať históriu transakcií + + + + &Address Book + &Zoznam + + + + Edit the list of stored addresses and labels + Úprava zoznamu uložených adries a popisov + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Ukončiť + + + + Quit application + Ukončiť program + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + O &Qt + + + + Show information about Qt + Zobrazit informácie o Qt + + + + &Options... + &Možnosti... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + Zobraziť / skryť + + + + &Encrypt Wallet... + &Zašifrovať Peňaženku... + + + + Encrypt or decrypt wallet + Zašifrovať alebo dešifrovať peňaženku + + + + &Backup Wallet... + &Backup peňaženku... + + + + Backup wallet to another location + Zálohovať peňaženku na iné miesto + + + + &Change Passphrase... + &Zmena Hesla... + + + + Change the passphrase used for wallet encryption + Zmeniť heslo použité na šifrovanie peňaženky + + + + &Unlock Wallet... + &Odomknúť Peňaženku... + + + + Unlock wallet + Odomknúť peňaženku + + + + &Lock Wallet + &Zamknúť peňaženku + + + + Lock wallet + Zamknúť peňaženku + + + + Sign &message... + Podpísať &správu... + + + + &Verify message... + Overiť správu + + + + &Export... + &Export... + + + + Export the data in the current tab to a file + Exportovať dáta v aktuálnej karte do súboru + + + + &Debug window + &Okno pre ladenie + + + + Open debugging and diagnostic console + Otvor konzolu pre ladenie a diagnostiku + + + + &File + &Súbor + + + + &Settings + &Nastavenia + + + + &Help + &Pomoc + + + + Tabs toolbar + Lišta záložiek + + + + Actions toolbar + Actions panel + + + + + [testnet] + [testovacia sieť] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Synchronizácia so sieťou... + + + + ~%n block(s) remaining + + ~%n blok zostáva + ~%n blokov zostáva + ~%n blokov zostáva + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Stiahnutých %1 of %2 blokov z histórie transakcií (%3% hotovo). + + + + Downloaded %1 blocks of transaction history. + Stiahnutých %1 blokov z histórie transakcií. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + pred %n sekundou + pred %n sekundami + pred %n sekundami + + + + + %n minute(s) ago + + pred %n minutou + pred %n minutami + pred %n minutami + + + + + %n hour(s) ago + + pred %n hodinou + pred %n hodinami + pred %n hodinami + + + + + %n day(s) ago + + pred %n dňom + pred %n dňami + pred %n dňami + + + + + Up to date + Aktualizovaný + + + + Catching up... + Sťahujem... + + + + Last received block was generated %1. + Posledný prijatý blok bol vytvorený %1. + + + + 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? + Táto transakcia je nad limit veľkosti. Stále to môžete poslať za poplatok %1, ktorý ide uzlom spracujúcim vaše transakcie, čím pomáhajú podporovať sieť. Chcete platiť poplatok? + + + + Confirm transaction fee + Potvrdte poplatok transakcie + + + + Sent transaction + Odoslané transakcie + + + + Incoming transaction + Prijaté transakcie + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Dátum: %1 +Suma: %2 +Typ: %3 +Adresa: %4 + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + URI manipulácia + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Peňaženka je <b>zašifrovaná</b> a momentálne <b>odomknutá</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Peňaženka je <b>zašifrovaná</b> a momentálne <b>zamknutá</b> + + + + Backup Wallet + Zálohovanie Peňaženky + + + + Wallet Data (*.dat) + Dáta Peňaženky (*.dat) + + + + Backup Failed + Zálohovanie Zlyhalo + + + + There was an error trying to save the wallet data to the new location. + Došlo k chybe pri pokuse o uloženie dát peňaženky do nového umiestnenia. + + + + %n second(s) + + %n sekunda + %n sekúnd + %n sekúnd + + + + + %n minute(s) + + %n minúta + %n minút + %n minút + + + + + %n hour(s) + + %n hodina + %n hodiny + %n hodín + + + + + %n day(s) + + %n deň + %n dni + %n dní + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Stávkovanie.<br>Vaša váha je %1<br>Sieť váha je %2<br>Odhadovaný čas na zarobenie odmeny je %3 + + + + Not staking because wallet is locked + Nestávkujem pretože peňaženka je zamknutá + + + + Not staking because wallet is offline + Nestávkujem pretože peňaženka je vypnutá + + + + Not staking because wallet is syncing + Nestávkujem pretože peňaženka sa synchronizuje + + + + Not staking because you don't have mature coins + Nestávkujem pretože nemáte odležané mince + + + + Not staking + Not staking + + + Show information about triangles + Zobraziť informácie o triangles + + + Send coins to a triangles address + Poslať mince na triangles adresu + + + Modify configuration options for triangles + Upraviť možnosti konfigurácie pre triangles + + + triangles + triangles + + + &About triangles + &O triangles + + + triangles client + triangles client + + + %n active connection(s) to triangles network + + %n aktívne spojenie s triangles sieťov + %n aktívnych spojení s triangles sieťov + %n aktívnych spojení s triangles sieťov + + + + About triangles card + O triangles karte + + + Show information about triangles card + Zobraziť informácie o triangles karte + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URI nemožno analyzovať! To môže byť spôsobené neplatnou triangles adresu alebo chybnými URI parametrami. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Došlo k závažnej chybe. triangles už nemôže pokračovať bezpečne a bude ukončený. + + + + WalletModel + + + Sending... + Posielam... + + + diff --git a/src/qt/locale/triangles_sl_SI.qm b/src/qt/locale/triangles_sl_SI.qm new file mode 100644 index 0000000..c25db17 Binary files /dev/null and b/src/qt/locale/triangles_sl_SI.qm differ diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/triangles_sl_SI.ts similarity index 67% rename from src/qt/locale/bitcoin_sl_SI.ts rename to src/qt/locale/triangles_sl_SI.ts index c148f9c..e34e9fc 100644 --- a/src/qt/locale/bitcoin_sl_SI.ts +++ b/src/qt/locale/triangles_sl_SI.ts @@ -1,25 +1,30 @@ - + + + AboutDialog - About buynowcoin - O buynowcoin + About Triangles + O triangles + + + <b>triangles</b> version + <b>triangles</b> verzija - <b>buynowcoin</b> version - <b>buynowcoin</b> verzija + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -42,12 +47,17 @@ Ta proizvod vključuje softver razvit s strani projekta OpenSSL za uporabo v Ope Imenik - + + These are your Triangles 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. + + + + Double-click to edit address or label Dvakrat kliknite za urejanje naslovov ali oznak - + Create a new address Ustvari nov naslov @@ -57,17 +67,21 @@ Ta proizvod vključuje softver razvit s strani projekta OpenSSL za uporabo v Ope Kopiraj trenutno izbrani naslov v odložišče - + + Sign a message to prove you own a TRI address + + + + &New Address &Nov naslov - - These are your buynowcoin 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. - To so vaši buynowcoin naslovi za prejemanje plačil. Priporočeno je da vsakemu pošiljatelju namenite drugega in tako dobite večji pregled nad svojimi nakazili. + These are your triangles 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. + To so vaši triangles naslovi za prejemanje plačil. Priporočeno je da vsakemu pošiljatelju namenite drugega in tako dobite večji pregled nad svojimi nakazili. - + &Copy Address &Kopiraj naslov @@ -77,27 +91,30 @@ Ta proizvod vključuje softver razvit s strani projekta OpenSSL za uporabo v Ope Prikaži &QR kodo - - Sign a message to prove you own a buynowcoin address - Podpišite sporočilo, kot dokazilo lastništva buynowcoin naslova + Sign a message to prove you own a triangles address + Podpišite sporočilo, kot dokazilo lastništva triangles naslova - + Sign &Message Podpiši &sporočilo - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Izbriši izbran naslov iz seznama - - Verify a message to ensure it was signed with a specified buynowcoin address - Potrdi sporočilo, da zagotovite, da je bilo podpisano z izbranim buynowcoin naslovom + Verify a message to ensure it was signed with a specified triangles address + Potrdi sporočilo, da zagotovite, da je bilo podpisano z izbranim triangles naslovom - + &Verify Message &Potrdi sporočilo @@ -140,7 +157,7 @@ Ta proizvod vključuje softver razvit s strani projekta OpenSSL za uporabo v Ope AddressTableModel - + Label Oznaka @@ -243,7 +260,12 @@ Ta proizvod vključuje softver razvit s strani projekta OpenSSL za uporabo v Ope Ali ste prepričani, da želite šifrirati vašo denarnico? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. POMEMBNO: Vsaka predhodna varnostna kopija datoteke denarnice mora biti nadomeščena z novo datoteko šifrirane denarnice. Zaradi varnostnih razlogov bodo namreč prejšnje varnostne kopije datoteke nešifrirane denarnice postale neuporabne takoj ko boste pričeli uporabljati novo, šifrirano denarnico. @@ -260,12 +282,11 @@ Ta proizvod vključuje softver razvit s strani projekta OpenSSL za uporabo v Ope Denarnica šifrirana - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin se bo sedaj zaprl, da dokonča proces šifriranje. Pomnite, da tudi šifriranje vaše denarnice ne more v celoti zaščititi vaših kovancev pred krajo z zlonamernimi programi in računalniškimi virusi, če ti okužijo vaš računalnik. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles se bo sedaj zaprl, da dokonča proces šifriranje. Pomnite, da tudi šifriranje vaše denarnice ne more v celoti zaščititi vaših kovancev pred krajo z zlonamernimi programi in računalniškimi virusi, če ti okužijo vaš računalnik. - + @@ -306,431 +327,6 @@ Ta proizvod vključuje softver razvit s strani projekta OpenSSL za uporabo v Ope Geslo denarnice je bilo uspešno spremenjeno. - - BitcoinGUI - - - Sign &message... - Podpiši &sporočilo ... - - - - Synchronizing with network... - Sinhroniziranje z omrežjem ... - - - - &Overview - &Pregled - - - - Show general overview of wallet - Pokaži splošen pregled denarnice - - - - &Transactions - &Transakcije - - - - Browse transaction history - Brskaj po zgodovini transakcij - - - - &Address Book - &Imenik - - - - Edit the list of stored addresses and labels - Uredi seznam shranjenih naslovov in oznak - - - - &Receive coins - &Prejmi kovance - - - - Show the list of addresses for receiving payments - Prikaži seznam naslovov za prejemanje plačil. - - - - &Send coins - &Pošlji kovance - - - - E&xit - I&zhod - - - - Quit application - Izhod iz aplikacije - - - - Show information about buynowcoin - Pokaži informacije o buynowcoin - - - - About &Qt - O &Qt - - - - Show information about Qt - Prikaži informacije o Qt - - - - &Options... - &Možnosti ... - - - - &Encrypt Wallet... - &Šifriraj denarnico ... - - - - &Backup Wallet... - &Ustvari varnostno kopijo denarnice ... - - - - &Change Passphrase... - &Spremeni geslo ... - - - - ~%n block(s) remaining - Ostaja ~%n bloka Ostaja ~%n blokovOstaja ~%n blokovOstaja ~%n blokov - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Prenešen %1 od %2 blokov transakcijske zgodovine (%3% opravljeno). - - - - &Export... - &Izvozi... - - - - Send coins to a buynowcoin address - Pošlji kovance na buynowcoin naslov - - - - Modify configuration options for buynowcoin - Spremeni nastavitve za buynowcoin - - - - Export the data in the current tab to a file - Izvozi podatke v izbranem zavihku v datoteko - - - - Encrypt or decrypt wallet - Šifriraj ali dešifriraj denarnico - - - - Backup wallet to another location - Napravi varnostno kopijo denarnice na drugo lokacijo - - - - Change the passphrase used for wallet encryption - Spremeni šifrirno geslo denarnice - - - - &Debug window - &Razhroščevalno okno - - - - Open debugging and diagnostic console - Odpri razhroščevalno in diagnostično konzolo - - - - &Verify message... - %Potrdi sporočilo ... - - - - buynowcoin - buynowcoin - - - - Wallet - Denarnica - - - - &About buynowcoin - &O buynowcoin - - - - &Show / Hide - &Prikaži / Skrij - - - - Unlock wallet - Odkleni denarnico - - - - &Lock Wallet - &Zakleni denarnico - - - - Lock wallet - Zakleni denarnico - - - - &File - &Datoteka - - - - &Settings - &Nastavitve - - - - &Help - &Pomoč - - - - Tabs toolbar - Orodna vrstica zavihkov - - - - Actions toolbar - Orodna vrsticai - - - - - [testnet] - [testnet] - - - - - buynowcoin client - buynowcoin program - - - - %n active connection(s) to buynowcoin network - %n aktivne povezave na buynowcoin omrežje%n aktivnih povezav na buynowcoin omrežje%n aktivnih povezav na buynowcoin omrežje%n aktivnih povezav na buynowcoin omrežje - - - - Downloaded %1 blocks of transaction history. - Prenešenih %1 blokov transakcijske zgodovine. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Deležeje [Staking].<br>Teža vašega deleženja je %1<br>Teža celotne mreže deleženja je %2<br>Pričakovan čas do prejema nagrade %3 - - - - Not staking because wallet is locked - Ne deležite ker je denarnica zakljenjena - - - - Not staking because wallet is offline - Ne deležite ker denarnica ni povezana - - - - Not staking because wallet is syncing - Ne deležite ker se denarnica sinhronizira z omrežjem - - - - Not staking because you don't have mature coins - Ne deležite ker nimate zrelih kovancev. - - - - %n second(s) ago - pred %n sekundopred %n sekundamapred %n sekundamipred %n sekundami - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - &Odkleni denarnico... - - - - %n minute(s) ago - Pred %n minutoPred %n minutamaPred %n minutamiPred %n minutami - - - - %n hour(s) ago - Pred %n uro.Pred %n urama.Pred %n urami.Pred %n urami. - - - - %n day(s) ago - Pred %n dnevom.Pred %n dnevoma.Pred %n dnevi.Pred %n dnevi. - - - - Up to date - Posodobljeno - - - - Catching up... - Pridobivanje ... - - - - Last received block was generated %1. - Zadnji prejeti blok je bil ustvarjen %1. - - - - 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? - Ta transakcija je prekoračila limit. Še vedno jo lahko pošljete za plačilo %1 transakcije, ki je plačano vsem delom omrežja kot deležnina in pomaga zagotavljati njegovo varnost. Ali želite plačati provizijo? - - - - Confirm transaction fee - Potrdi transakcijsko provizijo - - - - Sent transaction - Odlivi - - - - Incoming transaction - Prilivi - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Datum: %1 -Količina: %2 -Vrsta: %3 -Naslov: %4 - - - - - - URI handling - Rokovanje z URI - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URI ne more biti razčlenjen! To se lahko zgodi zaradi neveljavnega buynowcoin naslova ali slabih parametrov URI. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Denarnica je <b>šifrirana</b> in trenutno <b>odklenjena</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Denarnica je <b>šifrirana</b> in trenutno <b>zaklenjena</b> - - - - Backup Wallet - Napravi varnostno kopijo denarnice - - - - Wallet Data (*.dat) - Datoteka denarnice (*.dat) - - - - Backup Failed - Ustvarjanje varnostne kopije je spodeltelo - - - - There was an error trying to save the wallet data to the new location. - Prišlo je do napake ob poskušanju shranjevanja datoteke denarnice na novo lokacijo. - - - - %n second(s) - %n sekundo%n sekundama%n sekund%n sekund - - - - %n minute(s) - %n minuto%n minutama%n minut%n minut - - - - %n hour(s) - %n ura%n uri%n ure%n ura - - - - %n day(s) - %n dan%n dneva%n dnevi%n dni - - - - Not staking - Ne deležite - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Prišlo je do usodne napake. Program buynowcoin se ne more več varno nadaljevati in se bo zato zaprl. - - ClientModel @@ -1035,37 +631,46 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Naslov povezan s tem vnosom v imeniku. Spremenite ga lahko le za naslove odlivov. - + + &Stealth Address + + + + New receiving address Nov naslov za prilive - + New sending address Nov naslov za odlive - + Edit receiving address Uredi naslov za prilive - + Edit sending address Uredi naslov za odlive - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Vnešeni naslov "&1" je že v imeniku. - - The entered address "%1" is not a valid buynowcoin address. - Vneseni naslov "%1" ni veljaven buynowcoin naslov. + The entered address "%1" is not a valid triangles address. + Vneseni naslov "%1" ni veljaven triangles naslov. - + Could not unlock wallet. Denarnice ni bilo mogoče odkleniti. @@ -1078,18 +683,22 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version različica - + + + Triangles-Qt + + + + Usage: Uporaba: @@ -1119,6 +728,347 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Prikaži splash screen ob zagonu (default: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Vrsta + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Oznaka + + + + To Address + + + + + From Address + + + + + Message + Sporočilo + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (ni oznake) + + + + MessagePage + + + Address Book + Imenik + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopiraj trenutno izbrani naslov v odložišče + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Izbriši izbran naslov iz seznama + + + + &Delete + &Izbriši + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Datoteka s podatki, ločenimi z vejico (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + Napaka pri pisanju na datoteko %1. + + OptionsDialog @@ -1152,17 +1102,15 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Rezerva - - Automatically start buynowcoin after logging in to the system. - Avtomatično zaženi buynowcoin ob zagonu sistema. + Automatically start triangles after logging in to the system. + Avtomatično zaženi triangles ob zagonu sistema. - - &Start buynowcoin on system login - &Zaženi buynowcoin ob prijavi v sistem + &Start triangles on system login + &Zaženi triangles ob prijavi v sistem - + 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. Loči podatkovne baze blokov in naslovov ob zaustavitvi. To pomeni da jih lahko prenesete na drugo lokacijo, a upočasni zaustavitev. Denarnica je vedno ločena. @@ -1177,19 +1125,37 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". &Omrežje - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Avtomatično odpri vrata na routerju za buynowcoin program. To deluje le če vaš router podpira UPnP in je ta omogočen. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Avtomatično odpri vrata na routerju za triangles program. To deluje le če vaš router podpira UPnP in je ta omogočen. - + Map port using &UPnP Začrtaj vrata z &UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Poveži se na buynowcoin omrežje skozi SOCKS proxy (npr. ko se povezujete prek Tora) + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Poveži se na triangles omrežje skozi SOCKS proxy (npr. ko se povezujete prek Tora) + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1263,11 +1229,20 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - Tu lahko nastavite jezik uporabniškega vmesnika. Nastavitve bodo pričele delovati ob ponovnem zagonu buynowcoin aplikacije. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + Tu lahko nastavite jezik uporabniškega vmesnika. Nastavitve bodo pričele delovati ob ponovnem zagonu triangles aplikacije. + + + &Unit to show amounts in: &Enota prikaza količin: @@ -1277,12 +1252,11 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Izberite privzeto delitev enot, ki naj bodo prikazane v vmesniku ob pošiljanju kovancev. - - Whether to show buynowcoin addresses in the transaction list or not. - Izbira prikaza buynowcoin naslovov v seznamu transakcij. + Whether to show triangles addresses in the transaction list or not. + Izbira prikaza triangles naslovov v seznamu transakcij. - + &Display addresses in transaction list &Prikaz naslovov v seznamu transakcij @@ -1325,8 +1299,12 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - This setting will take effect after restarting buynowcoin. - Ta nastavitev bo pričela delovati ob ponovnem zagonu buynowcoin aplikacije + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Ta nastavitev bo pričela delovati ob ponovnem zagonu triangles aplikacije @@ -1342,13 +1320,11 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Oblika - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - Prikazane informacije so morda zastarele. Vaša denarnica se avtomatično sinhronizira z buynowcoin omrežjem, ko je vzpostavljena povezava, toda ta proces še ni bil zaključen. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + Prikazane informacije so morda zastarele. Vaša denarnica se avtomatično sinhronizira z triangles omrežjem, ko je vzpostavljena povezava, toda ta proces še ni bil zaključen. - + Stake: Deleženje: @@ -1383,27 +1359,61 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Z deleženjem pridobljeni kovanci, ki še niso dozoreli. - + Total: Skupaj: - + Your current total balance Vaše trenutno skupno stanje - + <b>Recent transactions</b> <b>Pogoste transakcije</> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Znesek transakcij, ki še niso bile potrjene in se še ne upoštevajo v trenutnem stanju na računu. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Znesek kovancev, ki so bili v deleženju in se še ne upoštevajo v trenutnem stanju na računu. @@ -1504,7 +1514,17 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". &Informacije - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version OpenSSL različica v rabi @@ -1549,7 +1569,17 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Čas zadnjega bloka - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Odpri @@ -1559,12 +1589,11 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Možnosti ukazne vrstice. - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Prikaži buynowcoin-Qt sporočilo za pomoč , ki prikaže vse možnosti ukazne vrstice buynowcoin aplikacije + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Prikaži triangles-Qt sporočilo za pomoč , ki prikaže vse možnosti ukazne vrstice triangles aplikacije - + &Show &Prikaži @@ -1579,34 +1608,35 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Datum izgradnje - - buynowcoin - Debug window - buynowcoin - okno za odpravljanje napak + triangles - Debug window + triangles - okno za odpravljanje napak - - buynowcoin Core - buynowcoin jedro + triangles Core + triangles jedro - + Debug log file Razhroščevalna dnevniška datoteka - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Odpri buynowcoin datoteko zapisov odpravljanja napak iz trenutnega direktorija podatkov. Če so datoteke zapisov velike, to lahko traja nekaj sekund. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Odpri triangles datoteko zapisov odpravljanja napak iz trenutnega direktorija podatkov. Če so datoteke zapisov velike, to lahko traja nekaj sekund. - + Clear console Počisti konzolo + + Welcome to the triangles RPC console. + Dobrodošli v triangles RPC konzoli. + - Welcome to the buynowcoin RPC console. - Dobrodošli v buynowcoin RPC konzoli. + Welcome to the Triangles RPC console. + @@ -1630,6 +1660,7 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". + Send Coins Pošlji kovance @@ -1654,7 +1685,7 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Premalo sredstev! - + Quantity: Količina: @@ -1674,13 +1705,17 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Amount: Znesek: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1723,7 +1758,7 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". izbira spremembe naslova - + Send to multiple recipients at once Pošlji več prejemnikom hkrati @@ -1749,8 +1784,12 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1763,9 +1802,13 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". P&ošlji - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Vnesite buynowcoin naslov (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Vnesite triangles naslov (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1862,10 +1905,19 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". 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. Napaka: Transakcija je bila zavrnjena. To se je lahko zgodilo, če so bili kovanci v vaši denarnici že zapravljeni, na primer če ste uporabili kopijo wallet.dat in so bili kovanci zapravljeni v kopiji, a tu še niso bili označeni kot zapravljeni. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - OPOZORILO: Neveljaven buynowcoin naslov + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + OPOZORILO: Neveljaven triangles naslov @@ -1897,19 +1949,29 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - + Enter a label for this address to add it to your address book Vnesite oznako za ta naslov, ki bo shranjena v imenik + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Oznaka: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Naslov kamor želite poslati plačilo (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Naslov kamor želite poslati plačilo (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1936,10 +1998,225 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Remove this recipient Odstrani tega prejemnika + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Vnesite triangles naslov (npr. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Vnesite buynowcoin naslov (npr. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Izberite naslov iz imenika + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Prilepi naslov iz odložišča + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Pošlji več prejemnikom hkrati + + + + Add &Recipient + Dodaj &prejemnika + + + + Remove all transaction fields + Odstrani vsa polja transakcij + + + + Clear &All + + + + + Confirm the send action + Potrdi odlivno dejanje + + + + S&end + P&ošlji + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Ali ste prepričani, da želite poslati %1? + + + + and + in + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Prejemnikov naslov ni veljaven, prosimo če ga ponovno preverite. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Najdena kopija naslova, možnost pošiljanja na vsakega izmed naslov le enkrat ob pošiljanju. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Oblika + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Izberite naslov iz imenika + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Prilepi naslov iz odložišča + + + + Alt+P + Alt+P + + + + Remove this recipient + Odstrani tega prejemnika + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Vnesite oznako za ta naslov, ki bo shranjena v imenik + + + + &Label: + &Oznaka: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1962,8 +2239,8 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Naslov s katerim želite podpisati sporočilo (npr. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Naslov s katerim želite podpisati sporočilo (npr. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1999,11 +2276,20 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - Sign the message to prove you own this buynowcoin address - Podpišite sporočilo, kot dokazilo lastništva buynowcoin naslova + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Podpišite sporočilo, kot dokazilo lastništva triangles naslova + + + Reset all sign message fields Ponastavite vse polja sporočila s podpisom @@ -2026,34 +2312,45 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Naslov s katerim je bilo podpisano sporočilo (npr. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Naslov s katerim je bilo podpisano sporočilo (npr. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Potrdite sporočilo, da zagotovite, da je bilo podpisano z izbranim buynowcoin naslovom + Verify the message to ensure it was signed with the specified triangles address + Potrdite sporočilo, da zagotovite, da je bilo podpisano z izbranim triangles naslovom - + Reset all verify message fields Ponastavite vse polja sporočila potrditve - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Vnesite buynowcoin naslov (npr. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Vnesite triangles naslov (npr. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Kliknite "Podpiši sporočilo" za ustvaritev podpisa + + Enter triangles signature + Vnesite triangles podpis + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Vnesite buynowcoin podpis + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2132,7 +2429,12 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Open for %n block(s) - Odprt za %n blokOdprt za %n blokaOdprt za %n blokovOdprt za %n blokov + + Odprt za %n blok + Odprt za %n bloka + Odprt za %n blokov + Odprt za %n blokov + @@ -2162,7 +2464,12 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". , broadcast through %n node(s) - , predvajanje skozi %n vozlišče, predvajanje skozi %n vozlišči, predvajanje skozi %n vozlišč, predvajanje skozi %n vozlišč + + , predvajanje skozi %n vozlišče + , predvajanje skozi %n vozlišči + , predvajanje skozi %n vozlišč + , predvajanje skozi %n vozlišč + @@ -2208,14 +2515,19 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - + Credit Kredit - + matures in %n more block(s) - dozori čez %n blokdozori čez %n blokadozori čez %n blokovdozori čez %n blokov + + dozori čez %n blok + dozori čez %n bloka + dozori čez %n blokov + dozori čez %n blokov + @@ -2226,12 +2538,12 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - + Debit Dolg - + Transaction fee Provizija transakcije @@ -2251,14 +2563,18 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Opomba - + Transaction ID ID transakcije + Generated coins must mature 60 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. + Ustvarjeni kovanci morajo zoreti 510 blokov preden so lahko potrošeni. Ko ustvarite ta blok, je predvajan po mreži in nanizan v verigo blokov. Če mu priključitev na verigo spodleti, se bo njegovo stanje spremenilo v "ni sprejet" in ne bo razpoložljiv. To se lahko občasno zgodi, če drugo vozlišče ustvari blok par sekund pred vami. {60 ?} + + Generated coins must mature 510 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. - Ustvarjeni kovanci morajo zoreti 510 blokov preden so lahko potrošeni. Ko ustvarite ta blok, je predvajan po mreži in nanizan v verigo blokov. Če mu priključitev na verigo spodleti, se bo njegovo stanje spremenilo v "ni sprejet" in ne bo razpoložljiv. To se lahko občasno zgodi, če drugo vozlišče ustvari blok par sekund pred vami. + Ustvarjeni kovanci morajo zoreti 510 blokov preden so lahko potrošeni. Ko ustvarite ta blok, je predvajan po mreži in nanizan v verigo blokov. Če mu priključitev na verigo spodleti, se bo njegovo stanje spremenilo v "ni sprejet" in ne bo razpoložljiv. To se lahko občasno zgodi, če drugo vozlišče ustvari blok par sekund pred vami. @@ -2291,7 +2607,7 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". nepravilno - + , has not been successfully broadcast yet , še ni bil uspešno predvajan @@ -2317,7 +2633,7 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". TransactionTableModel - + Date Datum @@ -2349,10 +2665,20 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Open for %n more block(s) - Odprt še %n blokOdprt še %n blokaOdprt še %n blokovOdprt še %n blokov + + Odprt še %n blok + Odprt še %n bloka + Odprt še %n blokov + Odprt še %n blokov + - + + Narration + + + + Offline Nepovezan @@ -2417,7 +2743,7 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". (ni na voljo) - + Transaction status. Hover over this field to show number of confirmations. Stanje transakcije. Zapeljite z miško čez to polje za prikaz števila potrdil. @@ -2612,28 +2938,19 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - WalletModel + Triangles-core - - Sending... - Pošiljanje... - - - - bitcoin-core - - - buynowcoin version - buynowcoin različica + triangles version + triangles različica - + Usage: Uporaba: - Send command to -server or buynowcoind + Send command to -server or trianglesd Pošlji ukaz na -server ali blackoind @@ -2653,13 +2970,13 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - Specify configuration file (default: buynowcoin.conf) - Določi konfiguracijsko datoteko (privzeto: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Določi konfiguracijsko datoteko (privzeto: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Določi pid datoteko (privzeto: buynowcoin.pid) + Specify pid file (default: trianglesd.pid) + Določi pid datoteko (privzeto: triangles.pid) @@ -2672,7 +2989,22 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Določi podatkovni imenik - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Nastavi pomnilnik podatkovne zbirke v megabajtih (privzeto: 25) @@ -2807,12 +3139,11 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Opozorilo: -paytxfee je nastavljen zelo visoko! To je transakcijska provizija, ki jo boste plačali ob pošiljanju transakcije. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Opozorilo: Prosimo preverite svoj datum in čas svojega računalnika! Če je vaša ura nastavljena napačno buynowcoin ne bo deloval. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Opozorilo: Prosimo preverite svoj datum in čas svojega računalnika! Če je vaša ura nastavljena napačno triangles ne bo deloval. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Opozorilo: napaka pri branju wallet.dat! Vsi ključi so bili pravilno prebrani, podatki o transakciji ali imenik vnešenih naslovov so morda izgubljeni ali nepravilni. @@ -2898,8 +3229,8 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL možnosti: (glejte Bitcoin Wiki za navodla, kako nastaviti SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL možnosti: (glejte Triangles Wiki za navodla, kako nastaviti SSL) @@ -2959,17 +3290,52 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Uporabi proxy za povezavo s skritimi storitvami tora (privzeto: isto kot -proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Uporabniško ime za JSON-RPC povezave - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Potrdite neoporečnost baze podatkov... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! OPOZORILO: zaznana je bila kršitev s sinhronizirami točkami preverjanja, a je bila izpuščena. @@ -2994,32 +3360,31 @@ Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja". Geslo za JSON-RPC povezave - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, nastaviti morate rpcgeslo v konfiguracijski datoteki: + %s, nastaviti morate rpcgeslo v konfiguracijski datoteki: %s Priporočeno je, da uporabite naslednje naključno geslo: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (tega gesla si vam ni potrebno zapomniti) Uporabniško ime in geslo NE SMETA biti ista. Če datoteka ne obstaja, jo ustvarite z lastniškimi dovoljenji za datoteke. Prav tako je priporočeno, da nastavite alernotify, tkako da vas opozori na probleme; -na primer: alertnotify=echo %%s | mail -s "buynowcoin Alarm" admin@foo.com +na primer: alertnotify=echo %%s | mail -s "triangles Alarm" admin@foo.com - + Find peers using internet relay chat (default: 0) Najdi soležnike prek irca (privzeto: 0) @@ -3121,7 +3486,7 @@ na primer: alertnotify=echo %%s | mail -s "buynowcoin Alarm" admin@foo Error: Wallet unlocked for staking only, unable to create transaction. - + @@ -3139,17 +3504,15 @@ na primer: alertnotify=echo %%s | mail -s "buynowcoin Alarm" admin@foo Denarnica %s se nahaja zunaj datotečnega imenika %s. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Ni bilo mogoče najti podatkovnega imenika %s. Aplikacija buynowcoin je verjetno že zagnana. + Cannot obtain a lock on data directory %s. triangles is probably already running. + Ni bilo mogoče najti podatkovnega imenika %s. Aplikacija triangles je verjetno že zagnana. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Na tem računalniku je bilo nemogoče vezati na %s (bind returned error %d, %s) @@ -3179,17 +3542,15 @@ na primer: alertnotify=echo %%s | mail -s "buynowcoin Alarm" admin@foo Napaka pri nalaganju wallet.dat: denarnica pokvarjena - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Napaka pri nalaganju wallet.dat: denarnica zahteva novejšo verzijo buynowcoin + Error loading wallet.dat: Wallet requires newer version of triangles + Napaka pri nalaganju wallet.dat: denarnica zahteva novejšo verzijo triangles - - Wallet needed to be rewritten: restart buynowcoin to complete - Denarnica mora biti prepisana: ponovno odprite buynowcoin za dokončanje + Wallet needed to be rewritten: restart triangles to complete + Denarnica mora biti prepisana: ponovno odprite triangles za dokončanje - + Error loading wallet.dat Napaka pri nalaganju wallet.dat @@ -3254,12 +3615,11 @@ na primer: alertnotify=echo %%s | mail -s "buynowcoin Alarm" admin@foo Dodaj vozlišče za povezavo nanj in skušaj le to obdržati odprto - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Navezava v %s na tem računalniku ni mogoča buynowcoin aplikacija je verjetno že zagnana. + Unable to bind to %s on this computer. triangles is probably already running. + Navezava v %s na tem računalniku ni mogoča triangles aplikacija je verjetno že zagnana. - + Fee per KB to add to transactions you send Provizija na KB ki jo morate dodati transakcijam, ki jih pošiljate @@ -3318,4 +3678,547 @@ If the file does not exist, create it with owner-readable-only file permissions. Če datoteka ne obstaja, jo ustvarite z lastniškimi dovoljenji za datoteke. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Denarnica + + + + &Overview + &Pregled + + + + Show general overview of wallet + Pokaži splošen pregled denarnice + + + + &Send coins + &Pošlji kovance + + + + Send coins to a TRI address + + + + + &Receive coins + &Prejmi kovance + + + + Show the list of addresses for receiving payments + Prikaži seznam naslovov za prejemanje plačil. + + + + &Transactions + &Transakcije + + + + Browse transaction history + Brskaj po zgodovini transakcij + + + + &Address Book + &Imenik + + + + Edit the list of stored addresses and labels + Uredi seznam shranjenih naslovov in oznak + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + I&zhod + + + + Quit application + Izhod iz aplikacije + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + O &Qt + + + + Show information about Qt + Prikaži informacije o Qt + + + + &Options... + &Možnosti ... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Prikaži / Skrij + + + + &Encrypt Wallet... + &Šifriraj denarnico ... + + + + Encrypt or decrypt wallet + Šifriraj ali dešifriraj denarnico + + + + &Backup Wallet... + &Ustvari varnostno kopijo denarnice ... + + + + Backup wallet to another location + Napravi varnostno kopijo denarnice na drugo lokacijo + + + + &Change Passphrase... + &Spremeni geslo ... + + + + Change the passphrase used for wallet encryption + Spremeni šifrirno geslo denarnice + + + + &Unlock Wallet... + &Odkleni denarnico... + + + + Unlock wallet + Odkleni denarnico + + + + &Lock Wallet + &Zakleni denarnico + + + + Lock wallet + Zakleni denarnico + + + + Sign &message... + Podpiši &sporočilo ... + + + + &Verify message... + %Potrdi sporočilo ... + + + + &Export... + &Izvozi... + + + + Export the data in the current tab to a file + Izvozi podatke v izbranem zavihku v datoteko + + + + &Debug window + &Razhroščevalno okno + + + + Open debugging and diagnostic console + Odpri razhroščevalno in diagnostično konzolo + + + + &File + &Datoteka + + + + &Settings + &Nastavitve + + + + &Help + &Pomoč + + + + Tabs toolbar + Orodna vrstica zavihkov + + + + Actions toolbar + Orodna vrsticai + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + + Synchronizing with network... + Sinhroniziranje z omrežjem ... + + + + ~%n block(s) remaining + + Ostaja ~%n bloka + Ostaja ~%n blokov + Ostaja ~%n blokov + Ostaja ~%n blokov + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Prenešen %1 od %2 blokov transakcijske zgodovine (%3% opravljeno). + + + + Downloaded %1 blocks of transaction history. + Prenešenih %1 blokov transakcijske zgodovine. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + pred %n sekundo + pred %n sekundama + pred %n sekundami + pred %n sekundami + + + + + %n minute(s) ago + + Pred %n minuto + Pred %n minutama + Pred %n minutami + Pred %n minutami + + + + + %n hour(s) ago + + Pred %n uro. + Pred %n urama. + Pred %n urami. + Pred %n urami. + + + + + %n day(s) ago + + Pred %n dnevom. + Pred %n dnevoma. + Pred %n dnevi. + Pred %n dnevi. + + + + + Up to date + Posodobljeno + + + + Catching up... + Pridobivanje ... + + + + Last received block was generated %1. + Zadnji prejeti blok je bil ustvarjen %1. + + + + 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? + Ta transakcija je prekoračila limit. Še vedno jo lahko pošljete za plačilo %1 transakcije, ki je plačano vsem delom omrežja kot deležnina in pomaga zagotavljati njegovo varnost. Ali želite plačati provizijo? + + + + Confirm transaction fee + Potrdi transakcijsko provizijo + + + + Sent transaction + Odlivi + + + + Incoming transaction + Prilivi + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Datum: %1 +Količina: %2 +Vrsta: %3 +Naslov: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + Rokovanje z URI + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Denarnica je <b>šifrirana</b> in trenutno <b>odklenjena</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Denarnica je <b>šifrirana</b> in trenutno <b>zaklenjena</b> + + + + Backup Wallet + Napravi varnostno kopijo denarnice + + + + Wallet Data (*.dat) + Datoteka denarnice (*.dat) + + + + Backup Failed + Ustvarjanje varnostne kopije je spodeltelo + + + + There was an error trying to save the wallet data to the new location. + Prišlo je do napake ob poskušanju shranjevanja datoteke denarnice na novo lokacijo. + + + + %n second(s) + + %n sekundo + %n sekundama + %n sekund + %n sekund + + + + + %n minute(s) + + %n minuto + %n minutama + %n minut + %n minut + + + + + %n hour(s) + + %n ura + %n uri + %n ure + %n ura + + + + + %n day(s) + + %n dan + %n dneva + %n dnevi + %n dni + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Deležeje [Staking].<br>Teža vašega deleženja je %1<br>Teža celotne mreže deleženja je %2<br>Pričakovan čas do prejema nagrade %3 + + + + Not staking because wallet is locked + Ne deležite ker je denarnica zakljenjena + + + + Not staking because wallet is offline + Ne deležite ker denarnica ni povezana + + + + Not staking because wallet is syncing + Ne deležite ker se denarnica sinhronizira z omrežjem + + + + Not staking because you don't have mature coins + Ne deležite ker nimate zrelih kovancev. + + + + Not staking + Ne deležite + + + Show information about triangles + Pokaži informacije o triangles + + + Send coins to a triangles address + Pošlji kovance na triangles naslov + + + Modify configuration options for triangles + Spremeni nastavitve za triangles + + + triangles + triangles + + + &About triangles + &O triangles + + + triangles client + triangles program + + + %n active connection(s) to triangles network + + %n aktivne povezave na triangles omrežje + %n aktivnih povezav na triangles omrežje + %n aktivnih povezav na triangles omrežje + %n aktivnih povezav na triangles omrežje + + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URI ne more biti razčlenjen! To se lahko zgodi zaradi neveljavnega triangles naslova ali slabih parametrov URI. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Prišlo je do usodne napake. Program triangles se ne more več varno nadaljevati in se bo zato zaprl. + + + + WalletModel + + + Sending... + Pošiljanje... + + + diff --git a/src/qt/locale/bitcoin_sq.qm b/src/qt/locale/triangles_sq.qm similarity index 55% rename from src/qt/locale/bitcoin_sq.qm rename to src/qt/locale/triangles_sq.qm index a16f1bf..dc9eea0 100644 Binary files a/src/qt/locale/bitcoin_sq.qm and b/src/qt/locale/triangles_sq.qm differ diff --git a/src/qt/locale/bitcoin_sq.ts b/src/qt/locale/triangles_sq.ts similarity index 57% rename from src/qt/locale/bitcoin_sq.ts rename to src/qt/locale/triangles_sq.ts index 4326908..6725bf7 100644 --- a/src/qt/locale/bitcoin_sq.ts +++ b/src/qt/locale/triangles_sq.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Klikoni 2 herë për të ndryshuar adressën ose etiketën - + Create a new address Krijo një adresë të re @@ -52,69 +53,69 @@ This product includes software developed by the OpenSSL Project for use in the O Kopjo adresën e zgjedhur në memorjen e sistemit - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Fshi Copy &Label - + &Edit - + Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Etiketë @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -298,428 +299,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - Duke u sinkronizuar me rrjetin... - - - - &Overview - &Përmbledhje - - - - Show general overview of wallet - Trego një përmbledhje te përgjithshme të portofolit - - - - &Transactions - &Transaksionet - - - - Browse transaction history - Shfleto historinë e transaksioneve - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - Mbyllni aplikacionin - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - &Opsione - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - Ndrysho frazkalimin e përdorur per enkriptimin e portofolit - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Skedar - - - - &Settings - &Konfigurimet - - - - &Help - &Ndihmë - - - - Tabs toolbar - Shiriti i mjeteve - - - - Actions toolbar - - - - - - [testnet] - [testo rrjetin] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - I azhornuar - - - - Catching up... - Duke u azhornuar... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Dërgo transaksionin - - - - Incoming transaction - Transaksion në ardhje - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Portofoli po <b> enkriptohet</b> dhe është <b> i ç'kyçur</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Portofoli po <b> enkriptohet</b> dhe është <b> i kyçur</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,67 +315,67 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -805,7 +385,7 @@ Address: %4 Label - + Etiketë @@ -820,118 +400,118 @@ Address: %4 Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -999,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1009,40 +589,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Adresë e re pritëse - + New sending address Adresë e re dërgimi - + Edit receiving address Ndrysho adresën pritëse - + Edit sending address ndrysho adresën dërguese - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Adresa e dhënë "%1" është e zënë në librin e adresave. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Nuk mund të ç'kyçet portofoli. @@ -1056,44 +641,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Lloji + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiketë + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (pa etiketë) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopjo adresën e zgjedhur në memorjen e sistemit + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Fshi + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Skedar i ndarë me pikëpresje(*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1106,209 +1032,209 @@ This label turns red, if the priority is smaller than "medium". &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1319,76 +1245,104 @@ This label turns red, if the priority is smaller than "medium". Formilarë - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Transaksionet e fundit</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,117 +1561,118 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Dërgo Monedha Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Dërgo marrësve të ndryshëm njëkohësisht Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1726,8 +1681,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1737,57 +1692,57 @@ This label turns red, if the priority is smaller than "medium". S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1797,17 +1752,17 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + @@ -1817,32 +1772,37 @@ This label turns red, if the priority is smaller than "medium". The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,7 +1820,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Formilarë @@ -1874,24 +1834,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Krijoni një etiketë për këtë adresë që t'ja shtoni librit të adresave + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiketë: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1911,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Ngjit nga memorja e sistemit + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Dërgo marrësve të ndryshëm njëkohësisht + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + Konfirmo veprimin e dërgimit + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formilarë + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Ngjit nga memorja e sistemit + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Krijoni një etiketë për këtë adresë që t'ja shtoni librit të adresave + + + + &Label: + &Etiketë: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,29 +2105,29 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1967,76 +2148,80 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2109,17 +2294,20 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + conflicted - + %1/offline - + @@ -2134,12 +2322,15 @@ This label turns red, if the priority is smaller than "medium". Status - + , broadcast through %n node(s) - + + + + @@ -2149,108 +2340,111 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2260,15 +2454,15 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet , nuk është transmetuar me sukses deri tani @@ -2294,7 +2488,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Data @@ -2326,32 +2520,40 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2371,7 +2573,7 @@ This label turns red, if the priority is smaller than "medium". Received from - + @@ -2394,29 +2596,29 @@ This label turns red, if the priority is smaller than "medium". (p/a) - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2425,37 +2627,37 @@ This label turns red, if the priority is smaller than "medium". All - + Today - + This week - + This month - + Last month - + This year - + Range... - + @@ -2470,7 +2672,7 @@ This label turns red, if the priority is smaller than "medium". To yourself - + @@ -2480,52 +2682,52 @@ This label turns red, if the priority is smaller than "medium". Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + @@ -2535,7 +2737,7 @@ This label turns red, if the priority is smaller than "medium". Confirmed - + @@ -2565,721 +2767,1191 @@ This label turns red, if the priority is smaller than "medium". ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com - + - - Find peers using internet relay chat (default: 0) - + + Specify configuration file (default: triangles.conf) + - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + &Përmbledhje + + + + Show general overview of wallet + Trego një përmbledhje te përgjithshme të portofolit + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Transaksionet + + + + Browse transaction history + Shfleto historinë e transaksioneve + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + Mbyllni aplikacionin + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + &Opsione + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + Ndrysho frazkalimin e përdorur per enkriptimin e portofolit + + + + &Unlock Wallet... + + + + + Unlock wallet + ç'kyç portofolin. + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Skedar + + + + &Settings + &Konfigurimet + + + + &Help + &Ndihmë + + + + Tabs toolbar + Shiriti i mjeteve + + + + Actions toolbar + + + + + + [testnet] + [testo rrjetin] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Duke u sinkronizuar me rrjetin... + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + I azhornuar + + + + Catching up... + Duke u azhornuar... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Dërgo transaksionin + + + + Incoming transaction + Transaksion në ardhje + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Portofoli po <b> enkriptohet</b> dhe është <b> i ç'kyçur</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Portofoli po <b> enkriptohet</b> dhe është <b> i kyçur</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + + + + + + + %n day(s) + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_sr.qm b/src/qt/locale/triangles_sr.qm new file mode 100644 index 0000000..6698e82 Binary files /dev/null and b/src/qt/locale/triangles_sr.qm differ diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/triangles_sr.ts similarity index 59% rename from src/qt/locale/bitcoin_sr.ts rename to src/qt/locale/triangles_sr.ts index ad76f18..a76199d 100644 --- a/src/qt/locale/bitcoin_sr.ts +++ b/src/qt/locale/triangles_sr.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Кликните два пута да промените адресу и/или етикету - + Create a new address Прави нову адресу @@ -52,69 +53,69 @@ This product includes software developed by the OpenSSL Project for use in the O Копира изабрану адресу на системски клипборд - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Избриши Copy &Label - + &Edit - + Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Етикета @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,12 +176,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -230,7 +231,7 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -240,13 +241,13 @@ This product includes software developed by the OpenSSL Project for use in the O IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -301,433 +302,12 @@ This product includes software developed by the OpenSSL Project for use in the O Лозинка за приступ новчанику је успешно промењена. - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - Синхронизација са мрежом у току... - - - - &Overview - &Општи преглед - - - - Show general overview of wallet - Погледајте општи преглед новчаника - - - - &Transactions - &Трансакције - - - - Browse transaction history - Претражите историјат трансакција - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - I&zlaz - - - - Quit application - Напустите програм - - - - Show information about buynowcoin - - - - - About &Qt - О &Qt-у - - - - Show information about Qt - Прегледајте информације о Qt-у - - - - &Options... - П&оставке... - - - - &Encrypt Wallet... - &Шифровање новчаника... - - - - &Backup Wallet... - &Backup новчаника - - - - &Change Passphrase... - Промени &лозинку... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - Мењање лозинке којом се шифрује новчаник - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - новчаник - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Фајл - - - - &Settings - &Подешавања - - - - &Help - П&омоћ - - - - Tabs toolbar - Трака са картицама - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Ажурно - - - - Catching up... - Ажурирање у току... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Послана трансакција - - - - Incoming transaction - Придошла трансакција - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Datum: %1⏎ Iznos: %2⏎ Tip: %3⏎ Adresa: %4⏎ - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Новчаник јс <b>шифрован</b> и тренутно <b>откључан</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Новчаник јс <b>шифрован</b> и тренутно <b>закључан</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel Network Alert - + @@ -735,17 +315,17 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + @@ -755,47 +335,47 @@ Address: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -805,7 +385,7 @@ Address: %4 Label - + Етикета @@ -820,7 +400,7 @@ Address: %4 Confirmations - + @@ -830,7 +410,7 @@ Address: %4 Priority - + @@ -851,87 +431,87 @@ Address: %4 Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -999,7 +579,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1009,91 +589,437 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address - + - + New sending address - - - - - Edit receiving address - + - Edit sending address - + Edit receiving address + - + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Унешена адреса "%1" се већ налази у адресару. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Немогуће откључати новчаник. New key generation failed. - + GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Korišćenje: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + tip + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Етикета + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (без етикете) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Копира изабрану адресу на системски клипборд + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Избриши + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Зарезом одвојене вредности (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1106,142 +1032,142 @@ This label turns red, if the priority is smaller than "medium". &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1251,27 +1177,27 @@ This label turns red, if the priority is smaller than "medium". Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1281,34 +1207,34 @@ This label turns red, if the priority is smaller than "medium". &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1319,20 +1245,20 @@ This label turns red, if the priority is smaller than "medium". Форма - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1342,53 +1268,81 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> <b>Недавне трансакције</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Iznos: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,44 +1561,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Слање новца Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1656,78 +1611,78 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once - + Add &Recipient - + Remove all transaction fields - + Clear &All - + Balance: - + - 123.456 BTC - + 123.456 TRI + @@ -1740,14 +1695,14 @@ This label turns red, if the priority is smaller than "medium". &Пошаљи - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1757,92 +1712,97 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,38 +1820,48 @@ This label turns red, if the priority is smaller than "medium". Form - + Форма A&mount: - + Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Етикета - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1901,7 +1871,7 @@ This label turns red, if the priority is smaller than "medium". Paste address from clipboard - + @@ -1911,12 +1881,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + Alt+П + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + Потврди акцију слања + + + + S&end + &Пошаљи + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Форма + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + Alt+П + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + &Етикета + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,29 +2105,29 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1957,7 +2138,7 @@ This label turns red, if the priority is smaller than "medium". Paste address from clipboard - + @@ -1967,76 +2148,80 @@ This label turns red, if the priority is smaller than "medium". Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2109,17 +2294,21 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + + conflicted - + %1/offline - + @@ -2134,12 +2323,16 @@ This label turns red, if the priority is smaller than "medium". Status - + , broadcast through %n node(s) - + + + + + @@ -2149,31 +2342,31 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + @@ -2185,72 +2378,76 @@ This label turns red, if the priority is smaller than "medium". - + Credit - + - + matures in %n more block(s) - + + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2260,15 +2457,15 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet , nije još uvek uspešno emitovan @@ -2294,7 +2491,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date datum @@ -2326,32 +2523,41 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2394,7 +2600,7 @@ This label turns red, if the priority is smaller than "medium". (n/a) - + Transaction status. Hover over this field to show number of confirmations. Status vaše transakcije. Predjite mišem preko ovog polja da bi ste videli broj konfirmacija @@ -2510,7 +2716,7 @@ This label turns red, if the priority is smaller than "medium". Copy transaction ID - + @@ -2520,12 +2726,12 @@ This label turns red, if the priority is smaller than "medium". Show transaction details - + Export Transaction Data - + @@ -2565,17 +2771,17 @@ This label turns red, if the priority is smaller than "medium". ID - + Error exporting - + Could not write to file %1. - + @@ -2589,32 +2795,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Korišćenje: - - Send command to -server or buynowcoind - - - - + List commands Listaj komande @@ -2629,19 +2817,9 @@ This label turns red, if the priority is smaller than "medium". Opcije - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2651,17 +2829,17 @@ This label turns red, if the priority is smaller than "medium". Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2672,57 +2850,57 @@ This label turns red, if the priority is smaller than "medium". Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2732,22 +2910,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2762,178 +2940,168 @@ This label turns red, if the priority is smaller than "medium". Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2943,27 +3111,37 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + @@ -2971,34 +3149,39 @@ This label turns red, if the priority is smaller than "medium". Lozinka za JSON-RPC konekcije - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3013,32 +3196,32 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when the best block changes (%s in cmd is replaced by block hash) - + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + Upgrade wallet to latest format - + @@ -3053,17 +3236,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3073,7 +3256,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Server certificate file (default: server.cert) - + @@ -3083,17 +3266,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3103,32 +3286,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) - + Connect through socks proxy - + Allow DNS lookups for -addnode, -seednode and -connect - + @@ -3138,7 +3311,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3146,69 +3319,59 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Грешка током учитавања wallet.dat: Новчаник је покварен - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Грешка током учитавања wallet.dat Invalid -proxy address: '%s' - + Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + Invalid amount for -paytxfee=<amount>: '%s' - + Error: could not start node - + Sending... - + Invalid amount - + Insufficient funds - + @@ -3216,44 +3379,79 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Učitavam blok indeksa... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Новчаник се учитава... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + @@ -3268,19 +3466,507 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + новчаник + + + + &Overview + &Општи преглед + + + + Show general overview of wallet + Погледајте општи преглед новчаника + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + &Трансакције + + + + Browse transaction history + Претражите историјат трансакција + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + I&zlaz + + + + Quit application + Напустите програм + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + О &Qt-у + + + + Show information about Qt + Прегледајте информације о Qt-у + + + + &Options... + П&оставке... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + &Шифровање новчаника... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Backup новчаника + + + + Backup wallet to another location + + + + + &Change Passphrase... + Промени &лозинку... + + + + Change the passphrase used for wallet encryption + Мењање лозинке којом се шифрује новчаник + + + + &Unlock Wallet... + + + + + Unlock wallet + Откључавање новчаника + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + &Фајл + + + + &Settings + &Подешавања + + + + &Help + П&омоћ + + + + Tabs toolbar + Трака са картицама + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Синхронизација са мрежом у току... + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + Ажурно + + + + Catching up... + Ажурирање у току... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Послана трансакција + + + + Incoming transaction + Придошла трансакција + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Datum: %1⏎ Iznos: %2⏎ Tip: %3⏎ Adresa: %4⏎ + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Новчаник јс <b>шифрован</b> и тренутно <b>откључан</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Новчаник јс <b>шифрован</b> и тренутно <b>закључан</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + + + + + + + + %n day(s) + + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_sv.qm b/src/qt/locale/triangles_sv.qm new file mode 100644 index 0000000..f5337d6 Binary files /dev/null and b/src/qt/locale/triangles_sv.qm differ diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/triangles_sv.ts similarity index 67% rename from src/qt/locale/bitcoin_sv.ts rename to src/qt/locale/triangles_sv.ts index 957ffc4..0c536a0 100644 --- a/src/qt/locale/bitcoin_sv.ts +++ b/src/qt/locale/triangles_sv.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin - Vad du behöver veta om buynowcoin + About Triangles + Vad du behöver veta om triangles + + + <b>triangles</b> version + <b>triangles</b> version + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers - <b>buynowcoin</b> version - <b>buynowcoin</b> version + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers +Copyright © 2014 Triangles team + - + This is experimental software. @@ -45,12 +56,17 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni Adressbok - + + These are your Triangles 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. + + + + Double-click to edit address or label Dubbel-klicka för att ändra adressen eller etiketten - + Create a new address Skapa ny adress @@ -60,17 +76,21 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni Kopiera den markerade adressen till systemets Urklipp - + + Sign a message to prove you own a TRI address + + + + &New Address Ny adress - - These are your buynowcoin 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. - Dessa är dina buynowcoin adesser för att mottaga betalningsförsändelser. Du kan även använda olika adresser för varje avsändare för att enkelt hålla koll på vem som har skickat en betalning. + These are your triangles 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. + Dessa är dina triangles adesser för att mottaga betalningsförsändelser. Du kan även använda olika adresser för varje avsändare för att enkelt hålla koll på vem som har skickat en betalning. - + &Copy Address &Kopiera adress @@ -80,27 +100,30 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni Visa &QR kod - - Sign a message to prove you own a buynowcoin address - Signera ett meddelande för att bevisa att du äger buynowcoin adressen + Sign a message to prove you own a triangles address + Signera ett meddelande för att bevisa att du äger triangles adressen - + Sign &Message Signera &Meddelande - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Ta bort den valda adressen från listan - - Verify a message to ensure it was signed with a specified buynowcoin address - Verifiera ett meddelande för att försäkra dig över att det var signerat av en specifik buynowcoin adress + Verify a message to ensure it was signed with a specified triangles address + Verifiera ett meddelande för att försäkra dig över att det var signerat av en specifik triangles adress - + &Verify Message &Verifiera meddelande @@ -143,7 +166,7 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni AddressTableModel - + Label Etikett @@ -246,7 +269,12 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni Är du säker på att du vill kryptera din plånbok? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. VIKTIGT: Alla tidigare säkerhetskopior du har gjort av plånbokens fil ska ersättas med den nya genererade, krypterade plånboks filen. Av säkerhetsskäl kommer tidigare säkerhetskopior av den okrypterade plånboks filen blir oanvändbara när du börjar använda en ny, krypterad plånbok. @@ -263,12 +291,11 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni Plånboken är krypterad - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin plånboken kommer nu att stängas för att slutföra krypteringen: Kom ihåg att även en krypterad plånboks säkerhet kan äventyras genom keyloggers eller dylika malwares. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles plånboken kommer nu att stängas för att slutföra krypteringen: Kom ihåg att även en krypterad plånboks säkerhet kan äventyras genom keyloggers eller dylika malwares. - + @@ -309,431 +336,6 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni Plånbokens lösenord har ändrats. - - BitcoinGUI - - - Sign &message... - Signera &meddelande... - - - - Synchronizing with network... - Synkroniserar med nätverk... - - - - &Overview - &Översikt - - - - Show general overview of wallet - Visa översiktsvy av plånbok - - - - &Transactions - &Transaktioner - - - - Browse transaction history - Bläddra i transaktionshistorik - - - - &Address Book - &Adress bok - - - - Edit the list of stored addresses and labels - Editera listan över sparade adresser och deras namn - - - - &Receive coins - &Ta emot coins - - - - Show the list of addresses for receiving payments - Visa adresslista för att mottaga betalningar - - - - &Send coins - &Skicka coins - - - - E&xit - &Avsluta - - - - Quit application - Avsluta programmet - - - - Show information about buynowcoin - Visa information om buynowcoin - - - - About &Qt - Om &Qt - - - - Show information about Qt - Visa information om Qt - - - - &Options... - &Alternativ... - - - - &Encrypt Wallet... - &Kryptera plånbok... - - - - &Backup Wallet... - &Säkerhetskopiera plånbok... - - - - &Change Passphrase... - &Byt Lösenord... - - - - ~%n block(s) remaining - ~%n block remaining~%n block kvar - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - Laddat ner %1 av %2 block av transaktions-historiken (%3% klart) - - - - &Export... - &Exportera... - - - - Send coins to a buynowcoin address - Skicka coins till en buynowcoin adress - - - - Modify configuration options for buynowcoin - Modifiera konfigurations-alternativ för buynowcoin - - - - Export the data in the current tab to a file - Exportera datan i tabben till en fil - - - - Encrypt or decrypt wallet - Kryptera eller avkryptera plånbok - - - - Backup wallet to another location - Säkerhetskopiera plånboken till en annan plats - - - - Change the passphrase used for wallet encryption - Byt lösenord för kryptering av plånbok - - - - &Debug window - &Debug fönster - - - - Open debugging and diagnostic console - Öppna debug- och diagnostikkonsolen - - - - &Verify message... - &Verifiera meddelande... - - - - buynowcoin - buynowcoin - - - - Wallet - Plånbok - - - - &About buynowcoin - &Om buynowcoin - - - - &Show / Hide - &Visa / Göm - - - - Unlock wallet - Lås upp plånbok - - - - &Lock Wallet - &Lås plånbok - - - - Lock wallet - Lås plånbok - - - - &File - &Arkiv - - - - &Settings - &Inställningar - - - - &Help - &Hjälp - - - - Tabs toolbar - Verktygsfält för Tabbar - - - - Actions toolbar - Verktygsfält för handlingar - - - - - [testnet] - [testnet] - - - - - buynowcoin client - buynowcoin klient - - - - %n active connection(s) to buynowcoin network - %n aktiv anslutning till buynowcoin nätverket%n aktiva anslutning till buynowcoin nätverket - - - - Downloaded %1 blocks of transaction history. - Laddade ner %1 block av transaktionshistoriken. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Staking.<br>Din vikt är %1<br>Nätverkets vikt är %2<br>Uppskattad tid för att få belöning är %3 - - - - Not staking because wallet is locked - Ingen staking för att plånboken är låst - - - - Not staking because wallet is offline - Ingen staking för att plånboken är offline - - - - Not staking because wallet is syncing - Ingen staking för att plånboken synkroniseras - - - - Not staking because you don't have mature coins - Ingen staking för att dina coins är ännu inte föråldrade - - - - %n second(s) ago - %n sekund sen%n sekunder sen - - - - About buynowcoin card - Om buynowcoin kortet - - - - Show information about buynowcoin card - Via information om buynowcoin kortet - - - - &Unlock Wallet... - Lås &Upp plånboken - - - - %n minute(s) ago - %n minut sen%n minuter sen - - - - %n hour(s) ago - %n timme sen%n timmar sen - - - - %n day(s) ago - %n dag sen%n dagar sen - - - - Up to date - Uppdaterad - - - - Catching up... - Hämtar senaste... - - - - Last received block was generated %1. - Senaste mottagna block genererades %1. - - - - 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? - Denna transaktion är över gränsen. Du kan ändå skicka den med en %1 avgift, som går till noderna som processerar din transaktion och hjälper till med att upprätthålla nätverket. Vill du betala denna avgift? - - - - Confirm transaction fee - Bekräfta transaktionsavgiften - - - - Sent transaction - Transaktion skickad - - - - Incoming transaction - Inkommande transaktion - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Datum: %1 -Belopp: %2 -Typ: %3 -Adress: %4 - - - - - - URI handling - URI hantering - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URI:n kan inte tolkas! Detta kan bero på en ogiltig buynowcoin adress eller felaktiga URI parametrar. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Denna plånbok är <b>krypterad</b> och för närvarande <b>olåst</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Denna plånbok är <b>krypterad</b> och för närvarande <b>låst</b> - - - - Backup Wallet - Säkerhetskopiera plånbok - - - - Wallet Data (*.dat) - Plånboksdata (*.dat) - - - - Backup Failed - Säkerhetskopieringen misslyckades - - - - There was an error trying to save the wallet data to the new location. - Ett fel uppstod vid sparandet av plånboken till den nya platsen. - - - - %n second(s) - %n sekund%n sekunder - - - - %n minute(s) - %n minut%n minuter - - - - %n hour(s) - %n timme%n timmar - - - - %n day(s) - %n dag%n dagar - - - - Not staking - Ingen staking - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Ett fatalt fel uppstod. buynowcoin kan inte fortsätta och stänger programmet. - - ClientModel @@ -1025,7 +627,7 @@ Detta betyder att en avgift på minst %2 krävs. The label associated with this address book entry - Namnet som kopplats till denna buynowcoin-adress + Namnet som kopplats till denna triangles-adress @@ -1038,37 +640,46 @@ Detta betyder att en avgift på minst %2 krävs. Adressen är kopplad till detta inlägg i adressboken. Denna kan endast ändras för skickande adresser. - + + &Stealth Address + + + + New receiving address Ny mottagaradress - + New sending address Ny avsändaradress - + Edit receiving address Redigera mottagaradress - + Edit sending address Redigera avsändaradress - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Den angivna adressen "%1" finns redan i adressboken. - - The entered address "%1" is not a valid buynowcoin address. - Den inslagna adressen "%1" är inte en giltig buynowcoin adress. + The entered address "%1" is not a valid triangles address. + Den inslagna adressen "%1" är inte en giltig triangles adress. - + Could not unlock wallet. Plånboken kunde inte låsas upp. @@ -1081,18 +692,22 @@ Detta betyder att en avgift på minst %2 krävs. GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version version - + + + Triangles-Qt + + + + Usage: Användning: @@ -1122,6 +737,347 @@ Detta betyder att en avgift på minst %2 krävs. Visa startscreen vid start (förval: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Typ + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + Meddelande + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (Ingen etikett) + + + + MessagePage + + + Address Book + Adressbok + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Kopiera den markerade adressen till systemets Urklipp + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Ta bort den valda adressen från listan + + + + &Delete + &Radera + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + + + OptionsDialog @@ -1155,17 +1111,15 @@ Detta betyder att en avgift på minst %2 krävs. Reservera - - Automatically start buynowcoin after logging in to the system. - Starta buynowcoin automatiskt vid inloggning. + Automatically start triangles after logging in to the system. + Starta triangles automatiskt vid inloggning. - - &Start buynowcoin on system login - &Starta buynowcoin vid inloggning + &Start triangles on system login + &Starta triangles vid inloggning - + 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. Koppla ifrån block och adress-databaserna vid nedstängning. Detta betyder att det kan flyttas till en annan datamapp men saktar ner avstängningen. Plånboken är alltid frånkopplad. @@ -1180,19 +1134,37 @@ Detta betyder att en avgift på minst %2 krävs. &Nätverk - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Öppna automatiskt buynowcoin klientens port på routern. Detta fungerar endast om din router stödjer UPnP och det är aktiverat. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Öppna automatiskt triangles klientens port på routern. Detta fungerar endast om din router stödjer UPnP och det är aktiverat. - + Map port using &UPnP Tilldela port med hjälp av &UPnP - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - Anslut till buynowcoin nätverket via en SOCKS proxy (t.ex. när du ansluter genom Tor). + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + Anslut till triangles nätverket via en SOCKS proxy (t.ex. när du ansluter genom Tor). + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1266,11 +1238,20 @@ Detta betyder att en avgift på minst %2 krävs. - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - Användargränssnittets språk kan ställas in här. Inställningen börjar gälla efter omstart av buynowcoin. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + Användargränssnittets språk kan ställas in här. Inställningen börjar gälla efter omstart av triangles. + + + &Unit to show amounts in: &Måttenhet att visa belopp i: @@ -1280,12 +1261,11 @@ Detta betyder att en avgift på minst %2 krävs. Välj en måttenhet att visa när du skickar mynt. - - Whether to show buynowcoin addresses in the transaction list or not. - Om buynowcoin adresser skall visas i transaktionslistan eller inte. + Whether to show triangles addresses in the transaction list or not. + Om triangles adresser skall visas i transaktionslistan eller inte. - + &Display addresses in transaction list &Visa adresser i transaktionslistan @@ -1328,8 +1308,12 @@ Detta betyder att en avgift på minst %2 krävs. - This setting will take effect after restarting buynowcoin. - Inställningen börjar gälla efter omstart av buynowcoin. + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + Inställningen börjar gälla efter omstart av triangles. @@ -1345,13 +1329,11 @@ Detta betyder att en avgift på minst %2 krävs. Formulär - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - Den visade informationen kan vara gammal. Din plånbok synkroniseras automatiskt med buynowcoin nätverket efter att en anslutning skapats, men denna process är inte klar än. + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + Den visade informationen kan vara gammal. Din plånbok synkroniseras automatiskt med triangles nätverket efter att en anslutning skapats, men denna process är inte klar än. - + Stake: Stake: @@ -1386,27 +1368,61 @@ Detta betyder att en avgift på minst %2 krävs. Den genererade balansen som ännu inte har mognat - + Total: Totalt: - + Your current total balance Ditt nuvarande totala saldo - + <b>Recent transactions</b> <b>Nyligen genomförda transaktioner</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance Totala antalet transaktioner inte har blivit bekräftade än och därför inte räknas mot det totala saldot - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance Antal coins som var i stake-processen, och räknas ännu inte till nuvarande saldo @@ -1507,7 +1523,17 @@ Detta betyder att en avgift på minst %2 krävs. &Information - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version Använder OpenSSL version @@ -1552,7 +1578,17 @@ Detta betyder att en avgift på minst %2 krävs. Sista blocktid - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open &Öppna @@ -1562,12 +1598,11 @@ Detta betyder att en avgift på minst %2 krävs. Kommandoradsalternativ - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - Visa buynowcoin-Qt hjälp meddelandet för att få en lista över möjliga buynowcoin kommandoradsalternativ. + Show the triangles-Qt help message to get a list with possible triangles command-line options. + Visa triangles-Qt hjälp meddelandet för att få en lista över möjliga triangles kommandoradsalternativ. - + &Show &Visa @@ -1582,34 +1617,35 @@ Detta betyder att en avgift på minst %2 krävs. Kompileringsdatum - - buynowcoin - Debug window - buynowcoin - Felsökningsfönster + triangles - Debug window + triangles - Felsökningsfönster - - buynowcoin Core - buynowcoin Core + triangles Core + triangles Core - + Debug log file Debugloggfil - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - Öppna buynowcoin felsöknings-loggfilen från nuvarande data mapp. Detta kan kan ta ett par minuter för stora log filer. + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + Öppna triangles felsöknings-loggfilen från nuvarande data mapp. Detta kan kan ta ett par minuter för stora log filer. - + Clear console Rensa konsollen + + Welcome to the triangles RPC console. + Välkommen till triangles RPC konsoll. + - Welcome to the buynowcoin RPC console. - Välkommen till buynowcoin RPC konsoll. + Welcome to the Triangles RPC console. + @@ -1633,6 +1669,7 @@ Detta betyder att en avgift på minst %2 krävs. + Send Coins Skicka pengar @@ -1657,7 +1694,7 @@ Detta betyder att en avgift på minst %2 krävs. Otillräckligt saldo! - + Quantity: Antal: @@ -1677,13 +1714,17 @@ Detta betyder att en avgift på minst %2 krävs. Amount: Belopp: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1726,7 +1767,7 @@ Detta betyder att en avgift på minst %2 krävs. egen ändringsadress - + Send to multiple recipients at once Skicka till flera mottagare samtidigt @@ -1752,8 +1793,12 @@ Detta betyder att en avgift på minst %2 krävs. - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1766,9 +1811,13 @@ Detta betyder att en avgift på minst %2 krävs. &Skicka - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Fyll i en buynowcoin adress (t.ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Fyll i en triangles adress (t.ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1865,10 +1914,19 @@ Detta betyder att en avgift på minst %2 krävs. 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. Fel: Transaktionen nekades. Detta kan hända om vissa av mynten i din plånbok redan är använda, t.ex om du använder en kopia av wallet.dat och mynten redan var använda i kopia men inte markerade som använda här. + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - VARNING: Ogiltig buynowcoin adress + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + VARNING: Ogiltig triangles adress @@ -1900,19 +1958,29 @@ Detta betyder att en avgift på minst %2 krävs. - + Enter a label for this address to add it to your address book Ange ett namn för den här adressen och lägg till den i din adressbok + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etikett: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adressen att skicka betalningen till (t.ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adressen att skicka betalningen till (t.ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1939,10 +2007,225 @@ Detta betyder att en avgift på minst %2 krävs. Remove this recipient Ta bort denna mottagare + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Fyll i en triangles adress (t.ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Fyll i en buynowcoin adress (t.ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + Välj adress från adressbok + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Klistra in adress från Urklipp + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Skicka till flera mottagare samtidigt + + + + Add &Recipient + Lägg till &mottagare + + + + Remove all transaction fields + Ta bort alla transaktionsfält + + + + Clear &All + Rensa &alla + + + + Confirm the send action + Bekräfta sändordern + + + + S&end + &Skicka + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> till %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + Är du säker att du vill skicka %1? + + + + and + och + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Mottagarens adress är inte giltig, vänligen kontrollera igen. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Dubblett av adress funnen, kan bara skicka till varje adress en gång per sändning. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Formulär + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + Välj adress från adressbok + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Klistra in adress från Urklipp + + + + Alt+P + Alt+P + + + + Remove this recipient + Ta bort denna mottagare + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Ange ett namn för den här adressen och lägg till den i din adressbok + + + + &Label: + &Etikett: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1965,8 +2248,8 @@ Detta betyder att en avgift på minst %2 krävs. - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adressen att signera meddelandet med (t.ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adressen att signera meddelandet med (t.ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -2002,11 +2285,20 @@ Detta betyder att en avgift på minst %2 krävs. - Sign the message to prove you own this buynowcoin address - Signera meddelandet för att verifiera att du äger denna buynowcoin adressen + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + Signera meddelandet för att verifiera att du äger denna triangles adressen + + + Reset all sign message fields Rensa alla fält @@ -2029,34 +2321,45 @@ Detta betyder att en avgift på minst %2 krävs. - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Adressen meddelandet var signerad med (t.ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Adressen meddelandet var signerad med (t.ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - Verifiera meddelandet för att vara säker på att det var signerat med den angivna buynowcoin adressen + Verify the message to ensure it was signed with the specified triangles address + Verifiera meddelandet för att vara säker på att det var signerat med den angivna triangles adressen - + Reset all verify message fields Rensa alla fält - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - Fyll i en buynowcoin adress (t.ex. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Fyll i en triangles adress (t.ex. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature Klicka "Signera Meddelande" för att få en signatur + + Enter triangles signature + Fyll i triangles signatur + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - Fyll i buynowcoin signatur + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2135,7 +2438,10 @@ Detta betyder att en avgift på minst %2 krävs. Open for %n block(s) - Öppen för %n blockÖppen för %n block + + Öppen för %n block + Öppen för %n block + @@ -2165,7 +2471,10 @@ Detta betyder att en avgift på minst %2 krävs. , broadcast through %n node(s) - , sänd genom %n nod, sänd genom %n noder + + , sänd genom %n nod + , sänd genom %n noder + @@ -2211,14 +2520,17 @@ Detta betyder att en avgift på minst %2 krävs. - + Credit Kredit - + matures in %n more block(s) - mognar om %n blockmognar om %n fler block + + mognar om %n block + mognar om %n fler block + @@ -2229,12 +2541,12 @@ Detta betyder att en avgift på minst %2 krävs. - + Debit Belasta - + Transaction fee Transaktionsavgift @@ -2254,14 +2566,18 @@ Detta betyder att en avgift på minst %2 krävs. Kommentar - + Transaction ID Transaktions-ID + Generated coins must mature 60 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. + Genererad mynt måste mogna i 510 block före de kan användas. När du genererade detta blocket sändes det ut till nätverket för att läggas till i blockkedjan. Om det inte kan läggas till i kedjan kommer dess status att ändras till "Ej accepterat" och det kommer inte gå att använda. Detta kan hända imellanåt om en annan klient genererar ett block inom ett par sekunder från ditt. {60 ?} + + Generated coins must mature 510 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. - Genererad mynt måste mogna i 510 block före de kan användas. När du genererade detta blocket sändes det ut till nätverket för att läggas till i blockkedjan. Om det inte kan läggas till i kedjan kommer dess status att ändras till "Ej accepterat" och det kommer inte gå att använda. Detta kan hända imellanåt om en annan klient genererar ett block inom ett par sekunder från ditt. + Genererad mynt måste mogna i 510 block före de kan användas. När du genererade detta blocket sändes det ut till nätverket för att läggas till i blockkedjan. Om det inte kan läggas till i kedjan kommer dess status att ändras till "Ej accepterat" och det kommer inte gå att använda. Detta kan hända imellanåt om en annan klient genererar ett block inom ett par sekunder från ditt. @@ -2294,7 +2610,7 @@ Detta betyder att en avgift på minst %2 krävs. falsk - + , has not been successfully broadcast yet , har inte lyckats skickas ännu @@ -2320,7 +2636,7 @@ Detta betyder att en avgift på minst %2 krävs. TransactionTableModel - + Date Datum @@ -2352,10 +2668,18 @@ Detta betyder att en avgift på minst %2 krävs. Open for %n more block(s) - Öppet för %n mer blockÖppet för %n mer block + + Öppet för %n mer block + Öppet för %n mer block + - + + Narration + + + + Offline Nerkopplad @@ -2420,7 +2744,7 @@ Detta betyder att en avgift på minst %2 krävs. (n/a) - + Transaction status. Hover over this field to show number of confirmations. Transaktionsstatus. Håll muspekaren över för att se antal bekräftelser. @@ -2615,29 +2939,20 @@ Detta betyder att en avgift på minst %2 krävs. - WalletModel + Triangles-core - - Sending... - Skickar... - - - - bitcoin-core - - - buynowcoin version - buynowcoin version + triangles version + triangles version - + Usage: Användning: - Send command to -server or buynowcoind - Skicka kommando till -server eller buynowcoind + Send command to -server or trianglesd + Skicka kommando till -server eller trianglesd @@ -2656,13 +2971,13 @@ Detta betyder att en avgift på minst %2 krävs. - Specify configuration file (default: buynowcoin.conf) - Ange konfigurationsfilen (standard: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + Ange konfigurationsfilen (standard: triangles.conf) - Specify pid file (default: buynowcoind.pid) - Ange pid filen (standard buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + Ange pid filen (standard trianglesd.pid) @@ -2675,7 +2990,22 @@ Detta betyder att en avgift på minst %2 krävs. Ange katalog för data - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) Sätt databas cache storleken i megabyte (förvalt: 25) @@ -2810,12 +3140,11 @@ Detta betyder att en avgift på minst %2 krävs. Varning: -paytxfee är satt väldigt hög! Detta är avgiften du kommer betala för varje transaktion. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - Varning: Kolla att din dators tid och datum är rätt. buynowcoin kan inte fungera ordentligt om tiden i datorn är fel. + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + Varning: Kolla att din dators tid och datum är rätt. triangles kan inte fungera ordentligt om tiden i datorn är fel. - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Varning: fel vid läsning av wallet.dat! Alla nycklar lästes korrekt, men transaktionsdatan eller adressbokens poster kanske saknas eller är felaktiga. @@ -2901,8 +3230,8 @@ Detta betyder att en avgift på minst %2 krävs. - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL-inställningar: (se Bitcoin-wikin för SSL-setup instruktioner) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL-inställningar: (se Triangles-wikin för SSL-setup instruktioner) @@ -2962,17 +3291,52 @@ Detta betyder att en avgift på minst %2 krävs. Använd proxy för att nå Tor gömda servicer (standard: samma som -proxy) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections Användarnamn för JSON-RPC-anslutningar - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... Verifierar integriteten i databasen... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! VARNING: synkroniserad kontrollpunkts brott upptäckt, men hoppades över! @@ -2997,32 +3361,31 @@ Detta betyder att en avgift på minst %2 krävs. Lösenord för JSON-RPC-anslutningar - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, du måste sätta rpcpassword i konfigurationsfilen: + %s, du måste sätta rpcpassword i konfigurationsfilen: %s Det är rekommenderat att du använder följande slumpmässiga lösenord: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (du behöver inte komma ihåg detta lösenord) Användarnamnet och lösenordet FÅR INTE vara samma. Om filen inte finns, skapa den med endast ägarrättigheter. Det är också rekommenderat att sätta alertnotify så du blir notifierad om problem; -till exempel: alertnotify=echo %%s | mail -s "buynowcoin Varning" admin@foo.com +till exempel: alertnotify=echo %%s | mail -s "triangles Varning" admin@foo.com - + Find peers using internet relay chat (default: 0) Hitta andra klienter genom internet relay chat (standard: 1) {0)?} @@ -3142,17 +3505,15 @@ till exempel: alertnotify=echo %%s | mail -s "buynowcoin Varning" admi Plånbok %s ligger utanför datamappen %s. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - Kan inte låsa datan i mappen %s. buynowcoin är kanske redan startad. + Cannot obtain a lock on data directory %s. triangles is probably already running. + Kan inte låsa datan i mappen %s. triangles är kanske redan startad. - - buynowcoin - buynowcoin + triangles + triangles - + Unable to bind to %s on this computer (bind returned error %d, %s) Det går inte att binda till %s på den här datorn (bind returnerade felmeddelande %d, %s) @@ -3182,17 +3543,15 @@ till exempel: alertnotify=echo %%s | mail -s "buynowcoin Varning" admi Fel vid inläsningen av wallet.dat: Plånboken är skadad - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - Kunde inte ladda wallet.dat: En nyare version av buynowcoin krävs + Error loading wallet.dat: Wallet requires newer version of triangles + Kunde inte ladda wallet.dat: En nyare version av triangles krävs - - Wallet needed to be rewritten: restart buynowcoin to complete - Plånboken måste skrivas om: Starta om buynowcoin för att slutföra + Wallet needed to be rewritten: restart triangles to complete + Plånboken måste skrivas om: Starta om triangles för att slutföra - + Error loading wallet.dat Fel vid inläsning av plånboksfilen wallet.dat @@ -3244,7 +3603,7 @@ till exempel: alertnotify=echo %%s | mail -s "buynowcoin Varning" admi Insufficient funds - Otillräckligt med bitcoins + Otillräckligt med triangless @@ -3257,12 +3616,11 @@ till exempel: alertnotify=echo %%s | mail -s "buynowcoin Varning" admi Lägg till en nod att koppla upp mot och försök att hålla anslutningen öppen - - Unable to bind to %s on this computer. buynowcoin is probably already running. - Kan inte binda till %s på denna dator. buynowcoin är sannolikt redan startad. + Unable to bind to %s on this computer. triangles is probably already running. + Kan inte binda till %s på denna dator. triangles är sannolikt redan startad. - + Fee per KB to add to transactions you send Avgift per KB som adderas till transaktionen du sänder @@ -3321,4 +3679,533 @@ If the file does not exist, create it with owner-readable-only file permissions. Om filen inte existerar, skapa den med filrättigheten endast läsbar för ägaren. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Plånbok + + + + &Overview + &Översikt + + + + Show general overview of wallet + Visa översiktsvy av plånbok + + + + &Send coins + &Skicka coins + + + + Send coins to a TRI address + + + + + &Receive coins + &Ta emot coins + + + + Show the list of addresses for receiving payments + Visa adresslista för att mottaga betalningar + + + + &Transactions + &Transaktioner + + + + Browse transaction history + Bläddra i transaktionshistorik + + + + &Address Book + &Adress bok + + + + Edit the list of stored addresses and labels + Editera listan över sparade adresser och deras namn + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Avsluta + + + + Quit application + Avsluta programmet + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + Om &Qt + + + + Show information about Qt + Visa information om Qt + + + + &Options... + &Alternativ... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Visa / Göm + + + + &Encrypt Wallet... + &Kryptera plånbok... + + + + Encrypt or decrypt wallet + Kryptera eller avkryptera plånbok + + + + &Backup Wallet... + &Säkerhetskopiera plånbok... + + + + Backup wallet to another location + Säkerhetskopiera plånboken till en annan plats + + + + &Change Passphrase... + &Byt Lösenord... + + + + Change the passphrase used for wallet encryption + Byt lösenord för kryptering av plånbok + + + + &Unlock Wallet... + Lås &Upp plånboken + + + + Unlock wallet + Lås upp plånbok + + + + &Lock Wallet + &Lås plånbok + + + + Lock wallet + Lås plånbok + + + + Sign &message... + Signera &meddelande... + + + + &Verify message... + &Verifiera meddelande... + + + + &Export... + &Exportera... + + + + Export the data in the current tab to a file + Exportera datan i tabben till en fil + + + + &Debug window + &Debug fönster + + + + Open debugging and diagnostic console + Öppna debug- och diagnostikkonsolen + + + + &File + &Arkiv + + + + &Settings + &Inställningar + + + + &Help + &Hjälp + + + + Tabs toolbar + Verktygsfält för Tabbar + + + + Actions toolbar + Verktygsfält för handlingar + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + Synkroniserar med nätverk... + + + + ~%n block(s) remaining + + ~%n block remaining + ~%n block kvar + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + Laddat ner %1 av %2 block av transaktions-historiken (%3% klart) + + + + Downloaded %1 blocks of transaction history. + Laddade ner %1 block av transaktionshistoriken. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + %n sekund sen + %n sekunder sen + + + + + %n minute(s) ago + + %n minut sen + %n minuter sen + + + + + %n hour(s) ago + + %n timme sen + %n timmar sen + + + + + %n day(s) ago + + %n dag sen + %n dagar sen + + + + + Up to date + Uppdaterad + + + + Catching up... + Hämtar senaste... + + + + Last received block was generated %1. + Senaste mottagna block genererades %1. + + + + 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? + Denna transaktion är över gränsen. Du kan ändå skicka den med en %1 avgift, som går till noderna som processerar din transaktion och hjälper till med att upprätthålla nätverket. Vill du betala denna avgift? + + + + Confirm transaction fee + Bekräfta transaktionsavgiften + + + + Sent transaction + Transaktion skickad + + + + Incoming transaction + Inkommande transaktion + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Datum: %1 +Belopp: %2 +Typ: %3 +Adress: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + URI hantering + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Denna plånbok är <b>krypterad</b> och för närvarande <b>olåst</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Denna plånbok är <b>krypterad</b> och för närvarande <b>låst</b> + + + + Backup Wallet + Säkerhetskopiera plånbok + + + + Wallet Data (*.dat) + Plånboksdata (*.dat) + + + + Backup Failed + Säkerhetskopieringen misslyckades + + + + There was an error trying to save the wallet data to the new location. + Ett fel uppstod vid sparandet av plånboken till den nya platsen. + + + + %n second(s) + + %n sekund + %n sekunder + + + + + %n minute(s) + + %n minut + %n minuter + + + + + %n hour(s) + + %n timme + %n timmar + + + + + %n day(s) + + %n dag + %n dagar + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Staking.<br>Din vikt är %1<br>Nätverkets vikt är %2<br>Uppskattad tid för att få belöning är %3 + + + + Not staking because wallet is locked + Ingen staking för att plånboken är låst + + + + Not staking because wallet is offline + Ingen staking för att plånboken är offline + + + + Not staking because wallet is syncing + Ingen staking för att plånboken synkroniseras + + + + Not staking because you don't have mature coins + Ingen staking för att dina coins är ännu inte föråldrade + + + + Not staking + Ingen staking + + + Show information about triangles + Visa information om triangles + + + Send coins to a triangles address + Skicka coins till en triangles adress + + + Modify configuration options for triangles + Modifiera konfigurations-alternativ för triangles + + + triangles + triangles + + + &About triangles + &Om triangles + + + triangles client + triangles klient + + + %n active connection(s) to triangles network + + %n aktiv anslutning till triangles nätverket + %n aktiva anslutning till triangles nätverket + + + + About triangles card + Om triangles kortet + + + Show information about triangles card + Via information om triangles kortet + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URI:n kan inte tolkas! Detta kan bero på en ogiltig triangles adress eller felaktiga URI parametrar. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Ett fatalt fel uppstod. triangles kan inte fortsätta och stänger programmet. + + + + WalletModel + + + Sending... + Skickar... + + + diff --git a/src/qt/locale/bitcoin_th_TH.qm b/src/qt/locale/triangles_th_TH.qm similarity index 61% rename from src/qt/locale/bitcoin_th_TH.qm rename to src/qt/locale/triangles_th_TH.qm index cd3e597..26efd6b 100644 Binary files a/src/qt/locale/bitcoin_th_TH.qm and b/src/qt/locale/triangles_th_TH.qm differ diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/triangles_th_TH.ts similarity index 55% rename from src/qt/locale/bitcoin_th_TH.ts rename to src/qt/locale/triangles_th_TH.ts index da9509b..1b397a9 100644 --- a/src/qt/locale/bitcoin_th_TH.ts +++ b/src/qt/locale/triangles_th_TH.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label ดับเบิลคลิก เพื่อแก้ไขที่อยู่ หรือชื่อ - + Create a new address สร้างที่อยู่ใหม่ @@ -52,90 +53,90 @@ This product includes software developed by the OpenSSL Project for use in the O คัดลอกที่อยู่ที่ถูกเลือกไปยัง คลิปบอร์ดของระบบ - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete ลบ Copy &Label - + &Edit - + Export Address Book Data - + Comma separated file (*.csv) - + Error exporting - + Could not write to file %1. - + AddressTableModel - + Label ชื่อ @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,17 +176,17 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + 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>. - + @@ -195,7 +196,7 @@ This product includes software developed by the OpenSSL Project for use in the O This operation needs your wallet passphrase to unlock the wallet. - + @@ -205,7 +206,7 @@ This product includes software developed by the OpenSSL Project for use in the O This operation needs your wallet passphrase to decrypt the wallet. - + @@ -230,23 +231,23 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + @@ -256,8 +257,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -270,7 +271,7 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet encryption failed due to an internal error. Your wallet was not encrypted. - + @@ -281,445 +282,24 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet unlock failed - + The passphrase entered for the wallet decryption was incorrect. - + Wallet decryption failed - + Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - - - - - &Overview - - - - - Show general overview of wallet - - - - - &Transactions - - - - - Browse transaction history - - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - - - - - &Settings - - - - - &Help - - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,77 +315,77 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + Amount - + Label - + ชื่อ @@ -815,123 +395,123 @@ Address: %4 Date - + Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -989,111 +569,457 @@ This label turns red, if the priority is smaller than "medium". Edit Address - + &Label - + The label associated with this address book entry - + &Address - + The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + Could not unlock wallet. - + New key generation failed. - + GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + ชื่อ + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (ไม่มีชื่อ) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + คัดลอกที่อยู่ที่ถูกเลือกไปยัง คลิปบอร์ดของระบบ + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + ลบ + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1101,214 +1027,214 @@ This label turns red, if the priority is smaller than "medium". Options - + &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1316,79 +1242,107 @@ This label turns red, if the priority is smaller than "medium". Form - + - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> - + - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,242 +1561,248 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - + Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once - + Add &Recipient - + Remove all transaction fields - + Clear &All - + Balance: - + - 123.456 BTC - + 123.456 TRI + Confirm the send action - + S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,63 +1820,284 @@ This label turns red, if the priority is smaller than "medium". Form - + A&mount: - + Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: - + - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,119 +2105,123 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2104,178 +2289,184 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Open for %n block(s) - + + + conflicted - + %1/offline - + %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + Date - + Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + Amount - + true - + false - + - + , has not been successfully broadcast yet - + unknown - + @@ -2283,25 +2474,25 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date - + Type - + @@ -2311,112 +2502,119 @@ This label turns red, if the priority is smaller than "medium". Amount - + Open until %1 - + Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + Received with - + Received from - + Sent to - + Payment to yourself - + Mined - + (n/a) - + - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2425,7 +2623,7 @@ This label turns red, if the priority is smaller than "medium". All - + @@ -2435,117 +2633,117 @@ This label turns red, if the priority is smaller than "medium". This week - + This month - + Last month - + This year - + Range... - + Received with - + Sent to - + To yourself - + Mined - + Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + Comma separated file (*.csv) - + Confirmed - + Date - + Type - + @@ -2560,726 +2758,1186 @@ This label turns red, if the priority is smaller than "medium". Amount - + ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com - + - - Find peers using internet relay chat (default: 0) - + + Specify configuration file (default: triangles.conf) + - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + + + + + Browse transaction history + + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + เปิดกระเป๋าสตางค์ + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + + + + + + %n day(s) + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_tr.qm b/src/qt/locale/triangles_tr.qm new file mode 100644 index 0000000..50ac741 Binary files /dev/null and b/src/qt/locale/triangles_tr.qm differ diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/triangles_tr.ts similarity index 68% rename from src/qt/locale/bitcoin_tr.ts rename to src/qt/locale/triangles_tr.ts index 702a2b6..a7ad43a 100644 --- a/src/qt/locale/bitcoin_tr.ts +++ b/src/qt/locale/triangles_tr.ts @@ -1,25 +1,30 @@ - + + + AboutDialog - About buynowcoin - buynowcoin Hakkında + About Triangles + triangles Hakkında + + + <b>triangles</b> version + <b>triangles</b> versiyonu - <b>buynowcoin</b> version - <b>buynowcoin</b> versiyonu + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -42,12 +47,17 @@ This product includes software developed by the OpenSSL Project for use in the O Adres Defteri - + + These are your Triangles 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. + + + + Double-click to edit address or label Adresi ya da etiketi düzenlemek için çift tıklayınız - + Create a new address Yeni bir adres oluştur @@ -57,17 +67,21 @@ This product includes software developed by the OpenSSL Project for use in the O Seçili adresi sistem panosuna kopyala - + + Sign a message to prove you own a TRI address + + + + &New Address &Yeni Adres - - These are your buynowcoin 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. - Bunlar, ödeme almak için buynowcoin adreslerinizdir. Her bir göndericiye farklı birini verebilir, böylece size kimin ödeme yaptığını takip edebilirsiniz. + These are your triangles 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. + Bunlar, ödeme almak için triangles adreslerinizdir. Her bir göndericiye farklı birini verebilir, böylece size kimin ödeme yaptığını takip edebilirsiniz. - + &Copy Address Adresi &Kopyala @@ -77,27 +91,30 @@ This product includes software developed by the OpenSSL Project for use in the O &QR Kodunu Göster - - Sign a message to prove you own a buynowcoin address - Bir buynowcoin adresine sahip olduğunu ispatlamak için bir mesaj imzala + Sign a message to prove you own a triangles address + Bir triangles adresine sahip olduğunu ispatlamak için bir mesaj imzala - + Sign &Message &Mesaj İmzala - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list Seçili adresi listeden sil - - Verify a message to ensure it was signed with a specified buynowcoin address - Mesajın, belirli bir buynowcoin adresiyle imzalandığından emin olmak için onu doğrula + Verify a message to ensure it was signed with a specified triangles address + Mesajın, belirli bir triangles adresiyle imzalandığından emin olmak için onu doğrula - + &Verify Message Mesajı &Doğrula @@ -140,7 +157,7 @@ This product includes software developed by the OpenSSL Project for use in the O AddressTableModel - + Label Etiket @@ -243,7 +260,12 @@ This product includes software developed by the OpenSSL Project for use in the O Cüzdanınızı şifrelemek istediğinizden emin misiniz? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. ÖNEMLİ: Önceden yapmış olduğunuz cüzdan dosyası yedeklemelerinin yeni oluşturulan, şifrelenmiş cüzdan dosyası ile değiştirilmeleri gerekmektedir. Güvenlik nedenleriyle yeni, şifrelenmiş cüzdanı kullanmaya başladığınızda, şifrelenmemiş cüzdan dosyasının önceki yedekleri işe yaramaz hale gelecektir. @@ -260,12 +282,11 @@ This product includes software developed by the OpenSSL Project for use in the O Cüzdan şifrelendi - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - buynowcoin, şifreleme işlemini tamamlamak için şimdi kapatılacak. Cüzdanınızı şifrelemenin; coinlerinizin, bilgisayarınızı etkileyen zararlı yazılımlar tarafından çalınmasını bütünüyle engelleyemeyebileceğini unutmayınız. + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + triangles, şifreleme işlemini tamamlamak için şimdi kapatılacak. Cüzdanınızı şifrelemenin; coinlerinizin, bilgisayarınızı etkileyen zararlı yazılımlar tarafından çalınmasını bütünüyle engelleyemeyebileceğini unutmayınız. - + @@ -306,431 +327,6 @@ This product includes software developed by the OpenSSL Project for use in the O Cüzdan parolası başarılı bir şekilde değiştirildi. - - BitcoinGUI - - - Sign &message... - &Mesaj imzala... - - - - Synchronizing with network... - Ağ ile senkronizasyon... - - - - &Overview - &Genel bakış - - - - Show general overview of wallet - Cüzdana genel bakışı göster - - - - &Transactions - &İşlemler - - - - Browse transaction history - İşlem geçmişine göz at - - - - &Address Book - &Adres Defteri - - - - Edit the list of stored addresses and labels - Kayıtlı adresler ve etiketler listesini düzenle - - - - &Receive coins - Coin &al - - - - Show the list of addresses for receiving payments - Ödeme almak için kullanılan adres listesini göster - - - - &Send coins - Coin &gönder - - - - E&xit - &Çık - - - - Quit application - Uygulamadan çık - - - - Show information about buynowcoin - buynowcoin hakkındaki bilgiyi göster - - - - About &Qt - &Qt hakkında - - - - Show information about Qt - Qt hakkındaki bilgiyi göster - - - - &Options... - &Seçenekler... - - - - &Encrypt Wallet... - Cüzdanı &Şifrele... - - - - &Backup Wallet... - Cüzdanı &Yedekle... - - - - &Change Passphrase... - Parolayı &Değiştir... - - - - ~%n block(s) remaining - ~%n blok kaldı~%n blok kaldı - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - İşlem geçmişindeki %2 bloğun %1'i indirildi (%3% tamamlandı). - - - - &Export... - &Dışarı aktar... - - - - Send coins to a buynowcoin address - Bir buynowcoin adresine coin gönder - - - - Modify configuration options for buynowcoin - buynowcoin yapılandırma seçeneklerini değiştir - - - - Export the data in the current tab to a file - Mevcut sekmedeki veriyi bir dosyaya aktar - - - - Encrypt or decrypt wallet - Cüzdanı şifrele veya cüzdanın şifresini aç - - - - Backup wallet to another location - Cüzdanı başka bir konuma yedekle - - - - Change the passphrase used for wallet encryption - Cüzdan şifrelemesi için kullanılan parolayı değiştir - - - - &Debug window - &Hata ayıklama penceresi - - - - Open debugging and diagnostic console - Hata ayıklama ve teşhis penceresini aç - - - - &Verify message... - Mesajı &doğrula... - - - - buynowcoin - buynowcoin - - - - Wallet - Cüzdan - - - - &About buynowcoin - buynowcoin &Hakkında - - - - &Show / Hide - &Göster / Gizle - - - - Unlock wallet - Cüzdanın kilidini aç - - - - &Lock Wallet - Cüzdanı &Kilitle - - - - Lock wallet - Cüzdanı kilitle - - - - &File - &Dosya - - - - &Settings - &Ayarlar - - - - &Help - &Yardım - - - - Tabs toolbar - Sekme araç çubuğu - - - - Actions toolbar - Eylem araç çubuğu - - - - - [testnet] - [testnet] - - - - - buynowcoin client - buynowcoin istemcisi - - - - %n active connection(s) to buynowcoin network - buynowcoin ağına %n etkin bağlantıbuynowcoin ağına %n etkin bağlantı - - - - Downloaded %1 blocks of transaction history. - İşlem geçmişinin %1 bloğu indirildi. - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - Pay alınıyor.<br>Sizin ağırlığınız %1<br>Ağın ağırlığı %2<br>Ödül almak için tahmini süre %3 - - - - Not staking because wallet is locked - Pay alınmıyor çünkü cüzdan kilitlidir - - - - Not staking because wallet is offline - Pay alınmıyor çünkü cüzdan çevrimdışıdır - - - - Not staking because wallet is syncing - Pay alınmıyor çünkü cüzdan senkronize ediliyor - - - - Not staking because you don't have mature coins - Pay alınmıyor çünkü olgunlaşmış coininiz yoktur - - - - %n second(s) ago - %n saniye önce%n saniye önce - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - Cüzdanı &Kilitle... - - - - %n minute(s) ago - %n dakika önce%n dakika önce - - - - %n hour(s) ago - %n saat önce%n saat önce - - - - %n day(s) ago - %n gün önce%n gün önce - - - - Up to date - Güncel - - - - Catching up... - Aralık kapatılıyor... - - - - Last received block was generated %1. - - - - - 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? - Bu işlem, büyüklük sınırının üzerindedir. İşleminizi gerçekleştirecek devrelere gidecek ve ağı desteklemeye yardımcı olacak %1 ücretle coin gönderebilirsiniz. Ücreti ödemek istiyor musunuz? - - - - Confirm transaction fee - İşlem ücretini onayla - - - - Sent transaction - İşlem gerçekleştirildi - - - - Incoming transaction - Gelen işlem - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Tarih: %1 -Miktar: %2 -Tür: %3 -Adres: %4 - - - - - - URI handling - URI işleme - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - URI ayrıştırılamadı! Bu, geçersiz bir buynowcoin adresi veya hatalı URI parametreleri nedeniyle olabilir. - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - Cüzdan <b>şifrelenmiştir</b> ve şu anda <b>kilidi açıktır</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - Cüzdan <b>şifrelenmiştir</b> ve şu anda <b>kilitlidir</b> - - - - Backup Wallet - Cüzdanı Yedekle - - - - Wallet Data (*.dat) - Cüzdan Verisi (*.dat) - - - - Backup Failed - Yedekleme Başarısız Oldu - - - - There was an error trying to save the wallet data to the new location. - Cüzdan verisi, yeni bir konuma kaydedilmeye çalışılırken bir hata oluştu. - - - - %n second(s) - %n saniye%n saniye - - - - %n minute(s) - %n dakika%n dakika - - - - %n hour(s) - %n saat%n saat - - - - %n day(s) - %n gün%n gün - - - - Not staking - Pay alınmıyor - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - Önemli bir hata oluştu. buynowcoin artık güvenli bir şekilde devam edemez ve şimdi kapatılacak. - - ClientModel @@ -1035,37 +631,46 @@ This label turns red, if the priority is smaller than "medium". Bu adres defteri kaydıyla ilişkili etiket. Bu, sadece gönderi adresleri için değiştirilebilir. - + + &Stealth Address + + + + New receiving address Yeni alım adresi - + New sending address Yeni gönderi adresi - + Edit receiving address Alım adresini düzenle - + Edit sending address Gönderi adresini düzenle - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Girilen "%1" adresi hâlihazırda adres defterinde mevcuttur. - - The entered address "%1" is not a valid buynowcoin address. - Girilen %1 adresi, geçerli bir buynowcoin adresi değildir. + The entered address "%1" is not a valid triangles address. + Girilen %1 adresi, geçerli bir triangles adresi değildir. - + Could not unlock wallet. Cüzdan kilidi açılamadı. @@ -1078,18 +683,22 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - - buynowcoin-Qt - buynowcoin-Qt + triangles-Qt + triangles-Qt - + version versiyon - + + + Triangles-Qt + + + + Usage: Kullanım: @@ -1119,6 +728,347 @@ This label turns red, if the priority is smaller than "medium". Başlangıçta açılış ekranını göster (varsayılan: 1) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Tür + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Etiket + + + + To Address + + + + + From Address + + + + + Message + Mesaj + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (boş etiket) + + + + MessagePage + + + Address Book + Adres Defteri + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Seçili adresi sistem panosuna kopyala + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Seçili adresi listeden sil + + + + &Delete + &Sil + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Virgülle ayrılmış değerler dosyası (*.csv) + + + + Error exporting + Dışarı aktarım hatası + + + + Could not write to file %1. + %1 dosyasına yazılamadı. + + OptionsDialog @@ -1144,25 +1094,23 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - - Automatically start buynowcoin after logging in to the system. - Sisteme giriş yaptıktan sonra buynowcoin'i otomatik olarak başlat + Automatically start triangles after logging in to the system. + Sisteme giriş yaptıktan sonra triangles'i otomatik olarak başlat - - &Start buynowcoin on system login - Sisteme girişte buynowcoin'i &başlat + &Start triangles on system login + Sisteme girişte triangles'i &başlat - + 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. Kapanışta blok ve adres veritabanlarını birbirinden ayır. Bu, onların başka bir veri klasörüne taşınabileceği anlamına gelir ancak bu işlem kapanışı yavaşlatır. Cüzdan ise her zaman ayrılmıştır. @@ -1177,19 +1125,37 @@ This label turns red, if the priority is smaller than "medium". &Şebeke - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Yönelticide buynowcoin istemci portunu otomatik olarak aç. Bu, sadece yönelticiniz UPnP'i desteklediğinde ve etkin olduğunda çalışır. + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Yönelticide triangles istemci portunu otomatik olarak aç. Bu, sadece yönelticiniz UPnP'i desteklediğinde ve etkin olduğunda çalışır. - + Map port using &UPnP Portları &UPnP kullanarak haritala - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - buynowcoin ağına bir SOCKS vekil sunucusu yoluyla bağlan (örn. Tor yoluyla bağlanıldığında) + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + triangles ağına bir SOCKS vekil sunucusu yoluyla bağlan (örn. Tor yoluyla bağlanıldığında) + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1263,26 +1229,30 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - Kullanıcı arabirimi dili buradan ayarlanabilir. Ayar, buynowcoin yeniden başlatıldığında etkin olacaktır. + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + Kullanıcı arabirimi dili buradan ayarlanabilir. Ayar, triangles yeniden başlatıldığında etkin olacaktır. + + + &Unit to show amounts in: Meblağları göstermek için &birim: Choose the default subdivision unit to show in the interface and when sending coins. - Bitcoin gönderildiğinde arayüzde gösterilecek varsayılan alt birimi seçiniz. + Triangles gönderildiğinde arayüzde gösterilecek varsayılan alt birimi seçiniz. - - Whether to show buynowcoin addresses in the transaction list or not. - - - - + &Display addresses in transaction list Muamele listesinde adresleri &göster @@ -1294,7 +1264,7 @@ This label turns red, if the priority is smaller than "medium". Display coin &control features (experts only!) - + @@ -1309,7 +1279,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1320,13 +1290,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1342,20 +1312,20 @@ This label turns red, if the priority is smaller than "medium". Form - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1365,7 +1335,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1383,29 +1353,57 @@ This label turns red, if the priority is smaller than "medium". Oluşturulan bakiye henüz olgunlaşmamıştır - + Total: Toplam: - + Your current total balance Güncel toplam bakiyeniz - + <b>Recent transactions</b> <b>Son muameleler</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1419,57 +1417,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1526,7 +1524,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1556,17 +1554,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1580,13 +1573,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1595,18 +1588,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Konsolu temizle - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1630,8 +1628,9 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - Bitcoin yolla + Triangles yolla @@ -1654,7 +1653,7 @@ This label turns red, if the priority is smaller than "medium". Yetersiz fon! - + Quantity: Miktar: @@ -1662,7 +1661,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1679,8 +1678,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1690,7 +1689,7 @@ This label turns red, if the priority is smaller than "medium". medium - + orta @@ -1705,7 +1704,7 @@ This label turns red, if the priority is smaller than "medium". no - + hayır @@ -1715,15 +1714,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once Birçok alıcıya aynı anda gönder @@ -1735,7 +1734,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1749,8 +1748,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1763,9 +1762,9 @@ This label turns red, if the priority is smaller than "medium". G&önder - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1810,7 +1809,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1820,12 +1819,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1855,17 +1854,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1875,7 +1879,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1883,7 +1887,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Form @@ -1897,24 +1901,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Adres defterinize eklemek için bu adrese ilişik bir etiket giriniz + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Etiket: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1934,12 +1948,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Panodan adres yapıştır + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Birçok alıcıya aynı anda gönder + + + + Add &Recipient + &Alıcı ekle + + + + Remove all transaction fields + + + + + Clear &All + Tümünü &temizle + + + + Confirm the send action + Yollama etkinliğini teyit ediniz + + + + S&end + G&önder + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Alıcı adresi geçerli değildir, lütfen denetleyiniz. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Çift adres bulundu, belli bir gönderi sırasında her adrese sadece tek bir gönderide bulunulabilir. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Form + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Panodan adres yapıştır + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Adres defterinize eklemek için bu adrese ilişik bir etiket giriniz + + + + &Label: + &Etiket: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1962,14 +2187,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1999,11 +2224,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Tüm mesaj alanlarını sıfırla @@ -2026,34 +2256,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Tüm mesaj kontrolü alanlarını sıfırla - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature İmzayı oluşturmak için "Mesaj İmzala" unsurunu tıklayın + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2132,7 +2361,9 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + @@ -2162,7 +2393,9 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + @@ -2208,14 +2441,16 @@ This label turns red, if the priority is smaller than "medium". - + Credit Gider - + matures in %n more block(s) - + + + @@ -2226,12 +2461,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Gelir - + Transaction fee Muamele ücreti @@ -2251,14 +2486,14 @@ This label turns red, if the priority is smaller than "medium". Yorum - + Transaction ID Muamele tanımlayıcı - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2291,7 +2526,7 @@ This label turns red, if the priority is smaller than "medium". yanlış - + , has not been successfully broadcast yet , henüz başarılı bir şekilde yayınlanmadı @@ -2317,7 +2552,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Tarih @@ -2349,10 +2584,17 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + - + + Narration + + + + Offline Çevrim dışı @@ -2417,7 +2659,7 @@ This label turns red, if the priority is smaller than "medium". (mevcut değil) - + Transaction status. Hover over this field to show number of confirmations. Muamele durumu. Doğrulama sayısını görüntülemek için imleci bu alanda tutunuz. @@ -2548,7 +2790,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2593,12 +2835,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Dışarı aktarım hatası Could not write to file %1. - + %1 dosyasına yazılamadı. @@ -2612,32 +2854,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Kullanım: - - Send command to -server or buynowcoind - - - - + List commands Komutları listele @@ -2652,17 +2876,7 @@ This label turns red, if the priority is smaller than "medium". Seçenekler: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) Cüzdan dosyası belirtiniz (veri klasörünün içinde) @@ -2679,12 +2893,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2704,12 +2918,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2729,22 +2943,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2754,22 +2968,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2794,12 +3008,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2807,12 +3021,7 @@ This label turns red, if the priority is smaller than "medium". Uyarı: -paytxfee çok yüksek bir değere ayarlanmış! Bu, muamele gönderirseniz ödeyeceğiniz muamele ücretidir. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Uyarı: wallet.dat dosyasının okunması sırasında bir hata meydana geldi! Tüm anahtarlar doğru bir şekilde okundu, ancak muamele verileri ya da adres defteri unsurları hatalı veya eksik olabilir. @@ -2849,22 +3058,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2884,27 +3093,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL seçenekleri: (SSL kurulum bilgisi için Bitcoin vikisine bakınız) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL seçenekleri: (SSL kurulum bilgisi için Triangles vikisine bakınız) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2914,12 +3123,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2940,7 +3149,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2955,7 +3164,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2965,17 +3174,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2993,34 +3212,39 @@ This label turns red, if the priority is smaller than "medium". JSON-RPC bağlantıları için parola - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3045,17 +3269,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3075,17 +3299,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3105,17 +3329,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3125,27 +3349,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Bu bilgisayarda %s unsuruna bağlanılamadı. (bind şu hatayı iletti: %d, %s) Connect through socks proxy - + @@ -3160,7 +3374,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3168,17 +3382,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f wallet.dat dosyasının yüklenmesinde hata oluştu: bozuk cüzdan - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat wallet.dat dosyasının yüklenmesinde hata oluştu @@ -3215,12 +3419,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3238,39 +3442,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Blok indeksi yükleniyor... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Bağlanılacak düğüm ekle ve bağlantıyı zinde tutmaya çalış - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Cüzdan yükleniyor... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Cüzdan eski biçime geri alınamaz Cannot initialize keypool - + @@ -3307,4 +3541,514 @@ If the file does not exist, create it with owner-readable-only file permissions. Dosya mevcut değilse, sadece sahibi için okumayla sınırlı izin ile oluşturunuz. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Cüzdan + + + + &Overview + &Genel bakış + + + + Show general overview of wallet + Cüzdana genel bakışı göster + + + + &Send coins + Coin &gönder + + + + Send coins to a TRI address + + + + + &Receive coins + Coin &al + + + + Show the list of addresses for receiving payments + Ödeme almak için kullanılan adres listesini göster + + + + &Transactions + &İşlemler + + + + Browse transaction history + İşlem geçmişine göz at + + + + &Address Book + &Adres Defteri + + + + Edit the list of stored addresses and labels + Kayıtlı adresler ve etiketler listesini düzenle + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Çık + + + + Quit application + Uygulamadan çık + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + &Qt hakkında + + + + Show information about Qt + Qt hakkındaki bilgiyi göster + + + + &Options... + &Seçenekler... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + &Göster / Gizle + + + + &Encrypt Wallet... + Cüzdanı &Şifrele... + + + + Encrypt or decrypt wallet + Cüzdanı şifrele veya cüzdanın şifresini aç + + + + &Backup Wallet... + Cüzdanı &Yedekle... + + + + Backup wallet to another location + Cüzdanı başka bir konuma yedekle + + + + &Change Passphrase... + Parolayı &Değiştir... + + + + Change the passphrase used for wallet encryption + Cüzdan şifrelemesi için kullanılan parolayı değiştir + + + + &Unlock Wallet... + Cüzdanı &Kilitle... + + + + Unlock wallet + Cüzdanın kilidini aç + + + + &Lock Wallet + Cüzdanı &Kilitle + + + + Lock wallet + Cüzdanı kilitle + + + + Sign &message... + &Mesaj imzala... + + + + &Verify message... + Mesajı &doğrula... + + + + &Export... + &Dışarı aktar... + + + + Export the data in the current tab to a file + Mevcut sekmedeki veriyi bir dosyaya aktar + + + + &Debug window + &Hata ayıklama penceresi + + + + Open debugging and diagnostic console + Hata ayıklama ve teşhis penceresini aç + + + + &File + &Dosya + + + + &Settings + &Ayarlar + + + + &Help + &Yardım + + + + Tabs toolbar + Sekme araç çubuğu + + + + Actions toolbar + Eylem araç çubuğu + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + Ağ ile senkronizasyon... + + + + ~%n block(s) remaining + + ~%n blok kaldı + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + İşlem geçmişindeki %2 bloğun %1'i indirildi (%3% tamamlandı). + + + + Downloaded %1 blocks of transaction history. + İşlem geçmişinin %1 bloğu indirildi. + + + + Current difficulty is %1. + + + + + %n second(s) ago + + %n saniye önce + + + + + %n minute(s) ago + + %n dakika önce + + + + + %n hour(s) ago + + %n saat önce + + + + + %n day(s) ago + + %n gün önce + + + + + Up to date + Güncel + + + + Catching up... + Aralık kapatılıyor... + + + + Last received block was generated %1. + + + + + 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? + Bu işlem, büyüklük sınırının üzerindedir. İşleminizi gerçekleştirecek devrelere gidecek ve ağı desteklemeye yardımcı olacak %1 ücretle coin gönderebilirsiniz. Ücreti ödemek istiyor musunuz? + + + + Confirm transaction fee + İşlem ücretini onayla + + + + Sent transaction + İşlem gerçekleştirildi + + + + Incoming transaction + Gelen işlem + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Tarih: %1 +Miktar: %2 +Tür: %3 +Adres: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + URI işleme + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Cüzdan <b>şifrelenmiştir</b> ve şu anda <b>kilidi açıktır</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Cüzdan <b>şifrelenmiştir</b> ve şu anda <b>kilitlidir</b> + + + + Backup Wallet + Cüzdanı Yedekle + + + + Wallet Data (*.dat) + Cüzdan Verisi (*.dat) + + + + Backup Failed + Yedekleme Başarısız Oldu + + + + There was an error trying to save the wallet data to the new location. + Cüzdan verisi, yeni bir konuma kaydedilmeye çalışılırken bir hata oluştu. + + + + %n second(s) + + %n saniye + + + + + %n minute(s) + + %n dakika + + + + + %n hour(s) + + %n saat + + + + + %n day(s) + + %n gün + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + Pay alınıyor.<br>Sizin ağırlığınız %1<br>Ağın ağırlığı %2<br>Ödül almak için tahmini süre %3 + + + + Not staking because wallet is locked + Pay alınmıyor çünkü cüzdan kilitlidir + + + + Not staking because wallet is offline + Pay alınmıyor çünkü cüzdan çevrimdışıdır + + + + Not staking because wallet is syncing + Pay alınmıyor çünkü cüzdan senkronize ediliyor + + + + Not staking because you don't have mature coins + Pay alınmıyor çünkü olgunlaşmış coininiz yoktur + + + + Not staking + Pay alınmıyor + + + Show information about triangles + triangles hakkındaki bilgiyi göster + + + Send coins to a triangles address + Bir triangles adresine coin gönder + + + Modify configuration options for triangles + triangles yapılandırma seçeneklerini değiştir + + + triangles + triangles + + + &About triangles + triangles &Hakkında + + + triangles client + triangles istemcisi + + + %n active connection(s) to triangles network + + triangles ağına %n etkin bağlantı + + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + URI ayrıştırılamadı! Bu, geçersiz bir triangles adresi veya hatalı URI parametreleri nedeniyle olabilir. + + + A fatal error occurred. triangles can no longer continue safely and will quit. + Önemli bir hata oluştu. triangles artık güvenli bir şekilde devam edemez ve şimdi kapatılacak. + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_uk.qm b/src/qt/locale/triangles_uk.qm similarity index 50% rename from src/qt/locale/bitcoin_uk.qm rename to src/qt/locale/triangles_uk.qm index 87d3982..23eb57e 100644 Binary files a/src/qt/locale/bitcoin_uk.qm and b/src/qt/locale/triangles_uk.qm differ diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/triangles_uk.ts similarity index 68% rename from src/qt/locale/bitcoin_uk.ts rename to src/qt/locale/triangles_uk.ts index eb97b06..5379dc1 100644 --- a/src/qt/locale/bitcoin_uk.ts +++ b/src/qt/locale/triangles_uk.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -39,15 +40,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Двічі клікніть на адресу чи назву для їх зміни - + Create a new address Створити нову адресу @@ -57,52 +58,52 @@ This product includes software developed by the OpenSSL Project for use in the O Копіювати виділену адресу в буфер обміну - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address &Скопіювати адресу Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list Вилучити вибрані адреси з переліку - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + Перевірити повідомлення - + + These are your Triangles 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. + + + + &Delete &Видалити @@ -119,7 +120,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -129,18 +130,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Назва @@ -180,12 +181,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -235,7 +236,7 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -261,8 +262,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -306,431 +307,6 @@ This product includes software developed by the OpenSSL Project for use in the O Пароль було успішно змінено. - - BitcoinGUI - - - Sign &message... - &Підписати повідомлення... - - - - Synchronizing with network... - Синхронізація з мережею... - - - - &Overview - &Огляд - - - - Show general overview of wallet - Показати загальний огляд гаманця - - - - &Transactions - Транзакції - - - - Browse transaction history - Переглянути історію транзакцій - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - &Вихід - - - - Quit application - Вийти - - - - Show information about buynowcoin - - - - - About &Qt - &Про Qt - - - - Show information about Qt - Показати інформацію про Qt - - - - &Options... - &Параметри... - - - - &Encrypt Wallet... - &Шифрування гаманця... - - - - &Backup Wallet... - &Резервне копіювання гаманця... - - - - &Change Passphrase... - Змінити парол&ь... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - Резервне копіювання гаманця в інше місце - - - - Change the passphrase used for wallet encryption - Змінити пароль, який використовується для шифрування гаманця - - - - &Debug window - Вікно зневадження - - - - Open debugging and diagnostic console - Відкрити консоль зневадження і діагностики - - - - &Verify message... - Перевірити повідомлення... - - - - buynowcoin - - - - - Wallet - Гаманець - - - - &About buynowcoin - - - - - &Show / Hide - Показати / Приховати - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - &Файл - - - - &Settings - &Налаштування - - - - &Help - &Довідка - - - - Tabs toolbar - Панель вкладок - - - - Actions toolbar - - - - - - [testnet] - [тестова мережа] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - Синхронізовано - - - - Catching up... - Синхронізується... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - Надіслані транзакції - - - - Incoming transaction - Отримані перекази - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - Дата: %1 -Кількість: %2 -Тип: %3 -Адреса: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - <b>Зашифрований</b> гаманець <b>розблоковано</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - <b>Зашифрований</b> гаманець <b>заблоковано</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -744,17 +320,17 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + @@ -764,47 +340,47 @@ Address: %4 Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -814,7 +390,7 @@ Address: %4 Label - + @@ -829,7 +405,7 @@ Address: %4 Confirmations - + @@ -839,7 +415,7 @@ Address: %4 Priority - + @@ -865,82 +441,82 @@ Address: %4 Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -949,7 +525,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -958,7 +534,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -967,14 +543,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -985,12 +561,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -1008,7 +584,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1018,40 +594,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address Нова адреса для отримання - + New sending address Нова адреса для відправлення - + Edit receiving address Редагувати адресу для отримання - + Edit sending address Редагувати адресу для відправлення - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. Введена адреса «%1» вже присутня в адресній книзі. - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. Неможливо розблокувати гаманець. @@ -1065,44 +646,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + Використання: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + Тип + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + Повідомлення + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (немає назви) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Копіювати виділену адресу в буфер обміну + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + Вилучити вибрані адреси з переліку + + + + &Delete + &Видалити + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1120,7 +1042,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1130,32 +1052,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1164,8 +1086,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1174,13 +1096,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1190,7 +1112,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1249,8 +1171,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1264,8 +1186,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1275,12 +1197,12 @@ This label turns red, if the priority is smaller than "medium". Whether to show coin control features or not. - + Display coin &control features (experts only!) - + @@ -1295,7 +1217,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1306,13 +1228,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1328,20 +1250,20 @@ This label turns red, if the priority is smaller than "medium". Форма - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + @@ -1351,7 +1273,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1369,29 +1291,57 @@ This label turns red, if the priority is smaller than "medium". Замінований баланс, який ще не дозрів - + Total: всього: - + Your current total balance Ваше поточне Сукупний баланс - + <b>Recent transactions</b> <b>Недавні транзакції</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1405,57 +1355,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Кількість: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1512,7 +1462,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1542,17 +1492,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1566,13 +1511,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1581,18 +1526,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console Очистити консоль - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1616,44 +1566,45 @@ This label turns red, if the priority is smaller than "medium". + Send Coins Відправити Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + @@ -1665,51 +1616,51 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once Відправити на декілька адрес @@ -1721,7 +1672,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1735,8 +1686,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1749,14 +1700,14 @@ This label turns red, if the priority is smaller than "medium". &Відправити - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + @@ -1766,37 +1717,37 @@ This label turns red, if the priority is smaller than "medium". Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + @@ -1806,12 +1757,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1841,17 +1792,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1861,7 +1817,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1869,7 +1825,7 @@ This label turns red, if the priority is smaller than "medium". Form - + Форма @@ -1883,24 +1839,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book Введіть мітку для цієї адреси для додавання її в адресну книгу + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: &Мітка: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1920,12 +1886,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Вставити адресу + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + Відправити на декілька адрес + + + + Add &Recipient + Дод&ати одержувача + + + + Remove all transaction fields + + + + + Clear &All + Очистити &все + + + + Confirm the send action + Підтвердити відправлення + + + + S&end + &Відправити + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + Адреса отримувача невірна, будь ласка перепровірте. + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + Знайдено адресу що дублюється. Відправлення на кожну адресу дозволяється лише один раз на кожну операцію переказу. + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + Форма + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Вставити адресу + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + Введіть мітку для цієї адреси для додавання її в адресну книгу + + + + &Label: + &Мітка: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1948,14 +2125,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1985,11 +2162,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields Скинути всі поля підпису повідомлення @@ -2012,34 +2194,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields Скинути всі поля перевірки повідомлення - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature Натисніть кнопку «Підписати повідомлення», для отримання підпису + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2118,12 +2299,16 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + + + conflicted - + @@ -2148,7 +2333,11 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - + + + + + @@ -2194,14 +2383,18 @@ This label turns red, if the priority is smaller than "medium". - + Credit Кредит - + matures in %n more block(s) - + + + + + @@ -2212,12 +2405,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit Дебет - + Transaction fee Комісія за транзакцію @@ -2237,14 +2430,14 @@ This label turns red, if the priority is smaller than "medium". Коментар - + Transaction ID ID транзакції - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2277,7 +2470,7 @@ This label turns red, if the priority is smaller than "medium". false - + , has not been successfully broadcast yet , ще не було успішно розіслано @@ -2303,7 +2496,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date Дата @@ -2335,32 +2528,41 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - + + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + @@ -2403,7 +2605,7 @@ This label turns red, if the priority is smaller than "medium". (недоступно) - + Transaction status. Hover over this field to show number of confirmations. Статус транзакції. Наведіть вказівник на це поле, щоб показати кількість підтверджень. @@ -2534,7 +2736,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2579,12 +2781,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2598,32 +2800,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: Використання: - - Send command to -server or buynowcoind - - - - + List commands Список команд @@ -2638,19 +2822,9 @@ This label turns red, if the priority is smaller than "medium". Параметри: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + @@ -2665,12 +2839,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2690,12 +2864,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2710,27 +2884,27 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2740,22 +2914,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2775,17 +2949,17 @@ This label turns red, if the priority is smaller than "medium". An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2793,12 +2967,7 @@ This label turns red, if the priority is smaller than "medium". Увага: встановлено занадто велику комісію (-paytxfee). Комісія зніматиметься кожен раз коли ви проводитимете транзакції. - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Увага: помилка читання wallet.dat! Всі ключі прочитано коректно, але дані транзакцій чи записи адресної книги можуть бути пропущені, або пошкоджені. @@ -2835,22 +3004,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2870,27 +3039,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - Параметри SSL: (див. Bitcoin Wiki для налаштування SSL) + SSL options: (see the Triangles Wiki for SSL setup instructions) + Параметри SSL: (див. Triangles Wiki для налаштування SSL) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2900,12 +3069,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2926,7 +3095,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2941,7 +3110,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2951,17 +3120,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2979,34 +3158,39 @@ This label turns red, if the priority is smaller than "medium". Пароль для JSON-RPC-з'єднань - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3026,22 +3210,22 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3061,17 +3245,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3091,17 +3275,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3111,27 +3295,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) Неможливо прив'язати до порту %s на цьому комп'ютері (bind returned error %d, %s) Connect through socks proxy - + @@ -3146,7 +3320,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3154,17 +3328,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Помилка при завантаженні wallet.dat: Гаманець пошкоджено - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat Помилка при завантаженні wallet.dat @@ -3186,12 +3350,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + @@ -3201,12 +3365,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3224,39 +3388,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Завантаження індексу блоків... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open Додати вузол до підключення і лишити його відкритим - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... Завантаження гаманця... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet Не вдається понизити версію гаманця Cannot initialize keypool - + @@ -3293,4 +3487,496 @@ If the file does not exist, create it with owner-readable-only file permissions. Якщо файл не існує, створіть його із правами тільки для читання власником (owner-readable-only). - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + Гаманець + + + + &Overview + &Огляд + + + + Show general overview of wallet + Показати загальний огляд гаманця + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + Транзакції + + + + Browse transaction history + Переглянути історію транзакцій + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + &Вихід + + + + Quit application + Вийти + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + &Про Qt + + + + Show information about Qt + Показати інформацію про Qt + + + + &Options... + &Параметри... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + Показати / Приховати + + + + &Encrypt Wallet... + &Шифрування гаманця... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + &Резервне копіювання гаманця... + + + + Backup wallet to another location + Резервне копіювання гаманця в інше місце + + + + &Change Passphrase... + Змінити парол&ь... + + + + Change the passphrase used for wallet encryption + Змінити пароль, який використовується для шифрування гаманця + + + + &Unlock Wallet... + + + + + Unlock wallet + Розблокувати гаманець + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + &Підписати повідомлення... + + + + &Verify message... + Перевірити повідомлення... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + Вікно зневадження + + + + Open debugging and diagnostic console + Відкрити консоль зневадження і діагностики + + + + &File + &Файл + + + + &Settings + &Налаштування + + + + &Help + &Довідка + + + + Tabs toolbar + Панель вкладок + + + + Actions toolbar + + + + + + [testnet] + [тестова мережа] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + + Synchronizing with network... + Синхронізація з мережею... + + + + ~%n block(s) remaining + + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + + %n minute(s) ago + + + + + + + + + %n hour(s) ago + + + + + + + + + %n day(s) ago + + + + + + + + + Up to date + Синхронізовано + + + + Catching up... + Синхронізується... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + Надіслані транзакції + + + + Incoming transaction + Отримані перекази + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Дата: %1 +Кількість: %2 +Тип: %3 +Адреса: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + <b>Зашифрований</b> гаманець <b>розблоковано</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + <b>Зашифрований</b> гаманець <b>заблоковано</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + + %n minute(s) + + + + + + + + + %n hour(s) + + + + + + + + + %n day(s) + + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_ur_PK.qm b/src/qt/locale/triangles_ur_PK.qm similarity index 61% rename from src/qt/locale/bitcoin_ur_PK.qm rename to src/qt/locale/triangles_ur_PK.qm index 31cf0a9..7cba760 100644 Binary files a/src/qt/locale/bitcoin_ur_PK.qm and b/src/qt/locale/triangles_ur_PK.qm differ diff --git a/src/qt/locale/bitcoin_ur_PK.ts b/src/qt/locale/triangles_ur_PK.ts similarity index 55% rename from src/qt/locale/bitcoin_ur_PK.ts rename to src/qt/locale/triangles_ur_PK.ts index 41303ac..c3bd53c 100644 --- a/src/qt/locale/bitcoin_ur_PK.ts +++ b/src/qt/locale/triangles_ur_PK.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,108 +35,108 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label ایڈریس یا لیبل میں ترمیم کرنے پر ڈبل کلک کریں - + Create a new address نیا ایڈریس بنائیں Copy the currently selected address to the system clipboard - + - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete - + Copy &Label - + &Edit - + Export Address Book Data - + Comma separated file (*.csv) - + Error exporting - + Could not write to file %1. - + AddressTableModel - + Label چٹ @@ -155,7 +156,7 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + @@ -175,27 +176,27 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + 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>. - + Encrypt wallet - + This operation needs your wallet passphrase to unlock the wallet. - + @@ -205,7 +206,7 @@ This product includes software developed by the OpenSSL Project for use in the O This operation needs your wallet passphrase to decrypt the wallet. - + @@ -220,44 +221,44 @@ This product includes software developed by the OpenSSL Project for use in the O Enter the old and new passphrase to the wallet. - + Confirm wallet encryption - + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + Wallet encrypted - + - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -265,461 +266,40 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet encryption failed - + Wallet encryption failed due to an internal error. Your wallet was not encrypted. - + The supplied passphrases do not match. - + Wallet unlock failed - + The passphrase entered for the wallet decryption was incorrect. - + Wallet decryption failed - + Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - - - - - &Overview - - - - - Show general overview of wallet - - - - - &Transactions - - - - - Browse transaction history - - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - - - - - &Settings - - - - - &Help - - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,67 +315,67 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -805,7 +385,7 @@ Address: %4 Label - + چٹ @@ -820,118 +400,118 @@ Address: %4 Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -989,111 +569,457 @@ This label turns red, if the priority is smaller than "medium". Edit Address - + &Label - + The label associated with this address book entry - + &Address - + The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + Could not unlock wallet. - + New key generation failed. - + GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + ٹائپ + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + چٹ + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + چٹ کے بغیر + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1101,214 +1027,214 @@ This label turns red, if the priority is smaller than "medium". Options - + &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1316,79 +1242,107 @@ This label turns red, if the priority is smaller than "medium". Form - + - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> - + - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,117 +1561,118 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - + Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once - + Add &Recipient - + Remove all transaction fields - + Clear &All - + @@ -1726,123 +1681,128 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + Confirm the send action - + S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,63 +1820,284 @@ This label turns red, if the priority is smaller than "medium". Form - + A&mount: - + Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: - + - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,119 +2105,123 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2104,42 +2289,48 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Open for %n block(s) - + + + + conflicted - + %1/offline - + %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + + @@ -2149,108 +2340,111 @@ This label turns red, if the priority is smaller than "medium". Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2260,22 +2454,22 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet - + unknown - + @@ -2283,18 +2477,18 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date تاریخ @@ -2316,62 +2510,70 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + Received with - + Received from - + @@ -2381,12 +2583,12 @@ This label turns red, if the priority is smaller than "medium". Payment to yourself - + Mined - + @@ -2394,29 +2596,29 @@ This label turns red, if the priority is smaller than "medium". (N / A) - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2460,7 +2662,7 @@ This label turns red, if the priority is smaller than "medium". Received with - + @@ -2470,72 +2672,72 @@ This label turns red, if the priority is smaller than "medium". To yourself - + Mined - + Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + Comma separated file (*.csv) - + Confirmed - + @@ -2565,534 +2767,511 @@ This label turns red, if the priority is smaller than "medium". ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + Allow JSON-RPC connections from specified IP address - + Send commands to node running on <ip> (default: 127.0.0.1) - + Execute command when the best block changes (%s in cmd is replaced by block hash) - + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - + Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + Upgrade wallet to latest format - + Set key pool size to <n> (default: 100) - + Rescan the block chain for missing wallet transactions - + How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + Use OpenSSL (https) for JSON-RPC connections - + Server certificate file (default: server.cert) - + Server private key (default: server.pem) - + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3102,102 +3281,82 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) - + Connect through socks proxy - + Allow DNS lookups for -addnode, -seednode and -connect - + Loading addresses... - + Error loading blkindex.dat - + Error loading wallet.dat: Wallet corrupted - + - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat - + Invalid -proxy address: '%s' - + Unknown network specified in -onlynet: '%s' - + Unknown -socks proxy version requested: %i - + Cannot resolve -bind address: '%s' - + Cannot resolve -externalip address: '%s' - + Invalid amount for -paytxfee=<amount>: '%s' - + Error: could not start node - + Sending... - + @@ -3212,62 +3371,97 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Loading block index... - + - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + @@ -3279,7 +3473,485 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + + + + + Browse transaction history + + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + بٹوا ان لاک + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + + Synchronizing with network... + + + + + ~%n block(s) remaining + + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + + %n minute(s) ago + + + + + + + + %n hour(s) ago + + + + + + + + %n day(s) ago + + + + + + + + Up to date + + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + + %n minute(s) + + + + + + + + %n hour(s) + + + + + + + + %n day(s) + + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_vi.qm b/src/qt/locale/triangles_vi.qm new file mode 100644 index 0000000..70f0b98 Binary files /dev/null and b/src/qt/locale/triangles_vi.qm differ diff --git a/src/qt/locale/bitcoin_vi.ts b/src/qt/locale/triangles_vi.ts similarity index 55% rename from src/qt/locale/bitcoin_vi.ts rename to src/qt/locale/triangles_vi.ts index 1106ff3..5991bb6 100644 --- a/src/qt/locale/bitcoin_vi.ts +++ b/src/qt/locale/triangles_vi.ts @@ -1,32 +1,33 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. 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. - + @@ -34,15 +35,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label Click đúp chuột để chỉnh sửa địa chỉ hoặc nhãn dữ liệu - + Create a new address Tạo một địa chỉ mới @@ -52,69 +53,69 @@ This product includes software developed by the OpenSSL Project for use in the O Sao chép các địa chỉ đã được chọn vào bộ nhớ tạm thời của hệ thống - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address - + Show &QR Code - - - - - Sign a message to prove you own a buynowcoin address - - - - - Sign &Message - - - - - Delete the currently selected address from the list - - - - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - - &Verify Message - + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + &Delete &Xóa Copy &Label - + &Edit - + Export Address Book Data - + @@ -124,18 +125,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label Nhãn dữ liệu @@ -155,109 +156,109 @@ This product includes software developed by the OpenSSL Project for use in the O Passphrase Dialog - + Enter passphrase - + New passphrase - + Repeat new passphrase - + Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + 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>. - + Encrypt wallet - + This operation needs your wallet passphrase to unlock the wallet. - + Unlock wallet - + This operation needs your wallet passphrase to decrypt the wallet. - + Decrypt wallet - + Change passphrase - + Enter the old and new passphrase to the wallet. - + Confirm wallet encryption - + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + Are you sure you wish to encrypt your wallet? - + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. - + Warning: The Caps Lock key is on! - + Wallet encrypted - + - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -265,461 +266,40 @@ This product includes software developed by the OpenSSL Project for use in the O Wallet encryption failed - + Wallet encryption failed due to an internal error. Your wallet was not encrypted. - + The supplied passphrases do not match. - + Wallet unlock failed - + The passphrase entered for the wallet decryption was incorrect. - + Wallet decryption failed - + Wallet passphrase was successfully changed. - - - - - BitcoinGUI - - - Sign &message... - - - - - Synchronizing with network... - - - - - &Overview - - - - - Show general overview of wallet - - - - - &Transactions - - - - - Browse transaction history - - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - - - - - Quit application - - - - - Show information about buynowcoin - - - - - About &Qt - - - - - Show information about Qt - - - - - &Options... - - - - - &Encrypt Wallet... - - - - - &Backup Wallet... - - - - - &Change Passphrase... - - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - - - - - Change the passphrase used for wallet encryption - - - - - &Debug window - - - - - Open debugging and diagnostic console - - - - - &Verify message... - - - - - buynowcoin - - - - - Wallet - - - - - &About buynowcoin - - - - - &Show / Hide - - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - - - - - &Settings - - - - - &Help - - - - - Tabs toolbar - - - - - Actions toolbar - - - - - - [testnet] - - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - - - - - Catching up... - - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - - - - - Incoming transaction - - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - - - - - %n day(s) - - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - + @@ -727,7 +307,7 @@ Address: %4 Network Alert - + @@ -735,67 +315,67 @@ Address: %4 Coin Control - + Quantity: - + Bytes: - + Amount: - + Priority: - + Fee: - + Low Output: - + no - + After Fee: - + Change: - + (un)select all - + Tree mode - + List mode - + @@ -805,7 +385,7 @@ Address: %4 Label - + Nhãn dữ liệu @@ -815,123 +395,123 @@ Address: %4 Date - + Confirmations - + Confirmed - + Priority - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Copy quantity - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + highest - + high - + medium-high - + medium - + low-medium - + low - + lowest - + DUST - + yes - + @@ -940,7 +520,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -949,7 +529,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -958,14 +538,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -976,12 +556,12 @@ This label turns red, if the priority is smaller than "medium". change from %1 (%2) - + (change) - + @@ -989,111 +569,457 @@ This label turns red, if the priority is smaller than "medium". Edit Address - + &Label - + The label associated with this address book entry - + &Address - + The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address - - - - - New sending address - - - - - Edit receiving address - - - - - Edit sending address - - - - - The entered address "%1" is already in the address book. - - - - - The entered address "%1" is not a valid buynowcoin address. - + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + Could not unlock wallet. - + New key generation failed. - + GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + Nhãn dữ liệu + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (chưa có nhãn) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + Sao chép các địa chỉ đã được chọn vào bộ nhớ tạm thời của hệ thống + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + &Xóa + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + Tập tin tách biệt bởi dấu phẩy (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + @@ -1101,214 +1027,214 @@ This label turns red, if the priority is smaller than "medium". Options - + &Main - + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + Pay transaction &fee - + Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + &Network - + - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + Map port using &UPnP - + - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + Proxy &IP: - + IP address of the proxy (e.g. 127.0.0.1) - + &Port: - + Port of the proxy (e.g. 9050) - + SOCKS &Version: - + SOCKS version of the proxy (e.g. 5) - + &Window - + Show only a tray icon after minimizing the window. - + &Minimize to the tray instead of the taskbar - + 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. - + M&inimize on close - + &Display - + User Interface &language: - + - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + &Unit to show amounts in: - + Choose the default subdivision unit to show in the interface and when sending coins. - + - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + &Display addresses in transaction list - + Whether to show coin control features or not. - + Display coin &control features (experts only!) - + &OK - + &Cancel - + &Apply - + default - + Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + The supplied proxy address is invalid. - + @@ -1316,79 +1242,107 @@ This label turns red, if the priority is smaller than "medium". Form - + - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + Unconfirmed: - + Wallet - + Spendable: - + Your current spendable balance - + Immature: - + Mined balance that has not yet matured - + - + Total: - + - + Your current total balance - + - + <b>Recent transactions</b> - + - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + out of sync - + @@ -1396,57 +1350,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1454,7 +1408,7 @@ This label turns red, if the priority is smaller than "medium". Client name - + @@ -1468,132 +1422,132 @@ This label turns red, if the priority is smaller than "medium". N/A - + Client version - + &Information - + Using OpenSSL version - + Startup time - + Network - + Number of connections - + On testnet - + Block chain - + Current number of blocks - + Estimated total blocks - + Last block time - + &Open - + Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + &Console - + Build date - + - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + Debug log file - + - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console - + - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - + Type <b>help</b> for an overview of available commands. - + @@ -1607,242 +1561,248 @@ This label turns red, if the priority is smaller than "medium". + Send Coins - + Coin Control Features - + Inputs... - + automatically selected - + Insufficient funds! - + - + Quantity: - + 0 - + Bytes: - + Amount: - + - 0.00 BTC - + 0.00 TRI + Priority: - + medium - + Fee: - + Low Output: - + no - + After Fee: - + Change - + custom change address - + - + Send to multiple recipients at once - + Add &Recipient - + Remove all transaction fields - + Clear &All - + Balance: - + - 123.456 BTC - + 123.456 TRI + Confirm the send action - + S&end - + - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Copy quantity - + Copy amount - + Copy fee - + Copy after fee - + Copy bytes - + Copy priority - + Copy low output - + Copy change - + <b>%1</b> to %2 (%3) - + Confirm send coins - + Are you sure you want to send %1? - + and - + The recipient address is not valid, please recheck. - + The amount to pay must be larger than 0. - + The amount exceeds your balance. - + The total exceeds your balance when the %1 transaction fee is included. - + Duplicate address found, can only send to each address once per send operation. - + Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1852,7 +1812,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1860,63 +1820,284 @@ This label turns red, if the priority is smaller than "medium". Form - + A&mount: - + Pay &To: - + - + Enter a label for this address to add it to your address book - + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: - + - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1924,119 +2105,123 @@ This label turns red, if the priority is smaller than "medium". Signatures - Sign / Verify a Message - + &Sign Message - + 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. - + - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + Alt+A - + Paste address from clipboard - + Alt+P - + Enter the message you want to sign here - + Copy the current signature to the system clipboard - + - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields - + Clear &All - + &Verify Message - + 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. - + - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields - + - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature - + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + The entered address is invalid. - + @@ -2044,59 +2229,59 @@ This label turns red, if the priority is smaller than "medium". Please check the address and try again. - + The entered address does not refer to a key. - + Wallet unlock was cancelled. - + Private key for the entered address is not available. - + Message signing failed. - + Message signed. - + The signature could not be decoded. - + Please check the signature and try again. - + The signature did not match the message digest. - + Message verification failed. - + Message verified. - + @@ -2104,153 +2289,159 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Open for %n block(s) - + + + conflicted - + %1/offline - + %1/unconfirmed - + %1 confirmations - + Status - + , broadcast through %n node(s) - + + + Date - + Source - + Generated - + From - + To - + own address - + label - + - + Credit - + - + matures in %n more block(s) - + + + not accepted - + - + Debit - + - + Transaction fee - + Net amount - + Message - + Comment - + - + Transaction ID - + - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + Debug information - + Transaction - + Inputs - + @@ -2260,22 +2451,22 @@ This label turns red, if the priority is smaller than "medium". true - + false - + - + , has not been successfully broadcast yet - + unknown - + @@ -2283,25 +2474,25 @@ This label turns red, if the priority is smaller than "medium". Transaction details - + This pane shows a detailed description of the transaction - + TransactionTableModel - + Date - + Type - + @@ -2316,107 +2507,114 @@ This label turns red, if the priority is smaller than "medium". Open until %1 - + Confirmed (%1 confirmations) - + Open for %n more block(s) - + + + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + Immature (%1 confirmations, will be available after %2) - + This block was not received by any other nodes and will probably not be accepted! - + Generated but not accepted - + Received with - + Received from - + Sent to - + Payment to yourself - + Mined - + (n/a) - + - + Transaction status. Hover over this field to show number of confirmations. - + Date and time that the transaction was received. - + Type of transaction. - + Destination address of transaction. - + Amount removed from or added to balance. - + @@ -2425,107 +2623,107 @@ This label turns red, if the priority is smaller than "medium". All - + Today - + This week - + This month - + Last month - + This year - + Range... - + Received with - + Sent to - + To yourself - + Mined - + Other - + Enter address or label to search - + Min amount - + Copy address - + Copy label - + Copy amount - + Copy transaction ID - + Edit label - + Show transaction details - + Export Transaction Data - + @@ -2535,17 +2733,17 @@ This label turns red, if the priority is smaller than "medium". Confirmed - + Date - + Type - + @@ -2565,721 +2763,1181 @@ This label turns red, if the priority is smaller than "medium". ID - + Error exporting - + Could not write to file %1. - + Range: - + to - + - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: - + - - Send command to -server or buynowcoind - - - - + List commands - + Get help for a command - + Options: - + - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) - + Specify data directory - + Set database cache size in megabytes (default: 25) - + Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + Maintain at most <n> connections to peers (default: 125) - + Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address - + Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + Threshold for disconnecting misbehaving peers (default: 100) - + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) - + An error occurred while setting up the RPC port %u for listening on IPv4: %s - + Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + Accept command line and JSON-RPC commands - + Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + Run in the background as a daemon and accept commands - + Use the test network - + Accept connections from outside (default: 1 if no -proxy or -connect) - + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s - + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - + - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. - + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - + Attempt to recover private keys from a corrupt wallet.dat - + Block creation options: - + Connect only to the specified node(s) - + Discover own IP address (default: 1 when listening and no -externalip) - + Failed to listen on any port. Use -listen=0 if you want this. - + Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) - + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) - + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) - + Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - - - - + Select the version of socks proxy to use (4-5, default: 5) - + Send trace/debug info to console instead of debug.log file - + Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + Set minimum block size in bytes (default: 0) - + Shrink debug.log file on client startup (default: 1 when no -debug) - + Specify connection timeout in milliseconds (default: 5000) - + Unable to sign checkpoint, wrong checkpointkey? - + Use UPnP to map the listening port (default: 0) - + Use UPnP to map the listening port (default: 1 when listening) - + Use proxy to reach tor hidden services (default: same as -proxy) - + Username for JSON-RPC connections - + Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + Warning: This version is obsolete, upgrade required! - + wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections - + - + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com - + - - Find peers using internet relay chat (default: 0) - + + Specify configuration file (default: triangles.conf) + - - Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - - - - - When creating transactions, ignore inputs with value less than this (default: 0.01) - - - - - Allow JSON-RPC connections from specified IP address - - - - - Send commands to node running on <ip> (default: 127.0.0.1) - - - - - Execute command when the best block changes (%s in cmd is replaced by block hash) - - - - - Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - - - - Require a confirmations for change (default: 0) - - - - - Enforce transaction scripts to use canonical PUSH operators (default: 1) - - - - - Execute command when a relevant alert is received (%s in cmd is replaced by message) - - - - - Upgrade wallet to latest format - - - - - Set key pool size to <n> (default: 100) - - - - - Rescan the block chain for missing wallet transactions - - - - - How many blocks to check at startup (default: 2500, 0 = all) - - - - - How thorough the block verification is (0-6, default: 1) - - - - - Imports blocks from external blk000?.dat file - - - - - Use OpenSSL (https) for JSON-RPC connections - - - - - Server certificate file (default: server.cert) - - - - - Server private key (default: server.pem) - - - - - Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - - - - - Error: Wallet unlocked for staking only, unable to create transaction. - - - - - WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - - - - - This help message - - - - - Wallet %s resides outside data directory %s. - - - - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - - Unable to bind to %s on this computer (bind returned error %d, %s) - - - - - Connect through socks proxy - - - - - Allow DNS lookups for -addnode, -seednode and -connect - - - - - Loading addresses... - - - - - Error loading blkindex.dat - - - - - Error loading wallet.dat: Wallet corrupted - - - - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - - Error loading wallet.dat - - - - - Invalid -proxy address: '%s' - - - - - Unknown network specified in -onlynet: '%s' - - - - - Unknown -socks proxy version requested: %i - - - - - Cannot resolve -bind address: '%s' - - - - - Cannot resolve -externalip address: '%s' - - - - - Invalid amount for -paytxfee=<amount>: '%s' - - - - - Error: could not start node - - - - - Sending... - - - - - Invalid amount - - - - - Insufficient funds - - - - - Loading block index... - - - - + Add a node to connect to and attempt to keep the connection open - - - - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - - Fee per KB to add to transactions you send - - - - - Invalid amount for -mininput=<amount>: '%s' - + - Loading wallet... - + Fee per KB to add to transactions you send + - + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet - + Cannot initialize keypool - + Cannot write default address - + Rescanning... - + Done loading - + To use the %s option - + Error - + You must set rpcpassword=<password> in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions. - + - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + + + + + Browse transaction history + + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + + + + + + %n day(s) + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/bitcoin_vi_VN.qm b/src/qt/locale/triangles_vi_VN.qm similarity index 100% rename from src/qt/locale/bitcoin_vi_VN.qm rename to src/qt/locale/triangles_vi_VN.qm diff --git a/src/qt/locale/triangles_vi_VN.ts b/src/qt/locale/triangles_vi_VN.ts new file mode 100644 index 0000000..4ffd17e --- /dev/null +++ b/src/qt/locale/triangles_vi_VN.ts @@ -0,0 +1,3943 @@ + + + + + AboutDialog + + + About Triangles + + + + + <b>Triangles</b> version + + + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team + + + + + +This is experimental software. + +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. + + + + + AddressBookPage + + + Address Book + + + + + Double-click to edit address or label + + + + + Create a new address + Tạo một địa chỉ mới + + + + Copy the currently selected address to the system clipboard + + + + + Sign a message to prove you own a TRI address + + + + + &New Address + + + + + &Copy Address + + + + + Show &QR Code + + + + + Sign &Message + + + + + Verify a message to ensure it was signed with a specified TRI address + + + + + Delete the currently selected address from the list + + + + + &Verify Message + + + + + These are your Triangles 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. + + + + + &Delete + + + + + Copy &Label + + + + + &Edit + + + + + Export Address Book Data + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + + + + + AddressTableModel + + + Label + + + + + Address + + + + + (no label) + + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + + + + + New passphrase + + + + + Repeat new passphrase + + + + + Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. + + + + + For staking only + + + + + 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>. + + + + + Encrypt wallet + + + + + This operation needs your wallet passphrase to unlock the wallet. + + + + + Unlock wallet + + + + + This operation needs your wallet passphrase to decrypt the wallet. + + + + + Decrypt wallet + + + + + Change passphrase + + + + + Enter the old and new passphrase to the wallet. + + + + + Confirm wallet encryption + + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! + + + + + Are you sure you wish to encrypt your wallet? + + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. + + + + + + Warning: The Caps Lock key is on! + + + + + + Wallet encrypted + + + + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + + + + + Wallet encryption failed + + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + + + + + + The supplied passphrases do not match. + + + + + Wallet unlock failed + + + + + + + The passphrase entered for the wallet decryption was incorrect. + + + + + Wallet decryption failed + + + + + Wallet passphrase was successfully changed. + + + + + ClientModel + + + Network Alert + + + + + CoinControlDialog + + + Coin Control + + + + + Quantity: + + + + + Bytes: + + + + + Amount: + + + + + Priority: + + + + + Fee: + + + + + Low Output: + + + + + no + + + + + After Fee: + + + + + Change: + + + + + (un)select all + + + + + Tree mode + + + + + List mode + + + + + Amount + + + + + Label + + + + + Address + + + + + Date + + + + + Confirmations + + + + + Confirmed + + + + + Priority + + + + + Copy address + + + + + Copy label + + + + + + Copy amount + + + + + Copy transaction ID + + + + + Copy quantity + + + + + Copy fee + + + + + Copy after fee + + + + + Copy bytes + + + + + Copy priority + + + + + Copy low output + + + + + Copy change + + + + + highest + + + + + high + + + + + medium-high + + + + + medium + + + + + low-medium + + + + + low + + + + + lowest + + + + + DUST + + + + + yes + + + + + This label turns red, if the transaction size is bigger than 10000 bytes. + + This means a fee of at least %1 per kb is required. + + Can vary +/- 1 Byte per input. + + + + + Transactions with higher priority get more likely into a block. + +This label turns red, if the priority is smaller than "medium". + + This means a fee of at least %1 per kb is required. + + + + + This label turns red, if any recipient receives an amount smaller than %1. + + This means a fee of at least %2 is required. + + Amounts below 0.546 times the minimum relay fee are shown as DUST. + + + + + This label turns red, if the change is smaller than %1. + + This means a fee of at least %2 is required. + + + + + + (no label) + + + + + change from %1 (%2) + + + + + (change) + + + + + EditAddressDialog + + + Edit Address + + + + + &Label + + + + + The label associated with this address book entry + + + + + &Address + + + + + The address associated with this address book entry. This can only be modified for sending addresses. + + + + + &Stealth Address + + + + + New receiving address + + + + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid TRI address. + + + + + The entered address "%1" is already in the address book. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + version + + + + + + Triangles-Qt + + + + + Usage: + + + + + command-line options + + + + + UI options + + + + + Set language, for example "de_DE" (default: system locale) + + + + + Start minimized + + + + + Show splash screen on startup (default: 1) + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + + + + + To Address + + + + + From Address + + + + + Message + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + + + + + &Delete + + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + + + + + OptionsDialog + + + Options + + + + + &Main + + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. + + + + + Pay transaction &fee + + + + + Reserved amount does not participate in staking and is therefore spendable at any time. + + + + + Reserve + + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + 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. + + + + + &Detach databases at shutdown + + + + + &Network + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + + + + + &Connect through SOCKS proxy: + + + + + Proxy &IP: + + + + + IP address of the proxy (e.g. 127.0.0.1) + + + + + &Port: + + + + + Port of the proxy (e.g. 9050) + + + + + SOCKS &Version: + + + + + SOCKS version of the proxy (e.g. 5) + + + + + &Window + + + + + Show only a tray icon after minimizing the window. + + + + + &Minimize to the tray instead of the taskbar + + + + + 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. + + + + + M&inimize on close + + + + + &Display + + + + + User Interface &language: + + + + + The user interface language can be set here. This setting will take effect after restarting Triangles. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show TRI addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + Whether to show coin control features or not. + + + + + Display coin &control features (experts only!) + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + + Warning + + + + + + This setting will take effect after restarting Triangles. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + + Stake: + + + + + Unconfirmed: + + + + + Wallet + + + + + Spendable: + + + + + Your current spendable balance + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + Total: + + + + + Your current total balance + + + + + <b>Recent transactions</b> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + Total of coins that was staked, and do not yet count toward the current balance + + + + + + out of sync + + + + + QRCodeDialog + + + QR Code Dialog + + + + + Request Payment + + + + + Amount: + + + + + Label: + + + + + Message: + + + + + &Save As... + + + + + Error encoding URI into QR Code. + + + + + The entered amount is invalid, please check. + + + + + Resulting URI too long, try to reduce the text for label / message. + + + + + Save QR Code + + + + + PNG Images (*.png) + + + + + RPCConsole + + + Client name + + + + + + + + + + + + + + N/A + + + + + Client version + + + + + &Information + + + + + Using OpenSSL version + + + + + Startup time + + + + + Network + + + + + Number of connections + + + + + On testnet + + + + + Block chain + + + + + Current number of blocks + + + + + Estimated total blocks + + + + + Last block time + + + + + &Open + + + + + Command-line options + + + + + &Show + + + + + &Console + + + + + Build date + + + + + Triangles - Debug window + + + + + Triangles Core + + + + + Debug log file + + + + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + + Clear console + + + + + Welcome to the Triangles RPC console. + + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + + + + + Type <b>help</b> for an overview of available commands. + + + + + SendCoinsDialog + + + + + + + + + + + Send Coins + + + + + Coin Control Features + + + + + Inputs... + + + + + automatically selected + + + + + Insufficient funds! + + + + + Quantity: + + + + + + 0 + + + + + Bytes: + + + + + Amount: + + + + + + + + 0.00 TRI + + + + + Priority: + + + + + medium + + + + + Fee: + + + + + Low Output: + + + + + no + + + + + After Fee: + + + + + Change + + + + + custom change address + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 TRI + + + + + Confirm the send action + + + + + S&end + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Copy quantity + + + + + Copy amount + + + + + Copy fee + + + + + Copy after fee + + + + + Copy bytes + + + + + Copy priority + + + + + Copy low output + + + + + Copy change + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send coins + + + + + Are you sure you want to send %1? + + + + + and + + + + + The recipient address is not valid, please recheck. + + + + + The amount to pay must be larger than 0. + + + + + The amount exceeds your balance. + + + + + The total exceeds your balance when the %1 transaction fee is included. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Transaction creation failed. + + + + + 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. + + + + + Error: Narration is too long. + + + + + WARNING: Invalid TRI address + + + + + (no label) + + + + + WARNING: unknown change address + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + + Enter a label for this address to add it to your address book + + + + + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + + &Label: + + + + + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Confirm the send action + + + + + S&end + + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + + + + + + &Sign Message + + + + + 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. + + + + + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this TRI address + + + + + Verify the message to ensure it was signed with the specified TRI address + + + + + Reset all sign message fields + + + + + + Clear &All + + + + + + &Verify Message + + + + + 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. + + + + + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Reset all verify message fields + + + + + Click "Sign Message" to generate signature + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + + + + + + The entered address is invalid. + + + + + + + + Please check the address and try again. + + + + + + The entered address does not refer to a key. + + + + + Wallet unlock was cancelled. + + + + + Private key for the entered address is not available. + + + + + Message signing failed. + + + + + Message signed. + + + + + The signature could not be decoded. + + + + + + Please check the signature and try again. + + + + + The signature did not match the message digest. + + + + + Message verification failed. + + + + + Message verified. + + + + + TransactionDesc + + + Open until %1 + + + + + Open for %n block(s) + + + + + + + conflicted + + + + + %1/offline + + + + + %1/unconfirmed + + + + + %1 confirmations + + + + + Status + + + + + , broadcast through %n node(s) + + + + + + + Date + + + + + Source + + + + + Generated + + + + + + From + + + + + + + To + + + + + + own address + + + + + label + + + + + + + + + Credit + + + + + matures in %n more block(s) + + + + + + + not accepted + + + + + + + + Debit + + + + + Transaction fee + + + + + Net amount + + + + + Message + + + + + Comment + + + + + Transaction ID + + + + + Generated coins must mature 60 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. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + + + + + Amount + + + + + Open until %1 + + + + + Confirmed (%1 confirmations) + + + + + Open for %n more block(s) + + + + + + + Narration + + + + + Offline + + + + + Unconfirmed + + + + + Confirming (%1 of %2 recommended confirmations) + + + + + Conflicted + + + + + Immature (%1 confirmations, will be available after %2) + + + + + This block was not received by any other nodes and will probably not be accepted! + + + + + Generated but not accepted + + + + + Received with + + + + + Received from + + + + + Sent to + + + + + Payment to yourself + + + + + Mined + + + + + (n/a) + + + + + Transaction status. Hover over this field to show number of confirmations. + + + + + Date and time that the transaction was received. + + + + + Type of transaction. + + + + + Destination address of transaction. + + + + + Amount removed from or added to balance. + + + + + TransactionView + + + + All + + + + + Today + + + + + This week + + + + + This month + + + + + Last month + + + + + This year + + + + + Range... + + + + + Received with + + + + + Sent to + + + + + To yourself + + + + + Mined + + + + + Other + + + + + Enter address or label to search + + + + + Min amount + + + + + Copy address + + + + + Copy label + + + + + Copy amount + + + + + Copy transaction ID + + + + + Edit label + + + + + Show transaction details + + + + + Export Transaction Data + + + + + Comma separated file (*.csv) + + + + + Confirmed + + + + + Date + + + + + Type + + + + + Label + + + + + Address + + + + + Amount + + + + + ID + + + + + Error exporting + + + + + Could not write to file %1. + + + + + Range: + + + + + to + + + + + Triangles-core + + + Usage: + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify wallet file (within data directory) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Set database disk log size in megabytes (default: 100) + + + + + Listen for connections on <port> (default: 15714 or testnet: 25714) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + Bind to given address. Use [host]:port notation for IPv6 + + + + + Stake your coins to support network and gain reward (default: 1) + + + + + Threshold for disconnecting misbehaving peers (default: 100) + + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Detach block and address databases. Increases shutdown time (default: 0) + + + + + 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. + + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds + + + + + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) + + + + + Accept command line and JSON-RPC commands + + + + + Error: Transaction creation failed + + + + + Error: Wallet locked, unable to create transaction + + + + + Importing blockchain data file. + + + + + Importing bootstrap blockchain data file. + + + + + Run in the background as a daemon and accept commands + + + + + Use the test network + + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + + + + + Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. + + + + + Attempt to recover private keys from a corrupt wallet.dat + + + + + Block creation options: + + + + + Connect only to the specified node(s) + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Find peers using DNS lookup (default: 1) + + + + + Sync checkpoints policy (default: strict) + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -reservebalance=<amount> + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + + + + + Output extra debugging information. Implies all other -debug* options + + + + + Output extra network debugging information + + + + + Prepend debug output with timestamp + + + + + Select the version of socks proxy to use (4-5, default: 5) + + + + + Send trace/debug info to console instead of debug.log file + + + + + Send trace/debug info to debugger + + + + + Set maximum block size in bytes (default: 250000) + + + + + Set minimum block size in bytes (default: 0) + + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + Unable to sign checkpoint, wrong checkpointkey? + + + + + + Use UPnP to map the listening port (default: 0) + + + + + Use UPnP to map the listening port (default: 1 when listening) + + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + + + + + Verifying database integrity... + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + + WARNING: syncronized checkpoint violation detected, but skipped! + + + + + Warning: Disk space is low! + + + + + Warning: This version is obsolete, upgrade required! + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + Triangles version + + + + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + + Find peers using internet relay chat (default: 0) + + + + + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) + + + + + When creating transactions, ignore inputs with value less than this (default: 0.01) + + + + + Allow JSON-RPC connections from specified IP address + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Require a confirmations for change (default: 0) + + + + + Enforce transaction scripts to use canonical PUSH operators (default: 1) + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + How many blocks to check at startup (default: 2500, 0 = all) + + + + + How thorough the block verification is (0-6, default: 1) + + + + + Imports blocks from external blk000?.dat file + + + + + Use OpenSSL (https) for JSON-RPC connections + + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + Error: Wallet unlocked for staking only, unable to create transaction. + + + + + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. + + + + + This help message + + + + + Wallet %s resides outside data directory %s. + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + + + + + Allow DNS lookups for -addnode, -seednode and -connect + + + + + Loading addresses... + + + + + Error loading blkindex.dat + + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + + + + + Unknown network specified in -onlynet: '%s' + + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + + + + + Error: could not start node + + + + + Sending... + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + + + + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + + Add a node to connect to and attempt to keep the connection open + + + + + Fee per KB to add to transactions you send + + + + + SSL options: (see the Triangles Wiki for SSL setup instructions) + + + + + Invalid amount for -mininput=<amount>: '%s' + + + + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + + Loading wallet... + + + + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Cannot downgrade wallet + + + + + Cannot initialize keypool + + + + + Cannot write default address + + + + + Rescanning... + + + + + Done loading + + + + + To use the %s option + + + + + Error + + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + + + + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + + + + + Browse transaction history + + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + + + + + Quit application + + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + Modify configuration options for Triangles + + + + + &Show / Hide + + + + + &Encrypt Wallet... + + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + + + + + Backup wallet to another location + + + + + &Change Passphrase... + + + + + Change the passphrase used for wallet encryption + + + + + &Unlock Wallet... + + + + + Unlock wallet + + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + + + + + &Verify message... + + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + Actions toolbar + + + + + + [testnet] + + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + + + + + Catching up... + + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + + + + + Incoming transaction + + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + + + + + + %n day(s) + + + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/locale/triangles_zh_CN.qm b/src/qt/locale/triangles_zh_CN.qm new file mode 100644 index 0000000..178eaf7 Binary files /dev/null and b/src/qt/locale/triangles_zh_CN.qm differ diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/triangles_zh_CN.ts similarity index 68% rename from src/qt/locale/bitcoin_zh_CN.ts rename to src/qt/locale/triangles_zh_CN.ts index 7c9e42f..8535a0b 100644 --- a/src/qt/locale/bitcoin_zh_CN.ts +++ b/src/qt/locale/triangles_zh_CN.ts @@ -1,27 +1,38 @@ - + + + AboutDialog - About buynowcoin + About Triangles 关于黑币 + + <b>triangles</b> version + 黑币客户端 版本 + + + Copyright © 2009-2014 The Bitcoin developers +Copyright © 2014 Triangles team +Copyright © 2014 The triangles developers + 版权所有 © 2009-2014 比特币Triangles开发组 +版权所有 © 2012-2014 新星币Triangles开发组 +版权所有 © 2014 黑币triangles开发组 + - <b>buynowcoin</b> version - 黑币客户端 版本 + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - 版权所有 © 2009-2014 比特币Bitcoin开发组 -版权所有 © 2012-2014 新星币Novacoin开发组 -版权所有 © 2014 黑币buynowcoin开发组 +Copyright © 2014 Triangles team + - + This is experimental software. @@ -44,12 +55,17 @@ This product includes software developed by the OpenSSL Project for use in the O 地址簿 - + + These are your Triangles 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. + + + + Double-click to edit address or label 双击编辑地址或标签 - + Create a new address 创建新地址 @@ -59,17 +75,21 @@ This product includes software developed by the OpenSSL Project for use in the O 复制当前选中的地址到系统剪贴板 - + + Sign a message to prove you own a TRI address + + + + &New Address 新建地址(&N) - - These are your buynowcoin 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. - 这是您用来接收支付的黑币地址列表。为不同的支付方建立不同的地址以便于了解支付来源。 + These are your triangles 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. + 这是您用来接收支付的黑币地址列表。为不同的支付方建立不同的地址以便于了解支付来源。 - + &Copy Address 复制地址(&C) @@ -79,27 +99,30 @@ This product includes software developed by the OpenSSL Project for use in the O 显示二维码(&Q) - - Sign a message to prove you own a buynowcoin address - 对信息进行签名以证明您对该黑币地址的所有权 + Sign a message to prove you own a triangles address + 对信息进行签名以证明您对该黑币地址的所有权 - + Sign &Message 签名(&M) - + + Verify a message to ensure it was signed with a specified TRI address + + + + Delete the currently selected address from the list 从列表中删除选中的地址 - - Verify a message to ensure it was signed with a specified buynowcoin address - 验证信息以保证其经过指定黑币地址的签名 + Verify a message to ensure it was signed with a specified triangles address + 验证信息以保证其经过指定黑币地址的签名 - + &Verify Message 验证消息(&V) @@ -142,7 +165,7 @@ This product includes software developed by the OpenSSL Project for use in the O AddressTableModel - + Label 标签 @@ -245,7 +268,12 @@ This product includes software developed by the OpenSSL Project for use in the O 您确定需要为钱包加密吗? - + + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + + + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. 重要提示:您以前备份的钱包文件应该替换成最新生成的加密钱包文件(重新备份)。从安全性上考虑,您以前备份的未加密的钱包文件,在您使用新的加密钱包后将无效,请重新备份。 @@ -262,12 +290,11 @@ This product includes software developed by the OpenSSL Project for use in the O 钱包已加密 - - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - 黑币客户端即将关闭以完成加密过程。请记住,加密钱包并不能完全防止您的电子货币被入侵您计算机的木马软件盗窃。 + triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + 黑币客户端即将关闭以完成加密过程。请记住,加密钱包并不能完全防止您的电子货币被入侵您计算机的木马软件盗窃。 - + @@ -308,431 +335,6 @@ This product includes software developed by the OpenSSL Project for use in the O 修改钱包密码成功。 - - BitcoinGUI - - - Sign &message... - 消息签名(&M)... - - - - Synchronizing with network... - 正在与网络同步... - - - - &Overview - 概况(&O) - - - - Show general overview of wallet - 显示钱包概况 - - - - &Transactions - 交易记录(&T) - - - - Browse transaction history - 查看交易历史 - - - - &Address Book - 地址簿(&A) - - - - Edit the list of stored addresses and labels - 管理已储存的地址和标签 - - - - &Receive coins - 接收黑币(&R) - - - - Show the list of addresses for receiving payments - 显示用于接收支付的地址列表 - - - - &Send coins - 发送货币(&S) - - - - E&xit - 退出(&X) - - - - Quit application - 退出程序 - - - - Show information about buynowcoin - 显示关于黑币的信息 - - - - About &Qt - 关于 &Qt - - - - Show information about Qt - 显示 Qt 相关信息 - - - - &Options... - 选项(&O)... - - - - &Encrypt Wallet... - 加密钱包(&E)... - - - - &Backup Wallet... - 备份钱包(&B)... - - - - &Change Passphrase... - 更改密码(&C)... - - - - ~%n block(s) remaining - ~%n 个区块未完成 - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - 交易记录已下载%3% (%1 / %2 个区块) - - - - &Export... - 导出(&E) - - - - Send coins to a buynowcoin address - 向指定的地址发送黑币 - - - - Modify configuration options for buynowcoin - 更改设置选项 - - - - Export the data in the current tab to a file - 导出当前标签页的数据 - - - - Encrypt or decrypt wallet - 加密/解密钱包 - - - - Backup wallet to another location - 备份钱包到其他文件夹 - - - - Change the passphrase used for wallet encryption - 更改钱包加密口令 - - - - &Debug window - 调试窗口(&D) - - - - Open debugging and diagnostic console - 打开调试和诊断控制台 - - - - &Verify message... - 验证消息(&V)... - - - - buynowcoin - 黑币 - - - - Wallet - 钱包 - - - - &About buynowcoin - 关于黑币(&A) - - - - &Show / Hide - 显示 / 隐藏(&S) - - - - Unlock wallet - 解锁钱包 - - - - &Lock Wallet - 锁定钱包(&L) - - - - Lock wallet - 锁定钱包 - - - - &File - 文件(&F) - - - - &Settings - 设置(&S) - - - - &Help - 帮助(&H) - - - - Tabs toolbar - 分页工具栏 - - - - Actions toolbar - 工具栏 - - - - - [testnet] - [测试网络] - - - - - buynowcoin client - 黑币客户端 - - - - %n active connection(s) to buynowcoin network - 与黑币网络建立了 %n 个连接 - - - - Downloaded %1 blocks of transaction history. - 已下载 %1 个区块的交易记录 - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - 权益增值中 <br>您的权重为 %1 <br>网络总权重为 %2<br>预计将在 %3 之后获得收益 - - - - Not staking because wallet is locked - 未进行权益增值,因为钱包已锁定 - - - - Not staking because wallet is offline - 未进行权益增值,因为钱包处于离线状态 - - - - Not staking because wallet is syncing - 未进行权益增值,因为钱包正在同步 - - - - Not staking because you don't have mature coins - 未进行权益增值,因为钱包中没有成熟的黑币 - - - - %n second(s) ago - %n 秒前 - - - - About buynowcoin card - 关于黑币卡 - - - - Show information about buynowcoin card - 显示关于黑币卡的信息 - - - - &Unlock Wallet... - 解锁钱包(&U) - - - - %n minute(s) ago - %n 分钟前 - - - - %n hour(s) ago - %n 小时前 - - - - %n day(s) ago - %n 天前 - - - - Up to date - 已是最新 - - - - Catching up... - 更新中... - - - - Last received block was generated %1. - 最近生成的区块接收于%1 - - - - 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? - 该笔交易数据量太大,需支付%1手续费给执行该笔交易的网络结点。您愿意支付吗? - - - - Confirm transaction fee - 手续费确认 - - - - Sent transaction - 发送交易 - - - - Incoming transaction - 流入交易 - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - 日期: %1 -金额: %2 -类别: %3 -地址: %4 - - - - - - URI handling - URI处理 - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - 无法解析URI:无效的黑币地址或错误的URI参数。 - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - 钱包已被<b>加密</b>,当前为<b>解锁</b>状态 - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - 钱包已被<b>加密</b>,当前为<b>锁定</b>状态 - - - - Backup Wallet - 备份钱包 - - - - Wallet Data (*.dat) - 钱包数据文件(*.dat) - - - - Backup Failed - 备份失败 - - - - There was an error trying to save the wallet data to the new location. - 试图将钱包地址保存到新位置时出现错误 - - - - %n second(s) - %n秒 - - - - %n minute(s) - %n 分钟 - - - - %n hour(s) - %n 小时 - - - - %n day(s) - %n 天 - - - - Not staking - 未进行权益增值 - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - 发生严重错误,黑币客户端即将关闭。 - - ClientModel @@ -1030,37 +632,46 @@ This label turns red, if the priority is smaller than "medium". 地址簿内该项目对应的地址。只有“收款人地址”分类下的地址可以修改。 - + + &Stealth Address + + + + New receiving address 新建接收地址 - + New sending address 新建发送地址 - + Edit receiving address 编辑接收地址 - + Edit sending address 编辑发送地址 - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. 输入的地址“%1”已经存在于地址簿中。 - - The entered address "%1" is not a valid buynowcoin address. - “%1” 不是有效的黑币地址。 + The entered address "%1" is not a valid triangles address. + “%1” 不是有效的黑币地址。 - + Could not unlock wallet. 无法解锁钱包 @@ -1073,18 +684,22 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - - buynowcoin-Qt - 黑币客户端buynowcoin-Qt + triangles-Qt + 黑币客户端triangles-Qt - + version 版本 - + + + Triangles-Qt + + + + Usage: 使用 @@ -1114,6 +729,347 @@ This label turns red, if the priority is smaller than "medium". 登录时显示Logo界面 (默认开启) + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + 标签 + + + + To Address + + + + + From Address + + + + + Message + 消息 + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (没有标签) + + + + MessagePage + + + Address Book + 地址簿 + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + 复制当前选中的地址到系统剪贴板 + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + 从列表中删除选中的地址 + + + + &Delete + 删除(&D) + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + 逗号分隔文件 (*.csv) + + + + Error exporting + + + + + Could not write to file %1. + 无法写入文件 %1 。 + + OptionsDialog @@ -1147,17 +1103,15 @@ This label turns red, if the priority is smaller than "medium". 保留 - - Automatically start buynowcoin after logging in to the system. - 开机自动启动黑币客户端 + Automatically start triangles after logging in to the system. + 开机自动启动黑币客户端 - - &Start buynowcoin on system login - 开机时自动启动黑币客户端(&S) + &Start triangles on system login + 开机时自动启动黑币客户端(&S) - + 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. 关机时断开区块和地址数据连接使得它们可以被移动到其他目录。这样做会使关机速度变慢。钱包数据总是断开存储的。 @@ -1172,19 +1126,37 @@ This label turns red, if the priority is smaller than "medium". 网络(&N) - - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - 路由器自动打开黑币客户端端口。该功能仅在路由器开启UPnP支持时有效。 + Automatically open the triangles client port on the router. This only works when your router supports UPnP and it is enabled. + 路由器自动打开黑币客户端端口。该功能仅在路由器开启UPnP支持时有效。 - + Map port using &UPnP 使用 &UPnP 映射端口 - - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - 经SOCKS代理连接到黑币网络(例如使用Tor) + Connect to the triangles network through a SOCKS proxy (e.g. when connecting through Tor). + 经SOCKS代理连接到黑币网络(例如使用Tor) + + + + Automatically start Triangles after logging in to the system. + + + + + &Start Triangles on system login + + + + + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + @@ -1258,11 +1230,20 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - 在此设置用户界面语言。重启黑币客户端后设置生效。 + The user interface language can be set here. This setting will take effect after restarting Triangles. + - + + Whether to show TRI addresses in the transaction list or not. + + + + The user interface language can be set here. This setting will take effect after restarting triangles. + 在此设置用户界面语言。重启黑币客户端后设置生效。 + + + &Unit to show amounts in: 黑币金额单位(&U): @@ -1272,12 +1253,11 @@ This label turns red, if the priority is smaller than "medium". 选择黑币单位。 - - Whether to show buynowcoin addresses in the transaction list or not. - 是否在交易列表中显示黑币地址 + Whether to show triangles addresses in the transaction list or not. + 是否在交易列表中显示黑币地址 - + &Display addresses in transaction list 在交易清单中显示黑币地址(&D) @@ -1320,8 +1300,12 @@ This label turns red, if the priority is smaller than "medium". - This setting will take effect after restarting buynowcoin. - 重启客户端后设置生效 + This setting will take effect after restarting Triangles. + + + + This setting will take effect after restarting triangles. + 重启客户端后设置生效 @@ -1337,13 +1321,11 @@ This label turns red, if the priority is smaller than "medium". 表单 - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - 所显示的信息尚未更新,建立连接后钱包客户端会自动和网络进行同步,但目前该过程尚未完成。 + The displayed information may be out of date. Your wallet automatically synchronizes with the triangles network after a connection is established, but this process has not completed yet. + 所显示的信息尚未更新,建立连接后钱包客户端会自动和网络进行同步,但目前该过程尚未完成。 - + Stake: 用于权益累积: @@ -1378,27 +1360,61 @@ This label turns red, if the priority is smaller than "medium". 尚未成熟的挖矿收入余额 - + Total: 总额: - + Your current total balance 您当前的总余额 - + <b>Recent transactions</b> <b>最近交易记录</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance 尚未确认的交易总额(不计入目前钱包余额) - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + + + + Total of coins that was staked, and do not yet count toward the current balance 正在进行权益累积的货币总额(不计入目前钱包余额) @@ -1499,7 +1515,17 @@ This label turns red, if the priority is smaller than "medium". 信息(&I) - + + Triangles - Debug window + + + + + Triangles Core + + + + Using OpenSSL version 使用 OpenSSL 版本 @@ -1544,7 +1570,17 @@ This label turns red, if the priority is smaller than "medium". 上一数据块时间 - + + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + &Open 打开(&O) @@ -1554,12 +1590,11 @@ This label turns red, if the priority is smaller than "medium". 命令行选项 - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - 显示关于命令行选项的帮助信息。 + Show the triangles-Qt help message to get a list with possible triangles command-line options. + 显示关于命令行选项的帮助信息。 - + &Show 显示(&S) @@ -1574,34 +1609,35 @@ This label turns red, if the priority is smaller than "medium". 创建时间 - - buynowcoin - Debug window - 黑币客户端-调试窗口 + triangles - Debug window + 黑币客户端-调试窗口 - - buynowcoin Core - 黑币核心进程 + triangles Core + 黑币核心进程 - + Debug log file 调试日志文件 - - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - 打开调试日志文件,对于较大的文件,这可能持续几秒钟。 + Open the triangles debug log file from the current data directory. This can take a few seconds for large log files. + 打开调试日志文件,对于较大的文件,这可能持续几秒钟。 - + Clear console 清空控制台 + + Welcome to the triangles RPC console. + 欢迎使用黑币RPC控制台。 + - Welcome to the buynowcoin RPC console. - 欢迎使用黑币RPC控制台。 + Welcome to the Triangles RPC console. + @@ -1625,6 +1661,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins 发送货币 @@ -1649,7 +1686,7 @@ This label turns red, if the priority is smaller than "medium". 存款不足! - + Quantity: 总量: @@ -1669,13 +1706,17 @@ This label turns red, if the priority is smaller than "medium". Amount: 金额: + + 0.00 hack + 123.456 hack {0.00 ?} + - 0.00 BTC - 123.456 BTC {0.00 ?} + 0.00 TRI + @@ -1718,7 +1759,7 @@ This label turns red, if the priority is smaller than "medium". 自定义零钱地址 - + Send to multiple recipients at once 一次发送给多个接收者 @@ -1744,8 +1785,12 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - 123.456 BTC + 123.456 TRI + + + + 123.456 hack + 123.456 hack @@ -1758,9 +1803,13 @@ This label turns red, if the priority is smaller than "medium". 发送(&E) - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - 输入黑币地址(例如:Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + 输入黑币地址(例如:TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1857,10 +1906,19 @@ This label turns red, if the priority is smaller than "medium". 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. 错误:交易被拒绝。可能由于钱包中部分金额已被使用,例如您使用了钱包数据的副本,在副本中某些金额已被使用,但在此处尚未被标记为已使用。 + + + Error: Narration is too long. + + - WARNING: Invalid buynowcoin address - 警告:无效的黑币地址 + WARNING: Invalid TRI address + + + + WARNING: Invalid triangles address + 警告:无效的黑币地址 @@ -1892,19 +1950,29 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book 为这个地址输入一个标签,以便将它添加到您的地址簿 + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: 标签(&L): - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - 收款人地址(例:Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + 收款人地址(例:TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1931,10 +1999,225 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient 删除收款人 + + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + 输入一个黑币地址 (例:TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - 输入一个黑币地址 (例:Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + 从地址簿选择地址 + + + + Alt+A + Alt+A + + + + Paste address from clipboard + 从剪贴板粘贴地址 + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + 一次发送给多个接收者 + + + + Add &Recipient + 添加收款人(&R) + + + + Remove all transaction fields + 删除所有交易区域 + + + + Clear &All + 清除所有(&A) + + + + Confirm the send action + 确认并发送货币 + + + + S&end + 发送(&E) + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> 至 %2 (%3) + + + + Confirm send messages + + + + + Are you sure you want to send %1? + 确认要发送 %1 ? + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + 收款人地址不合法,请检查。 + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + 发现重复的地址, 每次只能对同一地址发送一次。 + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + 表单 + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + 从地址簿选择地址 + + + + Alt+A + Alt+A + + + + Paste address from clipboard + 从剪贴板粘贴地址 + + + + Alt+P + Alt+P + + + + Remove this recipient + 删除收款人 + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + 为这个地址输入一个标签,以便将它添加到您的地址簿 + + + + &Label: + 标签(&L): + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1957,8 +2240,8 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - 用来签名该消息的地址(例: Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + 用来签名该消息的地址(例: TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) @@ -1994,11 +2277,20 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - 对该消息进行签名以证明您对该黑币地址的所有权 + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Sign the message to prove you own this triangles address + 对该消息进行签名以证明您对该黑币地址的所有权 + + + Reset all sign message fields 清空所有签名消息栏 @@ -2021,34 +2313,45 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - 用来签名该消息的黑币地址(例: Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + 用来签名该消息的黑币地址(例: TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - - Verify the message to ensure it was signed with the specified buynowcoin address - 确认该消息以保证它经由指定的黑币地址签名 + Verify the message to ensure it was signed with the specified triangles address + 确认该消息以保证它经由指定的黑币地址签名 - + Reset all verify message fields 清空所有验证消息栏 - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - 输入黑币地址(例: Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) + Enter a triangles address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + 输入黑币地址(例: TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) - + Click "Sign Message" to generate signature 单击“签名消息“产生签名。 + + Enter triangles signature + 输入黑币签名 + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - 输入黑币签名 + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2127,7 +2430,9 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - 为 %n 个数据块开启 + + 为 %n 个数据块开启 + @@ -2157,7 +2462,9 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - 通过 %n 个节点广播 + + 通过 %n 个节点广播 + @@ -2203,14 +2510,16 @@ This label turns red, if the priority is smaller than "medium". - + Credit 收入 - + matures in %n more block(s) - 将在 %n 个数据块后成熟 + + 将在 %n 个数据块后成熟 + @@ -2221,12 +2530,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit 支出 - + Transaction fee 交易费 @@ -2246,14 +2555,18 @@ This label turns red, if the priority is smaller than "medium". 备注 - + Transaction ID 交易ID + Generated coins must mature 60 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. + 通过权益累积获得的金额需要在510个块确认后方可使用。此数据块生成时,将被广播到网络并加入区块链。如果未能成功加入区块链,其状态会显示为“未接受”,该部分金额也不可被使用。如果其他节点在您生成区块后的几秒钟内也生成了区块,这种情况会偶尔发生。 {60 ?} + + Generated coins must mature 510 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. - 通过权益累积获得的金额需要在510个块确认后方可使用。此数据块生成时,将被广播到网络并加入区块链。如果未能成功加入区块链,其状态会显示为“未接受”,该部分金额也不可被使用。如果其他节点在您生成区块后的几秒钟内也生成了区块,这种情况会偶尔发生。 + 通过权益累积获得的金额需要在510个块确认后方可使用。此数据块生成时,将被广播到网络并加入区块链。如果未能成功加入区块链,其状态会显示为“未接受”,该部分金额也不可被使用。如果其他节点在您生成区块后的几秒钟内也生成了区块,这种情况会偶尔发生。 @@ -2286,7 +2599,7 @@ This label turns red, if the priority is smaller than "medium". 错误 - + , has not been successfully broadcast yet ,未被成功广播 @@ -2312,7 +2625,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date 日期 @@ -2344,10 +2657,17 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - 为 %n 个更多的区块开启 + + 为 %n 个更多的区块开启 + - + + Narration + + + + Offline 掉线 @@ -2412,7 +2732,7 @@ This label turns red, if the priority is smaller than "medium". (不可用) - + Transaction status. Hover over this field to show number of confirmations. 交易状态。 鼠标移到此区域可显示确认项数量。 @@ -2607,29 +2927,20 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - 正在发送 - - - - bitcoin-core - - - buynowcoin version - 黑币客户端 版本 + triangles version + 黑币客户端 版本 - + Usage: 使用: - Send command to -server or buynowcoind - 向-server服务器或buynowcoind发送命令 + Send command to -server or trianglesd + 向-server服务器或trianglesd发送命令 @@ -2651,13 +2962,13 @@ This label turns red, if the priority is smaller than "medium". - Specify configuration file (default: buynowcoin.conf) - 指定配置文件(默认: buynowcoin.conf) + Specify configuration file (default: triangles.conf) + 指定配置文件(默认: triangles.conf) - Specify pid file (default: buynowcoind.pid) - 指定pid文件(默认: buynowcoind.pid) + Specify pid file (default: trianglesd.pid) + 指定pid文件(默认: trianglesd.pid) @@ -2671,7 +2982,22 @@ This label turns red, if the priority is smaller than "medium". - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + Set database cache size in megabytes (default: 25) 设置数据库缓冲区大小 (缺省: 25MB) @@ -2810,12 +3136,11 @@ This label turns red, if the priority is smaller than "medium". 警告:-paytxfee 交易费设置得太高了!每笔交易都将支付交易费。 - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - 警告:请确认您计算机的本地时间。如果时钟错误,黑币客户端将不能正常工作。 + Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly. + 警告:请确认您计算机的本地时间。如果时钟错误,黑币客户端将不能正常工作。 - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. 警告:钱包文件wallet.dat读取失败!最重要的公钥、私钥数据都没有问题,但是交易记录或地址簿数据不正确,或者存在数据丢失。 @@ -2901,8 +3226,8 @@ This label turns red, if the priority is smaller than "medium". - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL选项:(参见Bitcoin Wiki关于SSL设置栏目) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL选项:(参见Triangles Wiki关于SSL设置栏目) @@ -2961,17 +3286,52 @@ This label turns red, if the priority is smaller than "medium". 开启代理以使用隐藏服务 (默认: 和-proxy设置相同) - + + Triangles version + + + + + Triangles + + + + Username for JSON-RPC connections JSON-RPC 连接用户名 - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Verifying database integrity... 正在检查数据库完整性... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! 警告:检测到同步记录点错误,已跳过。 @@ -2997,32 +3357,31 @@ This label turns red, if the priority is smaller than "medium". - %s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +for example: alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - %s, 必须在配置文件里设置rpc密码: + %s, 必须在配置文件里设置rpc密码: %s 建议使用如下的随机密码: -rpcuser=buynowcoinrpc +rpcuser=trianglesrpc rpcpassword=%s (不需要记住该密码) 用户名和密码不能重复。 如果该文件不存在,请自行创建并设为用户本身只读权限。 建议创建提示以监测可能的问题,如: -alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com +alertnotify=echo %%s | mail -s "triangles Alert" admin@foo.com - + Find peers using internet relay chat (default: 0) 寻找使用互联网接力聊天的节点 (默认: 1) {0)?} @@ -3146,17 +3505,15 @@ alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com 钱包 %s 位于数据目录 %s 之外. - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - 无法从数据目录 %s 获得锁定. 黑币客户端可能已在运行中. + Cannot obtain a lock on data directory %s. triangles is probably already running. + 无法从数据目录 %s 获得锁定. 黑币客户端可能已在运行中. - - buynowcoin - 黑币 + triangles + 黑币 - + Unable to bind to %s on this computer (bind returned error %d, %s) 无法绑定本机端口 %s (返回错误消息 %d, %s) @@ -3186,17 +3543,15 @@ alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com wallet.dat 钱包文件加载出错:钱包损坏 - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - wallet.dat 钱包文件加载出错:需要新版本的客户端 + Error loading wallet.dat: Wallet requires newer version of triangles + wallet.dat 钱包文件加载出错:需要新版本的客户端 - - Wallet needed to be rewritten: restart buynowcoin to complete - 需要重写钱包,重启客户端以完成该操作。 + Wallet needed to be rewritten: restart triangles to complete + 需要重写钱包,重启客户端以完成该操作。 - + Error loading wallet.dat wallet.dat 钱包文件加载出错 @@ -3261,12 +3616,11 @@ alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com 添加节点并与其保持连接 - - Unable to bind to %s on this computer. buynowcoin is probably already running. - 无法绑定到该计算机上的 %s. 黑币客户端可能已在运行中。 + Unable to bind to %s on this computer. triangles is probably already running. + 无法绑定到该计算机上的 %s. 黑币客户端可能已在运行中。 - + Fee per KB to add to transactions you send 每kB交易所支付的手续费 @@ -3325,4 +3679,522 @@ If the file does not exist, create it with owner-readable-only file permissions. 如果配置文件不存在,请新建,并将文件权限设置为仅允许文件所有者读取. - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + 钱包 + + + + &Overview + 概况(&O) + + + + Show general overview of wallet + 显示钱包概况 + + + + &Send coins + 发送货币(&S) + + + + Send coins to a TRI address + + + + + &Receive coins + 接收黑币(&R) + + + + Show the list of addresses for receiving payments + 显示用于接收支付的地址列表 + + + + &Transactions + 交易记录(&T) + + + + Browse transaction history + 查看交易历史 + + + + &Address Book + 地址簿(&A) + + + + Edit the list of stored addresses and labels + 管理已储存的地址和标签 + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + 退出(&X) + + + + Quit application + 退出程序 + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + 关于 &Qt + + + + Show information about Qt + 显示 Qt 相关信息 + + + + &Options... + 选项(&O)... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + 显示 / 隐藏(&S) + + + + &Encrypt Wallet... + 加密钱包(&E)... + + + + Encrypt or decrypt wallet + 加密/解密钱包 + + + + &Backup Wallet... + 备份钱包(&B)... + + + + Backup wallet to another location + 备份钱包到其他文件夹 + + + + &Change Passphrase... + 更改密码(&C)... + + + + Change the passphrase used for wallet encryption + 更改钱包加密口令 + + + + &Unlock Wallet... + 解锁钱包(&U) + + + + Unlock wallet + 解锁钱包 + + + + &Lock Wallet + 锁定钱包(&L) + + + + Lock wallet + 锁定钱包 + + + + Sign &message... + 消息签名(&M)... + + + + &Verify message... + 验证消息(&V)... + + + + &Export... + 导出(&E) + + + + Export the data in the current tab to a file + 导出当前标签页的数据 + + + + &Debug window + 调试窗口(&D) + + + + Open debugging and diagnostic console + 打开调试和诊断控制台 + + + + &File + 文件(&F) + + + + &Settings + 设置(&S) + + + + &Help + 帮助(&H) + + + + Tabs toolbar + 分页工具栏 + + + + Actions toolbar + 工具栏 + + + + + [testnet] + [测试网络] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + 正在与网络同步... + + + + ~%n block(s) remaining + + ~%n 个区块未完成 + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + 交易记录已下载%3% (%1 / %2 个区块) + + + + Downloaded %1 blocks of transaction history. + 已下载 %1 个区块的交易记录 + + + + Current difficulty is %1. + + + + + %n second(s) ago + + %n 秒前 + + + + + %n minute(s) ago + + %n 分钟前 + + + + + %n hour(s) ago + + %n 小时前 + + + + + %n day(s) ago + + %n 天前 + + + + + Up to date + 已是最新 + + + + Catching up... + 更新中... + + + + Last received block was generated %1. + 最近生成的区块接收于%1 + + + + 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? + 该笔交易数据量太大,需支付%1手续费给执行该笔交易的网络结点。您愿意支付吗? + + + + Confirm transaction fee + 手续费确认 + + + + Sent transaction + 发送交易 + + + + Incoming transaction + 流入交易 + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + 日期: %1 +金额: %2 +类别: %3 +地址: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + URI处理 + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + 钱包已被<b>加密</b>,当前为<b>解锁</b>状态 + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + 钱包已被<b>加密</b>,当前为<b>锁定</b>状态 + + + + Backup Wallet + 备份钱包 + + + + Wallet Data (*.dat) + 钱包数据文件(*.dat) + + + + Backup Failed + 备份失败 + + + + There was an error trying to save the wallet data to the new location. + 试图将钱包地址保存到新位置时出现错误 + + + + %n second(s) + + %n秒 + + + + + %n minute(s) + + %n 分钟 + + + + + %n hour(s) + + %n 小时 + + + + + %n day(s) + + %n 天 + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + 权益增值中 <br>您的权重为 %1 <br>网络总权重为 %2<br>预计将在 %3 之后获得收益 + + + + Not staking because wallet is locked + 未进行权益增值,因为钱包已锁定 + + + + Not staking because wallet is offline + 未进行权益增值,因为钱包处于离线状态 + + + + Not staking because wallet is syncing + 未进行权益增值,因为钱包正在同步 + + + + Not staking because you don't have mature coins + 未进行权益增值,因为钱包中没有成熟的黑币 + + + + Not staking + 未进行权益增值 + + + Show information about triangles + 显示关于黑币的信息 + + + Send coins to a triangles address + 向指定的地址发送黑币 + + + Modify configuration options for triangles + 更改设置选项 + + + triangles + 黑币 + + + &About triangles + 关于黑币(&A) + + + triangles client + 黑币客户端 + + + %n active connection(s) to triangles network + + 与黑币网络建立了 %n 个连接 + + + + About triangles card + 关于黑币卡 + + + Show information about triangles card + 显示关于黑币卡的信息 + + + URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters. + 无法解析URI:无效的黑币地址或错误的URI参数。 + + + A fatal error occurred. triangles can no longer continue safely and will quit. + 发生严重错误,黑币客户端即将关闭。 + + + + WalletModel + + + Sending... + 正在发送 + + + diff --git a/src/qt/locale/bitcoin_zh_TW.qm b/src/qt/locale/triangles_zh_TW.qm similarity index 53% rename from src/qt/locale/bitcoin_zh_TW.qm rename to src/qt/locale/triangles_zh_TW.qm index 6c9a85b..5e18c63 100644 Binary files a/src/qt/locale/bitcoin_zh_TW.qm and b/src/qt/locale/triangles_zh_TW.qm differ diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/triangles_zh_TW.ts similarity index 69% rename from src/qt/locale/bitcoin_zh_TW.ts rename to src/qt/locale/triangles_zh_TW.ts index e7f05bc..be22207 100644 --- a/src/qt/locale/bitcoin_zh_TW.ts +++ b/src/qt/locale/triangles_zh_TW.ts @@ -1,25 +1,26 @@ - + + + AboutDialog - About buynowcoin - + About Triangles + - <b>buynowcoin</b> version - + <b>Triangles</b> version + Copyright © 2009-2014 The Bitcoin developers -Copyright © 2012-2014 The NovaCoin developers -Copyright © 2014 The buynowcoin developers - +Copyright © 2014 Triangles team + - + This is experimental software. @@ -27,7 +28,7 @@ Distributed under the MIT/X11 software license, see the accompanying file COPYIN 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. -位元幣,原名是 Bitcoin, 又叫做比特幣。 +位元幣,原名是 Triangles, 又叫做比特幣。 這是一套實驗性的軟體。 @@ -41,15 +42,15 @@ This product includes software developed by the OpenSSL Project for use in the O Address Book - + - + Double-click to edit address or label 按兩下來編輯位址或標記 - + Create a new address 製造新的位址 @@ -59,52 +60,52 @@ This product includes software developed by the OpenSSL Project for use in the O 複製目前選擇的位址到系統剪貼簿 - + + Sign a message to prove you own a TRI address + + + + &New Address - + - - These are your buynowcoin 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. - - - - + &Copy Address 複製位址 Show &QR Code - + + + + + Sign &Message + - Sign a message to prove you own a buynowcoin address - + Verify a message to ensure it was signed with a specified TRI address + - - Sign &Message - - - - + Delete the currently selected address from the list 把目前選擇的位址從列表中刪掉 - - Verify a message to ensure it was signed with a specified buynowcoin address - - - - + &Verify Message - + 驗證訊息 - + + These are your Triangles 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. + + + + &Delete 刪掉 @@ -121,7 +122,7 @@ This product includes software developed by the OpenSSL Project for use in the O Export Address Book Data - + @@ -131,18 +132,18 @@ This product includes software developed by the OpenSSL Project for use in the O Error exporting - + Could not write to file %1. - + AddressTableModel - + Label 標記 @@ -182,12 +183,12 @@ This product includes software developed by the OpenSSL Project for use in the O Serves to disable the trivial sendmoney when OS account compromised. Provides no real security. - + For staking only - + @@ -237,7 +238,7 @@ This product includes software developed by the OpenSSL Project for use in the O Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! - + @@ -263,8 +264,8 @@ This product includes software developed by the OpenSSL Project for use in the O - buynowcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. - + Triangles will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer. + @@ -308,431 +309,6 @@ This product includes software developed by the OpenSSL Project for use in the O 錢包密碼改成功了。 - - BitcoinGUI - - - Sign &message... - 簽署訊息... - - - - Synchronizing with network... - 正在跟網路進行同步... - - - - &Overview - 總覽 - - - - Show general overview of wallet - 顯示錢包一般總覽 - - - - &Transactions - 交易 - - - - Browse transaction history - 瀏覽交易紀錄 - - - - &Address Book - - - - - Edit the list of stored addresses and labels - - - - - &Receive coins - - - - - Show the list of addresses for receiving payments - - - - - &Send coins - - - - - E&xit - 結束 - - - - Quit application - 結束應用程式 - - - - Show information about buynowcoin - - - - - About &Qt - 關於 &Qt - - - - Show information about Qt - 顯示 Qt 相關資訊 - - - - &Options... - 選項... - - - - &Encrypt Wallet... - 加密錢包... - - - - &Backup Wallet... - 備份錢包... - - - - &Change Passphrase... - 改變密碼... - - - - ~%n block(s) remaining - - - - - Downloaded %1 of %2 blocks of transaction history (%3% done). - - - - - &Export... - - - - - Send coins to a buynowcoin address - - - - - Modify configuration options for buynowcoin - - - - - Export the data in the current tab to a file - - - - - Encrypt or decrypt wallet - - - - - Backup wallet to another location - 把錢包備份到其它地方 - - - - Change the passphrase used for wallet encryption - 改變錢包加密用的密碼 - - - - &Debug window - 除錯視窗 - - - - Open debugging and diagnostic console - 開啓除錯和診斷主控台 - - - - &Verify message... - 驗證訊息... - - - - buynowcoin - - - - - Wallet - 錢包 - - - - &About buynowcoin - - - - - &Show / Hide - 顯示或隱藏 - - - - Unlock wallet - - - - - &Lock Wallet - - - - - Lock wallet - - - - - &File - 檔案 - - - - &Settings - 設定 - - - - &Help - 說明 - - - - Tabs toolbar - 分頁工具列 - - - - Actions toolbar - - - - - - [testnet] - [testnet] - - - - - buynowcoin client - - - - - %n active connection(s) to buynowcoin network - - - - - Downloaded %1 blocks of transaction history. - - - - - Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 - - - - - Not staking because wallet is locked - - - - - Not staking because wallet is offline - - - - - Not staking because wallet is syncing - - - - - Not staking because you don't have mature coins - - - - - %n second(s) ago - - - - - About buynowcoin card - - - - - Show information about buynowcoin card - - - - - &Unlock Wallet... - - - - - %n minute(s) ago - - - - - %n hour(s) ago - - - - - %n day(s) ago - - - - - Up to date - 最新狀態 - - - - Catching up... - 正在趕進度... - - - - Last received block was generated %1. - - - - - 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? - - - - - Confirm transaction fee - - - - - Sent transaction - 付款交易 - - - - Incoming transaction - 收款交易 - - - - Date: %1 -Amount: %2 -Type: %3 -Address: %4 - - 日期: %1 -金額: %2 -種類: %3 -位址: %4 - - - - - - URI handling - - - - - - URI can not be parsed! This can be caused by an invalid buynowcoin address or malformed URI parameters. - - - - - Wallet is <b>encrypted</b> and currently <b>unlocked</b> - 錢包<b>已加密</b>並且<b>解鎖中</b> - - - - Wallet is <b>encrypted</b> and currently <b>locked</b> - 錢包<b>已加密</b>並且<b>上鎖中</b> - - - - Backup Wallet - - - - - Wallet Data (*.dat) - - - - - Backup Failed - - - - - There was an error trying to save the wallet data to the new location. - - - - - %n second(s) - - - - - %n minute(s) - - - - - %n hour(s) - %n 個小時 - - - - %n day(s) - %n 天 - - - - Not staking - - - - - A fatal error occurred. buynowcoin can no longer continue safely and will quit. - - - ClientModel @@ -746,7 +322,7 @@ Address: %4 Coin Control - + @@ -816,7 +392,7 @@ Address: %4 Label - + 標記 @@ -937,7 +513,7 @@ Address: %4 DUST - + @@ -951,7 +527,7 @@ Address: %4 This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input. - + @@ -960,7 +536,7 @@ Address: %4 This label turns red, if the priority is smaller than "medium". This means a fee of at least %1 per kb is required. - + @@ -969,14 +545,14 @@ This label turns red, if the priority is smaller than "medium". This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST. - + This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required. - + @@ -1010,7 +586,7 @@ This label turns red, if the priority is smaller than "medium". The label associated with this address book entry - + @@ -1020,40 +596,45 @@ This label turns red, if the priority is smaller than "medium". The address associated with this address book entry. This can only be modified for sending addresses. - + - + + &Stealth Address + + + + New receiving address 造新的收款位址 - + New sending address 造新的付款位址 - + Edit receiving address 編輯收款位址 - + Edit sending address 編輯付款位址 - + + The entered address "%1" is not a valid TRI address. + + + + The entered address "%1" is already in the address book. 輸入的位址 %1 在位址簿中已經有了。 - - The entered address "%1" is not a valid buynowcoin address. - - - - + Could not unlock wallet. 沒辦法把錢包解鎖。 @@ -1067,44 +648,385 @@ This label turns red, if the priority is smaller than "medium". GUIUtil::HelpMessageBox - - buynowcoin-Qt - - - - version - + - + + + Triangles-Qt + + + + Usage: - + 用法: command-line options - + UI options - + Set language, for example "de_DE" (default: system locale) - + Start minimized - + Show splash screen on startup (default: 1) - + + + + + MRichTextEdit + + + Paragraph formatting + + + + + Undo (CTRL+Z) + + + + + Undo + + + + + + Redo + + + + + Cut (CTRL+X) + + + + + Cut + + + + + Copy (CTRL+C) + + + + + Copy + + + + + Paste (CTRL+V) + + + + + Paste + + + + + Link (CTRL+L) + + + + + Link + + + + + Bold + + + + + Italic (CTRL+I) + + + + + Italic + + + + + Underline (CTRL+U) + + + + + Underline + + + + + Strike Out + + + + + Bullet list (CTRL+-) + + + + + Bullet list + + + + + Ordered list (CTRL+=) + + + + + Ordered list + + + + + Decrease indentation (CTRL+,) + + + + + Decrease indentation + + + + + Increase indentation (CTRL+.) + + + + + Increase indentation + + + + + Text background color + + + + + . + + + + + Font size + + + + + Standard + + + + + Heading 1 + + + + + Heading 2 + + + + + Heading 3 + + + + + Heading 4 + + + + + Monospace + + + + + Create a link + + + + + Link URL: + + + + + MessageModel + + + Type + 種類 + + + + Sent Date Time + + + + + Received Date Time + + + + + Label + 標記 + + + + To Address + + + + + From Address + + + + + Message + 訊息 + + + + Send Secure Message + + + + + Send failed: %1. + + + + + (no label) + (無標記) + + + + MessagePage + + + Address Book + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + + + Click on a message to view it + + + + + &Back + + + + + Contact: + + + + + &Conversation + + + + + Sign a message to prove you own a TRI address + + + + + &Send + + + + + + Copy the currently selected address to the system clipboard + 複製目前選擇的位址到系統剪貼簿 + + + + &Copy From Address + + + + + Copy To &Address + + + + + Delete the currently selected address from the list + 把目前選擇的位址從列表中刪掉 + + + + &Delete + 刪掉 + + + + Send Secure Message + + + + + Send failed: %1. + + + + + Export Messages + + + + + Comma separated file (*.csv) + + + + + Error exporting + + + + + Could not write to file %1. + @@ -1122,7 +1044,7 @@ This label turns red, if the priority is smaller than "medium". Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended. - + @@ -1132,32 +1054,32 @@ This label turns red, if the priority is smaller than "medium". Reserved amount does not participate in staking and is therefore spendable at any time. - + Reserve - + - Automatically start buynowcoin after logging in to the system. - + Automatically start Triangles after logging in to the system. + - &Start buynowcoin on system login - + &Start Triangles on system login + 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. - + &Detach databases at shutdown - + @@ -1166,8 +1088,8 @@ This label turns red, if the priority is smaller than "medium". - Automatically open the buynowcoin client port on the router. This only works when your router supports UPnP and it is enabled. - + Automatically open the Triangles client port on the router. This only works when your router supports UPnP and it is enabled. + @@ -1176,13 +1098,13 @@ This label turns red, if the priority is smaller than "medium". - Connect to the buynowcoin network through a SOCKS proxy (e.g. when connecting through Tor). - + Connect to the Triangles network through a SOCKS proxy (e.g. when connecting through Tor). + &Connect through SOCKS proxy: - + @@ -1192,7 +1114,7 @@ This label turns red, if the priority is smaller than "medium". IP address of the proxy (e.g. 127.0.0.1) - + @@ -1251,8 +1173,8 @@ This label turns red, if the priority is smaller than "medium". - The user interface language can be set here. This setting will take effect after restarting buynowcoin. - + The user interface language can be set here. This setting will take effect after restarting Triangles. + @@ -1266,8 +1188,8 @@ This label turns red, if the priority is smaller than "medium". - Whether to show buynowcoin addresses in the transaction list or not. - + Whether to show TRI addresses in the transaction list or not. + @@ -1282,7 +1204,7 @@ This label turns red, if the priority is smaller than "medium". Display coin &control features (experts only!) - + @@ -1297,7 +1219,7 @@ This label turns red, if the priority is smaller than "medium". &Apply - + @@ -1308,13 +1230,13 @@ This label turns red, if the priority is smaller than "medium". Warning - + - This setting will take effect after restarting buynowcoin. - + This setting will take effect after restarting Triangles. + @@ -1330,15 +1252,15 @@ This label turns red, if the priority is smaller than "medium". 表單 - - - The displayed information may be out of date. Your wallet automatically synchronizes with the buynowcoin network after a connection is established, but this process has not completed yet. - + + + The displayed information may be out of date. Your wallet automatically synchronizes with the Triangles network after a connection is established, but this process has not completed yet. + - + Stake: - + @@ -1353,7 +1275,7 @@ This label turns red, if the priority is smaller than "medium". Spendable: - + @@ -1371,29 +1293,57 @@ This label turns red, if the priority is smaller than "medium". 還沒成熟的開採金額 - + Total: 總金額: - + Your current total balance 目前全部餘額 - + <b>Recent transactions</b> <b>最近交易</b> - + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="http://triangles.technology"> &#187; TRI home</a></body> + + + + + <head> +<style type="text/css" media="screen"> +a:link { color:#000; text-decoration: none;font-weight:bold; } +a:visited { color:#000; text-decoration: none; } +a:hover { color:#e22104; text-decoration: none; } +a:active { color:#000; text-decoration: underline; } +</style> +</head> +<body> +<a href="https://bittrex.com/Market/Index?MarketName=BTC-TRI"> &#187; TRI on Bittrex</a></body> + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance - + Total of coins that was staked, and do not yet count toward the current balance - + @@ -1407,57 +1357,57 @@ This label turns red, if the priority is smaller than "medium". QR Code Dialog - + Request Payment - + Amount: - + 金額: Label: - + Message: - + &Save As... - + Error encoding URI into QR Code. - + The entered amount is invalid, please check. - + Resulting URI too long, try to reduce the text for label / message. - + Save QR Code - + PNG Images (*.png) - + @@ -1514,7 +1464,7 @@ This label turns red, if the priority is smaller than "medium". On testnet - + @@ -1544,17 +1494,12 @@ This label turns red, if the priority is smaller than "medium". Command-line options - + - - Show the buynowcoin-Qt help message to get a list with possible buynowcoin command-line options. - - - - + &Show - + @@ -1568,13 +1513,13 @@ This label turns red, if the priority is smaller than "medium". - buynowcoin - Debug window - + Triangles - Debug window + - buynowcoin Core - + Triangles Core + @@ -1583,18 +1528,23 @@ This label turns red, if the priority is smaller than "medium". - Open the buynowcoin debug log file from the current data directory. This can take a few seconds for large log files. - + Open the Triangles debug log file from the current data directory. This can take a few seconds for large log files. + - + + Show the Triangles-Qt help message to get a list with possible Triangles command-line options. + + + + Clear console 清主控台 - Welcome to the buynowcoin RPC console. - + Welcome to the Triangles RPC console. + @@ -1618,6 +1568,7 @@ This label turns red, if the priority is smaller than "medium". + Send Coins 付款 @@ -1642,7 +1593,7 @@ This label turns red, if the priority is smaller than "medium". 累計金額不足! - + Quantity: 數目: @@ -1650,7 +1601,7 @@ This label turns red, if the priority is smaller than "medium". 0 - + @@ -1667,8 +1618,8 @@ This label turns red, if the priority is smaller than "medium". - 0.00 BTC - + 0.00 TRI + @@ -1678,7 +1629,7 @@ This label turns red, if the priority is smaller than "medium". medium - + 中等 @@ -1693,7 +1644,7 @@ This label turns red, if the priority is smaller than "medium". no - + @@ -1703,15 +1654,15 @@ This label turns red, if the priority is smaller than "medium". Change - + custom change address - + - + Send to multiple recipients at once 一次付給多個收款人 @@ -1723,7 +1674,7 @@ This label turns red, if the priority is smaller than "medium". Remove all transaction fields - + @@ -1737,8 +1688,8 @@ This label turns red, if the priority is smaller than "medium". - 123.456 BTC - + 123.456 TRI + @@ -1751,9 +1702,9 @@ This label turns red, if the priority is smaller than "medium". 付款 - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + @@ -1798,7 +1749,7 @@ This label turns red, if the priority is smaller than "medium". <b>%1</b> to %2 (%3) - + @@ -1808,12 +1759,12 @@ This label turns red, if the priority is smaller than "medium". Are you sure you want to send %1? - + and - + @@ -1843,17 +1794,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed. - + 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. - + + + + + Error: Narration is too long. + - WARNING: Invalid buynowcoin address - + WARNING: Invalid TRI address + @@ -1863,7 +1819,7 @@ This label turns red, if the priority is smaller than "medium". WARNING: unknown change address - + @@ -1871,7 +1827,7 @@ This label turns red, if the priority is smaller than "medium". Form - + 表單 @@ -1885,24 +1841,34 @@ This label turns red, if the priority is smaller than "medium". - + Enter a label for this address to add it to your address book 請輸入這個位址的標記來把它加進位址簿中 + N&arration: + + + + + Enter a short note to send with payment (max 24 characters) + + + + &Label: 標記: - The address to send the payment to (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to send the payment to (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose address from address book - + @@ -1922,12 +1888,223 @@ This label turns red, if the priority is smaller than "medium". Remove this recipient - + - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter a short note to send with payment. This feature will be enabled later. + + + + + SendMessagesDialog + + + Send Messages + + + + + Address &From: + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + 貼上剪貼簿裡的位址 + + + + Alt+P + Alt+P + + + + Send to multiple recipients at once + 一次付給多個收款人 + + + + Add &Recipient + 增加收款人 + + + + Remove all transaction fields + + + + + Clear &All + 全部清掉 + + + + Confirm the send action + 確認付款動作 + + + + S&end + 付款 + + + + &Close + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send messages + + + + + Are you sure you want to send %1? + + + + + and + + + + + + + + + Send Message + + + + + The recipient address is not valid, please recheck. + 收款位址無效,請再檢查看看。 + + + + The message can't be empty. + + + + + Duplicate address found, can only send to each address once per send operation. + 發現有重複的位址。每個付款動作中,只能付給個別的位址一次。 + + + + Error: Message creation failed. + + + + + Error: The message was rejected. + + + + + SendMessagesEntry + + + Form + 表單 + + + + The address to send the payment to (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + 貼上剪貼簿裡的位址 + + + + Alt+P + Alt+P + + + + Remove this recipient + + + + + &Message: + + + + + Send &To: + + + + + + Enter a label for this address to add it to your address book + 請輸入這個位址的標記來把它加進位址簿中 + + + + &Label: + 標記: + + + + &Public Key: + + + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + + + + Enter the public key for the address above, it is not in the blockchain + + + + + You cannot send a blank message! + @@ -1950,14 +2127,14 @@ This label turns red, if the priority is smaller than "medium". - The address to sign the message with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address to sign the message with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + Choose an address from the address book - + @@ -1987,11 +2164,16 @@ This label turns red, if the priority is smaller than "medium". - Sign the message to prove you own this buynowcoin address - + Sign the message to prove you own this TRI address + - + + Verify the message to ensure it was signed with the specified TRI address + + + + Reset all sign message fields 重置所有訊息簽署欄位 @@ -2014,34 +2196,33 @@ This label turns red, if the priority is smaller than "medium". - The address the message was signed with (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - + The address the message was signed with (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + - - Verify the message to ensure it was signed with the specified buynowcoin address - - - - + Reset all verify message fields 重置所有訊息驗證欄位 - - - Enter a buynowcoin address (e.g. Sjz75uKHzUQJnSdzvpiigEGxseKkDhQToX) - - - - + Click "Sign Message" to generate signature 請按一下「簽署訊息」來產生簽章 + + + Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm) + + - Enter buynowcoin signature - + Enter a TRI address (e.g. w) + + + + + Enter TRI signature + @@ -2120,12 +2301,14 @@ This label turns red, if the priority is smaller than "medium". Open for %n block(s) - + + + conflicted - + @@ -2150,7 +2333,9 @@ This label turns red, if the priority is smaller than "medium". , broadcast through %n node(s) - ,已公告給 %n 個節點 + + ,已公告給 %n 個節點 + @@ -2196,14 +2381,16 @@ This label turns red, if the priority is smaller than "medium". - + Credit 入帳 - + matures in %n more block(s) - 再等 %n 個區塊生出來後成熟 + + 再等 %n 個區塊生出來後成熟 + @@ -2214,12 +2401,12 @@ This label turns red, if the priority is smaller than "medium". - + Debit 出帳 - + Transaction fee 交易手續費 @@ -2239,14 +2426,14 @@ This label turns red, if the priority is smaller than "medium". 附註 - + Transaction ID 交易識別碼 - Generated coins must mature 510 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. - + Generated coins must mature 60 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. + @@ -2279,7 +2466,7 @@ This label turns red, if the priority is smaller than "medium". - + , has not been successfully broadcast yet ,還沒成功公告出去 @@ -2305,7 +2492,7 @@ This label turns red, if the priority is smaller than "medium". TransactionTableModel - + Date 日期 @@ -2337,27 +2524,34 @@ This label turns red, if the priority is smaller than "medium". Open for %n more block(s) - 再等 %n 個區塊生出來後才確定 + + 再等 %n 個區塊生出來後才確定 + - + + Narration + + + + Offline - + Unconfirmed - + Confirming (%1 of %2 recommended confirmations) - + Conflicted - + @@ -2405,7 +2599,7 @@ This label turns red, if the priority is smaller than "medium". (不適用) - + Transaction status. Hover over this field to show number of confirmations. 交易狀態。把游標停在欄位上會顯示確認次數。 @@ -2536,7 +2730,7 @@ This label turns red, if the priority is smaller than "medium". Export Transaction Data - + @@ -2581,12 +2775,12 @@ This label turns red, if the priority is smaller than "medium". Error exporting - + Could not write to file %1. - + @@ -2600,32 +2794,14 @@ This label turns red, if the priority is smaller than "medium". - WalletModel + Triangles-core - - Sending... - - - - - bitcoin-core - - - buynowcoin version - - - - + Usage: 用法: - - Send command to -server or buynowcoind - - - - + List commands 列出指令 @@ -2640,17 +2816,7 @@ This label turns red, if the priority is smaller than "medium". 選項: - - Specify configuration file (default: buynowcoin.conf) - - - - - Specify pid file (default: buynowcoind.pid) - - - - + Specify wallet file (within data directory) 指定錢包檔(會在資料目錄中) @@ -2667,12 +2833,12 @@ This label turns red, if the priority is smaller than "medium". Set database disk log size in megabytes (default: 100) - + Listen for connections on <port> (default: 15714 or testnet: 25714) - + @@ -2692,12 +2858,12 @@ This label turns red, if the priority is smaller than "medium". Bind to given address. Use [host]:port notation for IPv6 - + Stake your coins to support network and gain reward (default: 1) - + @@ -2717,22 +2883,22 @@ This label turns red, if the priority is smaller than "medium". Detach block and address databases. Increases shutdown time (default: 0) - + 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. - + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds - + Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715) - + @@ -2743,22 +2909,22 @@ This label turns red, if the priority is smaller than "medium". Error: Transaction creation failed - + Error: Wallet locked, unable to create transaction - + Importing blockchain data file. - + Importing bootstrap blockchain data file. - + @@ -2783,12 +2949,12 @@ This label turns red, if the priority is smaller than "medium". Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. - + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) - + @@ -2796,12 +2962,7 @@ This label turns red, if the priority is smaller than "medium". 警告: -paytxfee 設定了很高的金額!這可是你交易付款所要付的手續費。 - - Warning: Please check that your computer's date and time are correct! If your clock is wrong buynowcoin will not work properly. - - - - + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. 警告: 讀取錢包檔 wallet.dat 時發生錯誤!所有的密鑰都正確讀取了,但是交易資料或位址簿資料可能會缺少或不正確。 @@ -2838,22 +2999,22 @@ This label turns red, if the priority is smaller than "medium". Find peers using DNS lookup (default: 1) - + Sync checkpoints policy (default: strict) - + Invalid -tor address: '%s' - + Invalid amount for -reservebalance=<amount> - + @@ -2873,27 +3034,27 @@ This label turns red, if the priority is smaller than "medium". Output extra debugging information. Implies all other -debug* options - + Output extra network debugging information - + Prepend debug output with timestamp - + - SSL options: (see the Bitcoin Wiki for SSL setup instructions) - SSL 選項: (SSL 設定程序請見 Bitcoin Wiki) + SSL options: (see the Triangles Wiki for SSL setup instructions) + SSL 選項: (SSL 設定程序請見 Triangles Wiki) Select the version of socks proxy to use (4-5, default: 5) - + @@ -2903,12 +3064,12 @@ This label turns red, if the priority is smaller than "medium". Send trace/debug info to debugger - + Set maximum block size in bytes (default: 250000) - + @@ -2929,7 +3090,7 @@ This label turns red, if the priority is smaller than "medium". Unable to sign checkpoint, wrong checkpointkey? - + @@ -2944,7 +3105,7 @@ This label turns red, if the priority is smaller than "medium". Use proxy to reach tor hidden services (default: same as -proxy) - + @@ -2954,17 +3115,27 @@ This label turns red, if the priority is smaller than "medium". Verifying database integrity... - + - + + Unable to bind to %s on this computer. Triangles is probably already running. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly. + + + + WARNING: syncronized checkpoint violation detected, but skipped! - + Warning: Disk space is low! - + @@ -2982,34 +3153,39 @@ This label turns red, if the priority is smaller than "medium". JSON-RPC 連線密碼 - - %s, you must set a rpcpassword in the configuration file: - %s -It is recommended you use the following random password: -rpcuser=buynowcoinrpc -rpcpassword=%s -(you do not need to remember this password) -The username and password MUST NOT be the same. -If the file does not exist, create it with owner-readable-only file permissions. -It is also recommended to set alertnotify so you are notified of problems; -for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@foo.com - - + + Triangles version + - + + Send command to -server or trianglesd + + + + + Triangles + + + + + Specify pid file (default: trianglesd.pid) + + + + Find peers using internet relay chat (default: 0) - + Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1) - + When creating transactions, ignore inputs with value less than this (default: 0.01) - + @@ -3034,17 +3210,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Require a confirmations for change (default: 0) - + Enforce transaction scripts to use canonical PUSH operators (default: 1) - + Execute command when a relevant alert is received (%s in cmd is replaced by message) - + @@ -3064,17 +3240,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f How many blocks to check at startup (default: 2500, 0 = all) - + How thorough the block verification is (0-6, default: 1) - + Imports blocks from external blk000?.dat file - + @@ -3094,17 +3270,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) - + Error: Wallet unlocked for staking only, unable to create transaction. - + WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers. - + @@ -3114,27 +3290,17 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Wallet %s resides outside data directory %s. - + - - Cannot obtain a lock on data directory %s. buynowcoin is probably already running. - - - - - buynowcoin - - - - + Unable to bind to %s on this computer (bind returned error %d, %s) 沒辦法和這台電腦上的 %s 繫結(回傳錯誤 %d, %s) Connect through socks proxy - + @@ -3149,7 +3315,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error loading blkindex.dat - + @@ -3157,17 +3323,7 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f 載入檔案 wallet.dat 時發生錯誤: 錢包損毀了 - - Error loading wallet.dat: Wallet requires newer version of buynowcoin - - - - - Wallet needed to be rewritten: restart buynowcoin to complete - - - - + Error loading wallet.dat 載入錢包檔 wallet.dat 時發生錯誤 @@ -3204,12 +3360,12 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f Error: could not start node - + Sending... - + @@ -3227,39 +3383,69 @@ for example: alertnotify=echo %%s | mail -s "buynowcoin Alert" admin@f 正在載入區塊索引... - + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=trianglesrpc +rpcpassword=%s +(you do not need to remember this password) +The username and password MUST NOT be the same. +If the file does not exist, create it with owner-readable-only file permissions. +It is also recommended to set alertnotify so you are notified of problems; +for example: alertnotify=echo %%s | mail -s "Triangles Alert" admin@foo.com + + + + + + Specify configuration file (default: triangles.conf) + + + + Add a node to connect to and attempt to keep the connection open 增加一個要連線的節線,並試著保持對它的連線暢通 - - Unable to bind to %s on this computer. buynowcoin is probably already running. - - - - + Fee per KB to add to transactions you send - + Invalid amount for -mininput=<amount>: '%s' - + - + + Cannot obtain a lock on data directory %s. Triangles is probably already running. + + + + Loading wallet... 正在載入錢包資料... - + + Error loading wallet.dat: Wallet requires newer version of Triangles + + + + + Wallet needed to be rewritten: restart Triangles to complete + + + + Cannot downgrade wallet 沒辦法把錢包格式降級 Cannot initialize keypool - + @@ -3296,4 +3482,476 @@ If the file does not exist, create it with owner-readable-only file permissions. 如果還沒有這個檔案,請在造出來的時候,設定檔案權限成只有主人才能讀取。 - \ No newline at end of file + + TrianglesGUI + + + A fatal error occurred. Triangles can no longer continue safely and will quit. + + + + + Triangles + + + + + Wallet + 錢包 + + + + &Overview + 總覽 + + + + Show general overview of wallet + 顯示錢包一般總覽 + + + + &Send coins + + + + + Send coins to a TRI address + + + + + &Receive coins + + + + + Show the list of addresses for receiving payments + + + + + &Transactions + 交易 + + + + Browse transaction history + 瀏覽交易紀錄 + + + + &Address Book + + + + + Edit the list of stored addresses and labels + + + + + &Messages + + + + + View and Send Encrypted messages + + + + + E&xit + 結束 + + + + Quit application + 結束應用程式 + + + + &About Triangles + + + + + Show information about Triangles + + + + + About &Qt + 關於 &Qt + + + + Show information about Qt + 顯示 Qt 相關資訊 + + + + &Options... + 選項... + + + + Modify configuration options for Triangles + + + + + &Show / Hide + 顯示或隱藏 + + + + &Encrypt Wallet... + 加密錢包... + + + + Encrypt or decrypt wallet + + + + + &Backup Wallet... + 備份錢包... + + + + Backup wallet to another location + 把錢包備份到其它地方 + + + + &Change Passphrase... + 改變密碼... + + + + Change the passphrase used for wallet encryption + 改變錢包加密用的密碼 + + + + &Unlock Wallet... + + + + + Unlock wallet + 解鎖錢包 + + + + &Lock Wallet + + + + + Lock wallet + + + + + Sign &message... + 簽署訊息... + + + + &Verify message... + 驗證訊息... + + + + &Export... + + + + + Export the data in the current tab to a file + + + + + &Debug window + 除錯視窗 + + + + Open debugging and diagnostic console + 開啓除錯和診斷主控台 + + + + &File + 檔案 + + + + &Settings + 設定 + + + + &Help + 說明 + + + + Tabs toolbar + 分頁工具列 + + + + Actions toolbar + + + + + + [testnet] + [testnet] + + + + + Triangles client + + + + + %n active connection(s) to Triangles network + + + + + + + Synchronizing with network... + 正在跟網路進行同步... + + + + ~%n block(s) remaining + + + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + + + + + Downloaded %1 blocks of transaction history. + + + + + Current difficulty is %1. + + + + + %n second(s) ago + + + + + + + %n minute(s) ago + + + + + + + %n hour(s) ago + + + + + + + %n day(s) ago + + + + + + + Up to date + 最新狀態 + + + + Catching up... + 正在趕進度... + + + + Last received block was generated %1. + + + + + 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? + + + + + Confirm transaction fee + + + + + Sent transaction + 付款交易 + + + + Incoming transaction + 收款交易 + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + 日期: %1 +金額: %2 +種類: %3 +位址: %4 + + + + + Incoming Message + + + + + Date: %1 +From Address: %2 +To Address: %3 +Message: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + 錢包<b>已加密</b>並且<b>解鎖中</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + 錢包<b>已加密</b>並且<b>上鎖中</b> + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + %n second(s) + + + + + + + %n minute(s) + + + + + + + %n hour(s) + + %n 個小時 + + + + + %n day(s) + + %n 天 + + + + + Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3 + + + + + Not staking because wallet is locked + + + + + Not staking because wallet is offline + + + + + Not staking because wallet is syncing + + + + + Not staking because you don't have mature coins + + + + + Not staking + + + + + WalletModel + + + Sending... + + + + diff --git a/src/qt/macdockiconhandler.hh b/src/qt/macdockiconhandler.hh index b21a61c..89baa72 100644 --- a/src/qt/macdockiconhandler.hh +++ b/src/qt/macdockiconhandler.hh @@ -1,7 +1,3 @@ -// Copyright (c) 2011-2013 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - #ifndef MACDOCKICONHANDLER_H #define MACDOCKICONHANDLER_H diff --git a/src/qt/macdockiconhandler.mm b/src/qt/macdockiconhandler.mm index fd7ea40..f18bb23 100644 --- a/src/qt/macdockiconhandler.mm +++ b/src/qt/macdockiconhandler.mm @@ -1,137 +1,131 @@ -// Copyright (c) 2011-2013 The Bitcoin Core developers -// Distributed under the MIT/X11 software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#include "macdockiconhandler.hh" - -#include -#include -#include -#include - -#undef slots -#include - -#if QT_VERSION < 0x050000 -extern void qt_mac_set_dock_menu(QMenu *); -#endif - -@interface DockIconClickEventHandler : NSObject -{ - MacDockIconHandler* dockIconHandler; -} - -@end - -@implementation DockIconClickEventHandler - -- (id)initWithDockIconHandler:(MacDockIconHandler *)aDockIconHandler -{ - self = [super init]; - if (self) { - dockIconHandler = aDockIconHandler; - - [[NSAppleEventManager sharedAppleEventManager] - setEventHandler:self - andSelector:@selector(handleDockClickEvent:withReplyEvent:) - forEventClass:kCoreEventClass - andEventID:kAEReopenApplication]; - } - return self; -} - -- (void)handleDockClickEvent:(NSAppleEventDescriptor*)event withReplyEvent:(NSAppleEventDescriptor*)replyEvent -{ - Q_UNUSED(event) - Q_UNUSED(replyEvent) - - if (dockIconHandler) { - dockIconHandler->handleDockIconClickEvent(); - } -} - -@end - -MacDockIconHandler::MacDockIconHandler() : QObject() -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - this->m_dockIconClickEventHandler = [[DockIconClickEventHandler alloc] initWithDockIconHandler:this]; - this->m_dummyWidget = new QWidget(); - this->m_dockMenu = new QMenu(this->m_dummyWidget); - this->setMainWindow(NULL); -#if QT_VERSION < 0x050000 - qt_mac_set_dock_menu(this->m_dockMenu); -#elif QT_VERSION >= 0x050200 - this->m_dockMenu->setAsDockMenu(); -#endif - [pool release]; -} - -void MacDockIconHandler::setMainWindow(QMainWindow *window) { - this->mainWindow = window; -} - -MacDockIconHandler::~MacDockIconHandler() -{ - [this->m_dockIconClickEventHandler release]; - delete this->m_dummyWidget; - this->setMainWindow(NULL); -} - -QMenu *MacDockIconHandler::dockMenu() -{ - return this->m_dockMenu; -} - -void MacDockIconHandler::setIcon(const QIcon &icon) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSImage *image = nil; - if (icon.isNull()) - image = [[NSImage imageNamed:@"NSApplicationIcon"] retain]; - else { - // generate NSImage from QIcon and use this as dock icon. - QSize size = icon.actualSize(QSize(128, 128)); - QPixmap pixmap = icon.pixmap(size); - - // write temp file hack (could also be done through QIODevice [memory]) - QTemporaryFile notificationIconFile; - if (!pixmap.isNull() && notificationIconFile.open()) { - QImageWriter writer(¬ificationIconFile, "PNG"); - if (writer.write(pixmap.toImage())) { - const char *cString = notificationIconFile.fileName().toUtf8().data(); - NSString *macString = [NSString stringWithCString:cString encoding:NSUTF8StringEncoding]; - image = [[NSImage alloc] initWithContentsOfFile:macString]; - } - } - - if(!image) { - // if testnet image could not be created, load std. app icon - image = [[NSImage imageNamed:@"NSApplicationIcon"] retain]; - } - } - - [NSApp setApplicationIconImage:image]; - [image release]; - [pool release]; -} - -MacDockIconHandler *MacDockIconHandler::instance() -{ - static MacDockIconHandler *s_instance = NULL; - if (!s_instance) - s_instance = new MacDockIconHandler(); - return s_instance; -} - -void MacDockIconHandler::handleDockIconClickEvent() -{ - if (this->mainWindow) - { - this->mainWindow->activateWindow(); - this->mainWindow->show(); - } - - emit this->dockIconClicked(); -} +#include "macdockiconhandler.h" + +#include +#include +#include +#include + +#undef slots +#include + +#if QT_VERSION < 0x050000 +extern void qt_mac_set_dock_menu(QMenu *); +#endif + +@interface DockIconClickEventHandler : NSObject +{ + MacDockIconHandler* dockIconHandler; +} + +@end + +@implementation DockIconClickEventHandler + +- (id)initWithDockIconHandler:(MacDockIconHandler *)aDockIconHandler +{ + self = [super init]; + if (self) { + dockIconHandler = aDockIconHandler; + + [[NSAppleEventManager sharedAppleEventManager] + setEventHandler:self + andSelector:@selector(handleDockClickEvent:withReplyEvent:) + forEventClass:kCoreEventClass + andEventID:kAEReopenApplication]; + } + return self; +} + +- (void)handleDockClickEvent:(NSAppleEventDescriptor*)event withReplyEvent:(NSAppleEventDescriptor*)replyEvent +{ + Q_UNUSED(event) + Q_UNUSED(replyEvent) + + if (dockIconHandler) { + dockIconHandler->handleDockIconClickEvent(); + } +} + +@end + +MacDockIconHandler::MacDockIconHandler() : QObject() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + this->m_dockIconClickEventHandler = [[DockIconClickEventHandler alloc] initWithDockIconHandler:this]; + this->m_dummyWidget = new QWidget(); + this->m_dockMenu = new QMenu(this->m_dummyWidget); + this->setMainWindow(NULL); +#if QT_VERSION < 0x050000 + qt_mac_set_dock_menu(this->m_dockMenu); +#endif + [pool release]; +} + +void MacDockIconHandler::setMainWindow(QMainWindow *window) { + this->mainWindow = window; +} + +MacDockIconHandler::~MacDockIconHandler() +{ + [this->m_dockIconClickEventHandler release]; + delete this->m_dummyWidget; + this->setMainWindow(NULL); +} + +QMenu *MacDockIconHandler::dockMenu() +{ + return this->m_dockMenu; +} + +void MacDockIconHandler::setIcon(const QIcon &icon) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSImage *image = nil; + if (icon.isNull()) + image = [[NSImage imageNamed:@"NSApplicationIcon"] retain]; + else { + // generate NSImage from QIcon and use this as dock icon. + QSize size = icon.actualSize(QSize(128, 128)); + QPixmap pixmap = icon.pixmap(size); + + // write temp file DRM (could also be done through QIODevice [memory]) + QTemporaryFile notificationIconFile; + if (!pixmap.isNull() && notificationIconFile.open()) { + QImageWriter writer(¬ificationIconFile, "PNG"); + if (writer.write(pixmap.toImage())) { + const char *cString = notificationIconFile.fileName().toUtf8().data(); + NSString *macString = [NSString stringWithCString:cString encoding:NSUTF8StringEncoding]; + image = [[NSImage alloc] initWithContentsOfFile:macString]; + } + } + + if(!image) { + // if testnet image could not be created, load std. app icon + image = [[NSImage imageNamed:@"NSApplicationIcon"] retain]; + } + } + + [NSApp setApplicationIconImage:image]; + [image release]; + [pool release]; +} + +MacDockIconHandler *MacDockIconHandler::instance() +{ + static MacDockIconHandler *s_instance = NULL; + if (!s_instance) + s_instance = new MacDockIconHandler(); + return s_instance; +} + +void MacDockIconHandler::handleDockIconClickEvent() +{ + if (this->mainWindow) + { + this->mainWindow->activateWindow(); + this->mainWindow->show(); + } + + emit this->dockIconClicked(); +} diff --git a/src/qt/macnotificationhandler.hh b/src/qt/macnotificationhandler.hh deleted file mode 100644 index bc335ed..0000000 --- a/src/qt/macnotificationhandler.hh +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2011-2013 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#ifndef MACNOTIFICATIONHANDLER_H -#define MACNOTIFICATIONHANDLER_H - -#include - -/** Macintosh-specific notification handler (supports UserNotificationCenter and Growl). - */ -class MacNotificationHandler : public QObject -{ - Q_OBJECT - -public: - /** shows a 10.8+ UserNotification in the UserNotificationCenter - */ - void showNotification(const QString &title, const QString &text); - - /** executes AppleScript */ - void sendAppleScript(const QString &script); - - /** check if OS can handle UserNotifications */ - bool hasUserNotificationCenterSupport(void); - static MacNotificationHandler *instance(); -}; - - -#endif // MACNOTIFICATIONHANDLER_H diff --git a/src/qt/macnotificationhandler.mm b/src/qt/macnotificationhandler.mm deleted file mode 100644 index 8a4c94c..0000000 --- a/src/qt/macnotificationhandler.mm +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2011-2013 The Bitcoin Core developers -// Distributed under the MIT/X11 software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#include "macnotificationhandler.h" - -#undef slots -#include - -void MacNotificationHandler::showNotification(const QString &title, const QString &text) -{ - // check if users OS has support for NSUserNotification - if(this->hasUserNotificationCenterSupport()) { - // okay, seems like 10.8+ - QByteArray utf8 = title.toUtf8(); - char* cString = (char *)utf8.constData(); - NSString *titleMac = [[NSString alloc] initWithUTF8String:cString]; - - utf8 = text.toUtf8(); - cString = (char *)utf8.constData(); - NSString *textMac = [[NSString alloc] initWithUTF8String:cString]; - - // do everything weak linked (because we will keep <10.8 compatibility) - id userNotification = [[NSClassFromString(@"NSUserNotification") alloc] init]; - [userNotification performSelector:@selector(setTitle:) withObject:titleMac]; - [userNotification performSelector:@selector(setInformativeText:) withObject:textMac]; - - id notificationCenterInstance = [NSClassFromString(@"NSUserNotificationCenter") performSelector:@selector(defaultUserNotificationCenter)]; - [notificationCenterInstance performSelector:@selector(deliverNotification:) withObject:userNotification]; - - [titleMac release]; - [textMac release]; - [userNotification release]; - } -} - -// sendAppleScript just take a QString and executes it as apple script -void MacNotificationHandler::sendAppleScript(const QString &script) -{ - QByteArray utf8 = script.toUtf8(); - char* cString = (char *)utf8.constData(); - NSString *scriptApple = [[NSString alloc] initWithUTF8String:cString]; - - NSAppleScript *as = [[NSAppleScript alloc] initWithSource:scriptApple]; - NSDictionary *err = nil; - [as executeAndReturnError:&err]; - [as release]; - [scriptApple release]; -} - -bool MacNotificationHandler::hasUserNotificationCenterSupport(void) -{ - Class possibleClass = NSClassFromString(@"NSUserNotificationCenter"); - - // check if users OS has support for NSUserNotification - if(possibleClass!=nil) { - return true; - } - return false; -} - - -MacNotificationHandler *MacNotificationHandler::instance() -{ - static MacNotificationHandler *s_instance = NULL; - if (!s_instance) - s_instance = new MacNotificationHandler(); - return s_instance; -} diff --git a/src/qt/messagemodel.cpp b/src/qt/messagemodel.cpp new file mode 100644 index 0000000..8a715ea --- /dev/null +++ b/src/qt/messagemodel.cpp @@ -0,0 +1,619 @@ +#include "guiutil.h" +#include "guiconstants.h" +#include "trianglesunits.h" +#include "optionsmodel.h" +#include "walletmodel.h" +#include "messagemodel.h" +#include "addresstablemodel.h" + +#include "ui_interface.h" +#include "base58.h" +#include "json_spirit.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +Q_DECLARE_METATYPE(std::vector); + +QList ambiguous; /**< Specifies Ambiguous addresses */ + +const QString MessageModel::Sent = "Sent"; +const QString MessageModel::Received = "Received"; + +struct MessageTableEntryLessThan +{ + bool operator()(const MessageTableEntry &a, const MessageTableEntry &b) const {return a.received_datetime < b.received_datetime;}; + bool operator()(const MessageTableEntry &a, const QDateTime &b) const {return a.received_datetime < b;} + bool operator()(const QDateTime &a, const MessageTableEntry &b) const {return a < b.received_datetime;} +}; + +// Private implementation +class MessageTablePriv +{ +public: + QList cachedMessageTable; + MessageModel *parent; + + MessageTablePriv(MessageModel *parent): + parent(parent) {} + + void refreshMessageTable() + { + cachedMessageTable.clear(); + + if (parent->getWalletModel()->getEncryptionStatus() == WalletModel::Locked) + { + // -- messages are stored encrypted, can't load them without the private keys + return; + }; + + { + LOCK(cs_smsgDB); + + SecMsgDB dbSmsg; + + if (!dbSmsg.Open("cr+")) + //throw runtime_error("Could not open DB."); + return; + + unsigned char chKey[18]; + std::vector vchKey; + vchKey.resize(18); + + SecMsgStored smsgStored; + MessageData msg; + QString label; + QDateTime sent_datetime; + QDateTime received_datetime; + + std::string sPrefix("im"); + leveldb::Iterator* it = dbSmsg.pdb->NewIterator(leveldb::ReadOptions()); + while (dbSmsg.NextSmesg(it, sPrefix, chKey, smsgStored)) + { + uint32_t nPayload = smsgStored.vchMessage.size() - SMSG_HDR_LEN; + if (SecureMsgDecrypt(false, smsgStored.sAddrTo, &smsgStored.vchMessage[0], &smsgStored.vchMessage[SMSG_HDR_LEN], nPayload, msg) == 0) + { + label = parent->getWalletModel()->getAddressTableModel()->labelForAddress(QString::fromStdString(msg.sFromAddress)); + + sent_datetime .setTime_t(msg.timestamp); + received_datetime.setTime_t(smsgStored.timeReceived); + + memcpy(&vchKey[0], chKey, 18); + + addMessageEntry(MessageTableEntry(vchKey, + MessageTableEntry::Received, + label, + QString::fromStdString(smsgStored.sAddrTo), + QString::fromStdString(msg.sFromAddress), + sent_datetime, + received_datetime, + (char*)&msg.vchMessage[0]), + true); + } + }; + + delete it; + + sPrefix = "sm"; + it = dbSmsg.pdb->NewIterator(leveldb::ReadOptions()); + while (dbSmsg.NextSmesg(it, sPrefix, chKey, smsgStored)) + { + uint32_t nPayload = smsgStored.vchMessage.size() - SMSG_HDR_LEN; + if (SecureMsgDecrypt(false, smsgStored.sAddrOutbox, &smsgStored.vchMessage[0], &smsgStored.vchMessage[SMSG_HDR_LEN], nPayload, msg) == 0) + { + label = parent->getWalletModel()->getAddressTableModel()->labelForAddress(QString::fromStdString(smsgStored.sAddrTo)); + + sent_datetime .setTime_t(msg.timestamp); + received_datetime.setTime_t(smsgStored.timeReceived); + + memcpy(&vchKey[0], chKey, 18); + + addMessageEntry(MessageTableEntry(vchKey, + MessageTableEntry::Sent, + label, + QString::fromStdString(smsgStored.sAddrTo), + QString::fromStdString(msg.sFromAddress), + sent_datetime, + received_datetime, + (char*)&msg.vchMessage[0]), + true); + } + }; + + delete it; + } + } + + void newMessage(const SecMsgStored& inboxHdr) + { + // we have to copy it, because it doesn't like constants going into Decrypt + SecMsgStored smsgStored = inboxHdr; + MessageData msg; + QString label; + QDateTime sent_datetime; + QDateTime received_datetime; + + uint32_t nPayload = smsgStored.vchMessage.size() - SMSG_HDR_LEN; + if (SecureMsgDecrypt(false, smsgStored.sAddrTo, &smsgStored.vchMessage[0], &smsgStored.vchMessage[SMSG_HDR_LEN], nPayload, msg) == 0) + { + label = parent->getWalletModel()->getAddressTableModel()->labelForAddress(QString::fromStdString(msg.sFromAddress)); + + sent_datetime .setTime_t(msg.timestamp); + received_datetime.setTime_t(smsgStored.timeReceived); + + std::string sPrefix("im"); + SecureMessage* psmsg = (SecureMessage*) &smsgStored.vchMessage[0]; + + std::vector vchKey; + vchKey.resize(18); + memcpy(&vchKey[0], sPrefix.data(), 2); + memcpy(&vchKey[2], &psmsg->timestamp, 8); + memcpy(&vchKey[10], &smsgStored.vchMessage[SMSG_HDR_LEN], 8); // sample + + addMessageEntry(MessageTableEntry(vchKey, + MessageTableEntry::Received, + label, + QString::fromStdString(smsgStored.sAddrTo), + QString::fromStdString(msg.sFromAddress), + sent_datetime, + received_datetime, + (char*)&msg.vchMessage[0]), + false); + } + } + + void newOutboxMessage(const SecMsgStored& outboxHdr) + { + + SecMsgStored smsgStored = outboxHdr; + MessageData msg; + QString label; + QDateTime sent_datetime; + QDateTime received_datetime; + + uint32_t nPayload = smsgStored.vchMessage.size() - SMSG_HDR_LEN; + if (SecureMsgDecrypt(false, smsgStored.sAddrOutbox, &smsgStored.vchMessage[0], &smsgStored.vchMessage[SMSG_HDR_LEN], nPayload, msg) == 0) + { + label = parent->getWalletModel()->getAddressTableModel()->labelForAddress(QString::fromStdString(smsgStored.sAddrTo)); + + sent_datetime .setTime_t(msg.timestamp); + received_datetime.setTime_t(smsgStored.timeReceived); + + std::string sPrefix("sm"); + SecureMessage* psmsg = (SecureMessage*) &smsgStored.vchMessage[0]; + std::vector vchKey; + vchKey.resize(18); + memcpy(&vchKey[0], sPrefix.data(), 2); + memcpy(&vchKey[2], &psmsg->timestamp, 8); + memcpy(&vchKey[10], &smsgStored.vchMessage[SMSG_HDR_LEN], 8); // sample + + addMessageEntry(MessageTableEntry(vchKey, + MessageTableEntry::Sent, + label, + QString::fromStdString(smsgStored.sAddrTo), + QString::fromStdString(msg.sFromAddress), + sent_datetime, + received_datetime, + (char*)&msg.vchMessage[0]), + false); + } + } + + void walletUnlocked() + { + // -- wallet is unlocked, can get at the private keys now + refreshMessageTable(); + + parent->reset(); // reload table view + + if (parent->proxyModel) + { + parent->proxyModel->setFilterRole(false); + parent->proxyModel->setFilterFixedString(""); + parent->resetFilter(); + parent->proxyModel->setFilterRole(MessageModel::Ambiguous); + parent->proxyModel->setFilterFixedString("true"); + } + + //invalidateFilter() + } + + void setEncryptionStatus(int status) + { + if (status == WalletModel::Locked) + { + // -- Wallet is locked, clear secure message display. + cachedMessageTable.clear(); + + parent->reset(); // reload table view + }; + }; + + MessageTableEntry *index(int idx) + { + if(idx >= 0 && idx < cachedMessageTable.size()) + return &cachedMessageTable[idx]; + else + return 0; + } + +private: + // Get the json value + const json_spirit::mValue & find_value(json_spirit::mObject & obj, const char * key) + { + std::string newKey = key; + + json_spirit::mObject::const_iterator i = obj.find(newKey); + + if(i != obj.end() && i->first == newKey) + return i->second; + else + return json_spirit::mValue::null; + } + + const std::string get_value(json_spirit::mObject & obj, const char * key) + { + json_spirit::mValue val = find_value(obj, key); + + if(val.is_null()) + return ""; + else + return val.get_str(); + } + + // Determine if it is a special message, i.e.: Invoice, Receipt, etc... + void handleMessageEntry(const MessageTableEntry & message, const bool append) + { + addMessageEntry(message, append); + json_spirit::mValue mVal; + json_spirit::read(message.message.toStdString(), mVal); + + if(mVal.is_null()) + { + addMessageEntry(message, append); + return; + } + + json_spirit::mObject mObj(mVal.get_obj()); + json_spirit::mValue mvType = find_value(mObj, "type"); + + } + + void addMessageEntry(const MessageTableEntry & message, const bool & append) + { + if(append) + { + cachedMessageTable.append(message); + } else + { + int index = qLowerBound(cachedMessageTable.begin(), cachedMessageTable.end(), message.received_datetime, MessageTableEntryLessThan()) - cachedMessageTable.begin(); + parent->beginInsertRows(QModelIndex(), index, index); + cachedMessageTable.insert( + index, + message); + parent->endInsertRows(); + } + } + +}; + +MessageModel::MessageModel(CWallet *wallet, WalletModel *walletModel, QObject *parent) : + QAbstractTableModel(parent), wallet(wallet), walletModel(walletModel), optionsModel(0), priv(0) +{ + columns << tr("Type") << tr("Sent Date Time") << tr("Received Date Time") << tr("Label") << tr("To Address") << tr("From Address") << tr("Message"); + + proxyModel = NULL; + + optionsModel = walletModel->getOptionsModel(); + + priv = new MessageTablePriv(this); + priv->refreshMessageTable(); + + subscribeToCoreSignals(); +} + +MessageModel::~MessageModel() +{ + if (proxyModel) + delete proxyModel; + + delete priv; + unsubscribeFromCoreSignals(); +} + +bool MessageModel::getAddressOrPubkey(QString &address, QString &pubkey) const +{ + CTrianglesAddress addressParsed(address.toStdString()); + + if(addressParsed.IsValid()) { + CKeyID destinationAddress; + CPubKey destinationKey; + + addressParsed.GetKeyID(destinationAddress); + + if (SecureMsgGetStoredKey(destinationAddress, destinationKey) != 0 + && SecureMsgGetLocalKey(destinationAddress, destinationKey) != 0) // test if it's a local key + return false; + + address = destinationAddress.ToString().c_str(); + pubkey = EncodeBase58(destinationKey.Raw()).c_str(); + + return true; + } + + return false; +} + +WalletModel *MessageModel::getWalletModel() +{ + return walletModel; +} + +OptionsModel *MessageModel::getOptionsModel() +{ + return optionsModel; +} + +MessageModel::StatusCode MessageModel::sendMessages(const QList &recipients, const QString &addressFrom) +{ + + QSet setAddress; + + if(recipients.empty()) + return OK; + + // Pre-check input data for validity + foreach(const SendMessagesRecipient &rcp, recipients) + { + if(!walletModel->validateAddress(rcp.address)) + return InvalidAddress; + + if(rcp.message == "") + return MessageCreationFailed; + + std::string sendTo = rcp.address.toStdString(); + std::string pubkey = rcp.pubkey.toStdString(); + std::string message = rcp.message.toStdString(); + std::string addFrom = addressFrom.toStdString(); + + SecureMsgAddAddress(sendTo, pubkey); + setAddress.insert(rcp.address); + + std::string sError; + if (SecureMsgSend(addFrom, sendTo, message, sError) != 0) + { + QMessageBox::warning(NULL, tr("Send Secure Message"), + tr("Send failed: %1.").arg(sError.c_str()), + QMessageBox::Ok, QMessageBox::Ok); + + return FailedErrorShown; + }; + + // Add addresses / update labels that we've sent to to the address book + std::string strAddress = rcp.address.toStdString(); + CTxDestination dest = CTrianglesAddress(strAddress).Get(); + std::string strLabel = rcp.label.toStdString(); + { + LOCK(wallet->cs_wallet); + + std::map::iterator mi = wallet->mapAddressBook.find(dest); + + // Check if we have a new address or an updated label + if (mi == wallet->mapAddressBook.end() || mi->second != strLabel) + { + wallet->SetAddressBookName(dest, strLabel); + } + } + } + + if(recipients.size() > setAddress.size()) + return DuplicateAddress; + + return OK; +} + +MessageModel::StatusCode MessageModel::sendMessages(const QList &recipients) +{ + return sendMessages(recipients, "anon"); +} + +int MessageModel::rowCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent); + return priv->cachedMessageTable.size(); +} + +int MessageModel::columnCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent); + return columns.length(); +} + +QVariant MessageModel::data(const QModelIndex &index, int role) const +{ + if(!index.isValid()) + return QVariant(); + + MessageTableEntry *rec = static_cast(index.internalPointer()); + + switch(role) + { + /* + case Qt::DecorationRole: + switch(index.column()) + { + return txStatusDecoration(rec); + case ToAddress: + return txAddressDecoration(rec); + } + break;*/ + case Qt::DisplayRole: + switch(index.column()) + { + case Label: return (rec->label.isEmpty() ? tr("(no label)") : rec->label); + case ToAddress: return rec->to_address; + case FromAddress: return rec->from_address; + case SentDateTime: return rec->sent_datetime; + case ReceivedDateTime: return rec->received_datetime; + case Message: return rec->message; + case TypeInt: return rec->type; + case HTML: return rec->received_datetime.toString() + "
" + (rec->label.isEmpty() ? rec->from_address : rec->label) + "
" + rec->message; + case Type: + switch(rec->type) + { + case MessageTableEntry::Sent: return Sent; + case MessageTableEntry::Received: return Received; + default: break; + } + case Key: return QVariant::fromValue(rec->chKey); + } + break; + + case KeyRole: return QVariant::fromValue(rec->chKey); + case TypeRole: return rec->type; + case SentDateRole: return rec->sent_datetime; + case ReceivedDateRole: return rec->received_datetime; + case FromAddressRole: return rec->from_address; + case ToAddressRole: return rec->to_address; + case FilterAddressRole: return (rec->type == MessageTableEntry::Sent ? rec->to_address + rec->from_address : rec->from_address + rec->to_address); + case LabelRole: return rec->label; + case MessageRole: return rec->message; + case ShortMessageRole: return rec->message; // TODO: Short message + case HTMLRole: return rec->received_datetime.toString() + "
" + (rec->label.isEmpty() ? rec->from_address : rec->label) + "
" + rec->message; + case Ambiguous: + int it; + + for (it = 0; ittype == MessageTableEntry::Sent ? rec->to_address + rec->from_address : rec->from_address + rec->to_address)) + return false; + } + QString address = (rec->type == MessageTableEntry::Sent ? rec->to_address + rec->from_address : rec->from_address + rec->to_address); + ambiguous.append(address); + + return "true"; + break; + } + + return QVariant(); +} + +QVariant MessageModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + return (orientation == Qt::Horizontal && role == Qt::DisplayRole ? columns[section] : QVariant()); +} + +Qt::ItemFlags MessageModel::flags(const QModelIndex & index) const +{ + if(index.isValid()) + return Qt::ItemIsSelectable | Qt::ItemIsEnabled; + + return 0; +} + +QModelIndex MessageModel::index(int row, int column, const QModelIndex & parent) const +{ + Q_UNUSED(parent); + MessageTableEntry *data = priv->index(row); + return (data ? createIndex(row, column, priv->index(row)) : QModelIndex()); +} + +bool MessageModel::removeRows(int row, int count, const QModelIndex & parent) +{ + MessageTableEntry *rec = priv->index(row); + if(count != 1 || !rec) + // Can only remove one row at a time, and cannot remove rows not in model. + // Also refuse to remove receiving addresses. + return false; + + { + LOCK(cs_smsgDB); + SecMsgDB dbSmsg; + + if (!dbSmsg.Open("cr+")) + //throw runtime_error("Could not open DB."); + return false; + + dbSmsg.EraseSmesg(&rec->chKey[0]); + } + + beginRemoveRows(parent, row, row); + priv->cachedMessageTable.removeAt(row); + endRemoveRows(); + + return true; +} + +void MessageModel::resetFilter() +{ + ambiguous.clear(); +} + +void MessageModel::newMessage(const SecMsgStored &smsg) +{ + priv->newMessage(smsg); +} + + +void MessageModel::newOutboxMessage(const SecMsgStored &smsgOutbox) +{ + priv->newOutboxMessage(smsgOutbox); +} + + +void MessageModel::walletUnlocked() +{ + priv->walletUnlocked(); +} + +void MessageModel::setEncryptionStatus(int status) +{ + priv->setEncryptionStatus(status); +} + + +static void NotifySecMsgInbox(MessageModel *messageModel, SecMsgStored inboxHdr) +{ + // Too noisy: OutputDebugStringF("NotifySecMsgInboxChanged %s\n", message); + QMetaObject::invokeMethod(messageModel, "newMessage", Qt::QueuedConnection, + Q_ARG(SecMsgStored, inboxHdr)); +} + +static void NotifySecMsgOutbox(MessageModel *messageModel, SecMsgStored outboxHdr) +{ + QMetaObject::invokeMethod(messageModel, "newOutboxMessage", Qt::QueuedConnection, + Q_ARG(SecMsgStored, outboxHdr)); +} + +static void NotifySecMsgWallet(MessageModel *messageModel) +{ + QMetaObject::invokeMethod(messageModel, "walletUnlocked", Qt::QueuedConnection); +} + +void MessageModel::subscribeToCoreSignals() +{ + qRegisterMetaType("SecMsgStored"); + + // Connect signals + NotifySecMsgInboxChanged.connect(boost::bind(NotifySecMsgInbox, this, _1)); + NotifySecMsgOutboxChanged.connect(boost::bind(NotifySecMsgOutbox, this, _1)); + NotifySecMsgWalletUnlocked.connect(boost::bind(NotifySecMsgWallet, this)); + + connect(walletModel, SIGNAL(encryptionStatusChanged(int)), this, SLOT(setEncryptionStatus(int))); +} + +void MessageModel::unsubscribeFromCoreSignals() +{ + // Disconnect signals + NotifySecMsgInboxChanged.disconnect(boost::bind(NotifySecMsgInbox, this, _1)); + NotifySecMsgOutboxChanged.disconnect(boost::bind(NotifySecMsgOutbox, this, _1)); + NotifySecMsgWalletUnlocked.disconnect(boost::bind(NotifySecMsgWallet, this)); + + disconnect(walletModel, SIGNAL(encryptionStatusChanged(int)), this, SLOT(setEncryptionStatus(int))); +} diff --git a/src/qt/messagemodel.h b/src/qt/messagemodel.h new file mode 100644 index 0000000..e20fe8b --- /dev/null +++ b/src/qt/messagemodel.h @@ -0,0 +1,195 @@ +#ifndef MESSAGEMODEL_H +#define MESSAGEMODEL_H + +#include "uint256.h" + +#include +#include "allocators.h" /* for SecureString */ +#include "smessage.h" +#include +#include +#include +#include +#include + + +class MessageTablePriv; +class InvoiceTableModel; +class InvoiceItemTableModel; +class ReceiptTableModel; +class CWallet; +class WalletModel; +class OptionsModel; + +class SendMessagesRecipient +{ +public: + QString address; + QString label; + QString pubkey; + QString message; +}; + +struct MessageTableEntry +{ + enum Type { + Sent, + Received + }; + + std::vector chKey; + Type type; + QString label; + QString to_address; + QString from_address; + QDateTime sent_datetime; + QDateTime received_datetime; + QString message; + + MessageTableEntry() {} + MessageTableEntry(std::vector &chKey, + Type type, + const QString &label, + const QString &to_address, + const QString &from_address, + const QDateTime &sent_datetime, + const QDateTime &received_datetime, + const QString &message): + chKey(chKey), + type(type), + label(label), + to_address(to_address), + from_address(from_address), + sent_datetime(sent_datetime), + received_datetime(received_datetime), + message(message) + { + } +}; + +/** Interface to Triangles Secure Messaging from Qt view code. */ +class MessageModel : public QAbstractTableModel +{ + Q_OBJECT + +public: + explicit MessageModel(CWallet *wallet, WalletModel *walletModel, QObject *parent = 0); + ~MessageModel(); + + enum StatusCode // Returned by sendMessages + { + OK, + InvalidAddress, + InvalidMessage, + DuplicateAddress, + MessageCreationFailed, // Error returned when DB is still locked + MessageCommitFailed, + Aborted, + FailedErrorShown + }; + + enum ColumnIndex { + Type = 0, /**< Sent/Received */ + SentDateTime = 1, /**< Time Sent */ + ReceivedDateTime = 2, /**< Time Received */ + Label = 3, /**< User specified label */ + ToAddress = 4, /**< To Bitcoin address */ + FromAddress = 5, /**< From Bitcoin address */ + Message = 6, /**< Plaintext */ + TypeInt = 7, /**< Plaintext */ + Key = 8, /**< chKey */ + HTML = 9, /**< HTML Formatted Data */ + }; + + /** Roles to get specific information from a message row. + These are independent of column. + */ + enum RoleIndex { + /** Type of message */ + TypeRole = Qt::UserRole, + /** Date and time this message was sent */ + /** message key */ + KeyRole, + SentDateRole, + /** Date and time this message was received */ + ReceivedDateRole, + /** From Address of message */ + FromAddressRole, + /** To Address of message */ + ToAddressRole, + /** Filter address related to message */ + FilterAddressRole, + /** Label of address related to message */ + LabelRole, + /** Full Message */ + MessageRole, + /** Short Message */ + ShortMessageRole, + /** HTML Formatted */ + HTMLRole, + /** Ambiguous bool */ + Ambiguous + }; + + static const QString Sent; /**< Specifies sent message */ + static const QString Received; /**< Specifies sent message */ + + //QList ambiguous; /**< Specifies Ambiguous addresses */ + + /** @name Methods overridden from QAbstractTableModel + @{*/ + int rowCount(const QModelIndex &parent) const; + int columnCount(const QModelIndex &parent) const; + QVariant data(const QModelIndex &index, int role) const; + QVariant headerData(int section, Qt::Orientation orientation, int role) const; + QModelIndex index(int row, int column, const QModelIndex & parent) const; + bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex()); + Qt::ItemFlags flags(const QModelIndex & index) const; + /*@}*/ + + /* Look up row index of a message in the model. + Return -1 if not found. + */ + int lookupMessage(const QString &message) const; + + WalletModel *getWalletModel(); + OptionsModel *getOptionsModel(); + + void resetFilter(); + + bool getAddressOrPubkey( QString &Address, QString &Pubkey) const; + + // Send messages to a list of recipients + StatusCode sendMessages(const QList &recipients); + StatusCode sendMessages(const QList &recipients, const QString &addressFrom); + + QSortFilterProxyModel *proxyModel; + +private: + CWallet *wallet; + WalletModel *walletModel; + OptionsModel *optionsModel; + MessageTablePriv *priv; + QStringList columns; + + void subscribeToCoreSignals(); + void unsubscribeFromCoreSignals(); + +public slots: + + /* Check for new messages */ + void newMessage(const SecMsgStored& smsg); + void newOutboxMessage(const SecMsgStored& smsg); + + void walletUnlocked(); + + void setEncryptionStatus(int status); + + friend class MessageTablePriv; + +signals: + // Asynchronous error notification + void error(const QString &title, const QString &message, bool modal); +}; + +#endif // MESSAGEMODEL_H diff --git a/src/qt/messagepage.cpp b/src/qt/messagepage.cpp new file mode 100644 index 0000000..0bd6448 --- /dev/null +++ b/src/qt/messagepage.cpp @@ -0,0 +1,429 @@ +#include "messagepage.h" +#include "ui_messagepage.h" + +#include "sendmessagesdialog.h" +#include "mrichtextedit.h" +#include "messagemodel.h" +#include "trianglesgui.h" +#include "csvmodelwriter.h" +#include "guiutil.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define DECORATION_SIZE 64 +#define NUM_ITEMS 3 + +class MessageViewDelegate : public QStyledItemDelegate +{ +protected: + void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const; + QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const; +}; + +void MessageViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const +{ + QStyleOptionViewItemV4 optionV4 = option; + initStyleOption(&optionV4, index); + + QStyle *style = optionV4.widget? optionV4.widget->style() : QApplication::style(); + + QTextDocument doc; + QString align(index.data(MessageModel::TypeRole) == 1 ? "left" : "right"); + QString html = "

" + index.data(MessageModel::HTMLRole).toString() + "

"; + doc.setHtml(html); + + /// Painting item without text + optionV4.text = QString(); + style->drawControl(QStyle::CE_ItemViewItem, &optionV4, painter); + + QAbstractTextDocumentLayout::PaintContext ctx; + + // Highlighting text if item is selected + if (optionV4.state & QStyle::State_Selected) + ctx.palette.setColor(QPalette::Text, optionV4.palette.color(QPalette::Active, QPalette::HighlightedText)); + + QRect textRect = style->subElementRect(QStyle::SE_ItemViewItemText, &optionV4); + doc.setTextWidth( textRect.width() ); + painter->save(); + painter->translate(textRect.topLeft()); + painter->setClipRect(textRect.translated(-textRect.topLeft())); + doc.documentLayout()->draw(painter, ctx); + painter->restore(); +} + +QSize MessageViewDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const +{ + QStyleOptionViewItemV4 options = option; + initStyleOption(&options, index); + + QTextDocument doc; + doc.setHtml(index.data(MessageModel::HTMLRole).toString()); + doc.setTextWidth(options.rect.width()); + return QSize(doc.idealWidth(), doc.size().height() + 20); +} + + +MessagePage::MessagePage(QWidget *parent) : + QWidget(parent), + ui(new Ui::MessagePage), + model(0), + msgdelegate(new MessageViewDelegate()), + messageTextEdit(new MRichTextEdit()) +{ + ui->setupUi(this); + + +#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac + ui->deleteButton->setIcon(QIcon()); +#endif + // Context menu actions + replyAction = new QAction(ui->sendButton->text(), this); + copyFromAddressAction = new QAction(ui->copyFromAddressButton->text(), this); + copyToAddressAction = new QAction(ui->copyToAddressButton->text(), this); + deleteAction = new QAction(ui->deleteButton->text(), this); + + // Build context menu + contextMenu = new QMenu(); + + contextMenu->addAction(replyAction); + contextMenu->addAction(copyFromAddressAction); + contextMenu->addAction(copyToAddressAction); + contextMenu->addAction(deleteAction); + + connect(replyAction, SIGNAL(triggered()), this, SLOT(on_sendButton_clicked())); + connect(copyFromAddressAction, SIGNAL(triggered()), this, SLOT(on_copyFromAddressButton_clicked())); + connect(copyToAddressAction, SIGNAL(triggered()), this, SLOT(on_copyToAddressButton_clicked())); + connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked())); + + connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); + + // Show Messages + ui->listConversation->setItemDelegate(msgdelegate); + ui->listConversation->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE)); + ui->listConversation->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2)); + ui->listConversation->setAttribute(Qt::WA_MacShowFocusRect, false); +} + +MessagePage::~MessagePage() +{ + delete ui; +} + +void MessagePage::setModel(MessageModel *model) +{ + this->model = model; + if(!model) + return; + + if (model->proxyModel) + delete model->proxyModel; + model->proxyModel = new QSortFilterProxyModel(this); + model->proxyModel->setSourceModel(model); + model->proxyModel->setDynamicSortFilter(true); + model->proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); + model->proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); + model->proxyModel->sort(MessageModel::ReceivedDateTime); + model->proxyModel->setFilterRole(MessageModel::Ambiguous); + model->proxyModel->setFilterFixedString("true"); + + ui->tableView->setModel(model->proxyModel); + ui->tableView->sortByColumn(MessageModel::ReceivedDateTime, Qt::DescendingOrder); + + ui->listConversation->setModel(model->proxyModel); + ui->listConversation->setModelColumn(MessageModel::HTML); + + // Set column widths + ui->tableView->horizontalHeader()->resizeSection(MessageModel::Type, 100); + ui->tableView->horizontalHeader()->resizeSection(MessageModel::Label, 100); + ui->tableView->horizontalHeader()->setResizeMode(MessageModel::Label, QHeaderView::Stretch); + ui->tableView->horizontalHeader()->resizeSection(MessageModel::FromAddress, 320); + ui->tableView->horizontalHeader()->resizeSection(MessageModel::ToAddress, 320); + ui->tableView->horizontalHeader()->resizeSection(MessageModel::SentDateTime, 170); + ui->tableView->horizontalHeader()->resizeSection(MessageModel::ReceivedDateTime, 170); + + //ui->messageEdit->setMinimumHeight(100); + + // Hidden columns + ui->tableView->setColumnHidden(MessageModel::Message, true); + + connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(selectionChanged())); + connect(ui->tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(selectionChanged())); + connect(ui->listConversation->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(itemSelectionChanged())); + connect(ui->listConversation, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(itemSelectionChanged())); + //connect(ui->messageEdit, SIGNAL(textChanged()), this, SLOT(messageTextChanged())); + + // Scroll to bottom + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(incomingMessage())); + + selectionChanged(); +} + +void MessagePage::on_sendButton_clicked() +{ + if(!model) + return; + + std::string sError; + std::string sendTo = replyToAddress.toStdString(); + std::string message = ui->messageEdit->toHtml().toStdString(); + std::string addFrom = replyFromAddress.toStdString(); + + if (SecureMsgSend(addFrom, sendTo, message, sError) != 0) + { + QMessageBox::warning(NULL, tr("Send Secure Message"), + tr("Send failed: %1.").arg(sError.c_str()), + QMessageBox::Ok, QMessageBox::Ok); + + return; + }; + + //ui->messageEdit->setMaximumHeight(30); + ui->messageEdit->clear(); + ui->listConversation->scrollToBottom(); +} + +void MessagePage::on_newButton_clicked() +{ + if(!model) + return; + + SendMessagesDialog dlg(SendMessagesDialog::Encrypted, SendMessagesDialog::Dialog, this); + + dlg.setModel(model); + dlg.exec(); +} + +void MessagePage::on_copyFromAddressButton_clicked() +{ + GUIUtil::copyEntryData(ui->tableView, MessageModel::FromAddress, Qt::DisplayRole); +} + +void MessagePage::on_copyToAddressButton_clicked() +{ + GUIUtil::copyEntryData(ui->tableView, MessageModel::ToAddress, Qt::DisplayRole); +} + +void MessagePage::on_deleteButton_clicked() +{ + QListView *list = ui->listConversation; + + if(!list->selectionModel()) + return; + + QModelIndexList indexes = list->selectionModel()->selectedIndexes(); + + if(!indexes.isEmpty()) + { + list->model()->removeRow(indexes.at(0).row()); + indexes = list->selectionModel()->selectedIndexes(); + + if(indexes.isEmpty()) + on_backButton_clicked(); + } +} + +void MessagePage::on_backButton_clicked() +{ + model->proxyModel->setFilterRole(false); + model->proxyModel->setFilterFixedString(""); + model->resetFilter(); + model->proxyModel->setFilterRole(MessageModel::Ambiguous); + model->proxyModel->setFilterFixedString("true"); + + ui->tableView->clearSelection(); + ui->listConversation->clearSelection(); + itemSelectionChanged(); + selectionChanged(); + + ui->messageDetails->hide(); + ui->tableView->show(); + ui->newButton->setEnabled(true); + ui->newButton->setVisible(true); + ui->sendButton->setEnabled(false); + ui->sendButton->setVisible(false); + ui->messageEdit->setVisible(false); +} + +void MessagePage::selectionChanged() +{ + // Set button states based on selected tab and selection + QTableView *table = ui->tableView; + if(!table->selectionModel()) + return; + + if(table->selectionModel()->hasSelection()) + { + replyAction->setEnabled(true); + copyFromAddressAction->setEnabled(true); + copyToAddressAction->setEnabled(true); + deleteAction->setEnabled(true); + + ui->copyFromAddressButton->setEnabled(true); + ui->copyToAddressButton->setEnabled(true); + ui->deleteButton->setEnabled(true); + + ui->newButton->setEnabled(false); + ui->newButton->setVisible(false); + ui->sendButton->setEnabled(true); + ui->sendButton->setVisible(true); + ui->messageEdit->setVisible(true); + + ui->tableView->hide(); + + // Figure out which message was selected + QModelIndexList labelColumn = table->selectionModel()->selectedRows(MessageModel::Label); + QModelIndexList addressFromColumn = table->selectionModel()->selectedRows(MessageModel::FromAddress); + QModelIndexList addressToColumn = table->selectionModel()->selectedRows(MessageModel::ToAddress); + QModelIndexList typeColumn = table->selectionModel()->selectedRows(MessageModel::Type); + + int type; + + foreach (QModelIndex index, typeColumn) + type = (table->model()->data(index).toString() == MessageModel::Sent ? MessageTableEntry::Sent : MessageTableEntry::Received); + + foreach (QModelIndex index, labelColumn) + ui->contactLabel->setText(table->model()->data(index).toString()); + + foreach (QModelIndex index, addressFromColumn) + if(type == MessageTableEntry::Sent) + replyFromAddress = table->model()->data(index).toString(); + else + replyToAddress = table->model()->data(index).toString(); + + foreach (QModelIndex index, addressToColumn) + if(type == MessageTableEntry::Sent) + replyToAddress = table->model()->data(index).toString(); + else + replyFromAddress = table->model()->data(index).toString(); + + QString filter = (type == MessageTableEntry::Sent ? replyToAddress + replyFromAddress : replyToAddress + replyFromAddress); + + model->proxyModel->setFilterRole(false); + model->proxyModel->setFilterFixedString(""); + model->proxyModel->sort(MessageModel::ReceivedDateTime); + model->proxyModel->setFilterRole(MessageModel::FilterAddressRole); + model->proxyModel->setFilterFixedString(filter); + ui->messageDetails->show(); + ui->listConversation->setCurrentIndex(model->proxyModel->index(0, 0, QModelIndex())); + } + else + { + ui->newButton->setEnabled(true); + ui->newButton->setVisible(true); + ui->sendButton->setEnabled(false); + ui->sendButton->setVisible(false); + ui->copyFromAddressButton->setEnabled(false); + ui->copyToAddressButton->setEnabled(false); + ui->deleteButton->setEnabled(false); + ui->messageEdit->hide(); + ui->messageDetails->hide(); + ui->messageEdit->clear(); + } +} + +void MessagePage::itemSelectionChanged() +{ + // Set button states based on selected tab and selection + QListView *list = ui->listConversation; + if(!list->selectionModel()) + return; + + if(list->selectionModel()->hasSelection()) + { + replyAction->setEnabled(true); + copyFromAddressAction->setEnabled(true); + copyToAddressAction->setEnabled(true); + deleteAction->setEnabled(true); + + ui->copyFromAddressButton->setEnabled(true); + ui->copyToAddressButton->setEnabled(true); + ui->deleteButton->setEnabled(true); + + ui->newButton->setEnabled(false); + ui->newButton->setVisible(false); + ui->sendButton->setEnabled(true); + ui->sendButton->setVisible(true); + ui->messageEdit->setVisible(true); + + ui->tableView->hide(); + + } + else + { + ui->newButton->setEnabled(true); + ui->newButton->setVisible(true); + ui->sendButton->setEnabled(false); + ui->sendButton->setVisible(false); + ui->copyFromAddressButton->setEnabled(false); + ui->copyToAddressButton->setEnabled(false); + ui->deleteButton->setEnabled(false); + ui->messageEdit->hide(); + ui->messageDetails->hide(); + ui->messageEdit->clear(); + } +} + +void MessagePage::incomingMessage() +{ + ui->listConversation->scrollToBottom(); +} + +void MessagePage::messageTextChanged() +{ + /* + if(ui->messageEdit->toPlainText().endsWith("\n")) + { + ui->messageEdit->setMaximumHeight(80); + ui->messageEdit->resize(256, ui->messageEdit->document()->size().height() + 10); + }*/ + +} + +void MessagePage::exportClicked() +{ + // CSV is currently the only supported format + QString filename = GUIUtil::getSaveFileName( + this, + tr("Export Messages"), QString(), + tr("Comma separated file (*.csv)")); + + if (filename.isNull()) return; + + CSVModelWriter writer(filename); + + // name, column, role + writer.setModel(model->proxyModel); + writer.addColumn("Type", MessageModel::Type, Qt::DisplayRole); + writer.addColumn("Label", MessageModel::Label, Qt::DisplayRole); + writer.addColumn("FromAddress", MessageModel::FromAddress, Qt::DisplayRole); + writer.addColumn("ToAddress", MessageModel::ToAddress, Qt::DisplayRole); + writer.addColumn("SentDateTime", MessageModel::SentDateTime, Qt::DisplayRole); + writer.addColumn("ReceivedDateTime", MessageModel::ReceivedDateTime, Qt::DisplayRole); + writer.addColumn("Message", MessageModel::Message, Qt::DisplayRole); + + if(!writer.write()) + { + QMessageBox::critical(this, tr("Error exporting"), tr("Could not write to file %1.").arg(filename), + QMessageBox::Abort, QMessageBox::Abort); + } +} + + +void MessagePage::contextualMenu(const QPoint &point) +{ + QModelIndex index = ui->tableView->indexAt(point); + if(index.isValid()) + { + contextMenu->exec(QCursor::pos()); + } +} + diff --git a/src/qt/messagepage.h b/src/qt/messagepage.h new file mode 100644 index 0000000..f58c1dd --- /dev/null +++ b/src/qt/messagepage.h @@ -0,0 +1,73 @@ +#ifndef MESSAGEPAGE_H +#define MESSAGEPAGE_H + +#include + +namespace Ui { + class MessagePage; +} +class MessageModel; +//class OptionsModel; + +QT_BEGIN_NAMESPACE +class QTableView; +class QItemSelection; +class QSortFilterProxyModel; +class QMenu; +class QModelIndex; +class MessageViewDelegate; +class MRichTextEdit; +QT_END_NAMESPACE + + +/** Widget that shows a list of sending or receiving addresses. + */ +class MessagePage : public QWidget +{ + Q_OBJECT + +public: + + explicit MessagePage(QWidget *parent = 0); + ~MessagePage(); + + void setModel(MessageModel *model); + +private: + void setupTextActions(); + +public slots: + void exportClicked(); + +private: + Ui::MessagePage *ui; + MessageModel *model; + + QMenu *contextMenu; + QAction *replyAction; + QAction *copyFromAddressAction; + QAction *copyToAddressAction; + QAction *deleteAction; + QString replyFromAddress; + QString replyToAddress; + MessageViewDelegate *msgdelegate; + MRichTextEdit *messageTextEdit; + +private slots: + void on_sendButton_clicked(); + void on_newButton_clicked(); + void on_copyFromAddressButton_clicked(); + void on_copyToAddressButton_clicked(); + void on_deleteButton_clicked(); + void on_backButton_clicked(); + void messageTextChanged(); + void selectionChanged(); + void itemSelectionChanged(); + void incomingMessage(); + /** Spawn contextual menu (right mouse menu) for address book entry */ + void contextualMenu(const QPoint &point); + +signals: +}; + +#endif // MESSAGEPAGE_H diff --git a/src/qt/messagepage.ui b/src/qt/messagepage.ui new file mode 100644 index 0000000..0e0c976 --- /dev/null +++ b/src/qt/messagepage.ui @@ -0,0 +1,242 @@ + + + MessagePage + + + + 0 + 0 + 793 + 375 + + + + Address Book + + + + + + These are your sent and received encrypted messages. Click on an item to read it. + + + Qt::PlainText + + + true + + + + + + + Qt::CustomContextMenu + + + Click on a message to view it + + + false + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + true + + + false + + + + + + + + + + + + + 2 + + + 0 + + + 6 + + + 0 + + + 0 + + + + + + + &Back + + + + :/icons/quit:/icons/quit + + + + + + + Contact: + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + 0 + 100 + + + + + + + + + + &Conversation + + + + :/icons/add:/icons/add + + + + + + + Sign a message to prove you own a Triangles address + + + &Send + + + + :/icons/send:/icons/send + + + + + + + Copy the currently selected address to the system clipboard + + + &Copy From Address + + + + :/icons/editcopy:/icons/editcopy + + + + + + + Copy the currently selected address to the system clipboard + + + Copy To &Address + + + + :/icons/editcopy:/icons/editcopy + + + + + + + Delete the currently selected address from the list + + + &Delete + + + + :/icons/remove:/icons/remove + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + MRichTextEdit + QWidget +
mrichtextedit.h
+ 1 +
+
+ + + + +
diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp index 8028190..628dca1 100644 --- a/src/qt/notificator.cpp +++ b/src/qt/notificator.cpp @@ -113,7 +113,7 @@ FreedesktopImage::FreedesktopImage(const QImage &img): { // Convert 00xAARRGGBB to RGBA bytewise (endian-independent) format QImage tmp = img.convertToFormat(QImage::Format_ARGB32); - const uint32_t *data = reinterpret_cast(tmp.constBits()); + const uint32_t *data = reinterpret_cast(tmp.bits()); unsigned int num_pixels = width * height; image.resize(num_pixels * BYTES_PER_PIXEL); diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index b1e3850..2208459 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -1,7 +1,7 @@ #include "optionsdialog.h" #include "ui_optionsdialog.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "monitoreddatamapper.h" #include "netbase.h" #include "optionsmodel.h" @@ -80,7 +80,7 @@ OptionsDialog::OptionsDialog(QWidget *parent) : } } - ui->unit->setModel(new BitcoinUnits(this)); + ui->unit->setModel(new TrianglesUnits(this)); /* Widget-to-option mapper */ mapper = new MonitoredDataMapper(this); @@ -113,7 +113,7 @@ 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 ("TRI") */ updateDisplayUnit(); /* warn only when language selection changes by user action (placed here so init via mapper doesn't trigger this) */ @@ -127,7 +127,8 @@ void OptionsDialog::setMapper() { /* Main */ mapper->addMapping(ui->transactionFee, OptionsModel::Fee); - mapper->addMapping(ui->bitcoinAtStartup, OptionsModel::StartAtStartup); + mapper->addMapping(ui->reserveBalance, OptionsModel::ReserveBalance); + mapper->addMapping(ui->trianglesAtStartup, OptionsModel::StartAtStartup); mapper->addMapping(ui->detachDatabases, OptionsModel::DetachDatabases); /* Network */ @@ -148,7 +149,7 @@ void OptionsDialog::setMapper() mapper->addMapping(ui->lang, OptionsModel::Language); mapper->addMapping(ui->unit, OptionsModel::DisplayUnit); mapper->addMapping(ui->displayAddresses, OptionsModel::DisplayAddresses); - mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures); + mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures); } void OptionsDialog::enableApplyButton() @@ -200,7 +201,7 @@ void OptionsDialog::showRestartWarning_Proxy() { if(!fRestartWarningDisplayed_Proxy) { - QMessageBox::warning(this, tr("Warning"), tr("This setting will take effect after restarting triangles."), QMessageBox::Ok); + QMessageBox::warning(this, tr("Warning"), tr("This setting will take effect after restarting Triangles."), QMessageBox::Ok); fRestartWarningDisplayed_Proxy = true; } } @@ -209,7 +210,7 @@ void OptionsDialog::showRestartWarning_Lang() { if(!fRestartWarningDisplayed_Lang) { - QMessageBox::warning(this, tr("Warning"), tr("This setting will take effect after restarting triangles."), QMessageBox::Ok); + QMessageBox::warning(this, tr("Warning"), tr("This setting will take effect after restarting Triangles."), QMessageBox::Ok); fRestartWarningDisplayed_Lang = true; } } diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index e394fac..e09f428 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -1,5 +1,5 @@ #include "optionsmodel.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include #include "init.h" @@ -15,7 +15,7 @@ OptionsModel::OptionsModel(QObject *parent) : bool static ApplyProxySettings() { QSettings settings; - CService addrProxy(settings.value("addrProxy", "127.0.0.1:9244").toString().toStdString()); + CService addrProxy(settings.value("addrProxy", "127.0.0.1:9050").toString().toStdString()); int nSocksVersion(settings.value("nSocksVersion", 5).toInt()); if (!settings.value("fUseProxy", false).toBool()) { addrProxy = CService(); @@ -41,15 +41,16 @@ void OptionsModel::Init() QSettings settings; // These are Qt-only settings: - nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::BTC).toInt(); + nDisplayUnit = settings.value("nDisplayUnit", TrianglesUnits::TRI).toInt(); bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool(); fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool(); fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool(); - fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool(); + fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool(); nTransactionFee = settings.value("nTransactionFee").toLongLong(); + nReserveBalance = settings.value("nReserveBalance").toLongLong(); language = settings.value("language", "").toString(); - // These are shared with core Bitcoin; we want + // These are shared with core Triangles; we want // command-line options to override the GUI settings: if (settings.contains("fUseUPnP")) SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool()); @@ -63,66 +64,6 @@ void OptionsModel::Init() SoftSetArg("-lang", language.toStdString()); } -bool OptionsModel::Upgrade() -{ - QSettings settings; - - if (settings.contains("bImportFinished")) - return false; // Already upgraded - - settings.setValue("bImportFinished", true); - - // Move settings from old wallet.dat (if any): - CWalletDB walletdb("wallet.dat"); - - QList intOptions; - intOptions << "nDisplayUnit" << "nTransactionFee"; - foreach(QString key, intOptions) - { - int value = 0; - if (walletdb.ReadSetting(key.toStdString(), value)) - { - settings.setValue(key, value); - walletdb.EraseSetting(key.toStdString()); - } - } - QList boolOptions; - boolOptions << "bDisplayAddresses" << "fMinimizeToTray" << "fMinimizeOnClose" << "fUseProxy" << "fUseUPnP"; - foreach(QString key, boolOptions) - { - bool value = false; - if (walletdb.ReadSetting(key.toStdString(), value)) - { - settings.setValue(key, value); - walletdb.EraseSetting(key.toStdString()); - } - } - try - { - CAddress addrProxyAddress; - if (walletdb.ReadSetting("addrProxy", addrProxyAddress)) - { - settings.setValue("addrProxy", addrProxyAddress.ToStringIPPort().c_str()); - walletdb.EraseSetting("addrProxy"); - } - } - catch (std::ios_base::failure &e) - { - // 0.6.0rc1 saved this as a CService, which causes failure when parsing as a CAddress - CService addrProxy; - if (walletdb.ReadSetting("addrProxy", addrProxy)) - { - settings.setValue("addrProxy", addrProxy.ToStringIPPort().c_str()); - walletdb.EraseSetting("addrProxy"); - } - } - ApplyProxySettings(); - Init(); - - return true; -} - - int OptionsModel::rowCount(const QModelIndex & parent) const { return OptionIDRowCount; @@ -157,12 +98,14 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const if (GetProxy(NET_IPV4, proxy)) return QVariant(proxy.first.GetPort()); else - return QVariant(9244); + return QVariant(9050); } case ProxySocksVersion: return settings.value("nSocksVersion", 5); case Fee: - return QVariant(nTransactionFee); + return QVariant((qint64) nTransactionFee); + case ReserveBalance: + return QVariant((qint64) nReserveBalance); case DisplayUnit: return QVariant(nDisplayUnit); case DisplayAddresses: @@ -196,8 +139,9 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in settings.setValue("fMinimizeToTray", fMinimizeToTray); break; case MapPortUPnP: - settings.setValue("fUseUPnP", value.toBool()); - MapPort(value.toBool()); + fUseUPnP = value.toBool(); + settings.setValue("fUseUPnP", fUseUPnP); + MapPort(); break; case MinimizeOnClose: fMinimizeOnClose = value.toBool(); @@ -209,7 +153,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in break; case ProxyIP: { proxyType proxy; - proxy.first = CService("127.0.0.1", 9244); + proxy.first = CService("127.0.0.1", 9050); GetProxy(NET_IPV4, proxy); CNetAddr addr(value.toString().toStdString()); @@ -220,7 +164,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in break; case ProxyPort: { proxyType proxy; - proxy.first = CService("127.0.0.1", 9244); + proxy.first = CService("127.0.0.1", 9050); GetProxy(NET_IPV4, proxy); proxy.first.SetPort(value.toInt()); @@ -240,9 +184,14 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in break; case Fee: nTransactionFee = value.toLongLong(); - settings.setValue("nTransactionFee", nTransactionFee); + settings.setValue("nTransactionFee", (qint64) nTransactionFee); emit transactionFeeChanged(nTransactionFee); break; + case ReserveBalance: + nReserveBalance = value.toLongLong(); + settings.setValue("nReserveBalance", (qint64) nReserveBalance); + emit reserveBalanceChanged(nReserveBalance); + break; case DisplayUnit: nDisplayUnit = value.toInt(); settings.setValue("nDisplayUnit", nDisplayUnit); @@ -281,11 +230,15 @@ qint64 OptionsModel::getTransactionFee() return nTransactionFee; } +qint64 OptionsModel::getReserveBalance() +{ + return nReserveBalance; +} + bool OptionsModel::getCoinControlFeatures() { - return fCoinControlFeatures; + return fCoinControlFeatures; } - bool OptionsModel::getMinimizeToTray() { diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h index 263b95e..1f89c81 100644 --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -3,7 +3,7 @@ #include -/** Interface from Qt to configuration data structure for Bitcoin client. +/** Interface from Qt to configuration data structure for Triangles client. To Qt, the options are presented as a list with the different options laid out vertically. This can be changed to a tree once the settings become sufficiently @@ -26,11 +26,12 @@ public: ProxyPort, // int ProxySocksVersion, // int Fee, // qint64 - DisplayUnit, // BitcoinUnits::Unit + ReserveBalance, // qint64 + DisplayUnit, // TrianglesUnits::Unit DisplayAddresses, // bool DetachDatabases, // bool Language, // QString - CoinControlFeatures, // bool + CoinControlFeatures, // bool OptionIDRowCount, }; @@ -45,11 +46,12 @@ public: /* Explicit getters */ qint64 getTransactionFee(); + qint64 getReserveBalance(); bool getMinimizeToTray(); bool getMinimizeOnClose(); int getDisplayUnit(); bool getDisplayAddresses(); - bool getCoinControlFeatures(); + bool getCoinControlFeatures(); QString getLanguage() { return language; } private: @@ -57,12 +59,13 @@ private: bool bDisplayAddresses; bool fMinimizeToTray; bool fMinimizeOnClose; - bool fCoinControlFeatures; + bool fCoinControlFeatures; QString language; signals: void displayUnitChanged(int unit); - void transactionFeeChanged(qint64); + void transactionFeeChanged(qint64); + void reserveBalanceChanged(qint64); void coinControlFeaturesChanged(bool); }; diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 55f358d..c7074eb 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -2,25 +2,24 @@ #include "ui_overviewpage.h" #include "walletmodel.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "optionsmodel.h" #include "transactiontablemodel.h" #include "transactionfilterproxy.h" #include "guiutil.h" #include "guiconstants.h" -#include "askpassphrasedialog.h" #include #include #define DECORATION_SIZE 64 -#define NUM_ITEMS 6 +#define NUM_ITEMS 3 class TxViewDelegate : public QAbstractItemDelegate { Q_OBJECT public: - TxViewDelegate(): QAbstractItemDelegate(), unit(BitcoinUnits::BTC) + TxViewDelegate(): QAbstractItemDelegate(), unit(TrianglesUnits::TRI) { } @@ -46,10 +45,10 @@ public: bool confirmed = index.data(TransactionTableModel::ConfirmedRole).toBool(); QVariant value = index.data(Qt::ForegroundRole); QColor foreground = option.palette.color(QPalette::Text); - if(qVariantCanConvert(value)) - { - foreground = qvariant_cast(value); - } +// if(qVariantCanConvert(value)) +// { +// foreground = qvariant_cast(value); +// } painter->setPen(foreground); painter->drawText(addressRect, Qt::AlignLeft|Qt::AlignVCenter, address); @@ -67,7 +66,7 @@ public: foreground = option.palette.color(QPalette::Text); } painter->setPen(foreground); - QString amountText = BitcoinUnits::formatWithUnit(unit, amount, true); + QString amountText = TrianglesUnits::formatWithUnit(unit, amount, true); if(!confirmed) { amountText = QString("[") + amountText + QString("]"); @@ -136,10 +135,11 @@ void OverviewPage::setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBa currentStake = stake; currentUnconfirmedBalance = unconfirmedBalance; currentImmatureBalance = immatureBalance; - ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance)); - ui->labelStake->setText(BitcoinUnits::formatWithUnit(unit, stake)); - ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(unit, unconfirmedBalance)); - ui->labelImmature->setText(BitcoinUnits::formatWithUnit(unit, immatureBalance)); + ui->labelBalance->setText(TrianglesUnits::formatWithUnit(unit, balance)); + ui->labelStake->setText(TrianglesUnits::formatWithUnit(unit, stake)); + ui->labelUnconfirmed->setText(TrianglesUnits::formatWithUnit(unit, unconfirmedBalance)); + ui->labelImmature->setText(TrianglesUnits::formatWithUnit(unit, immatureBalance)); + ui->labelTotal->setText(TrianglesUnits::formatWithUnit(unit, balance + stake + unconfirmedBalance + immatureBalance)); // only show immature (newly mined) balance if it's non-zero, so as not to complicate things // for the non-mining users @@ -148,11 +148,6 @@ void OverviewPage::setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBa ui->labelImmatureText->setVisible(showImmature); } -void OverviewPage::setNumTransactions(int count) -{ - ui->labelNumTransactions->setText(QLocale::system().toString(count)); -} - void OverviewPage::setModel(WalletModel *model) { this->model = model; @@ -164,7 +159,8 @@ void OverviewPage::setModel(WalletModel *model) filter->setLimit(NUM_ITEMS); filter->setDynamicSortFilter(true); filter->setSortRole(Qt::EditRole); - filter->sort(TransactionTableModel::Date, Qt::DescendingOrder); + filter->setShowInactive(false); + filter->sort(TransactionTableModel::Status, Qt::DescendingOrder); ui->listTransactions->setModel(filter); ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress); @@ -173,13 +169,10 @@ void OverviewPage::setModel(WalletModel *model) setBalance(model->getBalance(), model->getStake(), model->getUnconfirmedBalance(), model->getImmatureBalance()); connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64, qint64))); - setNumTransactions(model->getNumTransactions()); - connect(model, SIGNAL(numTransactionsChanged(int)), this, SLOT(setNumTransactions(int))); - connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); } - // update the display unit, to not use the default + // update the display unit, to not use the default ("TRI") updateDisplayUnit(); } diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h index 59fbb1d..5e7aa08 100644 --- a/src/qt/overviewpage.h +++ b/src/qt/overviewpage.h @@ -28,7 +28,6 @@ public: public slots: void setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBalance, qint64 immatureBalance); - void setNumTransactions(int count); signals: void transactionClicked(const QModelIndex &index); diff --git a/src/qt/plugins/mrichtexteditor/LGPL_EXCEPTION.txt b/src/qt/plugins/mrichtexteditor/LGPL_EXCEPTION.txt new file mode 100644 index 0000000..e4e581a --- /dev/null +++ b/src/qt/plugins/mrichtexteditor/LGPL_EXCEPTION.txt @@ -0,0 +1,23 @@ +Digia Qt LGPL Exception version 1.1 + +As an additional permission to the GNU Lesser General Public License version +2.1, the object code form of a "work that uses the Library" may incorporate +material from a header file that is part of the Library. You may distribute +such object code under terms of your choice, provided that: + (i) the header files of the Library have not been modified; and + (ii) the incorporated material is limited to numerical parameters, data + structure layouts, accessors, macros, inline functions and + templates; and + (iii) you comply with the terms of Section 6 of the GNU Lesser General + Public License version 2.1. + +Moreover, you may apply this exception to a modified version of the Library, +provided that such modification does not involve copying material from the +Library into the modified Library's header files unless such material is +limited to (i) numerical parameters; (ii) data structure layouts; +(iii) accessors; and (iv) small macros, templates and inline functions of +five lines or less in length. + +Furthermore, you are not required to apply this additional permission to a +modified version of the Library. + diff --git a/src/qt/plugins/mrichtexteditor/LICENSE.LGPL b/src/qt/plugins/mrichtexteditor/LICENSE.LGPL new file mode 100644 index 0000000..3e12d08 --- /dev/null +++ b/src/qt/plugins/mrichtexteditor/LICENSE.LGPL @@ -0,0 +1,505 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + + diff --git a/src/qt/plugins/mrichtexteditor/README.md b/src/qt/plugins/mrichtexteditor/README.md new file mode 100644 index 0000000..f76d7e3 --- /dev/null +++ b/src/qt/plugins/mrichtexteditor/README.md @@ -0,0 +1,11 @@ +# MRichTextEdit + +A simple Qt rich-text editor widget, easy to use in any Qt project. + +![Screenshot](https://github.com/Anchakor/MRichTextEditor/raw/master/example.png) + +The icons used are standard icons from theme as defined by [freedesktop.org Icon Naming Specification](http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html) (which lacks button/ordered list icons). + +The editor automatically converts plain text http(s) links and emails to html links in toHtml(). + +Courtesy of [Hobrasoft](http://www.hobrasoft.cz/). diff --git a/src/qt/plugins/mrichtexteditor/example.png b/src/qt/plugins/mrichtexteditor/example.png new file mode 100644 index 0000000..2bc545a Binary files /dev/null and b/src/qt/plugins/mrichtexteditor/example.png differ diff --git a/src/qt/plugins/mrichtexteditor/mrichtextedit.cpp b/src/qt/plugins/mrichtexteditor/mrichtextedit.cpp new file mode 100644 index 0000000..939b942 --- /dev/null +++ b/src/qt/plugins/mrichtexteditor/mrichtextedit.cpp @@ -0,0 +1,468 @@ +/* +** Copyright (C) 2013 Jiří Procházka (Hobrasoft) +** Contact: http://www.hobrasoft.cz/ +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file is under the terms of the GNU Lesser General Public License +** version 2.1 as published by the Free Software Foundation and appearing +** in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the +** GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +*/ + +#include "mrichtextedit.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MRichTextEdit::MRichTextEdit(QWidget *parent) : QWidget(parent) { + setupUi(this); + m_lastBlockList = 0; + f_textedit->setTabStopWidth(40); + + connect(f_textedit, SIGNAL(currentCharFormatChanged(QTextCharFormat)), + this, SLOT(slotCurrentCharFormatChanged(QTextCharFormat))); + connect(f_textedit, SIGNAL(cursorPositionChanged()), + this, SLOT(slotCursorPositionChanged())); + + m_fontsize_h1 = 18; + m_fontsize_h2 = 16; + m_fontsize_h3 = 14; + m_fontsize_h4 = 12; + + fontChanged(f_textedit->font()); + bgColorChanged(f_textedit->textColor()); + + // paragraph formatting + + m_paragraphItems << tr("Standard") + << tr("Heading 1") + << tr("Heading 2") + << tr("Heading 3") + << tr("Heading 4") + << tr("Monospace"); + f_paragraph->addItems(m_paragraphItems); + + connect(f_paragraph, SIGNAL(activated(int)), + this, SLOT(textStyle(int))); + + // undo & redo + + f_undo->setShortcut(QKeySequence::Undo); + f_redo->setShortcut(QKeySequence::Redo); + + connect(f_textedit->document(), SIGNAL(undoAvailable(bool)), + f_undo, SLOT(setEnabled(bool))); + connect(f_textedit->document(), SIGNAL(redoAvailable(bool)), + f_redo, SLOT(setEnabled(bool))); + + f_undo->setEnabled(f_textedit->document()->isUndoAvailable()); + f_redo->setEnabled(f_textedit->document()->isRedoAvailable()); + + connect(f_undo, SIGNAL(clicked()), f_textedit, SLOT(undo())); + connect(f_redo, SIGNAL(clicked()), f_textedit, SLOT(redo())); + + // cut, copy & paste + + f_cut->setShortcut(QKeySequence::Cut); + f_copy->setShortcut(QKeySequence::Copy); + f_paste->setShortcut(QKeySequence::Paste); + + f_cut->setEnabled(false); + f_copy->setEnabled(false); + + connect(f_cut, SIGNAL(clicked()), f_textedit, SLOT(cut())); + connect(f_copy, SIGNAL(clicked()), f_textedit, SLOT(copy())); + connect(f_paste, SIGNAL(clicked()), f_textedit, SLOT(paste())); + + connect(f_textedit, SIGNAL(copyAvailable(bool)), f_cut, SLOT(setEnabled(bool))); + connect(f_textedit, SIGNAL(copyAvailable(bool)), f_copy, SLOT(setEnabled(bool))); + +#ifndef QT_NO_CLIPBOARD + connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(slotClipboardDataChanged())); +#endif + + // link + + f_link->setShortcut(Qt::CTRL + Qt::Key_L); + + connect(f_link, SIGNAL(clicked(bool)), this, SLOT(textLink(bool))); + + // bold, italic & underline + + f_bold->setShortcut(Qt::CTRL + Qt::Key_B); + f_italic->setShortcut(Qt::CTRL + Qt::Key_I); + f_underline->setShortcut(Qt::CTRL + Qt::Key_U); + + connect(f_bold, SIGNAL(clicked()), this, SLOT(textBold())); + connect(f_italic, SIGNAL(clicked()), this, SLOT(textItalic())); + connect(f_underline, SIGNAL(clicked()), this, SLOT(textUnderline())); + connect(f_strikeout, SIGNAL(clicked()), this, SLOT(textStrikeout())); + + // lists + + f_list_bullet->setShortcut(Qt::CTRL + Qt::Key_Minus); + f_list_ordered->setShortcut(Qt::CTRL + Qt::Key_Equal); + + connect(f_list_bullet, SIGNAL(clicked(bool)), this, SLOT(listBullet(bool))); + connect(f_list_ordered, SIGNAL(clicked(bool)), this, SLOT(listOrdered(bool))); + + // indentation + + f_indent_dec->setShortcut(Qt::CTRL + Qt::Key_Comma); + f_indent_inc->setShortcut(Qt::CTRL + Qt::Key_Period); + + connect(f_indent_inc, SIGNAL(clicked()), this, SLOT(increaseIndentation())); + connect(f_indent_dec, SIGNAL(clicked()), this, SLOT(decreaseIndentation())); + + // font size + + QFontDatabase db; + foreach(int size, db.standardSizes()) + f_fontsize->addItem(QString::number(size)); + + connect(f_fontsize, SIGNAL(activated(QString)), + this, SLOT(textSize(QString))); + f_fontsize->setCurrentIndex(f_fontsize->findText(QString::number(QApplication::font() + .pointSize()))); + + // text background color + + QPixmap pix(16, 16); + pix.fill(QApplication::palette().background().color()); + f_bgcolor->setIcon(pix); + + connect(f_bgcolor, SIGNAL(clicked()), this, SLOT(textBgColor())); + + // images + //connect(f_image, SIGNAL(clicked()), this, SLOT(insertImage())); +} + +void MRichTextEdit::textBold() { + QTextCharFormat fmt; + fmt.setFontWeight(f_bold->isChecked() ? QFont::Bold : QFont::Normal); + mergeFormatOnWordOrSelection(fmt); +} + + +void MRichTextEdit::focusInEvent(QFocusEvent *) { + f_textedit->setFocus(Qt::TabFocusReason); +} + + +void MRichTextEdit::textUnderline() { + QTextCharFormat fmt; + fmt.setFontUnderline(f_underline->isChecked()); + mergeFormatOnWordOrSelection(fmt); +} + +void MRichTextEdit::textItalic() { + QTextCharFormat fmt; + fmt.setFontItalic(f_italic->isChecked()); + mergeFormatOnWordOrSelection(fmt); +} + +void MRichTextEdit::textStrikeout() { + QTextCharFormat fmt; + fmt.setFontStrikeOut(f_strikeout->isChecked()); + mergeFormatOnWordOrSelection(fmt); +} + +void MRichTextEdit::textSize(const QString &p) { + qreal pointSize = p.toFloat(); + if (p.toFloat() > 0) { + QTextCharFormat fmt; + fmt.setFontPointSize(pointSize); + mergeFormatOnWordOrSelection(fmt); + } +} + +void MRichTextEdit::textLink(bool checked) { + bool unlink = false; + QTextCharFormat fmt; + if (checked) { + QString url = f_textedit->currentCharFormat().anchorHref(); + bool ok; + QString newUrl = QInputDialog::getText(this, tr("Create a link"), + tr("Link URL:"), QLineEdit::Normal, + url, + &ok); + if (ok) { + fmt.setAnchor(true); + fmt.setAnchorHref(newUrl); + fmt.setForeground(QApplication::palette().color(QPalette::Link)); + fmt.setFontUnderline(true); + } else { + unlink = true; + } + } else { + unlink = true; + } + if (unlink) { + fmt.setAnchor(false); + fmt.setForeground(QApplication::palette().color(QPalette::Text)); + fmt.setFontUnderline(false); + } + mergeFormatOnWordOrSelection(fmt); +} + +void MRichTextEdit::textStyle(int index) { + QTextCursor cursor = f_textedit->textCursor(); + cursor.beginEditBlock(); + + // standard + if (!cursor.hasSelection()) { + cursor.select(QTextCursor::BlockUnderCursor); + } + QTextCharFormat fmt; + cursor.setCharFormat(fmt); + f_textedit->setCurrentCharFormat(fmt); + + if (index == ParagraphHeading1 + || index == ParagraphHeading2 + || index == ParagraphHeading3 + || index == ParagraphHeading4 ) { + if (index == ParagraphHeading1) { + fmt.setFontPointSize(m_fontsize_h1); + } + if (index == ParagraphHeading2) { + fmt.setFontPointSize(m_fontsize_h2); + } + if (index == ParagraphHeading3) { + fmt.setFontPointSize(m_fontsize_h3); + } + if (index == ParagraphHeading4) { + fmt.setFontPointSize(m_fontsize_h4); + } + if (index == ParagraphHeading2 || index == ParagraphHeading4) { + fmt.setFontItalic(true); + } + + fmt.setFontWeight(QFont::Bold); + } + if (index == ParagraphMonospace) { + fmt = cursor.charFormat(); + fmt.setFontFamily("Monospace"); + fmt.setFontStyleHint(QFont::Monospace); + fmt.setFontFixedPitch(true); + } + cursor.setCharFormat(fmt); + f_textedit->setCurrentCharFormat(fmt); + + cursor.endEditBlock(); +} + +void MRichTextEdit::textBgColor() { + QColor col = QColorDialog::getColor(f_textedit->textBackgroundColor(), this); + QTextCursor cursor = f_textedit->textCursor(); + if (!cursor.hasSelection()) { + cursor.select(QTextCursor::WordUnderCursor); + } + QTextCharFormat fmt = cursor.charFormat(); + if (col.isValid()) { + fmt.setBackground(col); + } else { + fmt.clearBackground(); + } + cursor.setCharFormat(fmt); + f_textedit->setCurrentCharFormat(fmt); + bgColorChanged(col); +} + +void MRichTextEdit::listBullet(bool checked) { + if (checked) { + f_list_ordered->setChecked(false); + } + list(checked, QTextListFormat::ListDisc); +} + +void MRichTextEdit::listOrdered(bool checked) { + if (checked) { + f_list_bullet->setChecked(false); + } + list(checked, QTextListFormat::ListDecimal); +} + +void MRichTextEdit::list(bool checked, QTextListFormat::Style style) { + QTextCursor cursor = f_textedit->textCursor(); + cursor.beginEditBlock(); + if (!checked) { + QTextBlockFormat obfmt = cursor.blockFormat(); + QTextBlockFormat bfmt; + bfmt.setIndent(obfmt.indent()); + cursor.setBlockFormat(bfmt); + } else { + QTextListFormat listFmt; + if (cursor.currentList()) { + listFmt = cursor.currentList()->format(); + } + listFmt.setStyle(style); + cursor.createList(listFmt); + } + cursor.endEditBlock(); +} + +void MRichTextEdit::mergeFormatOnWordOrSelection(const QTextCharFormat &format) { + QTextCursor cursor = f_textedit->textCursor(); + if (!cursor.hasSelection()) { + cursor.select(QTextCursor::WordUnderCursor); + } + cursor.mergeCharFormat(format); + f_textedit->mergeCurrentCharFormat(format); +} + +void MRichTextEdit::slotCursorPositionChanged() { + QTextList *l = f_textedit->textCursor().currentList(); + if (m_lastBlockList && (l == m_lastBlockList || (l != 0 && m_lastBlockList != 0 + && l->format().style() == m_lastBlockList->format().style()))) { + return; + } + m_lastBlockList = l; + if (l) { + QTextListFormat lfmt = l->format(); + if (lfmt.style() == QTextListFormat::ListDisc) { + f_list_bullet->setChecked(true); + f_list_ordered->setChecked(false); + } else if (lfmt.style() == QTextListFormat::ListDecimal) { + f_list_bullet->setChecked(false); + f_list_ordered->setChecked(true); + } else { + f_list_bullet->setChecked(false); + f_list_ordered->setChecked(false); + } + } else { + f_list_bullet->setChecked(false); + f_list_ordered->setChecked(false); + } +} + +void MRichTextEdit::fontChanged(const QFont &f) { + f_fontsize->setCurrentIndex(f_fontsize->findText(QString::number(f.pointSize()))); + f_bold->setChecked(f.bold()); + f_italic->setChecked(f.italic()); + f_underline->setChecked(f.underline()); + f_strikeout->setChecked(f.strikeOut()); + if (f.pointSize() == m_fontsize_h1) { + f_paragraph->setCurrentIndex(ParagraphHeading1); + } else if (f.pointSize() == m_fontsize_h2) { + f_paragraph->setCurrentIndex(ParagraphHeading2); + } else if (f.pointSize() == m_fontsize_h3) { + f_paragraph->setCurrentIndex(ParagraphHeading3); + } else if (f.pointSize() == m_fontsize_h4) { + f_paragraph->setCurrentIndex(ParagraphHeading4); + } else { + if (f.fixedPitch() && f.family() == "Monospace") { + f_paragraph->setCurrentIndex(ParagraphMonospace); + } else { + f_paragraph->setCurrentIndex(ParagraphStandard); + } + } + if (f_textedit->textCursor().currentList()) { + QTextListFormat lfmt = f_textedit->textCursor().currentList()->format(); + if (lfmt.style() == QTextListFormat::ListDisc) { + f_list_bullet->setChecked(true); + f_list_ordered->setChecked(false); + } else if (lfmt.style() == QTextListFormat::ListDecimal) { + f_list_bullet->setChecked(false); + f_list_ordered->setChecked(true); + } else { + f_list_bullet->setChecked(false); + f_list_ordered->setChecked(false); + } + } else { + f_list_bullet->setChecked(false); + f_list_ordered->setChecked(false); + } +} + +void MRichTextEdit::bgColorChanged(const QColor &c) { + QPixmap pix(16, 16); + if (c.isValid()) { + pix.fill(c); + } else { + pix.fill(QApplication::palette().background().color()); + } + f_bgcolor->setIcon(pix); +} + +void MRichTextEdit::slotCurrentCharFormatChanged(const QTextCharFormat &format) { + fontChanged(format.font()); + bgColorChanged((format.background().isOpaque()) ? format.background().color() : QColor()); + f_link->setChecked(format.isAnchor()); +} + +void MRichTextEdit::slotClipboardDataChanged() { +#ifndef QT_NO_CLIPBOARD + if (const QMimeData *md = QApplication::clipboard()->mimeData()) + f_paste->setEnabled(md->hasText()); +#endif +} + +QString MRichTextEdit::toHtml() const { + QString s = f_textedit->toHtml(); + // convert emails to links + s = s.replace(QRegExp("(<[^a][^>]+>(?:]+>)?|\\s)([a-zA-Z\\d]+@[a-zA-Z\\d]+\\.[a-zA-Z]+)"), "\\1\\2"); + // convert links + s = s.replace(QRegExp("(<[^a][^>]+>(?:]+>)?|\\s)((?:https?|ftp|file)://[^\\s'\"<>]+)"), "\\1\\2"); + // see also: Utils::linkify() + return s; +} + +void MRichTextEdit::increaseIndentation() { + indent(+1); +} + +void MRichTextEdit::decreaseIndentation() { + indent(-1); +} + +void MRichTextEdit::indent(int delta) { + QTextCursor cursor = f_textedit->textCursor(); + cursor.beginEditBlock(); + QTextBlockFormat bfmt = cursor.blockFormat(); + int ind = bfmt.indent(); + if (ind + delta >= 0) { + bfmt.setIndent(ind + delta); + } + cursor.setBlockFormat(bfmt); + cursor.endEditBlock(); +} + +void MRichTextEdit::setText(const QString& text) { + if (text.isEmpty()) { + setPlainText(text); + return; + } + if (text[0] == '<') { + setHtml(text); + } else { + setPlainText(text); + } +} + +void MRichTextEdit::clear() { + f_textedit->clear(); +} + + diff --git a/src/qt/plugins/mrichtexteditor/mrichtextedit.h b/src/qt/plugins/mrichtexteditor/mrichtextedit.h new file mode 100644 index 0000000..24e3fbb --- /dev/null +++ b/src/qt/plugins/mrichtexteditor/mrichtextedit.h @@ -0,0 +1,92 @@ +/* +** Copyright (C) 2013 Jiří Procházka (Hobrasoft) +** Contact: http://www.hobrasoft.cz/ +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file is under the terms of the GNU Lesser General Public License +** version 2.1 as published by the Free Software Foundation and appearing +** in the file LICENSE.LGPL included in the packaging of this file. +** Please review the following information to ensure the +** GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +*/ + +#ifndef _MRICHTEXTEDIT_H_ +#define _MRICHTEXTEDIT_H_ + +#include +#include "ui_mrichtextedit.h" + +/** + * @Brief A simple rich-text editor + */ +class MRichTextEdit : public QWidget, protected Ui::MRichTextEdit { + Q_OBJECT + public: + MRichTextEdit(QWidget *parent = 0); + + QString toPlainText() const { return f_textedit->toPlainText(); } + QString toHtml() const; + QTextDocument *document() { return f_textedit->document(); } + QTextCursor textCursor() const { return f_textedit->textCursor(); } + void setTextCursor(const QTextCursor& cursor) { f_textedit->setTextCursor(cursor); } + + + public slots: + void setText(const QString &text); + void clear(); + + protected slots: + void setPlainText(const QString &text) { f_textedit->setPlainText(text); } + void setHtml(const QString &text) { f_textedit->setHtml(text); } + void textBold(); + void textUnderline(); + void textStrikeout(); + void textItalic(); + void textSize(const QString &p); + void textLink(bool checked); + void textStyle(int index); + void textBgColor(); + void listBullet(bool checked); + void listOrdered(bool checked); + void slotCurrentCharFormatChanged(const QTextCharFormat &format); + void slotCursorPositionChanged(); + void slotClipboardDataChanged(); + void increaseIndentation(); + void decreaseIndentation(); + + protected: + void mergeFormatOnWordOrSelection(const QTextCharFormat &format); + void fontChanged(const QFont &f); + void bgColorChanged(const QColor &c); + void list(bool checked, QTextListFormat::Style style); + void indent(int delta); + void focusInEvent(QFocusEvent *event); + + QStringList m_paragraphItems; + int m_fontsize_h1; + int m_fontsize_h2; + int m_fontsize_h3; + int m_fontsize_h4; + + enum ParagraphItems { ParagraphStandard = 0, + ParagraphHeading1, + ParagraphHeading2, + ParagraphHeading3, + ParagraphHeading4, + ParagraphMonospace }; + + QPointer m_lastBlockList; +}; + +#endif diff --git a/src/qt/plugins/mrichtexteditor/mrichtextedit.ui b/src/qt/plugins/mrichtexteditor/mrichtextedit.ui new file mode 100644 index 0000000..50c5c42 --- /dev/null +++ b/src/qt/plugins/mrichtexteditor/mrichtextedit.ui @@ -0,0 +1,538 @@ + + + MRichTextEdit + + + + 0 + 0 + 819 + 312 + + + + + + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + + + + 2 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::ClickFocus + + + Paragraph formatting + + + true + + + + + + + Qt::Vertical + + + + + + + false + + + Qt::ClickFocus + + + Undo (CTRL+Z) + + + Undo + + + + + + + + + 16 + 16 + + + + + + + + false + + + Qt::ClickFocus + + + Redo + + + Redo + + + + + + + + + 16 + 16 + + + + + + + + Qt::ClickFocus + + + Cut (CTRL+X) + + + Cut + + + + + + + + + 16 + 16 + + + + + + + + Qt::ClickFocus + + + Copy (CTRL+C) + + + Copy + + + + + + + + + 16 + 16 + + + + + + + + Qt::ClickFocus + + + Paste (CTRL+V) + + + Paste + + + + + + + + + 16 + 16 + + + + + + + + Qt::Vertical + + + + + + + Qt::ClickFocus + + + Link (CTRL+L) + + + Link + + + + + + + + + 16 + 16 + + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::ClickFocus + + + Bold (CTRL+B) + + + Bold + + + + + + + + + 16 + 16 + + + + true + + + + + + + Qt::ClickFocus + + + Italic (CTRL+I) + + + Italic + + + + + + + + + 16 + 16 + + + + true + + + + + + + Qt::ClickFocus + + + Underline (CTRL+U) + + + Underline + + + + + + + + + 16 + 16 + + + + true + + + + + + + Strike Out + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::ClickFocus + + + Bullet list (CTRL+-) + + + Bullet list + + + + 16 + 16 + + + + true + + + + + + + Qt::ClickFocus + + + Ordered list (CTRL+=) + + + Ordered list + + + + 16 + 16 + + + + true + + + + + + + Qt::ClickFocus + + + Decrease indentation (CTRL+,) + + + Decrease indentation + + + + + + + + + 16 + 16 + + + + + + + + Qt::ClickFocus + + + Increase indentation (CTRL+.) + + + Increase indentation + + + + + + + + + 16 + 16 + + + + + + + + Qt::Vertical + + + + + + + + 16 + 16 + + + + + 16 + 16 + + + + Qt::ClickFocus + + + Text background color + + + . + + + + 16 + 16 + + + + + + + + Qt::ClickFocus + + + Font size + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + f_paragraph + line_4 + f_undo + f_redo + f_cut + f_copy + f_paste + line + f_link + line_3 + f_italic + f_underline + line_2 + f_fontsize + line_5 + f_list_bullet + f_list_ordered + f_indent_dec + f_indent_inc + f_bold + f_bgcolor + f_strikeout + line_6 + + + + + + QTextEdit::AutoNone + + + true + + + + + + + + diff --git a/src/qt/qrcodedialog.cpp b/src/qt/qrcodedialog.cpp index fc055d4..c4a54bd 100644 --- a/src/qt/qrcodedialog.cpp +++ b/src/qt/qrcodedialog.cpp @@ -1,7 +1,7 @@ #include "qrcodedialog.h" #include "ui_qrcodedialog.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "guiconstants.h" #include "guiutil.h" #include "optionsmodel.h" @@ -44,7 +44,7 @@ void QRCodeDialog::setModel(OptionsModel *model) if (model) connect(model, SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); - // update the display unit, to not use the default ("BTC") + // update the display unit, to not use the default ("TRI") updateDisplayUnit(); } @@ -83,7 +83,7 @@ void QRCodeDialog::genCode() QString QRCodeDialog::getURI() { - QString ret = QString("triangle:%1").arg(address); + QString ret = QString("Triangles:%1").arg(address); int paramCount = 0; ui->outUri->clear(); @@ -92,8 +92,8 @@ QString QRCodeDialog::getURI() { if (ui->lnReqAmount->validate()) { - // even if we allow a non BTC unit input in lnReqAmount, we generate the URI with BTC as unit (as defined in BIP21) - ret += QString("?amount=%1").arg(BitcoinUnits::format(BitcoinUnits::BTC, ui->lnReqAmount->value())); + // even if we allow a non TRI unit input in lnReqAmount, we generate the URI with TRI as unit (as defined in BIP21) + ret += QString("?amount=%1").arg(TrianglesUnits::format(TrianglesUnits::TRI, ui->lnReqAmount->value())); paramCount++; } else diff --git a/src/qt/qtipcserver.cpp b/src/qt/qtipcserver.cpp index b26c375..39acff2 100644 --- a/src/qt/qtipcserver.cpp +++ b/src/qt/qtipcserver.cpp @@ -42,11 +42,11 @@ static bool ipcScanCmd(int argc, char *argv[], bool fRelay) bool fSent = false; for (int i = 1; i < argc; i++) { - if (boost::algorithm::istarts_with(argv[i], "bitcoin:")) + if (boost::algorithm::istarts_with(argv[i], "Triangles:")) { const char *strURI = argv[i]; try { - boost::interprocess::message_queue mq(boost::interprocess::open_only, BITCOINURI_QUEUE_NAME); + boost::interprocess::message_queue mq(boost::interprocess::open_only, TRIANGLESURI_QUEUE_NAME); if (mq.try_send(strURI, strlen(strURI), 0)) fSent = true; else if (fRelay) @@ -75,7 +75,7 @@ void ipcScanRelay(int argc, char *argv[]) static void ipcThread(void* pArg) { // Make this thread recognisable as the GUI-IPC thread - RenameThread("bitcoin-gui-ipc"); + RenameThread("Triangles-gui-ipc"); try { @@ -98,13 +98,13 @@ static void ipcThread2(void* pArg) size_t nSize = 0; unsigned int nPriority = 0; - loop + while (true) { ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(100); if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d)) { uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize)); - Sleep(1000); + MilliSleep(1000); } if (fShutdown) @@ -112,7 +112,7 @@ static void ipcThread2(void* pArg) } // Remove message queue - message_queue::remove(BITCOINURI_QUEUE_NAME); + message_queue::remove(TRIANGLESURI_QUEUE_NAME); // Cleanup allocated memory delete mq; } @@ -125,9 +125,9 @@ void ipcInit(int argc, char *argv[]) unsigned int nPriority = 0; try { - mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH); + mq = new message_queue(open_or_create, TRIANGLESURI_QUEUE_NAME, 2, MAX_URI_LENGTH); - // Make sure we don't lose any bitcoin: URIs + // Make sure we don't lose any Triangles: URIs for (int i = 0; i < 2; i++) { ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(1); @@ -139,11 +139,11 @@ void ipcInit(int argc, char *argv[]) break; } - // Make sure only one bitcoin instance is listening - message_queue::remove(BITCOINURI_QUEUE_NAME); + // Make sure only one Triangles instance is listening + message_queue::remove(TRIANGLESURI_QUEUE_NAME); delete mq; - mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH); + mq = new message_queue(open_or_create, TRIANGLESURI_QUEUE_NAME, 2, MAX_URI_LENGTH); } catch (interprocess_exception &ex) { printf("ipcInit() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what()); diff --git a/src/qt/qtipcserver.h b/src/qt/qtipcserver.h index cccf200..93f3949 100644 --- a/src/qt/qtipcserver.h +++ b/src/qt/qtipcserver.h @@ -1,8 +1,8 @@ #ifndef QTIPCSERVER_H #define QTIPCSERVER_H -// Define Bitcoin-Qt message queue name -#define BITCOINURI_QUEUE_NAME "BitcoinURI" +// Define Triangles-Qt message queue name +#define TRIANGLESURI_QUEUE_NAME "TrianglesURI" void ipcScanRelay(int argc, char *argv[]); void ipcInit(int argc, char *argv[]); diff --git a/src/qt/qvalidatedtextedit.cpp b/src/qt/qvalidatedtextedit.cpp new file mode 100644 index 0000000..c0cb83b --- /dev/null +++ b/src/qt/qvalidatedtextedit.cpp @@ -0,0 +1,44 @@ +#include "qvalidatedtextedit.h" + +#include "guiconstants.h" + +#include +QValidatedTextEdit::QValidatedTextEdit(QWidget *parent) : + QPlainTextEdit(parent), valid(true) +{} + +void QValidatedTextEdit::setValid(bool valid) +{ + setStyleSheet(valid ? "" : STYLE_INVALID); + + if(valid) + { + if(toPlainText() == this->errorText) + setPlainText(""); + } + else if(toPlainText() == "") + setPlainText(this->errorText); +} + +void QValidatedTextEdit::setErrorText(QString errorText) +{ + this->errorText = errorText; +} + +void QValidatedTextEdit::focusInEvent(QFocusEvent *evt) +{ + // Clear invalid flag on focus + setValid(true); + QPlainTextEdit::focusInEvent(evt); +} + +void QValidatedTextEdit::markValid() +{ + setValid(true); +} + +void QValidatedTextEdit::clear() +{ + setValid(true); + QPlainTextEdit::clear(); +} diff --git a/src/qt/qvalidatedtextedit.h b/src/qt/qvalidatedtextedit.h new file mode 100644 index 0000000..f1039e5 --- /dev/null +++ b/src/qt/qvalidatedtextedit.h @@ -0,0 +1,31 @@ +#ifndef QVALIDATEDTEXTEDIT_H +#define QVALIDATEDTEXTEDIT_H + +#include + +/** Text edit that can be marked as "invalid" to show input validation feedback. When marked as invalid, + it will get a red background until it is focused. + */ +class QValidatedTextEdit : public QPlainTextEdit +{ + Q_OBJECT +public: + explicit QValidatedTextEdit(QWidget *parent = 0); + void clear(); + +protected: + void focusInEvent(QFocusEvent *evt); + +private: + bool valid; + QString errorText; + +public slots: + void setValid(bool valid); + void setErrorText(QString errorText); + +private slots: + void markValid(); +}; + +#endif // QVALIDATEDTEXTEDIT_H diff --git a/src/qt/res/.!37041!icons.zip b/src/qt/res/.!37041!icons.zip deleted file mode 100644 index 2400e38..0000000 --- a/src/qt/res/.!37041!icons.zip +++ /dev/null @@ -1 +0,0 @@ -PK diff --git a/src/qt/res/.!37364!icons.zip b/src/qt/res/.!37364!icons.zip deleted file mode 100644 index 2400e38..0000000 --- a/src/qt/res/.!37364!icons.zip +++ /dev/null @@ -1 +0,0 @@ -PK diff --git a/src/qt/res/icons/bitcoin.icns b/src/qt/res/icons/bitcoin.icns deleted file mode 100644 index 6422dfa..0000000 Binary files a/src/qt/res/icons/bitcoin.icns and /dev/null differ diff --git a/src/qt/res/icons/bitcoin.png b/src/qt/res/icons/bitcoin.png deleted file mode 100644 index b76083e..0000000 Binary files a/src/qt/res/icons/bitcoin.png and /dev/null differ diff --git a/src/qt/res/icons/bitcoin_testnet.png b/src/qt/res/icons/bitcoin_testnet.png deleted file mode 100644 index b76083e..0000000 Binary files a/src/qt/res/icons/bitcoin_testnet.png and /dev/null differ diff --git a/src/qt/res/icons/mining.png b/src/qt/res/icons/mining.png deleted file mode 100644 index e8fbccf..0000000 Binary files a/src/qt/res/icons/mining.png and /dev/null differ diff --git a/src/qt/res/icons/mining_active.png b/src/qt/res/icons/mining_active.png deleted file mode 100644 index e8fbccf..0000000 Binary files a/src/qt/res/icons/mining_active.png and /dev/null differ diff --git a/src/qt/res/icons/mining_inactive.png b/src/qt/res/icons/mining_inactive.png deleted file mode 100644 index a7afe66..0000000 Binary files a/src/qt/res/icons/mining_inactive.png and /dev/null differ diff --git a/src/qt/res/icons/staking_off.png b/src/qt/res/icons/staking_off.png index 91e570e..d9df29b 100644 Binary files a/src/qt/res/icons/staking_off.png and b/src/qt/res/icons/staking_off.png differ diff --git a/src/qt/res/icons/staking_on.png b/src/qt/res/icons/staking_on.png index 1a5e8c2..fa196f3 100644 Binary files a/src/qt/res/icons/staking_on.png and b/src/qt/res/icons/staking_on.png differ diff --git a/src/qt/res/icons/triangles-128.png b/src/qt/res/icons/triangles-128.png index b76083e..57fc6c4 100644 Binary files a/src/qt/res/icons/triangles-128.png and b/src/qt/res/icons/triangles-128.png differ diff --git a/src/qt/res/icons/triangles-16.png b/src/qt/res/icons/triangles-16.png index e8fbccf..fa196f3 100644 Binary files a/src/qt/res/icons/triangles-16.png and b/src/qt/res/icons/triangles-16.png differ diff --git a/src/qt/res/icons/triangles-32.png b/src/qt/res/icons/triangles-32.png new file mode 100644 index 0000000..59ae10a Binary files /dev/null and b/src/qt/res/icons/triangles-32.png differ diff --git a/src/qt/res/icons/triangles.icns b/src/qt/res/icons/triangles.icns deleted file mode 100644 index 6422dfa..0000000 Binary files a/src/qt/res/icons/triangles.icns and /dev/null differ diff --git a/src/qt/res/icons/triangles.png b/src/qt/res/icons/triangles.png index 4ff9c76..781f95a 100644 Binary files a/src/qt/res/icons/triangles.png and b/src/qt/res/icons/triangles.png differ diff --git a/src/qt/res/icons/triangles_testnet.ico b/src/qt/res/icons/triangles_testnet.ico new file mode 100644 index 0000000..f116b39 Binary files /dev/null and b/src/qt/res/icons/triangles_testnet.ico differ diff --git a/src/qt/res/icons/triangles_testnet.png b/src/qt/res/icons/triangles_testnet.png new file mode 100644 index 0000000..781f95a Binary files /dev/null and b/src/qt/res/icons/triangles_testnet.png differ diff --git a/src/qt/res/images/about.png b/src/qt/res/images/about.png index 4ff9c76..fc1881f 100644 Binary files a/src/qt/res/images/about.png and b/src/qt/res/images/about.png differ diff --git a/src/qt/res/images/splash_testnet.png b/src/qt/res/images/splash_testnet.png new file mode 100644 index 0000000..4ff9c76 Binary files /dev/null and b/src/qt/res/images/splash_testnet.png differ diff --git a/src/qt/res/movies/update_spinner.mng b/src/qt/res/movies/update_spinner.mng index 7df3baa..0e0b4a7 100644 Binary files a/src/qt/res/movies/update_spinner.mng and b/src/qt/res/movies/update_spinner.mng differ diff --git a/src/qt/res/src/inout.svg b/src/qt/res/src/inout.svg index bfab8ef..cf50509 100644 --- a/src/qt/res/src/inout.svg +++ b/src/qt/res/src/inout.svg @@ -15,7 +15,7 @@ width="120" height="120" sodipodi:docname="inout3.svg" - inkscape:export-filename="/home/orion/projects2/bitcoin/tx_mined.png" + inkscape:export-filename="/home/orion/projects2/triangles/tx_mined.png" inkscape:export-xdpi="12" inkscape:export-ydpi="12" style="display:inline"> diff --git a/src/qt/res/src/questionmark.svg b/src/qt/res/src/questionmark.svg index c03c159..4994ff2 100644 --- a/src/qt/res/src/questionmark.svg +++ b/src/qt/res/src/questionmark.svg @@ -16,7 +16,7 @@ version="1.1" inkscape:version="0.48.0 r9654" sodipodi:docname="questionmark.svg" - inkscape:export-filename="/store/orion/projects/bitcoin/questionmark.png" + inkscape:export-filename="/store/orion/projects/triangles/questionmark.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> diff --git a/src/qt/res/bitcoin-qt.rc b/src/qt/res/triangles-qt.rc similarity index 75% rename from src/qt/res/bitcoin-qt.rc rename to src/qt/res/triangles-qt.rc index 1c39874..f196288 100644 --- a/src/qt/res/bitcoin-qt.rc +++ b/src/qt/res/triangles-qt.rc @@ -18,14 +18,14 @@ BEGIN BEGIN BLOCK "040904E4" // U.S. English - multilingual (hex) BEGIN - VALUE "CompanyName", "triangles" - VALUE "FileDescription", "triangles-qt (OSS GUI client for triangles)" + VALUE "CompanyName", "Triangles" + VALUE "FileDescription", "Triangles-Qt (OSS GUI client for Triangles)" VALUE "FileVersion", VER_FILEVERSION_STR - VALUE "InternalName", "triangles-qt" - VALUE "LegalCopyright", "2009-2012 The Bitcoin developers, 2012-2013 The triangles & PPCoin developers" + VALUE "InternalName", "Triangles-qt" + VALUE "LegalCopyright", "2009-2014 The Bitcoin developers, 2012-2014 PPCoin developers, 2014 Triangles Team" VALUE "LegalTrademarks1", "Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php." - VALUE "OriginalFilename", "triangles-qt.exe" - VALUE "ProductName", "triangles-qt" + VALUE "OriginalFilename", "triangled-qt.exe" + VALUE "ProductName", "Triangles-Qt" VALUE "ProductVersion", VER_PRODUCTVERSION_STR END END diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index d4e3e4a..eb1486a 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -2,7 +2,7 @@ #include "ui_rpcconsole.h" #include "clientmodel.h" -#include "bitcoinrpc.h" +#include "trianglesrpc.h" #include "guiutil.h" #include @@ -312,7 +312,7 @@ void RPCConsole::clear() "b { color: #006060; } " ); - message(CMD_REPLY, (tr("Welcome to the triangles RPC console.") + "
" + + message(CMD_REPLY, (tr("Welcome to the Triangles RPC console.") + "
" + tr("Use up and down arrows to navigate history, and Ctrl-L to clear screen.") + "
" + tr("Type help for an overview of available commands.")), true); } diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index 3c38b4b..052f8fc 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -8,7 +8,7 @@ namespace Ui { } class ClientModel; -/** Local Bitcoin RPC console. */ +/** Local Triangles RPC console. */ class RPCConsole: public QDialog { Q_OBJECT @@ -35,7 +35,7 @@ private slots: void on_tabWidget_currentChanged(int index); /** open the debug.log from the current datadir */ void on_openDebugLogfileButton_clicked(); - /** display messagebox with program parameters (same as bitcoin-qt --help) */ + /** display messagebox with program parameters (same as triangles-qt --help) */ void on_showCLOptionsButton_clicked(); public slots: diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index bdcc388..7ab8639 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -1,15 +1,18 @@ #include "sendcoinsdialog.h" #include "ui_sendcoinsdialog.h" + #include "init.h" #include "walletmodel.h" #include "addresstablemodel.h" #include "addressbookpage.h" -#include "bitcoinunits.h" + +#include "trianglesunits.h" #include "addressbookpage.h" #include "optionsmodel.h" #include "sendcoinsentry.h" #include "guiutil.h" #include "askpassphrasedialog.h" + #include "coincontrol.h" #include "coincontroldialog.h" @@ -33,47 +36,47 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) : #endif #if QT_VERSION >= 0x040700 - /* Do not move this to the XML file, Qt before 4.7 will choke on it */ - ui->lineEditCoinControlChange->setPlaceholderText(tr("Enter a Triangles address (e.g. TrXW1RKLDe8VMNwTwLwSiKuATN5M74EL85)")); + /* Do not move this to the XML file, Qt before 4.7 will choke on it */ + ui->lineEditCoinControlChange->setPlaceholderText(tr("Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm)")); #endif addEntry(); connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addEntry())); connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear())); - - // Coin Control - ui->lineEditCoinControlChange->setFont(GUIUtil::bitcoinAddressFont()); - connect(ui->pushButtonCoinControl, SIGNAL(clicked()), this, SLOT(coinControlButtonClicked())); - connect(ui->checkBoxCoinControlChange, SIGNAL(stateChanged(int)), this, SLOT(coinControlChangeChecked(int))); - connect(ui->lineEditCoinControlChange, SIGNAL(textEdited(const QString &)), this, SLOT(coinControlChangeEdited(const QString &))); - - // Coin Control: clipboard actions - QAction *clipboardQuantityAction = new QAction(tr("Copy quantity"), this); - QAction *clipboardAmountAction = new QAction(tr("Copy amount"), this); - QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this); - QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this); - QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this); - QAction *clipboardPriorityAction = new QAction(tr("Copy priority"), this); - QAction *clipboardLowOutputAction = new QAction(tr("Copy low output"), this); - QAction *clipboardChangeAction = new QAction(tr("Copy change"), this); - connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardQuantity())); - connect(clipboardAmountAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAmount())); - connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardFee())); - connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAfterFee())); - connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardBytes())); - connect(clipboardPriorityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardPriority())); - connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardLowOutput())); - connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardChange())); - ui->labelCoinControlQuantity->addAction(clipboardQuantityAction); - ui->labelCoinControlAmount->addAction(clipboardAmountAction); - ui->labelCoinControlFee->addAction(clipboardFeeAction); - ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction); - ui->labelCoinControlBytes->addAction(clipboardBytesAction); - ui->labelCoinControlPriority->addAction(clipboardPriorityAction); - ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction); - ui->labelCoinControlChange->addAction(clipboardChangeAction); - + + // Coin Control + ui->lineEditCoinControlChange->setFont(GUIUtil::trianglesAddressFont()); + connect(ui->pushButtonCoinControl, SIGNAL(clicked()), this, SLOT(coinControlButtonClicked())); + connect(ui->checkBoxCoinControlChange, SIGNAL(stateChanged(int)), this, SLOT(coinControlChangeChecked(int))); + connect(ui->lineEditCoinControlChange, SIGNAL(textEdited(const QString &)), this, SLOT(coinControlChangeEdited(const QString &))); + + // Coin Control: clipboard actions + QAction *clipboardQuantityAction = new QAction(tr("Copy quantity"), this); + QAction *clipboardAmountAction = new QAction(tr("Copy amount"), this); + QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this); + QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this); + QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this); + QAction *clipboardPriorityAction = new QAction(tr("Copy priority"), this); + QAction *clipboardLowOutputAction = new QAction(tr("Copy low output"), this); + QAction *clipboardChangeAction = new QAction(tr("Copy change"), this); + connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardQuantity())); + connect(clipboardAmountAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAmount())); + connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardFee())); + connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAfterFee())); + connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardBytes())); + connect(clipboardPriorityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardPriority())); + connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardLowOutput())); + connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardChange())); + ui->labelCoinControlQuantity->addAction(clipboardQuantityAction); + ui->labelCoinControlAmount->addAction(clipboardAmountAction); + ui->labelCoinControlFee->addAction(clipboardFeeAction); + ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction); + ui->labelCoinControlBytes->addAction(clipboardBytesAction); + ui->labelCoinControlPriority->addAction(clipboardPriorityAction); + ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction); + ui->labelCoinControlChange->addAction(clipboardChangeAction); + fNewRecipientAllowed = true; } @@ -94,7 +97,7 @@ void SendCoinsDialog::setModel(WalletModel *model) setBalance(model->getBalance(), model->getStake(), model->getUnconfirmedBalance(), model->getImmatureBalance()); connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64, qint64))); connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); - + // Coin Control connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(coinControlUpdateLabels())); connect(model->getOptionsModel(), SIGNAL(coinControlFeaturesChanged(bool)), this, SLOT(coinControlFeatureChanged(bool))); @@ -116,7 +119,7 @@ void SendCoinsDialog::on_sendButton_clicked() if(!model) return; - + for(int i = 0; i < ui->entries->count(); ++i) { SendCoinsEntry *entry = qobject_cast(ui->entries->itemAt(i)->widget()); @@ -142,7 +145,7 @@ void SendCoinsDialog::on_sendButton_clicked() QStringList formatted; foreach(const SendCoinsRecipient &rcp, recipients) { - formatted.append(tr("%1 to %2 (%3)").arg(BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, rcp.amount), Qt::escape(rcp.label), rcp.address)); + formatted.append(tr("%1 to %2 (%3)").arg(TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, rcp.amount), Qt::escape(rcp.label), rcp.address)); } fNewRecipientAllowed = false; @@ -166,7 +169,7 @@ void SendCoinsDialog::on_sendButton_clicked() return; } - WalletModel::SendCoinsReturn sendstatus; + WalletModel::SendCoinsReturn sendstatus; if (!model->getOptionsModel() || !model->getOptionsModel()->getCoinControlFeatures()) sendstatus = model->sendCoins(recipients); @@ -193,7 +196,7 @@ void SendCoinsDialog::on_sendButton_clicked() case WalletModel::AmountWithFeeExceedsBalance: QMessageBox::warning(this, tr("Send Coins"), tr("The total exceeds your balance when the %1 transaction fee is included."). - arg(BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, sendstatus.fee)), + arg(TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, sendstatus.fee)), QMessageBox::Ok, QMessageBox::Ok); break; case WalletModel::DuplicateAddress: @@ -211,11 +214,16 @@ void SendCoinsDialog::on_sendButton_clicked() tr("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."), QMessageBox::Ok, QMessageBox::Ok); break; - case WalletModel::Aborted: // User aborted, nothing to do + case WalletModel::NarrationTooLong: + QMessageBox::warning(this, tr("Send Coins"), + tr("Error: Narration is too long."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case WalletModel::Aborted: // User aborted, nothing to do break; case WalletModel::OK: accept(); - CoinControlDialog::coinControl->UnSelectAll(); + CoinControlDialog::coinControl->UnSelectAll(); coinControlUpdateLabels(); break; } @@ -252,7 +260,7 @@ SendCoinsEntry *SendCoinsDialog::addEntry() entry->setModel(model); ui->entries->addWidget(entry); connect(entry, SIGNAL(removeEntry(SendCoinsEntry*)), this, SLOT(removeEntry(SendCoinsEntry*))); - connect(entry, SIGNAL(payAmountChanged()), this, SLOT(coinControlUpdateLabels())); + connect(entry, SIGNAL(payAmountChanged()), this, SLOT(coinControlUpdateLabels())); updateRemoveEnabled(); @@ -280,7 +288,7 @@ void SendCoinsDialog::updateRemoveEnabled() } } setupTabChain(0); - coinControlUpdateLabels(); + coinControlUpdateLabels(); } void SendCoinsDialog::removeEntry(SendCoinsEntry* entry) @@ -331,9 +339,9 @@ bool SendCoinsDialog::handleURI(const QString &uri) { SendCoinsRecipient rv; // URI has to be valid - if (GUIUtil::parseBitcoinURI(uri, &rv)) + if (GUIUtil::parseTrianglesURI(uri, &rv)) { - CBitcoinAddress address(rv.address.toStdString()); + CTrianglesAddress address(rv.address.toStdString()); if (!address.IsValid()) return false; pasteEntry(rv); @@ -352,7 +360,7 @@ void SendCoinsDialog::setBalance(qint64 balance, qint64 stake, qint64 unconfirme return; int unit = model->getOptionsModel()->getDisplayUnit(); - ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance)); + ui->labelBalance->setText(TrianglesUnits::formatWithUnit(unit, balance)); } void SendCoinsDialog::updateDisplayUnit() @@ -360,135 +368,136 @@ void SendCoinsDialog::updateDisplayUnit() if(model && model->getOptionsModel()) { // Update labelBalance with the current balance and the current unit - ui->labelBalance->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), model->getBalance())); + ui->labelBalance->setText(TrianglesUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), model->getBalance())); } } - // Coin Control: copy label "Quantity" to clipboard - void SendCoinsDialog::coinControlClipboardQuantity() - { - QApplication::clipboard()->setText(ui->labelCoinControlQuantity->text()); - } - - // Coin Control: copy label "Amount" to clipboard - void SendCoinsDialog::coinControlClipboardAmount() - { - QApplication::clipboard()->setText(ui->labelCoinControlAmount->text().left(ui->labelCoinControlAmount->text().indexOf(" "))); - } - - // Coin Control: copy label "Fee" to clipboard - void SendCoinsDialog::coinControlClipboardFee() - { - QApplication::clipboard()->setText(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" "))); - } - - // Coin Control: copy label "After fee" to clipboard - void SendCoinsDialog::coinControlClipboardAfterFee() - { - QApplication::clipboard()->setText(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" "))); - } - - // Coin Control: copy label "Bytes" to clipboard - void SendCoinsDialog::coinControlClipboardBytes() - { - QApplication::clipboard()->setText(ui->labelCoinControlBytes->text()); - } - - // Coin Control: copy label "Priority" to clipboard - void SendCoinsDialog::coinControlClipboardPriority() - { - QApplication::clipboard()->setText(ui->labelCoinControlPriority->text()); - } - - // Coin Control: copy label "Low output" to clipboard - void SendCoinsDialog::coinControlClipboardLowOutput() - { - QApplication::clipboard()->setText(ui->labelCoinControlLowOutput->text()); - } - - // Coin Control: copy label "Change" to clipboard - void SendCoinsDialog::coinControlClipboardChange() - { - QApplication::clipboard()->setText(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" "))); - } - - // Coin Control: settings menu - coin control enabled/disabled by user - void SendCoinsDialog::coinControlFeatureChanged(bool checked) - { - ui->frameCoinControl->setVisible(checked); - - if (!checked && model) // coin control features disabled - CoinControlDialog::coinControl->SetNull(); - } - - // Coin Control: button inputs -> show actual coin control dialog - void SendCoinsDialog::coinControlButtonClicked() - { - CoinControlDialog dlg; - dlg.setModel(model); - dlg.exec(); - coinControlUpdateLabels(); - } - - // Coin Control: checkbox custom change address - void SendCoinsDialog::coinControlChangeChecked(int state) - { - if (model) - { - if (state == Qt::Checked) - CoinControlDialog::coinControl->destChange = CBitcoinAddress(ui->lineEditCoinControlChange->text().toStdString()).Get(); - else - CoinControlDialog::coinControl->destChange = CNoDestination(); - } - - ui->lineEditCoinControlChange->setEnabled((state == Qt::Checked)); - ui->labelCoinControlChangeLabel->setEnabled((state == Qt::Checked)); - } - - // Coin Control: custom change address changed - void SendCoinsDialog::coinControlChangeEdited(const QString & text) - { - if (model) - { - CoinControlDialog::coinControl->destChange = CBitcoinAddress(text.toStdString()).Get(); - - // label for the change address - ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}"); - if (text.isEmpty()) - ui->labelCoinControlChangeLabel->setText(""); - else if (!CBitcoinAddress(text.toStdString()).IsValid()) - { - ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}"); - ui->labelCoinControlChangeLabel->setText(tr("WARNING: Invalid Triangle address")); - } - else - { - QString associatedLabel = model->getAddressTableModel()->labelForAddress(text); - if (!associatedLabel.isEmpty()) - ui->labelCoinControlChangeLabel->setText(associatedLabel); - else - { - CPubKey pubkey; - CKeyID keyid; - CBitcoinAddress(text.toStdString()).GetKeyID(keyid); - if (model->getPubKey(keyid, pubkey)) - ui->labelCoinControlChangeLabel->setText(tr("(no label)")); - else - { - ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}"); - ui->labelCoinControlChangeLabel->setText(tr("WARNING: unknown change address")); - } - } - } - } - } - - // Coin Control: update labels - void SendCoinsDialog::coinControlUpdateLabels() - { - if (!model || !model->getOptionsModel() || !model->getOptionsModel()->getCoinControlFeatures()) - return; - // set pay amounts +// Coin Control: copy label "Quantity" to clipboard +void SendCoinsDialog::coinControlClipboardQuantity() +{ + QApplication::clipboard()->setText(ui->labelCoinControlQuantity->text()); +} + +// Coin Control: copy label "Amount" to clipboard +void SendCoinsDialog::coinControlClipboardAmount() +{ + QApplication::clipboard()->setText(ui->labelCoinControlAmount->text().left(ui->labelCoinControlAmount->text().indexOf(" "))); +} + +// Coin Control: copy label "Fee" to clipboard +void SendCoinsDialog::coinControlClipboardFee() +{ + QApplication::clipboard()->setText(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" "))); +} + +// Coin Control: copy label "After fee" to clipboard +void SendCoinsDialog::coinControlClipboardAfterFee() +{ + QApplication::clipboard()->setText(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" "))); +} + +// Coin Control: copy label "Bytes" to clipboard +void SendCoinsDialog::coinControlClipboardBytes() +{ + QApplication::clipboard()->setText(ui->labelCoinControlBytes->text()); +} + +// Coin Control: copy label "Priority" to clipboard +void SendCoinsDialog::coinControlClipboardPriority() +{ + QApplication::clipboard()->setText(ui->labelCoinControlPriority->text()); +} + +// Coin Control: copy label "Low output" to clipboard +void SendCoinsDialog::coinControlClipboardLowOutput() +{ + QApplication::clipboard()->setText(ui->labelCoinControlLowOutput->text()); +} + +// Coin Control: copy label "Change" to clipboard +void SendCoinsDialog::coinControlClipboardChange() +{ + QApplication::clipboard()->setText(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" "))); +} + +// Coin Control: settings menu - coin control enabled/disabled by user +void SendCoinsDialog::coinControlFeatureChanged(bool checked) +{ + ui->frameCoinControl->setVisible(checked); + + if (!checked && model) // coin control features disabled + CoinControlDialog::coinControl->SetNull(); +} + +// Coin Control: button inputs -> show actual coin control dialog +void SendCoinsDialog::coinControlButtonClicked() +{ + CoinControlDialog dlg; + dlg.setModel(model); + dlg.exec(); + coinControlUpdateLabels(); +} + +// Coin Control: checkbox custom change address +void SendCoinsDialog::coinControlChangeChecked(int state) +{ + if (model) + { + if (state == Qt::Checked) + CoinControlDialog::coinControl->destChange = CTrianglesAddress(ui->lineEditCoinControlChange->text().toStdString()).Get(); + else + CoinControlDialog::coinControl->destChange = CNoDestination(); + } + + ui->lineEditCoinControlChange->setEnabled((state == Qt::Checked)); + ui->labelCoinControlChangeLabel->setEnabled((state == Qt::Checked)); +} + +// Coin Control: custom change address changed +void SendCoinsDialog::coinControlChangeEdited(const QString & text) +{ + if (model) + { + CoinControlDialog::coinControl->destChange = CTrianglesAddress(text.toStdString()).Get(); + + // label for the change address + ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}"); + if (text.isEmpty()) + ui->labelCoinControlChangeLabel->setText(""); + else if (!CTrianglesAddress(text.toStdString()).IsValid()) + { + ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}"); + ui->labelCoinControlChangeLabel->setText(tr("WARNING: Invalid TRI address")); + } + else + { + QString associatedLabel = model->getAddressTableModel()->labelForAddress(text); + if (!associatedLabel.isEmpty()) + ui->labelCoinControlChangeLabel->setText(associatedLabel); + else + { + CPubKey pubkey; + CKeyID keyid; + CTrianglesAddress(text.toStdString()).GetKeyID(keyid); + if (model->getPubKey(keyid, pubkey)) + ui->labelCoinControlChangeLabel->setText(tr("(no label)")); + else + { + ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}"); + ui->labelCoinControlChangeLabel->setText(tr("WARNING: unknown change address")); + } + } + } + } +} + +// Coin Control: update labels +void SendCoinsDialog::coinControlUpdateLabels() +{ + if (!model || !model->getOptionsModel() || !model->getOptionsModel()->getCoinControlFeatures()) + return; + + // set pay amounts CoinControlDialog::payAmounts.clear(); for(int i = 0; i < ui->entries->count(); ++i) { @@ -496,10 +505,12 @@ void SendCoinsDialog::updateDisplayUnit() if(entry) CoinControlDialog::payAmounts.append(entry->getValue().amount); } - if (CoinControlDialog::coinControl->HasSelected()) + + if (CoinControlDialog::coinControl->HasSelected()) { // actual coin control calculation - CoinControlDialog::updateLabels(model, this); + CoinControlDialog::updateLabels(model, this); + // show coin control stats ui->labelCoinControlAutomaticallySelected->hide(); ui->widgetCoinControl->show(); @@ -511,6 +522,4 @@ void SendCoinsDialog::updateDisplayUnit() ui->widgetCoinControl->hide(); ui->labelCoinControlInsuffFunds->hide(); } -} - - +} diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h index 68424bb..d8f267d 100644 --- a/src/qt/sendcoinsdialog.h +++ b/src/qt/sendcoinsdialog.h @@ -15,7 +15,7 @@ QT_BEGIN_NAMESPACE class QUrl; QT_END_NAMESPACE -/** Dialog for sending bitcoins */ +/** Dialog for sending Triangles */ class SendCoinsDialog : public QDialog { Q_OBJECT diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index fa3d2d9..485ed1a 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -1,7 +1,7 @@ #include "sendcoinsentry.h" #include "ui_sendcoinsentry.h" #include "guiutil.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "addressbookpage.h" #include "walletmodel.h" #include "optionsmodel.h" @@ -23,12 +23,15 @@ SendCoinsEntry::SendCoinsEntry(QWidget *parent) : #if QT_VERSION >= 0x040700 /* Do not move this to the XML file, Qt before 4.7 will choke on it */ ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book")); - ui->payTo->setPlaceholderText(tr("Enter a valid Triangles address")); + ui->payTo->setPlaceholderText(tr("Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm)")); + ui->narration->setPlaceholderText(tr("Enter a short note to send with payment. This feature will be enabled later.")); + ui->narration->setEnabled(false); #endif setFocusPolicy(Qt::TabFocus); setFocusProxy(ui->payTo); GUIUtil::setupAddressWidget(ui->payTo, this); + ui->narration->setMaxLength(24); } SendCoinsEntry::~SendCoinsEntry() @@ -71,8 +74,8 @@ void SendCoinsEntry::setModel(WalletModel *model) if(model && model->getOptionsModel()) connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); - - connect(ui->payAmount, SIGNAL(textChanged()), this, SIGNAL(payAmountChanged())); + + connect(ui->payAmount, SIGNAL(textChanged()), this, SIGNAL(payAmountChanged())); clear(); } @@ -87,8 +90,9 @@ void SendCoinsEntry::clear() ui->payTo->clear(); ui->addAsLabel->clear(); ui->payAmount->clear(); + ui->narration->clear(); ui->payTo->setFocus(); - // update the display unit, to not use the default ("BTC") + // update the display unit, to not use the default ("TRI") updateDisplayUnit(); } @@ -132,6 +136,8 @@ SendCoinsRecipient SendCoinsEntry::getValue() rv.address = ui->payTo->text(); rv.label = ui->addAsLabel->text(); + rv.narration = ui->narration->text(); + rv.typeInd = AddressTableModel::AT_Normal; rv.amount = ui->payAmount->value(); return rv; @@ -139,18 +145,19 @@ SendCoinsRecipient SendCoinsEntry::getValue() QWidget *SendCoinsEntry::setupTabChain(QWidget *prev) { - QWidget::setTabOrder(prev, ui->payTo); + QWidget::setTabOrder(prev, ui->payTo); QWidget::setTabOrder(ui->payTo, ui->addressBookButton); QWidget::setTabOrder(ui->addressBookButton, ui->pasteButton); QWidget::setTabOrder(ui->pasteButton, ui->deleteButton); QWidget::setTabOrder(ui->deleteButton, ui->addAsLabel); - - return ui->payAmount->setupTabChain(ui->addAsLabel); + QWidget::setTabOrder(ui->addAsLabel, ui->narration); + return ui->payAmount->setupTabChain(ui->narration); } void SendCoinsEntry::setValue(const SendCoinsRecipient &value) { ui->payTo->setText(value.address); + ui->narration->setText(value.narration); ui->addAsLabel->setText(value.label); ui->payAmount->setValue(value.amount); } @@ -171,5 +178,5 @@ void SendCoinsEntry::updateDisplayUnit() { // Update payAmount with the current unit ui->payAmount->setDisplayUnit(model->getOptionsModel()->getDisplayUnit()); - } + } } diff --git a/src/qt/sendcoinsentry.h b/src/qt/sendcoinsentry.h index 4148128..772723e 100644 --- a/src/qt/sendcoinsentry.h +++ b/src/qt/sendcoinsentry.h @@ -9,7 +9,7 @@ namespace Ui { class WalletModel; class SendCoinsRecipient; -/** A single entry in the dialog for sending bitcoins. */ +/** A single entry in the dialog for sending Triangles. */ class SendCoinsEntry : public QFrame { Q_OBJECT @@ -39,7 +39,7 @@ public slots: signals: void removeEntry(SendCoinsEntry *entry); - void payAmountChanged(); + void payAmountChanged(); private slots: void on_deleteButton_clicked(); diff --git a/src/qt/sendmessagesdialog.cpp b/src/qt/sendmessagesdialog.cpp new file mode 100644 index 0000000..4eadf86 --- /dev/null +++ b/src/qt/sendmessagesdialog.cpp @@ -0,0 +1,339 @@ +#include "sendmessagesdialog.h" +#include "ui_sendmessagesdialog.h" +//#include "init.h" +#include "walletmodel.h" +#include "messagemodel.h" +#include "addressbookpage.h" +#include "optionsmodel.h" +#include "sendmessagesentry.h" +//#include "guiutil.h" + +#include +#include +#include +#include +#include +#include + +SendMessagesDialog::SendMessagesDialog(Mode mode, Type type, QWidget *parent) : + QDialog(parent), + ui(new Ui::SendMessagesDialog), + model(0), + mode(mode), + type(type) +{ + + ui->setupUi(this); + +#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac + ui->addButton->setIcon(QIcon()); + ui->clearButton->setIcon(QIcon()); + ui->sendButton->setIcon(QIcon()); +#endif + +#if QT_VERSION >= 0x040700 + /* Do not move this to the XML file, Qt before 4.7 will choke on it */ + if(mode == SendMessagesDialog::Encrypted) + ui->addressFrom->setPlaceholderText(tr("Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm)")); + #endif + addEntry(); + + connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addEntry())); + connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear())); + connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(reject())); + + fNewRecipientAllowed = true; + + if(mode == SendMessagesDialog::Anonymous) + ui->frameAddressFrom->hide(); + + if(type == SendMessagesDialog::Page) + ui->closeButton->hide(); +} + +void SendMessagesDialog::setModel(MessageModel *model) +{ + this->model = model; + + for(int i = 0; i < ui->entries->count(); ++i) + { + SendMessagesEntry *entry = qobject_cast(ui->entries->itemAt(i)->widget()); + + if(entry) + entry->setModel(model); + } +} + +void SendMessagesDialog::loadRow(int row) +{ + if(model->data(model->index(row, model->Type, QModelIndex()), Qt::DisplayRole).toString() == MessageModel::Received) + ui->addressFrom->setText(model->data(model->index(row, model->ToAddress, QModelIndex()), Qt::DisplayRole).toString()); + else + ui->addressFrom->setText(model->data(model->index(row, model->FromAddress, QModelIndex()), Qt::DisplayRole).toString()); + + for(int i = 0; i < ui->entries->count(); ++i) + { + SendMessagesEntry *entry = qobject_cast(ui->entries->itemAt(i)->widget()); + + if(entry) + entry->loadRow(row); + } +} + +bool SendMessagesDialog::checkMode(Mode mode) +{ + return (mode == this->mode); +} + +bool SendMessagesDialog::validate() +{ + if(mode == SendMessagesDialog::Encrypted && ui->addressFrom->text() == "") + { + ui->addressFrom->setValid(false); + + return false; + } + + return true; +} + +SendMessagesDialog::~SendMessagesDialog() +{ + delete ui; +} + +void SendMessagesDialog::on_pasteButton_clicked() +{ + // Paste text from clipboard into recipient field + ui->addressFrom->setText(QApplication::clipboard()->text()); +} + +void SendMessagesDialog::on_addressBookButton_clicked() +{ + if(!model) + return; + + AddressBookPage dlg(AddressBookPage::ForSending, AddressBookPage::ReceivingTab, this); + + dlg.setModel(model->getWalletModel()->getAddressTableModel()); + + if(dlg.exec()) + { + ui->addressFrom->setText(dlg.getReturnValue()); + SendMessagesEntry *entry = qobject_cast(ui->entries->itemAt(0)->widget()); + entry->setFocus(); + // findChild( const QString "sentTo")->setFocus(); + } +} + +void SendMessagesDialog::on_sendButton_clicked() +{ + QList recipients; + bool valid = true; + + if(!model) + return; + + valid = validate(); + + for(int i = 0; i < ui->entries->count(); ++i) + { + SendMessagesEntry *entry = qobject_cast(ui->entries->itemAt(i)->widget()); + if(entry) + { + if(entry->validate()) + recipients.append(entry->getValue()); + else + valid = false; + } + } + + if(!valid || recipients.isEmpty()) + return; + + // Format confirmation message + QStringList formatted; + foreach(const SendMessagesRecipient &rcp, recipients) + { + formatted.append(tr("%1 to %2 (%3)").arg(rcp.message, Qt::escape(rcp.label), rcp.address)); + } + + fNewRecipientAllowed = false; + + QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm send messages"), + tr("Are you sure you want to send %1?").arg(formatted.join(tr(" and "))), + QMessageBox::Yes|QMessageBox::Cancel, + QMessageBox::Cancel); + + if(retval != QMessageBox::Yes) + { + fNewRecipientAllowed = true; + return; + } + + MessageModel::StatusCode sendstatus; + + if(mode == SendMessagesDialog::Anonymous) + sendstatus = model->sendMessages(recipients); + else + sendstatus = model->sendMessages(recipients, ui->addressFrom->text()); + + switch(sendstatus) + { + case MessageModel::InvalidAddress: + QMessageBox::warning(this, tr("Send Message"), + tr("The recipient address is not valid, please recheck."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case MessageModel::InvalidMessage: + QMessageBox::warning(this, tr("Send Message"), + tr("The message can't be empty."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case MessageModel::DuplicateAddress: + QMessageBox::warning(this, tr("Send Message"), + tr("Duplicate address found, can only send to each address once per send operation."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case MessageModel::MessageCreationFailed: + QMessageBox::warning(this, tr("Send Message"), + tr("Error: Message creation failed."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case MessageModel::MessageCommitFailed: + QMessageBox::warning(this, tr("Send Message"), + tr("Error: The message was rejected."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case MessageModel::Aborted: // User aborted, nothing to do + break; + case MessageModel::FailedErrorShown: // Send failed, error message was displayed + break; + case MessageModel::OK: + accept(); + break; + } + + fNewRecipientAllowed = true; +} + +void SendMessagesDialog::clear() +{ + // Remove entries until only one left + while(ui->entries->count()) + delete ui->entries->takeAt(0)->widget(); + + addEntry(); + + updateRemoveEnabled(); + + ui->sendButton->setDefault(true); +} + +void SendMessagesDialog::reject() +{ + if(type == SendMessagesDialog::Dialog) + done(1); + else + clear(); +} + +void SendMessagesDialog::accept() +{ + if(type == SendMessagesDialog::Dialog) + done(0); + else + clear(); + +} + +void SendMessagesDialog::done(int retval) +{ + if(type == SendMessagesDialog::Dialog) + QDialog::done(retval); + else + clear(); +} + +SendMessagesEntry *SendMessagesDialog::addEntry() +{ + SendMessagesEntry *entry = new SendMessagesEntry(this); + + entry->setModel(model); + ui->entries->addWidget(entry); + connect(entry, SIGNAL(removeEntry(SendMessagesEntry*)), this, SLOT(removeEntry(SendMessagesEntry*))); + updateRemoveEnabled(); + + // Focus the field, so that entry can start immediately + entry->clear(); + entry->setFocus(); + + ui->scrollAreaWidgetContents->resize(ui->scrollAreaWidgetContents->sizeHint()); + QCoreApplication::instance()->processEvents(); + QScrollBar* bar = ui->scrollArea->verticalScrollBar(); + + if(bar) + bar->setSliderPosition(bar->maximum()); + + return entry; +} + +void SendMessagesDialog::updateRemoveEnabled() +{ + // Remove buttons are enabled as soon as there is more than one send-entry + bool enabled = (ui->entries->count() > 1); + + for(int i = 0; i < ui->entries->count(); ++i) + { + SendMessagesEntry *entry = qobject_cast(ui->entries->itemAt(i)->widget()); + if(entry) + entry->setRemoveEnabled(enabled); + } + + setupTabChain(0); +} + +void SendMessagesDialog::removeEntry(SendMessagesEntry* entry) +{ + delete entry; + + updateRemoveEnabled(); +} + +QWidget *SendMessagesDialog::setupTabChain(QWidget *prev) +{ + for(int i = 0; i < ui->entries->count(); ++i) + { + SendMessagesEntry *entry = qobject_cast(ui->entries->itemAt(i)->widget()); + if(entry) + { + prev = entry->setupTabChain(prev); + } + } + + QWidget::setTabOrder(prev, ui->addButton); + QWidget::setTabOrder(ui->addButton, ui->sendButton); + + return ui->sendButton; +} + +void SendMessagesDialog::pasteEntry(const SendMessagesRecipient &rv) +{ + if(!fNewRecipientAllowed) + return; + + SendMessagesEntry *entry = 0; + // Replace the first entry if it is still unused + if(ui->entries->count() == 1) + { + SendMessagesEntry *first = qobject_cast(ui->entries->itemAt(0)->widget()); + + if(first->isClear()) + entry = first; + } + + if(!entry) + entry = addEntry(); + + entry->setValue(rv); +} diff --git a/src/qt/sendmessagesdialog.h b/src/qt/sendmessagesdialog.h new file mode 100644 index 0000000..08d3003 --- /dev/null +++ b/src/qt/sendmessagesdialog.h @@ -0,0 +1,72 @@ +#ifndef SENDMESSAGESDIALOG_H +#define SENDMESSAGESDIALOG_H + +#include +#include + +namespace Ui { + class SendMessagesDialog; +} + +class MessageModel; +class SendMessagesEntry; +class SendMessagesRecipient; + +//QT_BEGIN_NAMESPACE +//class QUrl; +//QT_END_NAMESPACE + +/** Dialog for sending messages */ +class SendMessagesDialog : public QDialog +{ + Q_OBJECT + +public: + + enum Mode { + Encrypted, + Anonymous, + }; + + enum Type { + Page, + Dialog, + }; + + explicit SendMessagesDialog(Mode mode, Type type, QWidget *parent = 0); + ~SendMessagesDialog(); + + void setModel (MessageModel *model); + void loadRow(int row); + bool checkMode(Mode mode); + bool validate (); + + /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907). + */ + QWidget *setupTabChain(QWidget *prev); + + void pasteEntry(const SendMessagesRecipient &rv); + +public slots: + void done(int retval); + void clear(); + void reject(); + void accept(); + SendMessagesEntry *addEntry(); + void updateRemoveEnabled(); + +private: + Ui::SendMessagesDialog *ui; + MessageModel *model; + bool fNewRecipientAllowed; + Mode mode; + Type type; + +private slots: + void on_sendButton_clicked(); + void removeEntry(SendMessagesEntry* entry); + void on_addressBookButton_clicked(); + void on_pasteButton_clicked(); +}; + +#endif // SENDMESSAGESDIALOG_H diff --git a/src/qt/sendmessagesentry.cpp b/src/qt/sendmessagesentry.cpp new file mode 100644 index 0000000..ab3719a --- /dev/null +++ b/src/qt/sendmessagesentry.cpp @@ -0,0 +1,204 @@ +#include "sendmessagesentry.h" +#include "ui_sendmessagesentry.h" +#include "guiutil.h" +#include "addressbookpage.h" +#include "walletmodel.h" +#include "messagemodel.h" +#include "optionsmodel.h" +#include "addresstablemodel.h" + +#include "smessage.h" + +#include +#include + +SendMessagesEntry::SendMessagesEntry(QWidget *parent) : + QFrame(parent), + ui(new Ui::SendMessagesEntry), + model(0) +{ + ui->setupUi(this); + +#ifdef Q_OS_MAC + ui->sendToLayout->setSpacing(4); +#endif +#if QT_VERSION >= 0x040700 + /* Do not move this to the XML file, Qt before 4.7 will choke on it */ + ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book")); + ui->sendTo->setPlaceholderText(tr("Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm)")); + ui->publicKey->setPlaceholderText(tr("Enter the public key for the address above, it is not in the blockchain")); + ui->messageText->setErrorText(tr("You cannot send a blank message!")); +#endif + setFocusPolicy(Qt::TabFocus); + setFocusProxy(ui->sendTo); + + GUIUtil::setupAddressWidget(ui->sendTo, this); +} + +SendMessagesEntry::~SendMessagesEntry() +{ + delete ui; +} + +void SendMessagesEntry::on_pasteButton_clicked() +{ + // Paste text from clipboard into recipient field + ui->sendTo->setText(QApplication::clipboard()->text()); +} + +void SendMessagesEntry::on_addressBookButton_clicked() +{ + if(!model) + return; + + AddressBookPage dlg(AddressBookPage::ForSending, AddressBookPage::SendingTab, this); + + dlg.setModel(model->getWalletModel()->getAddressTableModel()); + + if(dlg.exec()) + { + + ui->sendTo->setText(dlg.getReturnValue()); + + if(ui->publicKey->text() == "") + ui->publicKey->setFocus(); + else + ui->messageText->setFocus(); + } +} + +void SendMessagesEntry::on_sendTo_textChanged(const QString &address) +{ + if(!model) + return; + + QString pubkey; + QString sendTo = address; + + if(model->getAddressOrPubkey(sendTo, pubkey)) + { + + ui->publicKey->setText(pubkey); + } + else + { + ui->publicKey->show(); + ui->publicKeyLabel->show(); + } + + // Fill in label from address book, if address has an associated label + QString associatedLabel = model->getWalletModel()->getAddressTableModel()->labelForAddress(address); + + if(!associatedLabel.isEmpty()) + ui->addAsLabel->setText(associatedLabel); +} + +void SendMessagesEntry::setModel(MessageModel *model) +{ + + this->model = model; + + //clear(); +} + +void SendMessagesEntry::loadRow(int row) +{ + if(model->data(model->index(row, model->Type, QModelIndex()), Qt::DisplayRole).toString() == MessageModel::Received) + ui->sendTo->setText(model->data(model->index(row, model->FromAddress, QModelIndex()), Qt::DisplayRole).toString()); + else + ui->sendTo->setText(model->data(model->index(row, model->ToAddress, QModelIndex()), Qt::DisplayRole).toString()); +} + +void SendMessagesEntry::setRemoveEnabled(bool enabled) +{ + ui->deleteButton->setEnabled(enabled); +} + +void SendMessagesEntry::clear() +{ + ui->sendTo->clear(); + ui->addAsLabel->clear(); + ui->messageText->clear(); + ui->sendTo->setFocus(); +} + +void SendMessagesEntry::on_deleteButton_clicked() +{ + emit removeEntry(this); +} + + +bool SendMessagesEntry::validate() +{ + // Check input validity + bool retval = true; + + if(ui->messageText->toPlainText() == "") + { + ui->messageText->setValid(false); + + retval = false; + } + + if(!ui->sendTo->hasAcceptableInput() || (!model->getWalletModel()->validateAddress(ui->sendTo->text()))) + { + ui->sendTo->setValid(false); + + retval = false; + } + + if(ui->publicKey->text() == "") + { + ui->publicKey->setValid(false); + ui->publicKey->show(); + + retval = false; + } + + return retval; +} + +SendMessagesRecipient SendMessagesEntry::getValue() +{ + SendMessagesRecipient rv; + + rv.address = ui->sendTo->text(); + rv.label = ui->addAsLabel->text(); + rv.pubkey = ui->publicKey->text(); + rv.message = ui->messageText->toPlainText(); + + return rv; +} + + +QWidget *SendMessagesEntry::setupTabChain(QWidget *prev) +{ + QWidget::setTabOrder(prev, ui->sendTo); + QWidget::setTabOrder(ui->sendTo, ui->addressBookButton); + QWidget::setTabOrder(ui->addressBookButton, ui->pasteButton); + QWidget::setTabOrder(ui->pasteButton, ui->deleteButton); + QWidget::setTabOrder(ui->deleteButton, ui->addAsLabel); + QWidget::setTabOrder(ui->addAsLabel, ui->publicKey); + QWidget::setTabOrder(ui->publicKey, ui->messageText); + + return ui->messageText; + +} + +void SendMessagesEntry::setValue(const SendMessagesRecipient &value) +{ + ui->sendTo->setText(value.address); + ui->addAsLabel->setText(value.label); + ui->publicKey->setText(value.pubkey); + ui->messageText->setPlainText(value.message); +} + +bool SendMessagesEntry::isClear() +{ + return ui->sendTo->text().isEmpty(); +} + +void SendMessagesEntry::setFocus() +{ + ui->sendTo->setFocus(); +} diff --git a/src/qt/sendmessagesentry.h b/src/qt/sendmessagesentry.h new file mode 100644 index 0000000..3f589ab --- /dev/null +++ b/src/qt/sendmessagesentry.h @@ -0,0 +1,55 @@ +#ifndef SENDMESSAGESENTRY_H +#define SENDMESSAGESENTRY_H + +#include + +namespace Ui { + class SendMessagesEntry; +} +class MessageModel; +class SendMessagesRecipient; + +/** A single entry in the dialog for sending messages. */ +class SendMessagesEntry : public QFrame +{ + Q_OBJECT + +public: + explicit SendMessagesEntry(QWidget *parent = 0); + ~SendMessagesEntry(); + + void setModel(MessageModel *model); + void loadRow(int row); + bool validate(); + SendMessagesRecipient getValue(); + + /** Return whether the entry is still empty and unedited */ + bool isClear(); + + void setValue(const SendMessagesRecipient &value); + + /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907). + */ + QWidget *setupTabChain(QWidget *prev); + + void setFocus(); + +public slots: + void setRemoveEnabled(bool enabled); + void clear(); + +signals: + void removeEntry(SendMessagesEntry *entry); + +private slots: + void on_deleteButton_clicked(); + void on_addressBookButton_clicked(); + void on_pasteButton_clicked(); + void on_sendTo_textChanged(const QString &address); + +private: + Ui::SendMessagesEntry *ui; + MessageModel *model; +}; + +#endif // SENDMESSAGESENTRY_H diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp index 6e130f6..2f9cca3 100644 --- a/src/qt/signverifymessagedialog.cpp +++ b/src/qt/signverifymessagedialog.cpp @@ -24,11 +24,11 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget *parent) : #if (QT_VERSION >= 0x040700) /* Do not move this to the XML file, Qt before 4.7 will choke on it */ - ui->addressIn_SM->setPlaceholderText(tr("Enter a valid Triangles address")); + ui->addressIn_SM->setPlaceholderText(tr("Enter a TRI address (e.g. TXc7mPCNFFpinDonuSH5PNVY9S8nBcvGQm)")); ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature")); - ui->addressIn_VM->setPlaceholderText(tr("Enter a valid Triangles address")); - ui->signatureIn_VM->setPlaceholderText(tr("Enter Triangles signature")); + ui->addressIn_VM->setPlaceholderText(tr("Enter a TRI address (e.g. w)")); + ui->signatureIn_VM->setPlaceholderText(tr("Enter TRI signature")); #endif GUIUtil::setupAddressWidget(ui->addressIn_SM, this); @@ -41,8 +41,8 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget *parent) : ui->messageIn_VM->installEventFilter(this); ui->signatureIn_VM->installEventFilter(this); - ui->signatureOut_SM->setFont(GUIUtil::bitcoinAddressFont()); - ui->signatureIn_VM->setFont(GUIUtil::bitcoinAddressFont()); + ui->signatureOut_SM->setFont(GUIUtil::trianglesAddressFont()); + ui->signatureIn_VM->setFont(GUIUtil::trianglesAddressFont()); } SignVerifyMessageDialog::~SignVerifyMessageDialog() @@ -105,7 +105,7 @@ void SignVerifyMessageDialog::on_signMessageButton_SM_clicked() /* Clear old signature to ensure users don't get confused on error with an old signature displayed */ ui->signatureOut_SM->clear(); - CBitcoinAddress addr(ui->addressIn_SM->text().toStdString()); + CTrianglesAddress addr(ui->addressIn_SM->text().toStdString()); if (!addr.IsValid()) { ui->addressIn_SM->setValid(false); @@ -186,7 +186,7 @@ void SignVerifyMessageDialog::on_addressBookButton_VM_clicked() void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked() { - CBitcoinAddress addr(ui->addressIn_VM->text().toStdString()); + CTrianglesAddress addr(ui->addressIn_VM->text().toStdString()); if (!addr.IsValid()) { ui->addressIn_VM->setValid(false); @@ -227,7 +227,7 @@ void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked() return; } - if (!(CBitcoinAddress(key.GetPubKey().GetID()) == addr)) + if (!(CTrianglesAddress(key.GetPubKey().GetID()) == addr)) { ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); ui->statusLabel_VM->setText(QString("") + tr("Message verification failed.") + QString("")); diff --git a/src/qt/test/uritests.cpp b/src/qt/test/uritests.cpp index 4662f5e..5aed9a5 100644 --- a/src/qt/test/uritests.cpp +++ b/src/qt/test/uritests.cpp @@ -17,55 +17,55 @@ void URITests::uriTests() { SendCoinsRecipient rv; QUrl uri; - uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?req-dontexist=")); - QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv)); + uri.setUrl(QString("triangles:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?req-dontexist=")); + QVERIFY(!GUIUtil::parseTrianglesURI(uri, &rv)); - uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?dontexist=")); - QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); + uri.setUrl(QString("triangles:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?dontexist=")); + QVERIFY(GUIUtil::parseTrianglesURI(uri, &rv)); QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); QVERIFY(rv.label == QString()); QVERIFY(rv.amount == 0); - uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?label=Wikipedia Example Address")); - QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); + uri.setUrl(QString("triangles:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?label=Wikipedia Example Address")); + QVERIFY(GUIUtil::parseTrianglesURI(uri, &rv)); QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); QVERIFY(rv.label == QString("Wikipedia Example Address")); QVERIFY(rv.amount == 0); - uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=0.001")); - QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); + uri.setUrl(QString("triangles:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=0.001")); + QVERIFY(GUIUtil::parseTrianglesURI(uri, &rv)); QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); QVERIFY(rv.label == QString()); QVERIFY(rv.amount == 100000); - uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=1.001")); - QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); + uri.setUrl(QString("triangles:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=1.001")); + QVERIFY(GUIUtil::parseTrianglesURI(uri, &rv)); QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); QVERIFY(rv.label == QString()); QVERIFY(rv.amount == 100100000); - uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=100&label=Wikipedia Example")); - QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); + uri.setUrl(QString("triangles:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=100&label=Wikipedia Example")); + QVERIFY(GUIUtil::parseTrianglesURI(uri, &rv)); QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); QVERIFY(rv.amount == 10000000000LL); QVERIFY(rv.label == QString("Wikipedia Example")); - uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?message=Wikipedia Example Address")); - QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); + uri.setUrl(QString("triangles:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?message=Wikipedia Example Address")); + QVERIFY(GUIUtil::parseTrianglesURI(uri, &rv)); QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); QVERIFY(rv.label == QString()); - QVERIFY(GUIUtil::parseBitcoinURI("bitcoin://175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?message=Wikipedia Example Address", &rv)); + QVERIFY(GUIUtil::parseTrianglesURI("Triangles://175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?message=Wikipedia Example Address", &rv)); QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); QVERIFY(rv.label == QString()); // We currently don't implement the message parameter (ok, yea, we break spec...) - uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?req-message=Wikipedia Example Address")); - QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv)); + uri.setUrl(QString("triangles:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?req-message=Wikipedia Example Address")); + QVERIFY(!GUIUtil::parseTrianglesURI(uri, &rv)); - uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=1,000&label=Wikipedia Example")); - QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv)); + uri.setUrl(QString("triangles:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=1,000&label=Wikipedia Example")); + QVERIFY(!GUIUtil::parseTrianglesURI(uri, &rv)); - uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=1,000.0&label=Wikipedia Example")); - QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv)); + uri.setUrl(QString("triangles:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=1,000.0&label=Wikipedia Example")); + QVERIFY(!GUIUtil::parseTrianglesURI(uri, &rv)); } diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index a82e3e2..6995a3b 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -1,11 +1,11 @@ #include "transactiondesc.h" #include "guiutil.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "main.h" #include "wallet.h" -#include "db.h" +#include "txdb.h" #include "ui_interface.h" #include "base58.h" @@ -21,9 +21,11 @@ QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx) else { int nDepth = wtx.GetDepthInMainChain(); - if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0) + if (nDepth < 0) + return tr("conflicted"); + else if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0) return tr("%1/offline").arg(nDepth); - else if (nDepth < 6) + else if (nDepth < 10) return tr("%1/unconfirmed").arg(nDepth); else return tr("%1 confirmations").arg(nDepth); @@ -39,10 +41,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) strHTML.reserve(4000); strHTML += ""; - int64 nTime = wtx.GetTxTime(); - int64 nCredit = wtx.GetCredit(); - int64 nDebit = wtx.GetDebit(); - int64 nNet = nCredit - nDebit; + int64_t nTime = wtx.GetTxTime(); + int64_t nCredit = wtx.GetCredit(); + int64_t nDebit = wtx.GetDebit(); + int64_t nNet = nCredit - nDebit; strHTML += "" + tr("Status") + ": " + FormatTxStatus(wtx); int nRequests = wtx.GetRequestCount(); @@ -60,7 +62,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) // // From // - if (wtx.IsCoinBase()) + if (wtx.IsCoinBase() || wtx.IsCoinStake()) { strHTML += "" + tr("Source") + ": " + tr("Generated") + "
"; } @@ -86,7 +88,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) { strHTML += "" + tr("From") + ": " + tr("unknown") + "
"; strHTML += "" + tr("To") + ": "; - strHTML += GUIUtil::HtmlEscape(CBitcoinAddress(address).ToString()); + strHTML += GUIUtil::HtmlEscape(CTrianglesAddress(address).ToString()); if (!wallet->mapAddressBook[address].empty()) strHTML += " (" + tr("own address") + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address]) + ")"; else @@ -108,7 +110,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) // Online transaction std::string strAddress = wtx.mapValue["to"]; strHTML += "" + tr("To") + ": "; - CTxDestination dest = CBitcoinAddress(strAddress).Get(); + CTxDestination dest = CTrianglesAddress(strAddress).Get(); if (wallet->mapAddressBook.count(dest) && !wallet->mapAddressBook[dest].empty()) strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[dest]) + " "; strHTML += GUIUtil::HtmlEscape(strAddress) + "
"; @@ -122,12 +124,12 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) // // Coinbase // - int64 nUnmatured = 0; + int64_t nUnmatured = 0; BOOST_FOREACH(const CTxOut& txout, wtx.vout) nUnmatured += wallet->GetCredit(txout); strHTML += "" + tr("Credit") + ": "; if (wtx.IsInMainChain()) - strHTML += BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, nUnmatured)+ " (" + tr("matures in %n more block(s)", "", wtx.GetBlocksToMaturity()) + ")"; + strHTML += TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, nUnmatured)+ " (" + tr("matures in %n more block(s)", "", wtx.GetBlocksToMaturity()) + ")"; else strHTML += "(" + tr("not accepted") + ")"; strHTML += "
"; @@ -137,7 +139,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) // // Credit // - strHTML += "" + tr("Credit") + ": " + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, nNet) + "
"; + strHTML += "" + tr("Credit") + ": " + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, nNet) + "
"; } else { @@ -168,26 +170,26 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) strHTML += "" + tr("To") + ": "; if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].empty()) strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address]) + " "; - strHTML += GUIUtil::HtmlEscape(CBitcoinAddress(address).ToString()); + strHTML += GUIUtil::HtmlEscape(CTrianglesAddress(address).ToString()); strHTML += "
"; } } - strHTML += "" + tr("Debit") + ": " + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, -txout.nValue) + "
"; + strHTML += "" + tr("Debit") + ": " + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, -txout.nValue) + "
"; } if (fAllToMe) { // Payment to self - int64 nChange = wtx.GetChange(); - int64 nValue = nCredit - nChange; - strHTML += "" + tr("Debit") + ": " + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, -nValue) + "
"; - strHTML += "" + tr("Credit") + ": " + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, nValue) + "
"; + int64_t nChange = wtx.GetChange(); + int64_t nValue = nCredit - nChange; + strHTML += "" + tr("Debit") + ": " + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, -nValue) + "
"; + strHTML += "" + tr("Credit") + ": " + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, nValue) + "
"; } - int64 nTxFee = nDebit - wtx.GetValueOut(); + int64_t nTxFee = nDebit - wtx.GetValueOut(); if (nTxFee > 0) - strHTML += "" + tr("Transaction fee") + ": " + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, -nTxFee) + "
"; + strHTML += "" + tr("Transaction fee") + ": " + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, -nTxFee) + "
"; } else { @@ -196,30 +198,35 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) // BOOST_FOREACH(const CTxIn& txin, wtx.vin) if (wallet->IsMine(txin)) - strHTML += "" + tr("Debit") + ": " + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, -wallet->GetDebit(txin)) + "
"; + strHTML += "" + tr("Debit") + ": " + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, -wallet->GetDebit(txin)) + "
"; BOOST_FOREACH(const CTxOut& txout, wtx.vout) if (wallet->IsMine(txout)) - strHTML += "" + tr("Credit") + ": " + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, wallet->GetCredit(txout)) + "
"; + strHTML += "" + tr("Credit") + ": " + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, wallet->GetCredit(txout)) + "
"; } } - strHTML += "" + tr("Net amount") + ": " + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, nNet, true) + "
"; - + strHTML += "" + tr("Net amount") + ": " + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, nNet, true) + "
"; + // // Message // - if (!wtx.mapValue["message"].empty()) - strHTML += "
" + tr("Message") + ":
" + GUIUtil::HtmlEscape(wtx.mapValue["message"], true) + "
"; - - if (!wtx.mapValue["comment"].empty()) + if (wtx.mapValue.count("message") && !wtx.mapValue["message"].empty()) + strHTML += "
" + tr("Message") + ":
" + GUIUtil::HtmlEscape(wtx.mapValue["message"], true) + "
"; + if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty()) strHTML += "
" + tr("Comment") + ":
" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "
"; - + + char cbuf[256]; + for (int k = 0; k < wtx.vout.size(); ++k) + { + snprintf(cbuf, sizeof(cbuf), "n_%d", k); + if (wtx.mapValue.count(cbuf) && !wtx.mapValue[cbuf].empty()) + strHTML += "
" + tr(cbuf) + ": " + GUIUtil::HtmlEscape(wtx.mapValue[cbuf], true) + "
"; + } + strHTML += "" + tr("Transaction ID") + ": " + wtx.GetHash().ToString().c_str() + "
"; - - if (wtx.IsCoinBase() || wtx.IsCoinStake()) - strHTML += "
" + tr("Generated coins must mature 50 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.") + "
"; + strHTML += "
" + tr("Generated coins must mature 60 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.") + "
"; // // Debug view @@ -229,10 +236,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) strHTML += "

" + tr("Debug information") + "

"; BOOST_FOREACH(const CTxIn& txin, wtx.vin) if(wallet->IsMine(txin)) - strHTML += "" + tr("Debit") + ": " + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, -wallet->GetDebit(txin)) + "
"; + strHTML += "" + tr("Debit") + ": " + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, -wallet->GetDebit(txin)) + "
"; BOOST_FOREACH(const CTxOut& txout, wtx.vout) if(wallet->IsMine(txout)) - strHTML += "" + tr("Credit") + ": " + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, wallet->GetCredit(txout)) + "
"; + strHTML += "" + tr("Credit") + ": " + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, wallet->GetCredit(txout)) + "
"; strHTML += "
" + tr("Transaction") + ":
"; strHTML += GUIUtil::HtmlEscape(wtx.ToString(), true); @@ -260,9 +267,9 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) { if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].empty()) strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address]) + " "; - strHTML += QString::fromStdString(CBitcoinAddress(address).ToString()); + strHTML += QString::fromStdString(CTrianglesAddress(address).ToString()); } - strHTML = strHTML + " " + tr("Amount") + "=" + BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, vout.nValue); + strHTML = strHTML + " " + tr("Amount") + "=" + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, vout.nValue); strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) ? tr("true") : tr("false")) + ""; } } diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp index 16fb4da..69c2fc9 100644 --- a/src/qt/transactionfilterproxy.cpp +++ b/src/qt/transactionfilterproxy.cpp @@ -1,5 +1,7 @@ #include "transactionfilterproxy.h" + #include "transactiontablemodel.h" +#include "transactionrecord.h" #include @@ -17,7 +19,8 @@ TransactionFilterProxy::TransactionFilterProxy(QObject *parent) : addrPrefix(), typeFilter(ALL_TYPES), minAmount(0), - limitRows(-1) + limitRows(-1), + showInactive(true) { } @@ -30,7 +33,10 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex & QString address = index.data(TransactionTableModel::AddressRole).toString(); QString label = index.data(TransactionTableModel::LabelRole).toString(); qint64 amount = llabs(index.data(TransactionTableModel::AmountRole).toLongLong()); + int status = index.data(TransactionTableModel::StatusRole).toInt(); + if(!showInactive && (status == TransactionStatus::Conflicted || status == TransactionStatus::NotAccepted)) + return false; if(!(TYPE(type) & typeFilter)) return false; if(datetime < dateFrom || datetime > dateTo) @@ -73,6 +79,12 @@ void TransactionFilterProxy::setLimit(int limit) this->limitRows = limit; } +void TransactionFilterProxy::setShowInactive(bool showInactive) +{ + this->showInactive = showInactive; + invalidateFilter(); +} + int TransactionFilterProxy::rowCount(const QModelIndex &parent) const { if(limitRows != -1) diff --git a/src/qt/transactionfilterproxy.h b/src/qt/transactionfilterproxy.h index 30b9858..2c86f62 100644 --- a/src/qt/transactionfilterproxy.h +++ b/src/qt/transactionfilterproxy.h @@ -31,6 +31,9 @@ public: /** Set maximum number of rows returned, -1 if unlimited. */ void setLimit(int limit); + /** Set whether to show conflicted transactions. */ + void setShowInactive(bool showInactive); + int rowCount(const QModelIndex &parent = QModelIndex()) const; protected: bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const; @@ -42,6 +45,7 @@ private: quint32 typeFilter; qint64 minAmount; int limitRows; + bool showInactive; signals: diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 18858e2..eb181ea 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -24,26 +24,24 @@ bool TransactionRecord::showTransaction(const CWalletTx &wtx) QList TransactionRecord::decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx) { QList parts; - int64 nTime = wtx.GetTxTime(); - int64 nCredit = wtx.GetCredit(true); - int64 nDebit = wtx.GetDebit(); - int64 nNet = nCredit - nDebit; - uint256 hash = wtx.GetHash(); + int64_t nTime = wtx.GetTxTime(); + int64_t nCredit = wtx.GetCredit(true); + int64_t nDebit = wtx.GetDebit(); + int64_t nNet = nCredit - nDebit; + uint256 hash = wtx.GetHash(), hashPrev = 0; std::map mapValue = wtx.mapValue; + + char cbuf[256]; - if (wtx.IsCoinStake()) - { - // Stake generation - parts.append(TransactionRecord(hash, nTime, TransactionRecord::StakeMint, "", -nDebit, wtx.GetValueOut())); - } - else if (nNet > 0 || wtx.IsCoinBase()) + if (nNet > 0 || wtx.IsCoinBase() || wtx.IsCoinStake()) { // // Credit // - BOOST_FOREACH(const CTxOut& txout, wtx.vout) + for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++) { - if(wallet->IsMine(txout)) + const CTxOut& txout = wtx.vout[nOut]; + if(wallet->IsMine(txout)) { TransactionRecord sub(hash, nTime); CTxDestination address; @@ -51,9 +49,9 @@ QList TransactionRecord::decomposeTransaction(const CWallet * sub.credit = txout.nValue; if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address)) { - // Received by Bitcoin Address + // Received by TRI address sub.type = TransactionRecord::RecvWithAddress; - sub.address = CBitcoinAddress(address).ToString(); + sub.address = CTrianglesAddress(address).ToString(); } else { @@ -61,11 +59,26 @@ QList TransactionRecord::decomposeTransaction(const CWallet * sub.type = TransactionRecord::RecvFromOther; sub.address = mapValue["from"]; } - if (wtx.IsCoinBase()) + snprintf(cbuf, sizeof(cbuf), "n_%u", nOut); + mapValue_t::const_iterator mi = wtx.mapValue.find(cbuf); + if (mi != wtx.mapValue.end() && !mi->second.empty()) + sub.narration = mi->second; + if (wtx.IsCoinBase()) { - // Generated + // Generated (proof-of-work) sub.type = TransactionRecord::Generated; } + if (wtx.IsCoinStake()) + { + // Generated (proof-of-stake) + + if (hashPrev == hash) + continue; // last coinstake output + + sub.type = TransactionRecord::Generated; + sub.credit = nNet > 0 ? nNet : wtx.GetValueOut() - nDebit; + hashPrev = hash; + } parts.append(sub); } @@ -84,9 +97,19 @@ QList TransactionRecord::decomposeTransaction(const CWallet * if (fAllFromMe && fAllToMe) { // Payment to self - int64 nChange = wtx.GetChange(); + int64_t nChange = wtx.GetChange(); - parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "", + std::string narration(""); + mapValue_t::const_iterator mi; + for (mi = wtx.mapValue.begin(); mi != wtx.mapValue.end(); ++mi) + { + if (mi->first.compare(0, 2, "n_") != 0) + continue; + narration = mi->second; + break; + }; + + parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "", narration, -(nDebit - nChange), nCredit - nChange)); } else if (fAllFromMe) @@ -94,7 +117,7 @@ QList TransactionRecord::decomposeTransaction(const CWallet * // // Debit // - int64 nTxFee = nDebit - wtx.GetValueOut(); + int64_t nTxFee = nDebit - wtx.GetValueOut(); for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++) { @@ -112,9 +135,9 @@ QList TransactionRecord::decomposeTransaction(const CWallet * CTxDestination address; if (ExtractDestination(txout.scriptPubKey, address)) { - // Sent to Bitcoin Address + // Sent to TRI address sub.type = TransactionRecord::SendToAddress; - sub.address = CBitcoinAddress(address).ToString(); + sub.address = CTrianglesAddress(address).ToString(); } else { @@ -122,8 +145,11 @@ QList TransactionRecord::decomposeTransaction(const CWallet * sub.type = TransactionRecord::SendToOther; sub.address = mapValue["to"]; } - - int64 nValue = txout.nValue; + snprintf(cbuf, sizeof(cbuf), "n_%u", nOut); + mapValue_t::const_iterator mi = wtx.mapValue.find(cbuf); + if (mi != wtx.mapValue.end() && !mi->second.empty()) + sub.narration = mi->second; + int64_t nValue = txout.nValue; /* Add fee to first output */ if (nTxFee > 0) { @@ -140,7 +166,7 @@ QList TransactionRecord::decomposeTransaction(const CWallet * // // Mixed debit transaction, can't break down payees // - parts.append(TransactionRecord(hash, nTime, TransactionRecord::Other, "", nNet, 0)); + parts.append(TransactionRecord(hash, nTime, TransactionRecord::Other, "", "", nNet, 0)); } } @@ -163,7 +189,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) (wtx.IsCoinBase() ? 1 : 0), wtx.nTimeReceived, idx); - status.confirmed = wtx.IsConfirmed(); + status.countsForBalance = wtx.IsTrusted() && !(wtx.GetBlocksToMaturity() > 0); status.depth = wtx.GetDepthInMainChain(); status.cur_num_blocks = nBestHeight; @@ -180,29 +206,13 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) status.open_for = wtx.nLockTime; } } - else - { - if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0) - { - status.status = TransactionStatus::Offline; - } - else if (status.depth < NumConfirmations) - { - status.status = TransactionStatus::Unconfirmed; - } - else - { - status.status = TransactionStatus::HaveConfirmations; - } - } // For generated transactions, determine maturity - if(type == TransactionRecord::Generated || type == TransactionRecord::StakeMint) + else if(type == TransactionRecord::Generated) { - int64 nCredit = wtx.GetCredit(true); - if (nCredit == 0) + if (wtx.GetBlocksToMaturity() > 0) { - status.maturity = TransactionStatus::Immature; + status.status = TransactionStatus::Immature; if (wtx.IsInMainChain()) { @@ -210,16 +220,39 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) // Check if the block was requested by anyone if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0) - status.maturity = TransactionStatus::MaturesWarning; + status.status = TransactionStatus::MaturesWarning; } else { - status.maturity = TransactionStatus::NotAccepted; + status.status = TransactionStatus::NotAccepted; } } else { - status.maturity = TransactionStatus::Mature; + status.status = TransactionStatus::Confirmed; + } + } + else + { + if (status.depth < 0) + { + status.status = TransactionStatus::Conflicted; + } + else if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0) + { + status.status = TransactionStatus::Offline; + } + else if (status.depth == 0) + { + status.status = TransactionStatus::Unconfirmed; + } + else if (status.depth < RecommendedNumConfirmations) + { + status.status = TransactionStatus::Confirming; + } + else + { + status.status = TransactionStatus::Confirmed; } } } diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h index 3e36fff..f777760 100644 --- a/src/qt/transactionrecord.h +++ b/src/qt/transactionrecord.h @@ -14,40 +14,40 @@ class TransactionStatus { public: TransactionStatus(): - confirmed(false), sortKey(""), maturity(Mature), + countsForBalance(false), sortKey(""), matures_in(0), status(Offline), depth(0), open_for(0), cur_num_blocks(-1) { } - enum Maturity - { - Immature, - Mature, - MaturesWarning, /**< Transaction will likely not mature because no nodes have confirmed */ - NotAccepted - }; - enum Status { - OpenUntilDate, - OpenUntilBlock, - Offline, - Unconfirmed, - HaveConfirmations + Confirmed, /**< Have 6 or more confirmations (normal tx) or fully mature (mined tx) **/ + /// Normal (sent/received) transactions + OpenUntilDate, /**< Transaction not yet final, waiting for date */ + OpenUntilBlock, /**< Transaction not yet final, waiting for block */ + Offline, /**< Not sent to any other nodes **/ + Unconfirmed, /**< Not yet mined into a block **/ + Confirming, /**< Confirmed, but waiting for the recommended number of confirmations **/ + Conflicted, /**< Conflicts with other transaction or mempool **/ + /// Generated (mined) transactions + Immature, /**< Mined but waiting for maturity */ + MaturesWarning, /**< Transaction will likely not mature because no nodes have confirmed */ + NotAccepted /**< Mined but not accepted */ }; - bool confirmed; + /// Transaction counts towards available balance + bool countsForBalance; + /// Sorting key based on status std::string sortKey; /** @name Generated (mined) transactions @{*/ - Maturity maturity; int matures_in; /**@}*/ /** @name Reported status @{*/ Status status; - int64 depth; - int64 open_for; /**< Timestamp if status==OpenUntilDate, otherwise number of blocks */ + int64_t depth; + int64_t open_for; /**< Timestamp if status==OpenUntilDate, otherwise number of blocks */ /**@}*/ /** Current number of blocks (to know whether cached status is still valid) */ @@ -68,28 +68,27 @@ public: SendToOther, RecvWithAddress, RecvFromOther, - SendToSelf, - StakeMint + SendToSelf }; - /** Number of confirmation needed for transaction */ - static const int NumConfirmations = 4; + /** Number of confirmation recommended for accepting a transaction */ + static const int RecommendedNumConfirmations = 4; TransactionRecord(): - hash(), time(0), type(Other), address(""), debit(0), credit(0), idx(0) + hash(), time(0), type(Other), address(""), narration(""), debit(0), credit(0), idx(0) { } - TransactionRecord(uint256 hash, int64 time): - hash(hash), time(time), type(Other), address(""), debit(0), + TransactionRecord(uint256 hash, int64_t time): + hash(hash), time(time), type(Other), address(""), narration(""), debit(0), credit(0), idx(0) { } - TransactionRecord(uint256 hash, int64 time, - Type type, const std::string &address, - int64 debit, int64 credit): - hash(hash), time(time), type(type), address(address), debit(debit), credit(credit), + TransactionRecord(uint256 hash, int64_t time, + Type type, const std::string &address, const std::string &narration, + int64_t debit, int64_t credit): + hash(hash), time(time), type(type), address(address), narration(narration), debit(debit), credit(credit), idx(0) { } @@ -102,11 +101,12 @@ public: /** @name Immutable transaction attributes @{*/ uint256 hash; - int64 time; + qint64 time; Type type; std::string address; - int64 debit; - int64 credit; + std::string narration; + qint64 debit; + qint64 credit; /**@}*/ /** Subtransaction index, for sort key */ diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 2e9cc46..98c0009 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -6,7 +6,7 @@ #include "walletmodel.h" #include "optionsmodel.h" #include "addresstablemodel.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "wallet.h" #include "ui_interface.h" @@ -25,6 +25,7 @@ static int column_alignments[] = { Qt::AlignLeft|Qt::AlignVCenter, Qt::AlignLeft|Qt::AlignVCenter, Qt::AlignLeft|Qt::AlignVCenter, + Qt::AlignLeft|Qt::AlignVCenter, Qt::AlignRight|Qt::AlignVCenter }; @@ -223,7 +224,7 @@ TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *paren priv(new TransactionTablePriv(wallet, this)), cachedNumBlocks(0) { - columns << QString() << tr("Date") << tr("Type") << tr("Address") << tr("Amount"); + columns << QString() << tr("Date") << tr("Type") << tr("Address") << tr("Narration") << tr("Amount"); priv->refreshWallet(); @@ -280,37 +281,35 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons switch(wtx->status.status) { case TransactionStatus::OpenUntilBlock: - status = tr("Open for %n block(s)","",wtx->status.open_for); + status = tr("Open for %n more block(s)","",wtx->status.open_for); break; case TransactionStatus::OpenUntilDate: status = tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx->status.open_for)); break; case TransactionStatus::Offline: - status = tr("Offline (%1 confirmations)").arg(wtx->status.depth); + status = tr("Offline"); break; case TransactionStatus::Unconfirmed: - status = tr("Unconfirmed (%1 of %2 confirmations)").arg(wtx->status.depth).arg(TransactionRecord::NumConfirmations); + status = tr("Unconfirmed"); break; - case TransactionStatus::HaveConfirmations: + case TransactionStatus::Confirming: + status = tr("Confirming (%1 of %2 confirmations)").arg(wtx->status.depth).arg(TransactionRecord::RecommendedNumConfirmations); + break; + case TransactionStatus::Confirmed: status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth); break; - } - if(wtx->type == TransactionRecord::Generated || wtx->type == TransactionRecord::StakeMint) - { - switch(wtx->status.maturity) - { - case TransactionStatus::Immature: - status += "\n" + tr("Mined balance will be available when it matures in %n more block(s)", "", wtx->status.matures_in); - break; - case TransactionStatus::Mature: - break; - case TransactionStatus::MaturesWarning: - status += "\n" + tr("This block was not received by any other nodes and will probably not be accepted!"); - break; - case TransactionStatus::NotAccepted: - status += "\n" + tr("Generated but not accepted"); - break; - } + case TransactionStatus::Conflicted: + status = tr("Conflicted"); + break; + case TransactionStatus::Immature: + status = tr("Immature (%1 confirmations, will be available after %2)").arg(wtx->status.depth).arg(wtx->status.depth + wtx->status.matures_in); + break; + case TransactionStatus::MaturesWarning: + status = tr("This block was not received by any other nodes and will probably not be accepted!"); + break; + case TransactionStatus::NotAccepted: + status = tr("Generated but not accepted"); + break; } return status; @@ -359,7 +358,6 @@ QString TransactionTableModel::formatTxType(const TransactionRecord *wtx) const return tr("Sent to"); case TransactionRecord::SendToSelf: return tr("Payment to yourself"); - case TransactionRecord::StakeMint: case TransactionRecord::Generated: return tr("Mined"); default: @@ -372,12 +370,7 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx switch(wtx->type) { case TransactionRecord::Generated: - case TransactionRecord::StakeMint: - { - QString str = BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), wtx->credit + wtx->debit); - float dd = str.toFloat(); - return QIcon(":/icons/tx_mined"); - } + return QIcon(":/icons/tx_mined"); case TransactionRecord::RecvWithAddress: case TransactionRecord::RecvFromOther: return QIcon(":/icons/tx_input"); @@ -408,6 +401,11 @@ QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, b } } +QString TransactionTableModel::formatNarration(const TransactionRecord *wtx) const +{ + return QString::fromStdString(wtx->narration); +} + QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const { // Show addresses without label in a less visible color @@ -431,10 +429,10 @@ QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed) const { - QString str = BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), wtx->credit + wtx->debit); + QString str = TrianglesUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), wtx->credit + wtx->debit); if(showUnconfirmed) { - if(!wtx->status.confirmed || wtx->status.maturity != TransactionStatus::Mature) + if(!wtx->status.countsForBalance) { str = QString("[") + str + QString("]"); } @@ -444,45 +442,36 @@ QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool QVariant TransactionTableModel::txStatusDecoration(const TransactionRecord *wtx) const { - if(wtx->type == TransactionRecord::Generated || wtx->type == TransactionRecord::StakeMint) + switch(wtx->status.status) { - switch(wtx->status.maturity) + case TransactionStatus::OpenUntilBlock: + case TransactionStatus::OpenUntilDate: + return QColor(64,64,255); + case TransactionStatus::Offline: + return QColor(192,192,192); + case TransactionStatus::Unconfirmed: + return QIcon(":/icons/transaction_0"); + case TransactionStatus::Confirming: + switch(wtx->status.depth) { - case TransactionStatus::Immature: { - int total = wtx->status.depth + wtx->status.matures_in; - int part = (wtx->status.depth * 4 / total) + 1; - return QIcon(QString(":/icons/transaction_%1").arg(part)); - } - case TransactionStatus::Mature: - return QIcon(":/icons/transaction_confirmed"); - case TransactionStatus::MaturesWarning: - case TransactionStatus::NotAccepted: - return QIcon(":/icons/transaction_0"); - } - } - else - { - switch(wtx->status.status) - { - case TransactionStatus::OpenUntilBlock: - case TransactionStatus::OpenUntilDate: - return QColor(64,64,255); - break; - case TransactionStatus::Offline: - return QColor(192,192,192); - case TransactionStatus::Unconfirmed: - switch(wtx->status.depth) - { - case 0: return QIcon(":/icons/transaction_0"); - case 1: return QIcon(":/icons/transaction_1"); - case 2: return QIcon(":/icons/transaction_2"); - case 3: return QIcon(":/icons/transaction_3"); - case 4: return QIcon(":/icons/transaction_4"); - default: return QIcon(":/icons/transaction_5"); - }; - case TransactionStatus::HaveConfirmations: - return QIcon(":/icons/transaction_confirmed"); + case 1: return QIcon(":/icons/transaction_1"); + case 2: return QIcon(":/icons/transaction_2"); + case 3: return QIcon(":/icons/transaction_3"); + case 4: return QIcon(":/icons/transaction_4"); + default: return QIcon(":/icons/transaction_5"); + }; + case TransactionStatus::Confirmed: + return QIcon(":/icons/transaction_confirmed"); + case TransactionStatus::Conflicted: + return QIcon(":/icons/transaction_conflicted"); + case TransactionStatus::Immature: { + int total = wtx->status.depth + wtx->status.matures_in; + int part = (wtx->status.depth * 4 / total) + 1; + return QIcon(QString(":/icons/transaction_%1").arg(part)); } + case TransactionStatus::MaturesWarning: + case TransactionStatus::NotAccepted: + return QIcon(":/icons/transaction_0"); } return QColor(0,0,0); } @@ -524,7 +513,9 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const return formatTxType(rec); case ToAddress: return formatTxToAddress(rec, false); - case Amount: + case Narration: + return formatNarration(rec); + case Amount: return formatTxAmount(rec); } break; @@ -549,8 +540,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const case Qt::TextAlignmentRole: return column_alignments[index.column()]; case Qt::ForegroundRole: - // Non-confirmed transactions are grey - if(!rec->status.confirmed) + // Non-confirmed (but not immature) as transactions are grey + if(!rec->status.countsForBalance && rec->status.status != TransactionStatus::Immature) { return COLOR_UNCONFIRMED; } @@ -578,11 +569,11 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const case TxIDRole: return QString::fromStdString(rec->getTxID()); case ConfirmedRole: - // Return True if transaction counts for balance - return rec->status.confirmed && !((rec->type == TransactionRecord::Generated || rec->type == TransactionRecord::StakeMint) && - rec->status.maturity != TransactionStatus::Mature); + return rec->status.countsForBalance; case FormattedAmountRole: return formatTxAmount(rec, false); + case StatusRole: + return rec->status.status; } return QVariant(); } diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h index fd321ce..0dedbc2 100644 --- a/src/qt/transactiontablemodel.h +++ b/src/qt/transactiontablemodel.h @@ -23,7 +23,8 @@ public: Date = 1, Type = 2, ToAddress = 3, - Amount = 4 + Narration = 4, + Amount = 5 }; /** Roles to get specific information from a transaction row. @@ -47,7 +48,9 @@ public: /** Is transaction confirmed? */ ConfirmedRole, /** Formatted amount, without brackets when unconfirmed */ - FormattedAmountRole + FormattedAmountRole, + /** Transaction status (TransactionRecord::Status) */ + StatusRole }; int rowCount(const QModelIndex &parent) const; @@ -69,6 +72,7 @@ private: QString formatTxType(const TransactionRecord *wtx) const; QString formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const; QString formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed=true) const; + QString formatNarration(const TransactionRecord *wtx) const; QString formatTooltip(const TransactionRecord *rec) const; QVariant txStatusDecoration(const TransactionRecord *wtx) const; QVariant txAddressDecoration(const TransactionRecord *wtx) const; diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 6a32f26..10d6b83 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -5,7 +5,7 @@ #include "walletmodel.h" #include "addresstablemodel.h" #include "transactiontablemodel.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "csvmodelwriter.h" #include "transactiondescdialog.h" #include "editaddressdialog.h" @@ -74,7 +74,6 @@ TransactionView::TransactionView(QWidget *parent) : typeWidget->addItem(tr("Sent to"), TransactionFilterProxy::TYPE(TransactionRecord::SendToAddress) | TransactionFilterProxy::TYPE(TransactionRecord::SendToOther)); typeWidget->addItem(tr("To yourself"), TransactionFilterProxy::TYPE(TransactionRecord::SendToSelf)); - typeWidget->addItem(tr("Minted"), TransactionFilterProxy::TYPE(TransactionRecord::StakeMint)); typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE(TransactionRecord::Generated)); typeWidget->addItem(tr("Other"), TransactionFilterProxy::TYPE(TransactionRecord::Other)); @@ -127,6 +126,7 @@ TransactionView::TransactionView(QWidget *parent) : QAction *copyAddressAction = new QAction(tr("Copy address"), this); QAction *copyLabelAction = new QAction(tr("Copy label"), this); QAction *copyAmountAction = new QAction(tr("Copy amount"), this); + QAction *copyTxIDAction = new QAction(tr("Copy transaction ID"), this); QAction *editLabelAction = new QAction(tr("Edit label"), this); QAction *showDetailsAction = new QAction(tr("Show transaction details"), this); @@ -134,6 +134,7 @@ TransactionView::TransactionView(QWidget *parent) : contextMenu->addAction(copyAddressAction); contextMenu->addAction(copyLabelAction); contextMenu->addAction(copyAmountAction); + contextMenu->addAction(copyTxIDAction); contextMenu->addAction(editLabelAction); contextMenu->addAction(showDetailsAction); @@ -149,6 +150,7 @@ TransactionView::TransactionView(QWidget *parent) : connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress())); connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(copyLabel())); connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount())); + connect(copyTxIDAction, SIGNAL(triggered()), this, SLOT(copyTxID())); connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel())); connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails())); } @@ -255,7 +257,7 @@ void TransactionView::changedAmount(const QString &amount) if(!transactionProxyModel) return; qint64 amount_parsed = 0; - if(BitcoinUnits::parse(model->getOptionsModel()->getDisplayUnit(), amount, &amount_parsed)) + if(TrianglesUnits::parse(model->getOptionsModel()->getDisplayUnit(), amount, &amount_parsed)) { transactionProxyModel->setMinAmount(amount_parsed); } @@ -318,6 +320,11 @@ void TransactionView::copyAmount() GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::FormattedAmountRole); } +void TransactionView::copyTxID() +{ + GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxIDRole); +} + void TransactionView::editLabel() { if(!transactionView->selectionModel() ||!model) diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h index 4ade3ec..81b4f05 100644 --- a/src/qt/transactionview.h +++ b/src/qt/transactionview.h @@ -65,6 +65,7 @@ private slots: void editLabel(); void copyLabel(); void copyAmount(); + void copyTxID(); signals: void doubleClicked(const QModelIndex&); diff --git a/src/qt/bitcoin.cpp b/src/qt/triangles.cpp similarity index 84% rename from src/qt/bitcoin.cpp rename to src/qt/triangles.cpp index 81bf982..f68c68d 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/triangles.cpp @@ -1,10 +1,11 @@ /* * W.J. van der Laan 2011-2012 */ -#include "bitcoingui.h" +#include "trianglesgui.h" #include "clientmodel.h" #include "walletmodel.h" #include "optionsmodel.h" +#include "messagemodel.h" #include "guiutil.h" #include "guiconstants.h" @@ -20,8 +21,8 @@ #include #include -#if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED) -#define _BITCOIN_QT_PLUGINS_INCLUDED +#if defined(TRIANGLES_NEED_QT_PLUGINS) && !defined(_TRIANGLES_QT_PLUGINS_INCLUDED) +#define _TRIANGLES_QT_PLUGINS_INCLUDED #define __INSURE__ #include Q_IMPORT_PLUGIN(qcncodecs) @@ -32,7 +33,7 @@ Q_IMPORT_PLUGIN(qtaccessiblewidgets) #endif // Need a global reference for the notifications to find the GUI -static BitcoinGUI *guiref; +static TrianglesGUI *guiref; static QSplashScreen *splashref; static void ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style) @@ -55,7 +56,7 @@ static void ThreadSafeMessageBox(const std::string& message, const std::string& } } -static bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption) +static bool ThreadSafeAskFee(int64_t nFeeRequired, const std::string& strCaption) { if(!guiref) return false; @@ -83,7 +84,7 @@ static void InitMessage(const std::string &message) { if(splashref) { - splashref->showMessage(QString::fromStdString(message), Qt::AlignBottom|Qt::AlignHCenter, QColor(255,255,200)); + splashref->showMessage(QString::fromStdString(message), Qt::AlignBottom|Qt::AlignHCenter, QColor("#FFFFFF")); QApplication::instance()->processEvents(); } } @@ -98,7 +99,7 @@ static void QueueShutdown() */ static std::string Translate(const char* psz) { - return QCoreApplication::translate("bitcoin-core", psz).toStdString(); + return QCoreApplication::translate("Triangles-core", psz).toStdString(); } /* Handle runaway exceptions. Shows a message box with the problem and quits the program. @@ -106,21 +107,23 @@ 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 occurred. triangles can no longer continue safely and will quit.") + QString("\n\n") + QString::fromStdString(strMiscWarning)); + QMessageBox::critical(0, "Runaway exception", TrianglesGUI::tr("A fatal error occurred. Triangles can no longer continue safely and will quit.") + QString("\n\n") + QString::fromStdString(strMiscWarning)); exit(1); } -#ifndef BITCOIN_QT_TEST +#ifndef TRIANGLES_QT_TEST int main(int argc, char *argv[]) { // Do this early as we don't want to bother initializing if we are just calling IPC ipcScanRelay(argc, argv); +#if QT_VERSION < 0x050000 // Internal string conversion is all UTF-8 QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForCStrings(QTextCodec::codecForTr()); +#endif - Q_INIT_RESOURCE(bitcoin); + Q_INIT_RESOURCE(triangles); QApplication app(argc, argv); // Install global event filter that makes sure that long tooltips can be word-wrapped @@ -129,12 +132,12 @@ int main(int argc, char *argv[]) // Command-line options take precedence: ParseParameters(argc, argv); - // ... then bitcoin.conf: + // ... then triangles.conf: if (!boost::filesystem::is_directory(GetDataDir(false))) { // This message can not be translated, as translation is not initialized yet - // (which not yet possible because lang=XX can be overridden in bitcoin.conf in the data directory) - QMessageBox::critical(0, "triangles", + // (which not yet possible because lang=XX can be overridden in triangles.conf in the data directory) + QMessageBox::critical(0, "Triangles", QString("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"]))); return 1; } @@ -142,12 +145,12 @@ int main(int argc, char *argv[]) // Application identification (must be set before OptionsModel is initialized, // as it is used to locate QSettings) - app.setOrganizationName("triangles"); - app.setOrganizationDomain("triangles.su"); + app.setOrganizationName("Triangles"); + //XXX app.setOrganizationDomain(""); if(GetBoolArg("-testnet")) // Separate UI settings for testnet - app.setApplicationName("triangles-qt-testnet"); + app.setApplicationName("Triangles-Qt-testnet"); else - app.setApplicationName("triangles-qt"); + app.setApplicationName("Triangles-Qt"); // ... then GUI settings: OptionsModel optionsModel; @@ -171,11 +174,11 @@ int main(int argc, char *argv[]) if (qtTranslator.load("qt_" + lang_territory, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) app.installTranslator(&qtTranslator); - // Load e.g. bitcoin_de.qm (shortcut "de" needs to be defined in bitcoin.qrc) + // Load e.g. triangles_de.qm (shortcut "de" needs to be defined in triangles.qrc) if (translatorBase.load(lang, ":/translations/")) app.installTranslator(&translatorBase); - // Load e.g. bitcoin_de_DE.qm (shortcut "de_DE" needs to be defined in bitcoin.qrc) + // Load e.g. triangles_de_DE.qm (shortcut "de_DE" needs to be defined in triangles.qrc) if (translator.load(lang_territory, ":/translations/")) app.installTranslator(&translator); @@ -200,7 +203,6 @@ int main(int argc, char *argv[]) if (GetBoolArg("-splash", true) && !GetBoolArg("-min")) { splash.show(); - splash.setAutoFillBackground(true); splashref = &splash; } @@ -214,7 +216,7 @@ int main(int argc, char *argv[]) if (GUIUtil::GetStartOnSystemStartup()) GUIUtil::SetStartOnSystemStartup(true); - BitcoinGUI window; + TrianglesGUI window; guiref = &window; if(AppInit2()) { @@ -222,16 +224,16 @@ int main(int argc, char *argv[]) // Put this in a block, so that the Model objects are cleaned up before // calling Shutdown(). - optionsModel.Upgrade(); // Must be done after AppInit2 - if (splashref) splash.finish(&window); ClientModel clientModel(&optionsModel); WalletModel walletModel(pwalletMain, &optionsModel); + MessageModel messageModel(pwalletMain, &walletModel); window.setClientModel(&clientModel); window.setWalletModel(&walletModel); + window.setMessageModel(&messageModel); // If -min option passed, start window minimized. if(GetBoolArg("-min")) @@ -251,9 +253,10 @@ int main(int argc, char *argv[]) window.hide(); window.setClientModel(0); window.setWalletModel(0); + window.setMessageModel(0); guiref = 0; } - // Shutdown the core and its threads, but don't exit Bitcoin-Qt here + // Shutdown the core and its threads, but don't exit Triangles-Qt here Shutdown(NULL); } else @@ -267,4 +270,4 @@ int main(int argc, char *argv[]) } return 0; } -#endif // BITCOIN_QT_TEST +#endif // TRIANGLES_QT_TEST diff --git a/src/qt/triangles.qrc b/src/qt/triangles.qrc new file mode 100644 index 0000000..5186745 --- /dev/null +++ b/src/qt/triangles.qrc @@ -0,0 +1,97 @@ + + + res/icons/triangles.png + res/icons/triangles.png + res/icons/address-book.png + res/icons/quit.png + res/icons/send.png + res/icons/triangles-32.png + res/icons/connect0_16.png + res/icons/connect1_16.png + res/icons/connect2_16.png + res/icons/connect3_16.png + res/icons/connect4_16.png + res/icons/transaction0.png + res/icons/transaction2.png + res/icons/transaction_conflicted.png + res/icons/clock1.png + res/icons/clock2.png + res/icons/clock3.png + res/icons/clock4.png + res/icons/clock5.png + res/icons/configure.png + res/icons/receive.png + res/icons/editpaste.png + res/icons/editcopy.png + res/icons/add.png + res/icons/triangles.png + res/icons/triangles-32.png + res/icons/edit.png + res/icons/history.png + res/icons/overview.png + res/icons/export.png + res/icons/synced.png + res/icons/remove.png + res/icons/tx_mined.png + res/icons/tx_input.png + res/icons/tx_output.png + res/icons/tx_inout.png + res/icons/lock_closed.png + res/icons/lock_open.png + res/icons/key.png + res/icons/filesave.png + res/icons/qrcode.png + res/icons/debugwindow.png + res/icons/staking_off.png + res/icons/staking_on.png + + + res/images/about.png + res/images/splash.png + res/images/wallet.png + + + res/movies/update_spinner.mng + + + locale/triangles_ar.qm + locale/triangles_ca_ES.qm + locale/triangles_cs.qm + locale/triangles_da.qm + locale/triangles_de.qm + locale/triangles_el_GR.qm + locale/triangles_en.qm + locale/triangles_eo.qm + locale/triangles_es_CL.qm + locale/triangles_es_DO.qm + locale/triangles_es.qm + locale/triangles_fa.qm + locale/triangles_fi.qm + locale/triangles_fr_CA.qm + locale/triangles_fr.qm + locale/triangles_gl.qm + locale/triangles_he.qm + locale/triangles_hr.qm + locale/triangles_hu.qm + locale/triangles_it.qm + locale/triangles_ja.qm + locale/triangles_ka.qm + locale/triangles_ko_KR.qm + locale/triangles_lt.qm + locale/triangles_nb.qm + locale/triangles_nl.qm + locale/triangles_pam.qm + locale/triangles_pl.qm + locale/triangles_pt_BR.qm + locale/triangles_pt_PT.qm + locale/triangles_ro_RO.qm + locale/triangles_ru.qm + locale/triangles_sk.qm + locale/triangles_sl_SI.qm + locale/triangles_sv.qm + locale/triangles_tr.qm + locale/triangles_uk.qm + locale/triangles_zh_CN.qm + locale/triangles_zh_TW.qm + + diff --git a/src/qt/bitcoinaddressvalidator.cpp b/src/qt/trianglesaddressvalidator.cpp similarity index 90% rename from src/qt/bitcoinaddressvalidator.cpp rename to src/qt/trianglesaddressvalidator.cpp index 5136ea0..50a7492 100644 --- a/src/qt/bitcoinaddressvalidator.cpp +++ b/src/qt/trianglesaddressvalidator.cpp @@ -1,4 +1,4 @@ -#include "bitcoinaddressvalidator.h" +#include "trianglesaddressvalidator.h" /* Base58 characters are: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" @@ -13,12 +13,12 @@ - '0' and 'O' to 'o' */ -BitcoinAddressValidator::BitcoinAddressValidator(QObject *parent) : +TrianglesAddressValidator::TrianglesAddressValidator(QObject *parent) : QValidator(parent) { } -QValidator::State BitcoinAddressValidator::validate(QString &input, int &pos) const +QValidator::State TrianglesAddressValidator::validate(QString &input, int &pos) const { // Correction for(int idx=0; idx + +/** Base48 entry widget validator. + Corrects near-miss characters and refuses characters that are no part of base48. + */ +class TrianglesAddressValidator : public QValidator +{ + Q_OBJECT +public: + explicit TrianglesAddressValidator(QObject *parent = 0); + + State validate(QString &input, int &pos) const; + + static const int MaxAddressLength = 128; +signals: + +public slots: + +}; + +#endif // TRIANGLESADDRESSVALIDATOR_H diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/trianglesamountfield.cpp similarity index 73% rename from src/qt/bitcoinamountfield.cpp rename to src/qt/trianglesamountfield.cpp index 9514ec8..d0e2b57 100644 --- a/src/qt/bitcoinamountfield.cpp +++ b/src/qt/trianglesamountfield.cpp @@ -1,6 +1,6 @@ -#include "bitcoinamountfield.h" +#include "trianglesamountfield.h" #include "qvaluecombobox.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "guiconstants.h" @@ -14,7 +14,7 @@ #include #include -BitcoinAmountField::BitcoinAmountField(QWidget *parent): +TrianglesAmountField::TrianglesAmountField(QWidget *parent): QWidget(parent), amount(0), currentUnit(-1) { amount = new QDoubleSpinBox(this); @@ -27,7 +27,7 @@ BitcoinAmountField::BitcoinAmountField(QWidget *parent): QHBoxLayout *layout = new QHBoxLayout(this); layout->addWidget(amount); unit = new QValueComboBox(this); - unit->setModel(new BitcoinUnits(this)); + unit->setModel(new TrianglesUnits(this)); layout->addWidget(unit); layout->addStretch(1); layout->setContentsMargins(0,0,0,0); @@ -45,7 +45,7 @@ BitcoinAmountField::BitcoinAmountField(QWidget *parent): unitChanged(unit->currentIndex()); } -void BitcoinAmountField::setText(const QString &text) +void TrianglesAmountField::setText(const QString &text) { if (text.isEmpty()) amount->clear(); @@ -53,18 +53,18 @@ void BitcoinAmountField::setText(const QString &text) amount->setValue(text.toDouble()); } -void BitcoinAmountField::clear() +void TrianglesAmountField::clear() { amount->clear(); unit->setCurrentIndex(0); } -bool BitcoinAmountField::validate() +bool TrianglesAmountField::validate() { bool valid = true; if (amount->value() == 0.0) valid = false; - if (valid && !BitcoinUnits::parse(currentUnit, text(), 0)) + if (valid && !TrianglesUnits::parse(currentUnit, text(), 0)) valid = false; setValid(valid); @@ -72,7 +72,7 @@ bool BitcoinAmountField::validate() return valid; } -void BitcoinAmountField::setValid(bool valid) +void TrianglesAmountField::setValid(bool valid) { if (valid) amount->setStyleSheet(""); @@ -80,7 +80,7 @@ void BitcoinAmountField::setValid(bool valid) amount->setStyleSheet(STYLE_INVALID); } -QString BitcoinAmountField::text() const +QString TrianglesAmountField::text() const { if (amount->text().isEmpty()) return QString(); @@ -88,7 +88,7 @@ QString BitcoinAmountField::text() const return amount->text(); } -bool BitcoinAmountField::eventFilter(QObject *object, QEvent *event) +bool TrianglesAmountField::eventFilter(QObject *object, QEvent *event) { if (event->type() == QEvent::FocusIn) { @@ -109,16 +109,16 @@ bool BitcoinAmountField::eventFilter(QObject *object, QEvent *event) return QWidget::eventFilter(object, event); } -QWidget *BitcoinAmountField::setupTabChain(QWidget *prev) +QWidget *TrianglesAmountField::setupTabChain(QWidget *prev) { QWidget::setTabOrder(prev, amount); return amount; } -qint64 BitcoinAmountField::value(bool *valid_out) const +qint64 TrianglesAmountField::value(bool *valid_out) const { qint64 val_out = 0; - bool valid = BitcoinUnits::parse(currentUnit, text(), &val_out); + bool valid = TrianglesUnits::parse(currentUnit, text(), &val_out); if(valid_out) { *valid_out = valid; @@ -126,18 +126,18 @@ qint64 BitcoinAmountField::value(bool *valid_out) const return val_out; } -void BitcoinAmountField::setValue(qint64 value) +void TrianglesAmountField::setValue(qint64 value) { - setText(BitcoinUnits::format(currentUnit, value)); + setText(TrianglesUnits::format(currentUnit, value)); } -void BitcoinAmountField::unitChanged(int idx) +void TrianglesAmountField::unitChanged(int idx) { // Use description tooltip for current unit for the combobox unit->setToolTip(unit->itemData(idx, Qt::ToolTipRole).toString()); // Determine new unit ID - int newUnit = unit->itemData(idx, BitcoinUnits::UnitRole).toInt(); + int newUnit = unit->itemData(idx, TrianglesUnits::UnitRole).toInt(); // Parse current value and convert to new unit bool valid = false; @@ -146,8 +146,8 @@ void BitcoinAmountField::unitChanged(int idx) currentUnit = newUnit; // Set max length after retrieving the value, to prevent truncation - amount->setDecimals(BitcoinUnits::decimals(currentUnit)); - amount->setMaximum(qPow(10, BitcoinUnits::amountDigits(currentUnit)) - qPow(10, -amount->decimals())); + amount->setDecimals(TrianglesUnits::decimals(currentUnit)); + amount->setMaximum(qPow(10, TrianglesUnits::amountDigits(currentUnit)) - qPow(10, -amount->decimals())); if(valid) { @@ -162,7 +162,7 @@ void BitcoinAmountField::unitChanged(int idx) setValid(true); } -void BitcoinAmountField::setDisplayUnit(int newUnit) +void TrianglesAmountField::setDisplayUnit(int newUnit) { unit->setValue(newUnit); } diff --git a/src/qt/bitcoinamountfield.h b/src/qt/trianglesamountfield.h similarity index 85% rename from src/qt/bitcoinamountfield.h rename to src/qt/trianglesamountfield.h index 8bf8535..95c878f 100644 --- a/src/qt/bitcoinamountfield.h +++ b/src/qt/trianglesamountfield.h @@ -1,5 +1,5 @@ -#ifndef BITCOINFIELD_H -#define BITCOINFIELD_H +#ifndef TRIANGLESFIELD_H +#define TRIANGLESFIELD_H #include @@ -8,14 +8,14 @@ class QDoubleSpinBox; class QValueComboBox; QT_END_NAMESPACE -/** Widget for entering bitcoin amounts. +/** Widget for entering TRI amounts. */ -class BitcoinAmountField: public QWidget +class TrianglesAmountField: public QWidget { Q_OBJECT Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY textChanged USER true) public: - explicit BitcoinAmountField(QWidget *parent = 0); + explicit TrianglesAmountField(QWidget *parent = 0); qint64 value(bool *valid=0) const; void setValue(qint64 value); @@ -35,8 +35,6 @@ public: in these cases we have to set it up manually. */ QWidget *setupTabChain(QWidget *prev); - - QString text() const; signals: void textChanged(); @@ -51,6 +49,7 @@ private: int currentUnit; void setText(const QString &text); + QString text() const; private slots: void unitChanged(int idx); @@ -58,4 +57,4 @@ private slots: }; -#endif // BITCOINFIELD_H +#endif // TRIANGLESFIELD_H diff --git a/src/qt/bitcoingui.cpp b/src/qt/trianglesgui.cpp similarity index 68% rename from src/qt/bitcoingui.cpp rename to src/qt/trianglesgui.cpp index b4d904a..f26c0f2 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/trianglesgui.cpp @@ -1,35 +1,36 @@ /* - * Qt4 bitcoin GUI. + * Qt4 Triangles GUI. * * W.J. van der Laan 2011-2012 - * The Bitcoin Developers 2011-2012 + * The Bitcoin developers 2011-2012 */ -#include "bitcoingui.h" +#include "trianglesgui.h" #include "transactiontablemodel.h" #include "addressbookpage.h" +#include "messagepage.h" #include "sendcoinsdialog.h" #include "signverifymessagedialog.h" #include "optionsdialog.h" #include "aboutdialog.h" #include "clientmodel.h" #include "walletmodel.h" +#include "messagemodel.h" #include "editaddressdialog.h" #include "optionsmodel.h" #include "transactiondescdialog.h" #include "addresstablemodel.h" #include "transactionview.h" #include "overviewpage.h" -#include "bitcoinunits.h" +#include "trianglesunits.h" #include "guiconstants.h" #include "askpassphrasedialog.h" #include "notificator.h" #include "guiutil.h" #include "rpcconsole.h" #include "wallet.h" -#include "bitcoinrpc.h" #ifdef Q_OS_MAC -#include "macdockiconhandler.hh" +#include "macdockiconhandler.h" #endif #include @@ -46,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -56,30 +58,55 @@ #include #include #include +#include +#include +#include #include -extern CWallet *pwalletMain; -extern int64 nLastCoinStakeSearchInterval; -extern unsigned int nStakeTargetSpacing; +extern CWallet* pwalletMain; +extern int64_t nLastCoinStakeSearchInterval; +extern unsigned int nTargetSpacing; +double GetPoSKernelPS(); -BitcoinGUI::BitcoinGUI(QWidget *parent): +ActiveLabel::ActiveLabel(const QString & text, QWidget * parent): + QLabel(parent){} + +void ActiveLabel::mouseReleaseEvent(QMouseEvent * event) +{ + emit clicked(); +} + +TrianglesGUI::TrianglesGUI(QWidget *parent): QMainWindow(parent), clientModel(0), walletModel(0), encryptWalletAction(0), changePassphraseAction(0), - lockWalletToggleAction(0), + unlockWalletAction(0), + lockWalletAction(0), aboutQtAction(0), trayIcon(0), notificator(0), rpcConsole(0) { - resize(850, 550); + resize(1000, 650); setWindowTitle(tr("Triangles") + " - " + tr("Wallet")); + // Prevent resizing. + //setFixedSize(size()); + // Remove "hand" cursor from status bar. + this->statusBar()->setSizeGripEnabled(false); + + this->setStyleSheet(".TrianglesGUI \ + QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; } \ + QToolButton:on { \ + border: 1px solid #00baff; \ + border-radius: 4px; \ + } \ + "); #ifndef Q_OS_MAC - qApp->setWindowIcon(QIcon(":icons/bitcoin")); - setWindowIcon(QIcon(":icons/bitcoin")); + qApp->setWindowIcon(QIcon(":icons/triangles")); + setWindowIcon(QIcon(":icons/triangles")); #else setUnifiedTitleAndToolBarOnMac(true); QApplication::setAttribute(Qt::AA_DontShowIconsInMenus); @@ -87,9 +114,6 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): // Accept D&D of URIs setAcceptDrops(true); - setObjectName("trianglesApp"); - setStyleSheet("#trianglesApp { background-color: qlineargradient(spread:pad, x1:0.2, y1:0, x2:0.9, y2:1, stop:0 #A8A7A7, stop:0.4 #DFD5D5, stop:0.5 #E1D5D5, stop:0.6 #DFD5D5, stop:1 #A8A7A7); } QToolTip { color: #121212; background-color: #858484; border:0px; border-radius:10px} "); - // Create actions for the toolbar, menu bar and tray/dock icon createActions(); @@ -103,21 +127,28 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): createTrayIcon(); // Create tabs - overviewPage = new OverviewPage(); - - transactionsPage = new QWidget(this); - QVBoxLayout *vbox = new QVBoxLayout(); - transactionView = new TransactionView(this); - vbox->addWidget(transactionView); - transactionsPage->setLayout(vbox); + overviewPage = new OverviewPage(this); + { + transactionsPage = new QWidget(this); + QHBoxLayout* hl = new QHBoxLayout(transactionsPage); + QFrame* frameMain = new QFrame(transactionsPage); + hl->addWidget(frameMain); + //frameMain->setObjectName(QStringLiteral("frameMain")); + frameMain->setFrameShape(QFrame::NoFrame); + QVBoxLayout *vbox = new QVBoxLayout(frameMain); + transactionView = new TransactionView(transactionsPage); + vbox->addWidget(transactionView); + frameMain->setLayout(vbox); + } addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab); receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab); sendCoinsPage = new SendCoinsDialog(this); + messagePage = new MessagePage(this); - signVerifyMessageDialog = new SignVerifyMessageDialog(this); + signVerifyMessageDialog.reset(new SignVerifyMessageDialog); centralWidget = new QStackedWidget(this); centralWidget->addWidget(overviewPage); @@ -125,6 +156,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): centralWidget->addWidget(addressBookPage); centralWidget->addWidget(receiveCoinsPage); centralWidget->addWidget(sendCoinsPage); + centralWidget->addWidget(messagePage); setCentralWidget(centralWidget); // Create status bar @@ -138,41 +170,26 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): frameBlocksLayout->setContentsMargins(3,0,3,0); frameBlocksLayout->setSpacing(3); labelEncryptionIcon = new QLabel(); - labelMintingIcon = new QLabel(); + labelStakingIcon = new QLabel(); labelConnectionsIcon = new QLabel(); labelBlocksIcon = new QLabel(); frameBlocksLayout->addStretch(); frameBlocksLayout->addWidget(labelEncryptionIcon); frameBlocksLayout->addStretch(); - frameBlocksLayout->addWidget(labelMintingIcon); + frameBlocksLayout->addWidget(labelStakingIcon); frameBlocksLayout->addStretch(); frameBlocksLayout->addWidget(labelConnectionsIcon); frameBlocksLayout->addStretch(); frameBlocksLayout->addWidget(labelBlocksIcon); frameBlocksLayout->addStretch(); - labelEncryptionIcon->setObjectName("labelEncryptionIcon"); - labelConnectionsIcon->setObjectName("labelConnectionsIcon"); - labelBlocksIcon->setObjectName("labelBlocksIcon"); - labelMintingIcon->setObjectName("labelMintingIcon"); - labelEncryptionIcon->setStyleSheet("#labelEncryptionIcon QToolTip {color:#121212;background-color:#545454;border:0px;}"); - labelConnectionsIcon->setStyleSheet("#labelConnectionsIcon QToolTip {color:#121212;background-color:#545454;border:0px;}"); - labelBlocksIcon->setStyleSheet("#labelBlocksIcon QToolTip {color:#121212;background-color:#545454;border:0px;}"); - labelMintingIcon->setStyleSheet("#labelMintingIcon QToolTip {color:#121212;background-color:#545454;border:0px;}"); - - // Set minting pixmap - labelMintingIcon->setPixmap(QIcon(":/icons/minting").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); - labelMintingIcon->setEnabled(false); - // Add timer to update minting icon - QTimer *timerMintingIcon = new QTimer(labelMintingIcon); - timerMintingIcon->start(MODEL_UPDATE_DELAY); - connect(timerMintingIcon, SIGNAL(timeout()), this, SLOT(updateMintingIcon())); - // Add timer to update minting weights - QTimer *timerMintingWeights = new QTimer(labelMintingIcon); - timerMintingWeights->start(30 * 1000); - connect(timerMintingWeights, SIGNAL(timeout()), this, SLOT(updateMintingWeights())); - // Set initial values for user and network weights - nWeight, nNetworkWeight = 0; + if (GetBoolArg("-staking", true)) + { + QTimer *timerStakingIcon = new QTimer(labelStakingIcon); + connect(timerStakingIcon, SIGNAL(timeout()), this, SLOT(updateStakingIcon())); + timerStakingIcon->start(30 * 1000); + updateStakingIcon(); + } // Progress bar and label for blocks download progressBarLabel = new QLabel(); @@ -187,14 +204,12 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): QString curStyle = qApp->style()->metaObject()->className(); if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle") { - progressBar->setStyleSheet("QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #FF8000, stop: 1 orange); border-radius: 7px; margin: 0px; }"); + progressBar->setStyleSheet("QProgressBar { background-color: #e8e8e8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #828282, stop: 1 #D1D1D1); border-radius: 7px; margin: 0px; }"); } statusBar()->addWidget(progressBarLabel); statusBar()->addWidget(progressBar); statusBar()->addPermanentWidget(frameBlocks); - statusBar()->setObjectName("trianglesStatusBar"); - statusBar()->setStyleSheet("#trianglesStatusBar { border-top-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #303030, stop:0.5 #696969, stop:1.0 #696969); border-top-width: 1px; border-top-style: inset; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #757575, stop:1.0 #979797); color: #b2b2b2; } QToolTip { color: #121212; background-color: #545454; border:0px;}"); syncIconMovie = new QMovie(":/movies/update_spinner", "mng", this); @@ -205,8 +220,8 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): // 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())); + rpcConsole.reset(new RPCConsole); + connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole.data(), 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))); @@ -216,7 +231,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): gotoOverviewPage(); } -BitcoinGUI::~BitcoinGUI() +TrianglesGUI::~TrianglesGUI() { if(trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu) trayIcon->hide(); @@ -225,7 +240,7 @@ BitcoinGUI::~BitcoinGUI() #endif } -void BitcoinGUI::createActions() +void TrianglesGUI::createActions() { QActionGroup *tabGroup = new QActionGroup(this); @@ -236,7 +251,7 @@ void BitcoinGUI::createActions() tabGroup->addAction(overviewAction); sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send coins"), this); - sendCoinsAction->setToolTip(tr("Send coins to a triangles address")); + sendCoinsAction->setToolTip(tr("Send coins to a TRI address")); sendCoinsAction->setCheckable(true); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); @@ -259,6 +274,11 @@ void BitcoinGUI::createActions() addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); tabGroup->addAction(addressBookAction); + messageAction = new QAction(QIcon(":/icons/edit"), tr("&Messages"), this); + messageAction->setToolTip(tr("View and Send Encrypted messages")); + messageAction->setCheckable(true); + messageAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6)); + tabGroup->addAction(messageAction); connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); @@ -269,21 +289,23 @@ void BitcoinGUI::createActions() connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); connect(addressBookAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(addressBookAction, SIGNAL(triggered()), this, SLOT(gotoAddressBookPage())); + connect(messageAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); + connect(messageAction, SIGNAL(triggered()), this, SLOT(gotoMessagePage())); quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this); 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 triangles"), this); - aboutAction->setToolTip(tr("Show information about triangles")); + aboutAction = new QAction(QIcon(":/icons/triangles"), tr("&About Triangles"), this); + aboutAction->setToolTip(tr("Show information about Triangles")); aboutAction->setMenuRole(QAction::AboutRole); aboutQtAction = new QAction(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this); aboutQtAction->setToolTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this); - optionsAction->setToolTip(tr("Modify configuration options for triangles")); + optionsAction->setToolTip(tr("Modify configuration options for Triangles")); optionsAction->setMenuRole(QAction::PreferencesRole); - toggleHideAction = new QAction(QIcon(":/icons/bitcoin"), tr("&Show / Hide"), this); + toggleHideAction = new QAction(QIcon(":/icons/triangles"), tr("&Show / Hide"), this); encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this); encryptWalletAction->setToolTip(tr("Encrypt or decrypt wallet")); encryptWalletAction->setCheckable(true); @@ -291,7 +313,10 @@ void BitcoinGUI::createActions() backupWalletAction->setToolTip(tr("Backup wallet to another location")); changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this); changePassphraseAction->setToolTip(tr("Change the passphrase used for wallet encryption")); - lockWalletToggleAction = new QAction(this); + unlockWalletAction = new QAction(QIcon(":/icons/lock_open"), tr("&Unlock Wallet..."), this); + unlockWalletAction->setToolTip(tr("Unlock wallet")); + lockWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Lock Wallet"), this); + lockWalletAction->setToolTip(tr("Lock wallet")); signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this); verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this); @@ -308,12 +333,13 @@ void BitcoinGUI::createActions() connect(encryptWalletAction, SIGNAL(triggered(bool)), this, SLOT(encryptWallet(bool))); connect(backupWalletAction, SIGNAL(triggered()), this, SLOT(backupWallet())); connect(changePassphraseAction, SIGNAL(triggered()), this, SLOT(changePassphrase())); - connect(lockWalletToggleAction, SIGNAL(triggered()), this, SLOT(lockWalletToggle())); + connect(unlockWalletAction, SIGNAL(triggered()), this, SLOT(unlockWallet())); + connect(lockWalletAction, SIGNAL(triggered()), this, SLOT(lockWallet())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab())); } -void BitcoinGUI::createMenuBar() +void TrianglesGUI::createMenuBar() { #ifdef Q_OS_MAC // Create a decoupled menu bar on Mac which stays even if the window is closed @@ -335,7 +361,8 @@ void BitcoinGUI::createMenuBar() QMenu *settings = appMenuBar->addMenu(tr("&Settings")); settings->addAction(encryptWalletAction); settings->addAction(changePassphraseAction); - settings->addAction(lockWalletToggleAction); + settings->addAction(unlockWalletAction); + settings->addAction(lockWalletAction); settings->addSeparator(); settings->addAction(optionsAction); @@ -344,12 +371,9 @@ void BitcoinGUI::createMenuBar() help->addSeparator(); help->addAction(aboutAction); help->addAction(aboutQtAction); - - // QString ss("QMenuBar::item { background-color: #effbef; color: black }"); - // appMenuBar->setStyleSheet(ss); } -void BitcoinGUI::createToolBars() +void TrianglesGUI::createToolBars() { QToolBar *toolbar = addToolBar(tr("Tabs toolbar")); toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -358,22 +382,15 @@ void BitcoinGUI::createToolBars() toolbar->addAction(receiveCoinsAction); toolbar->addAction(historyAction); toolbar->addAction(addressBookAction); + toolbar->addAction(messageAction); QToolBar *toolbar2 = addToolBar(tr("Actions toolbar")); toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - toolbar2->addAction(lockWalletToggleAction); toolbar2->addAction(exportAction); - - toolbar->setObjectName("tabsToolbar"); - toolbar2->setObjectName("actionsToolbar"); - //toolbar->setStyleSheet("QToolButton { min-height:36px;color:#b2b2b2;border:none;margin:0px;padding:0px;} QToolButton:hover { color: #A84408; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #757575, stop:1.0 #979797); margin:0px; padding:0px; border:none; } QToolButton:checked { color: #A84408; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #757575, stop:1.0 #979797); margin:0px; padding:0px; border-right-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #3b3b3b, stop:0.5 #6c6c6f, stop:1.0 #6c6c6f);border-right-width:3px;border-right-style:inset; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #2a2a2a, stop:0.5 #5f5b5b, stop:1.0 #5b5b5e);border-left-width:2px;border-left-style:inset; } QToolButton:pressed { color: #A84408; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #757575, stop:1.0 #979797); margin:0px; padding:0px; border:none;} QToolButton:selected { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #474748, stop:1.0 #353536); margin:0px;padding:0px;border:none; } #tabsToolbar { min-height:48px; color: #b2b2b2; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #745445, stop:1.0 #757575); margin:0px; padding:0px; border-top-color: rgba(160, 160, 160, 191); border-top-width: 1px; border-top-style: inset; } QToolBar::handle { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #745445, stop:1.0 #757575); }"); - - - - //toolbar2->setStyleSheet("QToolButton { min-height:36px;color:#b2b2b2;border:none;margin:0px;padding:0px;} QToolButton:hover { color: #A84408; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #757575, stop:1.0 #979797); margin:0px; padding:0px; border:none; } QToolButton:checked { color: #A84408; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #757575, stop:1.0 #979797); margin:0px; padding:0px; border-right-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #3b3b3b, stop:0.5 #6c6c6f, stop:1.0 #6c6c6f);border-right-width:3px;border-right-style:inset; border-left-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #2a2a2a, stop:0.5 #5f5b5b, stop:1.0 #5b5b5e);border-left-width:2px;border-left-style:inset; } QToolButton:pressed { color: #A84408; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #757575, stop:1.0 #979797); margin:0px; padding:0px; border:none;} QToolButton:selected { color: #ffffff; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #474748, stop:1.0 #353536); margin:0px;padding:0px;border:none; } #actionsToolbar { min-height:48px; color: #b2b2b2; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #745445, stop:1.0 #757575); margin:0px; padding:0px; border-top-color: rgba(160, 160, 160, 191); border-top-width: 1px; border-top-style: inset; } QToolBar::handle { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #745445, stop:1.0 #757575); }"); + toolbar2->setMovable(false); } -void BitcoinGUI::setClientModel(ClientModel *clientModel) +void TrianglesGUI::setClientModel(ClientModel *clientModel) { this->clientModel = clientModel; if(clientModel) @@ -383,14 +400,14 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) { setWindowTitle(windowTitle() + QString(" ") + tr("[testnet]")); #ifndef Q_OS_MAC - qApp->setWindowIcon(QIcon(":icons/bitcoin_testnet")); - setWindowIcon(QIcon(":icons/bitcoin_testnet")); + qApp->setWindowIcon(QIcon(":icons/triangles_testnet")); + setWindowIcon(QIcon(":icons/triangles_testnet")); #else - MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin_testnet")); + MacDockIconHandler::instance()->setIcon(QIcon(":icons/triangles_testnet")); #endif if(trayIcon) { - trayIcon->setToolTip(tr("triangles client") + QString(" ") + tr("[testnet]")); + trayIcon->setToolTip(tr("Triangles client") + QString(" ") + tr("[testnet]")); trayIcon->setIcon(QIcon(":/icons/toolbar_testnet")); toggleHideAction->setIcon(QIcon(":/icons/toolbar_testnet")); } @@ -414,7 +431,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) } } -void BitcoinGUI::setWalletModel(WalletModel *walletModel) +void TrianglesGUI::setWalletModel(WalletModel *walletModel) { this->walletModel = walletModel; if(walletModel) @@ -436,30 +453,47 @@ void BitcoinGUI::setWalletModel(WalletModel *walletModel) // Balloon pop-up for new transaction connect(walletModel->getTransactionTableModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), - this, SLOT(incomingTransaction(QModelIndex,int,int))); + this, SLOT(incomingTransaction(QModelIndex,int,int))); // Ask for passphrase if needed connect(walletModel, SIGNAL(requireUnlock()), this, SLOT(unlockWallet())); } } -void BitcoinGUI::createTrayIcon() +void TrianglesGUI::setMessageModel(MessageModel *messageModel) +{ + this->messageModel = messageModel; + if(messageModel) + { + // Report errors from message thread + connect(messageModel, SIGNAL(error(QString,QString,bool)), this, SLOT(error(QString,QString,bool))); + + // Put transaction list in tabs + messagePage->setModel(messageModel); + + // Balloon pop-up for new message + connect(messageModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(incomingMessage(QModelIndex,int,int))); + } +} + +void TrianglesGUI::createTrayIcon() { QMenu *trayIconMenu; #ifndef Q_OS_MAC trayIcon = new QSystemTrayIcon(this); trayIconMenu = new QMenu(this); trayIcon->setContextMenu(trayIconMenu); - trayIcon->setToolTip(tr("triangles client")); + trayIcon->setToolTip(tr("Triangles client")); trayIcon->setIcon(QIcon(":/icons/toolbar")); connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), - this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason))); + this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason))); trayIcon->show(); #else // Note: On Mac, the dock icon is used to provide the tray's functionality. MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance(); + dockIconHandler->setMainWindow((QMainWindow *)this); trayIconMenu = dockIconHandler->dockMenu(); - dockIconHandler->setMainWindow((QMainWindow*)this); #endif // Configuration of the tray icon (or dock icon) icon menu @@ -482,7 +516,7 @@ void BitcoinGUI::createTrayIcon() } #ifndef Q_OS_MAC -void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason) +void TrianglesGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason) { if(reason == QSystemTrayIcon::Trigger) { @@ -492,7 +526,7 @@ void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason) } #endif -void BitcoinGUI::optionsClicked() +void TrianglesGUI::optionsClicked() { if(!clientModel || !clientModel->getOptionsModel()) return; @@ -501,14 +535,14 @@ void BitcoinGUI::optionsClicked() dlg.exec(); } -void BitcoinGUI::aboutClicked() +void TrianglesGUI::aboutClicked() { AboutDialog dlg; dlg.setModel(clientModel); dlg.exec(); } -void BitcoinGUI::setNumConnections(int count) +void TrianglesGUI::setNumConnections(int count) { QString icon; switch(count) @@ -520,10 +554,10 @@ void BitcoinGUI::setNumConnections(int count) default: icon = ":/icons/connect_4"; break; } labelConnectionsIcon->setPixmap(QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); - labelConnectionsIcon->setToolTip(tr("%n active connection(s) to triangles network.", "", count)); + labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Triangles network", "", count)); } -void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) +void TrianglesGUI::setNumBlocks(int count, int nTotalBlocks) { // don't show / hide progress bar and its label if we have no connection to the network if (!clientModel || clientModel->getNumConnections() == 0) @@ -570,7 +604,7 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) progressBarLabel->setVisible(true); progressBar->setVisible(false); } - + tooltip = tr("Current difficulty is %1.").arg(clientModel->GetDifficulty()) + QString("
") + tooltip; QDateTime lastBlockDate = clientModel->getLastBlockDate(); @@ -630,7 +664,7 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks) progressBar->setToolTip(tooltip); } -void BitcoinGUI::error(const QString &title, const QString &message, bool modal) +void TrianglesGUI::error(const QString &title, const QString &message, bool modal) { // Report errors from network/worker thread if(modal) @@ -641,7 +675,7 @@ void BitcoinGUI::error(const QString &title, const QString &message, bool modal) } } -void BitcoinGUI::changeEvent(QEvent *e) +void TrianglesGUI::changeEvent(QEvent *e) { QMainWindow::changeEvent(e); #ifndef Q_OS_MAC // Ignored on Mac @@ -660,13 +694,13 @@ void BitcoinGUI::changeEvent(QEvent *e) #endif } -void BitcoinGUI::closeEvent(QCloseEvent *event) +void TrianglesGUI::closeEvent(QCloseEvent *event) { if(clientModel) { #ifndef Q_OS_MAC // Ignored on Mac if(!clientModel->getOptionsModel()->getMinimizeToTray() && - !clientModel->getOptionsModel()->getMinimizeOnClose()) + !clientModel->getOptionsModel()->getMinimizeOnClose()) { qApp->quit(); } @@ -675,55 +709,84 @@ void BitcoinGUI::closeEvent(QCloseEvent *event) QMainWindow::closeEvent(event); } -void BitcoinGUI::askFee(qint64 nFeeRequired, bool *payFee) +void TrianglesGUI::askFee(qint64 nFeeRequired, bool *payFee) { QString strMessage = tr("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?").arg( - BitcoinUnits::formatWithUnit(BitcoinUnits::BTC, nFeeRequired)); + "which goes to the nodes that process your transaction and helps to support the network. " + "Do you want to pay the fee?").arg( + TrianglesUnits::formatWithUnit(TrianglesUnits::TRI, nFeeRequired)); QMessageBox::StandardButton retval = QMessageBox::question( - this, tr("Confirm transaction fee"), strMessage, - QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Yes); + this, tr("Confirm transaction fee"), strMessage, + QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Yes); *payFee = (retval == QMessageBox::Yes); } -void BitcoinGUI::incomingTransaction(const QModelIndex & parent, int start, int end) +void TrianglesGUI::incomingTransaction(const QModelIndex & parent, int start, int end) { if(!walletModel || !clientModel) return; TransactionTableModel *ttm = walletModel->getTransactionTableModel(); qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent) - .data(Qt::EditRole).toULongLong(); + .data(Qt::EditRole).toULongLong(); if(!clientModel->inInitialBlockDownload()) { // On new transaction, make an info balloon // Unless the initial block download is in progress, to prevent balloon-spam QString date = ttm->index(start, TransactionTableModel::Date, parent) - .data().toString(); + .data().toString(); QString type = ttm->index(start, TransactionTableModel::Type, parent) - .data().toString(); + .data().toString(); QString address = ttm->index(start, TransactionTableModel::ToAddress, parent) - .data().toString(); + .data().toString(); QIcon icon = qvariant_cast(ttm->index(start, - TransactionTableModel::ToAddress, parent) - .data(Qt::DecorationRole)); + TransactionTableModel::ToAddress, parent) + .data(Qt::DecorationRole)); notificator->notify(Notificator::Information, - (amount)<0 ? tr("Sent transaction") : - tr("Incoming transaction"), - tr("Date: %1\n" - "Amount: %2\n" - "Type: %3\n" - "Address: %4\n") - .arg(date) - .arg(BitcoinUnits::formatWithUnit(walletModel->getOptionsModel()->getDisplayUnit(), amount, true)) - .arg(type) - .arg(address), icon); + (amount)<0 ? tr("Sent transaction") : + tr("Incoming transaction"), + tr("Date: %1\n" + "Amount: %2\n" + "Type: %3\n" + "Address: %4\n") + .arg(date) + .arg(TrianglesUnits::formatWithUnit(walletModel->getOptionsModel()->getDisplayUnit(), amount, true)) + .arg(type) + .arg(address), icon); } } -void BitcoinGUI::gotoOverviewPage() +void TrianglesGUI::incomingMessage(const QModelIndex & parent, int start, int end) +{ + if(!messageModel) + return; + + MessageModel *mm = messageModel; + + if (mm->index(start, MessageModel::TypeInt, parent).data().toInt() == MessageTableEntry::Received) + { + QString sent_datetime = mm->index(start, MessageModel::ReceivedDateTime, parent).data().toString(); + QString from_address = mm->index(start, MessageModel::FromAddress, parent).data().toString(); + QString to_address = mm->index(start, MessageModel::ToAddress, parent).data().toString(); + QString message = mm->index(start, MessageModel::Message, parent).data().toString(); + QTextDocument html; + html.setHtml(message); + QString messageText(html.toPlainText()); + notificator->notify(Notificator::Information, + tr("Incoming Message"), + tr("Date: %1\n" + "From Address: %2\n" + "To Address: %3\n" + "Message: %4\n") + .arg(sent_datetime) + .arg(from_address) + .arg(to_address) + .arg(messageText)); + }; +} + +void TrianglesGUI::gotoOverviewPage() { overviewAction->setChecked(true); centralWidget->setCurrentWidget(overviewPage); @@ -732,7 +795,7 @@ void BitcoinGUI::gotoOverviewPage() disconnect(exportAction, SIGNAL(triggered()), 0, 0); } -void BitcoinGUI::gotoHistoryPage() +void TrianglesGUI::gotoHistoryPage() { historyAction->setChecked(true); centralWidget->setCurrentWidget(transactionsPage); @@ -742,7 +805,7 @@ void BitcoinGUI::gotoHistoryPage() connect(exportAction, SIGNAL(triggered()), transactionView, SLOT(exportClicked())); } -void BitcoinGUI::gotoAddressBookPage() +void TrianglesGUI::gotoAddressBookPage() { addressBookAction->setChecked(true); centralWidget->setCurrentWidget(addressBookPage); @@ -752,7 +815,7 @@ void BitcoinGUI::gotoAddressBookPage() connect(exportAction, SIGNAL(triggered()), addressBookPage, SLOT(exportClicked())); } -void BitcoinGUI::gotoReceiveCoinsPage() +void TrianglesGUI::gotoReceiveCoinsPage() { receiveCoinsAction->setChecked(true); centralWidget->setCurrentWidget(receiveCoinsPage); @@ -762,16 +825,26 @@ void BitcoinGUI::gotoReceiveCoinsPage() connect(exportAction, SIGNAL(triggered()), receiveCoinsPage, SLOT(exportClicked())); } -void BitcoinGUI::gotoSendCoinsPage() +void TrianglesGUI::gotoSendCoinsPage() { sendCoinsAction->setChecked(true); centralWidget->setCurrentWidget(sendCoinsPage); exportAction->setEnabled(false); - disconnect(exportAction, SIGNAL(triggered()), 0, 0); + disconnect(exportAction, SIGNAL(triggered()), 0, 0); } -void BitcoinGUI::gotoSignMessageTab(QString addr) +void TrianglesGUI::gotoMessagePage() +{ + messageAction->setChecked(true); + centralWidget->setCurrentWidget(messagePage); + + exportAction->setEnabled(true); + disconnect(exportAction, SIGNAL(triggered()), 0, 0); + connect(exportAction, SIGNAL(triggered()), messagePage, SLOT(exportClicked())); +} + +void TrianglesGUI::gotoSignMessageTab(QString addr) { // call show() in showTab_SM() signVerifyMessageDialog->showTab_SM(true); @@ -780,7 +853,7 @@ void BitcoinGUI::gotoSignMessageTab(QString addr) signVerifyMessageDialog->setAddress_SM(addr); } -void BitcoinGUI::gotoVerifyMessageTab(QString addr) +void TrianglesGUI::gotoVerifyMessageTab(QString addr) { // call show() in showTab_VM() signVerifyMessageDialog->showTab_VM(true); @@ -789,14 +862,14 @@ void BitcoinGUI::gotoVerifyMessageTab(QString addr) signVerifyMessageDialog->setAddress_VM(addr); } -void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event) +void TrianglesGUI::dragEnterEvent(QDragEnterEvent *event) { // Accept only URIs if(event->mimeData()->hasUrls()) event->acceptProposedAction(); } -void BitcoinGUI::dropEvent(QDropEvent *event) +void TrianglesGUI::dropEvent(QDropEvent *event) { if(event->mimeData()->hasUrls()) { @@ -812,13 +885,13 @@ void BitcoinGUI::dropEvent(QDropEvent *event) if (nValidUrisFound) gotoSendCoinsPage(); else - notificator->notify(Notificator::Warning, tr("URI handling"), tr("URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters.")); + notificator->notify(Notificator::Warning, tr("URI handling"), tr("URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters.")); } event->acceptProposedAction(); } -void BitcoinGUI::handleURI(QString strURI) +void TrianglesGUI::handleURI(QString strURI) { // URI has to be valid if (sendCoinsPage->handleURI(strURI)) @@ -827,60 +900,57 @@ void BitcoinGUI::handleURI(QString strURI) gotoSendCoinsPage(); } else - notificator->notify(Notificator::Warning, tr("URI handling"), tr("URI can not be parsed! This can be caused by an invalid triangles address or malformed URI parameters.")); + notificator->notify(Notificator::Warning, tr("URI handling"), tr("URI can not be parsed! This can be caused by an invalid TRI address or malformed URI parameters.")); } -void BitcoinGUI::setEncryptionStatus(int status) +void TrianglesGUI::setEncryptionStatus(int status) { switch(status) { case WalletModel::Unencrypted: labelEncryptionIcon->hide(); encryptWalletAction->setChecked(false); - encryptWalletAction->setEnabled(true); changePassphraseAction->setEnabled(false); - lockWalletToggleAction->setVisible(false); + unlockWalletAction->setVisible(false); + lockWalletAction->setVisible(false); + encryptWalletAction->setEnabled(true); break; case WalletModel::Unlocked: labelEncryptionIcon->show(); labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); - labelEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently unlocked.")); + labelEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently unlocked")); encryptWalletAction->setChecked(true); - encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported changePassphraseAction->setEnabled(true); - lockWalletToggleAction->setVisible(true); - lockWalletToggleAction->setIcon(QIcon(":/icons/lock_closed")); - lockWalletToggleAction->setText(tr("&Lock Wallet")); - lockWalletToggleAction->setToolTip(tr("Lock wallet")); + unlockWalletAction->setVisible(false); + lockWalletAction->setVisible(true); + encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported break; case WalletModel::Locked: labelEncryptionIcon->show(); labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); - labelEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently locked.")); + labelEncryptionIcon->setToolTip(tr("Wallet is encrypted and currently locked")); encryptWalletAction->setChecked(true); - encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported changePassphraseAction->setEnabled(true); - lockWalletToggleAction->setVisible(true); - lockWalletToggleAction->setIcon(QIcon(":/icons/lock_open")); - lockWalletToggleAction->setText(tr("&Unlock Wallet...")); - lockWalletToggleAction->setToolTip(tr("Unlock wallet")); + unlockWalletAction->setVisible(true); + lockWalletAction->setVisible(false); + encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported break; } } -void BitcoinGUI::encryptWallet(bool status) +void TrianglesGUI::encryptWallet(bool status) { if(!walletModel) return; AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt: - AskPassphraseDialog::Decrypt, this); + AskPassphraseDialog::Decrypt, this); dlg.setModel(walletModel); dlg.exec(); setEncryptionStatus(walletModel->getEncryptionStatus()); } -void BitcoinGUI::backupWallet() +void TrianglesGUI::backupWallet() { QString saveDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); QString filename = QFileDialog::getSaveFileName(this, tr("Backup Wallet"), saveDir, tr("Wallet Data (*.dat)")); @@ -891,31 +961,37 @@ void BitcoinGUI::backupWallet() } } -void BitcoinGUI::changePassphrase() +void TrianglesGUI::changePassphrase() { AskPassphraseDialog dlg(AskPassphraseDialog::ChangePass, this); dlg.setModel(walletModel); dlg.exec(); } -void BitcoinGUI::lockWalletToggle() +void TrianglesGUI::unlockWallet() { if(!walletModel) return; - // Unlock wallet when requested by wallet model if(walletModel->getEncryptionStatus() == WalletModel::Locked) { - AskPassphraseDialog::Mode mode = AskPassphraseDialog::UnlockMinting; + AskPassphraseDialog::Mode mode = sender() == unlockWalletAction ? + AskPassphraseDialog::UnlockStaking : AskPassphraseDialog::Unlock; AskPassphraseDialog dlg(mode, this); dlg.setModel(walletModel); dlg.exec(); } - else - walletModel->setWalletLocked(true); } -void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden) +void TrianglesGUI::lockWallet() +{ + if(!walletModel) + return; + + walletModel->setWalletLocked(true); +} + +void TrianglesGUI::showNormalIfMinimized(bool fToggleHidden) { // activateWindow() (sometimes) helps with keyboard focus on Windows if (isHidden()) @@ -937,36 +1013,21 @@ void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden) hide(); } -void BitcoinGUI::toggleHidden() +void TrianglesGUI::toggleHidden() { showNormalIfMinimized(true); } -void BitcoinGUI::updateMintingIcon() +void TrianglesGUI::updateStakingIcon() { - if (pwalletMain && pwalletMain->IsLocked()) + uint64_t nMinWeight = 0, nMaxWeight = 0, nWeight = 0; + if (pwalletMain) + pwalletMain->GetStakeWeight(*pwalletMain, nMinWeight, nMaxWeight, nWeight); + + if (nLastCoinStakeSearchInterval && nWeight) { - labelMintingIcon->setToolTip(tr("Not minting because wallet is locked.")); - labelMintingIcon->setEnabled(false); - } - else if (vNodes.empty()) - { - labelMintingIcon->setToolTip(tr("Not minting because wallet is offline.")); - labelMintingIcon->setEnabled(false); - } - else if (IsInitialBlockDownload()) - { - labelMintingIcon->setToolTip(tr("Not minting because wallet is syncing.")); - labelMintingIcon->setEnabled(false); - } - else if (!nWeight) - { - labelMintingIcon->setToolTip(tr("Not minting because you don't have mature coins.")); - labelMintingIcon->setEnabled(false); - } - else if (nLastCoinStakeSearchInterval) - { - uint64 nEstimateTime = nStakeTargetSpacing * nNetworkWeight / nWeight; + uint64_t nNetworkWeight = GetPoSKernelPS(); + unsigned nEstimateTime = nTargetSpacing * nNetworkWeight / nWeight; QString text; if (nEstimateTime < 60) @@ -986,26 +1047,21 @@ void BitcoinGUI::updateMintingIcon() text = tr("%n day(s)", "", nEstimateTime/(60*60*24)); } - labelMintingIcon->setEnabled(true); - labelMintingIcon->setToolTip(tr("Minting.
Your weight is %1.
Network weight is %2.
Expected time to earn reward is %3.").arg(nWeight).arg(nNetworkWeight).arg(text)); + labelStakingIcon->setPixmap(QIcon(":/icons/staking_on").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + labelStakingIcon->setToolTip(tr("Staking.
Your weight is %1
Network weight is %2
Expected time to earn reward is %3").arg(nWeight).arg(nNetworkWeight).arg(text)); } else { - labelMintingIcon->setToolTip(tr("Not minting.")); - labelMintingIcon->setEnabled(false); - } -} - -void BitcoinGUI::updateMintingWeights() -{ - // Only update if we have the network's current number of blocks, or weight(s) are zero (fixes lagging GUI) - if ((clientModel && clientModel->getNumBlocks() == clientModel->getNumBlocksOfPeers()) || !nWeight || !nNetworkWeight) - { - nWeight = 0; - - if (pwalletMain) - pwalletMain->GetStakeWeight(*pwalletMain, nMinMax, nMinMax, nWeight); - - nNetworkWeight = GetPoSKernelPS(); + labelStakingIcon->setPixmap(QIcon(":/icons/staking_off").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + if (pwalletMain && pwalletMain->IsLocked()) + labelStakingIcon->setToolTip(tr("Not staking because wallet is locked")); + else if (vNodes.empty()) + labelStakingIcon->setToolTip(tr("Not staking because wallet is offline")); + else if (IsInitialBlockDownload()) + labelStakingIcon->setToolTip(tr("Not staking because wallet is syncing")); + else if (!nWeight) + labelStakingIcon->setToolTip(tr("Not staking because you don't have mature coins")); + else + labelStakingIcon->setToolTip(tr("Not staking")); } } diff --git a/src/qt/bitcoingui.h b/src/qt/trianglesgui.h similarity index 74% rename from src/qt/bitcoingui.h rename to src/qt/trianglesgui.h index 395c81a..c1d4d39 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/trianglesgui.h @@ -1,17 +1,21 @@ -#ifndef BITCOINGUI_H -#define BITCOINGUI_H +#ifndef TRIANGLESGUI_H +#define TRIANGLESGUI_H #include #include +#include -#include "util.h" // for uint64 +#include +#include class TransactionTableModel; class ClientModel; class WalletModel; +class MessageModel; class TransactionView; class OverviewPage; class AddressBookPage; +class MessagePage; class SendCoinsDialog; class SignVerifyMessageDialog; class Notificator; @@ -28,26 +32,45 @@ class QStackedWidget; class QUrl; QT_END_NAMESPACE -/** - Bitcoin GUI main class. This class represents the main window of the Bitcoin UI. It communicates with both the client and - wallet models to give the user an up-to-date view of the current core state. -*/ -class BitcoinGUI : public QMainWindow +class ActiveLabel : public QLabel { Q_OBJECT public: - explicit BitcoinGUI(QWidget *parent = 0); - ~BitcoinGUI(); + ActiveLabel(const QString & text = "", QWidget * parent = 0); + ~ActiveLabel(){} + +signals: + void clicked(); + +protected: + void mouseReleaseEvent (QMouseEvent * event) ; + +}; +/** + Triangles GUI main class. This class represents the main window of the Triangles UI. It communicates with both the client and + wallet models to give the user an up-to-date view of the current core state. +*/ +class TrianglesGUI : public QMainWindow +{ + Q_OBJECT +public: + explicit TrianglesGUI(QWidget *parent = 0); + ~TrianglesGUI(); /** Set the client model. The client model represents the part of the core that communicates with the P2P network, and is wallet-agnostic. */ void setClientModel(ClientModel *clientModel); /** Set the wallet model. - The wallet model represents a bitcoin wallet, and offers access to the list of transactions, address book and sending + The wallet model represents a triangles wallet, and offers access to the list of transactions, address book and sending functionality. */ void setWalletModel(WalletModel *walletModel); + /** Set the message model. + The message model represents encryption message database, and offers access to the list of messages, address book and sending + functionality. + */ + void setMessageModel(MessageModel *messageModel); protected: void changeEvent(QEvent *e); @@ -58,6 +81,7 @@ protected: private: ClientModel *clientModel; WalletModel *walletModel; + MessageModel *messageModel; QStackedWidget *centralWidget; @@ -65,11 +89,12 @@ private: QWidget *transactionsPage; AddressBookPage *addressBookPage; AddressBookPage *receiveCoinsPage; + MessagePage *messagePage; SendCoinsDialog *sendCoinsPage; - SignVerifyMessageDialog *signVerifyMessageDialog; + QScopedPointer signVerifyMessageDialog; QLabel *labelEncryptionIcon; - QLabel *labelMintingIcon; + QLabel *labelStakingIcon; QLabel *labelConnectionsIcon; QLabel *labelBlocksIcon; QLabel *progressBarLabel; @@ -81,6 +106,7 @@ private: QAction *quitAction; QAction *sendCoinsAction; QAction *addressBookAction; + QAction *messageAction; QAction *signMessageAction; QAction *verifyMessageAction; QAction *aboutAction; @@ -91,21 +117,18 @@ private: QAction *encryptWalletAction; QAction *backupWalletAction; QAction *changePassphraseAction; - QAction *lockWalletToggleAction; + QAction *unlockWalletAction; + QAction *lockWalletAction; QAction *aboutQtAction; QAction *openRPCConsoleAction; QSystemTrayIcon *trayIcon; Notificator *notificator; TransactionView *transactionView; - RPCConsole *rpcConsole; + QScopedPointer rpcConsole; QMovie *syncIconMovie; - uint64 nMinMax; - uint64 nWeight; - uint64 nNetworkWeight; - /** Create the main UI actions. */ void createActions(); /** Create the menu bar and sub-menus. */ @@ -150,6 +173,8 @@ private slots: void gotoReceiveCoinsPage(); /** Switch to send coins page */ void gotoSendCoinsPage(); + /** Switch to message page */ + void gotoMessagePage(); /** Show Sign/Verify Message dialog and switch to sign message tab */ void gotoSignMessageTab(QString addr = ""); @@ -169,24 +194,30 @@ private slots: The new items are those between start and end inclusive, under the given parent item. */ void incomingTransaction(const QModelIndex & parent, int start, int end); + + /** Show incoming message notification for new messages. + + The new items are those between start and end inclusive, under the given parent item. + */ + void incomingMessage(const QModelIndex & parent, int start, int end); + /** Encrypt the wallet */ void encryptWallet(bool status); /** Backup the wallet */ void backupWallet(); /** Change encrypted wallet passphrase */ void changePassphrase(); - /** Toggle unlocking wallet temporarily */ - void lockWalletToggle(); + /** Ask for passphrase to unlock wallet temporarily */ + void unlockWallet(); + + void lockWallet(); /** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */ void showNormalIfMinimized(bool fToggleHidden = false); /** simply calls showNormalIfMinimized(true) for use in SLOT() macro */ void toggleHidden(); - /** Update info about minting */ - void updateMintingIcon(); - /** Update minting weight info */ - void updateMintingWeights(); + void updateStakingIcon(); }; #endif diff --git a/src/qt/trianglesstrings.cpp b/src/qt/trianglesstrings.cpp new file mode 100644 index 0000000..bacb13d --- /dev/null +++ b/src/qt/trianglesstrings.cpp @@ -0,0 +1,201 @@ +#include +// Automatically generated by extract_strings.py +#ifdef __GNUC__ +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif +static const char UNUSED *triangles_strings[] = {QT_TRANSLATE_NOOP("Triangles-core", "To use the %s option"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"%s, you must set a rpcpassword in the configuration file:\n" +" %s\n" +"It is recommended you use the following random password:\n" +"rpcuser=trianglesrpc\n" +"rpcpassword=%s\n" +"(you do not need to remember this password)\n" +"The username and password MUST NOT be the same.\n" +"If the file does not exist, create it with owner-readable-only file " +"permissions.\n" +"It is also recommended to set alertnotify so you are notified of problems;\n" +"for example: alertnotify=echo %%s | mail -s \"Triangles Alert\" admin@foo." +"com\n"), +QT_TRANSLATE_NOOP("Triangles-core", "Error"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"An error occurred while setting up the RPC port %u for listening on IPv6, " +"falling back to IPv4: %s"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"An error occurred while setting up the RPC port %u for listening on IPv4: %s"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"You must set rpcpassword= in the configuration file:\n" +"%s\n" +"If the file does not exist, create it with owner-readable-only file " +"permissions."), +QT_TRANSLATE_NOOP("Triangles-core", "Triangles version"), +QT_TRANSLATE_NOOP("Triangles-core", "Usage:"), +QT_TRANSLATE_NOOP("Triangles-core", "Send command to -server or trianglesd"), +QT_TRANSLATE_NOOP("Triangles-core", "List commands"), +QT_TRANSLATE_NOOP("Triangles-core", "Get help for a command"), +QT_TRANSLATE_NOOP("Triangles-core", "Triangles"), +QT_TRANSLATE_NOOP("Triangles-core", "Options:"), +QT_TRANSLATE_NOOP("Triangles-core", "This help message"), +QT_TRANSLATE_NOOP("Triangles-core", "Specify configuration file (default: triangles.conf)"), +QT_TRANSLATE_NOOP("Triangles-core", "Specify pid file (default: trianglesd.pid)"), +QT_TRANSLATE_NOOP("Triangles-core", "Specify data directory"), +QT_TRANSLATE_NOOP("Triangles-core", "Specify wallet file (within data directory)"), +QT_TRANSLATE_NOOP("Triangles-core", "Set database cache size in megabytes (default: 25)"), +QT_TRANSLATE_NOOP("Triangles-core", "Set database disk log size in megabytes (default: 100)"), +QT_TRANSLATE_NOOP("Triangles-core", "Specify connection timeout in milliseconds (default: 5000)"), +QT_TRANSLATE_NOOP("Triangles-core", "Connect through socks proxy"), +QT_TRANSLATE_NOOP("Triangles-core", "Select the version of socks proxy to use (4-5, default: 5)"), +QT_TRANSLATE_NOOP("Triangles-core", "Use proxy to reach tor hidden services (default: same as -proxy)"), +QT_TRANSLATE_NOOP("Triangles-core", "Allow DNS lookups for -addnode, -seednode and -connect"), +QT_TRANSLATE_NOOP("Triangles-core", "Listen for connections on (default: 15714 or testnet: 25714)"), +QT_TRANSLATE_NOOP("Triangles-core", "Maintain at most connections to peers (default: 125)"), +QT_TRANSLATE_NOOP("Triangles-core", "Add a node to connect to and attempt to keep the connection open"), +QT_TRANSLATE_NOOP("Triangles-core", "Connect only to the specified node(s)"), +QT_TRANSLATE_NOOP("Triangles-core", "Connect to a node to retrieve peer addresses, and disconnect"), +QT_TRANSLATE_NOOP("Triangles-core", "Specify your own public address"), +QT_TRANSLATE_NOOP("Triangles-core", "Only connect to nodes in network (IPv4, IPv6 or Tor)"), +QT_TRANSLATE_NOOP("Triangles-core", "Discover own IP address (default: 1 when listening and no -externalip)"), +QT_TRANSLATE_NOOP("Triangles-core", "Find peers using internet relay chat (default: 0)"), +QT_TRANSLATE_NOOP("Triangles-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"), +QT_TRANSLATE_NOOP("Triangles-core", "Bind to given address. Use [host]:port notation for IPv6"), +QT_TRANSLATE_NOOP("Triangles-core", "Find peers using DNS lookup (default: 1)"), +QT_TRANSLATE_NOOP("Triangles-core", "Stake your coins to support network and gain reward (default: 1)"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Sync time with other nodes. Disable if time on your system is precise e.g. " +"syncing with NTP (default: 1)"), +QT_TRANSLATE_NOOP("Triangles-core", "Sync checkpoints policy (default: strict)"), +QT_TRANSLATE_NOOP("Triangles-core", "Threshold for disconnecting misbehaving peers (default: 100)"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Number of seconds to keep misbehaving peers from reconnecting (default: " +"86400)"), +QT_TRANSLATE_NOOP("Triangles-core", "Maximum per-connection receive buffer, *1000 bytes (default: 5000)"), +QT_TRANSLATE_NOOP("Triangles-core", "Maximum per-connection send buffer, *1000 bytes (default: 1000)"), +QT_TRANSLATE_NOOP("Triangles-core", "Use UPnP to map the listening port (default: 1 when listening)"), +QT_TRANSLATE_NOOP("Triangles-core", "Use UPnP to map the listening port (default: 0)"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Detach block and address databases. Increases shutdown time (default: 0)"), +QT_TRANSLATE_NOOP("Triangles-core", "Fee per KB to add to transactions you send"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"When creating transactions, ignore inputs with value less than this " +"(default: 0.01)"), +QT_TRANSLATE_NOOP("Triangles-core", "Accept command line and JSON-RPC commands"), +QT_TRANSLATE_NOOP("Triangles-core", "Run in the background as a daemon and accept commands"), +QT_TRANSLATE_NOOP("Triangles-core", "Use the test network"), +QT_TRANSLATE_NOOP("Triangles-core", "Output extra debugging information. Implies all other -debug* options"), +QT_TRANSLATE_NOOP("Triangles-core", "Output extra network debugging information"), +QT_TRANSLATE_NOOP("Triangles-core", "Prepend debug output with timestamp"), +QT_TRANSLATE_NOOP("Triangles-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"), +QT_TRANSLATE_NOOP("Triangles-core", "Send trace/debug info to console instead of debug.log file"), +QT_TRANSLATE_NOOP("Triangles-core", "Send trace/debug info to debugger"), +QT_TRANSLATE_NOOP("Triangles-core", "Username for JSON-RPC connections"), +QT_TRANSLATE_NOOP("Triangles-core", "Password for JSON-RPC connections"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Listen for JSON-RPC connections on (default: 15715 or testnet: 25715)"), +QT_TRANSLATE_NOOP("Triangles-core", "Allow JSON-RPC connections from specified IP address"), +QT_TRANSLATE_NOOP("Triangles-core", "Send commands to node running on (default: 127.0.0.1)"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Execute command when the best block changes (%s in cmd is replaced by block " +"hash)"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Execute command when a wallet transaction changes (%s in cmd is replaced by " +"TxID)"), +QT_TRANSLATE_NOOP("Triangles-core", "Require a confirmations for change (default: 0)"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Enforce transaction scripts to use canonical PUSH operators (default: 1)"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Execute command when a relevant alert is received (%s in cmd is replaced by " +"message)"), +QT_TRANSLATE_NOOP("Triangles-core", "Upgrade wallet to latest format"), +QT_TRANSLATE_NOOP("Triangles-core", "Set key pool size to (default: 100)"), +QT_TRANSLATE_NOOP("Triangles-core", "Rescan the block chain for missing wallet transactions"), +QT_TRANSLATE_NOOP("Triangles-core", "Attempt to recover private keys from a corrupt wallet.dat"), +QT_TRANSLATE_NOOP("Triangles-core", "How many blocks to check at startup (default: 2500, 0 = all)"), +QT_TRANSLATE_NOOP("Triangles-core", "How thorough the block verification is (0-6, default: 1)"), +QT_TRANSLATE_NOOP("Triangles-core", "Imports blocks from external blk000?.dat file"), +QT_TRANSLATE_NOOP("Triangles-core", "Block creation options:"), +QT_TRANSLATE_NOOP("Triangles-core", "Set minimum block size in bytes (default: 0)"), +QT_TRANSLATE_NOOP("Triangles-core", "Set maximum block size in bytes (default: 250000)"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Set maximum size of high-priority/low-fee transactions in bytes (default: " +"27000)"), +QT_TRANSLATE_NOOP("Triangles-core", "SSL options: (see the Triangles Wiki for SSL setup instructions)"), +QT_TRANSLATE_NOOP("Triangles-core", "Use OpenSSL (https) for JSON-RPC connections"), +QT_TRANSLATE_NOOP("Triangles-core", "Server certificate file (default: server.cert)"), +QT_TRANSLATE_NOOP("Triangles-core", "Server private key (default: server.pem)"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:" +"@STRENGTH)"), +QT_TRANSLATE_NOOP("Triangles-core", "Invalid amount for -paytxfee=: '%s'"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Warning: -paytxfee is set very high! This is the transaction fee you will " +"pay if you send a transaction."), +QT_TRANSLATE_NOOP("Triangles-core", "Invalid amount for -mininput=: '%s'"), +QT_TRANSLATE_NOOP("Triangles-core", "Wallet %s resides outside data directory %s."), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Cannot obtain a lock on data directory %s. Triangles is probably already " +"running."), +QT_TRANSLATE_NOOP("Triangles-core", "Verifying database integrity..."), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Error initializing database environment %s! To recover, BACKUP THAT " +"DIRECTORY, then remove everything from it except for wallet.dat."), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as " +"wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect " +"you should restore from a backup."), +QT_TRANSLATE_NOOP("Triangles-core", "wallet.dat corrupt, salvage failed"), +QT_TRANSLATE_NOOP("Triangles-core", "Unknown -socks proxy version requested: %i"), +QT_TRANSLATE_NOOP("Triangles-core", "Unknown network specified in -onlynet: '%s'"), +QT_TRANSLATE_NOOP("Triangles-core", "Invalid -proxy address: '%s'"), +QT_TRANSLATE_NOOP("Triangles-core", "Invalid -tor address: '%s'"), +QT_TRANSLATE_NOOP("Triangles-core", "Cannot resolve -bind address: '%s'"), +QT_TRANSLATE_NOOP("Triangles-core", "Failed to listen on any port. Use -listen=0 if you want this."), +QT_TRANSLATE_NOOP("Triangles-core", "Cannot resolve -externalip address: '%s'"), +QT_TRANSLATE_NOOP("Triangles-core", "Invalid amount for -reservebalance="), +QT_TRANSLATE_NOOP("Triangles-core", "Unable to sign checkpoint, wrong checkpointkey?\n"), +QT_TRANSLATE_NOOP("Triangles-core", "Loading block index..."), +QT_TRANSLATE_NOOP("Triangles-core", "Error loading blkindex.dat"), +QT_TRANSLATE_NOOP("Triangles-core", "Loading wallet..."), +QT_TRANSLATE_NOOP("Triangles-core", "Error loading wallet.dat: Wallet corrupted"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Warning: error reading wallet.dat! All keys read correctly, but transaction " +"data or address book entries might be missing or incorrect."), +QT_TRANSLATE_NOOP("Triangles-core", "Error loading wallet.dat: Wallet requires newer version of Triangles"), +QT_TRANSLATE_NOOP("Triangles-core", "Wallet needed to be rewritten: restart Triangles to complete"), +QT_TRANSLATE_NOOP("Triangles-core", "Error loading wallet.dat"), +QT_TRANSLATE_NOOP("Triangles-core", "Cannot downgrade wallet"), +QT_TRANSLATE_NOOP("Triangles-core", "Cannot initialize keypool"), +QT_TRANSLATE_NOOP("Triangles-core", "Cannot write default address"), +QT_TRANSLATE_NOOP("Triangles-core", "Rescanning..."), +QT_TRANSLATE_NOOP("Triangles-core", "Importing blockchain data file."), +QT_TRANSLATE_NOOP("Triangles-core", "Importing bootstrap blockchain data file."), +QT_TRANSLATE_NOOP("Triangles-core", "Loading addresses..."), +QT_TRANSLATE_NOOP("Triangles-core", "Error: could not start node"), +QT_TRANSLATE_NOOP("Triangles-core", "Done loading"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Unable to bind to %s on this computer. Triangles is probably already running."), +QT_TRANSLATE_NOOP("Triangles-core", "Unable to bind to %s on this computer (bind returned error %d, %s)"), +QT_TRANSLATE_NOOP("Triangles-core", "Error: Wallet locked, unable to create transaction "), +QT_TRANSLATE_NOOP("Triangles-core", "Error: Wallet unlocked for staking only, unable to create transaction."), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Error: This transaction requires a transaction fee of at least %s because of " +"its amount, complexity, or use of recently received funds "), +QT_TRANSLATE_NOOP("Triangles-core", "Error: Transaction creation failed "), +QT_TRANSLATE_NOOP("Triangles-core", "Sending..."), +QT_TRANSLATE_NOOP("Triangles-core", "" +"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."), +QT_TRANSLATE_NOOP("Triangles-core", "Invalid amount"), +QT_TRANSLATE_NOOP("Triangles-core", "Insufficient funds"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"Warning: Please check that your computer's date and time are correct! If " +"your clock is wrong Triangles will not work properly."), +QT_TRANSLATE_NOOP("Triangles-core", "Warning: This version is obsolete, upgrade required!"), +QT_TRANSLATE_NOOP("Triangles-core", "WARNING: syncronized checkpoint violation detected, but skipped!"), +QT_TRANSLATE_NOOP("Triangles-core", "Warning: Disk space is low!"), +QT_TRANSLATE_NOOP("Triangles-core", "" +"WARNING: Invalid checkpoint found! Displayed transactions may not be " +"correct! You may need to upgrade, or notify developers."), +}; diff --git a/src/qt/bitcoinunits.cpp b/src/qt/trianglesunits.cpp similarity index 65% rename from src/qt/bitcoinunits.cpp rename to src/qt/trianglesunits.cpp index 7563194..a27bcc1 100644 --- a/src/qt/bitcoinunits.cpp +++ b/src/qt/trianglesunits.cpp @@ -1,91 +1,91 @@ -#include "bitcoinunits.h" +#include "trianglesunits.h" #include -BitcoinUnits::BitcoinUnits(QObject *parent): +TrianglesUnits::TrianglesUnits(QObject *parent): QAbstractListModel(parent), unitlist(availableUnits()) { } -QList BitcoinUnits::availableUnits() +QList TrianglesUnits::availableUnits() { - QList unitlist; - unitlist.append(BTC); - unitlist.append(mBTC); - unitlist.append(uBTC); + QList unitlist; + unitlist.append(TRI); + unitlist.append(mTRI); + unitlist.append(uTRI); return unitlist; } -bool BitcoinUnits::valid(int unit) +bool TrianglesUnits::valid(int unit) { switch(unit) { - case BTC: - case mBTC: - case uBTC: + case TRI: + case mTRI: + case uTRI: return true; default: return false; } } -QString BitcoinUnits::name(int unit) +QString TrianglesUnits::name(int unit) { switch(unit) { - case BTC: return QString("TRI"); - case mBTC: return QString("mTRI"); - case uBTC: return QString::fromUtf8("μTRI"); + case TRI: return QString("TRI"); + case mTRI: return QString("mTRI"); + case uTRI: return QString::fromUtf8("μTRI"); default: return QString("???"); } } -QString BitcoinUnits::description(int unit) +QString TrianglesUnits::description(int unit) { switch(unit) { - case BTC: return QString("triangles"); - case mBTC: return QString("Milli-triangles (1 / 1,000)"); - case uBTC: return QString("Micro-triangles (1 / 1,000,000)"); + case TRI: return QString("Triangles"); + case mTRI: return QString("Milli-Triangles (1 / 1,000)"); + case uTRI: return QString("Micro-Triangles (1 / 1,000,000)"); default: return QString("???"); } } -qint64 BitcoinUnits::factor(int unit) +qint64 TrianglesUnits::factor(int unit) { switch(unit) { - case BTC: return 1000000; - case mBTC: return 1000; - case uBTC: return 1; + case TRI: return 1000000; + case mTRI: return 1000; + case uTRI: return 1; default: return 1000000; } } -int BitcoinUnits::amountDigits(int unit) +int TrianglesUnits::amountDigits(int unit) { switch(unit) { - case BTC: return 8; // 21,000,000 (# digits, without commas) - case mBTC: return 11; // 21,000,000,000 - case uBTC: return 14; // 21,000,000,000,000 + case TRI: return 6; // 120,000 (# digits, without commas) + case mTRI: return 9; // 120,000,000 + case uTRI: return 12; // 120,000,000,000 default: return 0; } } -int BitcoinUnits::decimals(int unit) +int TrianglesUnits::decimals(int unit) { switch(unit) { - case BTC: return 6; - case mBTC: return 3; - case uBTC: return 0; + case TRI: return 6; + case mTRI: return 3; + case uTRI: return 0; default: return 0; } } -QString BitcoinUnits::format(int unit, qint64 n, bool fPlus) +QString TrianglesUnits::format(int unit, qint64 n, bool fPlus) { // Note: not using straight sprintf here because we do NOT want // localized number formatting. @@ -112,12 +112,12 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus) return quotient_str + QString(".") + remainder_str; } -QString BitcoinUnits::formatWithUnit(int unit, qint64 amount, bool plussign) +QString TrianglesUnits::formatWithUnit(int unit, qint64 amount, bool plussign) { return format(unit, amount, plussign) + QString(" ") + name(unit); } -bool BitcoinUnits::parse(int unit, const QString &value, qint64 *val_out) +bool TrianglesUnits::parse(int unit, const QString &value, qint64 *val_out) { if(!valid(unit) || value.isEmpty()) return false; // Refuse to parse invalid unit or empty string @@ -154,13 +154,13 @@ bool BitcoinUnits::parse(int unit, const QString &value, qint64 *val_out) return ok; } -int BitcoinUnits::rowCount(const QModelIndex &parent) const +int TrianglesUnits::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent); return unitlist.size(); } -QVariant BitcoinUnits::data(const QModelIndex &index, int role) const +QVariant TrianglesUnits::data(const QModelIndex &index, int role) const { int row = index.row(); if(row >= 0 && row < unitlist.size()) diff --git a/src/qt/bitcoinunits.h b/src/qt/trianglesunits.h similarity index 74% rename from src/qt/bitcoinunits.h rename to src/qt/trianglesunits.h index 9b7c9e1..64e9ead 100644 --- a/src/qt/bitcoinunits.h +++ b/src/qt/trianglesunits.h @@ -1,25 +1,25 @@ -#ifndef BITCOINUNITS_H -#define BITCOINUNITS_H +#ifndef TRIANGLESUNITS_H +#define TRIANGLESUNITS_H #include #include -/** Bitcoin unit definitions. Encapsulates parsing and formatting +/** Triangles unit definitions. Encapsulates parsing and formatting and serves as list model for drop-down selection boxes. */ -class BitcoinUnits: public QAbstractListModel +class TrianglesUnits: public QAbstractListModel { public: - explicit BitcoinUnits(QObject *parent); + explicit TrianglesUnits(QObject *parent); - /** Bitcoin units. - @note Source: https://en.bitcoin.it/wiki/Units . Please add only sensible ones + /** Triangles units. + @note Source: https://en.triangles.it/wiki/Units . Please add only sensible ones */ enum Unit { - BTC, - mBTC, - uBTC + TRI, + mTRI, + uTRI }; //! @name Static API @@ -59,8 +59,8 @@ public: QVariant data(const QModelIndex &index, int role) const; ///@} private: - QList unitlist; + QList unitlist; }; -typedef BitcoinUnits::Unit BitcoinUnit; +typedef TrianglesUnits::Unit TrianglesUnit; -#endif // BITCOINUNITS_H +#endif // TRIANGLESUNITS_H diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 59bf104..eb0b56d 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -125,7 +125,10 @@ void WalletModel::updateAddressBook(const QString &address, const QString &label bool WalletModel::validateAddress(const QString &address) { - CBitcoinAddress addressParsed(address.toStdString()); + std::string sAddr = address.toStdString(); + + + CTrianglesAddress addressParsed(sAddr); return addressParsed.IsValid(); } @@ -161,13 +164,14 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList vCoins; wallet->AvailableCoins(vCoins, true, coinControl); BOOST_FOREACH(const COutput& out, vCoins) nBalance += out.tx->vout[out.i].nValue; - if(total > nBalance) + + if(total > nBalance) { return AmountExceedsBalance; } @@ -177,22 +181,62 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList mapStealthNarr; + { LOCK2(cs_main, wallet->cs_wallet); + + CWalletTx wtx; // Sendmany - std::vector > vecSend; + std::vector > vecSend; foreach(const SendCoinsRecipient &rcp, recipients) { + std::string sAddr = rcp.address.toStdString(); + + CScript scriptPubKey; - scriptPubKey.SetDestination(CBitcoinAddress(rcp.address.toStdString()).Get()); + scriptPubKey.SetDestination(CTrianglesAddress(sAddr).Get()); vecSend.push_back(make_pair(scriptPubKey, rcp.amount)); + + if (rcp.narration.length() > 0) + { + std::string sNarr = rcp.narration.toStdString(); + + if (sNarr.length() > 24) + { + printf("Narration is too long.\n"); + return NarrationTooLong; + }; + + std::vector vNarr(sNarr.c_str(), sNarr.c_str() + sNarr.length()); + std::vector vNDesc; + + vNDesc.resize(2); + vNDesc[0] = 'n'; + vNDesc[1] = 'p'; + + CScript scriptN = CScript() << OP_RETURN << vNDesc << OP_RETURN << vNarr; + + vecSend.push_back(make_pair(scriptN, 0)); + } } - CWalletTx wtx; CReserveKey keyChange(wallet); - int64 nFeeRequired = 0; + int64_t nFeeRequired = 0; bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, coinControl); + + std::map::iterator it; + for (it = mapStealthNarr.begin(); it != mapStealthNarr.end(); ++it) + { + char key[64]; + if (snprintf(key, sizeof(key), "n_%u") < 1) + { + printf("CreateStealthTransaction(): Error creating narration key."); + continue; + }; + wtx.mapValue[key] = it->second; + }; if(!fCreated) { @@ -217,18 +261,20 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QListcs_wallet); - std::map::iterator mi = wallet->mapAddressBook.find(dest); - - // Check if we have a new address or an updated label - if (mi == wallet->mapAddressBook.end() || mi->second != strLabel) - { - wallet->SetAddressBookName(dest, strLabel); - } + + std::map::iterator mi = wallet->mapAddressBook.find(dest); + + // Check if we have a new address or an updated label + if (mi == wallet->mapAddressBook.end() || mi->second != strLabel) + { + wallet->SetAddressBookName(dest, strLabel); + }; + //}; } } @@ -319,12 +365,14 @@ static void NotifyKeyStoreStatusChanged(WalletModel *walletmodel, CCryptoKeyStor static void NotifyAddressBookChanged(WalletModel *walletmodel, CWallet *wallet, const CTxDestination &address, const std::string &label, bool isMine, ChangeType status) { - OutputDebugStringF("NotifyAddressBookChanged %s %s isMine=%i status=%i\n", CBitcoinAddress(address).ToString().c_str(), label.c_str(), isMine, status); - QMetaObject::invokeMethod(walletmodel, "updateAddressBook", Qt::QueuedConnection, - Q_ARG(QString, QString::fromStdString(CBitcoinAddress(address).ToString())), - Q_ARG(QString, QString::fromStdString(label)), - Q_ARG(bool, isMine), - Q_ARG(int, status)); + + OutputDebugStringF("NotifyAddressBookChanged %s %s isMine=%i status=%i\n", CTrianglesAddress(address).ToString().c_str(), label.c_str(), isMine, status); + QMetaObject::invokeMethod(walletmodel, "updateAddressBook", Qt::QueuedConnection, + Q_ARG(QString, QString::fromStdString(CTrianglesAddress(address).ToString())), + Q_ARG(QString, QString::fromStdString(label)), + Q_ARG(bool, isMine), + Q_ARG(int, status)); + } static void NotifyTransactionChanged(WalletModel *walletmodel, CWallet *wallet, const uint256 &hash, ChangeType status) @@ -355,6 +403,13 @@ void WalletModel::unsubscribeFromCoreSignals() WalletModel::UnlockContext WalletModel::requestUnlock() { bool was_locked = getEncryptionStatus() == Locked; + + if ((!was_locked) && fWalletUnlockStakingOnly) + { + setWalletLocked(true); + was_locked = getEncryptionStatus() == Locked; + + } if(was_locked) { // Request UI to unlock wallet @@ -363,7 +418,7 @@ WalletModel::UnlockContext WalletModel::requestUnlock() // If wallet is still locked, unlock was failed or cancelled, mark context as invalid bool valid = getEncryptionStatus() != Locked; - return UnlockContext(this, valid, was_locked); + return UnlockContext(this, valid, was_locked && !fWalletUnlockStakingOnly); } WalletModel::UnlockContext::UnlockContext(WalletModel *wallet, bool valid, bool relock): @@ -388,69 +443,73 @@ void WalletModel::UnlockContext::CopyFrom(const UnlockContext& rhs) rhs.relock = false; } - bool WalletModel::getPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const - { - return wallet->GetPubKey(address, vchPubKeyOut); - } - - // returns a list of COutputs from COutPoints - void WalletModel::getOutputs(const std::vector& vOutpoints, std::vector& vOutputs) - { - BOOST_FOREACH(const COutPoint& outpoint, vOutpoints) - { - if (!wallet->mapWallet.count(outpoint.hash)) continue; - COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, wallet->mapWallet[outpoint.hash].GetDepthInMainChain()); - vOutputs.push_back(out); - } - } - - // AvailableCoins + LockedCoins grouped by wallet address (put change in one group with wallet address) - void WalletModel::listCoins(std::map >& mapCoins) const - { - std::vector vCoins; - wallet->AvailableCoins(vCoins); - std::vector vLockedCoins; - - // add locked coins - BOOST_FOREACH(const COutPoint& outpoint, vLockedCoins) - { - if (!wallet->mapWallet.count(outpoint.hash)) continue; - COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, wallet->mapWallet[outpoint.hash].GetDepthInMainChain()); - vCoins.push_back(out); - } - - BOOST_FOREACH(const COutput& out, vCoins) - { - COutput cout = out; - - while (wallet->IsChange(cout.tx->vout[cout.i]) && cout.tx->vin.size() > 0 && wallet->IsMine(cout.tx->vin[0])) - { - if (!wallet->mapWallet.count(cout.tx->vin[0].prevout.hash)) break; - cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0); - } - - CTxDestination address; - if(!ExtractDestination(cout.tx->vout[cout.i].scriptPubKey, address)) continue; - mapCoins[CBitcoinAddress(address).ToString().c_str()].push_back(out); - } - } - - bool WalletModel::isLockedCoin(uint256 hash, unsigned int n) const - { - return false; - } - - void WalletModel::lockCoin(COutPoint& output) - { - return; - } - - void WalletModel::unlockCoin(COutPoint& output) - { - return; - } - - void WalletModel::listLockedCoins(std::vector& vOutpts) - { - return; - } +bool WalletModel::getPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const +{ + return wallet->GetPubKey(address, vchPubKeyOut); +} + +// returns a list of COutputs from COutPoints +void WalletModel::getOutputs(const std::vector& vOutpoints, std::vector& vOutputs) +{ + BOOST_FOREACH(const COutPoint& outpoint, vOutpoints) + { + if (!wallet->mapWallet.count(outpoint.hash)) continue; + int nDepth = wallet->mapWallet[outpoint.hash].GetDepthInMainChain(); + if (nDepth < 0) continue; + COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth); + vOutputs.push_back(out); + } +} + +// AvailableCoins + LockedCoins grouped by wallet address (put change in one group with wallet address) +void WalletModel::listCoins(std::map >& mapCoins) const +{ + std::vector vCoins; + wallet->AvailableCoins(vCoins); + std::vector vLockedCoins; + + // add locked coins + BOOST_FOREACH(const COutPoint& outpoint, vLockedCoins) + { + if (!wallet->mapWallet.count(outpoint.hash)) continue; + int nDepth = wallet->mapWallet[outpoint.hash].GetDepthInMainChain(); + if (nDepth < 0) continue; + COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth); + vCoins.push_back(out); + } + + BOOST_FOREACH(const COutput& out, vCoins) + { + COutput cout = out; + + while (wallet->IsChange(cout.tx->vout[cout.i]) && cout.tx->vin.size() > 0 && wallet->IsMine(cout.tx->vin[0])) + { + if (!wallet->mapWallet.count(cout.tx->vin[0].prevout.hash)) break; + cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0); + } + + CTxDestination address; + if(!ExtractDestination(cout.tx->vout[cout.i].scriptPubKey, address)) continue; + mapCoins[CTrianglesAddress(address).ToString().c_str()].push_back(out); + } +} + +bool WalletModel::isLockedCoin(uint256 hash, unsigned int n) const +{ + return false; +} + +void WalletModel::lockCoin(COutPoint& output) +{ + return; +} + +void WalletModel::unlockCoin(COutPoint& output) +{ + return; +} + +void WalletModel::listLockedCoins(std::vector& vOutpts) +{ + return; +} diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index 0a1ffd5..1af8980 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -27,10 +27,12 @@ class SendCoinsRecipient public: QString address; QString label; + QString narration; + int typeInd; qint64 amount; }; -/** Interface to Bitcoin wallet from Qt view code. */ +/** Interface to Triangles wallet from Qt view code. */ class WalletModel : public QObject { Q_OBJECT @@ -49,6 +51,7 @@ public: DuplicateAddress, TransactionCreationFailed, // Error returned when wallet is still locked TransactionCommitFailed, + NarrationTooLong, Aborted }; @@ -117,7 +120,7 @@ public: }; UnlockContext requestUnlock(); - + bool getPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const; void getOutputs(const std::vector& vOutpoints, std::vector& vOutputs); void listCoins(std::map >& mapCoins) const; diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index e1f74da..9ded92b 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -4,12 +4,13 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "main.h" -#include "bitcoinrpc.h" +#include "trianglesrpc.h" using namespace json_spirit; using namespace std; extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, json_spirit::Object& entry); +extern enum Checkpoints::CPMode CheckpointsMode; double GetDifficulty(const CBlockIndex* blockindex) { @@ -42,6 +43,33 @@ double GetDifficulty(const CBlockIndex* blockindex) return dDiff; } +double GetPoWMHashPS() +{ + if (pindexBest->nHeight >= CUTOFF_POW_BLOCK) + return 0; + + int nPoWInterval = 72; + int64_t nTargetSpacingWorkMin = 30, nTargetSpacingWork = 30; + + CBlockIndex* pindex = pindexGenesisBlock; + CBlockIndex* pindexPrevWork = pindexGenesisBlock; + + while (pindex) + { + if (pindex->IsProofOfWork()) + { + int64_t nActualSpacingWork = pindex->GetBlockTime() - pindexPrevWork->GetBlockTime(); + nTargetSpacingWork = ((nPoWInterval - 1) * nTargetSpacingWork + nActualSpacingWork + nActualSpacingWork) / (nPoWInterval + 1); + nTargetSpacingWork = max(nTargetSpacingWork, nTargetSpacingWorkMin); + pindexPrevWork = pindex; + } + + pindex = pindex->pnext; + } + + return GetDifficulty() * 4294.967296 / nTargetSpacingWork; +} + double GetPoSKernelPS() { int nPoSInterval = 72; @@ -83,7 +111,8 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool fPri result.push_back(Pair("nonce", (boost::uint64_t)block.nNonce)); result.push_back(Pair("bits", HexBits(block.nBits))); result.push_back(Pair("difficulty", GetDifficulty(blockindex))); - + result.push_back(Pair("blocktrust", leftTrim(blockindex->GetBlockTrust().GetHex(), '0'))); + result.push_back(Pair("chaintrust", leftTrim(blockindex->nChainTrust.GetHex(), '0'))); if (blockindex->pprev) result.push_back(Pair("previousblockhash", blockindex->pprev->GetBlockHash().GetHex())); if (blockindex->pnext) @@ -92,7 +121,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool fPri result.push_back(Pair("flags", strprintf("%s%s", blockindex->IsProofOfStake()? "proof-of-stake" : "proof-of-work", blockindex->GeneratedStakeModifier()? " stake-modifier": ""))); result.push_back(Pair("proofhash", blockindex->IsProofOfStake()? blockindex->hashProofOfStake.GetHex() : blockindex->GetBlockHash().GetHex())); result.push_back(Pair("entropybit", (int)blockindex->GetStakeEntropyBit())); - result.push_back(Pair("modifier", strprintf("%016"PRI64x, blockindex->nStakeModifier))); + result.push_back(Pair("modifier", strprintf("%016"PRIx64, blockindex->nStakeModifier))); result.push_back(Pair("modifierchecksum", strprintf("%08x", blockindex->nStakeModifierChecksum))); Array txinfo; BOOST_FOREACH (const CTransaction& tx, block.vtx) @@ -111,11 +140,22 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool fPri } result.push_back(Pair("tx", txinfo)); - result.push_back(Pair("signature", HexStr(block.vchBlockSig.begin(), block.vchBlockSig.end()))); + + if (block.IsProofOfStake()) + result.push_back(Pair("signature", HexStr(block.vchBlockSig.begin(), block.vchBlockSig.end()))); return result; } +Value getbestblockhash(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "getbestblockhash\n" + "Returns the hash of the best block in the longest block chain."); + + return hashBestChain.GetHex(); +} Value getblockcount(const Array& params, bool fHelp) { @@ -246,11 +286,24 @@ Value getcheckpoint(const Array& params, bool fHelp) CBlockIndex* pindexCheckpoint; result.push_back(Pair("synccheckpoint", Checkpoints::hashSyncCheckpoint.ToString().c_str())); - pindexCheckpoint = mapBlockIndex[Checkpoints::hashSyncCheckpoint]; + pindexCheckpoint = mapBlockIndex[Checkpoints::hashSyncCheckpoint]; result.push_back(Pair("height", pindexCheckpoint->nHeight)); result.push_back(Pair("timestamp", DateTimeStrFormat(pindexCheckpoint->GetBlockTime()).c_str())); + + // Check that the block satisfies synchronized checkpoint + if (CheckpointsMode == Checkpoints::STRICT) + result.push_back(Pair("policy", "strict")); + + if (CheckpointsMode == Checkpoints::ADVISORY) + result.push_back(Pair("policy", "advisory")); + + if (CheckpointsMode == Checkpoints::PERMISSIVE) + result.push_back(Pair("policy", "permissive")); + if (mapArgs.count("-checkpointkey")) result.push_back(Pair("checkpointmaster", true)); return result; } + + diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp index 1bbc73f..bfe5526 100644 --- a/src/rpcdump.cpp +++ b/src/rpcdump.cpp @@ -2,23 +2,96 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include +#include + #include "init.h" // for pwalletMain -#include "bitcoinrpc.h" +#include "trianglesrpc.h" #include "ui_interface.h" #include "base58.h" -#include +#include +#include +#include #define printf OutputDebugStringF using namespace json_spirit; using namespace std; +void EnsureWalletIsUnlocked(); + +namespace bt = boost::posix_time; + +// Extended DecodeDumpTime implementation, see this page for details: +// http://stackoverflow.com/questions/3786201/parsing-of-date-time-from-string-boost +const std::locale formats[] = { + std::locale(std::locale::classic(),new bt::time_input_facet("%Y-%m-%dT%H:%M:%SZ")), + std::locale(std::locale::classic(),new bt::time_input_facet("%Y-%m-%d %H:%M:%S")), + std::locale(std::locale::classic(),new bt::time_input_facet("%Y/%m/%d %H:%M:%S")), + std::locale(std::locale::classic(),new bt::time_input_facet("%d.%m.%Y %H:%M:%S")), + std::locale(std::locale::classic(),new bt::time_input_facet("%Y-%m-%d")) +}; + +const size_t formats_n = sizeof(formats)/sizeof(formats[0]); + +std::time_t pt_to_time_t(const bt::ptime& pt) +{ + bt::ptime timet_start(boost::gregorian::date(1970,1,1)); + bt::time_duration diff = pt - timet_start; + return diff.ticks()/bt::time_duration::rep_type::ticks_per_second; +} + +int64_t DecodeDumpTime(const std::string& s) +{ + bt::ptime pt; + + for(size_t i=0; i> pt; + if(pt != bt::ptime()) break; + } + + return pt_to_time_t(pt); +} + +std::string static EncodeDumpTime(int64_t nTime) { + return DateTimeStrFormat("%Y-%m-%dT%H:%M:%SZ", nTime); +} + +std::string static EncodeDumpString(const std::string &str) { + std::stringstream ret; + BOOST_FOREACH(unsigned char c, str) { + if (c <= 32 || c >= 128 || c == '%') { + ret << '%' << HexStr(&c, &c + 1); + } else { + ret << c; + } + } + return ret.str(); +} + +std::string DecodeDumpString(const std::string &str) { + std::stringstream ret; + for (unsigned int pos = 0; pos < str.length(); pos++) { + unsigned char c = str[pos]; + if (c == '%' && pos+2 < str.length()) { + c = (((str[pos+1]>>6)*9+((str[pos+1]-'0')&15)) << 4) | + ((str[pos+2]>>6)*9+((str[pos+2]-'0')&15)); + pos += 2; + } + ret << c; + } + return ret.str(); +} + class CTxDump { public: CBlockIndex *pindex; - int64 nValue; + int64_t nValue; bool fSpent; CWalletTx* ptx; int nOut; @@ -36,19 +109,19 @@ Value importprivkey(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( - "importprivkey [label]\n" + "importprivkey [label]\n" "Adds a private key (as returned by dumpprivkey) to your wallet."); string strSecret = params[0].get_str(); string strLabel = ""; if (params.size() > 1) strLabel = params[1].get_str(); - CBitcoinSecret vchSecret; + CTrianglesSecret vchSecret; bool fGood = vchSecret.SetString(strSecret); if (!fGood) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key"); - if (fWalletUnlockMintOnly) // triangles: no importprivkey in mint-only mode - throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Wallet is unlocked for minting only."); + if (fWalletUnlockStakingOnly) + throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Wallet is unlocked for staking only."); CKey key; bool fCompressed; @@ -71,19 +144,109 @@ Value importprivkey(const Array& params, bool fHelp) return Value::null; } +Value importwallet(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "importwallet \n" + "Imports keys from a wallet dump file (see dumpwallet)."); + + EnsureWalletIsUnlocked(); + + ifstream file; + file.open(params[0].get_str().c_str()); + if (!file.is_open()) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot open wallet dump file"); + + int64_t nTimeBegin = pindexBest->nTime; + + bool fGood = true; + + while (file.good()) { + std::string line; + std::getline(file, line); + if (line.empty() || line[0] == '#') + continue; + + std::vector vstr; + boost::split(vstr, line, boost::is_any_of(" ")); + if (vstr.size() < 2) + continue; + CTrianglesSecret vchSecret; + if (!vchSecret.SetString(vstr[0])) + continue; + + bool fCompressed; + CKey key; + CSecret secret = vchSecret.GetSecret(fCompressed); + key.SetSecret(secret, fCompressed); + CKeyID keyid = key.GetPubKey().GetID(); + + if (pwalletMain->HaveKey(keyid)) { + printf("Skipping import of %s (key already present)\n", CTrianglesAddress(keyid).ToString().c_str()); + continue; + } + int64_t nTime = DecodeDumpTime(vstr[1]); + std::string strLabel; + bool fLabel = true; + for (unsigned int nStr = 2; nStr < vstr.size(); nStr++) { + if (boost::algorithm::starts_with(vstr[nStr], "#")) + break; + if (vstr[nStr] == "change=1") + fLabel = false; + if (vstr[nStr] == "reserve=1") + fLabel = false; + if (boost::algorithm::starts_with(vstr[nStr], "label=")) { + strLabel = DecodeDumpString(vstr[nStr].substr(6)); + fLabel = true; + } + } + printf("Importing %s...\n", CTrianglesAddress(keyid).ToString().c_str()); + if (!pwalletMain->AddKey(key)) { + fGood = false; + continue; + } + pwalletMain->mapKeyMetadata[keyid].nCreateTime = nTime; + if (fLabel) + pwalletMain->SetAddressBookName(keyid, strLabel); + nTimeBegin = std::min(nTimeBegin, nTime); + } + file.close(); + + CBlockIndex *pindex = pindexBest; + while (pindex && pindex->pprev && pindex->nTime > nTimeBegin - 7200) + pindex = pindex->pprev; + + if (!pwalletMain->nTimeFirstKey || nTimeBegin < pwalletMain->nTimeFirstKey) + pwalletMain->nTimeFirstKey = nTimeBegin; + + printf("Rescanning last %i blocks\n", pindexBest->nHeight - pindex->nHeight + 1); + pwalletMain->ScanForWalletTransactions(pindex); + pwalletMain->ReacceptWalletTransactions(); + pwalletMain->MarkDirty(); + + if (!fGood) + throw JSONRPCError(RPC_WALLET_ERROR, "Error adding some keys to wallet"); + + return Value::null; +} + + Value dumpprivkey(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( - "dumpprivkey \n" - "Reveals the private key corresponding to ."); + "dumpprivkey \n" + "Reveals the private key corresponding to ."); + + EnsureWalletIsUnlocked(); string strAddress = params[0].get_str(); - CBitcoinAddress address; + CTrianglesAddress address; if (!address.SetString(strAddress)) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid triangles address"); - if (fWalletUnlockMintOnly) // triangles: no dumpprivkey in mint-only mode - throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Wallet is unlocked for minting only."); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Triangles address"); + if (fWalletUnlockStakingOnly) + throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Wallet is unlocked for staking only."); CKeyID keyID; if (!address.GetKeyID(keyID)) throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to a key"); @@ -91,5 +254,69 @@ Value dumpprivkey(const Array& params, bool fHelp) bool fCompressed; if (!pwalletMain->GetSecret(keyID, vchSecret, fCompressed)) throw JSONRPCError(RPC_WALLET_ERROR, "Private key for address " + strAddress + " is not known"); - return CBitcoinSecret(vchSecret, fCompressed).ToString(); + return CTrianglesSecret(vchSecret, fCompressed).ToString(); } + +Value dumpwallet(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "dumpwallet \n" + "Dumps all wallet keys in a human-readable format."); + + EnsureWalletIsUnlocked(); + + ofstream file; + file.open(params[0].get_str().c_str()); + if (!file.is_open()) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot open wallet dump file"); + + std::map mapKeyBirth; + + std::set setKeyPool; + + pwalletMain->GetKeyBirthTimes(mapKeyBirth); + + pwalletMain->GetAllReserveKeys(setKeyPool); + + // sort time/key pairs + std::vector > vKeyBirth; + for (std::map::const_iterator it = mapKeyBirth.begin(); it != mapKeyBirth.end(); it++) { + vKeyBirth.push_back(std::make_pair(it->second, it->first)); + } + mapKeyBirth.clear(); + std::sort(vKeyBirth.begin(), vKeyBirth.end()); + + // produce output + file << strprintf("# Wallet dump created by Triangles %s (%s)\n", CLIENT_BUILD.c_str(), CLIENT_DATE.c_str()); + file << strprintf("# * Created on %s\n", EncodeDumpTime(GetTime()).c_str()); + file << strprintf("# * Best block at time of backup was %i (%s),\n", nBestHeight, hashBestChain.ToString().c_str()); + file << strprintf("# mined on %s\n", EncodeDumpTime(pindexBest->nTime).c_str()); + file << "\n"; + for (std::vector >::const_iterator it = vKeyBirth.begin(); it != vKeyBirth.end(); it++) { + const CKeyID &keyid = it->second; + std::string strTime = EncodeDumpTime(it->first); + std::string strAddr = CTrianglesAddress(keyid).ToString(); + bool IsCompressed; + + CKey key; + if (pwalletMain->GetKey(keyid, key)) { + if (pwalletMain->mapAddressBook.count(keyid)) { + CSecret secret = key.GetSecret(IsCompressed); + file << strprintf("%s %s label=%s # addr=%s\n", CTrianglesSecret(secret, IsCompressed).ToString().c_str(), strTime.c_str(), EncodeDumpString(pwalletMain->mapAddressBook[keyid]).c_str(), strAddr.c_str()); + } else if (setKeyPool.count(keyid)) { + CSecret secret = key.GetSecret(IsCompressed); + file << strprintf("%s %s reserve=1 # addr=%s\n", CTrianglesSecret(secret, IsCompressed).ToString().c_str(), strTime.c_str(), strAddr.c_str()); + } else { + CSecret secret = key.GetSecret(IsCompressed); + file << strprintf("%s %s change=1 # addr=%s\n", CTrianglesSecret(secret, IsCompressed).ToString().c_str(), strTime.c_str(), strAddr.c_str()); + } + } + } + file << "\n"; + file << "# End of dump\n"; + file.close(); + return Value::null; +} + + diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index f1729fa..3026309 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -5,62 +5,38 @@ #include "main.h" #include "db.h" +#include "txdb.h" #include "init.h" -#include "bitcoinrpc.h" +#include "miner.h" +#include "trianglesrpc.h" using namespace json_spirit; using namespace std; -Value getgenerate(const Array& params, bool fHelp) +extern unsigned int nTargetSpacing; + +Value getsubsidy(const Array& params, bool fHelp) { - if (fHelp || params.size() != 0) + if (fHelp || params.size() > 1) throw runtime_error( - "getgenerate\n" - "Returns true or false."); + "getsubsidy [nTarget]\n" + "Returns proof-of-work subsidy value for the specified value of target."); - return GetBoolArg("-gen"); -} + unsigned int nBits = 0; - -Value setgenerate(const Array& params, bool fHelp) -{ - if (fHelp || params.size() < 1 || params.size() > 2) - throw runtime_error( - "setgenerate [genproclimit]\n" - " is true or false to turn generation on or off.\n" - "Generation is limited to [genproclimit] processors, -1 is unlimited."); - - bool fGenerate = true; - if (params.size() > 0) - fGenerate = params[0].get_bool(); - - if (params.size() > 1) + if (params.size() != 0) { - int nGenProcLimit = params[1].get_int(); - mapArgs["-genproclimit"] = itostr(nGenProcLimit); - if (nGenProcLimit == 0) - fGenerate = false; + CBigNum bnTarget(uint256(params[0].get_str())); + nBits = bnTarget.GetCompact(); + } + else + { + nBits = GetNextTargetRequired(pindexBest, false); } - mapArgs["-gen"] = (fGenerate ? "1" : "0"); - GenerateBitcoins(fGenerate, pwalletMain); - return Value::null; + return (uint64_t)GetProofOfWorkReward(0); } - -Value gethashespersec(const Array& params, bool fHelp) -{ - if (fHelp || params.size() != 0) - throw runtime_error( - "gethashespersec\n" - "Returns a recent hashes per second performance measurement while generating."); - - if (GetTimeMillis() - nHPSTimerStart > 8000) - return (boost::int64_t)0; - return (boost::int64_t)dHashesPerSec; -} - - Value getmininginfo(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) @@ -68,56 +44,70 @@ Value getmininginfo(const Array& params, bool fHelp) "getmininginfo\n" "Returns an object containing mining-related information."); - Object obj; + uint64_t nMinWeight = 0, nMaxWeight = 0, nWeight = 0; + pwalletMain->GetStakeWeight(*pwalletMain, nMinWeight, nMaxWeight, nWeight); + + Object obj, diff, weight; obj.push_back(Pair("blocks", (int)nBestHeight)); obj.push_back(Pair("currentblocksize",(uint64_t)nLastBlockSize)); obj.push_back(Pair("currentblocktx",(uint64_t)nLastBlockTx)); - obj.push_back(Pair("difficulty", (double)GetDifficulty())); + + diff.push_back(Pair("proof-of-work", GetDifficulty())); + diff.push_back(Pair("proof-of-stake", GetDifficulty(GetLastBlockIndex(pindexBest, true)))); + diff.push_back(Pair("search-interval", (int)nLastCoinStakeSearchInterval)); + obj.push_back(Pair("difficulty", diff)); + + obj.push_back(Pair("blockvalue", (uint64_t)GetProofOfWorkReward(0))); + obj.push_back(Pair("netmhashps", GetPoWMHashPS())); + obj.push_back(Pair("netstakeweight", GetPoSKernelPS())); obj.push_back(Pair("errors", GetWarnings("statusbar"))); - obj.push_back(Pair("generate", GetBoolArg("-gen"))); - obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1))); - obj.push_back(Pair("hashespersec", gethashespersec(params, false))); - obj.push_back(Pair("networkhashps", getnetworkhashps(params, false))); obj.push_back(Pair("pooledtx", (uint64_t)mempool.size())); + + weight.push_back(Pair("minimum", (uint64_t)nMinWeight)); + weight.push_back(Pair("maximum", (uint64_t)nMaxWeight)); + weight.push_back(Pair("combined", (uint64_t)nWeight)); + obj.push_back(Pair("stakeweight", weight)); + + obj.push_back(Pair("stakeinterest", (uint64_t)COIN_YEAR_REWARD)); obj.push_back(Pair("testnet", fTestNet)); return obj; } -// Litecoin: Return average network hashes per second based on last number of blocks. -Value GetNetworkHashPS(int lookup) { - if (pindexBest == NULL) - return 0; - - // If lookup is -1, then use blocks since last difficulty change. - if (lookup <= 0) - lookup = pindexBest->nHeight % 2016 + 1; - - // If lookup is larger than chain, then set it to chain length. - if (lookup > pindexBest->nHeight) - lookup = pindexBest->nHeight; - - CBlockIndex* pindexPrev = pindexBest; - for (int i = 0; i < lookup; i++) - pindexPrev = pindexPrev->pprev; - - double timeDiff = pindexBest->GetBlockTime() - pindexPrev->GetBlockTime(); - double timePerBlock = timeDiff / lookup; - - return (boost::int64_t)(((double)GetDifficulty() * pow(2.0, 32)) / timePerBlock); -} - -Value getnetworkhashps(const Array& params, bool fHelp) +Value getstakinginfo(const Array& params, bool fHelp) { - if (fHelp || params.size() > 1) + if (fHelp || params.size() != 0) throw runtime_error( - "getnetworkhashps [blocks]\n" - "Returns the estimated network hashes per second based on the last 120 blocks.\n" - "Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change."); + "getstakinginfo\n" + "Returns an object containing staking-related information."); - return GetNetworkHashPS(params.size() > 0 ? params[0].get_int() : 120); + uint64_t nMinWeight = 0, nMaxWeight = 0, nWeight = 0; + pwalletMain->GetStakeWeight(*pwalletMain, nMinWeight, nMaxWeight, nWeight); + + uint64_t nNetworkWeight = GetPoSKernelPS(); + bool staking = nLastCoinStakeSearchInterval && nWeight; + int nExpectedTime = staking ? (nTargetSpacing * nNetworkWeight / nWeight) : -1; + + Object obj; + + obj.push_back(Pair("enabled", GetBoolArg("-staking", true))); + obj.push_back(Pair("staking", staking)); + obj.push_back(Pair("errors", GetWarnings("statusbar"))); + + obj.push_back(Pair("currentblocksize", (uint64_t)nLastBlockSize)); + obj.push_back(Pair("currentblocktx", (uint64_t)nLastBlockTx)); + obj.push_back(Pair("pooledtx", (uint64_t)mempool.size())); + + obj.push_back(Pair("difficulty", GetDifficulty(GetLastBlockIndex(pindexBest, true)))); + obj.push_back(Pair("search-interval", (int)nLastCoinStakeSearchInterval)); + + obj.push_back(Pair("weight", (uint64_t)nWeight)); + obj.push_back(Pair("netstakeweight", (uint64_t)nNetworkWeight)); + + obj.push_back(Pair("expectedtime", nExpectedTime)); + + return obj; } - Value getworkex(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) @@ -127,10 +117,13 @@ Value getworkex(const Array& params, bool fHelp) ); if (vNodes.empty()) - throw JSONRPCError(-9, "triangles is not connected!"); + throw JSONRPCError(-9, "Triangles is not connected!"); if (IsInitialBlockDownload()) - throw JSONRPCError(-10, "triangles is downloading blocks..."); + throw JSONRPCError(-10, "Triangles is downloading blocks..."); + + if (pindexBest->nHeight >= CUTOFF_POW_BLOCK) + throw JSONRPCError(RPC_MISC_ERROR, "No more PoW blocks"); typedef map > mapNewBlock_t; static mapNewBlock_t mapNewBlock; @@ -142,7 +135,7 @@ Value getworkex(const Array& params, bool fHelp) // Update block static unsigned int nTransactionsUpdatedLast; static CBlockIndex* pindexPrev; - static int64 nStart; + static int64_t nStart; static CBlock* pblock; if (pindexPrev != pindexBest || (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60)) @@ -167,7 +160,7 @@ Value getworkex(const Array& params, bool fHelp) } // Update nTime - pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime()); + pblock->nTime = max(pindexPrev->GetPastTimeLimit()+1, GetAdjustedTime()); pblock->nNonce = 0; // Update nExtraNonce @@ -236,13 +229,10 @@ Value getworkex(const Array& params, bool fHelp) if(coinbase.size() == 0) pblock->vtx[0].vin[0].scriptSig = mapNewBlock[pdata->hashMerkleRoot].second; else - CDataStream(coinbase, SER_NETWORK, PROTOCOL_VERSION) >> pblock->vtx[0]; // FIXME - HACK! + CDataStream(coinbase, SER_NETWORK, PROTOCOL_VERSION) >> pblock->vtx[0]; // FIXME - DRM! pblock->hashMerkleRoot = pblock->BuildMerkleTree(); - if (!pblock->SignBlock(*pwalletMain)) - throw JSONRPCError(-100, "Unable to sign block, wallet locked?"); - return CheckWork(pblock, *pwalletMain, reservekey); } } @@ -261,10 +251,13 @@ Value getwork(const Array& params, bool fHelp) "If [data] is specified, tries to solve the block and returns true if it was successful."); if (vNodes.empty()) - throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "triangles is not connected!"); + throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Triangles is not connected!"); if (IsInitialBlockDownload()) - throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "triangles is downloading blocks..."); + throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Triangles is downloading blocks..."); + + if (pindexBest->nHeight >= CUTOFF_POW_BLOCK) + throw JSONRPCError(RPC_MISC_ERROR, "No more PoW blocks"); typedef map > mapNewBlock_t; static mapNewBlock_t mapNewBlock; // FIXME: thread safety @@ -276,7 +269,7 @@ Value getwork(const Array& params, bool fHelp) // Update block static unsigned int nTransactionsUpdatedLast; static CBlockIndex* pindexPrev; - static int64 nStart; + static int64_t nStart; static CBlock* pblock; if (pindexPrev != pindexBest || (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60)) @@ -356,9 +349,6 @@ Value getwork(const Array& params, bool fHelp) pblock->vtx[0].vin[0].scriptSig = mapNewBlock[pdata->hashMerkleRoot].second; pblock->hashMerkleRoot = pblock->BuildMerkleTree(); - if (!pblock->SignBlock(*pwalletMain)) - throw JSONRPCError(-100, "Unable to sign block, wallet locked?"); - return CheckWork(pblock, *pwalletMain, reservekey); } } @@ -383,8 +373,7 @@ Value getblocktemplate(const Array& params, bool fHelp) " \"sigoplimit\" : limit of sigops in blocks\n" " \"sizelimit\" : limit of block size\n" " \"bits\" : compressed target of next block\n" - " \"height\" : height of the next block\n" - "See https://en.bitcoin.it/wiki/BIP_0022 for full specification."); + " \"height\" : height of the next block"); std::string strMode = "template"; if (params.size() > 0) @@ -405,17 +394,20 @@ Value getblocktemplate(const Array& params, bool fHelp) throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); if (vNodes.empty()) - throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "triangles is not connected!"); + throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Triangles is not connected!"); if (IsInitialBlockDownload()) - throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "triangles is downloading blocks..."); + throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Triangles is downloading blocks..."); + + if (pindexBest->nHeight >= CUTOFF_POW_BLOCK) + throw JSONRPCError(RPC_MISC_ERROR, "No more PoW blocks"); static CReserveKey reservekey(pwalletMain); // Update block static unsigned int nTransactionsUpdatedLast; static CBlockIndex* pindexPrev; - static int64 nStart; + static int64_t nStart; static CBlock* pblock; if (pindexPrev != pindexBest || (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 5)) @@ -509,7 +501,7 @@ Value getblocktemplate(const Array& params, bool fHelp) result.push_back(Pair("coinbaseaux", aux)); result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].vout[0].nValue)); result.push_back(Pair("target", hashTarget.GetHex())); - result.push_back(Pair("mintime", (int64_t)pindexPrev->GetMedianTimePast()+1)); + result.push_back(Pair("mintime", (int64_t)pindexPrev->GetPastTimeLimit()+1)); result.push_back(Pair("mutable", aMutable)); result.push_back(Pair("noncerange", "00000000ffffffff")); result.push_back(Pair("sigoplimit", (int64_t)MAX_BLOCK_SIGOPS)); @@ -527,8 +519,7 @@ Value submitblock(const Array& params, bool fHelp) throw runtime_error( "submitblock [optional-params-obj]\n" "[optional-params-obj] parameter is currently ignored.\n" - "Attempts to submit new block to network.\n" - "See https://en.bitcoin.it/wiki/BIP_0022 for full specification."); + "Attempts to submit new block to network."); vector blockData(ParseHex(params[0].get_str())); CDataStream ssBlock(blockData, SER_NETWORK, PROTOCOL_VERSION); @@ -540,9 +531,6 @@ Value submitblock(const Array& params, bool fHelp) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed"); } - if (!block.SignBlock(*pwalletMain)) - throw JSONRPCError(-100, "Unable to sign block, wallet locked?"); - bool fAccepted = ProcessBlock(NULL, &block); if (!fAccepted) return "rejected"; @@ -550,3 +538,4 @@ Value submitblock(const Array& params, bool fHelp) return Value::null; } + diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp index 3b5ba41..b141188 100644 --- a/src/rpcnet.cpp +++ b/src/rpcnet.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "net.h" -#include "bitcoinrpc.h" +#include "trianglesrpc.h" #include "alert.h" #include "wallet.h" #include "db.h" @@ -52,14 +52,13 @@ Value getpeerinfo(const Array& params, bool fHelp) Object obj; obj.push_back(Pair("addr", stats.addrName)); - obj.push_back(Pair("services", strprintf("%08"PRI64x, stats.nServices))); + obj.push_back(Pair("services", strprintf("%08"PRIx64, stats.nServices))); obj.push_back(Pair("lastsend", (boost::int64_t)stats.nLastSend)); obj.push_back(Pair("lastrecv", (boost::int64_t)stats.nLastRecv)); obj.push_back(Pair("conntime", (boost::int64_t)stats.nTimeConnected)); obj.push_back(Pair("version", stats.nVersion)); - obj.push_back(Pair("subver", stats.cleanSubVer)); + obj.push_back(Pair("subver", stats.strSubVer)); obj.push_back(Pair("inbound", stats.fInbound)); - obj.push_back(Pair("releasetime", (boost::int64_t)stats.nReleaseTime)); obj.push_back(Pair("startingheight", stats.nStartingHeight)); obj.push_back(Pair("banscore", stats.nMisbehavior)); diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index 085cf41..a474c35 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -6,8 +6,8 @@ #include #include "base58.h" -#include "bitcoinrpc.h" -#include "db.h" +#include "trianglesrpc.h" +#include "txdb.h" #include "init.h" #include "main.h" #include "net.h" @@ -18,14 +18,16 @@ using namespace boost; using namespace boost::assign; using namespace json_spirit; -void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out) +void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out, bool fIncludeHex) { txnouttype type; vector addresses; int nRequired; out.push_back(Pair("asm", scriptPubKey.ToString())); - out.push_back(Pair("hex", HexStr(scriptPubKey.begin(), scriptPubKey.end()))); + + if (fIncludeHex) + out.push_back(Pair("hex", HexStr(scriptPubKey.begin(), scriptPubKey.end()))); if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired)) { @@ -38,7 +40,7 @@ void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out) Array a; BOOST_FOREACH(const CTxDestination& addr, addresses) - a.push_back(CBitcoinAddress(addr).ToString()); + a.push_back(CTrianglesAddress(addr).ToString()); out.push_back(Pair("addresses", a)); } @@ -75,7 +77,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry) out.push_back(Pair("value", ValueFromAmount(txout.nValue))); out.push_back(Pair("n", (boost::int64_t)i)); Object o; - ScriptPubKeyToJSON(txout.scriptPubKey, o); + ScriptPubKeyToJSON(txout.scriptPubKey, o, false); out.push_back(Pair("scriptPubKey", o)); vout.push_back(out); } @@ -156,15 +158,15 @@ Value listunspent(const Array& params, bool fHelp) if (params.size() > 1) nMaxDepth = params[1].get_int(); - set setAddress; + set setAddress; if (params.size() > 2) { Array inputs = params[2].get_array(); BOOST_FOREACH(Value& input, inputs) { - CBitcoinAddress address(input.get_str()); + CTrianglesAddress address(input.get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid triangles address: ")+input.get_str()); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Triangles address: ")+input.get_str()); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+input.get_str()); setAddress.insert(address); @@ -189,11 +191,18 @@ Value listunspent(const Array& params, bool fHelp) continue; } - int64 nValue = out.tx->vout[out.i].nValue; + int64_t nValue = out.tx->vout[out.i].nValue; const CScript& pk = out.tx->vout[out.i].scriptPubKey; Object entry; entry.push_back(Pair("txid", out.tx->GetHash().GetHex())); entry.push_back(Pair("vout", out.i)); + CTxDestination address; + if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, address)) + { + entry.push_back(Pair("address", CTrianglesAddress(address).ToString())); + if (pwalletMain->mapAddressBook.count(address)) + entry.push_back(Pair("account", pwalletMain->mapAddressBook[address])); + } entry.push_back(Pair("scriptPubKey", HexStr(pk.begin(), pk.end()))); entry.push_back(Pair("amount",ValueFromAmount(nValue))); entry.push_back(Pair("confirmations",out.nDepth)); @@ -244,12 +253,12 @@ Value createrawtransaction(const Array& params, bool fHelp) rawTx.vin.push_back(in); } - set setAddress; + set setAddress; BOOST_FOREACH(const Pair& s, sendTo) { - CBitcoinAddress address(s.name_); + CTrianglesAddress address(s.name_); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid triangles address: ")+s.name_); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Triangles address: ")+s.name_); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); @@ -257,7 +266,7 @@ Value createrawtransaction(const Array& params, bool fHelp) CScript scriptPubKey; scriptPubKey.SetDestination(address.Get()); - int64 nAmount = AmountFromValue(s.value_); + int64_t nAmount = AmountFromValue(s.value_); CTxOut out(nAmount, scriptPubKey); rawTx.vout.push_back(out); @@ -293,6 +302,29 @@ Value decoderawtransaction(const Array& params, bool fHelp) return result; } +Value decodescript(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "decodescript \n" + "Decode a hex-encoded script."); + + RPCTypeCheck(params, list_of(str_type)); + + Object r; + CScript script; + if (params[0].get_str().size() > 0){ + vector scriptData(ParseHexV(params[0], "argument")); + script = CScript(scriptData.begin(), scriptData.end()); + } else { + // Empty scripts are valid + } + ScriptPubKeyToJSON(script, r, false); + + r.push_back(Pair("p2sh", CTrianglesAddress(script.GetID()).ToString())); + return r; +} + Value signrawtransaction(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 4) @@ -412,7 +444,7 @@ Value signrawtransaction(const Array& params, bool fHelp) Array keys = params[2].get_array(); BOOST_FOREACH(Value k, keys) { - CBitcoinSecret vchSecret; + CTrianglesSecret vchSecret; bool fGood = vchSecret.SetString(k.get_str()); if (!fGood) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY,"Invalid private key"); @@ -470,7 +502,7 @@ Value signrawtransaction(const Array& params, bool fHelp) { txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig); } - if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, true, 0)) + if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, 0)) fComplete = false; } @@ -526,7 +558,9 @@ Value sendrawtransaction(const Array& params, bool fHelp) SyncWithWallets(tx, NULL, true); } - RelayMessage(CInv(MSG_TX, hashTx), tx); + RelayTransaction(tx, hashTx); return hashTx.GetHex(); } + + diff --git a/src/rpcsmessage.cpp b/src/rpcsmessage.cpp new file mode 100644 index 0000000..d8cd438 --- /dev/null +++ b/src/rpcsmessage.cpp @@ -0,0 +1,895 @@ +// Copyright (c) 2014 The ShadowCoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "main.h" +#include "trianglesrpc.h" + +#include + +#include "smessage.h" +#include "init.h" // pwalletMain + +using namespace json_spirit; +using namespace std; + +extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, json_spirit::Object& entry); + + + +Value smsgenable(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "smsgenable \n" + "Enable secure messaging."); + + if (fSecMsgEnabled) + throw runtime_error("Secure messaging is already enabled."); + + Object result; + if (!SecureMsgEnable()) + { + result.push_back(Pair("result", "Failed to enable secure messaging.")); + } else + { + result.push_back(Pair("result", "Enabled secure messaging.")); + } + return result; +} + +Value smsgdisable(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "smsgdisable \n" + "Disable secure messaging."); + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is already disabled."); + + Object result; + if (!SecureMsgDisable()) + { + result.push_back(Pair("result", "Failed to disable secure messaging.")); + } else + { + result.push_back(Pair("result", "Disabled secure messaging.")); + } + return result; +} + +Value smsgoptions(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 3) + throw runtime_error( + "smsgoptions [list|set ]\n" + "List and manage options."); + + std::string mode = "list"; + if (params.size() > 0) + { + mode = params[0].get_str(); + }; + + Object result; + + if (mode == "list") + { + result.push_back(Pair("option", std::string("newAddressRecv = ") + (smsgOptions.fNewAddressRecv ? "true" : "false"))); + result.push_back(Pair("option", std::string("newAddressAnon = ") + (smsgOptions.fNewAddressAnon ? "true" : "false"))); + + result.push_back(Pair("result", "Success.")); + } else + if (mode == "set") + { + if (params.size() < 3) + { + result.push_back(Pair("result", "Too few parameters.")); + result.push_back(Pair("expected", "set ")); + return result; + }; + + std::string optname = params[1].get_str(); + std::string value = params[2].get_str(); + + if (optname == "newAddressRecv") + { + if (value == "+" || value == "on" || value == "true" || value == "1") + { + smsgOptions.fNewAddressRecv = true; + } else + if (value == "-" || value == "off" || value == "false" || value == "0") + { + smsgOptions.fNewAddressRecv = false; + } else + { + result.push_back(Pair("result", "Unknown value.")); + return result; + }; + result.push_back(Pair("set option", std::string("newAddressRecv = ") + (smsgOptions.fNewAddressRecv ? "true" : "false"))); + } else + if (optname == "newAddressAnon") + { + if (value == "+" || value == "on" || value == "true" || value == "1") + { + smsgOptions.fNewAddressAnon = true; + } else + if (value == "-" || value == "off" || value == "false" || value == "0") + { + smsgOptions.fNewAddressAnon = false; + } else + { + result.push_back(Pair("result", "Unknown value.")); + return result; + }; + result.push_back(Pair("set option", std::string("newAddressAnon = ") + (smsgOptions.fNewAddressAnon ? "true" : "false"))); + } else + { + result.push_back(Pair("result", "Option not found.")); + return result; + }; + } else + { + result.push_back(Pair("result", "Unknown Mode.")); + result.push_back(Pair("expected", "smsgoption [list|set ]")); + }; + return result; +} + +Value smsglocalkeys(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 3) + throw runtime_error( + "smsglocalkeys [whitelist|all|wallet|recv <+/->
|anon <+/->
]\n" + "List and manage keys."); + + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is disabled."); + + Object result; + + std::string mode = "whitelist"; + if (params.size() > 0) + { + mode = params[0].get_str(); + }; + + char cbuf[256]; + + if (mode == "whitelist" + || mode == "all") + { + uint32_t nKeys = 0; + int all = mode == "all" ? 1 : 0; + for (std::vector::iterator it = smsgAddresses.begin(); it != smsgAddresses.end(); ++it) + { + if (!all + && !it->fReceiveEnabled) + continue; + + CTrianglesAddress coinAddress(it->sAddress); + if (!coinAddress.IsValid()) + continue; + + std::string sPublicKey; + + CKeyID keyID; + if (!coinAddress.GetKeyID(keyID)) + continue; + + CPubKey pubKey; + if (!pwalletMain->GetPubKey(keyID, pubKey)) + continue; + if (!pubKey.IsValid() + || !pubKey.IsCompressed()) + { + continue; + }; + + + sPublicKey = EncodeBase58(pubKey.Raw()); + + std::string sLabel = pwalletMain->mapAddressBook[keyID]; + std::string sInfo; + if (all) + sInfo = std::string("Receive ") + (it->fReceiveEnabled ? "on, " : "off, "); + sInfo += std::string("Anon ") + (it->fReceiveAnon ? "on" : "off"); + result.push_back(Pair("key", it->sAddress + " - " + sPublicKey + " " + sInfo + " - " + sLabel)); + + nKeys++; + }; + + + snprintf(cbuf, sizeof(cbuf), "%u keys listed.", nKeys); + result.push_back(Pair("result", std::string(cbuf))); + + } else + if (mode == "recv") + { + if (params.size() < 3) + { + result.push_back(Pair("result", "Too few parameters.")); + result.push_back(Pair("expected", "recv <+/->
")); + return result; + }; + + std::string op = params[1].get_str(); + std::string addr = params[2].get_str(); + + std::vector::iterator it; + for (it = smsgAddresses.begin(); it != smsgAddresses.end(); ++it) + { + if (addr != it->sAddress) + continue; + break; + }; + + if (it == smsgAddresses.end()) + { + result.push_back(Pair("result", "Address not found.")); + return result; + }; + + if (op == "+" || op == "on" || op == "add" || op == "a") + { + it->fReceiveEnabled = true; + } else + if (op == "-" || op == "off" || op == "rem" || op == "r") + { + it->fReceiveEnabled = false; + } else + { + result.push_back(Pair("result", "Unknown operation.")); + return result; + }; + + std::string sInfo; + sInfo = std::string("Receive ") + (it->fReceiveEnabled ? "on, " : "off,"); + sInfo += std::string("Anon ") + (it->fReceiveAnon ? "on" : "off"); + result.push_back(Pair("result", "Success.")); + result.push_back(Pair("key", it->sAddress + " " + sInfo)); + return result; + + } else + if (mode == "anon") + { + if (params.size() < 3) + { + result.push_back(Pair("result", "Too few parameters.")); + result.push_back(Pair("expected", "anon <+/->
")); + return result; + }; + + std::string op = params[1].get_str(); + std::string addr = params[2].get_str(); + + std::vector::iterator it; + for (it = smsgAddresses.begin(); it != smsgAddresses.end(); ++it) + { + if (addr != it->sAddress) + continue; + break; + }; + + if (it == smsgAddresses.end()) + { + result.push_back(Pair("result", "Address not found.")); + return result; + }; + + if (op == "+" || op == "on" || op == "add" || op == "a") + { + it->fReceiveAnon = true; + } else + if (op == "-" || op == "off" || op == "rem" || op == "r") + { + it->fReceiveAnon = false; + } else + { + result.push_back(Pair("result", "Unknown operation.")); + return result; + }; + + std::string sInfo; + sInfo = std::string("Receive ") + (it->fReceiveEnabled ? "on, " : "off,"); + sInfo += std::string("Anon ") + (it->fReceiveAnon ? "on" : "off"); + result.push_back(Pair("result", "Success.")); + result.push_back(Pair("key", it->sAddress + " " + sInfo)); + return result; + + } else + if (mode == "wallet") + { + uint32_t nKeys = 0; + BOOST_FOREACH(const PAIRTYPE(CTxDestination, std::string)& entry, pwalletMain->mapAddressBook) + { + if (!IsMine(*pwalletMain, entry.first)) + continue; + + CTrianglesAddress coinAddress(entry.first); + if (!coinAddress.IsValid()) + continue; + + std::string address; + std::string sPublicKey; + address = coinAddress.ToString(); + + CKeyID keyID; + if (!coinAddress.GetKeyID(keyID)) + continue; + + CPubKey pubKey; + if (!pwalletMain->GetPubKey(keyID, pubKey)) + continue; + if (!pubKey.IsValid() + || !pubKey.IsCompressed()) + { + continue; + }; + + sPublicKey = EncodeBase58(pubKey.Raw()); + + result.push_back(Pair("key", address + " - " + sPublicKey + " - " + entry.second)); + nKeys++; + }; + + snprintf(cbuf, sizeof(cbuf), "%u keys listed from wallet.", nKeys); + result.push_back(Pair("result", std::string(cbuf))); + } else + { + result.push_back(Pair("result", "Unknown Mode.")); + result.push_back(Pair("expected", "smsglocalkeys [whitelist|all|wallet|recv <+/->
|anon <+/->
]")); + }; + + return result; +}; + +Value smsgscanchain(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "smsgscanchain \n" + "Look for public keys in the block chain."); + + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is disabled."); + + Object result; + if (!SecureMsgScanBlockChain()) + { + result.push_back(Pair("result", "Scan Chain Failed.")); + } else + { + result.push_back(Pair("result", "Scan Chain Completed.")); + } + return result; +} + +Value smsgscanbuckets(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "smsgscanbuckets \n" + "Force rescan of all messages in the bucket store."); + + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is disabled."); + + if (pwalletMain->IsLocked()) + throw runtime_error("Wallet is locked."); + + Object result; + if (!SecureMsgScanBuckets()) + { + result.push_back(Pair("result", "Scan Buckets Failed.")); + } else + { + result.push_back(Pair("result", "Scan Buckets Completed.")); + } + return result; +} + +Value smsgaddkey(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 2) + throw runtime_error( + "smsgaddkey
\n" + "Add address, pubkey pair to database."); + + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is disabled."); + + std::string addr = params[0].get_str(); + std::string pubk = params[1].get_str(); + + Object result; + int rv = SecureMsgAddAddress(addr, pubk); + if (rv != 0) + { + result.push_back(Pair("result", "Public key not added to db.")); + switch (rv) + { + case 2: result.push_back(Pair("reason", "publicKey is invalid.")); break; + case 3: result.push_back(Pair("reason", "publicKey does not match address.")); break; + case 4: result.push_back(Pair("reason", "address is already in db.")); break; + case 5: result.push_back(Pair("reason", "address is invalid.")); break; + default: result.push_back(Pair("reason", "error.")); break; + }; + } else + { + result.push_back(Pair("result", "Added public key to db.")); + }; + + return result; +} + +Value smsggetpubkey(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "smsggetpubkey
\n" + "Return the base58 encoded compressed public key for an address.\n" + "Tests localkeys first, then looks in public key db.\n"); + + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is disabled."); + + + std::string address = params[0].get_str(); + std::string publicKey; + + Object result; + int rv = SecureMsgGetLocalPublicKey(address, publicKey); + switch (rv) + { + case 0: + result.push_back(Pair("result", "Success.")); + result.push_back(Pair("address in wallet", address)); + result.push_back(Pair("compressed public key", publicKey)); + return result; // success, don't check db + case 2: + case 3: + result.push_back(Pair("result", "Failed.")); + result.push_back(Pair("message", "Invalid address.")); + return result; + case 4: + break; // check db + //case 1: + default: + result.push_back(Pair("result", "Failed.")); + result.push_back(Pair("message", "Error.")); + return result; + }; + + CTrianglesAddress coinAddress(address); + + + CKeyID keyID; + if (!coinAddress.GetKeyID(keyID)) + { + result.push_back(Pair("result", "Failed.")); + result.push_back(Pair("message", "Invalid address.")); + return result; + }; + + CPubKey cpkFromDB; + rv = SecureMsgGetStoredKey(keyID, cpkFromDB); + + switch (rv) + { + case 0: + if (!cpkFromDB.IsValid() + || !cpkFromDB.IsCompressed()) + { + result.push_back(Pair("result", "Failed.")); + result.push_back(Pair("message", "Invalid address.")); + } else + { + //cpkFromDB.SetCompressedPubKey(); // make sure key is compressed + publicKey = EncodeBase58(cpkFromDB.Raw()); + + result.push_back(Pair("result", "Success.")); + result.push_back(Pair("peer address in DB", address)); + result.push_back(Pair("compressed public key", publicKey)); + }; + break; + case 2: + result.push_back(Pair("result", "Failed.")); + result.push_back(Pair("message", "Address not found in wallet or db.")); + return result; + //case 1: + default: + result.push_back(Pair("result", "Failed.")); + result.push_back(Pair("message", "Error, GetStoredKey().")); + return result; + }; + + return result; +} + +Value smsgsend(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 3) + throw runtime_error( + "smsgsend \n" + "Send an encrypted message from addrFrom to addrTo."); + + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is disabled."); + + std::string addrFrom = params[0].get_str(); + std::string addrTo = params[1].get_str(); + std::string msg = params[2].get_str(); + + + Object result; + + std::string sError; + if (SecureMsgSend(addrFrom, addrTo, msg, sError) != 0) + { + result.push_back(Pair("result", "Send failed.")); + result.push_back(Pair("error", sError)); + } else + result.push_back(Pair("result", "Sent.")); + + return result; +} + +Value smsgsendanon(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 2) + throw runtime_error( + "smsgsendanon \n" + "Send an anonymous encrypted message to addrTo."); + + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is disabled."); + + std::string addrFrom = "anon"; + std::string addrTo = params[0].get_str(); + std::string msg = params[1].get_str(); + + + Object result; + std::string sError; + if (SecureMsgSend(addrFrom, addrTo, msg, sError) != 0) + { + result.push_back(Pair("result", "Send failed.")); + result.push_back(Pair("error", sError)); + } else + result.push_back(Pair("result", "Sent.")); + + return result; +} + +Value smsginbox(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) // defaults to read + throw runtime_error( + "smsginbox [all|unread|clear]\n" + "Decrypt and display all received messages.\n" + "Warning: clear will delete all messages."); + + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is disabled."); + + if (pwalletMain->IsLocked()) + throw runtime_error("Wallet is locked."); + + std::string mode = "unread"; + if (params.size() > 0) + { + mode = params[0].get_str(); + } + + + Object result; + + std::vector vchKey; + vchKey.resize(16); + memset(&vchKey[0], 0, 16); + + { + LOCK(cs_smsgDB); + + SecMsgDB dbInbox; + + if (!dbInbox.Open("cr+")) + throw runtime_error("Could not open DB."); + + uint32_t nMessages = 0; + char cbuf[256]; + + std::string sPrefix("im"); + unsigned char chKey[18]; + + if (mode == "clear") + { + dbInbox.TxnBegin(); + + leveldb::Iterator* it = dbInbox.pdb->NewIterator(leveldb::ReadOptions()); + while (dbInbox.NextSmesgKey(it, sPrefix, chKey)) + { + dbInbox.EraseSmesg(chKey); + nMessages++; + }; + delete it; + dbInbox.TxnCommit(); + + snprintf(cbuf, sizeof(cbuf), "Deleted %u messages.", nMessages); + result.push_back(Pair("result", std::string(cbuf))); + } else + if (mode == "all" + || mode == "unread") + { + int fCheckReadStatus = mode == "unread" ? 1 : 0; + + SecMsgStored smsgStored; + MessageData msg; + + dbInbox.TxnBegin(); + + leveldb::Iterator* it = dbInbox.pdb->NewIterator(leveldb::ReadOptions()); + while (dbInbox.NextSmesg(it, sPrefix, chKey, smsgStored)) + { + if (fCheckReadStatus + && !(smsgStored.status & SMSG_MASK_UNREAD)) + continue; + + uint32_t nPayload = smsgStored.vchMessage.size() - SMSG_HDR_LEN; + if (SecureMsgDecrypt(false, smsgStored.sAddrTo, &smsgStored.vchMessage[0], &smsgStored.vchMessage[SMSG_HDR_LEN], nPayload, msg) == 0) + { + Object objM; + objM.push_back(Pair("received", getTimeString(smsgStored.timeReceived, cbuf, sizeof(cbuf)))); + objM.push_back(Pair("sent", getTimeString(msg.timestamp, cbuf, sizeof(cbuf)))); + objM.push_back(Pair("from", msg.sFromAddress)); + objM.push_back(Pair("to", smsgStored.sAddrTo)); + objM.push_back(Pair("text", std::string((char*)&msg.vchMessage[0]))); // ugh + + result.push_back(Pair("message", objM)); + } else + { + result.push_back(Pair("message", "Could not decrypt.")); + }; + + if (fCheckReadStatus) + { + smsgStored.status &= ~SMSG_MASK_UNREAD; + dbInbox.WriteSmesg(chKey, smsgStored); + }; + nMessages++; + }; + delete it; + dbInbox.TxnCommit(); + + snprintf(cbuf, sizeof(cbuf), "%u messages shown.", nMessages); + result.push_back(Pair("result", std::string(cbuf))); + + } else + { + result.push_back(Pair("result", "Unknown Mode.")); + result.push_back(Pair("expected", "[all|unread|clear].")); + }; + } + + return result; +}; + +Value smsgoutbox(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) // defaults to read + throw runtime_error( + "smsgoutbox [all|clear]\n" + "Decrypt and display all sent messages.\n" + "Warning: clear will delete all sent messages."); + + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is disabled."); + + if (pwalletMain->IsLocked()) + throw runtime_error("Wallet is locked."); + + std::string mode = "all"; + if (params.size() > 0) + { + mode = params[0].get_str(); + } + + + Object result; + + std::string sPrefix("sm"); + unsigned char chKey[18]; + memset(&chKey[0], 0, 18); + + { + LOCK(cs_smsgDB); + + SecMsgDB dbOutbox; + + if (!dbOutbox.Open("cr+")) + throw runtime_error("Could not open DB."); + + uint32_t nMessages = 0; + char cbuf[256]; + + if (mode == "clear") + { + dbOutbox.TxnBegin(); + + leveldb::Iterator* it = dbOutbox.pdb->NewIterator(leveldb::ReadOptions()); + while (dbOutbox.NextSmesgKey(it, sPrefix, chKey)) + { + dbOutbox.EraseSmesg(chKey); + nMessages++; + }; + delete it; + dbOutbox.TxnCommit(); + + + snprintf(cbuf, sizeof(cbuf), "Deleted %u messages.", nMessages); + result.push_back(Pair("result", std::string(cbuf))); + } else + if (mode == "all") + { + SecMsgStored smsgStored; + MessageData msg; + leveldb::Iterator* it = dbOutbox.pdb->NewIterator(leveldb::ReadOptions()); + while (dbOutbox.NextSmesg(it, sPrefix, chKey, smsgStored)) + { + uint32_t nPayload = smsgStored.vchMessage.size() - SMSG_HDR_LEN; + + if (SecureMsgDecrypt(false, smsgStored.sAddrOutbox, &smsgStored.vchMessage[0], &smsgStored.vchMessage[SMSG_HDR_LEN], nPayload, msg) == 0) + { + Object objM; + objM.push_back(Pair("sent", getTimeString(msg.timestamp, cbuf, sizeof(cbuf)))); + objM.push_back(Pair("from", msg.sFromAddress)); + objM.push_back(Pair("to", smsgStored.sAddrTo)); + objM.push_back(Pair("text", std::string((char*)&msg.vchMessage[0]))); // ugh + + result.push_back(Pair("message", objM)); + } else + { + result.push_back(Pair("message", "Could not decrypt.")); + }; + nMessages++; + }; + delete it; + + snprintf(cbuf, sizeof(cbuf), "%u sent messages shown.", nMessages); + result.push_back(Pair("result", std::string(cbuf))); + } else + { + result.push_back(Pair("result", "Unknown Mode.")); + result.push_back(Pair("expected", "[all|clear].")); + }; + } + + return result; +}; + + +Value smsgbuckets(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "smsgbuckets [stats|dump]\n" + "Display some statistics."); + + if (!fSecMsgEnabled) + throw runtime_error("Secure messaging is disabled."); + + std::string mode = "stats"; + if (params.size() > 0) + { + mode = params[0].get_str(); + }; + + Object result; + + char cbuf[256]; + if (mode == "stats") + { + uint32_t nBuckets = 0; + uint32_t nMessages = 0; + uint64_t nBytes = 0; + { + LOCK(cs_smsg); + std::map::iterator it; + it = smsgBuckets.begin(); + + for (it = smsgBuckets.begin(); it != smsgBuckets.end(); ++it) + { + std::set& tokenSet = it->second.setTokens; + + std::string sBucket = boost::lexical_cast(it->first); + std::string sFile = sBucket + "_01.dat"; + + snprintf(cbuf, sizeof(cbuf), "%"PRIszu, tokenSet.size()); + std::string snContents(cbuf); + + std::string sHash = boost::lexical_cast(it->second.hash); + + nBuckets++; + nMessages += tokenSet.size(); + + Object objM; + objM.push_back(Pair("bucket", sBucket)); + objM.push_back(Pair("time", getTimeString(it->first, cbuf, sizeof(cbuf)))); + objM.push_back(Pair("no. messages", snContents)); + objM.push_back(Pair("hash", sHash)); + objM.push_back(Pair("last changed", getTimeString(it->second.timeChanged, cbuf, sizeof(cbuf)))); + + boost::filesystem::path fullPath = GetDataDir() / "smsgStore" / sFile; + + + if (!boost::filesystem::exists(fullPath)) + { + // -- If there is a file for an empty bucket something is wrong. + if (tokenSet.size() == 0) + objM.push_back(Pair("file size", "Empty bucket.")); + else + objM.push_back(Pair("file size, error", "File not found.")); + } else + { + try { + + uint64_t nFBytes = 0; + nFBytes = boost::filesystem::file_size(fullPath); + nBytes += nFBytes; + objM.push_back(Pair("file size", fsReadable(nFBytes))); + } catch (const boost::filesystem::filesystem_error& ex) + { + objM.push_back(Pair("file size, error", ex.what())); + }; + }; + + result.push_back(Pair("bucket", objM)); + }; + }; // LOCK(cs_smsg); + + + std::string snBuckets = boost::lexical_cast(nBuckets); + std::string snMessages = boost::lexical_cast(nMessages); + + Object objM; + objM.push_back(Pair("buckets", snBuckets)); + objM.push_back(Pair("messages", snMessages)); + objM.push_back(Pair("size", fsReadable(nBytes))); + result.push_back(Pair("total", objM)); + + } else + if (mode == "dump") + { + { + LOCK(cs_smsg); + std::map::iterator it; + it = smsgBuckets.begin(); + + for (it = smsgBuckets.begin(); it != smsgBuckets.end(); ++it) + { + std::string sFile = boost::lexical_cast(it->first) + "_01.dat"; + + try { + boost::filesystem::path fullPath = GetDataDir() / "smsgStore" / sFile; + boost::filesystem::remove(fullPath); + } catch (const boost::filesystem::filesystem_error& ex) + { + //objM.push_back(Pair("file size, error", ex.what())); + printf("Error removing bucket file %s.\n", ex.what()); + }; + }; + smsgBuckets.clear(); + }; // LOCK(cs_smsg); + + result.push_back(Pair("result", "Removed all buckets.")); + + } else + { + result.push_back(Pair("result", "Unknown Mode.")); + result.push_back(Pair("expected", "[stats|dump].")); + }; + + + return result; +}; diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index f58a05f..66c2a66 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -5,18 +5,31 @@ #include "wallet.h" #include "walletdb.h" -#include "bitcoinrpc.h" +#include "trianglesrpc.h" #include "init.h" #include "base58.h" +#include "smessage.h" using namespace json_spirit; using namespace std; -int64 nWalletUnlockTime; +int64_t nWalletUnlockTime; static CCriticalSection cs_nWalletUnlockTime; extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, json_spirit::Object& entry); +static void accountingDeprecationCheck() +{ + if (!GetBoolArg("-enableaccounts", false)) + throw runtime_error( + "Accounting API is deprecated and will be removed in future." + "It can easily result in negative or odd balances if misused or misunderstood, which has happened in the field." + "If you still want to enable it, add to your config file enableaccounts=1."); + + if (GetBoolArg("-staking", true)) + throw runtime_error("If you want to use accounting API, staking must be disabled, add to your config file staking=0."); +} + std::string HelpRequiringPassphrase() { return pwalletMain->IsCrypted() @@ -28,8 +41,8 @@ void EnsureWalletIsUnlocked() { if (pwalletMain->IsLocked()) throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first."); - if (fWalletUnlockMintOnly) - throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Wallet unlocked for block minting only."); + if (fWalletUnlockStakingOnly) + throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Wallet is unlocked for staking only."); } void WalletTxToJSON(const CWalletTx& wtx, Object& entry) @@ -38,7 +51,7 @@ void WalletTxToJSON(const CWalletTx& wtx, Object& entry) entry.push_back(Pair("confirmations", confirms)); if (wtx.IsCoinBase() || wtx.IsCoinStake()) entry.push_back(Pair("generated", true)); - if (confirms) + if (confirms > 0) { entry.push_back(Pair("blockhash", wtx.hashBlock.GetHex())); entry.push_back(Pair("blockindex", wtx.nIndex)); @@ -69,7 +82,7 @@ Value getinfo(const Array& params, bool fHelp) proxyType proxy; GetProxy(NET_IPV4, proxy); - Object obj; + Object obj, diff; obj.push_back(Pair("version", FormatFullVersion())); obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION)); obj.push_back(Pair("walletversion", pwalletMain->GetVersion())); @@ -77,15 +90,21 @@ Value getinfo(const Array& params, bool fHelp) obj.push_back(Pair("newmint", ValueFromAmount(pwalletMain->GetNewMint()))); obj.push_back(Pair("stake", ValueFromAmount(pwalletMain->GetStake()))); obj.push_back(Pair("blocks", (int)nBestHeight)); + obj.push_back(Pair("timeoffset", (boost::int64_t)GetTimeOffset())); obj.push_back(Pair("moneysupply", ValueFromAmount(pindexBest->nMoneySupply))); obj.push_back(Pair("connections", (int)vNodes.size())); obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string()))); obj.push_back(Pair("ip", addrSeenByPeer.ToStringIP())); - obj.push_back(Pair("difficulty", (double)GetDifficulty())); + + diff.push_back(Pair("proof-of-work", GetDifficulty())); + diff.push_back(Pair("proof-of-stake", GetDifficulty(GetLastBlockIndex(pindexBest, true)))); + obj.push_back(Pair("difficulty", diff)); + obj.push_back(Pair("testnet", fTestNet)); obj.push_back(Pair("keypoololdest", (boost::int64_t)pwalletMain->GetOldestKeyPoolTime())); - obj.push_back(Pair("keypoolsize", pwalletMain->GetKeyPoolSize())); + obj.push_back(Pair("keypoolsize", (int)pwalletMain->GetKeyPoolSize())); obj.push_back(Pair("paytxfee", ValueFromAmount(nTransactionFee))); + obj.push_back(Pair("mininput", ValueFromAmount(nMinimumInputValue))); if (pwalletMain->IsCrypted()) obj.push_back(Pair("unlocked_until", (boost::int64_t)nWalletUnlockTime / 1000)); obj.push_back(Pair("errors", GetWarnings("statusbar"))); @@ -126,7 +145,7 @@ Value getnewaddress(const Array& params, bool fHelp) if (fHelp || params.size() > 1) throw runtime_error( "getnewaddress [account]\n" - "Returns a new triangles address for receiving payments. " + "Returns a new Triangles address for receiving payments. " "If [account] is specified (recommended), it is added to the address book " "so payments received with the address will be credited to [account]."); @@ -146,11 +165,11 @@ Value getnewaddress(const Array& params, bool fHelp) pwalletMain->SetAddressBookName(keyID, strAccount); - return CBitcoinAddress(keyID).ToString(); + return CTrianglesAddress(keyID).ToString(); } -CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false) +CTrianglesAddress GetAccountAddress(string strAccount, bool bForceNew=false) { CWalletDB walletdb(pwalletMain->strWalletFile); @@ -185,7 +204,7 @@ CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false) walletdb.WriteAccount(strAccount, account); } - return CBitcoinAddress(account.vchPubKey.GetID()); + return CTrianglesAddress(account.vchPubKey.GetID()); } Value getaccountaddress(const Array& params, bool fHelp) @@ -193,7 +212,7 @@ Value getaccountaddress(const Array& params, bool fHelp) if (fHelp || params.size() != 1) throw runtime_error( "getaccountaddress \n" - "Returns the current triangles address for receiving payments to this account."); + "Returns the current Triangles address for receiving payments to this account."); // Parse the account first so we don't generate a key if there's an error string strAccount = AccountFromValue(params[0]); @@ -211,12 +230,12 @@ Value setaccount(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( - "setaccount \n" + "setaccount \n" "Sets the account associated with the given address."); - CBitcoinAddress address(params[0].get_str()); + CTrianglesAddress address(params[0].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid triangles address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Triangles address"); string strAccount; @@ -241,12 +260,12 @@ Value getaccount(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( - "getaccount \n" + "getaccount \n" "Returns the account associated with the given address."); - CBitcoinAddress address(params[0].get_str()); + CTrianglesAddress address(params[0].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid triangles address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Triangles address"); string strAccount; map::iterator mi = pwalletMain->mapAddressBook.find(address.Get()); @@ -267,9 +286,9 @@ Value getaddressesbyaccount(const Array& params, bool fHelp) // Find all addresses that have the given account Array ret; - BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, string)& item, pwalletMain->mapAddressBook) + BOOST_FOREACH(const PAIRTYPE(CTrianglesAddress, string)& item, pwalletMain->mapAddressBook) { - const CBitcoinAddress& address = item.first; + const CTrianglesAddress& address = item.first; const string& strName = item.second; if (strName == strAccount) ret.push_back(address.ToString()); @@ -281,31 +300,32 @@ Value sendtoaddress(const Array& params, bool fHelp) { if (fHelp || params.size() < 2 || params.size() > 4) throw runtime_error( - "sendtoaddress [comment] [comment-to]\n" + "sendtoaddress [comment] [comment-to]\n" " is a real and is rounded to the nearest 0.000001" + HelpRequiringPassphrase()); - CBitcoinAddress address(params[0].get_str()); + CTrianglesAddress address(params[0].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid triangles address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Triangles address"); // Amount - int64 nAmount = AmountFromValue(params[1]); + int64_t nAmount = AmountFromValue(params[1]); - if (nAmount < MIN_TXOUT_AMOUNT) - throw JSONRPCError(-101, "Send amount too small"); - - // Wallet comments + // Comments CWalletTx wtx; + + std::string sNarr; if (params.size() > 2 && params[2].type() != null_type && !params[2].get_str().empty()) wtx.mapValue["comment"] = params[2].get_str(); + sNarr = ""; if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty()) wtx.mapValue["to"] = params[3].get_str(); + sNarr = ""; if (pwalletMain->IsLocked()) throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first."); - string strError = pwalletMain->SendMoneyToDestination(address.Get(), nAmount, wtx); + string strError = pwalletMain->SendMoneyToDestination(address.Get(), nAmount, sNarr, wtx); if (strError != "") throw JSONRPCError(RPC_WALLET_ERROR, strError); @@ -322,19 +342,19 @@ Value listaddressgroupings(const Array& params, bool fHelp) "in past transactions"); Array jsonGroupings; - map balances = pwalletMain->GetAddressBalances(); + map balances = pwalletMain->GetAddressBalances(); BOOST_FOREACH(set grouping, pwalletMain->GetAddressGroupings()) { Array jsonGrouping; BOOST_FOREACH(CTxDestination address, grouping) { Array addressInfo; - addressInfo.push_back(CBitcoinAddress(address).ToString()); + addressInfo.push_back(CTrianglesAddress(address).ToString()); addressInfo.push_back(ValueFromAmount(balances[address])); { LOCK(pwalletMain->cs_wallet); - if (pwalletMain->mapAddressBook.find(CBitcoinAddress(address).Get()) != pwalletMain->mapAddressBook.end()) - addressInfo.push_back(pwalletMain->mapAddressBook.find(CBitcoinAddress(address).Get())->second); + if (pwalletMain->mapAddressBook.find(CTrianglesAddress(address).Get()) != pwalletMain->mapAddressBook.end()) + addressInfo.push_back(pwalletMain->mapAddressBook.find(CTrianglesAddress(address).Get())->second); } jsonGrouping.push_back(addressInfo); } @@ -347,7 +367,7 @@ Value signmessage(const Array& params, bool fHelp) { if (fHelp || params.size() != 2) throw runtime_error( - "signmessage \n" + "signmessage \n" "Sign a message with the private key of an address"); EnsureWalletIsUnlocked(); @@ -355,7 +375,7 @@ Value signmessage(const Array& params, bool fHelp) string strAddress = params[0].get_str(); string strMessage = params[1].get_str(); - CBitcoinAddress addr(strAddress); + CTrianglesAddress addr(strAddress); if (!addr.IsValid()) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid address"); @@ -382,14 +402,14 @@ Value verifymessage(const Array& params, bool fHelp) { if (fHelp || params.size() != 3) throw runtime_error( - "verifymessage \n" + "verifymessage \n" "Verify a signed message"); string strAddress = params[0].get_str(); string strSign = params[1].get_str(); string strMessage = params[2].get_str(); - CBitcoinAddress addr(strAddress); + CTrianglesAddress addr(strAddress); if (!addr.IsValid()) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid address"); @@ -419,14 +439,14 @@ Value getreceivedbyaddress(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( - "getreceivedbyaddress [minconf=1]\n" - "Returns the total amount received by in transactions with at least [minconf] confirmations."); + "getreceivedbyaddress [minconf=1]\n" + "Returns the total amount received by in transactions with at least [minconf] confirmations."); - // Bitcoin address - CBitcoinAddress address = CBitcoinAddress(params[0].get_str()); + // Triangles address + CTrianglesAddress address = CTrianglesAddress(params[0].get_str()); CScript scriptPubKey; if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid triangles address"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Triangles address"); scriptPubKey.SetDestination(address.Get()); if (!IsMine(*pwalletMain,scriptPubKey)) return (double)0.0; @@ -437,7 +457,7 @@ Value getreceivedbyaddress(const Array& params, bool fHelp) nMinDepth = params[1].get_int(); // Tally - int64 nAmount = 0; + int64_t nAmount = 0; for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; @@ -472,6 +492,8 @@ Value getreceivedbyaccount(const Array& params, bool fHelp) "getreceivedbyaccount [minconf=1]\n" "Returns the total amount received by addresses with in transactions with at least [minconf] confirmations."); + accountingDeprecationCheck(); + // Minimum confirmations int nMinDepth = 1; if (params.size() > 1) @@ -483,7 +505,7 @@ Value getreceivedbyaccount(const Array& params, bool fHelp) GetAccountAddresses(strAccount, setAddress); // Tally - int64 nAmount = 0; + int64_t nAmount = 0; for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; @@ -503,28 +525,23 @@ Value getreceivedbyaccount(const Array& params, bool fHelp) } -int64 GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth) +int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth) { - int64 nBalance = 0; + int64_t nBalance = 0; // Tally wallet transactions for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; - if (!wtx.IsFinal()) + if (!wtx.IsFinal() || wtx.GetDepthInMainChain() < 0) continue; - int64 nGeneratedImmature, nGeneratedMature, nReceived, nSent, nFee; - wtx.GetAccountAmounts(strAccount, nGeneratedImmature, nGeneratedMature, nReceived, nSent, nFee); + int64_t nReceived, nSent, nFee; + wtx.GetAccountAmounts(strAccount, nReceived, nSent, nFee); - if (nReceived != 0 && wtx.GetDepthInMainChain() >= nMinDepth) + if (nReceived != 0 && wtx.GetDepthInMainChain() >= nMinDepth && wtx.GetBlocksToMaturity() == 0) nBalance += nReceived; - - if((wtx.IsCoinBaseOrStake() && wtx.GetDepthInMainChain() >= nMinDepth && wtx.GetBlocksToMaturity() == 0) - || !wtx.IsCoinBaseOrStake()) - { - nBalance += nGeneratedMature - nSent - nFee; - } + nBalance -= nSent + nFee; } // Tally internal accounting entries @@ -533,7 +550,7 @@ int64 GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinD return nBalance; } -int64 GetAccountBalance(const string& strAccount, int nMinDepth) +int64_t GetAccountBalance(const string& strAccount, int nMinDepth) { CWalletDB walletdb(pwalletMain->strWalletFile); return GetAccountBalance(walletdb, strAccount, nMinDepth); @@ -558,42 +575,36 @@ Value getbalance(const Array& params, bool fHelp) if (params[0].get_str() == "*") { // Calculate total balance a different way from GetBalance() // (GetBalance() sums up all unspent TxOuts) - // getbalance and getbalance '*' should always return the same number. - int64 nBalance = 0; + // getbalance and getbalance '*' 0 should return the same number. + int64_t nBalance = 0; for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; - if (!wtx.IsFinal()) + if (!wtx.IsTrusted()) continue; - int64 allGeneratedImmature, allGeneratedMature, allFee; - allGeneratedImmature = allGeneratedMature = allFee = 0; - + int64_t allFee; string strSentAccount; - list > listReceived; - list > listSent; - wtx.GetAmounts(allGeneratedImmature, allGeneratedMature, listReceived, listSent, allFee, strSentAccount); - if (wtx.GetDepthInMainChain() >= nMinDepth) + list > listReceived; + list > listSent; + wtx.GetAmounts(listReceived, listSent, allFee, strSentAccount); + if (wtx.GetDepthInMainChain() >= nMinDepth && wtx.GetBlocksToMaturity() == 0) { - BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64)& r, listReceived) + BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listReceived) nBalance += r.second; } - - if((wtx.IsCoinBaseOrStake() && wtx.GetDepthInMainChain() >= nMinDepth && wtx.GetBlocksToMaturity() == 0) - || !wtx.IsCoinBaseOrStake()) - { - BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64)& r, listSent) + BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listSent) nBalance -= r.second; - nBalance -= allFee; - nBalance += allGeneratedMature; - } + nBalance -= allFee; } return ValueFromAmount(nBalance); } + accountingDeprecationCheck(); + string strAccount = AccountFromValue(params[0]); - int64 nBalance = GetAccountBalance(strAccount, nMinDepth); + int64_t nBalance = GetAccountBalance(strAccount, nMinDepth); return ValueFromAmount(nBalance); } @@ -606,12 +617,11 @@ Value movecmd(const Array& params, bool fHelp) "move [minconf=1] [comment]\n" "Move from one account in your wallet to another."); + accountingDeprecationCheck(); + string strFrom = AccountFromValue(params[0]); string strTo = AccountFromValue(params[1]); - int64 nAmount = AmountFromValue(params[2]); - - if (nAmount < MIN_TXOUT_AMOUNT) - throw JSONRPCError(-101, "Send amount too small"); + int64_t nAmount = AmountFromValue(params[2]); if (params.size() > 3) // unused parameter, used to be nMinDepth, keep type-checking it though @@ -624,7 +634,7 @@ Value movecmd(const Array& params, bool fHelp) if (!walletdb.TxnBegin()) throw JSONRPCError(RPC_DATABASE_ERROR, "database error"); - int64 nNow = GetAdjustedTime(); + int64_t nNow = GetAdjustedTime(); // Debit CAccountingEntry debit; @@ -657,18 +667,15 @@ Value sendfrom(const Array& params, bool fHelp) { if (fHelp || params.size() < 3 || params.size() > 6) throw runtime_error( - "sendfrom [minconf=1] [comment] [comment-to]\n" + "sendfrom [minconf=1] [comment] [comment-to]\n" " is a real and is rounded to the nearest 0.000001" + HelpRequiringPassphrase()); string strAccount = AccountFromValue(params[0]); - CBitcoinAddress address(params[1].get_str()); + CTrianglesAddress address(params[1].get_str()); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid triangles address"); - int64 nAmount = AmountFromValue(params[2]); - - if (nAmount < MIN_TXOUT_AMOUNT) - throw JSONRPCError(-101, "Send amount too small"); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Triangles address"); + int64_t nAmount = AmountFromValue(params[2]); int nMinDepth = 1; if (params.size() > 3) @@ -676,20 +683,24 @@ Value sendfrom(const Array& params, bool fHelp) CWalletTx wtx; wtx.strFromAccount = strAccount; + + std::string sNarr; if (params.size() > 4 && params[4].type() != null_type && !params[4].get_str().empty()) wtx.mapValue["comment"] = params[4].get_str(); + sNarr = ""; if (params.size() > 5 && params[5].type() != null_type && !params[5].get_str().empty()) wtx.mapValue["to"] = params[5].get_str(); + sNarr = ""; EnsureWalletIsUnlocked(); // Check funds - int64 nBalance = GetAccountBalance(strAccount, nMinDepth); + int64_t nBalance = GetAccountBalance(strAccount, nMinDepth); if (nAmount > nBalance) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); // Send - string strError = pwalletMain->SendMoneyToDestination(address.Get(), nAmount, wtx); + string strError = pwalletMain->SendMoneyToDestination(address.Get(), nAmount, sNarr, wtx); if (strError != "") throw JSONRPCError(RPC_WALLET_ERROR, strError); @@ -701,7 +712,7 @@ Value sendmany(const Array& params, bool fHelp) { if (fHelp || params.size() < 2 || params.size() > 4) throw runtime_error( - "sendmany {address:amount,...} [minconf=1] [comment]\n" + "sendmany {address:amount,...} [minconf=1] [comment]\n" "amounts are double-precision floating point numbers" + HelpRequiringPassphrase()); @@ -712,20 +723,19 @@ Value sendmany(const Array& params, bool fHelp) nMinDepth = params[2].get_int(); CWalletTx wtx; - wtx.strFromAccount = strAccount; if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty()) wtx.mapValue["comment"] = params[3].get_str(); - set setAddress; - vector > vecSend; + set setAddress; + vector > vecSend; - int64 totalAmount = 0; + int64_t totalAmount = 0; BOOST_FOREACH(const Pair& s, sendTo) { - CBitcoinAddress address(s.name_); + CTrianglesAddress address(s.name_); if (!address.IsValid()) - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid triangles address: ")+s.name_); + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Triangles address: ")+s.name_); if (setAddress.count(address)) throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); @@ -733,10 +743,7 @@ Value sendmany(const Array& params, bool fHelp) CScript scriptPubKey; scriptPubKey.SetDestination(address.Get()); - int64 nAmount = AmountFromValue(s.value_); - - if (nAmount < MIN_TXOUT_AMOUNT) - throw JSONRPCError(-101, "Send amount too small"); + int64_t nAmount = AmountFromValue(s.value_); totalAmount += nAmount; @@ -746,13 +753,13 @@ Value sendmany(const Array& params, bool fHelp) EnsureWalletIsUnlocked(); // Check funds - int64 nBalance = GetAccountBalance(strAccount, nMinDepth); + int64_t nBalance = GetAccountBalance(strAccount, nMinDepth); if (totalAmount > nBalance) throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); // Send CReserveKey keyChange(pwalletMain); - int64 nFeeRequired = 0; + int64_t nFeeRequired = 0; bool fCreated = pwalletMain->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired); if (!fCreated) { @@ -772,7 +779,7 @@ Value addmultisigaddress(const Array& params, bool fHelp) { string msg = "addmultisigaddress <'[\"key\",\"key\"]'> [account]\n" "Add a nrequired-to-sign multisignature address to the wallet\"\n" - "each key is a triangles address or hex-encoded public key\n" + "each key is a Triangles address or hex-encoded public key\n" "If [account] is specified, assign address to [account]."; throw runtime_error(msg); } @@ -796,8 +803,8 @@ Value addmultisigaddress(const Array& params, bool fHelp) { const std::string& ks = keys[i].get_str(); - // Case 1: Bitcoin address and we have full public key: - CBitcoinAddress address(ks); + // Case 1: Triangles address and we have full public key: + CTrianglesAddress address(ks); if (address.IsValid()) { CKeyID keyID; @@ -832,13 +839,36 @@ Value addmultisigaddress(const Array& params, bool fHelp) pwalletMain->AddCScript(inner); pwalletMain->SetAddressBookName(innerID, strAccount); - return CBitcoinAddress(innerID).ToString(); + return CTrianglesAddress(innerID).ToString(); } +Value addredeemscript(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 2) + { + string msg = "addredeemscript [account]\n" + "Add a P2SH address with a specified redeemScript to the wallet.\n" + "If [account] is specified, assign address to [account]."; + throw runtime_error(msg); + } + + string strAccount; + if (params.size() > 1) + strAccount = AccountFromValue(params[1]); + + // Construct using pay-to-script-hash: + vector innerData = ParseHexV(params[0], "redeemScript"); + CScript inner(innerData.begin(), innerData.end()); + CScriptID innerID = inner.GetID(); + pwalletMain->AddCScript(inner); + + pwalletMain->SetAddressBookName(innerID, strAccount); + return CTrianglesAddress(innerID).ToString(); +} struct tallyitem { - int64 nAmount; + int64_t nAmount; int nConf; tallyitem() { @@ -860,7 +890,7 @@ Value ListReceived(const Array& params, bool fByAccounts) fIncludeEmpty = params[1].get_bool(); // Tally - map mapTally; + map mapTally; for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; @@ -887,15 +917,15 @@ Value ListReceived(const Array& params, bool fByAccounts) // Reply Array ret; map mapAccountTally; - BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, string)& item, pwalletMain->mapAddressBook) + BOOST_FOREACH(const PAIRTYPE(CTrianglesAddress, string)& item, pwalletMain->mapAddressBook) { - const CBitcoinAddress& address = item.first; + const CTrianglesAddress& address = item.first; const string& strAccount = item.second; - map::iterator it = mapTally.find(address); + map::iterator it = mapTally.find(address); if (it == mapTally.end() && !fIncludeEmpty) continue; - int64 nAmount = 0; + int64_t nAmount = 0; int nConf = std::numeric_limits::max(); if (it != mapTally.end()) { @@ -924,7 +954,7 @@ Value ListReceived(const Array& params, bool fByAccounts) { for (map::iterator it = mapAccountTally.begin(); it != mapAccountTally.end(); ++it) { - int64 nAmount = (*it).second.nAmount; + int64_t nAmount = (*it).second.nAmount; int nConf = (*it).second.nConf; Object obj; obj.push_back(Pair("account", (*it).first)); @@ -965,48 +995,37 @@ Value listreceivedbyaccount(const Array& params, bool fHelp) " \"amount\" : total amount received by addresses with this account\n" " \"confirmations\" : number of confirmations of the most recent transaction included"); + accountingDeprecationCheck(); + return ListReceived(params, true); } +static void MaybePushAddress(Object & entry, const CTxDestination &dest) +{ + CTrianglesAddress addr; + if (addr.Set(dest)) + entry.push_back(Pair("address", addr.ToString())); +} + void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDepth, bool fLong, Array& ret) { - int64 nGeneratedImmature, nGeneratedMature, nFee; + int64_t nFee; string strSentAccount; - list > listReceived; - list > listSent; + list > listReceived; + list > listSent; - wtx.GetAmounts(nGeneratedImmature, nGeneratedMature, listReceived, listSent, nFee, strSentAccount); + wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount); bool fAllAccounts = (strAccount == string("*")); - // Generated blocks assigned to account "" - if ((nGeneratedMature+nGeneratedImmature) != 0 && (fAllAccounts || strAccount == "")) - { - Object entry; - entry.push_back(Pair("account", string(""))); - if (nGeneratedImmature) - { - entry.push_back(Pair("category", wtx.GetDepthInMainChain() ? "immature" : "orphan")); - entry.push_back(Pair("amount", ValueFromAmount(nGeneratedImmature))); - } - else - { - entry.push_back(Pair("category", "generate")); - entry.push_back(Pair("amount", ValueFromAmount(nGeneratedMature))); - } - if (fLong) - WalletTxToJSON(wtx, entry); - ret.push_back(entry); - } - // Sent - if ((!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount)) + if ((!wtx.IsCoinStake()) && (!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount)) { - BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64)& s, listSent) + BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent) { Object entry; entry.push_back(Pair("account", strSentAccount)); - entry.push_back(Pair("address", CBitcoinAddress(s.first).ToString())); + MaybePushAddress(entry, s.first); entry.push_back(Pair("category", "send")); entry.push_back(Pair("amount", ValueFromAmount(-s.second))); entry.push_back(Pair("fee", ValueFromAmount(-nFee))); @@ -1019,7 +1038,8 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe // Received if (listReceived.size() > 0 && wtx.GetDepthInMainChain() >= nMinDepth) { - BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64)& r, listReceived) + bool stop = false; + BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& r, listReceived) { string account; if (pwalletMain->mapAddressBook.count(r.first)) @@ -1028,8 +1048,8 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe { Object entry; entry.push_back(Pair("account", account)); - entry.push_back(Pair("address", CBitcoinAddress(r.first).ToString())); - if (wtx.IsCoinBase()) + MaybePushAddress(entry, r.first); + if (wtx.IsCoinBase() || wtx.IsCoinStake()) { if (wtx.GetDepthInMainChain() < 1) entry.push_back(Pair("category", "orphan")); @@ -1039,12 +1059,22 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe entry.push_back(Pair("category", "generate")); } else + { entry.push_back(Pair("category", "receive")); - entry.push_back(Pair("amount", ValueFromAmount(r.second))); + } + if (!wtx.IsCoinStake()) + entry.push_back(Pair("amount", ValueFromAmount(r.second))); + else + { + entry.push_back(Pair("amount", ValueFromAmount(-nFee))); + stop = true; // only one coinstake output + } if (fLong) WalletTxToJSON(wtx, entry); ret.push_back(entry); } + if (stop) + break; } } } @@ -1131,11 +1161,13 @@ Value listaccounts(const Array& params, bool fHelp) "listaccounts [minconf=1]\n" "Returns Object that has account names as keys, account balances as values."); + accountingDeprecationCheck(); + int nMinDepth = 1; if (params.size() > 0) nMinDepth = params[0].get_int(); - map mapAccountBalances; + map mapAccountBalances; BOOST_FOREACH(const PAIRTYPE(CTxDestination, string)& entry, pwalletMain->mapAddressBook) { if (IsMine(*pwalletMain, entry.first)) // This address belongs to me mapAccountBalances[entry.second] = 0; @@ -1144,34 +1176,25 @@ Value listaccounts(const Array& params, bool fHelp) for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) { const CWalletTx& wtx = (*it).second; - - if(!wtx.IsFinal()) - continue; - - int64 nGeneratedImmature, nGeneratedMature, nFee; + int64_t nFee; string strSentAccount; - list > listReceived; - list > listSent; - wtx.GetAmounts(nGeneratedImmature, nGeneratedMature, listReceived, listSent, nFee, strSentAccount); - if (wtx.GetDepthInMainChain() >= nMinDepth) + list > listReceived; + list > listSent; + int nDepth = wtx.GetDepthInMainChain(); + if (nDepth < 0) + continue; + wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount); + mapAccountBalances[strSentAccount] -= nFee; + BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent) + mapAccountBalances[strSentAccount] -= s.second; + if (nDepth >= nMinDepth && wtx.GetBlocksToMaturity() == 0) { - BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64)& r, listReceived) + BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& r, listReceived) if (pwalletMain->mapAddressBook.count(r.first)) mapAccountBalances[pwalletMain->mapAddressBook[r.first]] += r.second; else mapAccountBalances[""] += r.second; } - - if((wtx.IsCoinBaseOrStake() && wtx.GetDepthInMainChain() >= nMinDepth && wtx.GetBlocksToMaturity() == 0) - || !wtx.IsCoinBaseOrStake()) - { - mapAccountBalances[strSentAccount] -= nFee; - mapAccountBalances[""] += nGeneratedMature; - - BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64)& s, listSent) - mapAccountBalances[strSentAccount] -= s.second; - - } } list acentries; @@ -1180,7 +1203,7 @@ Value listaccounts(const Array& params, bool fHelp) mapAccountBalances[entry.strAccount] += entry.nCreditDebit; Object ret; - BOOST_FOREACH(const PAIRTYPE(string, int64)& accountBalance, mapAccountBalances) { + BOOST_FOREACH(const PAIRTYPE(string, int64_t)& accountBalance, mapAccountBalances) { ret.push_back(Pair(accountBalance.first, ValueFromAmount(accountBalance.second))); } return ret; @@ -1267,10 +1290,10 @@ Value gettransaction(const Array& params, bool fHelp) TxToJSON(wtx, 0, entry); - int64 nCredit = wtx.GetCredit(); - int64 nDebit = wtx.GetDebit(); - int64 nNet = nCredit - nDebit; - int64 nFee = (wtx.IsFromMe() ? wtx.GetValueOut() - nDebit : 0); + int64_t nCredit = wtx.GetCredit(); + int64_t nDebit = wtx.GetDebit(); + int64_t nNet = nCredit - nDebit; + int64_t nFee = (wtx.IsFromMe() ? wtx.GetValueOut() - nDebit : 0); entry.push_back(Pair("amount", ValueFromAmount(nNet - nFee))); if (wtx.IsFromMe()) @@ -1288,7 +1311,6 @@ Value gettransaction(const Array& params, bool fHelp) uint256 hashBlock = 0; if (GetTransaction(hash, tx, hashBlock)) { - entry.push_back(Pair("txid", hash.GetHex())); TxToJSON(tx, 0, entry); if (hashBlock == 0) entry.push_back(Pair("confirmations", 0)); @@ -1300,11 +1322,7 @@ Value gettransaction(const Array& params, bool fHelp) { CBlockIndex* pindex = (*mi).second; if (pindex->IsInMainChain()) - { entry.push_back(Pair("confirmations", 1 + nBestHeight - pindex->nHeight)); - entry.push_back(Pair("txntime", (boost::int64_t)tx.nTime)); - entry.push_back(Pair("time", (boost::int64_t)pindex->nTime)); - } else entry.push_back(Pair("confirmations", 0)); } @@ -1335,17 +1353,24 @@ Value backupwallet(const Array& params, bool fHelp) Value keypoolrefill(const Array& params, bool fHelp) { - if (fHelp || params.size() > 0) + if (fHelp || params.size() > 1) throw runtime_error( - "keypoolrefill\n" + "keypoolrefill [new-size]\n" "Fills the keypool." + HelpRequiringPassphrase()); + unsigned int nSize = max(GetArg("-keypool", 100), (int64_t)0); + if (params.size() > 0) { + if (params[0].get_int() < 0) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, expected valid size"); + nSize = (unsigned int) params[0].get_int(); + } + EnsureWalletIsUnlocked(); - pwalletMain->TopUpKeyPool(); + pwalletMain->TopUpKeyPool(nSize); - if (pwalletMain->GetKeyPoolSize() < GetArg("-keypool", 100)) + if (pwalletMain->GetKeyPoolSize() < nSize) throw JSONRPCError(RPC_WALLET_ERROR, "Error refreshing keypool."); return Value::null; @@ -1355,7 +1380,7 @@ 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"); + RenameThread("Triangles-key-top"); pwalletMain->TopUpKeyPool(); } @@ -1363,9 +1388,9 @@ void ThreadTopUpKeyPool(void* parg) void ThreadCleanWalletPassphrase(void* parg) { // Make this thread recognisable as the wallet relocking thread - RenameThread("bitcoin-lock-wa"); + RenameThread("Triangles-lock-wa"); - int64 nMyWakeTime = GetTimeMillis() + *((int64*)parg) * 1000; + int64_t nMyWakeTime = GetTimeMillis() + *((int64_t*)parg) * 1000; ENTER_CRITICAL_SECTION(cs_nWalletUnlockTime); @@ -1377,12 +1402,12 @@ void ThreadCleanWalletPassphrase(void* parg) { if (nWalletUnlockTime==0) break; - int64 nToSleep = nWalletUnlockTime - GetTimeMillis(); + int64_t nToSleep = nWalletUnlockTime - GetTimeMillis(); if (nToSleep <= 0) break; LEAVE_CRITICAL_SECTION(cs_nWalletUnlockTime); - Sleep(nToSleep); + MilliSleep(nToSleep); ENTER_CRITICAL_SECTION(cs_nWalletUnlockTime); } while(1); @@ -1401,18 +1426,20 @@ void ThreadCleanWalletPassphrase(void* parg) LEAVE_CRITICAL_SECTION(cs_nWalletUnlockTime); - delete (int64*)parg; + delete (int64_t*)parg; } Value walletpassphrase(const Array& params, bool fHelp) { if (pwalletMain->IsCrypted() && (fHelp || params.size() < 2 || params.size() > 3)) throw runtime_error( - "walletpassphrase [mintonly]\n" + "walletpassphrase [stakingonly]\n" "Stores the wallet decryption key in memory for seconds.\n" - "mintonly is optional true/false allowing only block minting."); + "if [stakingonly] is true sending functions are disabled."); if (fHelp) return true; + if (!fServer) + throw JSONRPCError(RPC_SERVER_NOT_STARTED, "Error: RPC server was not started, use server=1 to change this."); if (!pwalletMain->IsCrypted()) throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrase was called."); @@ -1436,14 +1463,14 @@ Value walletpassphrase(const Array& params, bool fHelp) "Stores the wallet decryption key in memory for seconds."); NewThread(ThreadTopUpKeyPool, NULL); - int64* pnSleepTime = new int64(params[1].get_int64()); + int64_t* pnSleepTime = new int64_t(params[1].get_int64()); NewThread(ThreadCleanWalletPassphrase, pnSleepTime); // triangles: if user OS account compromised prevent trivial sendmoney commands if (params.size() > 2) - fWalletUnlockMintOnly = params[2].get_bool(); + fWalletUnlockStakingOnly = params[2].get_bool(); else - fWalletUnlockMintOnly = false; + fWalletUnlockStakingOnly = false; return Value::null; } @@ -1534,7 +1561,7 @@ Value encryptwallet(const Array& params, bool fHelp) // slack space in .dat files; that is bad if the old data is // unencrypted private keys. So: StartShutdown(); - return "wallet encrypted; triangles server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup."; + return "wallet encrypted; Triangles server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup."; } class DescribeAddressVisitor : public boost::static_visitor @@ -1562,24 +1589,26 @@ public: int nRequired; ExtractDestinations(subscript, whichType, addresses, nRequired); obj.push_back(Pair("script", GetTxnOutputType(whichType))); + obj.push_back(Pair("hex", HexStr(subscript.begin(), subscript.end()))); Array a; BOOST_FOREACH(const CTxDestination& addr, addresses) - a.push_back(CBitcoinAddress(addr).ToString()); + a.push_back(CTrianglesAddress(addr).ToString()); obj.push_back(Pair("addresses", a)); if (whichType == TX_MULTISIG) obj.push_back(Pair("sigsrequired", nRequired)); return obj; } + }; Value validateaddress(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( - "validateaddress \n" - "Return information about ."); + "validateaddress \n" + "Return information about ."); - CBitcoinAddress address(params[0].get_str()); + CTrianglesAddress address(params[0].get_str()); bool isValid = address.IsValid(); Object ret; @@ -1605,8 +1634,8 @@ Value validatepubkey(const Array& params, bool fHelp) { if (fHelp || !params.size() || params.size() > 2) throw runtime_error( - "validatepubkey \n" - "Return information about ."); + "validatepubkey \n" + "Return information about ."); std::vector vchPubKey = ParseHex(params[0].get_str()); CPubKey pubKey(vchPubKey); @@ -1615,7 +1644,7 @@ Value validatepubkey(const Array& params, bool fHelp) bool isCompressed = pubKey.IsCompressed(); CKeyID keyID = pubKey.GetID(); - CBitcoinAddress address; + CTrianglesAddress address; address.Set(keyID); Object ret; @@ -1656,24 +1685,21 @@ Value reservebalance(const Array& params, bool fHelp) { if (params.size() == 1) throw runtime_error("must provide amount to reserve balance.\n"); - int64 nAmount = AmountFromValue(params[1]); + int64_t nAmount = AmountFromValue(params[1]); nAmount = (nAmount / CENT) * CENT; // round to cent if (nAmount < 0) throw runtime_error("amount cannot be negative.\n"); - mapArgs["-reservebalance"] = FormatMoney(nAmount).c_str(); + nReserveBalance = nAmount; } else { if (params.size() > 1) throw runtime_error("cannot specify amount to turn off reserve.\n"); - mapArgs["-reservebalance"] = "0"; + nReserveBalance = 0; } } Object result; - int64 nReserveBalance = 0; - if (mapArgs.count("-reservebalance") && !ParseMoney(mapArgs["-reservebalance"], nReserveBalance)) - throw runtime_error("invalid reserve balance amount\n"); result.push_back(Pair("reserve", (nReserveBalance > 0))); result.push_back(Pair("amount", ValueFromAmount(nReserveBalance))); return result; @@ -1689,7 +1715,7 @@ Value checkwallet(const Array& params, bool fHelp) "Check wallet for integrity.\n"); int nMismatchSpent; - int64 nBalanceInQuestion; + int64_t nBalanceInQuestion; pwalletMain->FixSpentCoins(nMismatchSpent, nBalanceInQuestion, true); Object result; if (nMismatchSpent == 0) @@ -1712,7 +1738,7 @@ Value repairwallet(const Array& params, bool fHelp) "Repair wallet if checkwallet reports any problem.\n"); int nMismatchSpent; - int64 nBalanceInQuestion; + int64_t nBalanceInQuestion; pwalletMain->FixSpentCoins(nMismatchSpent, nBalanceInQuestion); Object result; if (nMismatchSpent == 0) @@ -1734,7 +1760,7 @@ Value resendtx(const Array& params, bool fHelp) "Re-send unconfirmed transactions.\n" ); - ResendWalletTransactions(); + ResendWalletTransactions(true); return Value::null; } @@ -1759,5 +1785,174 @@ Value makekeypair(const Array& params, bool fHelp) Object result; result.push_back(Pair("PrivateKey", HexStr(vchPrivKey.begin(), vchPrivKey.end()))); result.push_back(Pair("PublicKey", HexStr(key.GetPubKey().Raw()))); +return result; +} + + + +Value clearwallettransactions(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 0) + throw runtime_error( + "clearwallettransactions \n" + "delete all transactions from wallet - reload with scanforalltxns\n" + "Warning: Backup your wallet first!"); + + + + Object result; + + uint32_t nTransactions = 0; + + char cbuf[256]; + + { + LOCK2(cs_main, pwalletMain->cs_wallet); + + CWalletDB walletdb(pwalletMain->strWalletFile); + walletdb.TxnBegin(); + Dbc* pcursor = walletdb.GetTxnCursor(); + if (!pcursor) + throw runtime_error("Cannot get wallet DB cursor"); + + Dbt datKey; + Dbt datValue; + + datKey.set_flags(DB_DBT_USERMEM); + datValue.set_flags(DB_DBT_USERMEM); + + std::vector vchKey; + std::vector vchType; + std::vector vchKeyData; + std::vector vchValueData; + + vchKeyData.resize(100); + vchValueData.resize(100); + + datKey.set_ulen(vchKeyData.size()); + datKey.set_data(&vchKeyData[0]); + + datValue.set_ulen(vchValueData.size()); + datValue.set_data(&vchValueData[0]); + + unsigned int fFlags = DB_NEXT; // same as using DB_FIRST for new cursor + while (true) + { + int ret = pcursor->get(&datKey, &datValue, fFlags); + + if (ret == ENOMEM + || ret == DB_BUFFER_SMALL) + { + if (datKey.get_size() > datKey.get_ulen()) + { + vchKeyData.resize(datKey.get_size()); + datKey.set_ulen(vchKeyData.size()); + datKey.set_data(&vchKeyData[0]); + }; + + if (datValue.get_size() > datValue.get_ulen()) + { + vchValueData.resize(datValue.get_size()); + datValue.set_ulen(vchValueData.size()); + datValue.set_data(&vchValueData[0]); + }; + // -- try once more, when DB_BUFFER_SMALL cursor is not expected to move + ret = pcursor->get(&datKey, &datValue, fFlags); + }; + + if (ret == DB_NOTFOUND) + break; + else + if (datKey.get_data() == NULL || datValue.get_data() == NULL + || ret != 0) + { + snprintf(cbuf, sizeof(cbuf), "wallet DB error %d, %s", ret, db_strerror(ret)); + throw runtime_error(cbuf); + }; + + CDataStream ssValue(SER_DISK, CLIENT_VERSION); + ssValue.SetType(SER_DISK); + ssValue.clear(); + ssValue.write((char*)datKey.get_data(), datKey.get_size()); + + ssValue >> vchType; + + + std::string strType(vchType.begin(), vchType.end()); + + //printf("strType %s\n", strType.c_str()); + + if (strType == "tx") + { + uint256 hash; + ssValue >> hash; + + if ((ret = pcursor->del(0)) != 0) + { + printf("Delete transaction failed %d, %s\n", ret, db_strerror(ret)); + continue; + }; + + pwalletMain->mapWallet.erase(hash); + pwalletMain->NotifyTransactionChanged(pwalletMain, hash, CT_DELETED); + + nTransactions++; + }; + }; + pcursor->close(); + walletdb.TxnCommit(); + + + //pwalletMain->mapWallet.clear(); + } + + snprintf(cbuf, sizeof(cbuf), "Removed %u transactions.", nTransactions); + result.push_back(Pair("complete", std::string(cbuf))); + result.push_back(Pair("", "Reload with scanforstealthtxns or re-download blockchain.")); + + return result; } + +Value scanforalltxns(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "scanforalltxns [fromHeight]\n" + "Scan blockchain for owned transactions."); + + Object result; + int32_t nFromHeight = 0; + + CBlockIndex *pindex = pindexGenesisBlock; + + + if (params.size() > 0) + nFromHeight = params[0].get_int(); + + + if (nFromHeight > 0) + { + pindex = mapBlockIndex[hashBestChain]; + while (pindex->nHeight > nFromHeight + && pindex->pprev) + pindex = pindex->pprev; + }; + + if (pindex == NULL) + throw runtime_error("Genesis Block is not set."); + + { + LOCK2(cs_main, pwalletMain->cs_wallet); + + pwalletMain->MarkDirty(); + + pwalletMain->ScanForWalletTransactions(pindex, true); + pwalletMain->ReacceptWalletTransactions(); + } + + result.push_back(Pair("result", "Scan complete.")); + + return result; +} + diff --git a/src/script.cpp b/src/script.cpp index e8c5de1..90b33a0 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -2,8 +2,10 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include #include +#include using namespace std; using namespace boost; @@ -51,11 +53,13 @@ bool CastToBool(const valtype& vch) return false; } +// // WARNING: This does not work as expected for signed integers; the sign-bit // is left in place as the integer is zero-extended. The correct behavior // would be to move the most significant bit of the last byte during the // resize process. MakeSameSize() is currently only used by the disabled // opcodes OP_AND, OP_OR, and OP_XOR. +// void MakeSameSize(valtype& vch1, valtype& vch2) { // Lengthen the shorter one @@ -248,6 +252,85 @@ const char* GetOpName(opcodetype opcode) } } +static bool IsCanonicalPubKey(const valtype &vchPubKey) { + if (vchPubKey.size() < 33) + return error("Non-canonical public key: too short"); + if (vchPubKey[0] == 0x04) { + if (vchPubKey.size() != 65) + return error("Non-canonical public key: invalid length for uncompressed key"); + } else if (vchPubKey[0] == 0x02 || vchPubKey[0] == 0x03) { + if (vchPubKey.size() != 33) + return error("Non-canonical public key: invalid length for compressed key"); + } else { + return error("Non-canonical public key: compressed nor uncompressed"); + } + return true; +} + +static bool IsCanonicalSignature(const valtype &vchSig) { + // See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623 + // A canonical signature exists of: <30> <02> <02> + // Where R and S are not negative (their first byte has its highest bit not set), and not + // excessively padded (do not start with a 0 byte, unless an otherwise negative number follows, + // in which case a single 0 byte is necessary and even required). + if (vchSig.size() < 9) + return error("Non-canonical signature: too short"); + if (vchSig.size() > 73) + return error("Non-canonical signature: too long"); + unsigned char nHashType = vchSig[vchSig.size() - 1] & (~(SIGHASH_ANYONECANPAY)); + if (nHashType < SIGHASH_ALL || nHashType > SIGHASH_SINGLE) + return error("Non-canonical signature: unknown hashtype byte"); + if (vchSig[0] != 0x30) + return error("Non-canonical signature: wrong type"); + if (vchSig[1] != vchSig.size()-3) + return error("Non-canonical signature: wrong length marker"); + unsigned int nLenR = vchSig[3]; + if (5 + nLenR >= vchSig.size()) + return error("Non-canonical signature: S length misplaced"); + unsigned int nLenS = vchSig[5+nLenR]; + if ((unsigned long)(nLenR+nLenS+7) != vchSig.size()) + return error("Non-canonical signature: R+S length mismatch"); + + const unsigned char *R = &vchSig[4]; + if (R[-2] != 0x02) + return error("Non-canonical signature: R value type mismatch"); + if (nLenR == 0) + return error("Non-canonical signature: R length is zero"); + if (R[0] & 0x80) + return error("Non-canonical signature: R value negative"); + if (nLenR > 1 && (R[0] == 0x00) && !(R[1] & 0x80)) + return error("Non-canonical signature: R value excessively padded"); + + const unsigned char *S = &vchSig[6+nLenR]; + if (S[-2] != 0x02) + return error("Non-canonical signature: S value type mismatch"); + if (nLenS == 0) + return error("Non-canonical signature: S length is zero"); + if (S[0] & 0x80) + return error("Non-canonical signature: S value negative"); + if (nLenS > 1 && (S[0] == 0x00) && !(S[1] & 0x80)) + return error("Non-canonical signature: S value excessively padded"); + + // If the above rules hold, and the S data is 33 bytes (or more), then + // the S value is above 2^255, which isn't necessary (its negative + // modulo the order of the curve could have been used). + + if (nLenS > 32) + { + // high signature S values generated prior to Pharao (version 4) are automatically accepted + if (pindexBest->nHeight > CRAPCHAIN_CUTOFF_BLOCK) + return error("Non-canonical signature: S value is unnecessarily high"); + else + { + + if (fDebug) + printf("IsCanonicalSignature(): pre-Pharao version signature S value accepted for block %d\n", pindexBest->nHeight); + } + } + return true; +} + + bool EvalScript(vector >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, int nHashType) { CAutoBN_CTX pctx; @@ -939,7 +1022,8 @@ bool EvalScript(vector >& stack, const CScript& script, co // Drop the signature, since there's no way for a signature to sign itself scriptCode.FindAndDelete(CScript(vchSig)); - bool fSuccess = CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType); + bool fSuccess = IsCanonicalSignature(vchSig) && IsCanonicalPubKey(vchPubKey) && + CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType); popstack(stack); popstack(stack); @@ -999,7 +1083,10 @@ bool EvalScript(vector >& stack, const CScript& script, co valtype& vchPubKey = stacktop(-ikey); // Check signature - if (CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType)) + bool fOk = IsCanonicalSignature(vchSig) && IsCanonicalPubKey(vchPubKey) && + CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType); + + if (fOk) { isig++; nSigsCount--; @@ -1150,12 +1237,12 @@ public: // (~200 bytes per cache entry times 50,000 entries) // Since there are a maximum of 20,000 signature operations per block // 50,000 is a reasonable default. - int64 nMaxCacheSize = GetArg("-maxsigcachesize", 50000); + int64_t nMaxCacheSize = GetArg("-maxsigcachesize", 50000); if (nMaxCacheSize <= 0) return; LOCK(cs_sigcache); - while (static_cast(setValid.size()) > nMaxCacheSize) + while (static_cast(setValid.size()) > nMaxCacheSize) { // Evict a random entry. Random because that helps // foil would-be DoS attackers who might try to pre-generate @@ -1225,7 +1312,7 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector { +private: + const CKeyStore &keystore; + std::vector &vKeys; + +public: + CAffectedKeysVisitor(const CKeyStore &keystoreIn, std::vector &vKeysIn) : keystore(keystoreIn), vKeys(vKeysIn) {} + + void Process(const CScript &script) { + txnouttype type; + std::vector vDest; + int nRequired; + if (ExtractDestinations(script, type, vDest, nRequired)) { + BOOST_FOREACH(const CTxDestination &dest, vDest) + boost::apply_visitor(*this, dest); + } + } + + void operator()(const CKeyID &keyId) { + if (keystore.HaveKey(keyId)) + vKeys.push_back(keyId); + } + + void operator()(const CScriptID &scriptId) { + CScript script; + if (keystore.GetCScript(scriptId, script)) + Process(script); + } + + + void operator()(const CNoDestination &none) {} +}; + + +void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector &vKeys) { + CAffectedKeysVisitor(keystore, vKeys).Process(scriptPubKey); +} + bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vector& addressRet, int& nRequiredRet) { addressRet.clear(); @@ -1567,13 +1692,14 @@ bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vecto } bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, - bool fValidatePayToScriptHash, int nHashType) + int nHashType) { vector > stack, stackCopy; if (!EvalScript(stack, scriptSig, txTo, nIn, nHashType)) return false; - if (fValidatePayToScriptHash) - stackCopy = stack; + + stackCopy = stack; + if (!EvalScript(stack, scriptPubKey, txTo, nIn, nHashType)) return false; if (stack.empty()) @@ -1583,7 +1709,7 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C return false; // Additional validation for spend-to-script-hash transactions: - if (fValidatePayToScriptHash && scriptPubKey.IsPayToScriptHash()) + if (scriptPubKey.IsPayToScriptHash()) { if (!scriptSig.IsPushOnly()) // scriptSig must be literals-only return false; // or validation fails @@ -1635,7 +1761,7 @@ bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CTransa } // Test solution - return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, true, 0); + return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, 0); } bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType) @@ -1649,7 +1775,7 @@ bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CTrans return SignSignature(keystore, txout.scriptPubKey, txTo, nIn, nHashType); } -bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsigned int nIn, bool fValidatePayToScriptHash, int nHashType) +bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsigned int nIn, int nHashType) { assert(nIn < txTo.vin.size()); const CTxIn& txin = txTo.vin[nIn]; @@ -1660,7 +1786,7 @@ bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsig if (txin.prevout.hash != txFrom.GetHash()) return false; - return VerifyScript(txin.scriptSig, txout.scriptPubKey, txTo, nIn, fValidatePayToScriptHash, nHashType); + return VerifyScript(txin.scriptSig, txout.scriptPubKey, txTo, nIn, nHashType); } static CScript PushAll(const vector& values) @@ -1842,6 +1968,33 @@ bool CScript::IsPayToScriptHash() const this->at(22) == OP_EQUAL); } +bool CScript::HasCanonicalPushes() const +{ + const_iterator pc = begin(); + while (pc < end()) + { + opcodetype opcode; + std::vector data; + if (!GetOp(pc, opcode, data)) + return false; + if (opcode > OP_16) + continue; + if (opcode < OP_PUSHDATA1 && opcode > OP_0 && (data.size() == 1 && data[0] <= 16)) + // Could have used an OP_n code, rather than a 1-byte push. + return false; + if (opcode == OP_PUSHDATA1 && data.size() < OP_PUSHDATA1) + // Could have used a normal n-byte push, rather than OP_PUSHDATA1. + return false; + if (opcode == OP_PUSHDATA2 && data.size() <= 0xFF) + // Could have used an OP_PUSHDATA1. + return false; + if (opcode == OP_PUSHDATA4 && data.size() <= 0xFFFF) + // Could have used an OP_PUSHDATA2. + return false; + } + return true; +} + class CScriptVisitor : public boost::static_visitor { private: @@ -1865,6 +2018,7 @@ public: *script << OP_HASH160 << scriptID << OP_EQUAL; return true; } + }; void CScript::SetDestination(const CTxDestination& dest) @@ -1881,3 +2035,5 @@ void CScript::SetMultisig(int nRequired, const std::vector& keys) *this << key.GetPubKey(); *this << EncodeOP_N(keys.size()) << OP_CHECKMULTISIG; } + + diff --git a/src/script.h b/src/script.h index 99465cb..ac7b387 100644 --- a/src/script.h +++ b/src/script.h @@ -2,12 +2,15 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef H_BITCOIN_SCRIPT -#define H_BITCOIN_SCRIPT + +#ifndef H_TRIANGLES_SCRIPT +#define H_TRIANGLES_SCRIPT #include #include +#include + #include #include @@ -48,7 +51,7 @@ public: * * CNoDestination: no destination set * * CKeyID: TX_PUBKEYHASH destination * * CScriptID: TX_SCRIPTHASH destination - * A CTxDestination is the internal data type encoded in a CBitcoinAddress + * A CTxDestination is the internal data type encoded in a CTrianglesAddress */ typedef boost::variant CTxDestination; @@ -235,7 +238,7 @@ inline std::string StackString(const std::vector >& v class CScript : public std::vector { protected: - CScript& push_int64(int64 n) + CScript& push_int64(int64_t n) { if (n == -1 || (n >= 1 && n <= 16)) { @@ -249,7 +252,7 @@ protected: return *this; } - CScript& push_uint64(uint64 n) + CScript& push_uint64(uint64_t n) { if (n >= 1 && n <= 16) { @@ -286,16 +289,16 @@ public: //explicit CScript(char b) is not portable. Use 'signed char' or 'unsigned char'. - explicit CScript(signed char b) { operator<<(b); } - explicit CScript(short b) { operator<<(b); } - explicit CScript(int b) { operator<<(b); } - explicit CScript(long b) { operator<<(b); } - explicit CScript(int64 b) { operator<<(b); } - explicit CScript(unsigned char b) { operator<<(b); } - explicit CScript(unsigned int b) { operator<<(b); } - explicit CScript(unsigned short b) { operator<<(b); } - explicit CScript(unsigned long b) { operator<<(b); } - explicit CScript(uint64 b) { operator<<(b); } + explicit CScript(signed char b) { operator<<(b); } + explicit CScript(short b) { operator<<(b); } + explicit CScript(int b) { operator<<(b); } + explicit CScript(long b) { operator<<(b); } + explicit CScript(long long b) { operator<<(b); } + explicit CScript(unsigned char b) { operator<<(b); } + explicit CScript(unsigned int b) { operator<<(b); } + explicit CScript(unsigned short b) { operator<<(b); } + explicit CScript(unsigned long b) { operator<<(b); } + explicit CScript(unsigned long long b) { operator<<(b); } explicit CScript(opcodetype b) { operator<<(b); } explicit CScript(const uint256& b) { operator<<(b); } @@ -304,16 +307,16 @@ public: //CScript& operator<<(char b) is not portable. Use 'signed char' or 'unsigned char'. - CScript& operator<<(signed char b) { return push_int64(b); } - CScript& operator<<(short b) { return push_int64(b); } - CScript& operator<<(int b) { return push_int64(b); } - CScript& operator<<(long b) { return push_int64(b); } - CScript& operator<<(int64 b) { return push_int64(b); } - CScript& operator<<(unsigned char b) { return push_uint64(b); } - CScript& operator<<(unsigned int b) { return push_uint64(b); } - CScript& operator<<(unsigned short b) { return push_uint64(b); } - CScript& operator<<(unsigned long b) { return push_uint64(b); } - CScript& operator<<(uint64 b) { return push_uint64(b); } + CScript& operator<<(signed char b) { return push_int64(b); } + CScript& operator<<(short b) { return push_int64(b); } + CScript& operator<<(int b) { return push_int64(b); } + CScript& operator<<(long b) { return push_int64(b); } + CScript& operator<<(long long b) { return push_int64(b); } + CScript& operator<<(unsigned char b) { return push_uint64(b); } + CScript& operator<<(unsigned int b) { return push_uint64(b); } + CScript& operator<<(unsigned short b) { return push_uint64(b); } + CScript& operator<<(unsigned long b) { return push_uint64(b); } + CScript& operator<<(unsigned long long b) { return push_uint64(b); } CScript& operator<<(opcodetype opcode) { @@ -428,7 +431,7 @@ public: // Immediate operand if (opcode <= OP_PUSHDATA4) { - unsigned int nSize; + unsigned int nSize=0; if (opcode < OP_PUSHDATA1) { nSize = opcode; @@ -509,7 +512,7 @@ public: return nFound; } - // Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs + // Pre-version-0.6, Triangles always counted CHECKMULTISIGs // as 20 sigops. With pay-to-script-hash, that changed: // CHECKMULTISIGs serialized in scriptSigs are // counted more accurately, assuming they are of the form @@ -537,6 +540,8 @@ public: return true; } + // Called by CTransaction::IsStandard. + bool HasCanonicalPushes() const; void SetDestination(const CTxDestination& address); void SetMultisig(int nRequired, const std::vector& keys); @@ -591,16 +596,19 @@ int ScriptSigArgsExpected(txnouttype t, const std::vector &vKeys); bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet); bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector& addressRet, int& nRequiredRet); bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL); bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL); bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, - bool fValidatePayToScriptHash, int nHashType); -bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsigned int nIn, bool fValidatePayToScriptHash, int nHashType); + int nHashType); +bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsigned int nIn, int nHashType); // Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders, // combine them intelligently and return the result. CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2); #endif + + diff --git a/src/scrypt-x86.S b/src/scrypt-x86.S index 6a4465c..c1d2cef 100644 --- a/src/scrypt-x86.S +++ b/src/scrypt-x86.S @@ -22,7 +22,11 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -#if defined(__i386__) +#if defined(OPTIMIZED_SALSA) && defined(__i386__) + +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif #define gen_salsa8_core_quadround() \ movl 52(%esp), %ecx; \ @@ -345,7 +349,7 @@ .text - .align 16 + .align 32 gen_salsa8_core: gen_salsa8_core_quadround() gen_salsa8_core_quadround() @@ -353,7 +357,7 @@ gen_salsa8_core: .text - .align 16 + .align 32 .globl scrypt_core .globl _scrypt_core scrypt_core: @@ -629,7 +633,7 @@ gen_scrypt_core_loop2: xmm_salsa8_core_doubleround(); \ - .align 16 + .align 32 xmm_scrypt_core: movl 20(%esp), %edi movl 24(%esp), %esi diff --git a/src/scrypt-x86_64.S b/src/scrypt-x86_64.S index 3ed3483..3036d03 100644 --- a/src/scrypt-x86_64.S +++ b/src/scrypt-x86_64.S @@ -1,1831 +1,859 @@ -# Copyright 2011-2012 pooler@litecoinpool.org -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. - -#if defined(__linux__) && defined(__ELF__) - .section .note.GNU-stack,"",%progbits -#endif - -#if defined(__x86_64__) - -#define scrypt_shuffle(src, so, dest, do) \ - movl so+60(src), %r8d; \ - movl so+44(src), %r9d; \ - movl so+28(src), %r10d; \ - movl so+12(src), %r11d; \ - movl %r8d, do+12(dest); \ - movl %r9d, do+28(dest); \ - movl %r10d, do+44(dest); \ - movl %r11d, do+60(dest); \ - movl so+40(src), %r8d; \ - movl so+8(src), %r9d; \ - movl so+48(src), %r10d; \ - movl so+16(src), %r11d; \ - movl %r8d, do+8(dest); \ - movl %r9d, do+40(dest); \ - movl %r10d, do+16(dest); \ - movl %r11d, do+48(dest); \ - movl so+20(src), %r8d; \ - movl so+4(src), %r9d; \ - movl so+52(src), %r10d; \ - movl so+36(src), %r11d; \ - movl %r8d, do+4(dest); \ - movl %r9d, do+20(dest); \ - movl %r10d, do+36(dest); \ - movl %r11d, do+52(dest); \ - movl so+0(src), %r8d; \ - movl so+24(src), %r9d; \ - movl so+32(src), %r10d; \ - movl so+56(src), %r11d; \ - movl %r8d, do+0(dest); \ - movl %r9d, do+24(dest); \ - movl %r10d, do+32(dest); \ - movl %r11d, do+56(dest); \ - - -#define gen_salsa8_core_doubleround() \ - movq 72(%rsp), %r15; \ - leaq (%r14, %rdx), %rbp; \ - roll $7, %ebp; \ - xorq %rbp, %r9; \ - leaq (%rdi, %r15), %rbp; \ - roll $7, %ebp; \ - xorq %rbp, %r10; \ - leaq (%rdx, %r9), %rbp; \ - roll $9, %ebp; \ - xorq %rbp, %r11; \ - leaq (%r15, %r10), %rbp; \ - roll $9, %ebp; \ - xorq %rbp, %r13; \ - leaq (%r9, %r11), %rbp; \ - roll $13, %ebp; \ - xorq %rbp, %r14; \ - leaq (%r10, %r13), %rbp; \ - roll $13, %ebp; \ - xorq %rbp, %rdi; \ - leaq (%r11, %r14), %rbp; \ - roll $18, %ebp; \ - xorq %rbp, %rdx; \ - leaq (%r13, %rdi), %rbp; \ - roll $18, %ebp; \ - xorq %rbp, %r15; \ - movq 48(%rsp), %rbp; \ - movq %r15, 72(%rsp); \ - leaq (%rax, %rbp), %r15; \ - roll $7, %r15d; \ - xorq %r15, %rbx; \ - leaq (%rbp, %rbx), %r15; \ - roll $9, %r15d; \ - xorq %r15, %rcx; \ - leaq (%rbx, %rcx), %r15; \ - roll $13, %r15d; \ - xorq %r15, %rax; \ - leaq (%rcx, %rax), %r15; \ - roll $18, %r15d; \ - xorq %r15, %rbp; \ - movq 88(%rsp), %r15; \ - movq %rbp, 48(%rsp); \ - leaq (%r12, %r15), %rbp; \ - roll $7, %ebp; \ - xorq %rbp, %rsi; \ - leaq (%r15, %rsi), %rbp; \ - roll $9, %ebp; \ - xorq %rbp, %r8; \ - leaq (%rsi, %r8), %rbp; \ - roll $13, %ebp; \ - xorq %rbp, %r12; \ - leaq (%r8, %r12), %rbp; \ - roll $18, %ebp; \ - xorq %rbp, %r15; \ - movq %r15, 88(%rsp); \ - movq 72(%rsp), %r15; \ - leaq (%rsi, %rdx), %rbp; \ - roll $7, %ebp; \ - xorq %rbp, %rdi; \ - leaq (%r9, %r15), %rbp; \ - roll $7, %ebp; \ - xorq %rbp, %rax; \ - leaq (%rdx, %rdi), %rbp; \ - roll $9, %ebp; \ - xorq %rbp, %rcx; \ - leaq (%r15, %rax), %rbp; \ - roll $9, %ebp; \ - xorq %rbp, %r8; \ - leaq (%rdi, %rcx), %rbp; \ - roll $13, %ebp; \ - xorq %rbp, %rsi; \ - leaq (%rax, %r8), %rbp; \ - roll $13, %ebp; \ - xorq %rbp, %r9; \ - leaq (%rcx, %rsi), %rbp; \ - roll $18, %ebp; \ - xorq %rbp, %rdx; \ - leaq (%r8, %r9), %rbp; \ - roll $18, %ebp; \ - xorq %rbp, %r15; \ - movq 48(%rsp), %rbp; \ - movq %r15, 72(%rsp); \ - leaq (%r10, %rbp), %r15; \ - roll $7, %r15d; \ - xorq %r15, %r12; \ - leaq (%rbp, %r12), %r15; \ - roll $9, %r15d; \ - xorq %r15, %r11; \ - leaq (%r12, %r11), %r15; \ - roll $13, %r15d; \ - xorq %r15, %r10; \ - leaq (%r11, %r10), %r15; \ - roll $18, %r15d; \ - xorq %r15, %rbp; \ - movq 88(%rsp), %r15; \ - movq %rbp, 48(%rsp); \ - leaq (%rbx, %r15), %rbp; \ - roll $7, %ebp; \ - xorq %rbp, %r14; \ - leaq (%r15, %r14), %rbp; \ - roll $9, %ebp; \ - xorq %rbp, %r13; \ - leaq (%r14, %r13), %rbp; \ - roll $13, %ebp; \ - xorq %rbp, %rbx; \ - leaq (%r13, %rbx), %rbp; \ - roll $18, %ebp; \ - xorq %rbp, %r15; \ - movq %r15, 88(%rsp); \ - - - .text - .align 16 -gen_salsa8_core: - # 0: %rdx, %rdi, %rcx, %rsi - movq 8(%rsp), %rdi - movq %rdi, %rdx - shrq $32, %rdi - movq 16(%rsp), %rsi - movq %rsi, %rcx - shrq $32, %rsi - # 1: %r9, 72(%rsp), %rax, %r8 - movq 24(%rsp), %r8 - movq %r8, %r9 - shrq $32, %r8 - movq %r8, 72(%rsp) - movq 32(%rsp), %r8 - movq %r8, %rax - shrq $32, %r8 - # 2: %r11, %r10, 48(%rsp), %r12 - movq 40(%rsp), %r10 - movq %r10, %r11 - shrq $32, %r10 - movq 48(%rsp), %r12 - #movq %r12, %r13 - #movq %r13, 48(%rsp) - shrq $32, %r12 - # 3: %r14, %r13, %rbx, 88(%rsp) - movq 56(%rsp), %r13 - movq %r13, %r14 - shrq $32, %r13 - movq 64(%rsp), %r15 - movq %r15, %rbx - shrq $32, %r15 - movq %r15, 88(%rsp) - - gen_salsa8_core_doubleround() - gen_salsa8_core_doubleround() - gen_salsa8_core_doubleround() - gen_salsa8_core_doubleround() - - movl %edx, %edx - shlq $32, %rdi - addq %rdi, %rdx - movd %rdx, %xmm0 - - movl %ecx, %ecx - shlq $32, %rsi - addq %rsi, %rcx - movd %rcx, %xmm4 - - movq 72(%rsp), %rdi - movl %r9d, %r9d - shlq $32, %rdi - addq %rdi, %r9 - movd %r9, %xmm1 - - movl %eax, %eax - shlq $32, %r8 - addq %r8, %rax - movd %rax, %xmm5 - - movl %r11d, %r11d - shlq $32, %r10 - addq %r10, %r11 - movd %r11, %xmm2 - - movl 48(%rsp), %r8d - shlq $32, %r12 - addq %r12, %r8 - movd %r8, %xmm6 - - movl %r14d, %r14d - shlq $32, %r13 - addq %r13, %r14 - movd %r14, %xmm3 - - movq 88(%rsp), %rdi - movl %ebx, %ebx - shlq $32, %rdi - addq %rdi, %rbx - movd %rbx, %xmm7 - - punpcklqdq %xmm4, %xmm0 - punpcklqdq %xmm5, %xmm1 - punpcklqdq %xmm6, %xmm2 - punpcklqdq %xmm7, %xmm3 - - #movq %rdx, 8(%rsp) - #movq %rcx, 16(%rsp) - #movq %r9, 24(%rsp) - #movq %rax, 32(%rsp) - #movq %r11, 40(%rsp) - #movq %r8, 48(%rsp) - #movq %r14, 56(%rsp) - #movq %rbx, 64(%rsp) - - ret - - - .text - .align 16 - .globl scrypt_core - .globl _scrypt_core -scrypt_core: -_scrypt_core: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 -#if defined(WIN64) - subq $176, %rsp - movdqa %xmm6, 8(%rsp) - movdqa %xmm7, 24(%rsp) - movdqa %xmm8, 40(%rsp) - movdqa %xmm9, 56(%rsp) - movdqa %xmm10, 72(%rsp) - movdqa %xmm11, 88(%rsp) - movdqa %xmm12, 104(%rsp) - movdqa %xmm13, 120(%rsp) - movdqa %xmm14, 136(%rsp) - movdqa %xmm15, 152(%rsp) - pushq %rdi - pushq %rsi - movq %rcx, %rdi - movq %rdx, %rsi -#endif - -#define scrypt_core_cleanup() \ - popq %r15; \ - popq %r14; \ - popq %r13; \ - popq %r12; \ - popq %rbp; \ - popq %rbx; \ - - - # GenuineIntel processors have fast SIMD - xorl %eax, %eax - cpuid - cmpl $0x6c65746e, %ecx - jne gen_scrypt_core - cmpl $0x49656e69, %edx - jne gen_scrypt_core - cmpl $0x756e6547, %ebx - je xmm_scrypt_core - -gen_scrypt_core: - subq $136, %rsp - movdqa 0(%rdi), %xmm8 - movdqa 16(%rdi), %xmm9 - movdqa 32(%rdi), %xmm10 - movdqa 48(%rdi), %xmm11 - movdqa 64(%rdi), %xmm12 - movdqa 80(%rdi), %xmm13 - movdqa 96(%rdi), %xmm14 - movdqa 112(%rdi), %xmm15 - - leaq 131072(%rsi), %rcx - movq %rdi, 104(%rsp) - movq %rsi, 112(%rsp) - movq %rcx, 120(%rsp) -gen_scrypt_core_loop1: - movdqa %xmm8, 0(%rsi) - movdqa %xmm9, 16(%rsi) - movdqa %xmm10, 32(%rsi) - movdqa %xmm11, 48(%rsi) - movdqa %xmm12, 64(%rsi) - movdqa %xmm13, 80(%rsi) - movdqa %xmm14, 96(%rsi) - movdqa %xmm15, 112(%rsi) - - pxor %xmm12, %xmm8 - pxor %xmm13, %xmm9 - pxor %xmm14, %xmm10 - pxor %xmm15, %xmm11 - movdqa %xmm8, 0(%rsp) - movdqa %xmm9, 16(%rsp) - movdqa %xmm10, 32(%rsp) - movdqa %xmm11, 48(%rsp) - movq %rsi, 128(%rsp) - call gen_salsa8_core - paddd %xmm0, %xmm8 - paddd %xmm1, %xmm9 - paddd %xmm2, %xmm10 - paddd %xmm3, %xmm11 - - pxor %xmm8, %xmm12 - pxor %xmm9, %xmm13 - pxor %xmm10, %xmm14 - pxor %xmm11, %xmm15 - movdqa %xmm12, 0(%rsp) - movdqa %xmm13, 16(%rsp) - movdqa %xmm14, 32(%rsp) - movdqa %xmm15, 48(%rsp) - call gen_salsa8_core - movq 128(%rsp), %rsi - paddd %xmm0, %xmm12 - paddd %xmm1, %xmm13 - paddd %xmm2, %xmm14 - paddd %xmm3, %xmm15 - - addq $128, %rsi - movq 120(%rsp), %rcx - cmpq %rcx, %rsi - jne gen_scrypt_core_loop1 - - movq $1024, %rcx -gen_scrypt_core_loop2: - movq 112(%rsp), %rsi - movd %xmm12, %edx - andl $1023, %edx - shll $7, %edx - movdqa 0(%rsi, %rdx), %xmm0 - movdqa 16(%rsi, %rdx), %xmm1 - movdqa 32(%rsi, %rdx), %xmm2 - movdqa 48(%rsi, %rdx), %xmm3 - movdqa 64(%rsi, %rdx), %xmm4 - movdqa 80(%rsi, %rdx), %xmm5 - movdqa 96(%rsi, %rdx), %xmm6 - movdqa 112(%rsi, %rdx), %xmm7 - pxor %xmm0, %xmm8 - pxor %xmm1, %xmm9 - pxor %xmm2, %xmm10 - pxor %xmm3, %xmm11 - pxor %xmm4, %xmm12 - pxor %xmm5, %xmm13 - pxor %xmm6, %xmm14 - pxor %xmm7, %xmm15 - - pxor %xmm12, %xmm8 - pxor %xmm13, %xmm9 - pxor %xmm14, %xmm10 - pxor %xmm15, %xmm11 - movdqa %xmm8, 0(%rsp) - movdqa %xmm9, 16(%rsp) - movdqa %xmm10, 32(%rsp) - movdqa %xmm11, 48(%rsp) - movq %rcx, 128(%rsp) - call gen_salsa8_core - paddd %xmm0, %xmm8 - paddd %xmm1, %xmm9 - paddd %xmm2, %xmm10 - paddd %xmm3, %xmm11 - - pxor %xmm8, %xmm12 - pxor %xmm9, %xmm13 - pxor %xmm10, %xmm14 - pxor %xmm11, %xmm15 - movdqa %xmm12, 0(%rsp) - movdqa %xmm13, 16(%rsp) - movdqa %xmm14, 32(%rsp) - movdqa %xmm15, 48(%rsp) - call gen_salsa8_core - movq 128(%rsp), %rcx - paddd %xmm0, %xmm12 - paddd %xmm1, %xmm13 - paddd %xmm2, %xmm14 - paddd %xmm3, %xmm15 - - subq $1, %rcx - ja gen_scrypt_core_loop2 - - movq 104(%rsp), %rdi - movdqa %xmm8, 0(%rdi) - movdqa %xmm9, 16(%rdi) - movdqa %xmm10, 32(%rdi) - movdqa %xmm11, 48(%rdi) - movdqa %xmm12, 64(%rdi) - movdqa %xmm13, 80(%rdi) - movdqa %xmm14, 96(%rdi) - movdqa %xmm15, 112(%rdi) - - addq $136, %rsp - scrypt_core_cleanup() - ret - - -#define xmm_salsa8_core_doubleround() \ - movdqa %xmm1, %xmm4; \ - paddd %xmm0, %xmm4; \ - movdqa %xmm4, %xmm5; \ - pslld $7, %xmm4; \ - psrld $25, %xmm5; \ - pxor %xmm4, %xmm3; \ - pxor %xmm5, %xmm3; \ - movdqa %xmm0, %xmm4; \ - paddd %xmm3, %xmm4; \ - movdqa %xmm4, %xmm5; \ - pslld $9, %xmm4; \ - psrld $23, %xmm5; \ - pxor %xmm4, %xmm2; \ - movdqa %xmm3, %xmm4; \ - pshufd $0x93, %xmm3, %xmm3; \ - pxor %xmm5, %xmm2; \ - paddd %xmm2, %xmm4; \ - movdqa %xmm4, %xmm5; \ - pslld $13, %xmm4; \ - psrld $19, %xmm5; \ - pxor %xmm4, %xmm1; \ - movdqa %xmm2, %xmm4; \ - pshufd $0x4e, %xmm2, %xmm2; \ - pxor %xmm5, %xmm1; \ - paddd %xmm1, %xmm4; \ - movdqa %xmm4, %xmm5; \ - pslld $18, %xmm4; \ - psrld $14, %xmm5; \ - pxor %xmm4, %xmm0; \ - pshufd $0x39, %xmm1, %xmm1; \ - pxor %xmm5, %xmm0; \ - movdqa %xmm3, %xmm4; \ - paddd %xmm0, %xmm4; \ - movdqa %xmm4, %xmm5; \ - pslld $7, %xmm4; \ - psrld $25, %xmm5; \ - pxor %xmm4, %xmm1; \ - pxor %xmm5, %xmm1; \ - movdqa %xmm0, %xmm4; \ - paddd %xmm1, %xmm4; \ - movdqa %xmm4, %xmm5; \ - pslld $9, %xmm4; \ - psrld $23, %xmm5; \ - pxor %xmm4, %xmm2; \ - movdqa %xmm1, %xmm4; \ - pshufd $0x93, %xmm1, %xmm1; \ - pxor %xmm5, %xmm2; \ - paddd %xmm2, %xmm4; \ - movdqa %xmm4, %xmm5; \ - pslld $13, %xmm4; \ - psrld $19, %xmm5; \ - pxor %xmm4, %xmm3; \ - movdqa %xmm2, %xmm4; \ - pshufd $0x4e, %xmm2, %xmm2; \ - pxor %xmm5, %xmm3; \ - paddd %xmm3, %xmm4; \ - movdqa %xmm4, %xmm5; \ - pslld $18, %xmm4; \ - psrld $14, %xmm5; \ - pxor %xmm4, %xmm0; \ - pshufd $0x39, %xmm3, %xmm3; \ - pxor %xmm5, %xmm0; \ - - -#define xmm_salsa8_core() \ - xmm_salsa8_core_doubleround(); \ - xmm_salsa8_core_doubleround(); \ - xmm_salsa8_core_doubleround(); \ - xmm_salsa8_core_doubleround(); \ - - - .align 16 -xmm_scrypt_core: - # shuffle 1st block into %xmm8-%xmm11 - movl 60(%rdi), %edx - movl 44(%rdi), %ecx - movl 28(%rdi), %ebx - movl 12(%rdi), %eax - movd %edx, %xmm0 - movd %ecx, %xmm1 - movd %ebx, %xmm2 - movd %eax, %xmm3 - movl 40(%rdi), %ecx - movl 24(%rdi), %ebx - movl 8(%rdi), %eax - movl 56(%rdi), %edx - pshufd $0x93, %xmm0, %xmm0 - pshufd $0x93, %xmm1, %xmm1 - pshufd $0x93, %xmm2, %xmm2 - pshufd $0x93, %xmm3, %xmm3 - movd %ecx, %xmm4 - movd %ebx, %xmm5 - movd %eax, %xmm6 - movd %edx, %xmm7 - paddd %xmm4, %xmm0 - paddd %xmm5, %xmm1 - paddd %xmm6, %xmm2 - paddd %xmm7, %xmm3 - movl 20(%rdi), %ebx - movl 4(%rdi), %eax - movl 52(%rdi), %edx - movl 36(%rdi), %ecx - pshufd $0x93, %xmm0, %xmm0 - pshufd $0x93, %xmm1, %xmm1 - pshufd $0x93, %xmm2, %xmm2 - pshufd $0x93, %xmm3, %xmm3 - movd %ebx, %xmm4 - movd %eax, %xmm5 - movd %edx, %xmm6 - movd %ecx, %xmm7 - paddd %xmm4, %xmm0 - paddd %xmm5, %xmm1 - paddd %xmm6, %xmm2 - paddd %xmm7, %xmm3 - movl 0(%rdi), %eax - movl 48(%rdi), %edx - movl 32(%rdi), %ecx - movl 16(%rdi), %ebx - pshufd $0x93, %xmm0, %xmm0 - pshufd $0x93, %xmm1, %xmm1 - pshufd $0x93, %xmm2, %xmm2 - pshufd $0x93, %xmm3, %xmm3 - movd %eax, %xmm8 - movd %edx, %xmm9 - movd %ecx, %xmm10 - movd %ebx, %xmm11 - paddd %xmm0, %xmm8 - paddd %xmm1, %xmm9 - paddd %xmm2, %xmm10 - paddd %xmm3, %xmm11 - - # shuffle 2nd block into %xmm12-%xmm15 - movl 124(%rdi), %edx - movl 108(%rdi), %ecx - movl 92(%rdi), %ebx - movl 76(%rdi), %eax - movd %edx, %xmm0 - movd %ecx, %xmm1 - movd %ebx, %xmm2 - movd %eax, %xmm3 - movl 104(%rdi), %ecx - movl 88(%rdi), %ebx - movl 72(%rdi), %eax - movl 120(%rdi), %edx - pshufd $0x93, %xmm0, %xmm0 - pshufd $0x93, %xmm1, %xmm1 - pshufd $0x93, %xmm2, %xmm2 - pshufd $0x93, %xmm3, %xmm3 - movd %ecx, %xmm4 - movd %ebx, %xmm5 - movd %eax, %xmm6 - movd %edx, %xmm7 - paddd %xmm4, %xmm0 - paddd %xmm5, %xmm1 - paddd %xmm6, %xmm2 - paddd %xmm7, %xmm3 - movl 84(%rdi), %ebx - movl 68(%rdi), %eax - movl 116(%rdi), %edx - movl 100(%rdi), %ecx - pshufd $0x93, %xmm0, %xmm0 - pshufd $0x93, %xmm1, %xmm1 - pshufd $0x93, %xmm2, %xmm2 - pshufd $0x93, %xmm3, %xmm3 - movd %ebx, %xmm4 - movd %eax, %xmm5 - movd %edx, %xmm6 - movd %ecx, %xmm7 - paddd %xmm4, %xmm0 - paddd %xmm5, %xmm1 - paddd %xmm6, %xmm2 - paddd %xmm7, %xmm3 - movl 64(%rdi), %eax - movl 112(%rdi), %edx - movl 96(%rdi), %ecx - movl 80(%rdi), %ebx - pshufd $0x93, %xmm0, %xmm0 - pshufd $0x93, %xmm1, %xmm1 - pshufd $0x93, %xmm2, %xmm2 - pshufd $0x93, %xmm3, %xmm3 - movd %eax, %xmm12 - movd %edx, %xmm13 - movd %ecx, %xmm14 - movd %ebx, %xmm15 - paddd %xmm0, %xmm12 - paddd %xmm1, %xmm13 - paddd %xmm2, %xmm14 - paddd %xmm3, %xmm15 - - movq %rsi, %rdx - leaq 131072(%rsi), %rcx -xmm_scrypt_core_loop1: - movdqa %xmm8, 0(%rdx) - movdqa %xmm9, 16(%rdx) - movdqa %xmm10, 32(%rdx) - movdqa %xmm11, 48(%rdx) - movdqa %xmm12, 64(%rdx) - movdqa %xmm13, 80(%rdx) - movdqa %xmm14, 96(%rdx) - movdqa %xmm15, 112(%rdx) - - pxor %xmm12, %xmm8 - pxor %xmm13, %xmm9 - pxor %xmm14, %xmm10 - pxor %xmm15, %xmm11 - movdqa %xmm8, %xmm0 - movdqa %xmm9, %xmm1 - movdqa %xmm10, %xmm2 - movdqa %xmm11, %xmm3 - xmm_salsa8_core() - paddd %xmm0, %xmm8 - paddd %xmm1, %xmm9 - paddd %xmm2, %xmm10 - paddd %xmm3, %xmm11 - - pxor %xmm8, %xmm12 - pxor %xmm9, %xmm13 - pxor %xmm10, %xmm14 - pxor %xmm11, %xmm15 - movdqa %xmm12, %xmm0 - movdqa %xmm13, %xmm1 - movdqa %xmm14, %xmm2 - movdqa %xmm15, %xmm3 - xmm_salsa8_core() - paddd %xmm0, %xmm12 - paddd %xmm1, %xmm13 - paddd %xmm2, %xmm14 - paddd %xmm3, %xmm15 - - addq $128, %rdx - cmpq %rcx, %rdx - jne xmm_scrypt_core_loop1 - - movq $1024, %rcx -xmm_scrypt_core_loop2: - movd %xmm12, %edx - andl $1023, %edx - shll $7, %edx - movdqa 0(%rsi, %rdx), %xmm0 - movdqa 16(%rsi, %rdx), %xmm1 - movdqa 32(%rsi, %rdx), %xmm2 - movdqa 48(%rsi, %rdx), %xmm3 - movdqa 64(%rsi, %rdx), %xmm4 - movdqa 80(%rsi, %rdx), %xmm5 - movdqa 96(%rsi, %rdx), %xmm6 - movdqa 112(%rsi, %rdx), %xmm7 - pxor %xmm0, %xmm8 - pxor %xmm1, %xmm9 - pxor %xmm2, %xmm10 - pxor %xmm3, %xmm11 - pxor %xmm4, %xmm12 - pxor %xmm5, %xmm13 - pxor %xmm6, %xmm14 - pxor %xmm7, %xmm15 - - pxor %xmm12, %xmm8 - pxor %xmm13, %xmm9 - pxor %xmm14, %xmm10 - pxor %xmm15, %xmm11 - movdqa %xmm8, %xmm0 - movdqa %xmm9, %xmm1 - movdqa %xmm10, %xmm2 - movdqa %xmm11, %xmm3 - xmm_salsa8_core() - paddd %xmm0, %xmm8 - paddd %xmm1, %xmm9 - paddd %xmm2, %xmm10 - paddd %xmm3, %xmm11 - - pxor %xmm8, %xmm12 - pxor %xmm9, %xmm13 - pxor %xmm10, %xmm14 - pxor %xmm11, %xmm15 - movdqa %xmm12, %xmm0 - movdqa %xmm13, %xmm1 - movdqa %xmm14, %xmm2 - movdqa %xmm15, %xmm3 - xmm_salsa8_core() - paddd %xmm0, %xmm12 - paddd %xmm1, %xmm13 - paddd %xmm2, %xmm14 - paddd %xmm3, %xmm15 - - subq $1, %rcx - ja xmm_scrypt_core_loop2 - - # re-shuffle 1st block back - movd %xmm8, %eax - movd %xmm9, %edx - movd %xmm10, %ecx - movd %xmm11, %ebx - pshufd $0x39, %xmm8, %xmm8 - pshufd $0x39, %xmm9, %xmm9 - pshufd $0x39, %xmm10, %xmm10 - pshufd $0x39, %xmm11, %xmm11 - movl %eax, 0(%rdi) - movl %edx, 48(%rdi) - movl %ecx, 32(%rdi) - movl %ebx, 16(%rdi) - movd %xmm8, %ebx - movd %xmm9, %eax - movd %xmm10, %edx - movd %xmm11, %ecx - pshufd $0x39, %xmm8, %xmm8 - pshufd $0x39, %xmm9, %xmm9 - pshufd $0x39, %xmm10, %xmm10 - pshufd $0x39, %xmm11, %xmm11 - movl %ebx, 20(%rdi) - movl %eax, 4(%rdi) - movl %edx, 52(%rdi) - movl %ecx, 36(%rdi) - movd %xmm8, %ecx - movd %xmm9, %ebx - movd %xmm10, %eax - movd %xmm11, %edx - pshufd $0x39, %xmm8, %xmm8 - pshufd $0x39, %xmm9, %xmm9 - pshufd $0x39, %xmm10, %xmm10 - pshufd $0x39, %xmm11, %xmm11 - movl %ecx, 40(%rdi) - movl %ebx, 24(%rdi) - movl %eax, 8(%rdi) - movl %edx, 56(%rdi) - movd %xmm8, %edx - movd %xmm9, %ecx - movd %xmm10, %ebx - movd %xmm11, %eax - movl %edx, 60(%rdi) - movl %ecx, 44(%rdi) - movl %ebx, 28(%rdi) - movl %eax, 12(%rdi) - - # re-shuffle 2nd block back - movd %xmm12, %eax - movd %xmm13, %edx - movd %xmm14, %ecx - movd %xmm15, %ebx - pshufd $0x39, %xmm12, %xmm12 - pshufd $0x39, %xmm13, %xmm13 - pshufd $0x39, %xmm14, %xmm14 - pshufd $0x39, %xmm15, %xmm15 - movl %eax, 64(%rdi) - movl %edx, 112(%rdi) - movl %ecx, 96(%rdi) - movl %ebx, 80(%rdi) - movd %xmm12, %ebx - movd %xmm13, %eax - movd %xmm14, %edx - movd %xmm15, %ecx - pshufd $0x39, %xmm12, %xmm12 - pshufd $0x39, %xmm13, %xmm13 - pshufd $0x39, %xmm14, %xmm14 - pshufd $0x39, %xmm15, %xmm15 - movl %ebx, 84(%rdi) - movl %eax, 68(%rdi) - movl %edx, 116(%rdi) - movl %ecx, 100(%rdi) - movd %xmm12, %ecx - movd %xmm13, %ebx - movd %xmm14, %eax - movd %xmm15, %edx - pshufd $0x39, %xmm12, %xmm12 - pshufd $0x39, %xmm13, %xmm13 - pshufd $0x39, %xmm14, %xmm14 - pshufd $0x39, %xmm15, %xmm15 - movl %ecx, 104(%rdi) - movl %ebx, 88(%rdi) - movl %eax, 72(%rdi) - movl %edx, 120(%rdi) - movd %xmm12, %edx - movd %xmm13, %ecx - movd %xmm14, %ebx - movd %xmm15, %eax - movl %edx, 124(%rdi) - movl %ecx, 108(%rdi) - movl %ebx, 92(%rdi) - movl %eax, 76(%rdi) - - scrypt_core_cleanup() - ret - - - .text - .align 16 - .globl scrypt_best_throughput - .globl _scrypt_best_throughput -scrypt_best_throughput: -_scrypt_best_throughput: - pushq %rbx - xorq %rax, %rax - cpuid - movl $3, %eax - cmpl $0x444d4163, %ecx - jne scrypt_best_throughput_exit - cmpl $0x69746e65, %edx - jne scrypt_best_throughput_exit - cmpl $0x68747541, %ebx - jne scrypt_best_throughput_exit - movl $1, %eax - cpuid - andl $0x0ff00000, %eax - movl $3, %eax - jnz scrypt_best_throughput_exit - movl $1, %eax -scrypt_best_throughput_exit: - popq %rbx - ret - - -#define xmm_salsa8_core_2way_doubleround() \ - movdqa %xmm1, %xmm4; \ - movdqa %xmm9, %xmm6; \ - paddd %xmm0, %xmm4; \ - paddd %xmm8, %xmm6; \ - movdqa %xmm4, %xmm5; \ - movdqa %xmm6, %xmm7; \ - pslld $7, %xmm4; \ - pslld $7, %xmm6; \ - psrld $25, %xmm5; \ - psrld $25, %xmm7; \ - pxor %xmm4, %xmm3; \ - pxor %xmm6, %xmm11; \ - pxor %xmm5, %xmm3; \ - pxor %xmm7, %xmm11; \ - movdqa %xmm0, %xmm4; \ - movdqa %xmm8, %xmm6; \ - paddd %xmm3, %xmm4; \ - paddd %xmm11, %xmm6; \ - movdqa %xmm4, %xmm5; \ - movdqa %xmm6, %xmm7; \ - pslld $9, %xmm4; \ - pslld $9, %xmm6; \ - psrld $23, %xmm5; \ - psrld $23, %xmm7; \ - pxor %xmm4, %xmm2; \ - pxor %xmm6, %xmm10; \ - movdqa %xmm3, %xmm4; \ - movdqa %xmm11, %xmm6; \ - pshufd $0x93, %xmm3, %xmm3; \ - pshufd $0x93, %xmm11, %xmm11; \ - pxor %xmm5, %xmm2; \ - pxor %xmm7, %xmm10; \ - paddd %xmm2, %xmm4; \ - paddd %xmm10, %xmm6; \ - movdqa %xmm4, %xmm5; \ - movdqa %xmm6, %xmm7; \ - pslld $13, %xmm4; \ - pslld $13, %xmm6; \ - psrld $19, %xmm5; \ - psrld $19, %xmm7; \ - pxor %xmm4, %xmm1; \ - pxor %xmm6, %xmm9; \ - movdqa %xmm2, %xmm4; \ - movdqa %xmm10, %xmm6; \ - pshufd $0x4e, %xmm2, %xmm2; \ - pshufd $0x4e, %xmm10, %xmm10; \ - pxor %xmm5, %xmm1; \ - pxor %xmm7, %xmm9; \ - paddd %xmm1, %xmm4; \ - paddd %xmm9, %xmm6; \ - movdqa %xmm4, %xmm5; \ - movdqa %xmm6, %xmm7; \ - pslld $18, %xmm4; \ - pslld $18, %xmm6; \ - psrld $14, %xmm5; \ - psrld $14, %xmm7; \ - pxor %xmm4, %xmm0; \ - pxor %xmm6, %xmm8; \ - pshufd $0x39, %xmm1, %xmm1; \ - pshufd $0x39, %xmm9, %xmm9; \ - pxor %xmm5, %xmm0; \ - pxor %xmm7, %xmm8; \ - movdqa %xmm3, %xmm4; \ - movdqa %xmm11, %xmm6; \ - paddd %xmm0, %xmm4; \ - paddd %xmm8, %xmm6; \ - movdqa %xmm4, %xmm5; \ - movdqa %xmm6, %xmm7; \ - pslld $7, %xmm4; \ - pslld $7, %xmm6; \ - psrld $25, %xmm5; \ - psrld $25, %xmm7; \ - pxor %xmm4, %xmm1; \ - pxor %xmm6, %xmm9; \ - pxor %xmm5, %xmm1; \ - pxor %xmm7, %xmm9; \ - movdqa %xmm0, %xmm4; \ - movdqa %xmm8, %xmm6; \ - paddd %xmm1, %xmm4; \ - paddd %xmm9, %xmm6; \ - movdqa %xmm4, %xmm5; \ - movdqa %xmm6, %xmm7; \ - pslld $9, %xmm4; \ - pslld $9, %xmm6; \ - psrld $23, %xmm5; \ - psrld $23, %xmm7; \ - pxor %xmm4, %xmm2; \ - pxor %xmm6, %xmm10; \ - movdqa %xmm1, %xmm4; \ - movdqa %xmm9, %xmm6; \ - pshufd $0x93, %xmm1, %xmm1; \ - pshufd $0x93, %xmm9, %xmm9; \ - pxor %xmm5, %xmm2; \ - pxor %xmm7, %xmm10; \ - paddd %xmm2, %xmm4; \ - paddd %xmm10, %xmm6; \ - movdqa %xmm4, %xmm5; \ - movdqa %xmm6, %xmm7; \ - pslld $13, %xmm4; \ - pslld $13, %xmm6; \ - psrld $19, %xmm5; \ - psrld $19, %xmm7; \ - pxor %xmm4, %xmm3; \ - pxor %xmm6, %xmm11; \ - movdqa %xmm2, %xmm4; \ - movdqa %xmm10, %xmm6; \ - pshufd $0x4e, %xmm2, %xmm2; \ - pshufd $0x4e, %xmm10, %xmm10; \ - pxor %xmm5, %xmm3; \ - pxor %xmm7, %xmm11; \ - paddd %xmm3, %xmm4; \ - paddd %xmm11, %xmm6; \ - movdqa %xmm4, %xmm5; \ - movdqa %xmm6, %xmm7; \ - pslld $18, %xmm4; \ - pslld $18, %xmm6; \ - psrld $14, %xmm5; \ - psrld $14, %xmm7; \ - pxor %xmm4, %xmm0; \ - pxor %xmm6, %xmm8; \ - pshufd $0x39, %xmm3, %xmm3; \ - pshufd $0x39, %xmm11, %xmm11; \ - pxor %xmm5, %xmm0; \ - pxor %xmm7, %xmm8; \ - - -#define xmm_salsa8_core_2way() \ - xmm_salsa8_core_2way_doubleround(); \ - xmm_salsa8_core_2way_doubleround(); \ - xmm_salsa8_core_2way_doubleround(); \ - xmm_salsa8_core_2way_doubleround(); \ - - - - .text - .align 16 - .globl scrypt_core_2way - .globl _scrypt_core_2way -scrypt_core_2way: -_scrypt_core_2way: - pushq %rbx - pushq %rbp -#if defined(WIN64) - subq $176, %rsp - movdqa %xmm6, 8(%rsp) - movdqa %xmm7, 24(%rsp) - movdqa %xmm8, 40(%rsp) - movdqa %xmm9, 56(%rsp) - movdqa %xmm10, 72(%rsp) - movdqa %xmm11, 88(%rsp) - movdqa %xmm12, 104(%rsp) - movdqa %xmm13, 120(%rsp) - movdqa %xmm14, 136(%rsp) - movdqa %xmm15, 152(%rsp) - pushq %rdi - pushq %rsi - movq %rcx, %rdi - movq %rdx, %rsi - movq %r8, %rdx -#endif - subq $264, %rsp - - scrypt_shuffle(%rdi, 0, %rsp, 0) - scrypt_shuffle(%rdi, 64, %rsp, 64) - scrypt_shuffle(%rsi, 0, %rsp, 128) - scrypt_shuffle(%rsi, 64, %rsp, 192) - - movdqa 192(%rsp), %xmm12 - movdqa 208(%rsp), %xmm13 - movdqa 224(%rsp), %xmm14 - movdqa 240(%rsp), %xmm15 - - movq %rdx, %rbp - leaq 262144(%rdx), %rcx -scrypt_core_2way_loop1: - movdqa 0(%rsp), %xmm0 - movdqa 16(%rsp), %xmm1 - movdqa 32(%rsp), %xmm2 - movdqa 48(%rsp), %xmm3 - movdqa 64(%rsp), %xmm4 - movdqa 80(%rsp), %xmm5 - movdqa 96(%rsp), %xmm6 - movdqa 112(%rsp), %xmm7 - movdqa 128(%rsp), %xmm8 - movdqa 144(%rsp), %xmm9 - movdqa 160(%rsp), %xmm10 - movdqa 176(%rsp), %xmm11 - pxor %xmm4, %xmm0 - pxor %xmm5, %xmm1 - pxor %xmm6, %xmm2 - pxor %xmm7, %xmm3 - movdqa %xmm0, 0(%rbp) - movdqa %xmm1, 16(%rbp) - movdqa %xmm2, 32(%rbp) - movdqa %xmm3, 48(%rbp) - movdqa %xmm4, 64(%rbp) - movdqa %xmm5, 80(%rbp) - movdqa %xmm6, 96(%rbp) - movdqa %xmm7, 112(%rbp) - pxor %xmm12, %xmm8 - pxor %xmm13, %xmm9 - pxor %xmm14, %xmm10 - pxor %xmm15, %xmm11 - movdqa %xmm8, 128(%rbp) - movdqa %xmm9, 144(%rbp) - movdqa %xmm10, 160(%rbp) - movdqa %xmm11, 176(%rbp) - movdqa %xmm12, 192(%rbp) - movdqa %xmm13, 208(%rbp) - movdqa %xmm14, 224(%rbp) - movdqa %xmm15, 240(%rbp) - - xmm_salsa8_core_2way() - paddd 0(%rbp), %xmm0 - paddd 16(%rbp), %xmm1 - paddd 32(%rbp), %xmm2 - paddd 48(%rbp), %xmm3 - paddd 128(%rbp), %xmm8 - paddd 144(%rbp), %xmm9 - paddd 160(%rbp), %xmm10 - paddd 176(%rbp), %xmm11 - movdqa %xmm0, 0(%rsp) - movdqa %xmm1, 16(%rsp) - movdqa %xmm2, 32(%rsp) - movdqa %xmm3, 48(%rsp) - movdqa %xmm8, 128(%rsp) - movdqa %xmm9, 144(%rsp) - movdqa %xmm10, 160(%rsp) - movdqa %xmm11, 176(%rsp) - - pxor 64(%rsp), %xmm0 - pxor 80(%rsp), %xmm1 - pxor 96(%rsp), %xmm2 - pxor 112(%rsp), %xmm3 - pxor %xmm12, %xmm8 - pxor %xmm13, %xmm9 - pxor %xmm14, %xmm10 - pxor %xmm15, %xmm11 - movdqa %xmm0, 64(%rsp) - movdqa %xmm1, 80(%rsp) - movdqa %xmm2, 96(%rsp) - movdqa %xmm3, 112(%rsp) - movdqa %xmm8, %xmm12 - movdqa %xmm9, %xmm13 - movdqa %xmm10, %xmm14 - movdqa %xmm11, %xmm15 - xmm_salsa8_core_2way() - paddd 64(%rsp), %xmm0 - paddd 80(%rsp), %xmm1 - paddd 96(%rsp), %xmm2 - paddd 112(%rsp), %xmm3 - paddd %xmm8, %xmm12 - paddd %xmm9, %xmm13 - paddd %xmm10, %xmm14 - paddd %xmm11, %xmm15 - movdqa %xmm0, 64(%rsp) - movdqa %xmm1, 80(%rsp) - movdqa %xmm2, 96(%rsp) - movdqa %xmm3, 112(%rsp) - - addq $256, %rbp - cmpq %rcx, %rbp - jne scrypt_core_2way_loop1 - - movq $1024, %rcx -scrypt_core_2way_loop2: - movdqa 0(%rsp), %xmm0 - movdqa 16(%rsp), %xmm1 - movdqa 32(%rsp), %xmm2 - movdqa 48(%rsp), %xmm3 - movdqa 64(%rsp), %xmm4 - movdqa 80(%rsp), %xmm5 - movdqa 96(%rsp), %xmm6 - movdqa 112(%rsp), %xmm7 - movdqa 128(%rsp), %xmm8 - movdqa 144(%rsp), %xmm9 - movdqa 160(%rsp), %xmm10 - movdqa 176(%rsp), %xmm11 - movd %xmm4, %ebp - andl $1023, %ebp - shll $8, %ebp - pxor 0(%rdx, %rbp), %xmm0 - pxor 16(%rdx, %rbp), %xmm1 - pxor 32(%rdx, %rbp), %xmm2 - pxor 48(%rdx, %rbp), %xmm3 - movd %xmm12, %ebx - andl $1023, %ebx - shll $8, %ebx - addl $128, %ebx - pxor 0(%rdx, %rbx), %xmm8 - pxor 16(%rdx, %rbx), %xmm9 - pxor 32(%rdx, %rbx), %xmm10 - pxor 48(%rdx, %rbx), %xmm11 - - pxor %xmm4, %xmm0 - pxor %xmm5, %xmm1 - pxor %xmm6, %xmm2 - pxor %xmm7, %xmm3 - pxor %xmm12, %xmm8 - pxor %xmm13, %xmm9 - pxor %xmm14, %xmm10 - pxor %xmm15, %xmm11 - movdqa %xmm0, 0(%rsp) - movdqa %xmm1, 16(%rsp) - movdqa %xmm2, 32(%rsp) - movdqa %xmm3, 48(%rsp) - movdqa %xmm8, 128(%rsp) - movdqa %xmm9, 144(%rsp) - movdqa %xmm10, 160(%rsp) - movdqa %xmm11, 176(%rsp) - xmm_salsa8_core_2way() - paddd 0(%rsp), %xmm0 - paddd 16(%rsp), %xmm1 - paddd 32(%rsp), %xmm2 - paddd 48(%rsp), %xmm3 - paddd 128(%rsp), %xmm8 - paddd 144(%rsp), %xmm9 - paddd 160(%rsp), %xmm10 - paddd 176(%rsp), %xmm11 - movdqa %xmm0, 0(%rsp) - movdqa %xmm1, 16(%rsp) - movdqa %xmm2, 32(%rsp) - movdqa %xmm3, 48(%rsp) - movdqa %xmm8, 128(%rsp) - movdqa %xmm9, 144(%rsp) - movdqa %xmm10, 160(%rsp) - movdqa %xmm11, 176(%rsp) - - pxor 64(%rdx, %rbp), %xmm0 - pxor 80(%rdx, %rbp), %xmm1 - pxor 96(%rdx, %rbp), %xmm2 - pxor 112(%rdx, %rbp), %xmm3 - pxor 64(%rdx, %rbx), %xmm8 - pxor 80(%rdx, %rbx), %xmm9 - pxor 96(%rdx, %rbx), %xmm10 - pxor 112(%rdx, %rbx), %xmm11 - pxor 64(%rsp), %xmm0 - pxor 80(%rsp), %xmm1 - pxor 96(%rsp), %xmm2 - pxor 112(%rsp), %xmm3 - pxor %xmm12, %xmm8 - pxor %xmm13, %xmm9 - pxor %xmm14, %xmm10 - pxor %xmm15, %xmm11 - movdqa %xmm0, 64(%rsp) - movdqa %xmm1, 80(%rsp) - movdqa %xmm2, 96(%rsp) - movdqa %xmm3, 112(%rsp) - movdqa %xmm8, %xmm12 - movdqa %xmm9, %xmm13 - movdqa %xmm10, %xmm14 - movdqa %xmm11, %xmm15 - xmm_salsa8_core_2way() - paddd 64(%rsp), %xmm0 - paddd 80(%rsp), %xmm1 - paddd 96(%rsp), %xmm2 - paddd 112(%rsp), %xmm3 - paddd %xmm8, %xmm12 - paddd %xmm9, %xmm13 - paddd %xmm10, %xmm14 - paddd %xmm11, %xmm15 - movdqa %xmm0, 64(%rsp) - movdqa %xmm1, 80(%rsp) - movdqa %xmm2, 96(%rsp) - movdqa %xmm3, 112(%rsp) - - subq $1, %rcx - ja scrypt_core_2way_loop2 - - movdqa %xmm12, 192(%rsp) - movdqa %xmm13, 208(%rsp) - movdqa %xmm14, 224(%rsp) - movdqa %xmm15, 240(%rsp) - - scrypt_shuffle(%rsp, 0, %rdi, 0) - scrypt_shuffle(%rsp, 64, %rdi, 64) - scrypt_shuffle(%rsp, 128, %rsi, 0) - scrypt_shuffle(%rsp, 192, %rsi, 64) - - addq $264, %rsp -#if defined(WIN64) - popq %rsi - popq %rdi - movdqa 8(%rsp), %xmm6 - movdqa 24(%rsp), %xmm7 - movdqa 40(%rsp), %xmm8 - movdqa 56(%rsp), %xmm9 - movdqa 72(%rsp), %xmm10 - movdqa 88(%rsp), %xmm11 - movdqa 104(%rsp), %xmm12 - movdqa 120(%rsp), %xmm13 - movdqa 136(%rsp), %xmm14 - movdqa 152(%rsp), %xmm15 - addq $176, %rsp -#endif - popq %rbp - popq %rbx - ret - - -#define xmm_salsa8_core_3way_doubleround() \ - movdqa %xmm1, %xmm4; \ - movdqa %xmm9, %xmm6; \ - movdqa %xmm13, %xmm7; \ - paddd %xmm0, %xmm4; \ - paddd %xmm8, %xmm6; \ - paddd %xmm12, %xmm7; \ - movdqa %xmm4, %xmm5; \ - pslld $7, %xmm4; \ - psrld $25, %xmm5; \ - pxor %xmm4, %xmm3; \ - pxor %xmm5, %xmm3; \ - movdqa %xmm0, %xmm4; \ - movdqa %xmm6, %xmm5; \ - pslld $7, %xmm6; \ - psrld $25, %xmm5; \ - pxor %xmm6, %xmm11; \ - pxor %xmm5, %xmm11; \ - movdqa %xmm8, %xmm6; \ - movdqa %xmm7, %xmm5; \ - pslld $7, %xmm7; \ - psrld $25, %xmm5; \ - pxor %xmm7, %xmm15; \ - pxor %xmm5, %xmm15; \ - movdqa %xmm12, %xmm7; \ - paddd %xmm3, %xmm4; \ - paddd %xmm11, %xmm6; \ - paddd %xmm15, %xmm7; \ - movdqa %xmm4, %xmm5; \ - pslld $9, %xmm4; \ - psrld $23, %xmm5; \ - pxor %xmm4, %xmm2; \ - movdqa %xmm3, %xmm4; \ - pshufd $0x93, %xmm3, %xmm3; \ - pxor %xmm5, %xmm2; \ - movdqa %xmm6, %xmm5; \ - pslld $9, %xmm6; \ - psrld $23, %xmm5; \ - pxor %xmm6, %xmm10; \ - movdqa %xmm11, %xmm6; \ - pshufd $0x93, %xmm11, %xmm11; \ - pxor %xmm5, %xmm10; \ - movdqa %xmm7, %xmm5; \ - pslld $9, %xmm7; \ - psrld $23, %xmm5; \ - pxor %xmm7, %xmm14; \ - movdqa %xmm15, %xmm7; \ - pshufd $0x93, %xmm15, %xmm15; \ - pxor %xmm5, %xmm14; \ - paddd %xmm2, %xmm4; \ - paddd %xmm10, %xmm6; \ - paddd %xmm14, %xmm7; \ - movdqa %xmm4, %xmm5; \ - pslld $13, %xmm4; \ - psrld $19, %xmm5; \ - pxor %xmm4, %xmm1; \ - movdqa %xmm2, %xmm4; \ - pshufd $0x4e, %xmm2, %xmm2; \ - pxor %xmm5, %xmm1; \ - movdqa %xmm6, %xmm5; \ - pslld $13, %xmm6; \ - psrld $19, %xmm5; \ - pxor %xmm6, %xmm9; \ - movdqa %xmm10, %xmm6; \ - pshufd $0x4e, %xmm10, %xmm10; \ - pxor %xmm5, %xmm9; \ - movdqa %xmm7, %xmm5; \ - pslld $13, %xmm7; \ - psrld $19, %xmm5; \ - pxor %xmm7, %xmm13; \ - movdqa %xmm14, %xmm7; \ - pshufd $0x4e, %xmm14, %xmm14; \ - pxor %xmm5, %xmm13; \ - paddd %xmm1, %xmm4; \ - paddd %xmm9, %xmm6; \ - paddd %xmm13, %xmm7; \ - movdqa %xmm4, %xmm5; \ - pslld $18, %xmm4; \ - psrld $14, %xmm5; \ - pxor %xmm4, %xmm0; \ - pshufd $0x39, %xmm1, %xmm1; \ - pxor %xmm5, %xmm0; \ - movdqa %xmm3, %xmm4; \ - movdqa %xmm6, %xmm5; \ - pslld $18, %xmm6; \ - psrld $14, %xmm5; \ - pxor %xmm6, %xmm8; \ - pshufd $0x39, %xmm9, %xmm9; \ - pxor %xmm5, %xmm8; \ - movdqa %xmm11, %xmm6; \ - movdqa %xmm7, %xmm5; \ - pslld $18, %xmm7; \ - psrld $14, %xmm5; \ - pxor %xmm7, %xmm12; \ - pshufd $0x39, %xmm13, %xmm13; \ - pxor %xmm5, %xmm12; \ - movdqa %xmm15, %xmm7; \ - paddd %xmm0, %xmm4; \ - paddd %xmm8, %xmm6; \ - paddd %xmm12, %xmm7; \ - movdqa %xmm4, %xmm5; \ - pslld $7, %xmm4; \ - psrld $25, %xmm5; \ - pxor %xmm4, %xmm1; \ - pxor %xmm5, %xmm1; \ - movdqa %xmm0, %xmm4; \ - movdqa %xmm6, %xmm5; \ - pslld $7, %xmm6; \ - psrld $25, %xmm5; \ - pxor %xmm6, %xmm9; \ - pxor %xmm5, %xmm9; \ - movdqa %xmm8, %xmm6; \ - movdqa %xmm7, %xmm5; \ - pslld $7, %xmm7; \ - psrld $25, %xmm5; \ - pxor %xmm7, %xmm13; \ - pxor %xmm5, %xmm13; \ - movdqa %xmm12, %xmm7; \ - paddd %xmm1, %xmm4; \ - paddd %xmm9, %xmm6; \ - paddd %xmm13, %xmm7; \ - movdqa %xmm4, %xmm5; \ - pslld $9, %xmm4; \ - psrld $23, %xmm5; \ - pxor %xmm4, %xmm2; \ - movdqa %xmm1, %xmm4; \ - pshufd $0x93, %xmm1, %xmm1; \ - pxor %xmm5, %xmm2; \ - movdqa %xmm6, %xmm5; \ - pslld $9, %xmm6; \ - psrld $23, %xmm5; \ - pxor %xmm6, %xmm10; \ - movdqa %xmm9, %xmm6; \ - pshufd $0x93, %xmm9, %xmm9; \ - pxor %xmm5, %xmm10; \ - movdqa %xmm7, %xmm5; \ - pslld $9, %xmm7; \ - psrld $23, %xmm5; \ - pxor %xmm7, %xmm14; \ - movdqa %xmm13, %xmm7; \ - pshufd $0x93, %xmm13, %xmm13; \ - pxor %xmm5, %xmm14; \ - paddd %xmm2, %xmm4; \ - paddd %xmm10, %xmm6; \ - paddd %xmm14, %xmm7; \ - movdqa %xmm4, %xmm5; \ - pslld $13, %xmm4; \ - psrld $19, %xmm5; \ - pxor %xmm4, %xmm3; \ - movdqa %xmm2, %xmm4; \ - pshufd $0x4e, %xmm2, %xmm2; \ - pxor %xmm5, %xmm3; \ - movdqa %xmm6, %xmm5; \ - pslld $13, %xmm6; \ - psrld $19, %xmm5; \ - pxor %xmm6, %xmm11; \ - movdqa %xmm10, %xmm6; \ - pshufd $0x4e, %xmm10, %xmm10; \ - pxor %xmm5, %xmm11; \ - movdqa %xmm7, %xmm5; \ - pslld $13, %xmm7; \ - psrld $19, %xmm5; \ - pxor %xmm7, %xmm15; \ - movdqa %xmm14, %xmm7; \ - pshufd $0x4e, %xmm14, %xmm14; \ - pxor %xmm5, %xmm15; \ - paddd %xmm3, %xmm4; \ - paddd %xmm11, %xmm6; \ - paddd %xmm15, %xmm7; \ - movdqa %xmm4, %xmm5; \ - pslld $18, %xmm4; \ - psrld $14, %xmm5; \ - pxor %xmm4, %xmm0; \ - pshufd $0x39, %xmm3, %xmm3; \ - pxor %xmm5, %xmm0; \ - movdqa %xmm6, %xmm5; \ - pslld $18, %xmm6; \ - psrld $14, %xmm5; \ - pxor %xmm6, %xmm8; \ - pshufd $0x39, %xmm11, %xmm11; \ - pxor %xmm5, %xmm8; \ - movdqa %xmm7, %xmm5; \ - pslld $18, %xmm7; \ - psrld $14, %xmm5; \ - pxor %xmm7, %xmm12; \ - pshufd $0x39, %xmm15, %xmm15; \ - pxor %xmm5, %xmm12; \ - - -#define xmm_salsa8_core_3way() \ - xmm_salsa8_core_3way_doubleround(); \ - xmm_salsa8_core_3way_doubleround(); \ - xmm_salsa8_core_3way_doubleround(); \ - xmm_salsa8_core_3way_doubleround(); \ - - - .text - .align 16 - .globl scrypt_core_3way - .globl _scrypt_core_3way -scrypt_core_3way: -_scrypt_core_3way: - pushq %rbx - pushq %rbp -#if defined(WIN64) - subq $176, %rsp - movdqa %xmm6, 8(%rsp) - movdqa %xmm7, 24(%rsp) - movdqa %xmm8, 40(%rsp) - movdqa %xmm9, 56(%rsp) - movdqa %xmm10, 72(%rsp) - movdqa %xmm11, 88(%rsp) - movdqa %xmm12, 104(%rsp) - movdqa %xmm13, 120(%rsp) - movdqa %xmm14, 136(%rsp) - movdqa %xmm15, 152(%rsp) - pushq %rdi - pushq %rsi - movq %rcx, %rdi - movq %rdx, %rsi - movq %r8, %rdx - movq %r9, %rcx -#endif - subq $392, %rsp - - scrypt_shuffle(%rdi, 0, %rsp, 0) - scrypt_shuffle(%rdi, 64, %rsp, 64) - scrypt_shuffle(%rsi, 0, %rsp, 128) - scrypt_shuffle(%rsi, 64, %rsp, 192) - scrypt_shuffle(%rdx, 0, %rsp, 256) - scrypt_shuffle(%rdx, 64, %rsp, 320) - - movdqa 128+64(%rsp), %xmm8 - movdqa 128+80(%rsp), %xmm9 - movdqa 128+96(%rsp), %xmm10 - movdqa 128+112(%rsp), %xmm11 - - movq %rcx, %rbp - leaq 3*131072(%rcx), %rax -scrypt_core_3way_loop1: - movdqa %xmm8, %xmm12 - movdqa %xmm9, %xmm13 - movdqa %xmm10, %xmm14 - movdqa %xmm11, %xmm15 - movdqa 0(%rsp), %xmm0 - movdqa 16(%rsp), %xmm1 - movdqa 32(%rsp), %xmm2 - movdqa 48(%rsp), %xmm3 - movdqa 64(%rsp), %xmm4 - movdqa 80(%rsp), %xmm5 - movdqa 96(%rsp), %xmm6 - movdqa 112(%rsp), %xmm7 - movdqa 128+0(%rsp), %xmm8 - movdqa 128+16(%rsp), %xmm9 - movdqa 128+32(%rsp), %xmm10 - movdqa 128+48(%rsp), %xmm11 - pxor %xmm4, %xmm0 - pxor %xmm5, %xmm1 - pxor %xmm6, %xmm2 - pxor %xmm7, %xmm3 - movdqa %xmm0, 0(%rbp) - movdqa %xmm1, 16(%rbp) - movdqa %xmm2, 32(%rbp) - movdqa %xmm3, 48(%rbp) - movdqa %xmm4, 64(%rbp) - movdqa %xmm5, 80(%rbp) - movdqa %xmm6, 96(%rbp) - movdqa %xmm7, 112(%rbp) - pxor %xmm12, %xmm8 - pxor %xmm13, %xmm9 - pxor %xmm14, %xmm10 - pxor %xmm15, %xmm11 - movdqa %xmm8, 128+0(%rbp) - movdqa %xmm9, 128+16(%rbp) - movdqa %xmm10, 128+32(%rbp) - movdqa %xmm11, 128+48(%rbp) - movdqa %xmm12, 128+64(%rbp) - movdqa %xmm13, 128+80(%rbp) - movdqa %xmm14, 128+96(%rbp) - movdqa %xmm15, 128+112(%rbp) - movdqa 256+0(%rsp), %xmm12 - movdqa 256+16(%rsp), %xmm13 - movdqa 256+32(%rsp), %xmm14 - movdqa 256+48(%rsp), %xmm15 - movdqa 256+64(%rsp), %xmm4 - movdqa 256+80(%rsp), %xmm5 - movdqa 256+96(%rsp), %xmm6 - movdqa 256+112(%rsp), %xmm7 - pxor %xmm4, %xmm12 - pxor %xmm5, %xmm13 - pxor %xmm6, %xmm14 - pxor %xmm7, %xmm15 - movdqa %xmm12, 256+0(%rbp) - movdqa %xmm13, 256+16(%rbp) - movdqa %xmm14, 256+32(%rbp) - movdqa %xmm15, 256+48(%rbp) - movdqa %xmm4, 256+64(%rbp) - movdqa %xmm5, 256+80(%rbp) - movdqa %xmm6, 256+96(%rbp) - movdqa %xmm7, 256+112(%rbp) - - xmm_salsa8_core_3way() - paddd 0(%rbp), %xmm0 - paddd 16(%rbp), %xmm1 - paddd 32(%rbp), %xmm2 - paddd 48(%rbp), %xmm3 - paddd 128+0(%rbp), %xmm8 - paddd 128+16(%rbp), %xmm9 - paddd 128+32(%rbp), %xmm10 - paddd 128+48(%rbp), %xmm11 - paddd 256+0(%rbp), %xmm12 - paddd 256+16(%rbp), %xmm13 - paddd 256+32(%rbp), %xmm14 - paddd 256+48(%rbp), %xmm15 - movdqa %xmm0, 0(%rsp) - movdqa %xmm1, 16(%rsp) - movdqa %xmm2, 32(%rsp) - movdqa %xmm3, 48(%rsp) - movdqa %xmm8, 128+0(%rsp) - movdqa %xmm9, 128+16(%rsp) - movdqa %xmm10, 128+32(%rsp) - movdqa %xmm11, 128+48(%rsp) - movdqa %xmm12, 256+0(%rsp) - movdqa %xmm13, 256+16(%rsp) - movdqa %xmm14, 256+32(%rsp) - movdqa %xmm15, 256+48(%rsp) - - pxor 64(%rsp), %xmm0 - pxor 80(%rsp), %xmm1 - pxor 96(%rsp), %xmm2 - pxor 112(%rsp), %xmm3 - pxor 128+64(%rsp), %xmm8 - pxor 128+80(%rsp), %xmm9 - pxor 128+96(%rsp), %xmm10 - pxor 128+112(%rsp), %xmm11 - pxor 256+64(%rsp), %xmm12 - pxor 256+80(%rsp), %xmm13 - pxor 256+96(%rsp), %xmm14 - pxor 256+112(%rsp), %xmm15 - movdqa %xmm0, 64(%rsp) - movdqa %xmm1, 80(%rsp) - movdqa %xmm2, 96(%rsp) - movdqa %xmm3, 112(%rsp) - movdqa %xmm8, 128+64(%rsp) - movdqa %xmm9, 128+80(%rsp) - movdqa %xmm10, 128+96(%rsp) - movdqa %xmm11, 128+112(%rsp) - movdqa %xmm12, 256+64(%rsp) - movdqa %xmm13, 256+80(%rsp) - movdqa %xmm14, 256+96(%rsp) - movdqa %xmm15, 256+112(%rsp) - xmm_salsa8_core_3way() - paddd 64(%rsp), %xmm0 - paddd 80(%rsp), %xmm1 - paddd 96(%rsp), %xmm2 - paddd 112(%rsp), %xmm3 - paddd 128+64(%rsp), %xmm8 - paddd 128+80(%rsp), %xmm9 - paddd 128+96(%rsp), %xmm10 - paddd 128+112(%rsp), %xmm11 - paddd 256+64(%rsp), %xmm12 - paddd 256+80(%rsp), %xmm13 - paddd 256+96(%rsp), %xmm14 - paddd 256+112(%rsp), %xmm15 - movdqa %xmm0, 64(%rsp) - movdqa %xmm1, 80(%rsp) - movdqa %xmm2, 96(%rsp) - movdqa %xmm3, 112(%rsp) - movdqa %xmm8, 128+64(%rsp) - movdqa %xmm9, 128+80(%rsp) - movdqa %xmm10, 128+96(%rsp) - movdqa %xmm11, 128+112(%rsp) - movdqa %xmm12, 256+64(%rsp) - movdqa %xmm13, 256+80(%rsp) - movdqa %xmm14, 256+96(%rsp) - movdqa %xmm15, 256+112(%rsp) - - addq $3*128, %rbp - cmpq %rax, %rbp - jne scrypt_core_3way_loop1 - - movq $1024, %rax -scrypt_core_3way_loop2: - movl 64(%rsp), %ebp - andl $1023, %ebp - leal (%ebp, %ebp, 2), %ebp - shll $7, %ebp - movl 128+64(%rsp), %ebx - andl $1023, %ebx - leal (%ebx, %ebx, 2), %ebx - shll $7, %ebx - addl $128, %ebx - movl 256+64(%rsp), %r8d - andl $1023, %r8d - leal (%r8d, %r8d, 2), %r8d - shll $7, %r8d - addl $256, %r8d - movdqa 0(%rsp), %xmm0 - movdqa 16(%rsp), %xmm1 - movdqa 32(%rsp), %xmm2 - movdqa 48(%rsp), %xmm3 - movdqa 128+0(%rsp), %xmm8 - movdqa 128+16(%rsp), %xmm9 - movdqa 128+32(%rsp), %xmm10 - movdqa 128+48(%rsp), %xmm11 - movdqa 256+0(%rsp), %xmm12 - movdqa 256+16(%rsp), %xmm13 - movdqa 256+32(%rsp), %xmm14 - movdqa 256+48(%rsp), %xmm15 - pxor 0(%rcx, %rbp), %xmm0 - pxor 16(%rcx, %rbp), %xmm1 - pxor 32(%rcx, %rbp), %xmm2 - pxor 48(%rcx, %rbp), %xmm3 - pxor 0(%rcx, %rbx), %xmm8 - pxor 16(%rcx, %rbx), %xmm9 - pxor 32(%rcx, %rbx), %xmm10 - pxor 48(%rcx, %rbx), %xmm11 - pxor 0(%rcx, %r8), %xmm12 - pxor 16(%rcx, %r8), %xmm13 - pxor 32(%rcx, %r8), %xmm14 - pxor 48(%rcx, %r8), %xmm15 - - pxor 64(%rsp), %xmm0 - pxor 80(%rsp), %xmm1 - pxor 96(%rsp), %xmm2 - pxor 112(%rsp), %xmm3 - pxor 128+64(%rsp), %xmm8 - pxor 128+80(%rsp), %xmm9 - pxor 128+96(%rsp), %xmm10 - pxor 128+112(%rsp), %xmm11 - pxor 256+64(%rsp), %xmm12 - pxor 256+80(%rsp), %xmm13 - pxor 256+96(%rsp), %xmm14 - pxor 256+112(%rsp), %xmm15 - movdqa %xmm0, 0(%rsp) - movdqa %xmm1, 16(%rsp) - movdqa %xmm2, 32(%rsp) - movdqa %xmm3, 48(%rsp) - movdqa %xmm8, 128+0(%rsp) - movdqa %xmm9, 128+16(%rsp) - movdqa %xmm10, 128+32(%rsp) - movdqa %xmm11, 128+48(%rsp) - movdqa %xmm12, 256+0(%rsp) - movdqa %xmm13, 256+16(%rsp) - movdqa %xmm14, 256+32(%rsp) - movdqa %xmm15, 256+48(%rsp) - xmm_salsa8_core_3way() - paddd 0(%rsp), %xmm0 - paddd 16(%rsp), %xmm1 - paddd 32(%rsp), %xmm2 - paddd 48(%rsp), %xmm3 - paddd 128+0(%rsp), %xmm8 - paddd 128+16(%rsp), %xmm9 - paddd 128+32(%rsp), %xmm10 - paddd 128+48(%rsp), %xmm11 - paddd 256+0(%rsp), %xmm12 - paddd 256+16(%rsp), %xmm13 - paddd 256+32(%rsp), %xmm14 - paddd 256+48(%rsp), %xmm15 - movdqa %xmm0, 0(%rsp) - movdqa %xmm1, 16(%rsp) - movdqa %xmm2, 32(%rsp) - movdqa %xmm3, 48(%rsp) - movdqa %xmm8, 128+0(%rsp) - movdqa %xmm9, 128+16(%rsp) - movdqa %xmm10, 128+32(%rsp) - movdqa %xmm11, 128+48(%rsp) - movdqa %xmm12, 256+0(%rsp) - movdqa %xmm13, 256+16(%rsp) - movdqa %xmm14, 256+32(%rsp) - movdqa %xmm15, 256+48(%rsp) - - pxor 64(%rcx, %rbp), %xmm0 - pxor 80(%rcx, %rbp), %xmm1 - pxor 96(%rcx, %rbp), %xmm2 - pxor 112(%rcx, %rbp), %xmm3 - pxor 64(%rcx, %rbx), %xmm8 - pxor 80(%rcx, %rbx), %xmm9 - pxor 96(%rcx, %rbx), %xmm10 - pxor 112(%rcx, %rbx), %xmm11 - pxor 64(%rcx, %r8), %xmm12 - pxor 80(%rcx, %r8), %xmm13 - pxor 96(%rcx, %r8), %xmm14 - pxor 112(%rcx, %r8), %xmm15 - pxor 64(%rsp), %xmm0 - pxor 80(%rsp), %xmm1 - pxor 96(%rsp), %xmm2 - pxor 112(%rsp), %xmm3 - pxor 128+64(%rsp), %xmm8 - pxor 128+80(%rsp), %xmm9 - pxor 128+96(%rsp), %xmm10 - pxor 128+112(%rsp), %xmm11 - pxor 256+64(%rsp), %xmm12 - pxor 256+80(%rsp), %xmm13 - pxor 256+96(%rsp), %xmm14 - pxor 256+112(%rsp), %xmm15 - movdqa %xmm0, 64(%rsp) - movdqa %xmm1, 80(%rsp) - movdqa %xmm2, 96(%rsp) - movdqa %xmm3, 112(%rsp) - movdqa %xmm8, 128+64(%rsp) - movdqa %xmm9, 128+80(%rsp) - movdqa %xmm10, 128+96(%rsp) - movdqa %xmm11, 128+112(%rsp) - movdqa %xmm12, 256+64(%rsp) - movdqa %xmm13, 256+80(%rsp) - movdqa %xmm14, 256+96(%rsp) - movdqa %xmm15, 256+112(%rsp) - xmm_salsa8_core_3way() - paddd 64(%rsp), %xmm0 - paddd 80(%rsp), %xmm1 - paddd 96(%rsp), %xmm2 - paddd 112(%rsp), %xmm3 - paddd 128+64(%rsp), %xmm8 - paddd 128+80(%rsp), %xmm9 - paddd 128+96(%rsp), %xmm10 - paddd 128+112(%rsp), %xmm11 - paddd 256+64(%rsp), %xmm12 - paddd 256+80(%rsp), %xmm13 - paddd 256+96(%rsp), %xmm14 - paddd 256+112(%rsp), %xmm15 - movdqa %xmm0, 64(%rsp) - movdqa %xmm1, 80(%rsp) - movdqa %xmm2, 96(%rsp) - movdqa %xmm3, 112(%rsp) - movdqa %xmm8, 128+64(%rsp) - movdqa %xmm9, 128+80(%rsp) - movdqa %xmm10, 128+96(%rsp) - movdqa %xmm11, 128+112(%rsp) - movdqa %xmm12, 256+64(%rsp) - movdqa %xmm13, 256+80(%rsp) - movdqa %xmm14, 256+96(%rsp) - movdqa %xmm15, 256+112(%rsp) - - subq $1, %rax - ja scrypt_core_3way_loop2 - - scrypt_shuffle(%rsp, 0, %rdi, 0) - scrypt_shuffle(%rsp, 64, %rdi, 64) - scrypt_shuffle(%rsp, 128, %rsi, 0) - scrypt_shuffle(%rsp, 192, %rsi, 64) - scrypt_shuffle(%rsp, 256, %rdx, 0) - scrypt_shuffle(%rsp, 320, %rdx, 64) - - addq $392, %rsp -#if defined(WIN64) - popq %rsi - popq %rdi - movdqa 8(%rsp), %xmm6 - movdqa 24(%rsp), %xmm7 - movdqa 40(%rsp), %xmm8 - movdqa 56(%rsp), %xmm9 - movdqa 72(%rsp), %xmm10 - movdqa 88(%rsp), %xmm11 - movdqa 104(%rsp), %xmm12 - movdqa 120(%rsp), %xmm13 - movdqa 136(%rsp), %xmm14 - movdqa 152(%rsp), %xmm15 - addq $176, %rsp -#endif - popq %rbp - popq %rbx - ret - +# Copyright 2011-2012 pooler@litecoinpool.org +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + + +#if defined(OPTIMIZED_SALSA) && defined(__x86_64__) + +#if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits #endif + +#define scrypt_shuffle(src, so, dest, do) \ + movl so+60(src), %r8d; \ + movl so+44(src), %r9d; \ + movl so+28(src), %r10d; \ + movl so+12(src), %r11d; \ + movl %r8d, do+12(dest); \ + movl %r9d, do+28(dest); \ + movl %r10d, do+44(dest); \ + movl %r11d, do+60(dest); \ + movl so+40(src), %r8d; \ + movl so+8(src), %r9d; \ + movl so+48(src), %r10d; \ + movl so+16(src), %r11d; \ + movl %r8d, do+8(dest); \ + movl %r9d, do+40(dest); \ + movl %r10d, do+16(dest); \ + movl %r11d, do+48(dest); \ + movl so+20(src), %r8d; \ + movl so+4(src), %r9d; \ + movl so+52(src), %r10d; \ + movl so+36(src), %r11d; \ + movl %r8d, do+4(dest); \ + movl %r9d, do+20(dest); \ + movl %r10d, do+36(dest); \ + movl %r11d, do+52(dest); \ + movl so+0(src), %r8d; \ + movl so+24(src), %r9d; \ + movl so+32(src), %r10d; \ + movl so+56(src), %r11d; \ + movl %r8d, do+0(dest); \ + movl %r9d, do+24(dest); \ + movl %r10d, do+32(dest); \ + movl %r11d, do+56(dest); \ + + +#define gen_salsa8_core_doubleround() \ + movq 72(%rsp), %r15; \ + leaq (%r14, %rdx), %rbp; \ + roll $7, %ebp; \ + xorq %rbp, %r9; \ + leaq (%rdi, %r15), %rbp; \ + roll $7, %ebp; \ + xorq %rbp, %r10; \ + leaq (%rdx, %r9), %rbp; \ + roll $9, %ebp; \ + xorq %rbp, %r11; \ + leaq (%r15, %r10), %rbp; \ + roll $9, %ebp; \ + xorq %rbp, %r13; \ + leaq (%r9, %r11), %rbp; \ + roll $13, %ebp; \ + xorq %rbp, %r14; \ + leaq (%r10, %r13), %rbp; \ + roll $13, %ebp; \ + xorq %rbp, %rdi; \ + leaq (%r11, %r14), %rbp; \ + roll $18, %ebp; \ + xorq %rbp, %rdx; \ + leaq (%r13, %rdi), %rbp; \ + roll $18, %ebp; \ + xorq %rbp, %r15; \ + movq 48(%rsp), %rbp; \ + movq %r15, 72(%rsp); \ + leaq (%rax, %rbp), %r15; \ + roll $7, %r15d; \ + xorq %r15, %rbx; \ + leaq (%rbp, %rbx), %r15; \ + roll $9, %r15d; \ + xorq %r15, %rcx; \ + leaq (%rbx, %rcx), %r15; \ + roll $13, %r15d; \ + xorq %r15, %rax; \ + leaq (%rcx, %rax), %r15; \ + roll $18, %r15d; \ + xorq %r15, %rbp; \ + movq 88(%rsp), %r15; \ + movq %rbp, 48(%rsp); \ + leaq (%r12, %r15), %rbp; \ + roll $7, %ebp; \ + xorq %rbp, %rsi; \ + leaq (%r15, %rsi), %rbp; \ + roll $9, %ebp; \ + xorq %rbp, %r8; \ + leaq (%rsi, %r8), %rbp; \ + roll $13, %ebp; \ + xorq %rbp, %r12; \ + leaq (%r8, %r12), %rbp; \ + roll $18, %ebp; \ + xorq %rbp, %r15; \ + movq %r15, 88(%rsp); \ + movq 72(%rsp), %r15; \ + leaq (%rsi, %rdx), %rbp; \ + roll $7, %ebp; \ + xorq %rbp, %rdi; \ + leaq (%r9, %r15), %rbp; \ + roll $7, %ebp; \ + xorq %rbp, %rax; \ + leaq (%rdx, %rdi), %rbp; \ + roll $9, %ebp; \ + xorq %rbp, %rcx; \ + leaq (%r15, %rax), %rbp; \ + roll $9, %ebp; \ + xorq %rbp, %r8; \ + leaq (%rdi, %rcx), %rbp; \ + roll $13, %ebp; \ + xorq %rbp, %rsi; \ + leaq (%rax, %r8), %rbp; \ + roll $13, %ebp; \ + xorq %rbp, %r9; \ + leaq (%rcx, %rsi), %rbp; \ + roll $18, %ebp; \ + xorq %rbp, %rdx; \ + leaq (%r8, %r9), %rbp; \ + roll $18, %ebp; \ + xorq %rbp, %r15; \ + movq 48(%rsp), %rbp; \ + movq %r15, 72(%rsp); \ + leaq (%r10, %rbp), %r15; \ + roll $7, %r15d; \ + xorq %r15, %r12; \ + leaq (%rbp, %r12), %r15; \ + roll $9, %r15d; \ + xorq %r15, %r11; \ + leaq (%r12, %r11), %r15; \ + roll $13, %r15d; \ + xorq %r15, %r10; \ + leaq (%r11, %r10), %r15; \ + roll $18, %r15d; \ + xorq %r15, %rbp; \ + movq 88(%rsp), %r15; \ + movq %rbp, 48(%rsp); \ + leaq (%rbx, %r15), %rbp; \ + roll $7, %ebp; \ + xorq %rbp, %r14; \ + leaq (%r15, %r14), %rbp; \ + roll $9, %ebp; \ + xorq %rbp, %r13; \ + leaq (%r14, %r13), %rbp; \ + roll $13, %ebp; \ + xorq %rbp, %rbx; \ + leaq (%r13, %rbx), %rbp; \ + roll $18, %ebp; \ + xorq %rbp, %r15; \ + movq %r15, 88(%rsp); \ + + + .text + .align 32 +gen_salsa8_core: + # 0: %rdx, %rdi, %rcx, %rsi + movq 8(%rsp), %rdi + movq %rdi, %rdx + shrq $32, %rdi + movq 16(%rsp), %rsi + movq %rsi, %rcx + shrq $32, %rsi + # 1: %r9, 72(%rsp), %rax, %r8 + movq 24(%rsp), %r8 + movq %r8, %r9 + shrq $32, %r8 + movq %r8, 72(%rsp) + movq 32(%rsp), %r8 + movq %r8, %rax + shrq $32, %r8 + # 2: %r11, %r10, 48(%rsp), %r12 + movq 40(%rsp), %r10 + movq %r10, %r11 + shrq $32, %r10 + movq 48(%rsp), %r12 + #movq %r12, %r13 + #movq %r13, 48(%rsp) + shrq $32, %r12 + # 3: %r14, %r13, %rbx, 88(%rsp) + movq 56(%rsp), %r13 + movq %r13, %r14 + shrq $32, %r13 + movq 64(%rsp), %r15 + movq %r15, %rbx + shrq $32, %r15 + movq %r15, 88(%rsp) + + gen_salsa8_core_doubleround() + gen_salsa8_core_doubleround() + gen_salsa8_core_doubleround() + gen_salsa8_core_doubleround() + + movl %edx, %edx + shlq $32, %rdi + addq %rdi, %rdx + movd %rdx, %xmm0 + + movl %ecx, %ecx + shlq $32, %rsi + addq %rsi, %rcx + movd %rcx, %xmm4 + + movq 72(%rsp), %rdi + movl %r9d, %r9d + shlq $32, %rdi + addq %rdi, %r9 + movd %r9, %xmm1 + + movl %eax, %eax + shlq $32, %r8 + addq %r8, %rax + movd %rax, %xmm5 + + movl %r11d, %r11d + shlq $32, %r10 + addq %r10, %r11 + movd %r11, %xmm2 + + movl 48(%rsp), %r8d + shlq $32, %r12 + addq %r12, %r8 + movd %r8, %xmm6 + + movl %r14d, %r14d + shlq $32, %r13 + addq %r13, %r14 + movd %r14, %xmm3 + + movq 88(%rsp), %rdi + movl %ebx, %ebx + shlq $32, %rdi + addq %rdi, %rbx + movd %rbx, %xmm7 + + punpcklqdq %xmm4, %xmm0 + punpcklqdq %xmm5, %xmm1 + punpcklqdq %xmm6, %xmm2 + punpcklqdq %xmm7, %xmm3 + + #movq %rdx, 8(%rsp) + #movq %rcx, 16(%rsp) + #movq %r9, 24(%rsp) + #movq %rax, 32(%rsp) + #movq %r11, 40(%rsp) + #movq %r8, 48(%rsp) + #movq %r14, 56(%rsp) + #movq %rbx, 64(%rsp) + + ret + + + .text + .align 32 + .globl scrypt_core + .globl _scrypt_core +scrypt_core: +_scrypt_core: + pushq %rbx + pushq %rbp + pushq %r12 + pushq %r13 + pushq %r14 + pushq %r15 +#if defined(WIN64) + subq $176, %rsp + movdqa %xmm6, 8(%rsp) + movdqa %xmm7, 24(%rsp) + movdqa %xmm8, 40(%rsp) + movdqa %xmm9, 56(%rsp) + movdqa %xmm10, 72(%rsp) + movdqa %xmm11, 88(%rsp) + movdqa %xmm12, 104(%rsp) + movdqa %xmm13, 120(%rsp) + movdqa %xmm14, 136(%rsp) + movdqa %xmm15, 152(%rsp) + pushq %rdi + pushq %rsi + movq %rcx, %rdi + movq %rdx, %rsi +#endif + +#define scrypt_core_cleanup() \ + popq %r15; \ + popq %r14; \ + popq %r13; \ + popq %r12; \ + popq %rbp; \ + popq %rbx; \ + + + # GenuineIntel processors have fast SIMD + xorl %eax, %eax + cpuid + cmpl $0x6c65746e, %ecx + jne gen_scrypt_core + cmpl $0x49656e69, %edx + jne gen_scrypt_core + cmpl $0x756e6547, %ebx + je xmm_scrypt_core + +gen_scrypt_core: + subq $136, %rsp + movdqa 0(%rdi), %xmm8 + movdqa 16(%rdi), %xmm9 + movdqa 32(%rdi), %xmm10 + movdqa 48(%rdi), %xmm11 + movdqa 64(%rdi), %xmm12 + movdqa 80(%rdi), %xmm13 + movdqa 96(%rdi), %xmm14 + movdqa 112(%rdi), %xmm15 + + leaq 131072(%rsi), %rcx + movq %rdi, 104(%rsp) + movq %rsi, 112(%rsp) + movq %rcx, 120(%rsp) +gen_scrypt_core_loop1: + movdqa %xmm8, 0(%rsi) + movdqa %xmm9, 16(%rsi) + movdqa %xmm10, 32(%rsi) + movdqa %xmm11, 48(%rsi) + movdqa %xmm12, 64(%rsi) + movdqa %xmm13, 80(%rsi) + movdqa %xmm14, 96(%rsi) + movdqa %xmm15, 112(%rsi) + + pxor %xmm12, %xmm8 + pxor %xmm13, %xmm9 + pxor %xmm14, %xmm10 + pxor %xmm15, %xmm11 + movdqa %xmm8, 0(%rsp) + movdqa %xmm9, 16(%rsp) + movdqa %xmm10, 32(%rsp) + movdqa %xmm11, 48(%rsp) + movq %rsi, 128(%rsp) + call gen_salsa8_core + paddd %xmm0, %xmm8 + paddd %xmm1, %xmm9 + paddd %xmm2, %xmm10 + paddd %xmm3, %xmm11 + + pxor %xmm8, %xmm12 + pxor %xmm9, %xmm13 + pxor %xmm10, %xmm14 + pxor %xmm11, %xmm15 + movdqa %xmm12, 0(%rsp) + movdqa %xmm13, 16(%rsp) + movdqa %xmm14, 32(%rsp) + movdqa %xmm15, 48(%rsp) + call gen_salsa8_core + movq 128(%rsp), %rsi + paddd %xmm0, %xmm12 + paddd %xmm1, %xmm13 + paddd %xmm2, %xmm14 + paddd %xmm3, %xmm15 + + addq $128, %rsi + movq 120(%rsp), %rcx + cmpq %rcx, %rsi + jne gen_scrypt_core_loop1 + + movq $1024, %rcx +gen_scrypt_core_loop2: + movq 112(%rsp), %rsi + movd %xmm12, %edx + andl $1023, %edx + shll $7, %edx + movdqa 0(%rsi, %rdx), %xmm0 + movdqa 16(%rsi, %rdx), %xmm1 + movdqa 32(%rsi, %rdx), %xmm2 + movdqa 48(%rsi, %rdx), %xmm3 + movdqa 64(%rsi, %rdx), %xmm4 + movdqa 80(%rsi, %rdx), %xmm5 + movdqa 96(%rsi, %rdx), %xmm6 + movdqa 112(%rsi, %rdx), %xmm7 + pxor %xmm0, %xmm8 + pxor %xmm1, %xmm9 + pxor %xmm2, %xmm10 + pxor %xmm3, %xmm11 + pxor %xmm4, %xmm12 + pxor %xmm5, %xmm13 + pxor %xmm6, %xmm14 + pxor %xmm7, %xmm15 + + pxor %xmm12, %xmm8 + pxor %xmm13, %xmm9 + pxor %xmm14, %xmm10 + pxor %xmm15, %xmm11 + movdqa %xmm8, 0(%rsp) + movdqa %xmm9, 16(%rsp) + movdqa %xmm10, 32(%rsp) + movdqa %xmm11, 48(%rsp) + movq %rcx, 128(%rsp) + call gen_salsa8_core + paddd %xmm0, %xmm8 + paddd %xmm1, %xmm9 + paddd %xmm2, %xmm10 + paddd %xmm3, %xmm11 + + pxor %xmm8, %xmm12 + pxor %xmm9, %xmm13 + pxor %xmm10, %xmm14 + pxor %xmm11, %xmm15 + movdqa %xmm12, 0(%rsp) + movdqa %xmm13, 16(%rsp) + movdqa %xmm14, 32(%rsp) + movdqa %xmm15, 48(%rsp) + call gen_salsa8_core + movq 128(%rsp), %rcx + paddd %xmm0, %xmm12 + paddd %xmm1, %xmm13 + paddd %xmm2, %xmm14 + paddd %xmm3, %xmm15 + + subq $1, %rcx + ja gen_scrypt_core_loop2 + + movq 104(%rsp), %rdi + movdqa %xmm8, 0(%rdi) + movdqa %xmm9, 16(%rdi) + movdqa %xmm10, 32(%rdi) + movdqa %xmm11, 48(%rdi) + movdqa %xmm12, 64(%rdi) + movdqa %xmm13, 80(%rdi) + movdqa %xmm14, 96(%rdi) + movdqa %xmm15, 112(%rdi) + + addq $136, %rsp + scrypt_core_cleanup() + ret + + +#define xmm_salsa8_core_doubleround() \ + movdqa %xmm1, %xmm4; \ + paddd %xmm0, %xmm4; \ + movdqa %xmm4, %xmm5; \ + pslld $7, %xmm4; \ + psrld $25, %xmm5; \ + pxor %xmm4, %xmm3; \ + pxor %xmm5, %xmm3; \ + movdqa %xmm0, %xmm4; \ + paddd %xmm3, %xmm4; \ + movdqa %xmm4, %xmm5; \ + pslld $9, %xmm4; \ + psrld $23, %xmm5; \ + pxor %xmm4, %xmm2; \ + movdqa %xmm3, %xmm4; \ + pshufd $0x93, %xmm3, %xmm3; \ + pxor %xmm5, %xmm2; \ + paddd %xmm2, %xmm4; \ + movdqa %xmm4, %xmm5; \ + pslld $13, %xmm4; \ + psrld $19, %xmm5; \ + pxor %xmm4, %xmm1; \ + movdqa %xmm2, %xmm4; \ + pshufd $0x4e, %xmm2, %xmm2; \ + pxor %xmm5, %xmm1; \ + paddd %xmm1, %xmm4; \ + movdqa %xmm4, %xmm5; \ + pslld $18, %xmm4; \ + psrld $14, %xmm5; \ + pxor %xmm4, %xmm0; \ + pshufd $0x39, %xmm1, %xmm1; \ + pxor %xmm5, %xmm0; \ + movdqa %xmm3, %xmm4; \ + paddd %xmm0, %xmm4; \ + movdqa %xmm4, %xmm5; \ + pslld $7, %xmm4; \ + psrld $25, %xmm5; \ + pxor %xmm4, %xmm1; \ + pxor %xmm5, %xmm1; \ + movdqa %xmm0, %xmm4; \ + paddd %xmm1, %xmm4; \ + movdqa %xmm4, %xmm5; \ + pslld $9, %xmm4; \ + psrld $23, %xmm5; \ + pxor %xmm4, %xmm2; \ + movdqa %xmm1, %xmm4; \ + pshufd $0x93, %xmm1, %xmm1; \ + pxor %xmm5, %xmm2; \ + paddd %xmm2, %xmm4; \ + movdqa %xmm4, %xmm5; \ + pslld $13, %xmm4; \ + psrld $19, %xmm5; \ + pxor %xmm4, %xmm3; \ + movdqa %xmm2, %xmm4; \ + pshufd $0x4e, %xmm2, %xmm2; \ + pxor %xmm5, %xmm3; \ + paddd %xmm3, %xmm4; \ + movdqa %xmm4, %xmm5; \ + pslld $18, %xmm4; \ + psrld $14, %xmm5; \ + pxor %xmm4, %xmm0; \ + pshufd $0x39, %xmm3, %xmm3; \ + pxor %xmm5, %xmm0; \ + + +#define xmm_salsa8_core() \ + xmm_salsa8_core_doubleround(); \ + xmm_salsa8_core_doubleround(); \ + xmm_salsa8_core_doubleround(); \ + xmm_salsa8_core_doubleround(); \ + + + .align 32 +xmm_scrypt_core: + # shuffle 1st block into %xmm8-%xmm11 + movl 60(%rdi), %edx + movl 44(%rdi), %ecx + movl 28(%rdi), %ebx + movl 12(%rdi), %eax + movd %edx, %xmm0 + movd %ecx, %xmm1 + movd %ebx, %xmm2 + movd %eax, %xmm3 + movl 40(%rdi), %ecx + movl 24(%rdi), %ebx + movl 8(%rdi), %eax + movl 56(%rdi), %edx + pshufd $0x93, %xmm0, %xmm0 + pshufd $0x93, %xmm1, %xmm1 + pshufd $0x93, %xmm2, %xmm2 + pshufd $0x93, %xmm3, %xmm3 + movd %ecx, %xmm4 + movd %ebx, %xmm5 + movd %eax, %xmm6 + movd %edx, %xmm7 + paddd %xmm4, %xmm0 + paddd %xmm5, %xmm1 + paddd %xmm6, %xmm2 + paddd %xmm7, %xmm3 + movl 20(%rdi), %ebx + movl 4(%rdi), %eax + movl 52(%rdi), %edx + movl 36(%rdi), %ecx + pshufd $0x93, %xmm0, %xmm0 + pshufd $0x93, %xmm1, %xmm1 + pshufd $0x93, %xmm2, %xmm2 + pshufd $0x93, %xmm3, %xmm3 + movd %ebx, %xmm4 + movd %eax, %xmm5 + movd %edx, %xmm6 + movd %ecx, %xmm7 + paddd %xmm4, %xmm0 + paddd %xmm5, %xmm1 + paddd %xmm6, %xmm2 + paddd %xmm7, %xmm3 + movl 0(%rdi), %eax + movl 48(%rdi), %edx + movl 32(%rdi), %ecx + movl 16(%rdi), %ebx + pshufd $0x93, %xmm0, %xmm0 + pshufd $0x93, %xmm1, %xmm1 + pshufd $0x93, %xmm2, %xmm2 + pshufd $0x93, %xmm3, %xmm3 + movd %eax, %xmm8 + movd %edx, %xmm9 + movd %ecx, %xmm10 + movd %ebx, %xmm11 + paddd %xmm0, %xmm8 + paddd %xmm1, %xmm9 + paddd %xmm2, %xmm10 + paddd %xmm3, %xmm11 + + # shuffle 2nd block into %xmm12-%xmm15 + movl 124(%rdi), %edx + movl 108(%rdi), %ecx + movl 92(%rdi), %ebx + movl 76(%rdi), %eax + movd %edx, %xmm0 + movd %ecx, %xmm1 + movd %ebx, %xmm2 + movd %eax, %xmm3 + movl 104(%rdi), %ecx + movl 88(%rdi), %ebx + movl 72(%rdi), %eax + movl 120(%rdi), %edx + pshufd $0x93, %xmm0, %xmm0 + pshufd $0x93, %xmm1, %xmm1 + pshufd $0x93, %xmm2, %xmm2 + pshufd $0x93, %xmm3, %xmm3 + movd %ecx, %xmm4 + movd %ebx, %xmm5 + movd %eax, %xmm6 + movd %edx, %xmm7 + paddd %xmm4, %xmm0 + paddd %xmm5, %xmm1 + paddd %xmm6, %xmm2 + paddd %xmm7, %xmm3 + movl 84(%rdi), %ebx + movl 68(%rdi), %eax + movl 116(%rdi), %edx + movl 100(%rdi), %ecx + pshufd $0x93, %xmm0, %xmm0 + pshufd $0x93, %xmm1, %xmm1 + pshufd $0x93, %xmm2, %xmm2 + pshufd $0x93, %xmm3, %xmm3 + movd %ebx, %xmm4 + movd %eax, %xmm5 + movd %edx, %xmm6 + movd %ecx, %xmm7 + paddd %xmm4, %xmm0 + paddd %xmm5, %xmm1 + paddd %xmm6, %xmm2 + paddd %xmm7, %xmm3 + movl 64(%rdi), %eax + movl 112(%rdi), %edx + movl 96(%rdi), %ecx + movl 80(%rdi), %ebx + pshufd $0x93, %xmm0, %xmm0 + pshufd $0x93, %xmm1, %xmm1 + pshufd $0x93, %xmm2, %xmm2 + pshufd $0x93, %xmm3, %xmm3 + movd %eax, %xmm12 + movd %edx, %xmm13 + movd %ecx, %xmm14 + movd %ebx, %xmm15 + paddd %xmm0, %xmm12 + paddd %xmm1, %xmm13 + paddd %xmm2, %xmm14 + paddd %xmm3, %xmm15 + + movq %rsi, %rdx + leaq 131072(%rsi), %rcx +xmm_scrypt_core_loop1: + movdqa %xmm8, 0(%rdx) + movdqa %xmm9, 16(%rdx) + movdqa %xmm10, 32(%rdx) + movdqa %xmm11, 48(%rdx) + movdqa %xmm12, 64(%rdx) + movdqa %xmm13, 80(%rdx) + movdqa %xmm14, 96(%rdx) + movdqa %xmm15, 112(%rdx) + + pxor %xmm12, %xmm8 + pxor %xmm13, %xmm9 + pxor %xmm14, %xmm10 + pxor %xmm15, %xmm11 + movdqa %xmm8, %xmm0 + movdqa %xmm9, %xmm1 + movdqa %xmm10, %xmm2 + movdqa %xmm11, %xmm3 + xmm_salsa8_core() + paddd %xmm0, %xmm8 + paddd %xmm1, %xmm9 + paddd %xmm2, %xmm10 + paddd %xmm3, %xmm11 + + pxor %xmm8, %xmm12 + pxor %xmm9, %xmm13 + pxor %xmm10, %xmm14 + pxor %xmm11, %xmm15 + movdqa %xmm12, %xmm0 + movdqa %xmm13, %xmm1 + movdqa %xmm14, %xmm2 + movdqa %xmm15, %xmm3 + xmm_salsa8_core() + paddd %xmm0, %xmm12 + paddd %xmm1, %xmm13 + paddd %xmm2, %xmm14 + paddd %xmm3, %xmm15 + + addq $128, %rdx + cmpq %rcx, %rdx + jne xmm_scrypt_core_loop1 + + movq $1024, %rcx +xmm_scrypt_core_loop2: + movd %xmm12, %edx + andl $1023, %edx + shll $7, %edx + movdqa 0(%rsi, %rdx), %xmm0 + movdqa 16(%rsi, %rdx), %xmm1 + movdqa 32(%rsi, %rdx), %xmm2 + movdqa 48(%rsi, %rdx), %xmm3 + movdqa 64(%rsi, %rdx), %xmm4 + movdqa 80(%rsi, %rdx), %xmm5 + movdqa 96(%rsi, %rdx), %xmm6 + movdqa 112(%rsi, %rdx), %xmm7 + pxor %xmm0, %xmm8 + pxor %xmm1, %xmm9 + pxor %xmm2, %xmm10 + pxor %xmm3, %xmm11 + pxor %xmm4, %xmm12 + pxor %xmm5, %xmm13 + pxor %xmm6, %xmm14 + pxor %xmm7, %xmm15 + + pxor %xmm12, %xmm8 + pxor %xmm13, %xmm9 + pxor %xmm14, %xmm10 + pxor %xmm15, %xmm11 + movdqa %xmm8, %xmm0 + movdqa %xmm9, %xmm1 + movdqa %xmm10, %xmm2 + movdqa %xmm11, %xmm3 + xmm_salsa8_core() + paddd %xmm0, %xmm8 + paddd %xmm1, %xmm9 + paddd %xmm2, %xmm10 + paddd %xmm3, %xmm11 + + pxor %xmm8, %xmm12 + pxor %xmm9, %xmm13 + pxor %xmm10, %xmm14 + pxor %xmm11, %xmm15 + movdqa %xmm12, %xmm0 + movdqa %xmm13, %xmm1 + movdqa %xmm14, %xmm2 + movdqa %xmm15, %xmm3 + xmm_salsa8_core() + paddd %xmm0, %xmm12 + paddd %xmm1, %xmm13 + paddd %xmm2, %xmm14 + paddd %xmm3, %xmm15 + + subq $1, %rcx + ja xmm_scrypt_core_loop2 + + # re-shuffle 1st block back + movd %xmm8, %eax + movd %xmm9, %edx + movd %xmm10, %ecx + movd %xmm11, %ebx + pshufd $0x39, %xmm8, %xmm8 + pshufd $0x39, %xmm9, %xmm9 + pshufd $0x39, %xmm10, %xmm10 + pshufd $0x39, %xmm11, %xmm11 + movl %eax, 0(%rdi) + movl %edx, 48(%rdi) + movl %ecx, 32(%rdi) + movl %ebx, 16(%rdi) + movd %xmm8, %ebx + movd %xmm9, %eax + movd %xmm10, %edx + movd %xmm11, %ecx + pshufd $0x39, %xmm8, %xmm8 + pshufd $0x39, %xmm9, %xmm9 + pshufd $0x39, %xmm10, %xmm10 + pshufd $0x39, %xmm11, %xmm11 + movl %ebx, 20(%rdi) + movl %eax, 4(%rdi) + movl %edx, 52(%rdi) + movl %ecx, 36(%rdi) + movd %xmm8, %ecx + movd %xmm9, %ebx + movd %xmm10, %eax + movd %xmm11, %edx + pshufd $0x39, %xmm8, %xmm8 + pshufd $0x39, %xmm9, %xmm9 + pshufd $0x39, %xmm10, %xmm10 + pshufd $0x39, %xmm11, %xmm11 + movl %ecx, 40(%rdi) + movl %ebx, 24(%rdi) + movl %eax, 8(%rdi) + movl %edx, 56(%rdi) + movd %xmm8, %edx + movd %xmm9, %ecx + movd %xmm10, %ebx + movd %xmm11, %eax + movl %edx, 60(%rdi) + movl %ecx, 44(%rdi) + movl %ebx, 28(%rdi) + movl %eax, 12(%rdi) + + # re-shuffle 2nd block back + movd %xmm12, %eax + movd %xmm13, %edx + movd %xmm14, %ecx + movd %xmm15, %ebx + pshufd $0x39, %xmm12, %xmm12 + pshufd $0x39, %xmm13, %xmm13 + pshufd $0x39, %xmm14, %xmm14 + pshufd $0x39, %xmm15, %xmm15 + movl %eax, 64(%rdi) + movl %edx, 112(%rdi) + movl %ecx, 96(%rdi) + movl %ebx, 80(%rdi) + movd %xmm12, %ebx + movd %xmm13, %eax + movd %xmm14, %edx + movd %xmm15, %ecx + pshufd $0x39, %xmm12, %xmm12 + pshufd $0x39, %xmm13, %xmm13 + pshufd $0x39, %xmm14, %xmm14 + pshufd $0x39, %xmm15, %xmm15 + movl %ebx, 84(%rdi) + movl %eax, 68(%rdi) + movl %edx, 116(%rdi) + movl %ecx, 100(%rdi) + movd %xmm12, %ecx + movd %xmm13, %ebx + movd %xmm14, %eax + movd %xmm15, %edx + pshufd $0x39, %xmm12, %xmm12 + pshufd $0x39, %xmm13, %xmm13 + pshufd $0x39, %xmm14, %xmm14 + pshufd $0x39, %xmm15, %xmm15 + movl %ecx, 104(%rdi) + movl %ebx, 88(%rdi) + movl %eax, 72(%rdi) + movl %edx, 120(%rdi) + movd %xmm12, %edx + movd %xmm13, %ecx + movd %xmm14, %ebx + movd %xmm15, %eax + movl %edx, 124(%rdi) + movl %ecx, 108(%rdi) + movl %ebx, 92(%rdi) + movl %eax, 76(%rdi) + + scrypt_core_cleanup() + ret + + addq $392, %rsp +#if defined(WIN64) + popq %rsi + popq %rdi + movdqa 8(%rsp), %xmm6 + movdqa 24(%rsp), %xmm7 + movdqa 40(%rsp), %xmm8 + movdqa 56(%rsp), %xmm9 + movdqa 72(%rsp), %xmm10 + movdqa 88(%rsp), %xmm11 + movdqa 104(%rsp), %xmm12 + movdqa 120(%rsp), %xmm13 + movdqa 136(%rsp), %xmm14 + movdqa 152(%rsp), %xmm15 + addq $176, %rsp +#endif + popq %rbp + popq %rbx + ret + +#endif \ No newline at end of file diff --git a/src/scrypt.h b/src/scrypt.h index 17afd85..f18117c 100644 --- a/src/scrypt.h +++ b/src/scrypt.h @@ -1,5 +1,5 @@ -#ifndef SCRYPT_MINE_H -#define SCRYPT_MINE_H +#ifndef SCRYPT_H +#define SCRYPT_H #include #include @@ -12,4 +12,4 @@ uint256 scrypt_salted_hash(const void* input, size_t inputlen, const void* salt, uint256 scrypt_hash(const void* input, size_t inputlen); uint256 scrypt_blockhash(const void* input); -#endif // SCRYPT_MINE_H +#endif // SCRYPT_H diff --git a/src/scrypt_mine.cpp b/src/scrypt_mine.cpp deleted file mode 100644 index afca59d..0000000 --- a/src/scrypt_mine.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/*- - * Copyright 2009 Colin Percival, 2011 ArtForz, 2011 pooler, 2013 Balthazar - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file was originally written by Colin Percival as part of the Tarsnap - * online backup system. - */ - -#include -#include -#include - -#include "scrypt_mine.h" -#include "pbkdf2.h" - -#include "util.h" -#include "net.h" - -extern bool fShutdown; -extern bool fGenerateBitcoins; - -extern CBlockIndex* pindexBest; -extern uint32_t nTransactionsUpdated; - - -#if defined(__x86_64__) - -#define SCRYPT_3WAY -#define SCRYPT_BUFFER_SIZE (3 * 131072 + 63) - -extern "C" int scrypt_best_throughput(); -extern "C" void scrypt_core(uint32_t *X, uint32_t *V); -extern "C" void scrypt_core_2way(uint32_t *X, uint32_t *Y, uint32_t *V); -extern "C" void scrypt_core_3way(uint32_t *X, uint32_t *Y, uint32_t *Z, uint32_t *V); - -#elif defined(__i386__) - -#define SCRYPT_BUFFER_SIZE (131072 + 63) - -extern "C" void scrypt_core(uint32_t *X, uint32_t *V); - -#endif - -void *scrypt_buffer_alloc() { - return malloc(SCRYPT_BUFFER_SIZE); -} - -void scrypt_buffer_free(void *scratchpad) -{ - free(scratchpad); -} - -/* cpu and memory intensive function to transform a 80 byte buffer into a 32 byte output - scratchpad size needs to be at least 63 + (128 * r * p) + (256 * r + 64) + (128 * r * N) bytes - r = 1, p = 1, N = 1024 - */ - -static void scrypt(const void* input, size_t inputlen, uint32_t *res, void *scratchpad) -{ - uint32_t *V; - uint32_t X[32]; - V = (uint32_t *)(((uintptr_t)(scratchpad) + 63) & ~ (uintptr_t)(63)); - - PBKDF2_SHA256((const uint8_t*)input, inputlen, (const uint8_t*)input, sizeof(block_header), 1, (uint8_t *)X, 128); - - scrypt_core(X, V); - - PBKDF2_SHA256((const uint8_t*)input, inputlen, (uint8_t *)X, 128, 1, (uint8_t*)res, 32); -} - -void scrypt_hash(const void* input, size_t inputlen, uint32_t *res, void *scratchpad) -{ - return scrypt(input, inputlen, res, scratchpad); -} - -#ifdef SCRYPT_3WAY -static void scrypt_2way(const void *input1, const void *input2, size_t input1len, size_t input2len, uint32_t *res1, uint32_t *res2, void *scratchpad) -{ - uint32_t *V; - uint32_t X[32], Y[32]; - V = (uint32_t *)(((uintptr_t)(scratchpad) + 63) & ~ (uintptr_t)(63)); - - PBKDF2_SHA256((const uint8_t*)input1, input1len, (const uint8_t*)input1, input1len, 1, (uint8_t *)X, 128); - PBKDF2_SHA256((const uint8_t*)input2, input2len, (const uint8_t*)input2, input2len, 1, (uint8_t *)Y, 128); - - scrypt_core_2way(X, Y, V); - - PBKDF2_SHA256((const uint8_t*)input1, input1len, (uint8_t *)X, 128, 1, (uint8_t*)res1, 32); - PBKDF2_SHA256((const uint8_t*)input2, input2len, (uint8_t *)Y, 128, 1, (uint8_t*)res2, 32); -} - -static void scrypt_3way(const void *input1, const void *input2, const void *input3, - size_t input1len, size_t input2len, size_t input3len, uint32_t *res1, uint32_t *res2, uint32_t *res3, - void *scratchpad) -{ - uint32_t *V; - uint32_t X[32], Y[32], Z[32]; - V = (uint32_t *)(((uintptr_t)(scratchpad) + 63) & ~ (uintptr_t)(63)); - - PBKDF2_SHA256((const uint8_t*)input1, input1len, (const uint8_t*)input1, input1len, 1, (uint8_t *)X, 128); - PBKDF2_SHA256((const uint8_t*)input2, input2len, (const uint8_t*)input2, input2len, 1, (uint8_t *)Y, 128); - PBKDF2_SHA256((const uint8_t*)input3, input3len, (const uint8_t*)input3, input3len, 1, (uint8_t *)Z, 128); - - scrypt_core_3way(X, Y, Z, V); - - PBKDF2_SHA256((const uint8_t*)input1, input1len, (uint8_t *)X, 128, 1, (uint8_t*)res1, 32); - PBKDF2_SHA256((const uint8_t*)input2, input2len, (uint8_t *)Y, 128, 1, (uint8_t*)res2, 32); - PBKDF2_SHA256((const uint8_t*)input3, input3len, (uint8_t *)Z, 128, 1, (uint8_t*)res3, 32); -} -#endif - -unsigned int scanhash_scrypt(block_header *pdata, void *scratchbuf, - uint32_t max_nonce, uint32_t &hash_count, - void *result, block_header *res_header) -{ - hash_count = 0; - block_header data = *pdata; - uint32_t hash[8]; - unsigned char *hashc = (unsigned char *) &hash; - -#ifdef SCRYPT_3WAY - block_header data2 = *pdata; - uint32_t hash2[8]; - unsigned char *hashc2 = (unsigned char *) &hash2; - - block_header data3 = *pdata; - uint32_t hash3[8]; - unsigned char *hashc3 = (unsigned char *) &hash3; - - int throughput = scrypt_best_throughput(); -#endif - - uint32_t n = 0; - - while (true) { - - data.nonce = n++; - -#ifdef SCRYPT_3WAY - if (throughput >= 2 && n < max_nonce) { - data2.nonce = n++; - if(throughput >= 3) - { - data3.nonce = n++; - scrypt_3way(&data, &data2, &data3, 80, 80, 80, hash, hash2, hash3, scratchbuf); - hash_count += 3; - - if (hashc3[31] == 0 && hashc3[30] == 0) { - memcpy(result, hash3, 32); - *res_header = data3; - - return data3.nonce; - } - } - else - { - scrypt_2way(&data, &data2, 80, 80, hash, hash2, scratchbuf); - hash_count += 2; - } - - if (hashc2[31] == 0 && hashc2[30] == 0) { - memcpy(result, hash2, 32); - - return data2.nonce; - } - } else { - scrypt(&data, 80, hash, scratchbuf); - hash_count += 1; - } -#else - scrypt(&data, 80, hash, scratchbuf); - hash_count += 1; -#endif - if (hashc[31] == 0 && hashc[30] == 0) { - memcpy(result, hash, 32); - - return data.nonce; - } - - if (n >= max_nonce) { - hash_count = 0xffff + 1; - break; - } - } - - return (unsigned int) -1; -} diff --git a/src/scrypt_mine.h b/src/scrypt_mine.h deleted file mode 100644 index e316e28..0000000 --- a/src/scrypt_mine.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef SCRYPT_MINE_H -#define SCRYPT_MINE_H - -#include -#include - -#include "util.h" -#include "net.h" - -typedef struct -{ - unsigned int version; - uint256 prev_block; - uint256 merkle_root; - unsigned int timestamp; - unsigned int bits; - unsigned int nonce; - -} block_header; - -void *scrypt_buffer_alloc(); -void scrypt_buffer_free(void *scratchpad); - -unsigned int scanhash_scrypt(block_header *pdata, void *scratchbuf, - uint32_t max_nonce, uint32_t &hash_count, - void *result, block_header *res_header); - -void scrypt_hash(const void* input, size_t inputlen, uint32_t *res, void *scratchpad); - -#endif // SCRYPT_MINE_H diff --git a/src/serialize.h b/src/serialize.h index 012918d..68ec092 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -1,1133 +1,1148 @@ -// Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2012 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_SERIALIZE_H -#define BITCOIN_SERIALIZE_H - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "allocators.h" -#include "version.h" - -typedef long long int64; -typedef unsigned long long uint64; - -class CScript; -class CDataStream; -class CAutoFile; -static const unsigned int MAX_SIZE = 0x02000000; - -// Used to bypass the rule against non-const reference to temporary -// where it makes sense with wrappers such as CFlatData or CTxDB -template -inline T& REF(const T& val) -{ - return const_cast(val); -} - -///////////////////////////////////////////////////////////////// -// -// Templates for serializing to anything that looks like a stream, -// i.e. anything that supports .read(char*, int) and .write(char*, int) -// - -enum -{ - // primary actions - SER_NETWORK = (1 << 0), - SER_DISK = (1 << 1), - SER_GETHASH = (1 << 2), - - // modifiers - SER_SKIPSIG = (1 << 16), - SER_BLOCKHEADERONLY = (1 << 17), -}; - -#define IMPLEMENT_SERIALIZE(statements) \ - unsigned int GetSerializeSize(int nType, int nVersion) const \ - { \ - CSerActionGetSerializeSize ser_action; \ - const bool fGetSize = true; \ - const bool fWrite = false; \ - const bool fRead = false; \ - unsigned int nSerSize = 0; \ - ser_streamplaceholder s; \ - assert(fGetSize||fWrite||fRead); /* suppress warning */ \ - s.nType = nType; \ - s.nVersion = nVersion; \ - {statements} \ - return nSerSize; \ - } \ - template \ - void Serialize(Stream& s, int nType, int nVersion) const \ - { \ - CSerActionSerialize ser_action; \ - const bool fGetSize = false; \ - const bool fWrite = true; \ - const bool fRead = false; \ - unsigned int nSerSize = 0; \ - assert(fGetSize||fWrite||fRead); /* suppress warning */ \ - {statements} \ - } \ - template \ - void Unserialize(Stream& s, int nType, int nVersion) \ - { \ - CSerActionUnserialize ser_action; \ - const bool fGetSize = false; \ - const bool fWrite = false; \ - const bool fRead = true; \ - unsigned int nSerSize = 0; \ - assert(fGetSize||fWrite||fRead); /* suppress warning */ \ - {statements} \ - } - -#define READWRITE(obj) (nSerSize += ::SerReadWrite(s, (obj), nType, nVersion, ser_action)) - - - - - - -// -// Basic types -// -#define WRITEDATA(s, obj) s.write((char*)&(obj), sizeof(obj)) -#define READDATA(s, obj) s.read((char*)&(obj), sizeof(obj)) - -inline unsigned int GetSerializeSize(char a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(signed char a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(unsigned char a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(signed short a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(unsigned short a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(signed int a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(unsigned int a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(signed long a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(unsigned long a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(int64 a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(uint64 a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(float a, int, int=0) { return sizeof(a); } -inline unsigned int GetSerializeSize(double a, int, int=0) { return sizeof(a); } - -template inline void Serialize(Stream& s, char a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, signed char a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, unsigned char a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, signed short a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, unsigned short a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, signed int a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, unsigned int a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, signed long a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, unsigned long a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, int64 a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, uint64 a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, float a, int, int=0) { WRITEDATA(s, a); } -template inline void Serialize(Stream& s, double a, int, int=0) { WRITEDATA(s, a); } - -template inline void Unserialize(Stream& s, char& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, signed char& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, unsigned char& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, signed short& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, unsigned short& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, signed int& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, unsigned int& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, signed long& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, unsigned long& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, int64& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, uint64& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, float& a, int, int=0) { READDATA(s, a); } -template inline void Unserialize(Stream& s, double& a, int, int=0) { READDATA(s, a); } - -inline unsigned int GetSerializeSize(bool a, int, int=0) { return sizeof(char); } -template inline void Serialize(Stream& s, bool a, int, int=0) { char f=a; WRITEDATA(s, f); } -template inline void Unserialize(Stream& s, bool& a, int, int=0) { char f; READDATA(s, f); a=f; } - - -#ifndef THROW_WITH_STACKTRACE -#define THROW_WITH_STACKTRACE(exception) \ -{ \ - LogStackTrace(); \ - throw (exception); \ -} -void LogStackTrace(); -#endif - -// -// Compact size -// size < 253 -- 1 byte -// size <= USHRT_MAX -- 3 bytes (253 + 2 bytes) -// size <= UINT_MAX -- 5 bytes (254 + 4 bytes) -// size > UINT_MAX -- 9 bytes (255 + 8 bytes) -// -inline unsigned int GetSizeOfCompactSize(uint64 nSize) -{ - if (nSize < 253) return sizeof(unsigned char); - else if (nSize <= std::numeric_limits::max()) return sizeof(unsigned char) + sizeof(unsigned short); - else if (nSize <= std::numeric_limits::max()) return sizeof(unsigned char) + sizeof(unsigned int); - else return sizeof(unsigned char) + sizeof(uint64); -} - -template -void WriteCompactSize(Stream& os, uint64 nSize) -{ - if (nSize < 253) - { - unsigned char chSize = nSize; - WRITEDATA(os, chSize); - } - else if (nSize <= std::numeric_limits::max()) - { - unsigned char chSize = 253; - unsigned short xSize = nSize; - WRITEDATA(os, chSize); - WRITEDATA(os, xSize); - } - else if (nSize <= std::numeric_limits::max()) - { - unsigned char chSize = 254; - unsigned int xSize = nSize; - WRITEDATA(os, chSize); - WRITEDATA(os, xSize); - } - else - { - unsigned char chSize = 255; - uint64 xSize = nSize; - WRITEDATA(os, chSize); - WRITEDATA(os, xSize); - } - return; -} - -template -uint64 ReadCompactSize(Stream& is) -{ - unsigned char chSize; - READDATA(is, chSize); - uint64 nSizeRet = 0; - if (chSize < 253) - { - nSizeRet = chSize; - } - else if (chSize == 253) - { - unsigned short xSize; - READDATA(is, xSize); - nSizeRet = xSize; - } - else if (chSize == 254) - { - unsigned int xSize; - READDATA(is, xSize); - nSizeRet = xSize; - } - else - { - uint64 xSize; - READDATA(is, xSize); - nSizeRet = xSize; - } - if (nSizeRet > (uint64)MAX_SIZE) - THROW_WITH_STACKTRACE(std::ios_base::failure("ReadCompactSize() : size too large")); - return nSizeRet; -} - - - -#define FLATDATA(obj) REF(CFlatData((char*)&(obj), (char*)&(obj) + sizeof(obj))) - -/** Wrapper for serializing arrays and POD. - */ -class CFlatData -{ -protected: - char* pbegin; - char* pend; -public: - CFlatData(void* pbeginIn, void* pendIn) : pbegin((char*)pbeginIn), pend((char*)pendIn) { } - char* begin() { return pbegin; } - const char* begin() const { return pbegin; } - char* end() { return pend; } - const char* end() const { return pend; } - - unsigned int GetSerializeSize(int, int=0) const - { - return pend - pbegin; - } - - template - void Serialize(Stream& s, int, int=0) const - { - s.write(pbegin, pend - pbegin); - } - - template - void Unserialize(Stream& s, int, int=0) - { - s.read(pbegin, pend - pbegin); - } -}; - -// -// Forward declarations -// - -// string -template unsigned int GetSerializeSize(const std::basic_string& str, int, int=0); -template void Serialize(Stream& os, const std::basic_string& str, int, int=0); -template void Unserialize(Stream& is, std::basic_string& str, int, int=0); - -// vector -template unsigned int GetSerializeSize_impl(const std::vector& v, int nType, int nVersion, const boost::true_type&); -template unsigned int GetSerializeSize_impl(const std::vector& v, int nType, int nVersion, const boost::false_type&); -template inline unsigned int GetSerializeSize(const std::vector& v, int nType, int nVersion); -template void Serialize_impl(Stream& os, const std::vector& v, int nType, int nVersion, const boost::true_type&); -template void Serialize_impl(Stream& os, const std::vector& v, int nType, int nVersion, const boost::false_type&); -template inline void Serialize(Stream& os, const std::vector& v, int nType, int nVersion); -template void Unserialize_impl(Stream& is, std::vector& v, int nType, int nVersion, const boost::true_type&); -template void Unserialize_impl(Stream& is, std::vector& v, int nType, int nVersion, const boost::false_type&); -template inline void Unserialize(Stream& is, std::vector& v, int nType, int nVersion); - -// others derived from vector -extern inline unsigned int GetSerializeSize(const CScript& v, int nType, int nVersion); -template void Serialize(Stream& os, const CScript& v, int nType, int nVersion); -template void Unserialize(Stream& is, CScript& v, int nType, int nVersion); - -// pair -template unsigned int GetSerializeSize(const std::pair& item, int nType, int nVersion); -template void Serialize(Stream& os, const std::pair& item, int nType, int nVersion); -template void Unserialize(Stream& is, std::pair& item, int nType, int nVersion); - -// 3 tuple -template unsigned int GetSerializeSize(const boost::tuple& item, int nType, int nVersion); -template void Serialize(Stream& os, const boost::tuple& item, int nType, int nVersion); -template void Unserialize(Stream& is, boost::tuple& item, int nType, int nVersion); - -// 4 tuple -template unsigned int GetSerializeSize(const boost::tuple& item, int nType, int nVersion); -template void Serialize(Stream& os, const boost::tuple& item, int nType, int nVersion); -template void Unserialize(Stream& is, boost::tuple& item, int nType, int nVersion); - -// map -template unsigned int GetSerializeSize(const std::map& m, int nType, int nVersion); -template void Serialize(Stream& os, const std::map& m, int nType, int nVersion); -template void Unserialize(Stream& is, std::map& m, int nType, int nVersion); - -// set -template unsigned int GetSerializeSize(const std::set& m, int nType, int nVersion); -template void Serialize(Stream& os, const std::set& m, int nType, int nVersion); -template void Unserialize(Stream& is, std::set& m, int nType, int nVersion); - - - - - -// -// If none of the specialized versions above matched, default to calling member function. -// "int nType" is changed to "long nType" to keep from getting an ambiguous overload error. -// The compiler will only cast int to long if none of the other templates matched. -// Thanks to Boost serialization for this idea. -// -template -inline unsigned int GetSerializeSize(const T& a, long nType, int nVersion) -{ - return a.GetSerializeSize((int)nType, nVersion); -} - -template -inline void Serialize(Stream& os, const T& a, long nType, int nVersion) -{ - a.Serialize(os, (int)nType, nVersion); -} - -template -inline void Unserialize(Stream& is, T& a, long nType, int nVersion) -{ - a.Unserialize(is, (int)nType, nVersion); -} - - - - - -// -// string -// -template -unsigned int GetSerializeSize(const std::basic_string& str, int, int) -{ - return GetSizeOfCompactSize(str.size()) + str.size() * sizeof(str[0]); -} - -template -void Serialize(Stream& os, const std::basic_string& str, int, int) -{ - WriteCompactSize(os, str.size()); - if (!str.empty()) - os.write((char*)&str[0], str.size() * sizeof(str[0])); -} - -template -void Unserialize(Stream& is, std::basic_string& str, int, int) -{ - unsigned int nSize = ReadCompactSize(is); - str.resize(nSize); - if (nSize != 0) - is.read((char*)&str[0], nSize * sizeof(str[0])); -} - - - -// -// vector -// -template -unsigned int GetSerializeSize_impl(const std::vector& v, int nType, int nVersion, const boost::true_type&) -{ - return (GetSizeOfCompactSize(v.size()) + v.size() * sizeof(T)); -} - -template -unsigned int GetSerializeSize_impl(const std::vector& v, int nType, int nVersion, const boost::false_type&) -{ - unsigned int nSize = GetSizeOfCompactSize(v.size()); - for (typename std::vector::const_iterator vi = v.begin(); vi != v.end(); ++vi) - nSize += GetSerializeSize((*vi), nType, nVersion); - return nSize; -} - -template -inline unsigned int GetSerializeSize(const std::vector& v, int nType, int nVersion) -{ - return GetSerializeSize_impl(v, nType, nVersion, boost::is_fundamental()); -} - - -template -void Serialize_impl(Stream& os, const std::vector& v, int nType, int nVersion, const boost::true_type&) -{ - WriteCompactSize(os, v.size()); - if (!v.empty()) - os.write((char*)&v[0], v.size() * sizeof(T)); -} - -template -void Serialize_impl(Stream& os, const std::vector& v, int nType, int nVersion, const boost::false_type&) -{ - WriteCompactSize(os, v.size()); - for (typename std::vector::const_iterator vi = v.begin(); vi != v.end(); ++vi) - ::Serialize(os, (*vi), nType, nVersion); -} - -template -inline void Serialize(Stream& os, const std::vector& v, int nType, int nVersion) -{ - Serialize_impl(os, v, nType, nVersion, boost::is_fundamental()); -} - - -template -void Unserialize_impl(Stream& is, std::vector& v, int nType, int nVersion, const boost::true_type&) -{ - // Limit size per read so bogus size value won't cause out of memory - v.clear(); - unsigned int nSize = ReadCompactSize(is); - unsigned int i = 0; - while (i < nSize) - { - unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T))); - v.resize(i + blk); - is.read((char*)&v[i], blk * sizeof(T)); - i += blk; - } -} - -template -void Unserialize_impl(Stream& is, std::vector& v, int nType, int nVersion, const boost::false_type&) -{ - v.clear(); - unsigned int nSize = ReadCompactSize(is); - unsigned int i = 0; - unsigned int nMid = 0; - while (nMid < nSize) - { - nMid += 5000000 / sizeof(T); - if (nMid > nSize) - nMid = nSize; - v.resize(nMid); - for (; i < nMid; i++) - Unserialize(is, v[i], nType, nVersion); - } -} - -template -inline void Unserialize(Stream& is, std::vector& v, int nType, int nVersion) -{ - Unserialize_impl(is, v, nType, nVersion, boost::is_fundamental()); -} - - - -// -// others derived from vector -// -inline unsigned int GetSerializeSize(const CScript& v, int nType, int nVersion) -{ - return GetSerializeSize((const std::vector&)v, nType, nVersion); -} - -template -void Serialize(Stream& os, const CScript& v, int nType, int nVersion) -{ - Serialize(os, (const std::vector&)v, nType, nVersion); -} - -template -void Unserialize(Stream& is, CScript& v, int nType, int nVersion) -{ - Unserialize(is, (std::vector&)v, nType, nVersion); -} - - - -// -// pair -// -template -unsigned int GetSerializeSize(const std::pair& item, int nType, int nVersion) -{ - return GetSerializeSize(item.first, nType, nVersion) + GetSerializeSize(item.second, nType, nVersion); -} - -template -void Serialize(Stream& os, const std::pair& item, int nType, int nVersion) -{ - Serialize(os, item.first, nType, nVersion); - Serialize(os, item.second, nType, nVersion); -} - -template -void Unserialize(Stream& is, std::pair& item, int nType, int nVersion) -{ - Unserialize(is, item.first, nType, nVersion); - Unserialize(is, item.second, nType, nVersion); -} - - - -// -// 3 tuple -// -template -unsigned int GetSerializeSize(const boost::tuple& item, int nType, int nVersion) -{ - unsigned int nSize = 0; - nSize += GetSerializeSize(boost::get<0>(item), nType, nVersion); - nSize += GetSerializeSize(boost::get<1>(item), nType, nVersion); - nSize += GetSerializeSize(boost::get<2>(item), nType, nVersion); - return nSize; -} - -template -void Serialize(Stream& os, const boost::tuple& item, int nType, int nVersion) -{ - Serialize(os, boost::get<0>(item), nType, nVersion); - Serialize(os, boost::get<1>(item), nType, nVersion); - Serialize(os, boost::get<2>(item), nType, nVersion); -} - -template -void Unserialize(Stream& is, boost::tuple& item, int nType, int nVersion) -{ - Unserialize(is, boost::get<0>(item), nType, nVersion); - Unserialize(is, boost::get<1>(item), nType, nVersion); - Unserialize(is, boost::get<2>(item), nType, nVersion); -} - - - -// -// 4 tuple -// -template -unsigned int GetSerializeSize(const boost::tuple& item, int nType, int nVersion) -{ - unsigned int nSize = 0; - nSize += GetSerializeSize(boost::get<0>(item), nType, nVersion); - nSize += GetSerializeSize(boost::get<1>(item), nType, nVersion); - nSize += GetSerializeSize(boost::get<2>(item), nType, nVersion); - nSize += GetSerializeSize(boost::get<3>(item), nType, nVersion); - return nSize; -} - -template -void Serialize(Stream& os, const boost::tuple& item, int nType, int nVersion) -{ - Serialize(os, boost::get<0>(item), nType, nVersion); - Serialize(os, boost::get<1>(item), nType, nVersion); - Serialize(os, boost::get<2>(item), nType, nVersion); - Serialize(os, boost::get<3>(item), nType, nVersion); -} - -template -void Unserialize(Stream& is, boost::tuple& item, int nType, int nVersion) -{ - Unserialize(is, boost::get<0>(item), nType, nVersion); - Unserialize(is, boost::get<1>(item), nType, nVersion); - Unserialize(is, boost::get<2>(item), nType, nVersion); - Unserialize(is, boost::get<3>(item), nType, nVersion); -} - - - -// -// map -// -template -unsigned int GetSerializeSize(const std::map& m, int nType, int nVersion) -{ - unsigned int nSize = GetSizeOfCompactSize(m.size()); - for (typename std::map::const_iterator mi = m.begin(); mi != m.end(); ++mi) - nSize += GetSerializeSize((*mi), nType, nVersion); - return nSize; -} - -template -void Serialize(Stream& os, const std::map& m, int nType, int nVersion) -{ - WriteCompactSize(os, m.size()); - for (typename std::map::const_iterator mi = m.begin(); mi != m.end(); ++mi) - Serialize(os, (*mi), nType, nVersion); -} - -template -void Unserialize(Stream& is, std::map& m, int nType, int nVersion) -{ - m.clear(); - unsigned int nSize = ReadCompactSize(is); - typename std::map::iterator mi = m.begin(); - for (unsigned int i = 0; i < nSize; i++) - { - std::pair item; - Unserialize(is, item, nType, nVersion); - mi = m.insert(mi, item); - } -} - - - -// -// set -// -template -unsigned int GetSerializeSize(const std::set& m, int nType, int nVersion) -{ - unsigned int nSize = GetSizeOfCompactSize(m.size()); - for (typename std::set::const_iterator it = m.begin(); it != m.end(); ++it) - nSize += GetSerializeSize((*it), nType, nVersion); - return nSize; -} - -template -void Serialize(Stream& os, const std::set& m, int nType, int nVersion) -{ - WriteCompactSize(os, m.size()); - for (typename std::set::const_iterator it = m.begin(); it != m.end(); ++it) - Serialize(os, (*it), nType, nVersion); -} - -template -void Unserialize(Stream& is, std::set& m, int nType, int nVersion) -{ - m.clear(); - unsigned int nSize = ReadCompactSize(is); - typename std::set::iterator it = m.begin(); - for (unsigned int i = 0; i < nSize; i++) - { - K key; - Unserialize(is, key, nType, nVersion); - it = m.insert(it, key); - } -} - - - -// -// Support for IMPLEMENT_SERIALIZE and READWRITE macro -// -class CSerActionGetSerializeSize { }; -class CSerActionSerialize { }; -class CSerActionUnserialize { }; - -template -inline unsigned int SerReadWrite(Stream& s, const T& obj, int nType, int nVersion, CSerActionGetSerializeSize ser_action) -{ - return ::GetSerializeSize(obj, nType, nVersion); -} - -template -inline unsigned int SerReadWrite(Stream& s, const T& obj, int nType, int nVersion, CSerActionSerialize ser_action) -{ - ::Serialize(s, obj, nType, nVersion); - return 0; -} - -template -inline unsigned int SerReadWrite(Stream& s, T& obj, int nType, int nVersion, CSerActionUnserialize ser_action) -{ - ::Unserialize(s, obj, nType, nVersion); - return 0; -} - -struct ser_streamplaceholder -{ - int nType; - int nVersion; -}; - - -/** Double ended buffer combining vector and stream-like interfaces. - * - * >> and << read and write unformatted data using the above serialization templates. - * Fills with data in linear time; some stringstream implementations take N^2 time. - */ -class CDataStream -{ -protected: - typedef std::vector > vector_type; - vector_type vch; - unsigned int nReadPos; - short state; - short exceptmask; -public: - int nType; - int nVersion; - - typedef vector_type::allocator_type allocator_type; - typedef vector_type::size_type size_type; - typedef vector_type::difference_type difference_type; - typedef vector_type::reference reference; - typedef vector_type::const_reference const_reference; - typedef vector_type::value_type value_type; - typedef vector_type::iterator iterator; - typedef vector_type::const_iterator const_iterator; - typedef vector_type::reverse_iterator reverse_iterator; - - explicit CDataStream(int nTypeIn, int nVersionIn) - { - Init(nTypeIn, nVersionIn); - } - - CDataStream(const_iterator pbegin, const_iterator pend, int nTypeIn, int nVersionIn) : vch(pbegin, pend) - { - Init(nTypeIn, nVersionIn); - } - -#if !defined(_MSC_VER) || _MSC_VER >= 1300 - CDataStream(const char* pbegin, const char* pend, int nTypeIn, int nVersionIn) : vch(pbegin, pend) - { - Init(nTypeIn, nVersionIn); - } -#endif - - CDataStream(const vector_type& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end()) - { - Init(nTypeIn, nVersionIn); - } - - CDataStream(const std::vector& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end()) - { - Init(nTypeIn, nVersionIn); - } - - CDataStream(const std::vector& vchIn, int nTypeIn, int nVersionIn) : vch((char*)&vchIn.begin()[0], (char*)&vchIn.end()[0]) - { - Init(nTypeIn, nVersionIn); - } - - void Init(int nTypeIn, int nVersionIn) - { - nReadPos = 0; - nType = nTypeIn; - nVersion = nVersionIn; - state = 0; - exceptmask = std::ios::badbit | std::ios::failbit; - } - - CDataStream& operator+=(const CDataStream& b) - { - vch.insert(vch.end(), b.begin(), b.end()); - return *this; - } - - friend CDataStream operator+(const CDataStream& a, const CDataStream& b) - { - CDataStream ret = a; - ret += b; - return (ret); - } - - std::string str() const - { - return (std::string(begin(), end())); - } - - - // - // Vector subset - // - const_iterator begin() const { return vch.begin() + nReadPos; } - iterator begin() { return vch.begin() + nReadPos; } - const_iterator end() const { return vch.end(); } - iterator end() { return vch.end(); } - size_type size() const { return vch.size() - nReadPos; } - bool empty() const { return vch.size() == nReadPos; } - void resize(size_type n, value_type c=0) { vch.resize(n + nReadPos, c); } - void reserve(size_type n) { vch.reserve(n + nReadPos); } - const_reference operator[](size_type pos) const { return vch[pos + nReadPos]; } - reference operator[](size_type pos) { return vch[pos + nReadPos]; } - void clear() { vch.clear(); nReadPos = 0; } - iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); } - void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); } - - void insert(iterator it, const_iterator first, const_iterator last) - { - assert(last - first >= 0); - if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos) - { - // special case for inserting at the front when there's room - nReadPos -= (last - first); - memcpy(&vch[nReadPos], &first[0], last - first); - } - else - vch.insert(it, first, last); - } - -#if !defined(MAC_OSX) - void insert(iterator it, std::vector::const_iterator first, std::vector::const_iterator last) - { - assert(last - first >= 0); - if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos) - { - // special case for inserting at the front when there's room - nReadPos -= (last - first); - memcpy(&vch[nReadPos], &first[0], last - first); - } - else - vch.insert(it, first, last); - } -#endif - -#if !defined(_MSC_VER) || _MSC_VER >= 1300 - void insert(iterator it, const char* first, const char* last) - { - assert(last - first >= 0); - if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos) - { - // special case for inserting at the front when there's room - nReadPos -= (last - first); - memcpy(&vch[nReadPos], &first[0], last - first); - } - else - vch.insert(it, first, last); - } -#endif - - iterator erase(iterator it) - { - if (it == vch.begin() + nReadPos) - { - // special case for erasing from the front - if (++nReadPos >= vch.size()) - { - // whenever we reach the end, we take the opportunity to clear the buffer - nReadPos = 0; - return vch.erase(vch.begin(), vch.end()); - } - return vch.begin() + nReadPos; - } - else - return vch.erase(it); - } - - iterator erase(iterator first, iterator last) - { - if (first == vch.begin() + nReadPos) - { - // special case for erasing from the front - if (last == vch.end()) - { - nReadPos = 0; - return vch.erase(vch.begin(), vch.end()); - } - else - { - nReadPos = (last - vch.begin()); - return last; - } - } - else - return vch.erase(first, last); - } - - inline void Compact() - { - vch.erase(vch.begin(), vch.begin() + nReadPos); - nReadPos = 0; - } - - bool Rewind(size_type n) - { - // Rewind by n characters if the buffer hasn't been compacted yet - if (n > nReadPos) - return false; - nReadPos -= n; - return true; - } - - - // - // Stream subset - // - void setstate(short bits, const char* psz) - { - state |= bits; - if (state & exceptmask) - THROW_WITH_STACKTRACE(std::ios_base::failure(psz)); - } - - bool eof() const { return size() == 0; } - bool fail() const { return state & (std::ios::badbit | std::ios::failbit); } - bool good() const { return !eof() && (state == 0); } - void clear(short n) { state = n; } // name conflict with vector clear() - short exceptions() { return exceptmask; } - short exceptions(short mask) { short prev = exceptmask; exceptmask = mask; setstate(0, "CDataStream"); return prev; } - CDataStream* rdbuf() { return this; } - int in_avail() { return size(); } - - void SetType(int n) { nType = n; } - int GetType() { return nType; } - void SetVersion(int n) { nVersion = n; } - int GetVersion() { return nVersion; } - void ReadVersion() { *this >> nVersion; } - void WriteVersion() { *this << nVersion; } - - CDataStream& read(char* pch, int nSize) - { - // Read from the beginning of the buffer - assert(nSize >= 0); - unsigned int nReadPosNext = nReadPos + nSize; - if (nReadPosNext >= vch.size()) - { - if (nReadPosNext > vch.size()) - { - setstate(std::ios::failbit, "CDataStream::read() : end of data"); - memset(pch, 0, nSize); - nSize = vch.size() - nReadPos; - } - memcpy(pch, &vch[nReadPos], nSize); - nReadPos = 0; - vch.clear(); - return (*this); - } - memcpy(pch, &vch[nReadPos], nSize); - nReadPos = nReadPosNext; - return (*this); - } - - CDataStream& ignore(int nSize) - { - // Ignore from the beginning of the buffer - assert(nSize >= 0); - unsigned int nReadPosNext = nReadPos + nSize; - if (nReadPosNext >= vch.size()) - { - if (nReadPosNext > vch.size()) - { - setstate(std::ios::failbit, "CDataStream::ignore() : end of data"); - nSize = vch.size() - nReadPos; - } - nReadPos = 0; - vch.clear(); - return (*this); - } - nReadPos = nReadPosNext; - return (*this); - } - - CDataStream& write(const char* pch, int nSize) - { - // Write to the end of the buffer - assert(nSize >= 0); - vch.insert(vch.end(), pch, pch + nSize); - return (*this); - } - - template - void Serialize(Stream& s, int nType, int nVersion) const - { - // Special case: stream << stream concatenates like stream += stream - if (!vch.empty()) - s.write((char*)&vch[0], vch.size() * sizeof(vch[0])); - } - - template - unsigned int GetSerializeSize(const T& obj) - { - // Tells the size of the object if serialized to this stream - return ::GetSerializeSize(obj, nType, nVersion); - } - - template - CDataStream& operator<<(const T& obj) - { - // Serialize to this stream - ::Serialize(*this, obj, nType, nVersion); - return (*this); - } - - template - CDataStream& operator>>(T& obj) - { - // Unserialize from this stream - ::Unserialize(*this, obj, nType, nVersion); - return (*this); - } -}; - - - - - - - - - - -/** RAII wrapper for FILE*. - * - * Will automatically close the file when it goes out of scope if not null. - * If you're returning the file pointer, return file.release(). - * If you need to close the file early, use file.fclose() instead of fclose(file). - */ -class CAutoFile -{ -protected: - FILE* file; - short state; - short exceptmask; -public: - int nType; - int nVersion; - - CAutoFile(FILE* filenew, int nTypeIn, int nVersionIn) - { - file = filenew; - nType = nTypeIn; - nVersion = nVersionIn; - state = 0; - exceptmask = std::ios::badbit | std::ios::failbit; - } - - ~CAutoFile() - { - fclose(); - } - - void fclose() - { - if (file != NULL && file != stdin && file != stdout && file != stderr) - ::fclose(file); - file = NULL; - } - - FILE* release() { FILE* ret = file; file = NULL; return ret; } - operator FILE*() { return file; } - FILE* operator->() { return file; } - FILE& operator*() { return *file; } - FILE** operator&() { return &file; } - FILE* operator=(FILE* pnew) { return file = pnew; } - bool operator!() { return (file == NULL); } - - - // - // Stream subset - // - void setstate(short bits, const char* psz) - { - state |= bits; - if (state & exceptmask) - THROW_WITH_STACKTRACE(std::ios_base::failure(psz)); - } - - bool fail() const { return state & (std::ios::badbit | std::ios::failbit); } - bool good() const { return state == 0; } - void clear(short n = 0) { state = n; } - short exceptions() { return exceptmask; } - short exceptions(short mask) { short prev = exceptmask; exceptmask = mask; setstate(0, "CAutoFile"); return prev; } - - void SetType(int n) { nType = n; } - int GetType() { return nType; } - void SetVersion(int n) { nVersion = n; } - int GetVersion() { return nVersion; } - void ReadVersion() { *this >> nVersion; } - void WriteVersion() { *this << nVersion; } - - CAutoFile& read(char* pch, size_t nSize) - { - if (!file) - throw std::ios_base::failure("CAutoFile::read : file handle is NULL"); - if (fread(pch, 1, nSize, file) != nSize) - setstate(std::ios::failbit, feof(file) ? "CAutoFile::read : end of file" : "CAutoFile::read : fread failed"); - return (*this); - } - - CAutoFile& write(const char* pch, size_t nSize) - { - if (!file) - throw std::ios_base::failure("CAutoFile::write : file handle is NULL"); - if (fwrite(pch, 1, nSize, file) != nSize) - setstate(std::ios::failbit, "CAutoFile::write : write failed"); - return (*this); - } - - template - unsigned int GetSerializeSize(const T& obj) - { - // Tells the size of the object if serialized to this stream - return ::GetSerializeSize(obj, nType, nVersion); - } - - template - CAutoFile& operator<<(const T& obj) - { - // Serialize to this stream - if (!file) - throw std::ios_base::failure("CAutoFile::operator<< : file handle is NULL"); - ::Serialize(*this, obj, nType, nVersion); - return (*this); - } - - template - CAutoFile& operator>>(T& obj) - { - // Unserialize from this stream - if (!file) - throw std::ios_base::failure("CAutoFile::operator>> : file handle is NULL"); - ::Unserialize(*this, obj, nType, nVersion); - return (*this); - } -}; - -#endif +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2012 The Bitcoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef TRIANGLES_SERIALIZE_H +#define TRIANGLES_SERIALIZE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "allocators.h" +#include "version.h" + +class CAutoFile; +class CDataStream; +class CScript; + +static const unsigned int MAX_SIZE = 0x02000000; + +// Used to bypass the rule against non-const reference to temporary +// where it makes sense with wrappers such as CFlatData or CTxDB +template +inline T& REF(const T& val) +{ + return const_cast(val); +} + +///////////////////////////////////////////////////////////////// +// +// Templates for serializing to anything that looks like a stream, +// i.e. anything that supports .read(char*, int) and .write(char*, int) +// + +enum +{ + // primary actions + SER_NETWORK = (1 << 0), + SER_DISK = (1 << 1), + SER_GETHASH = (1 << 2), + + // modifiers + SER_SKIPSIG = (1 << 16), + SER_BLOCKHEADERONLY = (1 << 17), +}; + +#define IMPLEMENT_SERIALIZE(statements) \ + unsigned int GetSerializeSize(int nType, int nVersion) const \ + { \ + CSerActionGetSerializeSize ser_action; \ + const bool fGetSize = true; \ + const bool fWrite = false; \ + const bool fRead = false; \ + unsigned int nSerSize = 0; \ + ser_streamplaceholder s; \ + assert(fGetSize||fWrite||fRead); /* suppress warning */ \ + s.nType = nType; \ + s.nVersion = nVersion; \ + {statements} \ + return nSerSize; \ + } \ + template \ + void Serialize(Stream& s, int nType, int nVersion) const \ + { \ + CSerActionSerialize ser_action; \ + const bool fGetSize = false; \ + const bool fWrite = true; \ + const bool fRead = false; \ + unsigned int nSerSize = 0; \ + assert(fGetSize||fWrite||fRead); /* suppress warning */ \ + {statements} \ + } \ + template \ + void Unserialize(Stream& s, int nType, int nVersion) \ + { \ + CSerActionUnserialize ser_action; \ + const bool fGetSize = false; \ + const bool fWrite = false; \ + const bool fRead = true; \ + unsigned int nSerSize = 0; \ + assert(fGetSize||fWrite||fRead); /* suppress warning */ \ + {statements} \ + } + +#define READWRITE(obj) (nSerSize += ::SerReadWrite(s, (obj), nType, nVersion, ser_action)) + + + + + + +// +// Basic types +// +#define WRITEDATA(s, obj) s.write((char*)&(obj), sizeof(obj)) +#define READDATA(s, obj) s.read((char*)&(obj), sizeof(obj)) + +inline unsigned int GetSerializeSize(char a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(signed char a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(unsigned char a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(signed short a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(unsigned short a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(signed int a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(unsigned int a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(signed long a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(unsigned long a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(signed long long a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(unsigned long long a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(float a, int, int=0) { return sizeof(a); } +inline unsigned int GetSerializeSize(double a, int, int=0) { return sizeof(a); } + +template inline void Serialize(Stream& s, char a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, signed char a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, unsigned char a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, signed short a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, unsigned short a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, signed int a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, unsigned int a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, signed long a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, unsigned long a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, signed long long a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, unsigned long long a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, float a, int, int=0) { WRITEDATA(s, a); } +template inline void Serialize(Stream& s, double a, int, int=0) { WRITEDATA(s, a); } + +template inline void Unserialize(Stream& s, char& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, signed char& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, unsigned char& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, signed short& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, unsigned short& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, signed int& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, unsigned int& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, signed long& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, unsigned long& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, signed long long& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, unsigned long long& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, float& a, int, int=0) { READDATA(s, a); } +template inline void Unserialize(Stream& s, double& a, int, int=0) { READDATA(s, a); } + +inline unsigned int GetSerializeSize(bool a, int, int=0) { return sizeof(char); } +template inline void Serialize(Stream& s, bool a, int, int=0) { char f=a; WRITEDATA(s, f); } +template inline void Unserialize(Stream& s, bool& a, int, int=0) { char f; READDATA(s, f); a=f; } + + +#ifndef THROW_WITH_STACKTRACE +#define THROW_WITH_STACKTRACE(exception) \ +{ \ + LogStackTrace(); \ + throw (exception); \ +} +void LogStackTrace(); +#endif + +// +// Compact size +// size < 253 -- 1 byte +// size <= USHRT_MAX -- 3 bytes (253 + 2 bytes) +// size <= UINT_MAX -- 5 bytes (254 + 4 bytes) +// size > UINT_MAX -- 9 bytes (255 + 8 bytes) +// +inline unsigned int GetSizeOfCompactSize(uint64_t nSize) +{ + if (nSize < 253) return sizeof(unsigned char); + else if (nSize <= std::numeric_limits::max()) return sizeof(unsigned char) + sizeof(unsigned short); + else if (nSize <= std::numeric_limits::max()) return sizeof(unsigned char) + sizeof(unsigned int); + else return sizeof(unsigned char) + sizeof(uint64_t); +} + +template +void WriteCompactSize(Stream& os, uint64_t nSize) +{ + if (nSize < 253) + { + unsigned char chSize = nSize; + WRITEDATA(os, chSize); + } + else if (nSize <= std::numeric_limits::max()) + { + unsigned char chSize = 253; + unsigned short xSize = nSize; + WRITEDATA(os, chSize); + WRITEDATA(os, xSize); + } + else if (nSize <= std::numeric_limits::max()) + { + unsigned char chSize = 254; + unsigned int xSize = nSize; + WRITEDATA(os, chSize); + WRITEDATA(os, xSize); + } + else + { + unsigned char chSize = 255; + uint64_t xSize = nSize; + WRITEDATA(os, chSize); + WRITEDATA(os, xSize); + } + return; +} + +template +uint64_t ReadCompactSize(Stream& is) +{ + unsigned char chSize; + READDATA(is, chSize); + uint64_t nSizeRet = 0; + if (chSize < 253) + { + nSizeRet = chSize; + } + else if (chSize == 253) + { + unsigned short xSize; + READDATA(is, xSize); + nSizeRet = xSize; + } + else if (chSize == 254) + { + unsigned int xSize; + READDATA(is, xSize); + nSizeRet = xSize; + } + else + { + uint64_t xSize; + READDATA(is, xSize); + nSizeRet = xSize; + } + if (nSizeRet > (uint64_t)MAX_SIZE) + THROW_WITH_STACKTRACE(std::ios_base::failure("ReadCompactSize() : size too large")); + return nSizeRet; +} + + + +#define FLATDATA(obj) REF(CFlatData((char*)&(obj), (char*)&(obj) + sizeof(obj))) + +/** Wrapper for serializing arrays and POD. + */ +class CFlatData +{ +protected: + char* pbegin; + char* pend; +public: + CFlatData(void* pbeginIn, void* pendIn) : pbegin((char*)pbeginIn), pend((char*)pendIn) { } + char* begin() { return pbegin; } + const char* begin() const { return pbegin; } + char* end() { return pend; } + const char* end() const { return pend; } + + unsigned int GetSerializeSize(int, int=0) const + { + return pend - pbegin; + } + + template + void Serialize(Stream& s, int, int=0) const + { + s.write(pbegin, pend - pbegin); + } + + template + void Unserialize(Stream& s, int, int=0) + { + s.read(pbegin, pend - pbegin); + } +}; + +// +// Forward declarations +// + +// string +template unsigned int GetSerializeSize(const std::basic_string& str, int, int=0); +template void Serialize(Stream& os, const std::basic_string& str, int, int=0); +template void Unserialize(Stream& is, std::basic_string& str, int, int=0); + +// vector +template unsigned int GetSerializeSize_impl(const std::vector& v, int nType, int nVersion, const boost::true_type&); +template unsigned int GetSerializeSize_impl(const std::vector& v, int nType, int nVersion, const boost::false_type&); +template inline unsigned int GetSerializeSize(const std::vector& v, int nType, int nVersion); +template void Serialize_impl(Stream& os, const std::vector& v, int nType, int nVersion, const boost::true_type&); +template void Serialize_impl(Stream& os, const std::vector& v, int nType, int nVersion, const boost::false_type&); +template inline void Serialize(Stream& os, const std::vector& v, int nType, int nVersion); +template void Unserialize_impl(Stream& is, std::vector& v, int nType, int nVersion, const boost::true_type&); +template void Unserialize_impl(Stream& is, std::vector& v, int nType, int nVersion, const boost::false_type&); +template inline void Unserialize(Stream& is, std::vector& v, int nType, int nVersion); + +// others derived from vector +extern inline unsigned int GetSerializeSize(const CScript& v, int nType, int nVersion); +template void Serialize(Stream& os, const CScript& v, int nType, int nVersion); +template void Unserialize(Stream& is, CScript& v, int nType, int nVersion); + +// pair +template unsigned int GetSerializeSize(const std::pair& item, int nType, int nVersion); +template void Serialize(Stream& os, const std::pair& item, int nType, int nVersion); +template void Unserialize(Stream& is, std::pair& item, int nType, int nVersion); + +// 3 tuple +template unsigned int GetSerializeSize(const boost::tuple& item, int nType, int nVersion); +template void Serialize(Stream& os, const boost::tuple& item, int nType, int nVersion); +template void Unserialize(Stream& is, boost::tuple& item, int nType, int nVersion); + +// 4 tuple +template unsigned int GetSerializeSize(const boost::tuple& item, int nType, int nVersion); +template void Serialize(Stream& os, const boost::tuple& item, int nType, int nVersion); +template void Unserialize(Stream& is, boost::tuple& item, int nType, int nVersion); + +// map +template unsigned int GetSerializeSize(const std::map& m, int nType, int nVersion); +template void Serialize(Stream& os, const std::map& m, int nType, int nVersion); +template void Unserialize(Stream& is, std::map& m, int nType, int nVersion); + +// set +template unsigned int GetSerializeSize(const std::set& m, int nType, int nVersion); +template void Serialize(Stream& os, const std::set& m, int nType, int nVersion); +template void Unserialize(Stream& is, std::set& m, int nType, int nVersion); + + + + + +// +// If none of the specialized versions above matched, default to calling member function. +// "int nType" is changed to "long nType" to keep from getting an ambiguous overload error. +// The compiler will only cast int to long if none of the other templates matched. +// Thanks to Boost serialization for this idea. +// +template +inline unsigned int GetSerializeSize(const T& a, long nType, int nVersion) +{ + return a.GetSerializeSize((int)nType, nVersion); +} + +template +inline void Serialize(Stream& os, const T& a, long nType, int nVersion) +{ + a.Serialize(os, (int)nType, nVersion); +} + +template +inline void Unserialize(Stream& is, T& a, long nType, int nVersion) +{ + a.Unserialize(is, (int)nType, nVersion); +} + + + + + +// +// string +// +template +unsigned int GetSerializeSize(const std::basic_string& str, int, int) +{ + return GetSizeOfCompactSize(str.size()) + str.size() * sizeof(str[0]); +} + +template +void Serialize(Stream& os, const std::basic_string& str, int, int) +{ + WriteCompactSize(os, str.size()); + if (!str.empty()) + os.write((char*)&str[0], str.size() * sizeof(str[0])); +} + +template +void Unserialize(Stream& is, std::basic_string& str, int, int) +{ + unsigned int nSize = ReadCompactSize(is); + str.resize(nSize); + if (nSize != 0) + is.read((char*)&str[0], nSize * sizeof(str[0])); +} + + + +// +// vector +// +template +unsigned int GetSerializeSize_impl(const std::vector& v, int nType, int nVersion, const boost::true_type&) +{ + return (GetSizeOfCompactSize(v.size()) + v.size() * sizeof(T)); +} + +template +unsigned int GetSerializeSize_impl(const std::vector& v, int nType, int nVersion, const boost::false_type&) +{ + unsigned int nSize = GetSizeOfCompactSize(v.size()); + for (typename std::vector::const_iterator vi = v.begin(); vi != v.end(); ++vi) + nSize += GetSerializeSize((*vi), nType, nVersion); + return nSize; +} + +template +inline unsigned int GetSerializeSize(const std::vector& v, int nType, int nVersion) +{ + return GetSerializeSize_impl(v, nType, nVersion, boost::is_fundamental()); +} + + +template +void Serialize_impl(Stream& os, const std::vector& v, int nType, int nVersion, const boost::true_type&) +{ + WriteCompactSize(os, v.size()); + if (!v.empty()) + os.write((char*)&v[0], v.size() * sizeof(T)); +} + +template +void Serialize_impl(Stream& os, const std::vector& v, int nType, int nVersion, const boost::false_type&) +{ + WriteCompactSize(os, v.size()); + for (typename std::vector::const_iterator vi = v.begin(); vi != v.end(); ++vi) + ::Serialize(os, (*vi), nType, nVersion); +} + +template +inline void Serialize(Stream& os, const std::vector& v, int nType, int nVersion) +{ + Serialize_impl(os, v, nType, nVersion, boost::is_fundamental()); +} + + +template +void Unserialize_impl(Stream& is, std::vector& v, int nType, int nVersion, const boost::true_type&) +{ + // Limit size per read so bogus size value won't cause out of memory + v.clear(); + unsigned int nSize = ReadCompactSize(is); + unsigned int i = 0; + while (i < nSize) + { + unsigned int blk = std::min(nSize - i, (unsigned int)(1 + 4999999 / sizeof(T))); + v.resize(i + blk); + is.read((char*)&v[i], blk * sizeof(T)); + i += blk; + } +} + +template +void Unserialize_impl(Stream& is, std::vector& v, int nType, int nVersion, const boost::false_type&) +{ + v.clear(); + unsigned int nSize = ReadCompactSize(is); + unsigned int i = 0; + unsigned int nMid = 0; + while (nMid < nSize) + { + nMid += 5000000 / sizeof(T); + if (nMid > nSize) + nMid = nSize; + v.resize(nMid); + for (; i < nMid; i++) + Unserialize(is, v[i], nType, nVersion); + } +} + +template +inline void Unserialize(Stream& is, std::vector& v, int nType, int nVersion) +{ + Unserialize_impl(is, v, nType, nVersion, boost::is_fundamental()); +} + + + +// +// others derived from vector +// +inline unsigned int GetSerializeSize(const CScript& v, int nType, int nVersion) +{ + return GetSerializeSize((const std::vector&)v, nType, nVersion); +} + +template +void Serialize(Stream& os, const CScript& v, int nType, int nVersion) +{ + Serialize(os, (const std::vector&)v, nType, nVersion); +} + +template +void Unserialize(Stream& is, CScript& v, int nType, int nVersion) +{ + Unserialize(is, (std::vector&)v, nType, nVersion); +} + + + +// +// pair +// +template +unsigned int GetSerializeSize(const std::pair& item, int nType, int nVersion) +{ + return GetSerializeSize(item.first, nType, nVersion) + GetSerializeSize(item.second, nType, nVersion); +} + +template +void Serialize(Stream& os, const std::pair& item, int nType, int nVersion) +{ + Serialize(os, item.first, nType, nVersion); + Serialize(os, item.second, nType, nVersion); +} + +template +void Unserialize(Stream& is, std::pair& item, int nType, int nVersion) +{ + Unserialize(is, item.first, nType, nVersion); + Unserialize(is, item.second, nType, nVersion); +} + + + +// +// 3 tuple +// +template +unsigned int GetSerializeSize(const boost::tuple& item, int nType, int nVersion) +{ + unsigned int nSize = 0; + nSize += GetSerializeSize(boost::get<0>(item), nType, nVersion); + nSize += GetSerializeSize(boost::get<1>(item), nType, nVersion); + nSize += GetSerializeSize(boost::get<2>(item), nType, nVersion); + return nSize; +} + +template +void Serialize(Stream& os, const boost::tuple& item, int nType, int nVersion) +{ + Serialize(os, boost::get<0>(item), nType, nVersion); + Serialize(os, boost::get<1>(item), nType, nVersion); + Serialize(os, boost::get<2>(item), nType, nVersion); +} + +template +void Unserialize(Stream& is, boost::tuple& item, int nType, int nVersion) +{ + Unserialize(is, boost::get<0>(item), nType, nVersion); + Unserialize(is, boost::get<1>(item), nType, nVersion); + Unserialize(is, boost::get<2>(item), nType, nVersion); +} + + + +// +// 4 tuple +// +template +unsigned int GetSerializeSize(const boost::tuple& item, int nType, int nVersion) +{ + unsigned int nSize = 0; + nSize += GetSerializeSize(boost::get<0>(item), nType, nVersion); + nSize += GetSerializeSize(boost::get<1>(item), nType, nVersion); + nSize += GetSerializeSize(boost::get<2>(item), nType, nVersion); + nSize += GetSerializeSize(boost::get<3>(item), nType, nVersion); + return nSize; +} + +template +void Serialize(Stream& os, const boost::tuple& item, int nType, int nVersion) +{ + Serialize(os, boost::get<0>(item), nType, nVersion); + Serialize(os, boost::get<1>(item), nType, nVersion); + Serialize(os, boost::get<2>(item), nType, nVersion); + Serialize(os, boost::get<3>(item), nType, nVersion); +} + +template +void Unserialize(Stream& is, boost::tuple& item, int nType, int nVersion) +{ + Unserialize(is, boost::get<0>(item), nType, nVersion); + Unserialize(is, boost::get<1>(item), nType, nVersion); + Unserialize(is, boost::get<2>(item), nType, nVersion); + Unserialize(is, boost::get<3>(item), nType, nVersion); +} + + + +// +// map +// +template +unsigned int GetSerializeSize(const std::map& m, int nType, int nVersion) +{ + unsigned int nSize = GetSizeOfCompactSize(m.size()); + for (typename std::map::const_iterator mi = m.begin(); mi != m.end(); ++mi) + nSize += GetSerializeSize((*mi), nType, nVersion); + return nSize; +} + +template +void Serialize(Stream& os, const std::map& m, int nType, int nVersion) +{ + WriteCompactSize(os, m.size()); + for (typename std::map::const_iterator mi = m.begin(); mi != m.end(); ++mi) + Serialize(os, (*mi), nType, nVersion); +} + +template +void Unserialize(Stream& is, std::map& m, int nType, int nVersion) +{ + m.clear(); + unsigned int nSize = ReadCompactSize(is); + typename std::map::iterator mi = m.begin(); + for (unsigned int i = 0; i < nSize; i++) + { + std::pair item; + Unserialize(is, item, nType, nVersion); + mi = m.insert(mi, item); + } +} + + + +// +// set +// +template +unsigned int GetSerializeSize(const std::set& m, int nType, int nVersion) +{ + unsigned int nSize = GetSizeOfCompactSize(m.size()); + for (typename std::set::const_iterator it = m.begin(); it != m.end(); ++it) + nSize += GetSerializeSize((*it), nType, nVersion); + return nSize; +} + +template +void Serialize(Stream& os, const std::set& m, int nType, int nVersion) +{ + WriteCompactSize(os, m.size()); + for (typename std::set::const_iterator it = m.begin(); it != m.end(); ++it) + Serialize(os, (*it), nType, nVersion); +} + +template +void Unserialize(Stream& is, std::set& m, int nType, int nVersion) +{ + m.clear(); + unsigned int nSize = ReadCompactSize(is); + typename std::set::iterator it = m.begin(); + for (unsigned int i = 0; i < nSize; i++) + { + K key; + Unserialize(is, key, nType, nVersion); + it = m.insert(it, key); + } +} + + + +// +// Support for IMPLEMENT_SERIALIZE and READWRITE macro +// +class CSerActionGetSerializeSize { }; +class CSerActionSerialize { }; +class CSerActionUnserialize { }; + +template +inline unsigned int SerReadWrite(Stream& s, const T& obj, int nType, int nVersion, CSerActionGetSerializeSize ser_action) +{ + return ::GetSerializeSize(obj, nType, nVersion); +} + +template +inline unsigned int SerReadWrite(Stream& s, const T& obj, int nType, int nVersion, CSerActionSerialize ser_action) +{ + ::Serialize(s, obj, nType, nVersion); + return 0; +} + +template +inline unsigned int SerReadWrite(Stream& s, T& obj, int nType, int nVersion, CSerActionUnserialize ser_action) +{ + ::Unserialize(s, obj, nType, nVersion); + return 0; +} + +struct ser_streamplaceholder +{ + int nType; + int nVersion; +}; + + + + + + + + + + + +typedef std::vector > CSerializeData; + +/** Double ended buffer combining vector and stream-like interfaces. + * + * >> and << read and write unformatted data using the above serialization templates. + * Fills with data in linear time; some stringstream implementations take N^2 time. + */ +class CDataStream +{ +protected: + typedef CSerializeData vector_type; + vector_type vch; + unsigned int nReadPos; + short state; + short exceptmask; +public: + int nType; + int nVersion; + + typedef vector_type::allocator_type allocator_type; + typedef vector_type::size_type size_type; + typedef vector_type::difference_type difference_type; + typedef vector_type::reference reference; + typedef vector_type::const_reference const_reference; + typedef vector_type::value_type value_type; + typedef vector_type::iterator iterator; + typedef vector_type::const_iterator const_iterator; + typedef vector_type::reverse_iterator reverse_iterator; + + explicit CDataStream(int nTypeIn, int nVersionIn) + { + Init(nTypeIn, nVersionIn); + } + + CDataStream(const_iterator pbegin, const_iterator pend, int nTypeIn, int nVersionIn) : vch(pbegin, pend) + { + Init(nTypeIn, nVersionIn); + } + +#if !defined(_MSC_VER) || _MSC_VER >= 1300 + CDataStream(const char* pbegin, const char* pend, int nTypeIn, int nVersionIn) : vch(pbegin, pend) + { + Init(nTypeIn, nVersionIn); + } +#endif + + CDataStream(const vector_type& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end()) + { + Init(nTypeIn, nVersionIn); + } + + CDataStream(const std::vector& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end()) + { + Init(nTypeIn, nVersionIn); + } + + CDataStream(const std::vector& vchIn, int nTypeIn, int nVersionIn) : vch((char*)&vchIn.begin()[0], (char*)&vchIn.end()[0]) + { + Init(nTypeIn, nVersionIn); + } + + void Init(int nTypeIn, int nVersionIn) + { + nReadPos = 0; + nType = nTypeIn; + nVersion = nVersionIn; + state = 0; + exceptmask = std::ios::badbit | std::ios::failbit; + } + + CDataStream& operator+=(const CDataStream& b) + { + vch.insert(vch.end(), b.begin(), b.end()); + return *this; + } + + friend CDataStream operator+(const CDataStream& a, const CDataStream& b) + { + CDataStream ret = a; + ret += b; + return (ret); + } + + std::string str() const + { + return (std::string(begin(), end())); + } + + + // + // Vector subset + // + const_iterator begin() const { return vch.begin() + nReadPos; } + iterator begin() { return vch.begin() + nReadPos; } + const_iterator end() const { return vch.end(); } + iterator end() { return vch.end(); } + size_type size() const { return vch.size() - nReadPos; } + bool empty() const { return vch.size() == nReadPos; } + void resize(size_type n, value_type c=0) { vch.resize(n + nReadPos, c); } + void reserve(size_type n) { vch.reserve(n + nReadPos); } + const_reference operator[](size_type pos) const { return vch[pos + nReadPos]; } + reference operator[](size_type pos) { return vch[pos + nReadPos]; } + void clear() { vch.clear(); nReadPos = 0; } + iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); } + void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); } + + void insert(iterator it, const_iterator first, const_iterator last) + { + assert(last - first >= 0); + if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos) + { + // special case for inserting at the front when there's room + nReadPos -= (last - first); + memcpy(&vch[nReadPos], &first[0], last - first); + } + else + vch.insert(it, first, last); + } + +#if !defined(MAC_OSX) + void insert(iterator it, std::vector::const_iterator first, std::vector::const_iterator last) + { + assert(last - first >= 0); + if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos) + { + // special case for inserting at the front when there's room + nReadPos -= (last - first); + memcpy(&vch[nReadPos], &first[0], last - first); + } + else + vch.insert(it, first, last); + } +#endif + +#if !defined(_MSC_VER) || _MSC_VER >= 1300 + void insert(iterator it, const char* first, const char* last) + { + assert(last - first >= 0); + if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos) + { + // special case for inserting at the front when there's room + nReadPos -= (last - first); + memcpy(&vch[nReadPos], &first[0], last - first); + } + else + vch.insert(it, first, last); + } +#endif + + iterator erase(iterator it) + { + if (it == vch.begin() + nReadPos) + { + // special case for erasing from the front + if (++nReadPos >= vch.size()) + { + // whenever we reach the end, we take the opportunity to clear the buffer + nReadPos = 0; + return vch.erase(vch.begin(), vch.end()); + } + return vch.begin() + nReadPos; + } + else + return vch.erase(it); + } + + iterator erase(iterator first, iterator last) + { + if (first == vch.begin() + nReadPos) + { + // special case for erasing from the front + if (last == vch.end()) + { + nReadPos = 0; + return vch.erase(vch.begin(), vch.end()); + } + else + { + nReadPos = (last - vch.begin()); + return last; + } + } + else + return vch.erase(first, last); + } + + inline void Compact() + { + vch.erase(vch.begin(), vch.begin() + nReadPos); + nReadPos = 0; + } + + bool Rewind(size_type n) + { + // Rewind by n characters if the buffer hasn't been compacted yet + if (n > nReadPos) + return false; + nReadPos -= n; + return true; + } + + + // + // Stream subset + // + void setstate(short bits, const char* psz) + { + state |= bits; + if (state & exceptmask) + THROW_WITH_STACKTRACE(std::ios_base::failure(psz)); + } + + bool eof() const { return size() == 0; } + bool fail() const { return state & (std::ios::badbit | std::ios::failbit); } + bool good() const { return !eof() && (state == 0); } + void clear(short n) { state = n; } // name conflict with vector clear() + short exceptions() { return exceptmask; } + short exceptions(short mask) { short prev = exceptmask; exceptmask = mask; setstate(0, "CDataStream"); return prev; } + CDataStream* rdbuf() { return this; } + int in_avail() { return size(); } + + void SetType(int n) { nType = n; } + int GetType() { return nType; } + void SetVersion(int n) { nVersion = n; } + int GetVersion() { return nVersion; } + void ReadVersion() { *this >> nVersion; } + void WriteVersion() { *this << nVersion; } + + CDataStream& read(char* pch, int nSize) + { + // Read from the beginning of the buffer + assert(nSize >= 0); + unsigned int nReadPosNext = nReadPos + nSize; + if (nReadPosNext >= vch.size()) + { + if (nReadPosNext > vch.size()) + { + setstate(std::ios::failbit, "CDataStream::read() : end of data"); + memset(pch, 0, nSize); + nSize = vch.size() - nReadPos; + } + memcpy(pch, &vch[nReadPos], nSize); + nReadPos = 0; + vch.clear(); + return (*this); + } + memcpy(pch, &vch[nReadPos], nSize); + nReadPos = nReadPosNext; + return (*this); + } + + CDataStream& ignore(int nSize) + { + // Ignore from the beginning of the buffer + assert(nSize >= 0); + unsigned int nReadPosNext = nReadPos + nSize; + if (nReadPosNext >= vch.size()) + { + if (nReadPosNext > vch.size()) + setstate(std::ios::failbit, "CDataStream::ignore() : end of data"); + nReadPos = 0; + vch.clear(); + return (*this); + } + nReadPos = nReadPosNext; + return (*this); + } + + CDataStream& write(const char* pch, int nSize) + { + // Write to the end of the buffer + assert(nSize >= 0); + vch.insert(vch.end(), pch, pch + nSize); + return (*this); + } + + template + void Serialize(Stream& s, int nType, int nVersion) const + { + // Special case: stream << stream concatenates like stream += stream + if (!vch.empty()) + s.write((char*)&vch[0], vch.size() * sizeof(vch[0])); + } + + template + unsigned int GetSerializeSize(const T& obj) + { + // Tells the size of the object if serialized to this stream + return ::GetSerializeSize(obj, nType, nVersion); + } + + template + CDataStream& operator<<(const T& obj) + { + // Serialize to this stream + ::Serialize(*this, obj, nType, nVersion); + return (*this); + } + + template + CDataStream& operator>>(T& obj) + { + // Unserialize from this stream + ::Unserialize(*this, obj, nType, nVersion); + return (*this); + } + + void GetAndClear(CSerializeData &data) { + data.insert(data.end(), begin(), end()); + clear(); + } +}; + + + + + + + + + + +/** RAII wrapper for FILE*. + * + * Will automatically close the file when it goes out of scope if not null. + * If you're returning the file pointer, return file.release(). + * If you need to close the file early, use file.fclose() instead of fclose(file). + */ +class CAutoFile +{ +protected: + FILE* file; + short state; + short exceptmask; +public: + int nType; + int nVersion; + + CAutoFile(FILE* filenew, int nTypeIn, int nVersionIn) + { + file = filenew; + nType = nTypeIn; + nVersion = nVersionIn; + state = 0; + exceptmask = std::ios::badbit | std::ios::failbit; + } + + ~CAutoFile() + { + fclose(); + } + + void fclose() + { + if (file != NULL && file != stdin && file != stdout && file != stderr) + ::fclose(file); + file = NULL; + } + + FILE* release() { FILE* ret = file; file = NULL; return ret; } + operator FILE*() { return file; } + FILE* operator->() { return file; } + FILE& operator*() { return *file; } + FILE** operator&() { return &file; } + FILE* operator=(FILE* pnew) { return file = pnew; } + bool operator!() { return (file == NULL); } + + + // + // Stream subset + // + void setstate(short bits, const char* psz) + { + state |= bits; + if (state & exceptmask) + THROW_WITH_STACKTRACE(std::ios_base::failure(psz)); + } + + bool fail() const { return state & (std::ios::badbit | std::ios::failbit); } + bool good() const { return state == 0; } + void clear(short n = 0) { state = n; } + short exceptions() { return exceptmask; } + short exceptions(short mask) { short prev = exceptmask; exceptmask = mask; setstate(0, "CAutoFile"); return prev; } + + void SetType(int n) { nType = n; } + int GetType() { return nType; } + void SetVersion(int n) { nVersion = n; } + int GetVersion() { return nVersion; } + void ReadVersion() { *this >> nVersion; } + void WriteVersion() { *this << nVersion; } + + CAutoFile& read(char* pch, size_t nSize) + { + if (!file) + throw std::ios_base::failure("CAutoFile::read : file handle is NULL"); + if (fread(pch, 1, nSize, file) != nSize) + setstate(std::ios::failbit, feof(file) ? "CAutoFile::read : end of file" : "CAutoFile::read : fread failed"); + return (*this); + } + + CAutoFile& write(const char* pch, size_t nSize) + { + if (!file) + throw std::ios_base::failure("CAutoFile::write : file handle is NULL"); + if (fwrite(pch, 1, nSize, file) != nSize) + setstate(std::ios::failbit, "CAutoFile::write : write failed"); + return (*this); + } + + template + unsigned int GetSerializeSize(const T& obj) + { + // Tells the size of the object if serialized to this stream + return ::GetSerializeSize(obj, nType, nVersion); + } + + template + CAutoFile& operator<<(const T& obj) + { + // Serialize to this stream + if (!file) + throw std::ios_base::failure("CAutoFile::operator<< : file handle is NULL"); + ::Serialize(*this, obj, nType, nVersion); + return (*this); + } + + template + CAutoFile& operator>>(T& obj) + { + // Unserialize from this stream + if (!file) + throw std::ios_base::failure("CAutoFile::operator>> : file handle is NULL"); + ::Unserialize(*this, obj, nType, nVersion); + return (*this); + } +}; + +#endif + + diff --git a/src/smessage.cpp b/src/smessage.cpp new file mode 100644 index 0000000..3444d82 --- /dev/null +++ b/src/smessage.cpp @@ -0,0 +1,4025 @@ +// Copyright (c) 2014 The ShadowCoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +/* +Notes: + Running with -debug could leave to and from address hashes and public keys in the log. + + + parameters: + -nosmsg Disable secure messaging (fNoSmsg) + -debugsmsg Show extra debug messages (fDebugSmsg) + -smsgscanchain Scan the block chain for public key addresses on startup + + + Wallet Locked + A copy of each incoming message is stored in bucket files ending in _wl.dat + wl (wallet locked) bucket files are deleted if they expire, like normal buckets + When the wallet is unlocked all the messages in wl files are scanned. + + + Address Whitelist + Owned Addresses are stored in smsgAddresses vector + Saved to smsg.ini + Modify options using the smsglocalkeys rpc command or edit the smsg.ini file (with client closed) + + +*/ + +#include "smessage.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + + +#include "base58.h" +#include "db.h" +#include "init.h" // pwalletMain +#include "txdb.h" + + +#include "lz4/lz4.c" + +#include "xxhash/xxhash.h" +#include "xxhash/xxhash.c" + + +// On 64 bit system ld is 64bits +#ifdef IS_ARCH_64 +#undef PRId64 +#undef PRIu64 +#undef PRIx64 +#define PRId64 "ld" +#define PRIu64 "lu" +#define PRIx64 "lx" +#endif // IS_ARCH_64 + + +// TODO: For buckets older than current, only need to store no. messages and hash in memory + +boost::signals2::signal NotifySecMsgInboxChanged; +boost::signals2::signal NotifySecMsgOutboxChanged; +boost::signals2::signal NotifySecMsgWalletUnlocked; + +bool fSecMsgEnabled = false; + +std::map smsgBuckets; +std::vector smsgAddresses; +SecMsgOptions smsgOptions; + +uint32_t nPeerIdCounter = 1; + + + +CCriticalSection cs_smsg; +CCriticalSection cs_smsgDB; + +leveldb::DB *smsgDB = NULL; + + +namespace fs = boost::filesystem; + +bool SecMsgCrypter::SetKey(const std::vector& vchNewKey, unsigned char* chNewIV) +{ + + if (vchNewKey.size() < sizeof(chKey)) + return false; + + return SetKey(&vchNewKey[0], chNewIV); +}; + +bool SecMsgCrypter::SetKey(const unsigned char* chNewKey, unsigned char* chNewIV) +{ + // -- for EVP_aes_256_cbc() key must be 256 bit, iv must be 128 bit. + memcpy(&chKey[0], chNewKey, sizeof(chKey)); + memcpy(chIV, chNewIV, sizeof(chIV)); + + fKeySet = true; + return true; +}; + +bool SecMsgCrypter::Encrypt(unsigned char* chPlaintext, uint32_t nPlain, std::vector &vchCiphertext) +{ + if (!fKeySet) + return false; + + // -- max ciphertext len for a n bytes of plaintext is n + AES_BLOCK_SIZE - 1 bytes + int nLen = nPlain; + + int nCLen = nLen + AES_BLOCK_SIZE, nFLen = 0; + vchCiphertext = std::vector (nCLen); + + EVP_CIPHER_CTX ctx; + + bool fOk = true; + + EVP_CIPHER_CTX_init(&ctx); + if (fOk) fOk = EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, &chKey[0], &chIV[0]); + if (fOk) fOk = EVP_EncryptUpdate(&ctx, &vchCiphertext[0], &nCLen, chPlaintext, nLen); + if (fOk) fOk = EVP_EncryptFinal_ex(&ctx, (&vchCiphertext[0])+nCLen, &nFLen); + EVP_CIPHER_CTX_cleanup(&ctx); + + if (!fOk) + return false; + + vchCiphertext.resize(nCLen + nFLen); + + return true; +}; + +bool SecMsgCrypter::Decrypt(unsigned char* chCiphertext, uint32_t nCipher, std::vector& vchPlaintext) +{ + if (!fKeySet) + return false; + + // plaintext will always be equal to or lesser than length of ciphertext + int nPLen = nCipher, nFLen = 0; + + vchPlaintext.resize(nCipher); + + EVP_CIPHER_CTX ctx; + + bool fOk = true; + + EVP_CIPHER_CTX_init(&ctx); + if (fOk) fOk = EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, &chKey[0], &chIV[0]); + if (fOk) fOk = EVP_DecryptUpdate(&ctx, &vchPlaintext[0], &nPLen, &chCiphertext[0], nCipher); + if (fOk) fOk = EVP_DecryptFinal_ex(&ctx, (&vchPlaintext[0])+nPLen, &nFLen); + EVP_CIPHER_CTX_cleanup(&ctx); + + if (!fOk) + return false; + + vchPlaintext.resize(nPLen + nFLen); + + return true; +}; + +void SecMsgBucket::hashBucket() +{ + if (fDebugSmsg) + printf("SecMsgBucket::hashBucket()\n"); + + timeChanged = GetTime(); + + std::set::iterator it; + + void* state = XXH32_init(1); + + for (it = setTokens.begin(); it != setTokens.end(); ++it) + { + XXH32_update(state, it->sample, 8); + }; + + hash = XXH32_digest(state); + + if (fDebugSmsg) + printf("Hashed %"PRIszu" messages, hash %u\n", setTokens.size(), hash); +}; + + +bool SecMsgDB::Open(const char* pszMode) +{ + if (smsgDB) + { + pdb = smsgDB; + return true; + }; + + bool fCreate = strchr(pszMode, 'c'); + + fs::path fullpath = GetDataDir() / "smsgDB"; + + if (!fCreate + && (!fs::exists(fullpath) + || !fs::is_directory(fullpath))) + { + printf("SecMsgDB::open() - DB does not exist.\n"); + return false; + }; + + leveldb::Options options; + options.create_if_missing = fCreate; + leveldb::Status s = leveldb::DB::Open(options, fullpath.string(), &smsgDB); + + if (!s.ok()) + { + printf("SecMsgDB::open() - Error opening db: %s.\n", s.ToString().c_str()); + return false; + }; + + pdb = smsgDB; + + return true; +}; + + +class SecMsgBatchScanner : public leveldb::WriteBatch::Handler +{ +public: + std::string needle; + bool* deleted; + std::string* foundValue; + bool foundEntry; + + SecMsgBatchScanner() : foundEntry(false) {} + + virtual void Put(const leveldb::Slice& key, const leveldb::Slice& value) + { + if (key.ToString() == needle) + { + foundEntry = true; + *deleted = false; + *foundValue = value.ToString(); + }; + }; + + virtual void Delete(const leveldb::Slice& key) + { + if (key.ToString() == needle) + { + foundEntry = true; + *deleted = true; + }; + }; +}; + +// When performing a read, if we have an active batch we need to check it first +// before reading from the database, as the rest of the code assumes that once +// a database transaction begins reads are consistent with it. It would be good +// to change that assumption in future and avoid the performance hit, though in +// practice it does not appear to be large. +bool SecMsgDB::ScanBatch(const CDataStream& key, std::string* value, bool* deleted) const +{ + if (!activeBatch) + return false; + + *deleted = false; + SecMsgBatchScanner scanner; + scanner.needle = key.str(); + scanner.deleted = deleted; + scanner.foundValue = value; + leveldb::Status s = activeBatch->Iterate(&scanner); + if (!s.ok()) + { + printf("SecMsgDB ScanBatch error: %s\n", s.ToString().c_str()); + return false; + }; + + return scanner.foundEntry; +} + +bool SecMsgDB::TxnBegin() +{ + if (activeBatch) + return true; + activeBatch = new leveldb::WriteBatch(); + return true; +}; + +bool SecMsgDB::TxnCommit() +{ + if (!activeBatch) + return false; + + leveldb::WriteOptions writeOptions; + writeOptions.sync = true; + leveldb::Status status = pdb->Write(writeOptions, activeBatch); + delete activeBatch; + activeBatch = NULL; + + if (!status.ok()) + { + printf("SecMsgDB batch commit failure: %s\n", status.ToString().c_str()); + return false; + }; + + return true; +}; + +bool SecMsgDB::TxnAbort() +{ + delete activeBatch; + activeBatch = NULL; + return true; +}; + +bool SecMsgDB::ReadPK(CKeyID& addr, CPubKey& pubkey) +{ + if (!pdb) + return false; + + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(sizeof(addr) + 2); + ssKey << 'p'; + ssKey << 'k'; + ssKey << addr; + std::string strValue; + + bool readFromDb = true; + if (activeBatch) + { + // -- check activeBatch first + bool deleted = false; + readFromDb = ScanBatch(ssKey, &strValue, &deleted) == false; + if (deleted) + return false; + }; + + if (readFromDb) + { + leveldb::Status s = pdb->Get(leveldb::ReadOptions(), ssKey.str(), &strValue); + if (!s.ok()) + { + if (s.IsNotFound()) + return false; + printf("LevelDB read failure: %s\n", s.ToString().c_str()); + return false; + }; + }; + + try { + CDataStream ssValue(strValue.data(), strValue.data() + strValue.size(), SER_DISK, CLIENT_VERSION); + ssValue >> pubkey; + } catch (std::exception& e) { + printf("SecMsgDB::ReadPK() unserialize threw: %s.\n", e.what()); + return false; + } + + return true; +}; + +bool SecMsgDB::WritePK(CKeyID& addr, CPubKey& pubkey) +{ + if (!pdb) + return false; + + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(sizeof(addr) + 2); + ssKey << 'p'; + ssKey << 'k'; + ssKey << addr; + CDataStream ssValue(SER_DISK, CLIENT_VERSION); + ssValue.reserve(sizeof(pubkey)); + ssValue << pubkey; + + if (activeBatch) + { + activeBatch->Put(ssKey.str(), ssValue.str()); + return true; + }; + + leveldb::WriteOptions writeOptions; + writeOptions.sync = true; + leveldb::Status s = pdb->Put(writeOptions, ssKey.str(), ssValue.str()); + if (!s.ok()) + { + printf("SecMsgDB write failure: %s\n", s.ToString().c_str()); + return false; + }; + + return true; +}; + +bool SecMsgDB::ExistsPK(CKeyID& addr) +{ + if (!pdb) + return false; + + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(sizeof(addr)+2); + ssKey << 'p'; + ssKey << 'k'; + ssKey << addr; + std::string unused; + + if (activeBatch) + { + bool deleted; + if (ScanBatch(ssKey, &unused, &deleted) && !deleted) + { + return true; + }; + }; + + leveldb::Status s = pdb->Get(leveldb::ReadOptions(), ssKey.str(), &unused); + return s.IsNotFound() == false; +}; + + +bool SecMsgDB::NextSmesg(leveldb::Iterator* it, std::string& prefix, unsigned char* chKey, SecMsgStored& smsgStored) +{ + if (!pdb) + return false; + + if (!it->Valid()) // first run + it->Seek(prefix); + else + it->Next(); + + if (!(it->Valid() + && it->key().size() == 18 + && memcmp(it->key().data(), prefix.data(), 2) == 0)) + return false; + + memcpy(chKey, it->key().data(), 18); + + try { + CDataStream ssValue(it->value().data(), it->value().data() + it->value().size(), SER_DISK, CLIENT_VERSION); + ssValue >> smsgStored; + } catch (std::exception& e) { + printf("SecMsgDB::NextSmesg() unserialize threw: %s.\n", e.what()); + return false; + } + + return true; +}; + +bool SecMsgDB::NextSmesgKey(leveldb::Iterator* it, std::string& prefix, unsigned char* chKey) +{ + if (!pdb) + return false; + + if (!it->Valid()) // first run + it->Seek(prefix); + else + it->Next(); + + if (!(it->Valid() + && it->key().size() == 18 + && memcmp(it->key().data(), prefix.data(), 2) == 0)) + return false; + + memcpy(chKey, it->key().data(), 18); + + return true; +}; + +bool SecMsgDB::ReadSmesg(unsigned char* chKey, SecMsgStored& smsgStored) +{ + if (!pdb) + return false; + + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.write((const char*)chKey, 18); + std::string strValue; + + bool readFromDb = true; + if (activeBatch) + { + // -- check activeBatch first + bool deleted = false; + readFromDb = ScanBatch(ssKey, &strValue, &deleted) == false; + if (deleted) + return false; + }; + + if (readFromDb) + { + leveldb::Status s = pdb->Get(leveldb::ReadOptions(), ssKey.str(), &strValue); + if (!s.ok()) + { + if (s.IsNotFound()) + return false; + printf("LevelDB read failure: %s\n", s.ToString().c_str()); + return false; + }; + }; + + try { + CDataStream ssValue(strValue.data(), strValue.data() + strValue.size(), SER_DISK, CLIENT_VERSION); + ssValue >> smsgStored; + } catch (std::exception& e) { + printf("SecMsgDB::ReadSmesg() unserialize threw: %s.\n", e.what()); + return false; + } + + return true; +}; + +bool SecMsgDB::WriteSmesg(unsigned char* chKey, SecMsgStored& smsgStored) +{ + if (!pdb) + return false; + + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.write((const char*)chKey, 18); + CDataStream ssValue(SER_DISK, CLIENT_VERSION); + ssValue << smsgStored; + + if (activeBatch) + { + activeBatch->Put(ssKey.str(), ssValue.str()); + return true; + }; + + leveldb::WriteOptions writeOptions; + writeOptions.sync = true; + leveldb::Status s = pdb->Put(writeOptions, ssKey.str(), ssValue.str()); + if (!s.ok()) + { + printf("SecMsgDB write failed: %s\n", s.ToString().c_str()); + return false; + }; + + return true; +}; + +bool SecMsgDB::ExistsSmesg(unsigned char* chKey) +{ + if (!pdb) + return false; + + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.write((const char*)chKey, 18); + std::string unused; + + if (activeBatch) + { + bool deleted; + if (ScanBatch(ssKey, &unused, &deleted) && !deleted) + { + return true; + }; + }; + + leveldb::Status s = pdb->Get(leveldb::ReadOptions(), ssKey.str(), &unused); + return s.IsNotFound() == false; + return true; +}; + +bool SecMsgDB::EraseSmesg(unsigned char* chKey) +{ + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.write((const char*)chKey, 18); + + if (activeBatch) + { + activeBatch->Delete(ssKey.str()); + return true; + }; + + leveldb::WriteOptions writeOptions; + writeOptions.sync = true; + leveldb::Status s = pdb->Delete(writeOptions, ssKey.str()); + + if (s.ok() || s.IsNotFound()) + return true; + printf("SecMsgDB erase failed: %s\n", s.ToString().c_str()); + return false; +}; + +void ThreadSecureMsg(void* parg) +{ + // -- bucket management thread + RenameThread("shadowcoin-smsg"); // Make this thread recognisable + + uint32_t delay = 0; + + while (fSecMsgEnabled) + { + // shutdown thread waits 5 seconds, this should be less + MilliSleep(1000); // milliseconds + + if (!fSecMsgEnabled) // check again after sleep + break; + + delay++; + if (delay < SMSG_THREAD_DELAY) // check every SMSG_THREAD_DELAY seconds + continue; + delay = 0; + + int64_t now = GetTime(); + + if (fDebugSmsg) + printf("SecureMsgThread %"PRId64" \n", now); + + int64_t cutoffTime = now - SMSG_RETENTION; + + { + LOCK(cs_smsg); + std::map::iterator it; + it = smsgBuckets.begin(); + + while (it != smsgBuckets.end()) + { + //if (fDebugSmsg) + // printf("Checking bucket %"PRId64", size %"PRIszu" \n", it->first, it->second.setTokens.size()); + if (it->first < cutoffTime) + { + if (fDebugSmsg) + printf("Removing bucket %"PRId64" \n", it->first); + std::string fileName = boost::lexical_cast(it->first) + "_01.dat"; + fs::path fullPath = GetDataDir() / "smsgStore" / fileName; + if (fs::exists(fullPath)) + { + try { + fs::remove(fullPath); + } catch (const fs::filesystem_error& ex) + { + printf("Error removing bucket file %s.\n", ex.what()); + }; + } else + printf("Path %s does not exist \n", fullPath.string().c_str()); + + // -- look for a wl file, it stores incoming messages when wallet is locked + fileName = boost::lexical_cast(it->first) + "_01_wl.dat"; + fullPath = GetDataDir() / "smsgStore" / fileName; + if (fs::exists(fullPath)) + { + try { + fs::remove(fullPath); + } catch (const fs::filesystem_error& ex) + { + printf("Error removing wallet locked file %s.\n", ex.what()); + }; + }; + + smsgBuckets.erase(it++); + } else + { + // -- tick down nLockCount, so will eventually expire if peer never sends data + if (it->second.nLockCount > 0) + { + it->second.nLockCount--; + + if (it->second.nLockCount == 0) // lock timed out + { + uint32_t nPeerId = it->second.nLockPeerId; + int64_t ignoreUntil = GetTime() + SMSG_TIME_IGNORE; + + if (fDebugSmsg) + printf("Lock on bucket %"PRId64" for peer %u timed out.\n", it->first, nPeerId); + // -- look through the nodes for the peer that locked this bucket + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + { + if (pnode->smsgData.nPeerId != nPeerId) + continue; + pnode->smsgData.ignoreUntil = ignoreUntil; + + // -- alert peer that they are being ignored + std::vector vchData; + vchData.resize(8); + memcpy(&vchData[0], &ignoreUntil, 8); + pnode->PushMessage("smsgIgnore", vchData); + + if (fDebugSmsg) + printf("This node will ignore peer %u until %"PRId64".\n", nPeerId, ignoreUntil); + break; + }; + it->second.nLockPeerId = 0; + }; // if (it->second.nLockCount == 0) + }; + ++it; + }; // ! if (it->first < cutoffTime) + }; + }; // LOCK(cs_smsg); + }; + + printf("ThreadSecureMsg exited.\n"); +}; + +void ThreadSecureMsgPow(void* parg) +{ + // -- proof of work thread + RenameThread("shadowcoin-smsg-pow"); // Make this thread recognisable + + int rv; + std::vector vchKey; + SecMsgStored smsgStored; + + std::string sPrefix("qm"); + unsigned char chKey[18]; + + + while (fSecMsgEnabled) + { + // -- sleep at end, then fSecMsgEnabled is tested on wake + + SecMsgDB dbOutbox; + leveldb::Iterator* it; + { + LOCK(cs_smsgDB); + + if (!dbOutbox.Open("cr+")) + continue; + + // -- fifo (smallest key first) + it = dbOutbox.pdb->NewIterator(leveldb::ReadOptions()); + } + // -- break up lock, SecureMsgSetHash will take long + + for (;;) + { + { + LOCK(cs_smsgDB); + if (!dbOutbox.NextSmesg(it, sPrefix, chKey, smsgStored)) + break; + } + + unsigned char* pHeader = &smsgStored.vchMessage[0]; + unsigned char* pPayload = &smsgStored.vchMessage[SMSG_HDR_LEN]; + SecureMessage* psmsg = (SecureMessage*) pHeader; + + // -- do proof of work + rv = SecureMsgSetHash(pHeader, pPayload, psmsg->nPayload); + if (rv == 2) + break; // /eave message in db, if terminated due to shutdown + + // -- message is removed here, no matter what + { + LOCK(cs_smsgDB); + dbOutbox.EraseSmesg(chKey); + } + if (rv != 0) + { + printf("SecMsgPow: Could not get proof of work hash, message removed.\n"); + continue; + }; + + // -- add to message store + { + LOCK(cs_smsg); + if (SecureMsgStore(pHeader, pPayload, psmsg->nPayload, true) != 0) + { + printf("SecMsgPow: Could not place message in buckets, message removed.\n"); + continue; + }; + } + + // -- test if message was sent to self + if (SecureMsgScanMessage(pHeader, pPayload, psmsg->nPayload, true) != 0) + { + // message recipient is not this node (or failed) + }; + }; + + { + LOCK(cs_smsg); + delete it; + } + + // -- shutdown thread waits 5 seconds, this should be less + MilliSleep(1000); // milliseconds + }; + + printf("ThreadSecureMsgPow exited.\n"); +}; + + +std::string getTimeString(int64_t timestamp, char *buffer, size_t nBuffer) +{ + struct tm* dt; + time_t t = timestamp; + dt = localtime(&t); + + strftime(buffer, nBuffer, "%Y-%m-%d %H:%M:%S %z", dt); // %Z shows long strings on windows + return std::string(buffer); // copies the null-terminated character sequence +}; + +std::string fsReadable(uint64_t nBytes) +{ + char buffer[128]; + if (nBytes >= 1024ll*1024ll*1024ll*1024ll) + snprintf(buffer, sizeof(buffer), "%.2f TB", nBytes/1024.0/1024.0/1024.0/1024.0); + else + if (nBytes >= 1024*1024*1024) + snprintf(buffer, sizeof(buffer), "%.2f GB", nBytes/1024.0/1024.0/1024.0); + else + if (nBytes >= 1024*1024) + snprintf(buffer, sizeof(buffer), "%.2f MB", nBytes/1024.0/1024.0); + else + if (nBytes >= 1024) + snprintf(buffer, sizeof(buffer), "%.2f KB", nBytes/1024.0); + else + snprintf(buffer, sizeof(buffer), "%"PRIu64" bytes", nBytes); + return std::string(buffer); +}; + +int SecureMsgBuildBucketSet() +{ + /* + Build the bucket set by scanning the files in the smsgStore dir. + + smsgBuckets should be empty + */ + + if (fDebugSmsg) + printf("SecureMsgBuildBucketSet()\n"); + + int64_t now = GetTime(); + uint32_t nFiles = 0; + uint32_t nMessages = 0; + + fs::path pathSmsgDir = GetDataDir() / "smsgStore"; + fs::directory_iterator itend; + + + if (!fs::exists(pathSmsgDir) + || !fs::is_directory(pathSmsgDir)) + { + printf("Message store directory does not exist.\n"); + return 0; // not an error + } + + + for (fs::directory_iterator itd(pathSmsgDir) ; itd != itend ; ++itd) + { + if (!fs::is_regular_file(itd->status())) + continue; + + std::string fileType = (*itd).path().extension().string(); + + if (fileType.compare(".dat") != 0) + continue; + + std::string fileName = (*itd).path().filename().string(); + + + if (fDebugSmsg) + printf("Processing file: %s.\n", fileName.c_str()); + + nFiles++; + + // TODO files must be split if > 2GB + // time_noFile.dat + size_t sep = fileName.find_first_of("_"); + if (sep == std::string::npos) + continue; + + std::string stime = fileName.substr(0, sep); + + int64_t fileTime = boost::lexical_cast(stime); + + if (fileTime < now - SMSG_RETENTION) + { + printf("Dropping file %s, expired.\n", fileName.c_str()); + try { + fs::remove((*itd).path()); + } catch (const fs::filesystem_error& ex) + { + printf("Error removing bucket file %s, %s.\n", fileName.c_str(), ex.what()); + }; + continue; + }; + + if (boost::algorithm::ends_with(fileName, "_wl.dat")) + { + if (fDebugSmsg) + printf("Skipping wallet locked file: %s.\n", fileName.c_str()); + continue; + }; + + + SecureMessage smsg; + std::set& tokenSet = smsgBuckets[fileTime].setTokens; + + { + LOCK(cs_smsg); + FILE *fp; + + if (!(fp = fopen((*itd).path().string().c_str(), "rb"))) + { + printf("Error opening file: %s\n", strerror(errno)); + continue; + }; + + for (;;) + { + long int ofs = ftell(fp); + SecMsgToken token; + token.offset = ofs; + errno = 0; + if (fread(&smsg.hash[0], sizeof(unsigned char), SMSG_HDR_LEN, fp) != (size_t)SMSG_HDR_LEN) + { + if (errno != 0) + { + printf("fread header failed: %s\n", strerror(errno)); + } else + { + //printf("End of file.\n"); + }; + break; + }; + token.timestamp = smsg.timestamp; + + if (smsg.nPayload < 8) + continue; + + if (fread(token.sample, sizeof(unsigned char), 8, fp) != 8) + { + printf("fread data failed: %s\n", strerror(errno)); + break; + }; + + if (fseek(fp, smsg.nPayload-8, SEEK_CUR) != 0) + { + printf("fseek, strerror: %s.\n", strerror(errno)); + break; + }; + + tokenSet.insert(token); + }; + + fclose(fp); + }; + smsgBuckets[fileTime].hashBucket(); + + nMessages += tokenSet.size(); + + if (fDebugSmsg) + printf("Bucket %"PRId64" contains %"PRIszu" messages.\n", fileTime, tokenSet.size()); + }; + + printf("Processed %u files, loaded %"PRIszu" buckets containing %u messages.\n", nFiles, smsgBuckets.size(), nMessages); + + return 0; +}; + +int SecureMsgAddWalletAddresses() +{ + if (fDebugSmsg) + printf("SecureMsgAddWalletAddresses()\n"); + + uint32_t nAdded = 0; + BOOST_FOREACH(const PAIRTYPE(CTxDestination, std::string)& entry, pwalletMain->mapAddressBook) + { + if (!IsMine(*pwalletMain, entry.first)) + continue; + + CTrianglesAddress coinAddress(entry.first); + if (!coinAddress.IsValid()) + continue; + + std::string address; + std::string strPublicKey; + address = coinAddress.ToString(); + + + bool fExists = 0; + for (std::vector::iterator it = smsgAddresses.begin(); it != smsgAddresses.end(); ++it) + { + if (address != it->sAddress) + continue; + fExists = 1; + break; + }; + + if (fExists) + continue; + + bool recvEnabled = 1; + bool recvAnon = 1; + + smsgAddresses.push_back(SecMsgAddress(address, recvEnabled, recvAnon)); + nAdded++; + }; + + if (fDebugSmsg) + printf("Added %u addresses to whitelist.\n", nAdded); + + return 0; +}; + + +int SecureMsgReadIni() +{ + if (!fSecMsgEnabled) + return false; + + if (fDebugSmsg) + printf("SecureMsgReadIni()\n"); + + fs::path fullpath = GetDataDir() / "smsg.ini"; + + + FILE *fp; + errno = 0; + if (!(fp = fopen(fullpath.string().c_str(), "r"))) + { + printf("Error opening file: %s\n", strerror(errno)); + return 1; + }; + + char cLine[512]; + char *pName, *pValue; + + char cAddress[64]; + int addrRecv, addrRecvAnon; + + while (fgets(cLine, 512, fp)) + { + cLine[strcspn(cLine, "\n")] = '\0'; + cLine[strcspn(cLine, "\r")] = '\0'; + cLine[511] = '\0'; // for safety + + // -- check that line contains a name value pair and is not a comment, or section header + if (cLine[0] == '#' || cLine[0] == '[' || strcspn(cLine, "=") < 1) + continue; + + if (!(pName = strtok(cLine, "=")) + || !(pValue = strtok(NULL, "="))) + continue; + + if (strcmp(pName, "newAddressRecv") == 0) + { + smsgOptions.fNewAddressRecv = (strcmp(pValue, "true") == 0) ? true : false; + } else + if (strcmp(pName, "newAddressAnon") == 0) + { + smsgOptions.fNewAddressAnon = (strcmp(pValue, "true") == 0) ? true : false; + } else + if (strcmp(pName, "key") == 0) + { + int rv = sscanf(pValue, "%64[^|]|%d|%d", cAddress, &addrRecv, &addrRecvAnon); + if (rv == 3) + { + smsgAddresses.push_back(SecMsgAddress(std::string(cAddress), addrRecv, addrRecvAnon)); + } else + { + printf("Could not parse key line %s, rv %d.\n", pValue, rv); + } + } else + { + printf("Unknown setting name: '%s'.", pName); + }; + }; + + printf("Loaded %"PRIszu" addresses.\n", smsgAddresses.size()); + + fclose(fp); + + return 0; +}; + +int SecureMsgWriteIni() +{ + if (!fSecMsgEnabled) + return false; + + if (fDebugSmsg) + printf("SecureMsgWriteIni()\n"); + + fs::path fullpath = GetDataDir() / "smsg.ini~"; + + FILE *fp; + errno = 0; + if (!(fp = fopen(fullpath.string().c_str(), "w"))) + { + printf("Error opening file: %s\n", strerror(errno)); + return 1; + }; + + if (fwrite("[Options]\n", sizeof(char), 10, fp) != 10) + { + printf("fwrite error: %s\n", strerror(errno)); + fclose(fp); + return false; + }; + + if (fprintf(fp, "newAddressRecv=%s\n", smsgOptions.fNewAddressRecv ? "true" : "false") < 0 + || fprintf(fp, "newAddressAnon=%s\n", smsgOptions.fNewAddressAnon ? "true" : "false") < 0) + { + printf("fprintf error: %s\n", strerror(errno)); + fclose(fp); + return false; + } + + if (fwrite("\n[Keys]\n", sizeof(char), 8, fp) != 8) + { + printf("fwrite error: %s\n", strerror(errno)); + fclose(fp); + return false; + }; + for (std::vector::iterator it = smsgAddresses.begin(); it != smsgAddresses.end(); ++it) + { + errno = 0; + if (fprintf(fp, "key=%s|%d|%d\n", it->sAddress.c_str(), it->fReceiveEnabled, it->fReceiveAnon) < 0) + { + printf("fprintf error: %s\n", strerror(errno)); + continue; + }; + }; + + + fclose(fp); + + + try { + fs::path finalpath = GetDataDir() / "smsg.ini"; + fs::rename(fullpath, finalpath); + } catch (const fs::filesystem_error& ex) + { + printf("Error renaming file %s, %s.\n", fullpath.string().c_str(), ex.what()); + }; + return 0; +}; + + +/** called from AppInit2() in init.cpp */ +bool SecureMsgStart(bool fDontStart, bool fScanChain) +{ + if (fDontStart) + { + printf("Secure messaging not started.\n"); + return false; + }; + + printf("Secure messaging starting.\n"); + + fSecMsgEnabled = true; + + if (SecureMsgReadIni() != 0) + printf("Failed to read smsg.ini\n"); + + if (smsgAddresses.size() < 1) + { + printf("No address keys loaded.\n"); + if (SecureMsgAddWalletAddresses() != 0) + printf("Failed to load addresses from wallet.\n"); + }; + + if (fScanChain) + { + SecureMsgScanBlockChain(); + }; + + if (SecureMsgBuildBucketSet() != 0) + { + printf("SecureMsg could not load bucket sets, secure messaging disabled.\n"); + fSecMsgEnabled = false; + return false; + }; + + // -- start threads + if (!NewThread(ThreadSecureMsg, NULL) + || !NewThread(ThreadSecureMsgPow, NULL)) + { + printf("SecureMsg could not start threads, secure messaging disabled.\n"); + fSecMsgEnabled = false; + return false; + }; + + return true; +}; + +/** called from Shutdown() in init.cpp */ +bool SecureMsgShutdown() +{ + if (!fSecMsgEnabled) + return false; + + printf("Stopping secure messaging.\n"); + + + if (SecureMsgWriteIni() != 0) + printf("Failed to save smsg.ini\n"); + + fSecMsgEnabled = false; + + if (smsgDB) + { + LOCK(cs_smsgDB); + delete smsgDB; + smsgDB = NULL; + }; + + // -- main program will wait 5 seconds for threads to terminate. + + return true; +}; + +bool SecureMsgEnable() +{ + // -- start secure messaging at runtime + if (fSecMsgEnabled) + { + printf("SecureMsgEnable: secure messaging is already enabled.\n"); + return false; + }; + + { + LOCK(cs_smsg); + fSecMsgEnabled = true; + + smsgAddresses.clear(); // should be empty already + if (SecureMsgReadIni() != 0) + printf("Failed to read smsg.ini\n"); + + if (smsgAddresses.size() < 1) + { + printf("No address keys loaded.\n"); + if (SecureMsgAddWalletAddresses() != 0) + printf("Failed to load addresses from wallet.\n"); + }; + + smsgBuckets.clear(); // should be empty already + + if (SecureMsgBuildBucketSet() != 0) + { + printf("SecureMsgEnable: could not load bucket sets, secure messaging disabled.\n"); + fSecMsgEnabled = false; + return false; + }; + + }; // LOCK(cs_smsg); + + // -- start threads + if (!NewThread(ThreadSecureMsg, NULL) + || !NewThread(ThreadSecureMsgPow, NULL)) + { + printf("SecureMsgEnable could not start threads, secure messaging disabled.\n"); + fSecMsgEnabled = false; + return false; + }; + + // -- ping each peer, don't know which have messaging enabled + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + { + pnode->PushMessage("smsgPing"); + pnode->PushMessage("smsgPong"); // Send pong as have missed initial ping sent by peer when it connected + }; + } + + printf("Secure messaging enabled.\n"); + return true; +}; + +bool SecureMsgDisable() +{ + // -- stop secure messaging at runtime + if (!fSecMsgEnabled) + { + printf("SecureMsgDisable: secure messaging is already disabled.\n"); + return false; + }; + + { + LOCK(cs_smsg); + fSecMsgEnabled = false; + + // -- clear smsgBuckets + std::map::iterator it; + it = smsgBuckets.begin(); + for (it = smsgBuckets.begin(); it != smsgBuckets.end(); ++it) + { + it->second.setTokens.clear(); + }; + smsgBuckets.clear(); + + // -- tell each smsg enabled peer that this node is disabling + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + { + if (!pnode->smsgData.fEnabled) + continue; + + pnode->PushMessage("smsgDisabled"); + pnode->smsgData.fEnabled = false; + }; + } + + if (SecureMsgWriteIni() != 0) + printf("Failed to save smsg.ini\n"); + + smsgAddresses.clear(); + + }; // LOCK(cs_smsg); + + // -- allow time for threads to stop + MilliSleep(3000); // milliseconds + // TODO be certain that threads have stopped + + if (smsgDB) + { + LOCK(cs_smsgDB); + delete smsgDB; + smsgDB = NULL; + }; + + + printf("Secure messaging disabled.\n"); + return true; +}; + + +bool SecureMsgReceiveData(CNode* pfrom, std::string strCommand, CDataStream& vRecv) +{ + /* + Called from ProcessMessage + Runs in ThreadMessageHandler2 + */ + + if (fDebugSmsg) + printf("SecureMsgReceiveData() %s %s.\n", pfrom->addrName.c_str(), strCommand.c_str()); + + { + // break up? + LOCK(cs_smsg); + + if (strCommand == "smsgInv") + { + std::vector vchData; + vRecv >> vchData; + + if (vchData.size() < 4) + { + pfrom->Misbehaving(1); + return false; // not enough data received to be a valid smsgInv + }; + + int64_t now = GetTime(); + + if (now < pfrom->smsgData.ignoreUntil) + { + if (fDebugSmsg) + printf("Node is ignoring peer %u until %"PRId64".\n", pfrom->smsgData.nPeerId, pfrom->smsgData.ignoreUntil); + return false; + }; + + uint32_t nBuckets = smsgBuckets.size(); + uint32_t nLocked = 0; // no. of locked buckets on this node + uint32_t nInvBuckets; // no. of bucket headers sent by peer in smsgInv + memcpy(&nInvBuckets, &vchData[0], 4); + if (fDebugSmsg) + printf("Remote node sent %d bucket headers, this has %d.\n", nInvBuckets, nBuckets); + + + // -- Check no of buckets: + if (nInvBuckets > (SMSG_RETENTION / SMSG_BUCKET_LEN) + 1) // +1 for some leeway + { + printf("Peer sent more bucket headers than possible %u, %u.\n", nInvBuckets, (SMSG_RETENTION / SMSG_BUCKET_LEN)); + pfrom->Misbehaving(1); + return false; + }; + + if (vchData.size() < 4 + nInvBuckets*16) + { + printf("Remote node did not send enough data.\n"); + pfrom->Misbehaving(1); + return false; + }; + + std::vector vchDataOut; + vchDataOut.reserve(4 + 8 * nInvBuckets); // reserve max possible size + vchDataOut.resize(4); + uint32_t nShowBuckets = 0; + + + unsigned char *p = &vchData[4]; + for (uint32_t i = 0; i < nInvBuckets; ++i) + { + int64_t time; + uint32_t ncontent, hash; + memcpy(&time, p, 8); + memcpy(&ncontent, p+8, 4); + memcpy(&hash, p+12, 4); + + p += 16; + + // Check time valid: + if (time < now - SMSG_RETENTION) + { + if (fDebugSmsg) + printf("Not interested in peer bucket %"PRId64", has expired.\n", time); + + if (time < now - SMSG_RETENTION - SMSG_TIME_LEEWAY) + pfrom->Misbehaving(1); + continue; + }; + if (time > now + SMSG_TIME_LEEWAY) + { + if (fDebugSmsg) + printf("Not interested in peer bucket %"PRId64", in the future.\n", time); + pfrom->Misbehaving(1); + continue; + }; + + if (ncontent < 1) + { + if (fDebugSmsg) + printf("Peer sent empty bucket, ignore %"PRId64" %u %u.\n", time, ncontent, hash); + continue; + }; + + if (fDebugSmsg) + { + printf("peer bucket %"PRId64" %u %u.\n", time, ncontent, hash); + printf("this bucket %"PRId64" %"PRIszu" %u.\n", time, smsgBuckets[time].setTokens.size(), smsgBuckets[time].hash); + }; + + if (smsgBuckets[time].nLockCount > 0) + { + if (fDebugSmsg) + printf("Bucket is locked %u, waiting for peer %u to send data.\n", smsgBuckets[time].nLockCount, smsgBuckets[time].nLockPeerId); + nLocked++; + continue; + }; + + // -- if this node has more than the peer node, peer node will pull from this + // if then peer node has more this node will pull fom peer + if (smsgBuckets[time].setTokens.size() < ncontent + || (smsgBuckets[time].setTokens.size() == ncontent + && smsgBuckets[time].hash != hash)) // if same amount in buckets check hash + { + if (fDebugSmsg) + printf("Requesting contents of bucket %"PRId64".\n", time); + + uint32_t sz = vchDataOut.size(); + vchDataOut.resize(sz + 8); + memcpy(&vchDataOut[sz], &time, 8); + + nShowBuckets++; + }; + }; + + // TODO: should include hash? + memcpy(&vchDataOut[0], &nShowBuckets, 4); + if (vchDataOut.size() > 4) + { + pfrom->PushMessage("smsgShow", vchDataOut); + } else + if (nLocked < 1) // Don't report buckets as matched if any are locked + { + // -- peer has no buckets we want, don't send them again until something changes + // peer will still request buckets from this node if needed (< ncontent) + vchDataOut.resize(8); + memcpy(&vchDataOut[0], &now, 8); + pfrom->PushMessage("smsgMatch", vchDataOut); + if (fDebugSmsg) + printf("Sending smsgMatch, %"PRId64".\n", now); + }; + + } else + if (strCommand == "smsgShow") + { + std::vector vchData; + vRecv >> vchData; + + if (vchData.size() < 4) + return false; + + uint32_t nBuckets; + memcpy(&nBuckets, &vchData[0], 4); + + if (vchData.size() < 4 + nBuckets * 8) + return false; + + if (fDebugSmsg) + printf("smsgShow: peer wants to see content of %u buckets.\n", nBuckets); + + std::map::iterator itb; + std::set::iterator it; + + std::vector vchDataOut; + int64_t time; + unsigned char* pIn = &vchData[4]; + for (uint32_t i = 0; i < nBuckets; ++i, pIn += 8) + { + memcpy(&time, pIn, 8); + + itb = smsgBuckets.find(time); + if (itb == smsgBuckets.end()) + { + if (fDebugSmsg) + printf("Don't have bucket %"PRId64".\n", time); + continue; + }; + + std::set& tokenSet = (*itb).second.setTokens; + + try { + vchDataOut.resize(8 + 16 * tokenSet.size()); + } catch (std::exception& e) { + printf("vchDataOut.resize %"PRIszu" threw: %s.\n", 8 + 16 * tokenSet.size(), e.what()); + continue; + }; + memcpy(&vchDataOut[0], &time, 8); + + unsigned char* p = &vchDataOut[8]; + for (it = tokenSet.begin(); it != tokenSet.end(); ++it) + { + memcpy(p, &it->timestamp, 8); + memcpy(p+8, &it->sample, 8); + + p += 16; + }; + pfrom->PushMessage("smsgHave", vchDataOut); + }; + + + } else + if (strCommand == "smsgHave") + { + // -- peer has these messages in bucket + std::vector vchData; + vRecv >> vchData; + + if (vchData.size() < 8) + return false; + + int n = (vchData.size() - 8) / 16; + + int64_t time; + memcpy(&time, &vchData[0], 8); + + // -- Check time valid: + int64_t now = GetTime(); + if (time < now - SMSG_RETENTION) + { + if (fDebugSmsg) + printf("Not interested in peer bucket %"PRId64", has expired.\n", time); + return false; + }; + if (time > now + SMSG_TIME_LEEWAY) + { + if (fDebugSmsg) + printf("Not interested in peer bucket %"PRId64", in the future.\n", time); + pfrom->Misbehaving(1); + return false; + }; + + if (smsgBuckets[time].nLockCount > 0) + { + if (fDebugSmsg) + printf("Bucket %"PRId64" lock count %u, waiting for message data from peer %u.\n", time, smsgBuckets[time].nLockCount, smsgBuckets[time].nLockPeerId); + return false; + }; + + if (fDebugSmsg) + printf("Sifting through bucket %"PRId64".\n", time); + + std::vector vchDataOut; + vchDataOut.resize(8); + memcpy(&vchDataOut[0], &vchData[0], 8); + + std::set& tokenSet = smsgBuckets[time].setTokens; + std::set::iterator it; + SecMsgToken token; + unsigned char* p = &vchData[8]; + + for (int i = 0; i < n; ++i) + { + memcpy(&token.timestamp, p, 8); + memcpy(&token.sample, p+8, 8); + + it = tokenSet.find(token); + if (it == tokenSet.end()) + { + int nd = vchDataOut.size(); + try { + vchDataOut.resize(nd + 16); + } catch (std::exception& e) { + printf("vchDataOut.resize %d threw: %s.\n", nd + 16, e.what()); + continue; + }; + + memcpy(&vchDataOut[nd], p, 16); + }; + + p += 16; + }; + + if (vchDataOut.size() > 8) + { + if (fDebugSmsg) + { + printf("Asking peer for %"PRIszu" messages.\n", (vchDataOut.size() - 8) / 16); + printf("Locking bucket %"PRIszu" for peer %u.\n", time, pfrom->smsgData.nPeerId); + }; + smsgBuckets[time].nLockCount = 3; // lock this bucket for at most 3 * SMSG_THREAD_DELAY seconds, unset when peer sends smsgMsg + smsgBuckets[time].nLockPeerId = pfrom->smsgData.nPeerId; + pfrom->PushMessage("smsgWant", vchDataOut); + }; + } else + if (strCommand == "smsgWant") + { + std::vector vchData; + vRecv >> vchData; + + if (vchData.size() < 8) + return false; + + std::vector vchOne; + std::vector vchBunch; + + vchBunch.resize(4+8); // nmessages + bucketTime + + int n = (vchData.size() - 8) / 16; + + int64_t time; + uint32_t nBunch = 0; + memcpy(&time, &vchData[0], 8); + + std::map::iterator itb; + itb = smsgBuckets.find(time); + if (itb == smsgBuckets.end()) + { + if (fDebugSmsg) + printf("Don't have bucket %"PRId64".\n", time); + return false; + }; + + std::set& tokenSet = itb->second.setTokens; + std::set::iterator it; + SecMsgToken token; + unsigned char* p = &vchData[8]; + for (int i = 0; i < n; ++i) + { + memcpy(&token.timestamp, p, 8); + memcpy(&token.sample, p+8, 8); + + it = tokenSet.find(token); + if (it == tokenSet.end()) + { + if (fDebugSmsg) + printf("Don't have wanted message %"PRId64".\n", token.timestamp); + } else + { + //printf("Have message at %"PRId64".\n", it->offset); // DEBUG + token.offset = it->offset; + //printf("winb before SecureMsgRetrieve %"PRId64".\n", token.timestamp); + + // -- place in vchOne so if SecureMsgRetrieve fails it won't corrupt vchBunch + if (SecureMsgRetrieve(token, vchOne) == 0) + { + nBunch++; + vchBunch.insert(vchBunch.end(), vchOne.begin(), vchOne.end()); // append + } else + { + printf("SecureMsgRetrieve failed %"PRId64".\n", token.timestamp); + }; + + if (nBunch >= 500 + || vchBunch.size() >= 96000) + { + if (fDebugSmsg) + printf("Break bunch %u, %"PRIszu".\n", nBunch, vchBunch.size()); + break; // end here, peer will send more want messages if needed. + }; + }; + p += 16; + }; + + if (nBunch > 0) + { + if (fDebugSmsg) + printf("Sending block of %u messages for bucket %"PRId64".\n", nBunch, time); + + memcpy(&vchBunch[0], &nBunch, 4); + memcpy(&vchBunch[4], &time, 8); + pfrom->PushMessage("smsgMsg", vchBunch); + }; + } else + if (strCommand == "smsgMsg") + { + std::vector vchData; + vRecv >> vchData; + + if (fDebugSmsg) + printf("smsgMsg vchData.size() %"PRIszu".\n", vchData.size()); + + SecureMsgReceive(pfrom, vchData); + } else + if (strCommand == "smsgMatch") + { + std::vector vchData; + vRecv >> vchData; + + + if (vchData.size() < 8) + { + printf("smsgMatch, not enough data %"PRIszu".\n", vchData.size()); + pfrom->Misbehaving(1); + return false; + }; + + int64_t time; + memcpy(&time, &vchData[0], 8); + + int64_t now = GetTime(); + if (time > now + SMSG_TIME_LEEWAY) + { + printf("Warning: Peer buckets matched in the future: %"PRId64".\nEither this node or the peer node has the incorrect time set.\n", time); + if (fDebugSmsg) + printf("Peer match time set to now.\n"); + time = now; + }; + + pfrom->smsgData.lastMatched = time; + + if (fDebugSmsg) + printf("Peer buckets matched at %"PRId64".\n", time); + + } else + if (strCommand == "smsgPing") + { + // -- smsgPing is the initial message, send reply + pfrom->PushMessage("smsgPong"); + } else + if (strCommand == "smsgPong") + { + if (fDebugSmsg) + printf("Peer replied, secure messaging enabled.\n"); + + pfrom->smsgData.fEnabled = true; + } else + if (strCommand == "smsgDisabled") + { + // -- peer has disabled secure messaging. + + pfrom->smsgData.fEnabled = false; + + if (fDebugSmsg) + printf("Peer %u has disabled secure messaging.\n", pfrom->smsgData.nPeerId); + + } else + if (strCommand == "smsgIgnore") + { + // -- peer is reporting that it will ignore this node until time. + // Ignore peer too + std::vector vchData; + vRecv >> vchData; + + if (vchData.size() < 8) + { + printf("smsgIgnore, not enough data %"PRIszu".\n", vchData.size()); + pfrom->Misbehaving(1); + return false; + }; + + int64_t time; + memcpy(&time, &vchData[0], 8); + + pfrom->smsgData.ignoreUntil = time; + + if (fDebugSmsg) + printf("Peer %u is ignoring this node until %"PRId64", ignore peer too.\n", pfrom->smsgData.nPeerId, time); + } else + { + // Unknown message + }; + + }; // LOCK(cs_smsg); + + return true; +}; + +bool SecureMsgSendData(CNode* pto, bool fSendTrickle) +{ + /* + Called from ProcessMessage + Runs in ThreadMessageHandler2 + */ + + //printf("SecureMsgSendData() %s.\n", pto->addrName.c_str()); + + + int64_t now = GetTime(); + + if (pto->smsgData.lastSeen == 0) + { + // -- first contact + pto->smsgData.nPeerId = nPeerIdCounter++; + if (fDebugSmsg) + printf("SecureMsgSendData() new node %s, peer id %u.\n", pto->addrName.c_str(), pto->smsgData.nPeerId); + // -- Send smsgPing once, do nothing until receive 1st smsgPong (then set fEnabled) + pto->PushMessage("smsgPing"); + pto->smsgData.lastSeen = GetTime(); + return true; + } else + if (!pto->smsgData.fEnabled + || now - pto->smsgData.lastSeen < SMSG_SEND_DELAY + || now < pto->smsgData.ignoreUntil) + { + return true; + }; + + // -- When nWakeCounter == 0, resend bucket inventory. + if (pto->smsgData.nWakeCounter < 1) + { + pto->smsgData.lastMatched = 0; + pto->smsgData.nWakeCounter = 10 + GetRandInt(300); // set to a random time between [10, 300] * SMSG_SEND_DELAY seconds + + if (fDebugSmsg) + printf("SecureMsgSendData(): nWakeCounter expired, sending bucket inventory to %s.\n" + "Now %"PRId64" next wake counter %u\n", pto->addrName.c_str(), now, pto->smsgData.nWakeCounter); + }; + pto->smsgData.nWakeCounter--; + + { + LOCK(cs_smsg); + std::map::iterator it; + + uint32_t nBuckets = smsgBuckets.size(); + if (nBuckets > 0) // no need to send keep alive pkts, coin messages already do that + { + std::vector vchData; + // should reserve? + vchData.reserve(4 + nBuckets*16); // timestamp + size + hash + + uint32_t nBucketsShown = 0; + vchData.resize(4); + + unsigned char* p = &vchData[4]; + for (it = smsgBuckets.begin(); it != smsgBuckets.end(); ++it) + { + SecMsgBucket &bkt = it->second; + + uint32_t nMessages = bkt.setTokens.size(); + + if (bkt.timeChanged < pto->smsgData.lastMatched // peer has this bucket + || nMessages < 1) // this bucket is empty + continue; + + + uint32_t hash = bkt.hash; + + try { + vchData.resize(vchData.size() + 16); + } catch (std::exception& e) { + printf("vchData.resize %"PRIszu" threw: %s.\n", vchData.size() + 16, e.what()); + continue; + }; + memcpy(p, &it->first, 8); + memcpy(p+8, &nMessages, 4); + memcpy(p+12, &hash, 4); + + p += 16; + nBucketsShown++; + //if (fDebug) + // printf("Sending bucket %"PRId64", size %d \n", it->first, it->second.size()); + }; + + if (vchData.size() > 4) + { + memcpy(&vchData[0], &nBucketsShown, 4); + if (fDebugSmsg) + printf("Sending %d bucket headers.\n", nBucketsShown); + + pto->PushMessage("smsgInv", vchData); + }; + }; + } + + pto->smsgData.lastSeen = GetTime(); + + return true; +}; + + +static int SecureMsgInsertAddress(CKeyID& hashKey, CPubKey& pubKey, SecMsgDB& addrpkdb) +{ + /* insert key hash and public key to addressdb + + should have LOCK(cs_smsg) where db is opened + + returns + 0 success + 1 error + 4 address is already in db + */ + + + if (addrpkdb.ExistsPK(hashKey)) + { + //printf("DB already contains public key for address.\n"); + CPubKey cpkCheck; + if (!addrpkdb.ReadPK(hashKey, cpkCheck)) + { + printf("addrpkdb.Read failed.\n"); + } else + { + if (cpkCheck != pubKey) + printf("DB already contains existing public key that does not match .\n"); + }; + return 4; + }; + + if (!addrpkdb.WritePK(hashKey, pubKey)) + { + printf("Write pair failed.\n"); + return 1; + }; + + return 0; +}; + +int SecureMsgInsertAddress(CKeyID& hashKey, CPubKey& pubKey) +{ + int rv; + { + LOCK(cs_smsgDB); + SecMsgDB addrpkdb; + + if (!addrpkdb.Open("cr+")) + return 1; + + rv = SecureMsgInsertAddress(hashKey, pubKey, addrpkdb); + } + return rv; +}; + + +static bool ScanBlock(CBlock& block, CTxDB& txdb, SecMsgDB& addrpkdb, + uint32_t& nTransactions, uint32_t& nInputs, uint32_t& nPubkeys, uint32_t& nDuplicates) +{ + // -- should have LOCK(cs_smsg) where db is opened + BOOST_FOREACH(CTransaction& tx, block.vtx) + { + if (!tx.IsStandard()) + continue; // leave out coinbase and others + + /* + Look at the inputs of every tx. + If the inputs are standard, get the pubkey from scriptsig and + look for the corresponding output (the input(output of other tx) to the input of this tx) + get the address from scriptPubKey + add to db if address is unique. + + Would make more sense to do this the other way around, get address first for early out. + + */ + + for (unsigned int i = 0; i < tx.vin.size(); i++) + { + CScript *script = &tx.vin[i].scriptSig; + + opcodetype opcode; + valtype vch; + CScript::const_iterator pc = script->begin(); + CScript::const_iterator pend = script->end(); + + uint256 prevoutHash; + CKey key; + + // -- matching address is in scriptPubKey of previous tx output + while (pc < pend) + { + if (!script->GetOp(pc, opcode, vch)) + break; + // -- opcode is the length of the following data, compressed public key is always 33 + if (opcode == 33) + { + key.SetPubKey(vch); + + key.SetCompressedPubKey(); // ensure key is compressed + CPubKey pubKey = key.GetPubKey(); + + if (!pubKey.IsValid() + || !pubKey.IsCompressed()) + { + printf("Public key is invalid %s.\n", ValueString(pubKey.Raw()).c_str()); + continue; + }; + + prevoutHash = tx.vin[i].prevout.hash; + CTransaction txOfPrevOutput; + if (!txdb.ReadDiskTx(prevoutHash, txOfPrevOutput)) + { + printf("Could not get transaction for hash: %s.\n", prevoutHash.ToString().c_str()); + continue; + }; + + unsigned int nOut = tx.vin[i].prevout.n; + if (nOut >= txOfPrevOutput.vout.size()) + { + printf("Output %u, not in transaction: %s.\n", nOut, prevoutHash.ToString().c_str()); + continue; + }; + + CTxOut *txOut = &txOfPrevOutput.vout[nOut]; + + CTxDestination addressRet; + if (!ExtractDestination(txOut->scriptPubKey, addressRet)) + { + printf("ExtractDestination failed: %s.\n", prevoutHash.ToString().c_str()); + break; + }; + + + CTrianglesAddress coinAddress(addressRet); + CKeyID hashKey; + if (!coinAddress.GetKeyID(hashKey)) + { + printf("coinAddress.GetKeyID failed: %s.\n", coinAddress.ToString().c_str()); + break; + }; + + int rv = SecureMsgInsertAddress(hashKey, pubKey, addrpkdb); + if (rv != 0) + { + if (rv == 4) + nDuplicates++; + break; + }; + nPubkeys++; + break; + }; + + //printf("opcode %d, %s, value %s.\n", opcode, GetOpName(opcode), ValueString(vch).c_str()); + }; + nInputs++; + }; + nTransactions++; + + if (nTransactions % 10000 == 0) // for ScanChainForPublicKeys + { + printf("Scanning transaction no. %u.\n", nTransactions); + }; + }; + return true; +}; + + +bool SecureMsgScanBlock(CBlock& block) +{ + /* + scan block for public key addresses + called from ProcessMessage() in main where strCommand == "block" + */ + + if (fDebugSmsg) + printf("SecureMsgScanBlock().\n"); + + uint32_t nTransactions = 0; + uint32_t nInputs = 0; + uint32_t nPubkeys = 0; + uint32_t nDuplicates = 0; + + { + LOCK(cs_smsgDB); + CTxDB txdb("r"); + + SecMsgDB addrpkdb; + if (!addrpkdb.Open("cw") + || !addrpkdb.TxnBegin()) + return false; + + ScanBlock(block, txdb, addrpkdb, + nTransactions, nInputs, nPubkeys, nDuplicates); + + addrpkdb.TxnCommit(); + } + + if (fDebugSmsg) + printf("Found %u transactions, %u inputs, %u new public keys, %u duplicates.\n", nTransactions, nInputs, nPubkeys, nDuplicates); + + return true; +}; + +bool ScanChainForPublicKeys(CBlockIndex* pindexStart) +{ + printf("Scanning block chain for public keys.\n"); + int64_t nStart = GetTimeMillis(); + + if (fDebugSmsg) + printf("From height %u.\n", pindexStart->nHeight); + + // -- public keys are in txin.scriptSig + // matching addresses are in scriptPubKey of txin's referenced output + + uint32_t nBlocks = 0; + uint32_t nTransactions = 0; + uint32_t nInputs = 0; + uint32_t nPubkeys = 0; + uint32_t nDuplicates = 0; + + { + LOCK(cs_smsgDB); + + CTxDB txdb("r"); + + SecMsgDB addrpkdb; + if (!addrpkdb.Open("cw") + || !addrpkdb.TxnBegin()) + return false; + + CBlockIndex* pindex = pindexStart; + while (pindex) + { + nBlocks++; + CBlock block; + block.ReadFromDisk(pindex, true); + + ScanBlock(block, txdb, addrpkdb, + nTransactions, nInputs, nPubkeys, nDuplicates); + + pindex = pindex->pnext; + }; + + addrpkdb.TxnCommit(); + }; + + printf("Scanned %u blocks, %u transactions, %u inputs\n", nBlocks, nTransactions, nInputs); + printf("Found %u public keys, %u duplicates.\n", nPubkeys, nDuplicates); + printf("Took %"PRId64" ms\n", GetTimeMillis() - nStart); + + return true; +}; + +bool SecureMsgScanBlockChain() +{ + TRY_LOCK(cs_main, lockMain); + if (lockMain) + { + CBlockIndex *pindexScan = pindexGenesisBlock; + if (pindexScan == NULL) + { + printf("Error: pindexGenesisBlock not set.\n"); + return false; + }; + + + try { // -- in try to catch errors opening db, + if (!ScanChainForPublicKeys(pindexScan)) + return false; + } catch (std::exception& e) + { + printf("ScanChainForPublicKeys() threw: %s.\n", e.what()); + return false; + }; + } else + { + printf("ScanChainForPublicKeys() Could not lock main.\n"); + return false; + }; + + return true; +}; + +bool SecureMsgScanBuckets() +{ + if (fDebugSmsg) + printf("SecureMsgScanBuckets()\n"); + + if (!fSecMsgEnabled + || pwalletMain->IsLocked()) + return false; + + int64_t mStart = GetTimeMillis(); + int64_t now = GetTime(); + uint32_t nFiles = 0; + uint32_t nMessages = 0; + uint32_t nFoundMessages = 0; + + fs::path pathSmsgDir = GetDataDir() / "smsgStore"; + fs::directory_iterator itend; + + if (!fs::exists(pathSmsgDir) + || !fs::is_directory(pathSmsgDir)) + { + printf("Message store directory does not exist.\n"); + return 0; // not an error + }; + + SecureMessage smsg; + std::vector vchData; + + for (fs::directory_iterator itd(pathSmsgDir) ; itd != itend ; ++itd) + { + if (!fs::is_regular_file(itd->status())) + continue; + + std::string fileType = (*itd).path().extension().string(); + + if (fileType.compare(".dat") != 0) + continue; + + std::string fileName = (*itd).path().filename().string(); + + + if (fDebugSmsg) + printf("Processing file: %s.\n", fileName.c_str()); + + nFiles++; + + // TODO files must be split if > 2GB + // time_noFile.dat + size_t sep = fileName.find_first_of("_"); + if (sep == std::string::npos) + continue; + + std::string stime = fileName.substr(0, sep); + + int64_t fileTime = boost::lexical_cast(stime); + + if (fileTime < now - SMSG_RETENTION) + { + printf("Dropping file %s, expired.\n", fileName.c_str()); + try { + fs::remove((*itd).path()); + } catch (const fs::filesystem_error& ex) + { + printf("Error removing bucket file %s, %s.\n", fileName.c_str(), ex.what()); + }; + continue; + }; + + if (boost::algorithm::ends_with(fileName, "_wl.dat")) + { + if (fDebugSmsg) + printf("Skipping wallet locked file: %s.\n", fileName.c_str()); + continue; + }; + + { + LOCK(cs_smsg); + FILE *fp; + errno = 0; + if (!(fp = fopen((*itd).path().string().c_str(), "rb"))) + { + printf("Error opening file: %s\n", strerror(errno)); + continue; + }; + + for (;;) + { + errno = 0; + if (fread(&smsg.hash[0], sizeof(unsigned char), SMSG_HDR_LEN, fp) != (size_t)SMSG_HDR_LEN) + { + if (errno != 0) + { + printf("fread header failed: %s\n", strerror(errno)); + } else + { + //printf("End of file.\n"); + }; + break; + }; + + try { + vchData.resize(smsg.nPayload); + } catch (std::exception& e) + { + printf("SecureMsgWalletUnlocked(): Could not resize vchData, %u, %s\n", smsg.nPayload, e.what()); + fclose(fp); + return 1; + }; + + if (fread(&vchData[0], sizeof(unsigned char), smsg.nPayload, fp) != smsg.nPayload) + { + printf("fread data failed: %s\n", strerror(errno)); + break; + }; + + // -- don't report to gui, + int rv = SecureMsgScanMessage(&smsg.hash[0], &vchData[0], smsg.nPayload, false); + + if (rv == 0) + { + nFoundMessages++; + } else + if (rv != 0) + { + // SecureMsgScanMessage failed + }; + + nMessages ++; + }; + + fclose(fp); + + // -- remove wl file when scanned + try { + fs::remove((*itd).path()); + } catch (const boost::filesystem::filesystem_error& ex) + { + printf("Error removing wl file %s - %s\n", fileName.c_str(), ex.what()); + return 1; + }; + }; + }; + + printf("Processed %u files, scanned %u messages, received %u messages.\n", nFiles, nMessages, nFoundMessages); + printf("Took %"PRId64" ms\n", GetTimeMillis() - mStart); + + return true; +} + + +int SecureMsgWalletUnlocked() +{ + /* + When the wallet is unlocked scan messages received while wallet was locked. + */ + if (!fSecMsgEnabled) + return 0; + + + printf("SecureMsgWalletUnlocked()\n"); + + if (pwalletMain->IsLocked()) + { + printf("Error: Wallet is locked.\n"); + return 1; + }; + + int64_t now = GetTime(); + uint32_t nFiles = 0; + uint32_t nMessages = 0; + uint32_t nFoundMessages = 0; + + fs::path pathSmsgDir = GetDataDir() / "smsgStore"; + fs::directory_iterator itend; + + if (!fs::exists(pathSmsgDir) + || !fs::is_directory(pathSmsgDir)) + { + printf("Message store directory does not exist.\n"); + return 0; // not an error + }; + + SecureMessage smsg; + std::vector vchData; + + for (fs::directory_iterator itd(pathSmsgDir) ; itd != itend ; ++itd) + { + if (!fs::is_regular_file(itd->status())) + continue; + + std::string fileName = (*itd).path().filename().string(); + + if (!boost::algorithm::ends_with(fileName, "_wl.dat")) + continue; + + if (fDebugSmsg) + printf("Processing file: %s.\n", fileName.c_str()); + + nFiles++; + + // TODO files must be split if > 2GB + // time_noFile_wl.dat + size_t sep = fileName.find_first_of("_"); + if (sep == std::string::npos) + continue; + + std::string stime = fileName.substr(0, sep); + + int64_t fileTime = boost::lexical_cast(stime); + + if (fileTime < now - SMSG_RETENTION) + { + printf("Dropping wallet locked file %s, expired.\n", fileName.c_str()); + try { + fs::remove((*itd).path()); + } catch (const boost::filesystem::filesystem_error& ex) + { + printf("Error removing wl file %s - %s\n", fileName.c_str(), ex.what()); + return 1; + }; + continue; + }; + + { + LOCK(cs_smsg); + FILE *fp; + errno = 0; + if (!(fp = fopen((*itd).path().string().c_str(), "rb"))) + { + printf("Error opening file: %s\n", strerror(errno)); + continue; + }; + + for (;;) + { + errno = 0; + if (fread(&smsg.hash[0], sizeof(unsigned char), SMSG_HDR_LEN, fp) != (size_t)SMSG_HDR_LEN) + { + if (errno != 0) + { + printf("fread header failed: %s\n", strerror(errno)); + } else + { + //printf("End of file.\n"); + }; + break; + }; + + try { + vchData.resize(smsg.nPayload); + } catch (std::exception& e) + { + printf("SecureMsgWalletUnlocked(): Could not resize vchData, %u, %s\n", smsg.nPayload, e.what()); + fclose(fp); + return 1; + }; + + if (fread(&vchData[0], sizeof(unsigned char), smsg.nPayload, fp) != smsg.nPayload) + { + printf("fread data failed: %s\n", strerror(errno)); + break; + }; + + // -- don't report to gui, + int rv = SecureMsgScanMessage(&smsg.hash[0], &vchData[0], smsg.nPayload, false); + + if (rv == 0) + { + nFoundMessages++; + } else + if (rv != 0) + { + // SecureMsgScanMessage failed + }; + + nMessages ++; + }; + + fclose(fp); + + // -- remove wl file when scanned + try { + fs::remove((*itd).path()); + } catch (const boost::filesystem::filesystem_error& ex) + { + printf("Error removing wl file %s - %s\n", fileName.c_str(), ex.what()); + return 1; + }; + }; + }; + + printf("Processed %u files, scanned %u messages, received %u messages.\n", nFiles, nMessages, nFoundMessages); + + // -- notify gui + NotifySecMsgWalletUnlocked(); + + return 0; +}; + +int SecureMsgWalletKeyChanged(std::string sAddress, std::string sLabel, ChangeType mode) +{ + if (!fSecMsgEnabled) + return 0; + + printf("SecureMsgWalletKeyChanged()\n"); + + // TODO: default recv and recvAnon + + { + LOCK(cs_smsg); + + switch(mode) + { + case CT_NEW: + smsgAddresses.push_back(SecMsgAddress(sAddress, smsgOptions.fNewAddressRecv, smsgOptions.fNewAddressAnon)); + break; + case CT_DELETED: + for (std::vector::iterator it = smsgAddresses.begin(); it != smsgAddresses.end(); ++it) + { + if (sAddress != it->sAddress) + continue; + smsgAddresses.erase(it); + break; + }; + break; + default: + break; + } + + }; // LOCK(cs_smsg); + + + return 0; +}; + +int SecureMsgScanMessage(unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload, bool reportToGui) +{ + /* + Check if message belongs to this node. + If so add to inbox db. + + if !reportToGui don't fire NotifySecMsgInboxChanged + - loads messages received when wallet locked in bulk. + + returns + 0 success, + 1 error + 2 no match + 3 wallet is locked - message stored for scanning later. + */ + + if (fDebugSmsg) + printf("SecureMsgScanMessage()\n"); + + if (pwalletMain->IsLocked()) + { + if (fDebugSmsg) + printf("ScanMessage: Wallet is locked, storing message to scan later.\n"); + + int rv; + if ((rv = SecureMsgStoreUnscanned(pHeader, pPayload, nPayload)) != 0) + return 1; + + return 3; + }; + + std::string addressTo; + MessageData msg; // placeholder + bool fOwnMessage = false; + + for (std::vector::iterator it = smsgAddresses.begin(); it != smsgAddresses.end(); ++it) + { + if (!it->fReceiveEnabled) + continue; + + CTrianglesAddress coinAddress(it->sAddress); + addressTo = coinAddress.ToString(); + + if (!it->fReceiveAnon) + { + // -- have to do full decrypt to see address from + if (SecureMsgDecrypt(false, addressTo, pHeader, pPayload, nPayload, msg) == 0) + { + if (fDebugSmsg) + printf("Decrypted message with %s.\n", addressTo.c_str()); + + if (msg.sFromAddress.compare("anon") != 0) + fOwnMessage = true; + break; + }; + } else + { + + if (SecureMsgDecrypt(true, addressTo, pHeader, pPayload, nPayload, msg) == 0) + { + if (fDebugSmsg) + printf("Decrypted message with %s.\n", addressTo.c_str()); + + fOwnMessage = true; + break; + }; + } + }; + + if (fOwnMessage) + { + // -- save to inbox + SecureMessage* psmsg = (SecureMessage*) pHeader; + std::string sPrefix("im"); + unsigned char chKey[18]; + memcpy(&chKey[0], sPrefix.data(), 2); + memcpy(&chKey[2], &psmsg->timestamp, 8); + memcpy(&chKey[10], pPayload, 8); + + SecMsgStored smsgInbox; + smsgInbox.timeReceived = GetTime(); + smsgInbox.status = (SMSG_MASK_UNREAD) & 0xFF; + smsgInbox.sAddrTo = addressTo; + + // -- data may not be contiguous + try { + smsgInbox.vchMessage.resize(SMSG_HDR_LEN + nPayload); + } catch (std::exception& e) { + printf("SecureMsgScanMessage(): Could not resize vchData, %u, %s\n", SMSG_HDR_LEN + nPayload, e.what()); + return 1; + }; + memcpy(&smsgInbox.vchMessage[0], pHeader, SMSG_HDR_LEN); + memcpy(&smsgInbox.vchMessage[SMSG_HDR_LEN], pPayload, nPayload); + + { + LOCK(cs_smsgDB); + SecMsgDB dbInbox; + + if (dbInbox.Open("cw")) + { + if (dbInbox.ExistsSmesg(chKey)) + { + if (fDebugSmsg) + printf("Message already exists in inbox db.\n"); + } else + { + dbInbox.WriteSmesg(chKey, smsgInbox); + + if (reportToGui) + NotifySecMsgInboxChanged(smsgInbox); + printf("SecureMsg saved to inbox, received with %s.\n", addressTo.c_str()); + }; + }; + } + }; + + return 0; +}; + +int SecureMsgGetLocalKey(CKeyID& ckid, CPubKey& cpkOut) +{ + if (fDebugSmsg) + printf("SecureMsgGetLocalKey()\n"); + + CKey key; + if (!pwalletMain->GetKey(ckid, key)) + return 4; + + key.SetCompressedPubKey(); // make sure key is compressed + + cpkOut = key.GetPubKey(); + if (!cpkOut.IsValid() + || !cpkOut.IsCompressed()) + { + printf("Public key is invalid %s.\n", ValueString(cpkOut.Raw()).c_str()); + return 1; + }; + + return 0; +}; + +int SecureMsgGetLocalPublicKey(std::string& strAddress, std::string& strPublicKey) +{ + /* returns + 0 success, + 1 error + 2 invalid address + 3 address does not refer to a key + 4 address not in wallet + */ + + CTrianglesAddress address; + if (!address.SetString(strAddress)) + return 2; // Invalid coin address + + CKeyID keyID; + if (!address.GetKeyID(keyID)) + return 3; + + int rv; + CPubKey pubKey; + if ((rv = SecureMsgGetLocalKey(keyID, pubKey)) != 0) + return rv; + + strPublicKey = EncodeBase58(pubKey.Raw()); + + return 0; +}; + +int SecureMsgGetStoredKey(CKeyID& ckid, CPubKey& cpkOut) +{ + /* returns + 0 success, + 1 error + 2 public key not in database + */ + if (fDebugSmsg) + printf("SecureMsgGetStoredKey().\n"); + + { + LOCK(cs_smsgDB); + SecMsgDB addrpkdb; + + if (!addrpkdb.Open("r")) + return 1; + + if (!addrpkdb.ReadPK(ckid, cpkOut)) + { + //printf("addrpkdb.Read failed: %s.\n", coinAddress.ToString().c_str()); + return 2; + }; + } + + return 0; +}; + +int SecureMsgAddAddress(std::string& address, std::string& publicKey) +{ + /* + Add address and matching public key to the database + address and publicKey are in base58 + + returns + 0 success + 1 error + 2 publicKey is invalid + 3 publicKey != address + 4 address is already in db + 5 address is invalid + */ + + CTrianglesAddress coinAddress(address); + + if (!coinAddress.IsValid()) + { + printf("Address is not valid: %s.\n", address.c_str()); + return 5; + }; + + CKeyID hashKey; + + if (!coinAddress.GetKeyID(hashKey)) + { + printf("coinAddress.GetKeyID failed: %s.\n", coinAddress.ToString().c_str()); + return 5; + }; + + std::vector vchTest; + DecodeBase58(publicKey, vchTest); + CPubKey pubKey(vchTest); + + // -- check that public key matches address hash + CKey keyT; + if (!keyT.SetPubKey(pubKey)) + { + printf("SetPubKey failed.\n"); + return 2; + }; + + keyT.SetCompressedPubKey(); + CPubKey pubKeyT = keyT.GetPubKey(); + + CTrianglesAddress addressT(address); + + if (addressT.ToString().compare(address) != 0) + { + printf("Public key does not hash to address, addressT %s.\n", addressT.ToString().c_str()); + return 3; + }; + + return SecureMsgInsertAddress(hashKey, pubKey); +}; + +int SecureMsgRetrieve(SecMsgToken &token, std::vector& vchData) +{ + if (fDebugSmsg) + printf("SecureMsgRetrieve() %"PRId64".\n", token.timestamp); + + // -- has cs_smsg lock from SecureMsgReceiveData + + fs::path pathSmsgDir = GetDataDir() / "smsgStore"; + + //printf("token.offset %"PRId64".\n", token.offset); // DEBUG + int64_t bucket = token.timestamp - (token.timestamp % SMSG_BUCKET_LEN); + std::string fileName = boost::lexical_cast(bucket) + "_01.dat"; + fs::path fullpath = pathSmsgDir / fileName; + + //printf("bucket %"PRId64".\n", bucket); + //printf("bucket lld %lld.\n", bucket); + //printf("fileName %s.\n", fileName.c_str()); + + FILE *fp; + errno = 0; + if (!(fp = fopen(fullpath.string().c_str(), "rb"))) + { + printf("Error opening file: %s\nPath %s\n", strerror(errno), fullpath.string().c_str()); + return 1; + }; + + errno = 0; + if (fseek(fp, token.offset, SEEK_SET) != 0) + { + printf("fseek, strerror: %s.\n", strerror(errno)); + fclose(fp); + return 1; + }; + + SecureMessage smsg; + errno = 0; + if (fread(&smsg.hash[0], sizeof(unsigned char), SMSG_HDR_LEN, fp) != (size_t)SMSG_HDR_LEN) + { + printf("fread header failed: %s\n", strerror(errno)); + fclose(fp); + return 1; + }; + + try { + vchData.resize(SMSG_HDR_LEN + smsg.nPayload); + } catch (std::exception& e) { + printf("SecureMsgRetrieve(): Could not resize vchData, %u, %s\n", SMSG_HDR_LEN + smsg.nPayload, e.what()); + return 1; + }; + + memcpy(&vchData[0], &smsg.hash[0], SMSG_HDR_LEN); + errno = 0; + if (fread(&vchData[SMSG_HDR_LEN], sizeof(unsigned char), smsg.nPayload, fp) != smsg.nPayload) + { + printf("fread data failed: %s. Wanted %u bytes.\n", strerror(errno), smsg.nPayload); + fclose(fp); + return 1; + }; + + + fclose(fp); + + return 0; +}; + +int SecureMsgReceive(CNode* pfrom, std::vector& vchData) +{ + if (fDebugSmsg) + printf("SecureMsgReceive().\n"); + + if (vchData.size() < 12) // nBunch4 + timestamp8 + { + printf("Error: not enough data.\n"); + return 1; + }; + + uint32_t nBunch; + int64_t bktTime; + + memcpy(&nBunch, &vchData[0], 4); + memcpy(&bktTime, &vchData[4], 8); + + + // -- check bktTime () + // bucket may not exist yet - will be created when messages are added + int64_t now = GetTime(); + if (bktTime > now + SMSG_TIME_LEEWAY) + { + if (fDebugSmsg) + printf("bktTime > now.\n"); + // misbehave? + return 1; + } else + if (bktTime < now - SMSG_RETENTION) + { + if (fDebugSmsg) + printf("bktTime < now - SMSG_RETENTION.\n"); + // misbehave? + return 1; + }; + + std::map::iterator itb; + + if (nBunch == 0 || nBunch > 500) + { + printf("Error: Invalid no. messages received in bunch %u, for bucket %"PRId64".\n", nBunch, bktTime); + pfrom->Misbehaving(1); + + // -- release lock on bucket if it exists + itb = smsgBuckets.find(bktTime); + if (itb != smsgBuckets.end()) + itb->second.nLockCount = 0; + return 1; + }; + + uint32_t n = 12; + + for (uint32_t i = 0; i < nBunch; ++i) + { + if (vchData.size() - n < SMSG_HDR_LEN) + { + printf("Error: not enough data sent, n = %u.\n", n); + break; + }; + + SecureMessage* psmsg = (SecureMessage*) &vchData[n]; + + int rv; + if ((rv = SecureMsgValidate(&vchData[n], &vchData[n + SMSG_HDR_LEN], psmsg->nPayload)) != 0) + { + // message dropped + if (rv == 2) // invalid proof of work + { + pfrom->Misbehaving(10); + } else + { + pfrom->Misbehaving(1); + }; + continue; + }; + + // -- store message, but don't hash bucket + if (SecureMsgStore(&vchData[n], &vchData[n + SMSG_HDR_LEN], psmsg->nPayload, false) != 0) + { + // message dropped + break; // continue? + }; + + if (SecureMsgScanMessage(&vchData[n], &vchData[n + SMSG_HDR_LEN], psmsg->nPayload, true) != 0) + { + // message recipient is not this node (or failed) + }; + + n += SMSG_HDR_LEN + psmsg->nPayload; + }; + + // -- if messages have been added, bucket must exist now + itb = smsgBuckets.find(bktTime); + if (itb == smsgBuckets.end()) + { + if (fDebugSmsg) + printf("Don't have bucket %"PRId64".\n", bktTime); + return 1; + }; + + itb->second.nLockCount = 0; // this node has received data from peer, release lock + itb->second.nLockPeerId = 0; + itb->second.hashBucket(); + + return 0; +}; + +int SecureMsgStoreUnscanned(unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload) +{ + /* + When the wallet is locked a copy of each received message is stored to be scanned later if wallet is unlocked + */ + + if (fDebugSmsg) + printf("SecureMsgStoreUnscanned()\n"); + + if (!pHeader + || !pPayload) + { + printf("Error: null pointer to header or payload.\n"); + return 1; + }; + + SecureMessage* psmsg = (SecureMessage*) pHeader; + + fs::path pathSmsgDir; + try { + pathSmsgDir = GetDataDir() / "smsgStore"; + fs::create_directory(pathSmsgDir); + } catch (const boost::filesystem::filesystem_error& ex) + { + printf("Error: Failed to create directory %s - %s\n", pathSmsgDir.string().c_str(), ex.what()); + return 1; + }; + + int64_t now = GetTime(); + if (psmsg->timestamp > now + SMSG_TIME_LEEWAY) + { + printf("Message > now.\n"); + return 1; + } else + if (psmsg->timestamp < now - SMSG_RETENTION) + { + printf("Message < SMSG_RETENTION.\n"); + return 1; + }; + + int64_t bucket = psmsg->timestamp - (psmsg->timestamp % SMSG_BUCKET_LEN); + + std::string fileName = boost::lexical_cast(bucket) + "_01_wl.dat"; + fs::path fullpath = pathSmsgDir / fileName; + + FILE *fp; + errno = 0; + if (!(fp = fopen(fullpath.string().c_str(), "ab"))) + { + printf("Error opening file: %s\n", strerror(errno)); + return 1; + }; + + if (fwrite(pHeader, sizeof(unsigned char), SMSG_HDR_LEN, fp) != (size_t)SMSG_HDR_LEN + || fwrite(pPayload, sizeof(unsigned char), nPayload, fp) != nPayload) + { + printf("fwrite failed: %s\n", strerror(errno)); + fclose(fp); + return 1; + }; + + fclose(fp); + + return 0; +}; + + +int SecureMsgStore(unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload, bool fUpdateBucket) +{ + if (fDebugSmsg) + printf("SecureMsgStore()\n"); + + if (!pHeader + || !pPayload) + { + printf("Error: null pointer to header or payload.\n"); + return 1; + }; + + SecureMessage* psmsg = (SecureMessage*) pHeader; + + + long int ofs; + fs::path pathSmsgDir; + try { + pathSmsgDir = GetDataDir() / "smsgStore"; + fs::create_directory(pathSmsgDir); + } catch (const boost::filesystem::filesystem_error& ex) + { + printf("Error: Failed to create directory %s - %s\n", pathSmsgDir.string().c_str(), ex.what()); + return 1; + }; + + int64_t now = GetTime(); + if (psmsg->timestamp > now + SMSG_TIME_LEEWAY) + { + printf("Message > now.\n"); + return 1; + } else + if (psmsg->timestamp < now - SMSG_RETENTION) + { + printf("Message < SMSG_RETENTION.\n"); + return 1; + }; + + int64_t bucket = psmsg->timestamp - (psmsg->timestamp % SMSG_BUCKET_LEN); + + { + // -- must lock cs_smsg before calling + //LOCK(cs_smsg); + + SecMsgToken token(psmsg->timestamp, pPayload, nPayload, 0); + + std::set& tokenSet = smsgBuckets[bucket].setTokens; + std::set::iterator it; + it = tokenSet.find(token); + if (it != tokenSet.end()) + { + printf("Already have message.\n"); + if (fDebugSmsg) + { + printf("nPayload: %u\n", nPayload); + printf("bucket: %"PRId64"\n", bucket); + + printf("message ts: %"PRId64, token.timestamp); + std::vector vchShow; + vchShow.resize(8); + memcpy(&vchShow[0], token.sample, 8); + printf(" sample %s\n", ValueString(vchShow).c_str()); + /* + printf("\nmessages in bucket:\n"); + for (it = tokenSet.begin(); it != tokenSet.end(); ++it) + { + printf("message ts: %"PRId64, (*it).timestamp); + vchShow.resize(8); + memcpy(&vchShow[0], (*it).sample, 8); + printf(" sample %s\n", ValueString(vchShow).c_str()); + }; + */ + }; + return 1; + }; + + std::string fileName = boost::lexical_cast(bucket) + "_01.dat"; + fs::path fullpath = pathSmsgDir / fileName; + + FILE *fp; + errno = 0; + if (!(fp = fopen(fullpath.string().c_str(), "ab"))) + { + printf("Error opening file: %s\n", strerror(errno)); + return 1; + }; + + // -- on windows ftell will always return 0 after fopen(ab), call fseek to set. + errno = 0; + if (fseek(fp, 0, SEEK_END) != 0) + { + printf("Error fseek failed: %s\n", strerror(errno)); + return 1; + }; + + + ofs = ftell(fp); + + if (fwrite(pHeader, sizeof(unsigned char), SMSG_HDR_LEN, fp) != (size_t)SMSG_HDR_LEN + || fwrite(pPayload, sizeof(unsigned char), nPayload, fp) != nPayload) + { + printf("fwrite failed: %s\n", strerror(errno)); + fclose(fp); + return 1; + }; + + fclose(fp); + + token.offset = ofs; + + //printf("token.offset: %"PRId64"\n", token.offset); // DEBUG + tokenSet.insert(token); + + if (fUpdateBucket) + smsgBuckets[bucket].hashBucket(); + }; + + //if (fDebugSmsg) + printf("SecureMsg added to bucket %"PRId64".\n", bucket); + return 0; +}; + +int SecureMsgStore(SecureMessage& smsg, bool fUpdateBucket) +{ + return SecureMsgStore(&smsg.hash[0], smsg.pPayload, smsg.nPayload, fUpdateBucket); +}; + +int SecureMsgValidate(unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload) +{ + /* + returns + 0 success + 1 error + 2 invalid hash + 3 checksum mismatch + 4 invalid version + 5 payload is too large + */ + SecureMessage* psmsg = (SecureMessage*) pHeader; + + if (psmsg->version[0] != 1) + return 4; + + if (nPayload > SMSG_MAX_MSG_WORST) + return 5; + + unsigned char civ[32]; + unsigned char sha256Hash[32]; + int rv = 2; // invalid + + uint32_t nonse; + memcpy(&nonse, &psmsg->nonse[0], 4); + + if (fDebugSmsg) + printf("SecureMsgValidate() nonse %u.\n", nonse); + + for (int i = 0; i < 32; i+=4) + memcpy(civ+i, &nonse, 4); + + HMAC_CTX ctx; + HMAC_CTX_init(&ctx); + + unsigned int nBytes; + if (!HMAC_Init_ex(&ctx, &civ[0], 32, EVP_sha256(), NULL) + || !HMAC_Update(&ctx, (unsigned char*) pHeader+4, SMSG_HDR_LEN-4) + || !HMAC_Update(&ctx, (unsigned char*) pPayload, nPayload) + || !HMAC_Update(&ctx, pPayload, nPayload) + || !HMAC_Final(&ctx, sha256Hash, &nBytes) + || nBytes != 32) + { + if (fDebugSmsg) + printf("HMAC error.\n"); + rv = 1; // error + } else + { + if (sha256Hash[31] == 0 + && sha256Hash[30] == 0 + && (~(sha256Hash[29]) & ((1<<0) || (1<<1) || (1<<2)) )) + { + if (fDebugSmsg) + printf("Hash Valid.\n"); + rv = 0; // smsg is valid + }; + + if (memcmp(psmsg->hash, sha256Hash, 4) != 0) + { + if (fDebugSmsg) + printf("Checksum mismatch.\n"); + rv = 3; // checksum mismatch + } + } + HMAC_CTX_cleanup(&ctx); + + return rv; +}; + +int SecureMsgSetHash(unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload) +{ + /* proof of work and checksum + + May run in a thread, if shutdown detected, return. + + returns: + 0 success + 1 error + 2 stopped due to node shutdown + + */ + + SecureMessage* psmsg = (SecureMessage*) pHeader; + + int64_t nStart = GetTimeMillis(); + unsigned char civ[32]; + unsigned char sha256Hash[32]; + + //std::vector vchHash; + //vchHash.resize(32); + + bool found = false; + HMAC_CTX ctx; + HMAC_CTX_init(&ctx); + + uint32_t nonse = 0; + + //CBigNum bnTarget(2); + //bnTarget = bnTarget.pow(256 - 40); + + // -- break for HMAC_CTX_cleanup + for (;;) + { + if (!fSecMsgEnabled) + break; + + //psmsg->timestamp = GetTime(); + //memcpy(&psmsg->timestamp, &now, 8); + memcpy(&psmsg->nonse[0], &nonse, 4); + + for (int i = 0; i < 32; i+=4) + memcpy(civ+i, &nonse, 4); + + unsigned int nBytes; + if (!HMAC_Init_ex(&ctx, &civ[0], 32, EVP_sha256(), NULL) + || !HMAC_Update(&ctx, (unsigned char*) pHeader+4, SMSG_HDR_LEN-4) + || !HMAC_Update(&ctx, (unsigned char*) pPayload, nPayload) + || !HMAC_Update(&ctx, pPayload, nPayload) + || !HMAC_Final(&ctx, sha256Hash, &nBytes) + //|| !HMAC_Final(&ctx, &vchHash[0], &nBytes) + || nBytes != 32) + break; + + /* + if (CBigNum(vchHash) <= bnTarget) + { + found = true; + if (fDebugSmsg) + printf("Match %u\n", nonse); + break; + }; + */ + + if (sha256Hash[31] == 0 + && sha256Hash[30] == 0 + && (~(sha256Hash[29]) & ((1<<0) || (1<<1) || (1<<2)) )) + // && sha256Hash[29] == 0) + { + found = true; + //if (fDebugSmsg) + // printf("Match %u\n", nonse); + break; + } + + //if (nonse >= UINT32_MAX) + if (nonse >= 4294967295U) + { + if (fDebugSmsg) + printf("No match %u\n", nonse); + break; + //return 1; + } + nonse++; + }; + + HMAC_CTX_cleanup(&ctx); + + if (!fSecMsgEnabled) + { + if (fDebugSmsg) + printf("SecureMsgSetHash() stopped, shutdown detected.\n"); + return 2; + }; + + if (!found) + { + if (fDebugSmsg) + printf("SecureMsgSetHash() failed, took %"PRId64" ms, nonse %u\n", GetTimeMillis() - nStart, nonse); + return 1; + }; + + memcpy(psmsg->hash, sha256Hash, 4); + //memcpy(psmsg->hash, &vchHash[0], 4); + + if (fDebugSmsg) + printf("SecureMsgSetHash() took %"PRId64" ms, nonse %u\n", GetTimeMillis() - nStart, nonse); + + return 0; +}; + +int SecureMsgEncrypt(SecureMessage& smsg, std::string& addressFrom, std::string& addressTo, std::string& message) +{ + /* Create a secure message + + Using similar method to bitmessage. + If bitmessage is secure this should be too. + https://bitmessage.org/wiki/Encryption + + Some differences: + bitmessage seems to use curve sect283r1 + *coin addresses use secp256k1 + + returns + 2 message is too long. + 3 addressFrom is invalid. + 4 addressTo is invalid. + 5 Could not get public key for addressTo. + 6 ECDH_compute_key failed + 7 Could not get private key for addressFrom. + 8 Could not allocate memory. + 9 Could not compress message data. + 10 Could not generate MAC. + 11 Encrypt failed. + */ + + if (fDebugSmsg) + printf("SecureMsgEncrypt(%s, %s, ...)\n", addressFrom.c_str(), addressTo.c_str()); + + + if (message.size() > SMSG_MAX_MSG_BYTES) + { + printf("Message is too long, %"PRIszu".\n", message.size()); + return 2; + }; + + smsg.version[0] = 1; + smsg.version[1] = 1; + smsg.timestamp = GetTime(); + + + bool fSendAnonymous; + CTrianglesAddress coinAddrFrom; + CKeyID ckidFrom; + CKey keyFrom; + + if (addressFrom.compare("anon") == 0) + { + fSendAnonymous = true; + + } else + { + fSendAnonymous = false; + + if (!coinAddrFrom.SetString(addressFrom)) + { + printf("addressFrom is not valid.\n"); + return 3; + }; + + if (!coinAddrFrom.GetKeyID(ckidFrom)) + { + printf("coinAddrFrom.GetKeyID failed: %s.\n", coinAddrFrom.ToString().c_str()); + return 3; + }; + }; + + + CTrianglesAddress coinAddrDest; + CKeyID ckidDest; + + if (!coinAddrDest.SetString(addressTo)) + { + printf("addressTo is not valid.\n"); + return 4; + }; + + if (!coinAddrDest.GetKeyID(ckidDest)) + { + printf("coinAddrDest.GetKeyID failed: %s.\n", coinAddrDest.ToString().c_str()); + return 4; + }; + + // -- public key K is the destination address + CPubKey cpkDestK; + if (SecureMsgGetStoredKey(ckidDest, cpkDestK) != 0 + && SecureMsgGetLocalKey(ckidDest, cpkDestK) != 0) // maybe it's a local key (outbox?) + { + printf("Could not get public key for destination address.\n"); + return 5; + }; + + + // -- Generate 16 random bytes as IV. + RandAddSeedPerfmon(); + RAND_bytes(&smsg.iv[0], 16); + + + // -- Generate a new random EC key pair with private key called r and public key called R. + CKey keyR; + keyR.MakeNewKey(true); // make compressed key + + + // -- Do an EC point multiply with public key K and private key r. This gives you public key P. + CKey keyK; + if (!keyK.SetPubKey(cpkDestK)) + { + printf("Could not set pubkey for K: %s.\n", ValueString(cpkDestK.Raw()).c_str()); + return 4; // address to is invalid + }; + + std::vector vchP; + vchP.resize(32); + EC_KEY* pkeyr = keyR.GetECKey(); + EC_KEY* pkeyK = keyK.GetECKey(); + + // always seems to be 32, worth checking? + //int field_size = EC_GROUP_get_degree(EC_KEY_get0_group(pkeyr)); + //int secret_len = (field_size+7)/8; + //printf("secret_len %d.\n", secret_len); + + // -- ECDH_compute_key returns the same P if fed compressed or uncompressed public keys + ECDH_set_method(pkeyr, ECDH_OpenSSL()); + int lenP = ECDH_compute_key(&vchP[0], 32, EC_KEY_get0_public_key(pkeyK), pkeyr, NULL); + + if (lenP != 32) + { + printf("ECDH_compute_key failed, lenP: %d.\n", lenP); + return 6; + }; + + CPubKey cpkR = keyR.GetPubKey(); + if (!cpkR.IsValid() + || !cpkR.IsCompressed()) + { + printf("Could not get public key for key R.\n"); + return 1; + }; + + memcpy(smsg.cpkR, &cpkR.Raw()[0], 33); + + + // -- Use public key P and calculate the SHA512 hash H. + // The first 32 bytes of H are called key_e and the last 32 bytes are called key_m. + std::vector vchHashed; + vchHashed.resize(64); // 512 + SHA512(&vchP[0], vchP.size(), (unsigned char*)&vchHashed[0]); + std::vector key_e(&vchHashed[0], &vchHashed[0]+32); + std::vector key_m(&vchHashed[32], &vchHashed[32]+32); + + + std::vector vchPayload; + std::vector vchCompressed; + unsigned char* pMsgData; + uint32_t lenMsgData; + + uint32_t lenMsg = message.size(); + if (lenMsg > 128) + { + // -- only compress if over 128 bytes + int worstCase = LZ4_compressBound(message.size()); + try { + vchCompressed.resize(worstCase); + } catch (std::exception& e) { + printf("vchCompressed.resize %u threw: %s.\n", worstCase, e.what()); + return 8; + }; + + int lenComp = LZ4_compress((char*)message.c_str(), (char*)&vchCompressed[0], lenMsg); + if (lenComp < 1) + { + printf("Could not compress message data.\n"); + return 9; + }; + + pMsgData = &vchCompressed[0]; + lenMsgData = lenComp; + + } else + { + // -- no compression + pMsgData = (unsigned char*)message.c_str(); + lenMsgData = lenMsg; + }; + + if (fSendAnonymous) + { + try { + vchPayload.resize(9 + lenMsgData); + } catch (std::exception& e) { + printf("vchPayload.resize %u threw: %s.\n", 9 + lenMsgData, e.what()); + return 8; + }; + + memcpy(&vchPayload[9], pMsgData, lenMsgData); + + vchPayload[0] = 250; // id as anonymous message + // -- next 4 bytes are unused - there to ensure encrypted payload always > 8 bytes + memcpy(&vchPayload[5], &lenMsg, 4); // length of uncompressed plain text + } else + { + try { + vchPayload.resize(SMSG_PL_HDR_LEN + lenMsgData); + } catch (std::exception& e) { + printf("vchPayload.resize %u threw: %s.\n", SMSG_PL_HDR_LEN + lenMsgData, e.what()); + return 8; + }; + memcpy(&vchPayload[SMSG_PL_HDR_LEN], pMsgData, lenMsgData); + // -- compact signature proves ownership of from address and allows the public key to be recovered, recipient can always reply. + if (!pwalletMain->GetKey(ckidFrom, keyFrom)) + { + printf("Could not get private key for addressFrom.\n"); + return 7; + }; + + // -- sign the plaintext + std::vector vchSignature; + vchSignature.resize(65); + keyFrom.SignCompact(Hash(message.begin(), message.end()), vchSignature); + + // -- Save some bytes by sending address raw + vchPayload[0] = (static_cast(&coinAddrFrom))->getVersion(); // vchPayload[0] = coinAddrDest.nVersion; + memcpy(&vchPayload[1], (static_cast(&ckidFrom))->GetPPN(), 20); // memcpy(&vchPayload[1], ckidDest.pn, 20); + + memcpy(&vchPayload[1+20], &vchSignature[0], vchSignature.size()); + memcpy(&vchPayload[1+20+65], &lenMsg, 4); // length of uncompressed plain text + }; + + + SecMsgCrypter crypter; + crypter.SetKey(key_e, smsg.iv); + std::vector vchCiphertext; + + if (!crypter.Encrypt(&vchPayload[0], vchPayload.size(), vchCiphertext)) + { + printf("crypter.Encrypt failed.\n"); + return 11; + }; + + try { + smsg.pPayload = new unsigned char[vchCiphertext.size()]; + } catch (std::exception& e) + { + printf("Could not allocate pPayload, exception: %s.\n", e.what()); + return 8; + }; + + memcpy(smsg.pPayload, &vchCiphertext[0], vchCiphertext.size()); + smsg.nPayload = vchCiphertext.size(); + + + // -- Calculate a 32 byte MAC with HMACSHA256, using key_m as salt + // Message authentication code, (hash of timestamp + destination + payload) + bool fHmacOk = true; + unsigned int nBytes = 32; + HMAC_CTX ctx; + HMAC_CTX_init(&ctx); + + if (!HMAC_Init_ex(&ctx, &key_m[0], 32, EVP_sha256(), NULL) + || !HMAC_Update(&ctx, (unsigned char*) &smsg.timestamp, sizeof(smsg.timestamp)) + || !HMAC_Update(&ctx, &vchCiphertext[0], vchCiphertext.size()) + || !HMAC_Final(&ctx, smsg.mac, &nBytes) + || nBytes != 32) + fHmacOk = false; + + HMAC_CTX_cleanup(&ctx); + + if (!fHmacOk) + { + printf("Could not generate MAC.\n"); + return 10; + }; + + + return 0; +}; + +int SecureMsgSend(std::string& addressFrom, std::string& addressTo, std::string& message, std::string& sError) +{ + /* Encrypt secure message, and place it on the network + Make a copy of the message to sender's first address and place in send queue db + proof of work thread will pick up messages from send queue db + + */ + + if (fDebugSmsg) + printf("SecureMsgSend(%s, %s, ...)\n", addressFrom.c_str(), addressTo.c_str()); + + if (pwalletMain->IsLocked()) + { + sError = "Wallet is locked, wallet must be unlocked to send and recieve messages."; + printf("Wallet is locked, wallet must be unlocked to send and recieve messages.\n"); + return 1; + }; + + if (message.size() > SMSG_MAX_MSG_BYTES) + { + std::ostringstream oss; + oss << message.size() << " > " << SMSG_MAX_MSG_BYTES; + sError = "Message is too long, " + oss.str(); + printf("Message is too long, %"PRIszu".\n", message.size()); + return 1; + }; + + + int rv; + SecureMessage smsg; + + if ((rv = SecureMsgEncrypt(smsg, addressFrom, addressTo, message)) != 0) + { + printf("SecureMsgSend(), encrypt for recipient failed.\n"); + + switch(rv) + { + case 2: sError = "Message is too long."; break; + case 3: sError = "Invalid addressFrom."; break; + case 4: sError = "Invalid addressTo."; break; + case 5: sError = "Could not get public key for addressTo."; break; + case 6: sError = "ECDH_compute_key failed."; break; + case 7: sError = "Could not get private key for addressFrom."; break; + case 8: sError = "Could not allocate memory."; break; + case 9: sError = "Could not compress message data."; break; + case 10: sError = "Could not generate MAC."; break; + case 11: sError = "Encrypt failed."; break; + default: sError = "Unspecified Error."; break; + }; + + return rv; + }; + + + // -- Place message in send queue, proof of work will happen in a thread. + std::string sPrefix("qm"); + unsigned char chKey[18]; + memcpy(&chKey[0], sPrefix.data(), 2); + memcpy(&chKey[2], &smsg.timestamp, 8); + memcpy(&chKey[10], &smsg.pPayload, 8); + + SecMsgStored smsgSQ; + + smsgSQ.timeReceived = GetTime(); + smsgSQ.sAddrTo = addressTo; + + try { + smsgSQ.vchMessage.resize(SMSG_HDR_LEN + smsg.nPayload); + } catch (std::exception& e) { + printf("smsgSQ.vchMessage.resize %u threw: %s.\n", SMSG_HDR_LEN + smsg.nPayload, e.what()); + sError = "Could not allocate memory."; + return 8; + }; + + memcpy(&smsgSQ.vchMessage[0], &smsg.hash[0], SMSG_HDR_LEN); + memcpy(&smsgSQ.vchMessage[SMSG_HDR_LEN], smsg.pPayload, smsg.nPayload); + + { + LOCK(cs_smsgDB); + SecMsgDB dbSendQueue; + if (dbSendQueue.Open("cw")) + { + dbSendQueue.WriteSmesg(chKey, smsgSQ); + //NotifySecMsgSendQueueChanged(smsgOutbox); + }; + } + + // TODO: only update outbox when proof of work thread is done. + + // -- for outbox create a copy encrypted for owned address + // if the wallet is encrypted private key needed to decrypt will be unavailable + + if (fDebugSmsg) + printf("Encrypting message for outbox.\n"); + + std::string addressOutbox = "None"; + CTrianglesAddress coinAddrOutbox; + + BOOST_FOREACH(const PAIRTYPE(CTxDestination, std::string)& entry, pwalletMain->mapAddressBook) + { + // -- get first owned address + if (!IsMine(*pwalletMain, entry.first)) + continue; + + const CTrianglesAddress& address = entry.first; + + addressOutbox = address.ToString(); + if (!coinAddrOutbox.SetString(addressOutbox)) // test valid + continue; + break; + }; + + if (addressOutbox == "None") + { + printf("Warning: SecureMsgSend() could not find an address to encrypt outbox message with.\n"); + } else + { + if (fDebugSmsg) + printf("Encrypting a copy for outbox, using address %s\n", addressOutbox.c_str()); + + SecureMessage smsgForOutbox; + if ((rv = SecureMsgEncrypt(smsgForOutbox, addressFrom, addressOutbox, message)) != 0) + { + printf("SecureMsgSend(), encrypt for outbox failed, %d.\n", rv); + } else + { + // -- save sent message to db + std::string sPrefix("sm"); + unsigned char chKey[18]; + memcpy(&chKey[0], sPrefix.data(), 2); + memcpy(&chKey[2], &smsgForOutbox.timestamp, 8); + memcpy(&chKey[10], &smsgForOutbox.pPayload, 8); // sample + + SecMsgStored smsgOutbox; + + smsgOutbox.timeReceived = GetTime(); + smsgOutbox.sAddrTo = addressTo; + smsgOutbox.sAddrOutbox = addressOutbox; + + try { + smsgOutbox.vchMessage.resize(SMSG_HDR_LEN + smsgForOutbox.nPayload); + } catch (std::exception& e) { + printf("smsgOutbox.vchMessage.resize %u threw: %s.\n", SMSG_HDR_LEN + smsgForOutbox.nPayload, e.what()); + sError = "Could not allocate memory."; + return 8; + }; + memcpy(&smsgOutbox.vchMessage[0], &smsgForOutbox.hash[0], SMSG_HDR_LEN); + memcpy(&smsgOutbox.vchMessage[SMSG_HDR_LEN], smsgForOutbox.pPayload, smsgForOutbox.nPayload); + + + { + LOCK(cs_smsgDB); + SecMsgDB dbSent; + + if (dbSent.Open("cw")) + { + dbSent.WriteSmesg(chKey, smsgOutbox); + NotifySecMsgOutboxChanged(smsgOutbox); + }; + } + }; + }; + + if (fDebugSmsg) + printf("Secure message queued for sending to %s.\n", addressTo.c_str()); + + return 0; +}; + + +int SecureMsgDecrypt(bool fTestOnly, std::string& address, unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload, MessageData& msg) +{ + /* Decrypt secure message + + address is the owned address to decrypt with. + + validate first in SecureMsgValidate + + returns + 1 Error + 2 Unknown version number + 3 Decrypt address is not valid. + 8 Could not allocate memory + */ + + if (fDebugSmsg) + printf("SecureMsgDecrypt(), using %s, testonly %d.\n", address.c_str(), fTestOnly); + + if (!pHeader + || !pPayload) + { + printf("Error: null pointer to header or payload.\n"); + return 1; + }; + + SecureMessage* psmsg = (SecureMessage*) pHeader; + + + if (psmsg->version[0] != 1) + { + printf("Unknown version number.\n"); + return 2; + }; + + + + // -- Fetch private key k, used to decrypt + CTrianglesAddress coinAddrDest; + CKeyID ckidDest; + CKey keyDest; + if (!coinAddrDest.SetString(address)) + { + printf("Address is not valid.\n"); + return 3; + }; + if (!coinAddrDest.GetKeyID(ckidDest)) + { + printf("coinAddrDest.GetKeyID failed: %s.\n", coinAddrDest.ToString().c_str()); + return 3; + }; + if (!pwalletMain->GetKey(ckidDest, keyDest)) + { + printf("Could not get private key for addressDest.\n"); + return 3; + }; + + + + CKey keyR; + std::vector vchR(psmsg->cpkR, psmsg->cpkR+33); // would be neater to override CPubKey() instead + CPubKey cpkR(vchR); + if (!cpkR.IsValid()) + { + printf("Could not get public key for key R.\n"); + return 1; + }; + if (!keyR.SetPubKey(cpkR)) + { + printf("Could not set pubkey for R: %s.\n", ValueString(cpkR.Raw()).c_str()); + return 1; + }; + + cpkR = keyR.GetPubKey(); + if (!cpkR.IsValid() + || !cpkR.IsCompressed()) + { + printf("Could not get compressed public key for key R.\n"); + return 1; + }; + + + // -- Do an EC point multiply with private key k and public key R. This gives you public key P. + std::vector vchP; + vchP.resize(32); + EC_KEY* pkeyk = keyDest.GetECKey(); + EC_KEY* pkeyR = keyR.GetECKey(); + + ECDH_set_method(pkeyk, ECDH_OpenSSL()); + int lenPdec = ECDH_compute_key(&vchP[0], 32, EC_KEY_get0_public_key(pkeyR), pkeyk, NULL); + + if (lenPdec != 32) + { + printf("ECDH_compute_key failed, lenPdec: %d.\n", lenPdec); + return 1; + }; + + + // -- Use public key P to calculate the SHA512 hash H. + // The first 32 bytes of H are called key_e and the last 32 bytes are called key_m. + std::vector vchHashedDec; + vchHashedDec.resize(64); // 512 bits + SHA512(&vchP[0], vchP.size(), (unsigned char*)&vchHashedDec[0]); + std::vector key_e(&vchHashedDec[0], &vchHashedDec[0]+32); + std::vector key_m(&vchHashedDec[32], &vchHashedDec[32]+32); + + + // -- Message authentication code, (hash of timestamp + destination + payload) + unsigned char MAC[32]; + bool fHmacOk = true; + unsigned int nBytes = 32; + HMAC_CTX ctx; + HMAC_CTX_init(&ctx); + + if (!HMAC_Init_ex(&ctx, &key_m[0], 32, EVP_sha256(), NULL) + || !HMAC_Update(&ctx, (unsigned char*) &psmsg->timestamp, sizeof(psmsg->timestamp)) + || !HMAC_Update(&ctx, pPayload, nPayload) + || !HMAC_Final(&ctx, MAC, &nBytes) + || nBytes != 32) + fHmacOk = false; + + HMAC_CTX_cleanup(&ctx); + + if (!fHmacOk) + { + printf("Could not generate MAC.\n"); + return 1; + }; + + if (memcmp(MAC, psmsg->mac, 32) != 0) + { + if (fDebugSmsg) + printf("MAC does not match.\n"); // expected if message is not to address on node + + return 1; + }; + + if (fTestOnly) + return 0; + + SecMsgCrypter crypter; + crypter.SetKey(key_e, psmsg->iv); + std::vector vchPayload; + if (!crypter.Decrypt(pPayload, nPayload, vchPayload)) + { + printf("Decrypt failed.\n"); + return 1; + }; + + msg.timestamp = psmsg->timestamp; + uint32_t lenData; + uint32_t lenPlain; + + unsigned char* pMsgData; + bool fFromAnonymous; + if ((uint32_t)vchPayload[0] == 250) + { + fFromAnonymous = true; + lenData = vchPayload.size() - (9); + memcpy(&lenPlain, &vchPayload[5], 4); + pMsgData = &vchPayload[9]; + } else + { + fFromAnonymous = false; + lenData = vchPayload.size() - (SMSG_PL_HDR_LEN); + memcpy(&lenPlain, &vchPayload[1+20+65], 4); + pMsgData = &vchPayload[SMSG_PL_HDR_LEN]; + }; + + try { + msg.vchMessage.resize(lenPlain + 1); + } catch (std::exception& e) { + printf("msg.vchMessage.resize %u threw: %s.\n", lenPlain + 1, e.what()); + return 8; + }; + + + if (lenPlain > 128) + { + // -- decompress + if (LZ4_decompress_safe((char*) pMsgData, (char*) &msg.vchMessage[0], lenData, lenPlain) != (int) lenPlain) + { + printf("Could not decompress message data.\n"); + return 1; + }; + } else + { + // -- plaintext + memcpy(&msg.vchMessage[0], pMsgData, lenPlain); + }; + + msg.vchMessage[lenPlain] = '\0'; + + if (fFromAnonymous) + { + // -- Anonymous sender + msg.sFromAddress = "anon"; + } else + { + std::vector vchUint160; + vchUint160.resize(20); + + memcpy(&vchUint160[0], &vchPayload[1], 20); + + uint160 ui160(vchUint160); + CKeyID ckidFrom(ui160); + + CTrianglesAddress coinAddrFrom; + coinAddrFrom.Set(ckidFrom); + if (!coinAddrFrom.IsValid()) + { + printf("From Addess is invalid.\n"); + return 1; + }; + + std::vector vchSig; + vchSig.resize(65); + + memcpy(&vchSig[0], &vchPayload[1+20], 65); + + CKey keyFrom; + keyFrom.SetCompactSignature(Hash(msg.vchMessage.begin(), msg.vchMessage.end()-1), vchSig); + CPubKey cpkFromSig = keyFrom.GetPubKey(); + if (!cpkFromSig.IsValid()) + { + printf("Signature validation failed.\n"); + return 1; + }; + + // -- get address for the compressed public key + CTrianglesAddress coinAddrFromSig; + coinAddrFromSig.Set(cpkFromSig.GetID()); + + if (!(coinAddrFrom == coinAddrFromSig)) + { + printf("Signature validation failed.\n"); + return 1; + }; + + cpkFromSig = keyFrom.GetPubKey(); + + int rv = 5; + try { + rv = SecureMsgInsertAddress(ckidFrom, cpkFromSig); + } catch (std::exception& e) { + printf("SecureMsgInsertAddress(), exception: %s.\n", e.what()); + //return 1; + }; + + switch(rv) + { + case 0: + printf("Sender public key added to db.\n"); + break; + case 4: + printf("Sender public key already in db.\n"); + break; + default: + printf("Error adding sender public key to db.\n"); + break; + }; + + msg.sFromAddress = coinAddrFrom.ToString(); + }; + + if (fDebugSmsg) + printf("Decrypted message for %s.\n", address.c_str()); + + return 0; +}; + +int SecureMsgDecrypt(bool fTestOnly, std::string& address, SecureMessage& smsg, MessageData& msg) +{ + return SecureMsgDecrypt(fTestOnly, address, &smsg.hash[0], smsg.pPayload, smsg.nPayload, msg); +}; + diff --git a/src/smessage.h b/src/smessage.h new file mode 100644 index 0000000..64414d7 --- /dev/null +++ b/src/smessage.h @@ -0,0 +1,380 @@ +// Copyright (c) 2014 The ShadowCoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef SEC_MESSAGE_H +#define SEC_MESSAGE_H + +#include +#include + +#include "net.h" +#include "db.h" +#include "wallet.h" +#include "lz4/lz4.h" + + +const unsigned int SMSG_HDR_LEN = 104; // length of unencrypted header, 4 + 2 + 1 + 8 + 16 + 33 + 32 + 4 +4 +const unsigned int SMSG_PL_HDR_LEN = 1+20+65+4; // length of encrypted header in payload + +const unsigned int SMSG_BUCKET_LEN = 60 * 10; // in seconds +const unsigned int SMSG_RETENTION = 60 * 60 * 48; // in seconds +const unsigned int SMSG_SEND_DELAY = 2; // in seconds, SecureMsgSendData will delay this long between firing +const unsigned int SMSG_THREAD_DELAY = 20; + +const unsigned int SMSG_TIME_LEEWAY = 60; +const unsigned int SMSG_TIME_IGNORE = 90; // seconds that a peer is ignored for if they fail to deliver messages for a smsgWant + + +const unsigned int SMSG_MAX_MSG_BYTES = 4096; // the user input part + +// max size of payload worst case compression +const unsigned int SMSG_MAX_MSG_WORST = LZ4_COMPRESSBOUND(SMSG_MAX_MSG_BYTES+SMSG_PL_HDR_LEN); + + + +#define SMSG_MASK_UNREAD (1 << 0) + + + +extern bool fSecMsgEnabled; + +class SecMsgStored; + +// Inbox db changed, called with lock cs_smsgDB held. +extern boost::signals2::signal NotifySecMsgInboxChanged; + +// Outbox db changed, called with lock cs_smsgDB held. +extern boost::signals2::signal NotifySecMsgOutboxChanged; + +// Wallet Unlocked, called after all messages received while locked have been processed. +extern boost::signals2::signal NotifySecMsgWalletUnlocked; + + +class SecMsgBucket; +class SecMsgAddress; +class SecMsgOptions; + +extern std::map smsgBuckets; +extern std::vector smsgAddresses; +extern SecMsgOptions smsgOptions; + +extern CCriticalSection cs_smsg; // all except inbox and outbox +extern CCriticalSection cs_smsgDB; + + + +#pragma pack(push, 1) +class SecureMessage +{ +public: + SecureMessage() + { + nPayload = 0; + pPayload = NULL; + }; + + ~SecureMessage() + { + if (pPayload) + delete[] pPayload; + pPayload = NULL; + }; + + unsigned char hash[4]; + unsigned char version[2]; + unsigned char flags; + int64_t timestamp; + unsigned char iv[16]; + unsigned char cpkR[33]; + unsigned char mac[32]; + unsigned char nonse[4]; + uint32_t nPayload; + unsigned char* pPayload; + +}; +#pragma pack(pop) + + +class MessageData +{ +// -- Decrypted SecureMessage data +public: + int64_t timestamp; + std::string sToAddress; + std::string sFromAddress; + std::vector vchMessage; // null terminated plaintext +}; + + +class SecMsgToken +{ +public: + SecMsgToken(int64_t ts, unsigned char* p, int np, long int o) + { + timestamp = ts; + + if (np < 8) // payload will always be > 8, just make sure + memset(sample, 0, 8); + else + memcpy(sample, p, 8); + offset = o; + }; + + SecMsgToken() {}; + + ~SecMsgToken() {}; + + bool operator <(const SecMsgToken& y) const + { + // pack and memcmp from timesent? + if (timestamp == y.timestamp) + return memcmp(sample, y.sample, 8) < 0; + return timestamp < y.timestamp; + } + + int64_t timestamp; // doesn't need to be full 64 bytes? + unsigned char sample[8]; // first 8 bytes of payload - a hash + int64_t offset; // offset + +}; + + +class SecMsgBucket +{ +public: + SecMsgBucket() + { + timeChanged = 0; + hash = 0; + nLockCount = 0; + nLockPeerId = 0; + }; + ~SecMsgBucket() {}; + + void hashBucket(); + + int64_t timeChanged; + uint32_t hash; // token set should get ordered the same on each node + uint32_t nLockCount; // set when smsgWant first sent, unset at end of smsgMsg, ticks down in ThreadSecureMsg() + uint32_t nLockPeerId; // id of peer that bucket is locked for + std::set setTokens; + +}; + + +// -- get at the data +class CTrianglesAddress_B : public CTrianglesAddress +{ +public: + unsigned char getVersion() + { + return nVersion; + } +}; + +class CKeyID_B : public CKeyID +{ +public: + unsigned int* GetPPN() + { + return pn; + } +}; + + +class SecMsgAddress +{ +public: + SecMsgAddress() {}; + SecMsgAddress(std::string sAddr, bool receiveOn, bool receiveAnon) + { + sAddress = sAddr; + fReceiveEnabled = receiveOn; + fReceiveAnon = receiveAnon; + }; + + std::string sAddress; + bool fReceiveEnabled; + bool fReceiveAnon; + + IMPLEMENT_SERIALIZE + ( + READWRITE(this->sAddress); + READWRITE(this->fReceiveEnabled); + READWRITE(this->fReceiveAnon); + ); +}; + +class SecMsgOptions +{ +public: + SecMsgOptions() + { + // -- default options + fNewAddressRecv = true; + fNewAddressAnon = true; + } + + bool fNewAddressRecv; + bool fNewAddressAnon; +}; + + +class SecMsgCrypter +{ +private: + unsigned char chKey[32]; + unsigned char chIV[16]; + bool fKeySet; +public: + + SecMsgCrypter() + { + // 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. + LockedPageManager::instance.LockRange(&chKey[0], sizeof chKey); + LockedPageManager::instance.LockRange(&chIV[0], sizeof chIV); + fKeySet = false; + } + + ~SecMsgCrypter() + { + // clean key + memset(&chKey, 0, sizeof chKey); + memset(&chIV, 0, sizeof chIV); + fKeySet = false; + + LockedPageManager::instance.UnlockRange(&chKey[0], sizeof chKey); + LockedPageManager::instance.UnlockRange(&chIV[0], sizeof chIV); + } + + bool SetKey(const std::vector& vchNewKey, unsigned char* chNewIV); + bool SetKey(const unsigned char* chNewKey, unsigned char* chNewIV); + bool Encrypt(unsigned char* chPlaintext, uint32_t nPlain, std::vector &vchCiphertext); + bool Decrypt(unsigned char* chCiphertext, uint32_t nCipher, std::vector& vchPlaintext); +}; + + +class SecMsgStored +{ +public: + int64_t timeReceived; + char status; // read etc + uint16_t folderId; + std::string sAddrTo; // when in owned addr, when sent remote addr + std::string sAddrOutbox; // owned address this copy was encrypted with + std::vector vchMessage; // message header + encryped payload + + IMPLEMENT_SERIALIZE + ( + READWRITE(this->timeReceived); + READWRITE(this->status); + READWRITE(this->folderId); + READWRITE(this->sAddrTo); + READWRITE(this->sAddrOutbox); + READWRITE(this->vchMessage); + ); +}; + +class SecMsgDB +{ +public: + SecMsgDB() + { + activeBatch = NULL; + }; + + ~SecMsgDB() + { + // -- deletes only data scoped to this TxDB object. + + if (activeBatch) + delete activeBatch; + }; + + bool Open(const char* pszMode="r+"); + + bool ScanBatch(const CDataStream& key, std::string* value, bool* deleted) const; + + bool TxnBegin(); + bool TxnCommit(); + bool TxnAbort(); + + bool ReadPK(CKeyID& addr, CPubKey& pubkey); + bool WritePK(CKeyID& addr, CPubKey& pubkey); + bool ExistsPK(CKeyID& addr); + + bool NextSmesg(leveldb::Iterator* it, std::string& prefix, unsigned char* vchKey, SecMsgStored& smsgStored); + bool NextSmesgKey(leveldb::Iterator* it, std::string& prefix, unsigned char* vchKey); + bool ReadSmesg(unsigned char* chKey, SecMsgStored& smsgStored); + bool WriteSmesg(unsigned char* chKey, SecMsgStored& smsgStored); + bool ExistsSmesg(unsigned char* chKey); + bool EraseSmesg(unsigned char* chKey); + + leveldb::DB *pdb; // points to the global instance + leveldb::WriteBatch *activeBatch; + +}; + +std::string getTimeString(int64_t timestamp, char *buffer, size_t nBuffer); +std::string fsReadable(uint64_t nBytes); + + +int SecureMsgBuildBucketSet(); +int SecureMsgAddWalletAddresses(); + +int SecureMsgReadIni(); +int SecureMsgWriteIni(); + +bool SecureMsgStart(bool fDontStart, bool fScanChain); +bool SecureMsgShutdown(); + +bool SecureMsgEnable(); +bool SecureMsgDisable(); + +bool SecureMsgReceiveData(CNode* pfrom, std::string strCommand, CDataStream& vRecv); +bool SecureMsgSendData(CNode* pto, bool fSendTrickle); + + +bool SecureMsgScanBlock(CBlock& block); +bool ScanChainForPublicKeys(CBlockIndex* pindexStart); +bool SecureMsgScanBlockChain(); +bool SecureMsgScanBuckets(); + + +int SecureMsgWalletUnlocked(); +int SecureMsgWalletKeyChanged(std::string sAddress, std::string sLabel, ChangeType mode); + +int SecureMsgScanMessage(unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload, bool reportToGui); + +int SecureMsgGetStoredKey(CKeyID& ckid, CPubKey& cpkOut); +int SecureMsgGetLocalKey(CKeyID& ckid, CPubKey& cpkOut); +int SecureMsgGetLocalPublicKey(std::string& strAddress, std::string& strPublicKey); + +int SecureMsgAddAddress(std::string& address, std::string& publicKey); + +int SecureMsgRetrieve(SecMsgToken &token, std::vector& vchData); + +int SecureMsgReceive(CNode* pfrom, std::vector& vchData); + +int SecureMsgStoreUnscanned(unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload); +int SecureMsgStore(unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload, bool fUpdateBucket); +int SecureMsgStore(SecureMessage& smsg, bool fUpdateBucket); + + + +int SecureMsgSend(std::string& addressFrom, std::string& addressTo, std::string& message, std::string& sError); + +int SecureMsgValidate(unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload); +int SecureMsgSetHash(unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload); + +int SecureMsgEncrypt(SecureMessage& smsg, std::string& addressFrom, std::string& addressTo, std::string& message); + +int SecureMsgDecrypt(bool fTestOnly, std::string& address, unsigned char *pHeader, unsigned char *pPayload, uint32_t nPayload, MessageData& msg); +int SecureMsgDecrypt(bool fTestOnly, std::string& address, SecureMessage& smsg, MessageData& msg); + + + +#endif // SEC_MESSAGE_H + diff --git a/src/sph_hamsi.h b/src/sph_hamsi.h index f44d2d4..56314de 100644 --- a/src/sph_hamsi.h +++ b/src/sph_hamsi.h @@ -318,4 +318,4 @@ void sph_hamsi512_addbits_and_close( } #endif -#endif +#endif \ No newline at end of file diff --git a/src/strlcpy.h b/src/strlcpy.h index 2cc786e..fdbf3d1 100644 --- a/src/strlcpy.h +++ b/src/strlcpy.h @@ -13,8 +13,8 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef BITCOIN_STRLCPY_H -#define BITCOIN_STRLCPY_H +#ifndef TRIANGLES_STRLCPY_H +#define TRIANGLES_STRLCPY_H #include #include diff --git a/src/sync.h b/src/sync.h index e80efbe..e742955 100644 --- a/src/sync.h +++ b/src/sync.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_SYNC_H -#define BITCOIN_SYNC_H +#ifndef TRIANGLES_SYNC_H +#define TRIANGLES_SYNC_H #include #include diff --git a/src/test/Checkpoints_tests.cpp b/src/test/Checkpoints_tests.cpp index b14e9f7..fe99c28 100644 --- a/src/test/Checkpoints_tests.cpp +++ b/src/test/Checkpoints_tests.cpp @@ -14,21 +14,21 @@ BOOST_AUTO_TEST_SUITE(Checkpoints_tests) BOOST_AUTO_TEST_CASE(sanity) { - uint256 p11111 = uint256("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"); - uint256 p134444 = uint256("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe"); + uint256 p11111 = uint256("0x05cbc42d0421207a39427f1b44610a30380e0e3dd593c154276d7c8d4ae8c9b2"); + uint256 p16666 = uint256("0x682d99d096441e046dae8dd86d5bdfaa32d4e29dea6cf38273bb2b261905f1e2"); BOOST_CHECK(Checkpoints::CheckBlock(11111, p11111)); - BOOST_CHECK(Checkpoints::CheckBlock(134444, p134444)); + BOOST_CHECK(Checkpoints::CheckBlock(16666, p16666)); // Wrong hashes at checkpoints should fail: - BOOST_CHECK(!Checkpoints::CheckBlock(11111, p134444)); - BOOST_CHECK(!Checkpoints::CheckBlock(134444, p11111)); + BOOST_CHECK(!Checkpoints::CheckBlock(11111, p16666)); + BOOST_CHECK(!Checkpoints::CheckBlock(16666, p11111)); // ... but any hash not at a checkpoint should succeed: - BOOST_CHECK(Checkpoints::CheckBlock(11111+1, p134444)); - BOOST_CHECK(Checkpoints::CheckBlock(134444+1, p11111)); + BOOST_CHECK(Checkpoints::CheckBlock(11111+1, p16666)); + BOOST_CHECK(Checkpoints::CheckBlock(16666+1, p11111)); - BOOST_CHECK(Checkpoints::GetTotalBlocksEstimate() >= 134444); + BOOST_CHECK(Checkpoints::GetTotalBlocksEstimate() >= 16666); } BOOST_AUTO_TEST_SUITE_END() diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp index 7f08dd5..70707b6 100644 --- a/src/test/DoS_tests.cpp +++ b/src/test/DoS_tests.cpp @@ -99,7 +99,7 @@ BOOST_AUTO_TEST_CASE(DoS_checknbits) { using namespace boost::assign; // for 'map_list_of()' - // Timestamps,nBits from the bitcoin blockchain. + // Timestamps,nBits from the Triangles blockchain. // These are the block-chain checkpoint blocks typedef std::map BlockData; BlockData chainData = diff --git a/src/test/README b/src/test/README index 77f7faa..c264905 100644 --- a/src/test/README +++ b/src/test/README @@ -1,12 +1,12 @@ The sources in this directory are unit test cases. Boost includes a -unit testing framework, and since bitcoin already uses boost, it makes +unit testing framework, and since Triangles already uses boost, it makes sense to simply use this framework rather than require developers to configure some other framework (we want as few impediments to creating unit tests as possible). -The build system is setup to compile an executable called "test_bitcoin" +The build system is setup to compile an executable called "test_triangles" that runs all of the unit tests. The main source file is called -test_bitcoin.cpp, which simply includes other files that contain the +test_triangles.cpp, which simply includes other files that contain the actual unit tests (outside of a couple required preprocessor directives). The pattern is to create one test file for each class or source file for which you want to create unit tests. The file naming diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp index 7602fa9..d03703b 100644 --- a/src/test/base58_tests.cpp +++ b/src/test/base58_tests.cpp @@ -106,8 +106,8 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse) { Array tests = read_json("base58_keys_valid.json"); std::vector result; - CBitcoinSecret secret; - CBitcoinAddress addr; + CTrianglesSecret secret; + CTrianglesAddress addr; // Save global state bool fTestNet_stored = fTestNet; @@ -130,7 +130,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse) { bool isCompressed = find_value(metadata, "isCompressed").get_bool(); // Must be valid private key - // Note: CBitcoinSecret::SetString tests isValid, whereas CBitcoinAddress does not! + // Note: CTrianglesSecret::SetString tests isValid, whereas CTrianglesAddress does not! BOOST_CHECK_MESSAGE(secret.SetString(exp_base58string), "!SetString:"+ strTest); BOOST_CHECK_MESSAGE(secret.IsValid(), "!IsValid:" + strTest); bool fCompressedOut = false; @@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen) if(isPrivkey) { bool isCompressed = find_value(metadata, "isCompressed").get_bool(); - CBitcoinSecret secret; + CTrianglesSecret secret; secret.SetSecret(CSecret(exp_payload.begin(), exp_payload.end()), isCompressed); BOOST_CHECK_MESSAGE(secret.ToString() == exp_base58string, "result mismatch: " + strTest); } @@ -212,16 +212,16 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen) BOOST_ERROR("Bad addrtype: " << strTest); continue; } - CBitcoinAddress addrOut; - BOOST_CHECK_MESSAGE(boost::apply_visitor(CBitcoinAddressVisitor(&addrOut), dest), "encode dest: " + strTest); + CTrianglesAddress addrOut; + BOOST_CHECK_MESSAGE(boost::apply_visitor(CTrianglesAddressVisitor(&addrOut), dest), "encode dest: " + strTest); BOOST_CHECK_MESSAGE(addrOut.ToString() == exp_base58string, "mismatch: " + strTest); } } // Visiting a CNoDestination must fail - CBitcoinAddress dummyAddr; + CTrianglesAddress dummyAddr; CTxDestination nodest = CNoDestination(); - BOOST_CHECK(!boost::apply_visitor(CBitcoinAddressVisitor(&dummyAddr), nodest)); + BOOST_CHECK(!boost::apply_visitor(CTrianglesAddressVisitor(&dummyAddr), nodest)); // Restore global state fTestNet = fTestNet_stored; @@ -232,8 +232,8 @@ BOOST_AUTO_TEST_CASE(base58_keys_invalid) { Array tests = read_json("base58_keys_invalid.json"); // Negative testcases std::vector result; - CBitcoinSecret secret; - CBitcoinAddress addr; + CTrianglesSecret secret; + CTrianglesAddress addr; BOOST_FOREACH(Value& tv, tests) { diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp index 78953d2..a0911bb 100644 --- a/src/test/getarg_tests.cpp +++ b/src/test/getarg_tests.cpp @@ -13,7 +13,7 @@ ResetArgs(const std::string& strArg) boost::split(vecArg, strArg, boost::is_space(), boost::token_compress_on); // Insert dummy executable name: - vecArg.insert(vecArg.begin(), "testbitcoin"); + vecArg.insert(vecArg.begin(), "testtriangles"); // Convert to char*: std::vector vecChar; diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp index 0a6df88..05e60b8 100644 --- a/src/test/key_tests.cpp +++ b/src/test/key_tests.cpp @@ -10,17 +10,17 @@ using namespace std; -static const string strSecret1 ("5HxWvvfubhXpYYpS3tJkw6fq9jE9j18THftkZjHHfmFiWtmAbrj"); -static const string strSecret2 ("5KC4ejrDjv152FGwP386VD1i2NYc5KkfSMyv1nGy1VGDxGHqVY3"); -static const string strSecret1C ("Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw"); -static const string strSecret2C ("L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g"); -static const CBitcoinAddress addr1 ("1QFqqMUD55ZV3PJEJZtaKCsQmjLT6JkjvJ"); -static const CBitcoinAddress addr2 ("1F5y5E5FMc5YzdJtB9hLaUe43GDxEKXENJ"); -static const CBitcoinAddress addr1C("1NoJrossxPBKfCHuJXT4HadJrXRE9Fxiqs"); -static const CBitcoinAddress addr2C("1CRj2HyM1CXWzHAXLQtiGLyggNT9WQqsDs"); +static const string strSecret1 ("VgbPo2gxpQ9Wv3ukSKZyaYqaYE1gCtzpdZtLBSL4Vax17Gk9QWtr"); +static const string strSecret2 ("VZK4HxH5ThQPZjkMVGRb7GHPBhrfwvNCQxYpTsTL7zHtcK5Xmu56"); +static const string strSecret1C ("VaGAFqyHzPVbXmLRVEfNBCjGoFfkdk5us5RkxdNVu9GKzk1UKdW4"); +static const string strSecret2C ("VbGMJ5R3znfmv3harEnjEfa9to9hnAp3vGqahGLq12hF3L2aa9vr"); +static const CTrianglesAddress addr1 ("TBUTdKJg53PmmwjyzdPgXjABq2MJrz7sdC"); +static const CTrianglesAddress addr2 ("TV7guKExCcH65B5oKFhtYiVo5M59md24MZ"); +static const CTrianglesAddress addr1C("TM1W8XP18TM2zEqeRo76gXSkaM6UGppfFG"); +static const CTrianglesAddress addr2C("TD4n8bbK75ufLRT5kraXVty6MwN6FXGwai"); -static const string strAddressBad("1HV9Lc3sNHZxwj4Zk6fB38tEmBryq2cBiF"); +static const string strAddressBad("TNLwP8QiuFTWntVCrmswefDetZkgTLXeG8"); #ifdef KEY_TESTS_DUMPINFO @@ -38,14 +38,14 @@ void dumpKeyInfo(uint256 privkey) { bool fCompressed = nCompressed == 1; printf(" * %s:\n", fCompressed ? "compressed" : "uncompressed"); - CBitcoinSecret bsecret; + CTrianglesSecret bsecret; bsecret.SetSecret(secret, fCompressed); printf(" * secret (base58): %s\n", bsecret.ToString().c_str()); CKey key; key.SetSecret(secret, fCompressed); vector vchPubKey = key.GetPubKey(); printf(" * pubkey (hex): %s\n", HexStr(vchPubKey).c_str()); - printf(" * address (base58): %s\n", CBitcoinAddress(vchPubKey).ToString().c_str()); + printf(" * address (base58): %s\n", CTrianglesAddress(vchPubKey).ToString().c_str()); } } #endif @@ -55,7 +55,7 @@ BOOST_AUTO_TEST_SUITE(key_tests) BOOST_AUTO_TEST_CASE(key_test1) { - CBitcoinSecret bsecret1, bsecret2, bsecret1C, bsecret2C, baddress1; + CTrianglesSecret bsecret1, bsecret2, bsecret1C, bsecret2C, baddress1; BOOST_CHECK( bsecret1.SetString (strSecret1)); BOOST_CHECK( bsecret2.SetString (strSecret2)); BOOST_CHECK( bsecret1C.SetString(strSecret1C)); diff --git a/src/test/netbase_tests.cpp b/src/test/netbase_tests.cpp index e5a7562..acb1877 100644 --- a/src/test/netbase_tests.cpp +++ b/src/test/netbase_tests.cpp @@ -52,10 +52,10 @@ bool static TestSplitHost(string test, string host, int port) BOOST_AUTO_TEST_CASE(netbase_splithost) { - BOOST_CHECK(TestSplitHost("www.bitcoin.org", "www.bitcoin.org", -1)); - BOOST_CHECK(TestSplitHost("[www.bitcoin.org]", "www.bitcoin.org", -1)); - BOOST_CHECK(TestSplitHost("www.bitcoin.org:80", "www.bitcoin.org", 80)); - BOOST_CHECK(TestSplitHost("[www.bitcoin.org]:80", "www.bitcoin.org", 80)); + BOOST_CHECK(TestSplitHost("info.triangles.technology", "info.triangles.technology", -1)); + BOOST_CHECK(TestSplitHost("[info.triangles.technology]", "info.triangles.technology", -1)); + BOOST_CHECK(TestSplitHost("info.triangles.technology:80", "info.triangles.technology", 80)); + BOOST_CHECK(TestSplitHost("[info.triangles.technology]:80", "info.triangles.technology", 80)); BOOST_CHECK(TestSplitHost("127.0.0.1", "127.0.0.1", -1)); BOOST_CHECK(TestSplitHost("127.0.0.1:8333", "127.0.0.1", 8333)); BOOST_CHECK(TestSplitHost("[127.0.0.1]", "127.0.0.1", -1)); diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp index 505ec8f..c37aabb 100644 --- a/src/test/rpc_tests.cpp +++ b/src/test/rpc_tests.cpp @@ -3,7 +3,7 @@ #include "base58.h" #include "util.h" -#include "bitcoinrpc.h" +#include "trianglesrpc.h" using namespace std; using namespace json_spirit; @@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE(rpc_addmultisig) const char address2Hex[] = "0388c2037017c62240b6b72ac1a2a5f94da790596ebd06177c8572752922165cb4"; Value v; - CBitcoinAddress address; + CTrianglesAddress address; BOOST_CHECK_NO_THROW(v = addmultisig(createArgs(1, address1Hex), false)); address.SetString(v.get_str()); BOOST_CHECK(address.IsValid() && address.IsScript()); diff --git a/src/test/test_bitcoin.cpp b/src/test/test_triangles.cpp similarity index 94% rename from src/test/test_bitcoin.cpp rename to src/test/test_triangles.cpp index bcf0907..ef0d4c2 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_triangles.cpp @@ -1,4 +1,4 @@ -#define BOOST_TEST_MODULE Bitcoin Test Suite +#define BOOST_TEST_MODULE Triangles Test Suite #include #include "db.h" diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 3a4c035..38f402b 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(util_DateTimeStrFormat) /*These are platform-dependant and thus removed to avoid useless test failures BOOST_CHECK_EQUAL(DateTimeStrFormat("%x %H:%M:%S", 0), "01/01/70 00:00:00"); BOOST_CHECK_EQUAL(DateTimeStrFormat("%x %H:%M:%S", 0x7FFFFFFF), "01/19/38 03:14:07"); - // Formats used within Bitcoin + // Formats used within Triangles BOOST_CHECK_EQUAL(DateTimeStrFormat("%x %H:%M:%S", 1317425777), "09/30/11 23:36:17"); BOOST_CHECK_EQUAL(DateTimeStrFormat("%x %H:%M", 1317425777), "09/30/11 23:36"); */ diff --git a/src/test/wallet_tests.cpp b/src/test/wallet_tests.cpp index b0b3c47..d16fd1d 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 BTC in 1 coin + BOOST_CHECK_EQUAL(nValueRet, 1 * COIN); // we should get 1 TRI 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 BTC in 1 coin + BOOST_CHECK_EQUAL(nValueRet, 2 * COIN); // we should get 2 TRI 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/bitcoinrpc.cpp b/src/trianglesrpc.cpp similarity index 91% rename from src/bitcoinrpc.cpp rename to src/trianglesrpc.cpp index b5f7b24..52da163 100644 --- a/src/bitcoinrpc.cpp +++ b/src/trianglesrpc.cpp @@ -8,7 +8,7 @@ #include "sync.h" #include "ui_interface.h" #include "base58.h" -#include "bitcoinrpc.h" +#include "trianglesrpc.h" #include "db.h" #undef printf @@ -94,18 +94,18 @@ void RPCTypeCheck(const Object& o, } } -int64 AmountFromValue(const Value& value) +int64_t AmountFromValue(const Value& value) { double dAmount = value.get_real(); if (dAmount <= 0.0 || dAmount > MAX_MONEY) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount"); - int64 nAmount = roundint64(dAmount * COIN); + int64_t nAmount = roundint64(dAmount * COIN); if (!MoneyRange(nAmount)) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount"); return nAmount; } -Value ValueFromAmount(int64 amount) +Value ValueFromAmount(int64_t amount) { return (double)amount / (double)COIN; } @@ -121,6 +121,42 @@ std::string HexBits(unsigned int nBits) } +// +// Utilities: convert hex-encoded Values +// (throws error if not hex). +// +uint256 ParseHashV(const Value& v, string strName) +{ + string strHex; + if (v.type() == str_type) + strHex = v.get_str(); + if (!IsHex(strHex)) // Note: IsHex("") is false + throw JSONRPCError(RPC_INVALID_PARAMETER, strName+" must be hexadecimal string (not '"+strHex+"')"); + uint256 result; + result.SetHex(strHex); + return result; +} + +uint256 ParseHashO(const Object& o, string strKey) +{ + return ParseHashV(find_value(o, strKey), strKey); +} + +vector ParseHexV(const Value& v, string strName) +{ + string strHex; + if (v.type() == str_type) + strHex = v.get_str(); + if (!IsHex(strHex)) + throw JSONRPCError(RPC_INVALID_PARAMETER, strName+" must be hexadecimal string (not '"+strHex+"')"); + return ParseHex(strHex); +} + +vector ParseHexO(const Object& o, string strKey) +{ + return ParseHexV(find_value(o, strKey), strKey); +} + /// /// Note: This interface may still be subject to change. @@ -183,12 +219,12 @@ Value stop(const Array& params, bool fHelp) throw runtime_error( "stop \n" " is true or false to detach the database or not for this stop only\n" - "Stop triangles server (and possibly override the detachdb config value)."); + "Stop Triangles server (and possibly override the detachdb config value)."); // Shutdown will take long enough that the response should get back if (params.size() > 0) bitdb.SetDetach(params[0].get_bool()); StartShutdown(); - return "triangles server stopping"; + return "Triangles server stopping"; } @@ -203,15 +239,15 @@ static const CRPCCommand vRPCCommands[] = // ------------------------ ----------------------- ------ -------- { "help", &help, true, true }, { "stop", &stop, true, true }, + { "getbestblockhash", &getbestblockhash, true, false }, { "getblockcount", &getblockcount, true, false }, { "getconnectioncount", &getconnectioncount, true, false }, { "getpeerinfo", &getpeerinfo, true, false }, { "getdifficulty", &getdifficulty, true, false }, - { "getgenerate", &getgenerate, true, false }, - { "setgenerate", &setgenerate, true, false }, - { "gethashespersec", &gethashespersec, true, false }, { "getinfo", &getinfo, true, false }, + { "getsubsidy", &getsubsidy, true, false }, { "getmininginfo", &getmininginfo, true, false }, + { "getstakinginfo", &getstakinginfo, true, false }, { "getnewaddress", &getnewaddress, true, false }, { "getnewpubkey", &getnewpubkey, true, false }, { "getaccountaddress", &getaccountaddress, true, false }, @@ -236,6 +272,7 @@ static const CRPCCommand vRPCCommands[] = { "sendfrom", &sendfrom, false, false }, { "sendmany", &sendmany, false, false }, { "addmultisigaddress", &addmultisigaddress, false, false }, + { "addredeemscript", &addredeemscript, false, false }, { "getrawmempool", &getrawmempool, true, false }, { "getblock", &getblock, false, false }, { "getblockbynumber", &getblockbynumber, false, false }, @@ -253,11 +290,14 @@ static const CRPCCommand vRPCCommands[] = { "submitblock", &submitblock, false, false }, { "listsinceblock", &listsinceblock, false, false }, { "dumpprivkey", &dumpprivkey, false, false }, + { "dumpwallet", &dumpwallet, true, false }, + { "importwallet", &importwallet, false, false }, { "importprivkey", &importprivkey, false, false }, { "listunspent", &listunspent, false, false }, { "getrawtransaction", &getrawtransaction, false, false }, { "createrawtransaction", &createrawtransaction, false, false }, { "decoderawtransaction", &decoderawtransaction, false, false }, + { "decodescript", &decodescript, false, false }, { "signrawtransaction", &signrawtransaction, false, false }, { "sendrawtransaction", &sendrawtransaction, false, false }, { "getcheckpoint", &getcheckpoint, true, false }, @@ -267,6 +307,25 @@ static const CRPCCommand vRPCCommands[] = { "resendtx", &resendtx, false, true}, { "makekeypair", &makekeypair, false, true}, { "sendalert", &sendalert, false, false}, + + { "smsgenable", &smsgenable, false, false}, + { "smsgdisable", &smsgdisable, false, false}, + { "smsglocalkeys", &smsglocalkeys, false, false}, + { "smsgoptions", &smsgoptions, false, false}, + { "smsgscanchain", &smsgscanchain, false, false}, + { "smsgscanbuckets", &smsgscanbuckets, false, false}, + { "smsgaddkey", &smsgaddkey, false, false}, + { "smsggetpubkey", &smsggetpubkey, false, false}, + { "smsgsend", &smsgsend, false, false}, + { "smsgsendanon", &smsgsendanon, false, false}, + { "smsginbox", &smsginbox, false, false}, + { "smsgoutbox", &smsgoutbox, false, false}, + { "smsgbuckets", &smsgbuckets, false, false}, + + + + + }; CRPCTable::CRPCTable() @@ -300,7 +359,7 @@ string HTTPPost(const string& strMsg, const map& mapRequestHeader { ostringstream s; s << "POST / HTTP/1.1\r\n" - << "User-Agent: triangles-json-rpc/" << FormatFullVersion() << "\r\n" + << "User-Agent: Triangles-json-rpc/" << FormatFullVersion() << "\r\n" << "Host: 127.0.0.1\r\n" << "Content-Type: application/json\r\n" << "Content-Length: " << strMsg.size() << "\r\n" @@ -331,7 +390,7 @@ static string HTTPReply(int nStatus, const string& strMsg, bool keepalive) if (nStatus == HTTP_UNAUTHORIZED) return strprintf("HTTP/1.0 401 Authorization Required\r\n" "Date: %s\r\n" - "Server: triangles-json-rpc/%s\r\n" + "Server: Triangles-json-rpc/%s\r\n" "WWW-Authenticate: Basic realm=\"jsonrpc\"\r\n" "Content-Type: text/html\r\n" "Content-Length: 296\r\n" @@ -358,7 +417,7 @@ static string HTTPReply(int nStatus, const string& strMsg, bool keepalive) "Connection: %s\r\n" "Content-Length: %"PRIszu"\r\n" "Content-Type: application/json\r\n" - "Server: triangles-json-rpc/%s\r\n" + "Server: Triangles-json-rpc/%s\r\n" "\r\n" "%s", nStatus, @@ -388,7 +447,7 @@ int ReadHTTPStatus(std::basic_istream& stream, int &proto) int ReadHTTPHeader(std::basic_istream& stream, map& mapHeadersRet) { int nLen = 0; - loop + while (true) { string str; std::getline(stream, str); @@ -452,11 +511,11 @@ bool HTTPAuthorized(map& mapHeaders) return false; string strUserPass64 = strAuth.substr(6); boost::trim(strUserPass64); string strUserPass = DecodeBase64(strUserPass64); - return strUserPass == strRPCUserColonPass; + return TimingResistantEqual(strUserPass, strRPCUserColonPass); } // -// JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility, +// JSON-RPC protocol. Triangles speaks version 1.0 for maximum compatibility, // but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were // unspecified (HTTP errors and contents of 'error'). // @@ -511,8 +570,6 @@ bool ClientAllowed(const boost::asio::ip::address& address) || address.to_v6().is_v4_mapped())) return ClientAllowed(address.to_v6().to_v4()); - std::string ipv4addr = address.to_string(); - if (address == asio::ip::address_v4::loopback() || address == asio::ip::address_v6::loopback() || (address.is_v4() @@ -631,7 +688,7 @@ private: void ThreadRPCServer(void* parg) { // Make this thread recognisable as the RPC listener - RenameThread("bitcoin-rpclist"); + RenameThread("Triangles-rpclist"); try { @@ -730,7 +787,8 @@ void ThreadRPCServer2(void* parg) printf("ThreadRPCServer started\n"); strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]; - if (mapArgs["-rpcpassword"] == "") + if ((mapArgs["-rpcpassword"] == "") || + (mapArgs["-rpcuser"] == mapArgs["-rpcpassword"])) { unsigned char rand_pwd[32]; RAND_bytes(rand_pwd, 32); @@ -742,10 +800,13 @@ void ThreadRPCServer2(void* parg) uiInterface.ThreadSafeMessageBox(strprintf( _("%s, you must set a rpcpassword in the configuration file:\n %s\n" "It is recommended you use the following random password:\n" - "rpcuser=bitcoinrpc\n" + "rpcuser=trianglesrpc\n" "rpcpassword=%s\n" "(you do not need to remember this password)\n" - "If the file does not exist, create it with owner-readable-only file permissions.\n"), + "The username and password MUST NOT be the same.\n" + "If the file does not exist, create it with owner-readable-only file permissions.\n" + "It is also recommended to set alertnotify so you are notified of problems;\n" + "for example: alertnotify=echo %%s | mail -s \"Triangles Alert\" admin@foo.com\n"), strWhatAmI.c_str(), GetConfigFile().string().c_str(), EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()), @@ -931,7 +992,7 @@ static CCriticalSection cs_THREAD_RPCHANDLER; void ThreadRPCServer3(void* parg) { // Make this thread recognisable as the RPC handler - RenameThread("bitcoin-rpchand"); + RenameThread("Triangles-rpchand"); { LOCK(cs_THREAD_RPCHANDLER); @@ -940,7 +1001,8 @@ void ThreadRPCServer3(void* parg) AcceptedConnection *conn = (AcceptedConnection *) parg; bool fRun = true; - loop { + while (true) + { if (fShutdown || !fRun) { conn->close(); @@ -969,7 +1031,7 @@ void ThreadRPCServer3(void* parg) If this results in a DOS the user really shouldn't have their RPC port exposed.*/ if (mapArgs["-rpcpassword"].size() < 20) - Sleep(250); + MilliSleep(250); conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush; break; @@ -1145,8 +1207,6 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector 0) ConvertTo(params[0]); - if (strMethod == "setgenerate" && n > 0) ConvertTo(params[0]); - if (strMethod == "setgenerate" && n > 1) ConvertTo(params[1]); if (strMethod == "sendtoaddress" && n > 1) ConvertTo(params[1]); if (strMethod == "settxfee" && n > 0) ConvertTo(params[0]); if (strMethod == "getreceivedbyaddress" && n > 1) ConvertTo(params[1]); @@ -1171,10 +1231,17 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector 2) ConvertTo(params[2]); if (strMethod == "getblocktemplate" && n > 0) ConvertTo(params[0]); if (strMethod == "listsinceblock" && n > 1) ConvertTo(params[1]); + + if (strMethod == "sendalert" && n > 2) ConvertTo(params[2]); + if (strMethod == "sendalert" && n > 3) ConvertTo(params[3]); + if (strMethod == "sendalert" && n > 4) ConvertTo(params[4]); + if (strMethod == "sendalert" && n > 5) ConvertTo(params[5]); + if (strMethod == "sendalert" && n > 6) ConvertTo(params[6]); + if (strMethod == "sendmany" && n > 1) ConvertTo(params[1]); if (strMethod == "sendmany" && n > 2) ConvertTo(params[2]); - if (strMethod == "reservebalance" && n > 0) ConvertTo(params[0]); - if (strMethod == "reservebalance" && n > 1) ConvertTo(params[1]); + if (strMethod == "reservebalance" && n > 0) ConvertTo(params[0]); + if (strMethod == "reservebalance" && n > 1) ConvertTo(params[1]); if (strMethod == "addmultisigaddress" && n > 0) ConvertTo(params[0]); if (strMethod == "addmultisigaddress" && n > 1) ConvertTo(params[1]); if (strMethod == "listunspent" && n > 0) ConvertTo(params[0]); @@ -1185,6 +1252,7 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector 1) ConvertTo(params[1]); if (strMethod == "signrawtransaction" && n > 1) ConvertTo(params[1], true); if (strMethod == "signrawtransaction" && n > 2) ConvertTo(params[2], true); + if (strMethod == "keypoolrefill" && n > 0) ConvertTo(params[0]); return params; } @@ -1290,3 +1358,5 @@ int main(int argc, char *argv[]) #endif const CRPCTable tableRPC; + + diff --git a/src/bitcoinrpc.h b/src/trianglesrpc.h similarity index 79% rename from src/bitcoinrpc.h rename to src/trianglesrpc.h index d0788f0..f8a8578 100644 --- a/src/bitcoinrpc.h +++ b/src/trianglesrpc.h @@ -3,8 +3,8 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef _BITCOINRPC_H_ -#define _BITCOINRPC_H_ 1 +#ifndef _TRIANGLESRPC_H_ +#define _TRIANGLESRPC_H_ 1 #include #include @@ -30,7 +30,7 @@ enum HTTPStatusCode HTTP_INTERNAL_SERVER_ERROR = 500, }; -// Bitcoin RPC error codes +// Triangles RPC error codes enum RPCErrorCode { // Standard JSON-RPC 2.0 errors @@ -49,9 +49,11 @@ enum RPCErrorCode RPC_INVALID_PARAMETER = -8, // Invalid, missing or duplicate parameter RPC_DATABASE_ERROR = -20, // Database error RPC_DESERIALIZATION_ERROR = -22, // Error parsing or validating structure in raw format + RPC_SERVER_NOT_STARTED = -18, // RPC server was not started (StartRPCThreads() not called) + // P2P client errors - RPC_CLIENT_NOT_CONNECTED = -9, // Bitcoin is not connected + RPC_CLIENT_NOT_CONNECTED = -9, // Triangles is not connected RPC_CLIENT_IN_INITIAL_DOWNLOAD = -10, // Still downloading initial blocks // Wallet errors @@ -100,7 +102,7 @@ public: }; /** - * Bitcoin RPC command dispatcher. + * Triangles RPC command dispatcher. */ class CRPCTable { @@ -123,28 +125,39 @@ public: extern const CRPCTable tableRPC; -extern int64 nWalletUnlockTime; -extern int64 AmountFromValue(const json_spirit::Value& value); -extern json_spirit::Value ValueFromAmount(int64 amount); +extern int64_t nWalletUnlockTime; +extern int64_t AmountFromValue(const json_spirit::Value& value); +extern json_spirit::Value ValueFromAmount(int64_t amount); extern double GetDifficulty(const CBlockIndex* blockindex = NULL); +extern double GetPoWMHashPS(); extern double GetPoSKernelPS(); extern std::string HexBits(unsigned int nBits); extern std::string HelpRequiringPassphrase(); extern void EnsureWalletIsUnlocked(); +// +// Utilities: convert hex-encoded Values +// (throws error if not hex). +// +extern uint256 ParseHashV(const json_spirit::Value& v, std::string strName); +extern uint256 ParseHashO(const json_spirit::Object& o, std::string strKey); +extern std::vector ParseHexV(const json_spirit::Value& v, std::string strName); +extern std::vector ParseHexO(const json_spirit::Object& o, std::string strKey); extern json_spirit::Value getconnectioncount(const json_spirit::Array& params, bool fHelp); // in rpcnet.cpp extern json_spirit::Value getpeerinfo(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value dumpwallet(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value importwallet(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value dumpprivkey(const json_spirit::Array& params, bool fHelp); // in rpcdump.cpp extern json_spirit::Value importprivkey(const json_spirit::Array& params, bool fHelp); + extern json_spirit::Value sendalert(const json_spirit::Array& params, bool fHelp); -extern json_spirit::Value getgenerate(const json_spirit::Array& params, bool fHelp); // in rpcmining.cpp -extern json_spirit::Value setgenerate(const json_spirit::Array& params, bool fHelp); -extern json_spirit::Value gethashespersec(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getsubsidy(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getmininginfo(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getstakinginfo(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getwork(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getworkex(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getblocktemplate(const json_spirit::Array& params, bool fHelp); @@ -165,6 +178,7 @@ extern json_spirit::Value movecmd(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value sendfrom(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value sendmany(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value addmultisigaddress(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value addredeemscript(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value listreceivedbyaddress(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value listreceivedbyaccount(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value listtransactions(const json_spirit::Array& params, bool fHelp); @@ -187,15 +201,16 @@ extern json_spirit::Value resendtx(const json_spirit::Array& params, bool fHelp) extern json_spirit::Value makekeypair(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value validatepubkey(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getnewpubkey(const json_spirit::Array& params, bool fHelp); -extern json_spirit::Value getnetworkhashps(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getrawtransaction(const json_spirit::Array& params, bool fHelp); // in rcprawtransaction.cpp extern json_spirit::Value listunspent(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value createrawtransaction(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value decoderawtransaction(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value decodescript(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value signrawtransaction(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value sendrawtransaction(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getbestblockhash(const json_spirit::Array& params, bool fHelp); // in rpcblockchain.cpp extern json_spirit::Value getblockcount(const json_spirit::Array& params, bool fHelp); // in rpcblockchain.cpp extern json_spirit::Value getdifficulty(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value settxfee(const json_spirit::Array& params, bool fHelp); @@ -205,4 +220,24 @@ extern json_spirit::Value getblock(const json_spirit::Array& params, bool fHelp) extern json_spirit::Value getblockbynumber(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getcheckpoint(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value clearwallettransactions(const json_spirit::Array& params, bool fHelp); + + + +extern json_spirit::Value smsgenable(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsgdisable(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsglocalkeys(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsgoptions(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsgscanchain(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsgscanbuckets(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsgaddkey(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsggetpubkey(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsgsend(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsgsendanon(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsginbox(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsgoutbox(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value smsgbuckets(const json_spirit::Array& params, bool fHelp); + #endif + + diff --git a/src/txdb-leveldb.cpp b/src/txdb-leveldb.cpp new file mode 100644 index 0000000..58320cb --- /dev/null +++ b/src/txdb-leveldb.cpp @@ -0,0 +1,574 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// 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. + +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include "kernel.h" +#include "checkpoints.h" +#include "txdb.h" +#include "util.h" +#include "main.h" + +using namespace std; +using namespace boost; + +leveldb::DB *txdb; // global pointer for LevelDB object instance + +static leveldb::Options GetOptions() { + leveldb::Options options; + int nCacheSizeMB = GetArg("-dbcache", 25); + options.block_cache = leveldb::NewLRUCache(nCacheSizeMB * 1048576); + options.filter_policy = leveldb::NewBloomFilterPolicy(10); + return options; +} + +void init_blockindex(leveldb::Options& options, bool fRemoveOld = false) { + // First time init. + filesystem::path directory = GetDataDir() / "txleveldb"; + + if (fRemoveOld) { + filesystem::remove_all(directory); // remove directory + unsigned int nFile = 1; + + while (true) + { + filesystem::path strBlockFile = GetDataDir() / strprintf("blk%04u.dat", nFile); + + // Break if no such file + if( !filesystem::exists( strBlockFile ) ) + break; + + filesystem::remove(strBlockFile); + + nFile++; + } + } + + filesystem::create_directory(directory); + printf("Opening LevelDB in %s\n", directory.string().c_str()); + leveldb::Status status = leveldb::DB::Open(options, directory.string(), &txdb); + if (!status.ok()) { + throw runtime_error(strprintf("init_blockindex(): error opening database environment %s", status.ToString().c_str())); + } +} + +// CDB subclasses are created and destroyed VERY OFTEN. That's why +// we shouldn't treat this as a free operations. +CTxDB::CTxDB(const char* pszMode) +{ + assert(pszMode); + activeBatch = NULL; + fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w')); + + if (txdb) { + pdb = txdb; + return; + } + + bool fCreate = strchr(pszMode, 'c'); + + options = GetOptions(); + options.create_if_missing = fCreate; + options.filter_policy = leveldb::NewBloomFilterPolicy(10); + + init_blockindex(options); // Init directory + pdb = txdb; + + if (Exists(string("version"))) + { + ReadVersion(nVersion); + printf("Transaction index version is %d\n", nVersion); + + if (nVersion < DATABASE_VERSION) + { + printf("Required index version is %d, removing old database\n", DATABASE_VERSION); + + // Leveldb instance destruction + delete txdb; + txdb = pdb = NULL; + delete activeBatch; + activeBatch = NULL; + + init_blockindex(options, true); // Remove directory and create new database + pdb = txdb; + + bool fTmp = fReadOnly; + fReadOnly = false; + WriteVersion(DATABASE_VERSION); // Save transaction index version + fReadOnly = fTmp; + } + } + else if (fCreate) + { + bool fTmp = fReadOnly; + fReadOnly = false; + WriteVersion(DATABASE_VERSION); + fReadOnly = fTmp; + } + + printf("Opened LevelDB successfully\n"); +} + +void CTxDB::Close() +{ + delete txdb; + txdb = pdb = NULL; + delete options.filter_policy; + options.filter_policy = NULL; + delete options.block_cache; + options.block_cache = NULL; + delete activeBatch; + activeBatch = NULL; +} + +bool CTxDB::TxnBegin() +{ + assert(!activeBatch); + activeBatch = new leveldb::WriteBatch(); + return true; +} + +bool CTxDB::TxnCommit() +{ + assert(activeBatch); + leveldb::Status status = pdb->Write(leveldb::WriteOptions(), activeBatch); + delete activeBatch; + activeBatch = NULL; + if (!status.ok()) { + printf("LevelDB batch commit failure: %s\n", status.ToString().c_str()); + return false; + } + return true; +} + +class CBatchScanner : public leveldb::WriteBatch::Handler { +public: + std::string needle; + bool *deleted; + std::string *foundValue; + bool foundEntry; + + CBatchScanner() : foundEntry(false) {} + + virtual void Put(const leveldb::Slice& key, const leveldb::Slice& value) { + if (key.ToString() == needle) { + foundEntry = true; + *deleted = false; + *foundValue = value.ToString(); + } + } + + virtual void Delete(const leveldb::Slice& key) { + if (key.ToString() == needle) { + foundEntry = true; + *deleted = true; + } + } +}; + +// When performing a read, if we have an active batch we need to check it first +// before reading from the database, as the rest of the code assumes that once +// a database transaction begins reads are consistent with it. It would be good +// to change that assumption in future and avoid the performance hit, though in +// practice it does not appear to be large. +bool CTxDB::ScanBatch(const CDataStream &key, string *value, bool *deleted) const { + assert(activeBatch); + *deleted = false; + CBatchScanner scanner; + scanner.needle = key.str(); + scanner.deleted = deleted; + scanner.foundValue = value; + leveldb::Status status = activeBatch->Iterate(&scanner); + if (!status.ok()) { + throw runtime_error(status.ToString()); + } + return scanner.foundEntry; +} + +bool CTxDB::ReadTxIndex(uint256 hash, CTxIndex& txindex) +{ + assert(!fClient); + txindex.SetNull(); + return Read(make_pair(string("tx"), hash), txindex); +} + +bool CTxDB::UpdateTxIndex(uint256 hash, const CTxIndex& txindex) +{ + assert(!fClient); + return Write(make_pair(string("tx"), hash), txindex); +} + +bool CTxDB::AddTxIndex(const CTransaction& tx, const CDiskTxPos& pos, int nHeight) +{ + assert(!fClient); + + // Add to tx index + uint256 hash = tx.GetHash(); + CTxIndex txindex(pos, tx.vout.size()); + return Write(make_pair(string("tx"), hash), txindex); +} + +bool CTxDB::EraseTxIndex(const CTransaction& tx) +{ + assert(!fClient); + uint256 hash = tx.GetHash(); + + return Erase(make_pair(string("tx"), hash)); +} + +bool CTxDB::ContainsTx(uint256 hash) +{ + assert(!fClient); + return Exists(make_pair(string("tx"), hash)); +} + +bool CTxDB::ReadDiskTx(uint256 hash, CTransaction& tx, CTxIndex& txindex) +{ + assert(!fClient); + tx.SetNull(); + if (!ReadTxIndex(hash, txindex)) + return false; + return (tx.ReadFromDisk(txindex.pos)); +} + +bool CTxDB::ReadDiskTx(uint256 hash, CTransaction& tx) +{ + CTxIndex txindex; + return ReadDiskTx(hash, tx, txindex); +} + +bool CTxDB::ReadDiskTx(COutPoint outpoint, CTransaction& tx, CTxIndex& txindex) +{ + return ReadDiskTx(outpoint.hash, tx, txindex); +} + +bool CTxDB::ReadDiskTx(COutPoint outpoint, CTransaction& tx) +{ + CTxIndex txindex; + return ReadDiskTx(outpoint.hash, tx, txindex); +} + +bool CTxDB::WriteBlockIndex(const CDiskBlockIndex& blockindex) +{ + return Write(make_pair(string("blockindex"), blockindex.GetBlockHash()), blockindex); +} + +bool CTxDB::ReadHashBestChain(uint256& hashBestChain) +{ + return Read(string("hashBestChain"), hashBestChain); +} + +bool CTxDB::WriteHashBestChain(uint256 hashBestChain) +{ + return Write(string("hashBestChain"), hashBestChain); +} + +bool CTxDB::ReadBestInvalidTrust(CBigNum& bnBestInvalidTrust) +{ + return Read(string("bnBestInvalidTrust"), bnBestInvalidTrust); +} + +bool CTxDB::WriteBestInvalidTrust(CBigNum bnBestInvalidTrust) +{ + return Write(string("bnBestInvalidTrust"), bnBestInvalidTrust); +} + +bool CTxDB::ReadSyncCheckpoint(uint256& hashCheckpoint) +{ + return Read(string("hashSyncCheckpoint"), hashCheckpoint); +} + +bool CTxDB::WriteSyncCheckpoint(uint256 hashCheckpoint) +{ + return Write(string("hashSyncCheckpoint"), hashCheckpoint); +} + +bool CTxDB::ReadCheckpointPubKey(string& strPubKey) +{ + return Read(string("strCheckpointPubKey"), strPubKey); +} + +bool CTxDB::WriteCheckpointPubKey(const string& strPubKey) +{ + return Write(string("strCheckpointPubKey"), strPubKey); +} + +static CBlockIndex *InsertBlockIndex(uint256 hash) +{ + if (hash == 0) + return NULL; + + // Return existing + map::iterator mi = mapBlockIndex.find(hash); + if (mi != mapBlockIndex.end()) + return (*mi).second; + + // Create new + CBlockIndex* pindexNew = new CBlockIndex(); + if (!pindexNew) + throw runtime_error("LoadBlockIndex() : new CBlockIndex failed"); + mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first; + pindexNew->phashBlock = &((*mi).first); + + return pindexNew; +} + +bool CTxDB::LoadBlockIndex() +{ + if (mapBlockIndex.size() > 0) { + // Already loaded once in this session. It can happen during migration + // from BDB. + return true; + } + // The block index is an in-memory structure that maps hashes to on-disk + // locations where the contents of the block can be found. Here, we scan it + // out of the DB and into mapBlockIndex. + leveldb::Iterator *iterator = pdb->NewIterator(leveldb::ReadOptions()); + // Seek to start key. + CDataStream ssStartKey(SER_DISK, CLIENT_VERSION); + ssStartKey << make_pair(string("blockindex"), uint256(0)); + iterator->Seek(ssStartKey.str()); + // Now read each entry. + while (iterator->Valid()) + { + // Unpack keys and values. + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.write(iterator->key().data(), iterator->key().size()); + CDataStream ssValue(SER_DISK, CLIENT_VERSION); + ssValue.write(iterator->value().data(), iterator->value().size()); + string strType; + ssKey >> strType; + // Did we reach the end of the data to read? + if (fRequestShutdown || strType != "blockindex") + break; + CDiskBlockIndex diskindex; + ssValue >> diskindex; + + uint256 blockHash = diskindex.GetBlockHash(); + + // Construct block index object + CBlockIndex* pindexNew = InsertBlockIndex(blockHash); + pindexNew->pprev = InsertBlockIndex(diskindex.hashPrev); + pindexNew->pnext = InsertBlockIndex(diskindex.hashNext); + pindexNew->nFile = diskindex.nFile; + pindexNew->nBlockPos = diskindex.nBlockPos; + pindexNew->nHeight = diskindex.nHeight; + pindexNew->nMint = diskindex.nMint; + pindexNew->nMoneySupply = diskindex.nMoneySupply; + pindexNew->nFlags = diskindex.nFlags; + pindexNew->nStakeModifier = diskindex.nStakeModifier; + pindexNew->prevoutStake = diskindex.prevoutStake; + pindexNew->nStakeTime = diskindex.nStakeTime; + pindexNew->hashProofOfStake = diskindex.hashProofOfStake; + pindexNew->nVersion = diskindex.nVersion; + pindexNew->hashMerkleRoot = diskindex.hashMerkleRoot; + pindexNew->nTime = diskindex.nTime; + pindexNew->nBits = diskindex.nBits; + pindexNew->nNonce = diskindex.nNonce; + + // Watch for genesis block + if (pindexGenesisBlock == NULL && blockHash == (!fTestNet ? hashGenesisBlockOfficial : hashGenesisBlockTestNet)) + pindexGenesisBlock = pindexNew; + + if (!pindexNew->CheckIndex()) { + delete iterator; + return error("LoadBlockIndex() : CheckIndex failed at %d", pindexNew->nHeight); + } + + // triangles: build setStakeSeen + if (pindexNew->IsProofOfStake()) + setStakeSeen.insert(make_pair(pindexNew->prevoutStake, pindexNew->nStakeTime)); + + iterator->Next(); + } + delete iterator; + + if (fRequestShutdown) + return true; + + // Calculate nChainTrust + vector > vSortedByHeight; + vSortedByHeight.reserve(mapBlockIndex.size()); + BOOST_FOREACH(const PAIRTYPE(uint256, CBlockIndex*)& item, mapBlockIndex) + { + CBlockIndex* pindex = item.second; + vSortedByHeight.push_back(make_pair(pindex->nHeight, pindex)); + } + sort(vSortedByHeight.begin(), vSortedByHeight.end()); + BOOST_FOREACH(const PAIRTYPE(int, CBlockIndex*)& item, vSortedByHeight) + { + CBlockIndex* pindex = item.second; + pindex->nChainTrust = (pindex->pprev ? pindex->pprev->nChainTrust : 0) + pindex->GetBlockTrust(); + // triangles: calculate stake modifier checksum + pindex->nStakeModifierChecksum = GetStakeModifierChecksum(pindex); + if (!CheckStakeModifierCheckpoints(pindex->nHeight, pindex->nStakeModifierChecksum)) + return error("CTxDB::LoadBlockIndex() : Failed stake modifier checkpoint height=%d, modifier=0x%016"PRIx64, pindex->nHeight, pindex->nStakeModifier); + } + + // Load hashBestChain pointer to end of best chain + if (!ReadHashBestChain(hashBestChain)) + { + if (pindexGenesisBlock == NULL) + return true; + return error("CTxDB::LoadBlockIndex() : hashBestChain not loaded"); + } + if (!mapBlockIndex.count(hashBestChain)) + return error("CTxDB::LoadBlockIndex() : hashBestChain not found in the block index"); + pindexBest = mapBlockIndex[hashBestChain]; + nBestHeight = pindexBest->nHeight; + nBestChainTrust = pindexBest->nChainTrust; + + printf("LoadBlockIndex(): hashBestChain=%s height=%d trust=%s date=%s\n", + hashBestChain.ToString().substr(0,20).c_str(), nBestHeight, CBigNum(nBestChainTrust).ToString().c_str(), + DateTimeStrFormat("%x %H:%M:%S", pindexBest->GetBlockTime()).c_str()); + + // triangles: load hashSyncCheckpoint + if (!ReadSyncCheckpoint(Checkpoints::hashSyncCheckpoint)) + return error("CTxDB::LoadBlockIndex() : hashSyncCheckpoint not loaded"); + printf("LoadBlockIndex(): synchronized checkpoint %s\n", Checkpoints::hashSyncCheckpoint.ToString().c_str()); + + // Load bnBestInvalidTrust, OK if it doesn't exist + CBigNum bnBestInvalidTrust; + ReadBestInvalidTrust(bnBestInvalidTrust); + nBestInvalidTrust = bnBestInvalidTrust.getuint256(); + + // Verify blocks in the best chain + int nCheckLevel = GetArg("-checklevel", 1); + int nCheckDepth = GetArg( "-checkblocks", 2500); + if (nCheckDepth == 0) + nCheckDepth = 1000000000; // suffices until the year 19000 + if (nCheckDepth > nBestHeight) + nCheckDepth = nBestHeight; + printf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel); + CBlockIndex* pindexFork = NULL; + map, CBlockIndex*> mapBlockPos; + for (CBlockIndex* pindex = pindexBest; pindex && pindex->pprev; pindex = pindex->pprev) + { + if (fRequestShutdown || pindex->nHeight < nBestHeight-nCheckDepth) + break; + CBlock block; + if (!block.ReadFromDisk(pindex)) + return error("LoadBlockIndex() : block.ReadFromDisk failed"); + // check level 1: verify block validity + // check level 7: verify block signature too + if (nCheckLevel>0 && !block.CheckBlock(true, true, (nCheckLevel>6))) + { + printf("LoadBlockIndex() : *** found bad block at %d, hash=%s\n", pindex->nHeight, pindex->GetBlockHash().ToString().c_str()); + pindexFork = pindex->pprev; + } + // check level 2: verify transaction index validity + if (nCheckLevel>1) + { + pair pos = make_pair(pindex->nFile, pindex->nBlockPos); + mapBlockPos[pos] = pindex; + BOOST_FOREACH(const CTransaction &tx, block.vtx) + { + uint256 hashTx = tx.GetHash(); + CTxIndex txindex; + if (ReadTxIndex(hashTx, txindex)) + { + // check level 3: checker transaction hashes + if (nCheckLevel>2 || pindex->nFile != txindex.pos.nFile || pindex->nBlockPos != txindex.pos.nBlockPos) + { + // either an error or a duplicate transaction + CTransaction txFound; + if (!txFound.ReadFromDisk(txindex.pos)) + { + printf("LoadBlockIndex() : *** cannot read mislocated transaction %s\n", hashTx.ToString().c_str()); + pindexFork = pindex->pprev; + } + else + if (txFound.GetHash() != hashTx) // not a duplicate tx + { + printf("LoadBlockIndex(): *** invalid tx position for %s\n", hashTx.ToString().c_str()); + pindexFork = pindex->pprev; + } + } + // check level 4: check whether spent txouts were spent within the main chain + unsigned int nOutput = 0; + if (nCheckLevel>3) + { + BOOST_FOREACH(const CDiskTxPos &txpos, txindex.vSpent) + { + if (!txpos.IsNull()) + { + pair posFind = make_pair(txpos.nFile, txpos.nBlockPos); + if (!mapBlockPos.count(posFind)) + { + printf("LoadBlockIndex(): *** found bad spend at %d, hashBlock=%s, hashTx=%s\n", pindex->nHeight, pindex->GetBlockHash().ToString().c_str(), hashTx.ToString().c_str()); + pindexFork = pindex->pprev; + } + // check level 6: check whether spent txouts were spent by a valid transaction that consume them + if (nCheckLevel>5) + { + CTransaction txSpend; + if (!txSpend.ReadFromDisk(txpos)) + { + printf("LoadBlockIndex(): *** cannot read spending transaction of %s:%i from disk\n", hashTx.ToString().c_str(), nOutput); + pindexFork = pindex->pprev; + } + else if (!txSpend.CheckTransaction()) + { + printf("LoadBlockIndex(): *** spending transaction of %s:%i is invalid\n", hashTx.ToString().c_str(), nOutput); + pindexFork = pindex->pprev; + } + else + { + bool fFound = false; + BOOST_FOREACH(const CTxIn &txin, txSpend.vin) + if (txin.prevout.hash == hashTx && txin.prevout.n == nOutput) + fFound = true; + if (!fFound) + { + printf("LoadBlockIndex(): *** spending transaction of %s:%i does not spend it\n", hashTx.ToString().c_str(), nOutput); + pindexFork = pindex->pprev; + } + } + } + } + nOutput++; + } + } + } + // check level 5: check whether all prevouts are marked spent + if (nCheckLevel>4) + { + BOOST_FOREACH(const CTxIn &txin, tx.vin) + { + CTxIndex txindex; + if (ReadTxIndex(txin.prevout.hash, txindex)) + if (txindex.vSpent.size()-1 < txin.prevout.n || txindex.vSpent[txin.prevout.n].IsNull()) + { + printf("LoadBlockIndex(): *** found unspent prevout %s:%i in %s\n", txin.prevout.hash.ToString().c_str(), txin.prevout.n, hashTx.ToString().c_str()); + pindexFork = pindex->pprev; + } + } + } + } + } + } + if (pindexFork && !fRequestShutdown) + { + // Reorg back to the fork + printf("LoadBlockIndex() : *** moving best chain pointer back to block %d\n", pindexFork->nHeight); + CBlock block; + if (!block.ReadFromDisk(pindexFork)) + return error("LoadBlockIndex() : block.ReadFromDisk failed"); + CTxDB txdb; + block.SetBestChain(txdb, pindexFork); + } + + return true; +} + diff --git a/src/txdb-leveldb.h b/src/txdb-leveldb.h new file mode 100644 index 0000000..1618722 --- /dev/null +++ b/src/txdb-leveldb.h @@ -0,0 +1,210 @@ +// Copyright (c) 2009-2012 The Bitcoin developers. +// Authored by Google, Inc. +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef TRIANGLES_LEVELDB_H +#define TRIANGLES_LEVELDB_H + +#include "main.h" + +#include +#include +#include + +#include +#include + +// Class that provides access to a LevelDB. Note that this class is frequently +// instantiated on the stack and then destroyed again, so instantiation has to +// be very cheap. Unfortunately that means, a CTxDB instance is actually just a +// wrapper around some global state. +// +// A LevelDB is a key/value store that is optimized for fast usage on hard +// disks. It prefers long read/writes to seeks and is based on a series of +// sorted key/value mapping files that are stacked on top of each other, with +// newer files overriding older files. A background thread compacts them +// together when too many files stack up. +// +// Learn more: http://code.google.com/p/leveldb/ +class CTxDB +{ +public: + CTxDB(const char* pszMode="r+"); + ~CTxDB() { + // Note that this is not the same as Close() because it deletes only + // data scoped to this TxDB object. + delete activeBatch; + } + + // Destroys the underlying shared global state accessed by this TxDB. + void Close(); + +private: + leveldb::DB *pdb; // Points to the global instance. + + // A batch stores up writes and deletes for atomic application. When this + // field is non-NULL, writes/deletes go there instead of directly to disk. + leveldb::WriteBatch *activeBatch; + leveldb::Options options; + bool fReadOnly; + int nVersion; + +protected: + // Returns true and sets (value,false) if activeBatch contains the given key + // or leaves value alone and sets deleted = true if activeBatch contains a + // delete for it. + bool ScanBatch(const CDataStream &key, std::string *value, bool *deleted) const; + + template + bool Read(const K& key, T& value) + { + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(1000); + ssKey << key; + std::string strValue; + + bool readFromDb = true; + if (activeBatch) { + // First we must search for it in the currently pending set of + // changes to the db. If not found in the batch, go on to read disk. + bool deleted = false; + readFromDb = ScanBatch(ssKey, &strValue, &deleted) == false; + if (deleted) { + return false; + } + } + if (readFromDb) { + leveldb::Status status = pdb->Get(leveldb::ReadOptions(), + ssKey.str(), &strValue); + if (!status.ok()) { + if (status.IsNotFound()) + return false; + // Some unexpected error. + printf("LevelDB read failure: %s\n", status.ToString().c_str()); + return false; + } + } + // Unserialize value + try { + CDataStream ssValue(strValue.data(), strValue.data() + strValue.size(), + SER_DISK, CLIENT_VERSION); + ssValue >> value; + } + catch (std::exception &e) { + return false; + } + return true; + } + + template + bool Write(const K& key, const T& value) + { + if (fReadOnly) + assert(!"Write called on database in read-only mode"); + + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(1000); + ssKey << key; + CDataStream ssValue(SER_DISK, CLIENT_VERSION); + ssValue.reserve(10000); + ssValue << value; + + if (activeBatch) { + activeBatch->Put(ssKey.str(), ssValue.str()); + return true; + } + leveldb::Status status = pdb->Put(leveldb::WriteOptions(), ssKey.str(), ssValue.str()); + if (!status.ok()) { + printf("LevelDB write failure: %s\n", status.ToString().c_str()); + return false; + } + return true; + } + + template + bool Erase(const K& key) + { + if (!pdb) + return false; + if (fReadOnly) + assert(!"Erase called on database in read-only mode"); + + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(1000); + ssKey << key; + if (activeBatch) { + activeBatch->Delete(ssKey.str()); + return true; + } + leveldb::Status status = pdb->Delete(leveldb::WriteOptions(), ssKey.str()); + return (status.ok() || status.IsNotFound()); + } + + template + bool Exists(const K& key) + { + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(1000); + ssKey << key; + std::string unused; + + if (activeBatch) { + bool deleted; + if (ScanBatch(ssKey, &unused, &deleted) && !deleted) { + return true; + } + } + + + leveldb::Status status = pdb->Get(leveldb::ReadOptions(), ssKey.str(), &unused); + return status.IsNotFound() == false; + } + + +public: + bool TxnBegin(); + bool TxnCommit(); + bool TxnAbort() + { + delete activeBatch; + activeBatch = NULL; + return true; + } + + bool ReadVersion(int& nVersion) + { + nVersion = 0; + return Read(std::string("version"), nVersion); + } + + bool WriteVersion(int nVersion) + { + return Write(std::string("version"), nVersion); + } + + bool ReadTxIndex(uint256 hash, CTxIndex& txindex); + bool UpdateTxIndex(uint256 hash, const CTxIndex& txindex); + bool AddTxIndex(const CTransaction& tx, const CDiskTxPos& pos, int nHeight); + bool EraseTxIndex(const CTransaction& tx); + bool ContainsTx(uint256 hash); + bool ReadDiskTx(uint256 hash, CTransaction& tx, CTxIndex& txindex); + bool ReadDiskTx(uint256 hash, CTransaction& tx); + bool ReadDiskTx(COutPoint outpoint, CTransaction& tx, CTxIndex& txindex); + bool ReadDiskTx(COutPoint outpoint, CTransaction& tx); + bool WriteBlockIndex(const CDiskBlockIndex& blockindex); + bool ReadHashBestChain(uint256& hashBestChain); + bool WriteHashBestChain(uint256 hashBestChain); + bool ReadBestInvalidTrust(CBigNum& bnBestInvalidTrust); + bool WriteBestInvalidTrust(CBigNum bnBestInvalidTrust); + bool ReadSyncCheckpoint(uint256& hashCheckpoint); + bool WriteSyncCheckpoint(uint256 hashCheckpoint); + bool ReadCheckpointPubKey(std::string& strPubKey); + bool WriteCheckpointPubKey(const std::string& strPubKey); + bool LoadBlockIndex(); +private: + bool LoadBlockIndexGuts(); +}; + + +#endif // TRIANGLES_LEVELDB_H diff --git a/src/txdb.h b/src/txdb.h new file mode 100644 index 0000000..1f73299 --- /dev/null +++ b/src/txdb.h @@ -0,0 +1,11 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// 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. + +#ifndef TRIANGLES_TXDB_H +#define TRIANGLES_TXDB_H + +#include "txdb-leveldb.h" + +#endif // TRIANGLES_TXDB_H diff --git a/src/ui_interface.h b/src/ui_interface.h index 0f7fdef..7567877 100644 --- a/src/ui_interface.h +++ b/src/ui_interface.h @@ -2,13 +2,16 @@ // Copyright (c) 2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_UI_INTERFACE_H -#define BITCOIN_UI_INTERFACE_H + +#ifndef TRIANGLES_UI_INTERFACE_H +#define TRIANGLES_UI_INTERFACE_H + +#include +#include #include -#include "util.h" // for int64 -#include -#include + +#include class CBasicKeyStore; class CWallet; @@ -63,7 +66,7 @@ public: boost::signals2::signal ThreadSafeMessageBox; /** Ask the user whether they want to pay a fee or not. */ - boost::signals2::signal > ThreadSafeAskFee; + boost::signals2::signal > ThreadSafeAskFee; /** Handle a URL passed at the command line. */ boost::signals2::signal ThreadSafeHandleURI; diff --git a/src/uint256.h b/src/uint256.h index 268500e..db44993 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -2,23 +2,20 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_UINT256_H -#define BITCOIN_UINT256_H -#include -#include -#include +#ifndef TRIANGLES_UINT256_H +#define TRIANGLES_UINT256_H + #include #include -typedef long long int64; -typedef unsigned long long uint64; - +#include +#include +#include inline int Testuint256AdHoc(std::vector vArg); - /** Base class without constructors for uint256 and uint160. * This makes the compiler let u use it in a union. */ @@ -55,8 +52,18 @@ public: return ret; } + double getdouble() const + { + double ret = 0.0; + double fact = 1.0; + for (int i = 0; i < WIDTH; i++) { + ret += fact * pn[i]; + fact *= 4294967296.0; + } + return ret; + } - base_uint& operator=(uint64 b) + base_uint& operator=(uint64_t b) { pn[0] = (unsigned int)b; pn[1] = (unsigned int)(b >> 32); @@ -86,14 +93,14 @@ public: return *this; } - base_uint& operator^=(uint64 b) + base_uint& operator^=(uint64_t b) { pn[0] ^= (unsigned int)b; pn[1] ^= (unsigned int)(b >> 32); return *this; } - base_uint& operator|=(uint64 b) + base_uint& operator|=(uint64_t b) { pn[0] |= (unsigned int)b; pn[1] |= (unsigned int)(b >> 32); @@ -136,10 +143,10 @@ public: base_uint& operator+=(const base_uint& b) { - uint64 carry = 0; + uint64_t carry = 0; for (int i = 0; i < WIDTH; i++) { - uint64 n = carry + pn[i] + b.pn[i]; + uint64_t n = carry + pn[i] + b.pn[i]; pn[i] = n & 0xffffffff; carry = n >> 32; } @@ -152,7 +159,7 @@ public: return *this; } - base_uint& operator+=(uint64 b64) + base_uint& operator+=(uint64_t b64) { base_uint b; b = b64; @@ -160,7 +167,7 @@ public: return *this; } - base_uint& operator-=(uint64 b64) + base_uint& operator-=(uint64_t b64) { base_uint b; b = b64; @@ -260,7 +267,7 @@ public: return true; } - friend inline bool operator==(const base_uint& a, uint64 b) + friend inline bool operator==(const base_uint& a, uint64_t b) { if (a.pn[0] != (unsigned int)b) return false; @@ -277,7 +284,7 @@ public: return (!(a == b)); } - friend inline bool operator!=(const base_uint& a, uint64 b) + friend inline bool operator!=(const base_uint& a, uint64_t b) { return (!(a == b)); } @@ -344,40 +351,46 @@ public: return (unsigned char*)&pn[WIDTH]; } + const unsigned char* begin() const + { + return (unsigned char*)&pn[0]; + } + + const unsigned char* end() const + { + return (unsigned char*)&pn[WIDTH]; + } + unsigned int size() { return sizeof(pn); } - uint64 Get64(int n=0) const + uint64_t Get64(int n=0) const { - return pn[2*n] | (uint64)pn[2*n+1] << 32; + return pn[2*n] | (uint64_t)pn[2*n+1] << 32; } -// unsigned int GetSerializeSize(int nType=0, int nVersion=PROTOCOL_VERSION) const unsigned int GetSerializeSize(int nType, int nVersion) const { return sizeof(pn); } template -// void Serialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION) const void Serialize(Stream& s, int nType, int nVersion) const { s.write((char*)pn, sizeof(pn)); } template -// void Unserialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION) void Unserialize(Stream& s, int nType, int nVersion) { s.read((char*)pn, sizeof(pn)); } - friend class uint160; friend class uint256; - friend class uint512; + friend class uint512; friend inline int Testuint256AdHoc(std::vector vArg); }; @@ -385,7 +398,6 @@ typedef base_uint<160> base_uint160; typedef base_uint<256> base_uint256; typedef base_uint<512> base_uint512; - // // uint160 and uint256 could be implemented as templates, but to keep // compile errors and debugging cleaner, they're copy and pasted. @@ -423,7 +435,7 @@ public: return *this; } - uint160(uint64 b) + uint160(uint64_t b) { pn[0] = (unsigned int)b; pn[1] = (unsigned int)(b >> 32); @@ -431,7 +443,7 @@ public: pn[i] = 0; } - uint160& operator=(uint64 b) + uint160& operator=(uint64_t b) { pn[0] = (unsigned int)b; pn[1] = (unsigned int)(b >> 32); @@ -454,8 +466,8 @@ public: } }; -inline bool operator==(const uint160& a, uint64 b) { return (base_uint160)a == b; } -inline bool operator!=(const uint160& a, uint64 b) { return (base_uint160)a != b; } +inline bool operator==(const uint160& a, uint64_t b) { return (base_uint160)a == b; } +inline bool operator!=(const uint160& a, uint64_t b) { return (base_uint160)a != b; } inline const uint160 operator<<(const base_uint160& a, unsigned int shift) { return uint160(a) <<= shift; } inline const uint160 operator>>(const base_uint160& a, unsigned int shift) { return uint160(a) >>= shift; } inline const uint160 operator<<(const uint160& a, unsigned int shift) { return uint160(a) <<= shift; } @@ -538,7 +550,7 @@ public: return *this; } - uint256(uint64 b) + uint256(uint64_t b) { pn[0] = (unsigned int)b; pn[1] = (unsigned int)(b >> 32); @@ -546,7 +558,7 @@ public: pn[i] = 0; } - uint256& operator=(uint64 b) + uint256& operator=(uint64_t b) { pn[0] = (unsigned int)b; pn[1] = (unsigned int)(b >> 32); @@ -569,8 +581,8 @@ public: } }; -inline bool operator==(const uint256& a, uint64 b) { return (base_uint256)a == b; } -inline bool operator!=(const uint256& a, uint64 b) { return (base_uint256)a != b; } +inline bool operator==(const uint256& a, uint64_t b) { return (base_uint256)a == b; } +inline bool operator!=(const uint256& a, uint64_t b) { return (base_uint256)a != b; } inline const uint256 operator<<(const base_uint256& a, unsigned int shift) { return uint256(a) <<= shift; } inline const uint256 operator>>(const base_uint256& a, unsigned int shift) { return uint256(a) >>= shift; } inline const uint256 operator<<(const uint256& a, unsigned int shift) { return uint256(a) <<= shift; } @@ -652,7 +664,7 @@ public: return *this; } - uint512(uint64 b) + uint512(uint64_t b) { pn[0] = (unsigned int)b; pn[1] = (unsigned int)(b >> 32); @@ -660,7 +672,7 @@ public: pn[i] = 0; } - uint512& operator=(uint64 b) + uint512& operator=(uint64_t b) { pn[0] = (unsigned int)b; pn[1] = (unsigned int)(b >> 32); @@ -692,12 +704,12 @@ public: } }; -inline bool operator==(const uint512& a, uint64 b) { return (base_uint512)a == b; } -inline bool operator!=(const uint512& a, uint64 b) { return (base_uint512)a != b; } -inline const uint512 operator<<(const base_uint512& a, unsigned int shift) { return uint512(a) <<= shift; } -inline const uint512 operator>>(const base_uint512& a, unsigned int shift) { return uint512(a) >>= shift; } -inline const uint512 operator<<(const uint512& a, unsigned int shift) { return uint512(a) <<= shift; } -inline const uint512 operator>>(const uint512& a, unsigned int shift) { return uint512(a) >>= shift; } +inline bool operator==(const uint512& a, uint64_t b) { return (base_uint512)a == b; } +inline bool operator!=(const uint512& a, uint64_t b) { return (base_uint512)a != b; } +inline const uint512 operator<<(const base_uint512& a, unsigned int shift) { return uint512(a) <<= shift; } +inline const uint512 operator>>(const base_uint512& a, unsigned int shift) { return uint512(a) >>= shift; } +inline const uint512 operator<<(const uint512& a, unsigned int shift) { return uint512(a) <<= shift; } +inline const uint512 operator>>(const uint512& a, unsigned int shift) { return uint512(a) >>= shift; } inline const uint512 operator^(const base_uint512& a, const base_uint512& b) { return uint512(a) ^= b; } inline const uint512 operator&(const base_uint512& a, const base_uint512& b) { return uint512(a) &= b; } @@ -705,41 +717,42 @@ inline const uint512 operator|(const base_uint512& a, const base_uint512& b) { r inline const uint512 operator+(const base_uint512& a, const base_uint512& b) { return uint512(a) += b; } inline const uint512 operator-(const base_uint512& a, const base_uint512& b) { return uint512(a) -= b; } -inline bool operator<(const base_uint512& a, const uint512& b) { return (base_uint512)a < (base_uint512)b; } -inline bool operator<=(const base_uint512& a, const uint512& b) { return (base_uint512)a <= (base_uint512)b; } -inline bool operator>(const base_uint512& a, const uint512& b) { return (base_uint512)a > (base_uint512)b; } -inline bool operator>=(const base_uint512& a, const uint512& b) { return (base_uint512)a >= (base_uint512)b; } -inline bool operator==(const base_uint512& a, const uint512& b) { return (base_uint512)a == (base_uint512)b; } -inline bool operator!=(const base_uint512& a, const uint512& b) { return (base_uint512)a != (base_uint512)b; } -inline const uint512 operator^(const base_uint512& a, const uint512& b) { return (base_uint512)a ^ (base_uint512)b; } -inline const uint512 operator&(const base_uint512& a, const uint512& b) { return (base_uint512)a & (base_uint512)b; } -inline const uint512 operator|(const base_uint512& a, const uint512& b) { return (base_uint512)a | (base_uint512)b; } -inline const uint512 operator+(const base_uint512& a, const uint512& b) { return (base_uint512)a + (base_uint512)b; } -inline const uint512 operator-(const base_uint512& a, const uint512& b) { return (base_uint512)a - (base_uint512)b; } +inline bool operator<(const base_uint512& a, const uint512& b) { return (base_uint512)a < (base_uint512)b; } +inline bool operator<=(const base_uint512& a, const uint512& b) { return (base_uint512)a <= (base_uint512)b; } +inline bool operator>(const base_uint512& a, const uint512& b) { return (base_uint512)a > (base_uint512)b; } +inline bool operator>=(const base_uint512& a, const uint512& b) { return (base_uint512)a >= (base_uint512)b; } +inline bool operator==(const base_uint512& a, const uint512& b) { return (base_uint512)a == (base_uint512)b; } +inline bool operator!=(const base_uint512& a, const uint512& b) { return (base_uint512)a != (base_uint512)b; } +inline const uint512 operator^(const base_uint512& a, const uint512& b) { return (base_uint512)a ^ (base_uint512)b; } +inline const uint512 operator&(const base_uint512& a, const uint512& b) { return (base_uint512)a & (base_uint512)b; } +inline const uint512 operator|(const base_uint512& a, const uint512& b) { return (base_uint512)a | (base_uint512)b; } +inline const uint512 operator+(const base_uint512& a, const uint512& b) { return (base_uint512)a + (base_uint512)b; } +inline const uint512 operator-(const base_uint512& a, const uint512& b) { return (base_uint512)a - (base_uint512)b; } -inline bool operator<(const uint512& a, const base_uint512& b) { return (base_uint512)a < (base_uint512)b; } -inline bool operator<=(const uint512& a, const base_uint512& b) { return (base_uint512)a <= (base_uint512)b; } -inline bool operator>(const uint512& a, const base_uint512& b) { return (base_uint512)a > (base_uint512)b; } -inline bool operator>=(const uint512& a, const base_uint512& b) { return (base_uint512)a >= (base_uint512)b; } -inline bool operator==(const uint512& a, const base_uint512& b) { return (base_uint512)a == (base_uint512)b; } -inline bool operator!=(const uint512& a, const base_uint512& b) { return (base_uint512)a != (base_uint512)b; } -inline const uint512 operator^(const uint512& a, const base_uint512& b) { return (base_uint512)a ^ (base_uint512)b; } -inline const uint512 operator&(const uint512& a, const base_uint512& b) { return (base_uint512)a & (base_uint512)b; } -inline const uint512 operator|(const uint512& a, const base_uint512& b) { return (base_uint512)a | (base_uint512)b; } -inline const uint512 operator+(const uint512& a, const base_uint512& b) { return (base_uint512)a + (base_uint512)b; } -inline const uint512 operator-(const uint512& a, const base_uint512& b) { return (base_uint512)a - (base_uint512)b; } +inline bool operator<(const uint512& a, const base_uint512& b) { return (base_uint512)a < (base_uint512)b; } +inline bool operator<=(const uint512& a, const base_uint512& b) { return (base_uint512)a <= (base_uint512)b; } +inline bool operator>(const uint512& a, const base_uint512& b) { return (base_uint512)a > (base_uint512)b; } +inline bool operator>=(const uint512& a, const base_uint512& b) { return (base_uint512)a >= (base_uint512)b; } +inline bool operator==(const uint512& a, const base_uint512& b) { return (base_uint512)a == (base_uint512)b; } +inline bool operator!=(const uint512& a, const base_uint512& b) { return (base_uint512)a != (base_uint512)b; } +inline const uint512 operator^(const uint512& a, const base_uint512& b) { return (base_uint512)a ^ (base_uint512)b; } +inline const uint512 operator&(const uint512& a, const base_uint512& b) { return (base_uint512)a & (base_uint512)b; } +inline const uint512 operator|(const uint512& a, const base_uint512& b) { return (base_uint512)a | (base_uint512)b; } +inline const uint512 operator+(const uint512& a, const base_uint512& b) { return (base_uint512)a + (base_uint512)b; } +inline const uint512 operator-(const uint512& a, const base_uint512& b) { return (base_uint512)a - (base_uint512)b; } + +inline bool operator<(const uint512& a, const uint512& b) { return (base_uint512)a < (base_uint512)b; } +inline bool operator<=(const uint512& a, const uint512& b) { return (base_uint512)a <= (base_uint512)b; } +inline bool operator>(const uint512& a, const uint512& b) { return (base_uint512)a > (base_uint512)b; } +inline bool operator>=(const uint512& a, const uint512& b) { return (base_uint512)a >= (base_uint512)b; } +inline bool operator==(const uint512& a, const uint512& b) { return (base_uint512)a == (base_uint512)b; } +inline bool operator!=(const uint512& a, const uint512& b) { return (base_uint512)a != (base_uint512)b; } +inline const uint512 operator^(const uint512& a, const uint512& b) { return (base_uint512)a ^ (base_uint512)b; } +inline const uint512 operator&(const uint512& a, const uint512& b) { return (base_uint512)a & (base_uint512)b; } +inline const uint512 operator|(const uint512& a, const uint512& b) { return (base_uint512)a | (base_uint512)b; } +inline const uint512 operator+(const uint512& a, const uint512& b) { return (base_uint512)a + (base_uint512)b; } +inline const uint512 operator-(const uint512& a, const uint512& b) { return (base_uint512)a - (base_uint512)b; } -inline bool operator<(const uint512& a, const uint512& b) { return (base_uint512)a < (base_uint512)b; } -inline bool operator<=(const uint512& a, const uint512& b) { return (base_uint512)a <= (base_uint512)b; } -inline bool operator>(const uint512& a, const uint512& b) { return (base_uint512)a > (base_uint512)b; } -inline bool operator>=(const uint512& a, const uint512& b) { return (base_uint512)a >= (base_uint512)b; } -inline bool operator==(const uint512& a, const uint512& b) { return (base_uint512)a == (base_uint512)b; } -inline bool operator!=(const uint512& a, const uint512& b) { return (base_uint512)a != (base_uint512)b; } -inline const uint512 operator^(const uint512& a, const uint512& b) { return (base_uint512)a ^ (base_uint512)b; } -inline const uint512 operator&(const uint512& a, const uint512& b) { return (base_uint512)a & (base_uint512)b; } -inline const uint512 operator|(const uint512& a, const uint512& b) { return (base_uint512)a | (base_uint512)b; } -inline const uint512 operator+(const uint512& a, const uint512& b) { return (base_uint512)a + (base_uint512)b; } -inline const uint512 operator-(const uint512& a, const uint512& b) { return (base_uint512)a - (base_uint512)b; } diff --git a/src/util.cpp b/src/util.cpp index fa0be5b..5b3ac15 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1,1382 +1,1341 @@ -// Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2012 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -#include "util.h" -#include "sync.h" -#include "strlcpy.h" -#include "version.h" -#include "ui_interface.h" -#include - -// Work around clang compilation problem in Boost 1.46: -// /usr/include/boost/program_options/detail/config_file.hpp:163:17: error: call to function 'to_internal' that is neither visible in the template definition nor found by argument-dependent lookup -// See also: http://stackoverflow.com/questions/10020179/compilation-fail-in-boost-librairies-program-options -// http://clang.debian.net/status.php?version=3.0&key=CANNOT_FIND_FUNCTION -namespace boost { - namespace program_options { - std::string to_internal(const std::string&); - } -} - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef WIN32 -#ifdef _MSC_VER -#pragma warning(disable:4786) -#pragma warning(disable:4804) -#pragma warning(disable:4805) -#pragma warning(disable:4717) -#endif -#ifdef _WIN32_WINNT -#undef _WIN32_WINNT -#endif -#define _WIN32_WINNT 0x0501 -#ifdef _WIN32_IE -#undef _WIN32_IE -#endif -#define _WIN32_IE 0x0501 -#define WIN32_LEAN_AND_MEAN 1 -#ifndef NOMINMAX -#define NOMINMAX -#endif -#include /* for _commit */ -#include "shlobj.h" -#elif defined(__linux__) -# include -#endif - -#ifndef WIN32 -#include -#endif - - -using namespace std; - -map mapArgs; -map > mapMultiArgs; -bool fStaking = true; -bool fDebug = false; -bool fDebugNet = false; -bool fPrintToConsole = false; -bool fPrintToDebugger = false; -bool fRequestShutdown = false; -bool fShutdown = false; -bool fDaemon = false; -bool fServer = false; -bool fCommandLine = false; -string strMiscWarning; -bool fTestNet = false; -bool fLogTimestamps = false; -CMedianFilter vTimeOffsets(200,0); -bool fReopenDebugLog = false; - -// Init OpenSSL library multithreading support -static CCriticalSection** ppmutexOpenSSL; -void locking_callback(int mode, int i, const char* file, int line) -{ - if (mode & CRYPTO_LOCK) { - ENTER_CRITICAL_SECTION(*ppmutexOpenSSL[i]); - } else { - LEAVE_CRITICAL_SECTION(*ppmutexOpenSSL[i]); - } -} - -LockedPageManager LockedPageManager::instance; - -// Init -class CInit -{ -public: - CInit() - { - // 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(); - CRYPTO_set_locking_callback(locking_callback); - -#ifdef WIN32 - // Seed random number generator with screen scrape and other hardware sources - RAND_screen(); -#endif - - // Seed random number generator with performance counter - RandAddSeed(); - } - ~CInit() - { - // Shutdown OpenSSL library multithreading support - CRYPTO_set_locking_callback(NULL); - for (int i = 0; i < CRYPTO_num_locks(); i++) - delete ppmutexOpenSSL[i]; - OPENSSL_free(ppmutexOpenSSL); - } -} -instance_of_cinit; - - - -void RandAddSeed() -{ - // Seed with CPU performance counter - int64 nCounter = GetPerformanceCounter(); - RAND_add(&nCounter, sizeof(nCounter), 1.5); - memset(&nCounter, 0, sizeof(nCounter)); -} - -void RandAddSeedPerfmon() -{ - RandAddSeed(); - - // This can take up to 2 seconds, so only do it every 10 minutes - static int64 nLastPerfmon; - if (GetTime() < nLastPerfmon + 10 * 60) - return; - nLastPerfmon = GetTime(); - -#ifdef WIN32 - // Don't need this on Linux, OpenSSL automatically uses /dev/urandom - // Seed with the entire set of perfmon data - unsigned char pdata[250000]; - memset(pdata, 0, sizeof(pdata)); - unsigned long nSize = sizeof(pdata); - long ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, pdata, &nSize); - RegCloseKey(HKEY_PERFORMANCE_DATA); - if (ret == ERROR_SUCCESS) - { - RAND_add(pdata, nSize, nSize/100.0); - memset(pdata, 0, nSize); - printf("RandAddSeed() %lu bytes\n", nSize); - } -#endif -} - -uint64 GetRand(uint64 nMax) -{ - if (nMax == 0) - return 0; - - // The range of the random source must be a multiple of the modulus - // to give every possible output value an equal possibility - uint64 nRange = (std::numeric_limits::max() / nMax) * nMax; - uint64 nRand = 0; - do - RAND_bytes((unsigned char*)&nRand, sizeof(nRand)); - while (nRand >= nRange); - return (nRand % nMax); -} - -int GetRandInt(int nMax) -{ - return GetRand(nMax); -} - -uint256 GetRandHash() -{ - uint256 hash; - RAND_bytes((unsigned char*)&hash, sizeof(hash)); - return hash; -} - -static FILE* fileout = NULL; - -inline int OutputDebugStringF(const char* pszFormat, ...) -{ - int ret = 0; - if (fPrintToConsole) - { - // print to console - va_list arg_ptr; - va_start(arg_ptr, pszFormat); - ret = vprintf(pszFormat, arg_ptr); - va_end(arg_ptr); - } - else if (!fPrintToDebugger) - { - // print to debug.log - - if (!fileout) - { - boost::filesystem::path pathDebug = GetDataDir() / "debug.log"; - fileout = fopen(pathDebug.string().c_str(), "a"); - if (fileout) setbuf(fileout, NULL); // unbuffered - } - if (fileout) - { - static bool fStartedNewLine = true; - - // This routine may be called by global destructors during shutdown. - // Since the order of destruction of static/global objects is undefined, - // allocate mutexDebugLog on the heap the first time this routine - // is called to avoid crashes during shutdown. - static boost::mutex* mutexDebugLog = NULL; - if (mutexDebugLog == NULL) mutexDebugLog = new boost::mutex(); - boost::mutex::scoped_lock scoped_lock(*mutexDebugLog); - - // reopen the log file, if requested - if (fReopenDebugLog) { - fReopenDebugLog = false; - boost::filesystem::path pathDebug = GetDataDir() / "debug.log"; - if (freopen(pathDebug.string().c_str(),"a",fileout) != NULL) - setbuf(fileout, NULL); // unbuffered - } - - // Debug print useful for profiling - if (fLogTimestamps && fStartedNewLine) - fprintf(fileout, "%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str()); - if (pszFormat[strlen(pszFormat) - 1] == '\n') - fStartedNewLine = true; - else - fStartedNewLine = false; - - va_list arg_ptr; - va_start(arg_ptr, pszFormat); - ret = vfprintf(fileout, pszFormat, arg_ptr); - va_end(arg_ptr); - } - } - -#ifdef WIN32 - if (fPrintToDebugger) - { - static CCriticalSection cs_OutputDebugStringF; - - // accumulate and output a line at a time - { - LOCK(cs_OutputDebugStringF); - static std::string buffer; - - va_list arg_ptr; - va_start(arg_ptr, pszFormat); - buffer += vstrprintf(pszFormat, arg_ptr); - va_end(arg_ptr); - - int line_start = 0, line_end; - while((line_end = buffer.find('\n', line_start)) != -1) - { - OutputDebugStringA(buffer.substr(line_start, line_end - line_start).c_str()); - line_start = line_end + 1; - } - buffer.erase(0, line_start); - } - } -#endif - return ret; -} - -string vstrprintf(const char *format, va_list ap) -{ - char buffer[50000]; - char* p = buffer; - int limit = sizeof(buffer); - int ret; - loop - { - va_list arg_ptr; - va_copy(arg_ptr, ap); -#ifdef WIN32 - ret = _vsnprintf(p, limit, format, arg_ptr); -#else - ret = vsnprintf(p, limit, format, arg_ptr); -#endif - va_end(arg_ptr); - if (ret >= 0 && ret < limit) - break; - if (p != buffer) - delete[] p; - limit *= 2; - p = new char[limit]; - if (p == NULL) - throw std::bad_alloc(); - } - string str(p, p+ret); - if (p != buffer) - delete[] p; - return str; -} - -string real_strprintf(const char *format, int dummy, ...) -{ - va_list arg_ptr; - va_start(arg_ptr, dummy); - string str = vstrprintf(format, arg_ptr); - va_end(arg_ptr); - return str; -} - -string real_strprintf(const std::string &format, int dummy, ...) -{ - va_list arg_ptr; - va_start(arg_ptr, dummy); - string str = vstrprintf(format.c_str(), arg_ptr); - va_end(arg_ptr); - return str; -} - -bool error(const char *format, ...) -{ - va_list arg_ptr; - va_start(arg_ptr, format); - std::string str = vstrprintf(format, arg_ptr); - va_end(arg_ptr); - printf("ERROR: %s\n", str.c_str()); - return false; -} - - -void ParseString(const string& str, char c, vector& v) -{ - if (str.empty()) - return; - string::size_type i1 = 0; - string::size_type i2; - loop - { - i2 = str.find(c, i1); - if (i2 == str.npos) - { - v.push_back(str.substr(i1)); - return; - } - v.push_back(str.substr(i1, i2-i1)); - i1 = i2+1; - } -} - - -string FormatMoney(int64 n, bool fPlus) -{ - // Note: not using straight sprintf here because we do NOT want - // localized number formatting. - int64 n_abs = (n > 0 ? n : -n); - int64 quotient = n_abs/COIN; - int64 remainder = n_abs%COIN; - string str = strprintf("%"PRI64d".%06"PRI64d, quotient, remainder); - - // 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; - if (nTrim) - str.erase(str.size()-nTrim, nTrim); - - if (n < 0) - str.insert((unsigned int)0, 1, '-'); - else if (fPlus && n > 0) - str.insert((unsigned int)0, 1, '+'); - return str; -} - - -bool ParseMoney(const string& str, int64& nRet) -{ - return ParseMoney(str.c_str(), nRet); -} - -bool ParseMoney(const char* pszIn, int64& nRet) -{ - string strWhole; - int64 nUnits = 0; - const char* p = pszIn; - while (isspace(*p)) - p++; - for (; *p; p++) - { - if (*p == '.') - { - p++; - int64 nMult = CENT*10; - while (isdigit(*p) && (nMult > 0)) - { - nUnits += nMult * (*p++ - '0'); - nMult /= 10; - } - break; - } - if (isspace(*p)) - break; - if (!isdigit(*p)) - return false; - strWhole.insert(strWhole.end(), *p); - } - for (; *p; p++) - if (!isspace(*p)) - return false; - if (strWhole.size() > 10) // guard against 63 bit overflow - return false; - if (nUnits < 0 || nUnits > COIN) - return false; - int64 nWhole = atoi64(strWhole); - int64 nValue = nWhole*COIN + nUnits; - - nRet = nValue; - return true; -} - -// safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything -// even possibly remotely dangerous like & or > -static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@"); -string SanitizeString(const string& str) -{ - string strResult; - for (std::string::size_type i = 0; i < str.size(); i++) - { - if (safeChars.find(str[i]) != std::string::npos) - strResult.push_back(str[i]); - } - return strResult; -} - -static const signed char phexdigit[256] = -{ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - 0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1, - -1,0xa,0xb,0xc,0xd,0xe,0xf,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,0xa,0xb,0xc,0xd,0xe,0xf,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, }; - - -static const long hextable[] = -{ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10-19 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 30-39 - -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, - 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, // 50-59 - -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, - 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 70-79 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, // 90-99 - 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 110-109 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 130-139 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 150-159 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 170-179 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 190-199 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 210-219 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 230-239 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1 -}; - - -long hex2long(const char* hexString) -{ - long ret = 0; - - while (*hexString && ret >= 0) - { - ret = (ret << 4) | hextable[*hexString++]; - } - - return ret; -} - - - -bool IsHex(const string& str) -{ - BOOST_FOREACH(unsigned char c, str) - { - if (phexdigit[c] < 0) - return false; - } - return (str.size() > 0) && (str.size()%2 == 0); -} - -vector ParseHex(const char* psz) -{ - // convert hex dump to vector - vector vch; - loop - { - while (isspace(*psz)) - psz++; - signed char c = phexdigit[(unsigned char)*psz++]; - if (c == (signed char)-1) - break; - unsigned char n = (c << 4); - c = phexdigit[(unsigned char)*psz++]; - if (c == (signed char)-1) - break; - n |= c; - vch.push_back(n); - } - return vch; -} - -vector ParseHex(const string& str) -{ - return ParseHex(str.c_str()); -} - -static void InterpretNegativeSetting(string name, map& mapSettingsRet) -{ - // interpret -nofoo as -foo=0 (and -nofoo=0 as -foo=1) as long as -foo not set - if (name.find("-no") == 0) - { - std::string positive("-"); - positive.append(name.begin()+3, name.end()); - if (mapSettingsRet.count(positive) == 0) - { - bool value = !GetBoolArg(name); - mapSettingsRet[positive] = (value ? "1" : "0"); - } - } -} - -void ParseParameters(int argc, const char* const argv[]) -{ - mapArgs.clear(); - mapMultiArgs.clear(); - for (int i = 1; i < argc; i++) - { - char psz[10000]; - strlcpy(psz, argv[i], sizeof(psz)); - char* pszValue = (char*)""; - if (strchr(psz, '=')) - { - pszValue = strchr(psz, '='); - *pszValue++ = '\0'; - } - #ifdef WIN32 - _strlwr(psz); - if (psz[0] == '/') - psz[0] = '-'; - #endif - if (psz[0] != '-') - break; - - mapArgs[psz] = pszValue; - mapMultiArgs[psz].push_back(pszValue); - } - - // New 0.6 features: - BOOST_FOREACH(const PAIRTYPE(string,string)& entry, mapArgs) - { - string name = entry.first; - - // interpret --foo as -foo (as long as both are not set) - if (name.find("--") == 0) - { - std::string singleDash(name.begin()+1, name.end()); - if (mapArgs.count(singleDash) == 0) - mapArgs[singleDash] = entry.second; - name = singleDash; - } - - // interpret -nofoo as -foo=0 (and -nofoo=0 as -foo=1) as long as -foo not set - InterpretNegativeSetting(name, mapArgs); - } -} - -std::string GetArg(const std::string& strArg, const std::string& strDefault) -{ - if (mapArgs.count(strArg)) - return mapArgs[strArg]; - return strDefault; -} - -int64 GetArg(const std::string& strArg, int64 nDefault) -{ - if (mapArgs.count(strArg)) - return atoi64(mapArgs[strArg]); - return nDefault; -} - -bool GetBoolArg(const std::string& strArg, bool fDefault) -{ - if (mapArgs.count(strArg)) - { - if (mapArgs[strArg].empty()) - return true; - return (atoi(mapArgs[strArg]) != 0); - } - return fDefault; -} - -bool SoftSetArg(const std::string& strArg, const std::string& strValue) -{ - if (mapArgs.count(strArg)) - return false; - mapArgs[strArg] = strValue; - return true; -} - -bool SoftSetBoolArg(const std::string& strArg, bool fValue) -{ - if (fValue) - return SoftSetArg(strArg, std::string("1")); - else - return SoftSetArg(strArg, std::string("0")); -} - - -string EncodeBase64(const unsigned char* pch, size_t len) -{ - static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - string strRet=""; - strRet.reserve((len+2)/3*4); - - int mode=0, left=0; - const unsigned char *pchEnd = pch+len; - - while (pch> 2]; - left = (enc & 3) << 4; - mode = 1; - break; - - case 1: // we have two bits - strRet += pbase64[left | (enc >> 4)]; - left = (enc & 15) << 2; - mode = 2; - break; - - case 2: // we have four bits - strRet += pbase64[left | (enc >> 6)]; - strRet += pbase64[enc & 63]; - mode = 0; - break; - } - } - - if (mode) - { - strRet += pbase64[left]; - strRet += '='; - if (mode == 1) - strRet += '='; - } - - return strRet; -} - -string EncodeBase64(const string& str) -{ - return EncodeBase64((const unsigned char*)str.c_str(), str.size()); -} - -vector DecodeBase64(const char* p, bool* pfInvalid) -{ - static const int decode64_table[256] = - { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, - -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - }; - - if (pfInvalid) - *pfInvalid = false; - - vector vchRet; - vchRet.reserve(strlen(p)*3/4); - - int mode = 0; - int left = 0; - - while (1) - { - int dec = decode64_table[(unsigned char)*p]; - if (dec == -1) break; - p++; - switch (mode) - { - case 0: // we have no bits and get 6 - left = dec; - mode = 1; - break; - - case 1: // we have 6 bits and keep 4 - vchRet.push_back((left<<2) | (dec>>4)); - left = dec & 15; - mode = 2; - break; - - case 2: // we have 4 bits and get 6, we keep 2 - vchRet.push_back((left<<4) | (dec>>2)); - left = dec & 3; - mode = 3; - break; - - case 3: // we have 2 bits and get 6 - vchRet.push_back((left<<6) | dec); - mode = 0; - break; - } - } - - if (pfInvalid) - switch (mode) - { - case 0: // 4n base64 characters processed: ok - break; - - case 1: // 4n+1 base64 character processed: impossible - *pfInvalid = true; - break; - - case 2: // 4n+2 base64 characters processed: require '==' - if (left || p[0] != '=' || p[1] != '=' || decode64_table[(unsigned char)p[2]] != -1) - *pfInvalid = true; - break; - - case 3: // 4n+3 base64 characters processed: require '=' - if (left || p[0] != '=' || decode64_table[(unsigned char)p[1]] != -1) - *pfInvalid = true; - break; - } - - return vchRet; -} - -string DecodeBase64(const string& str) -{ - vector vchRet = DecodeBase64(str.c_str()); - return string((const char*)&vchRet[0], vchRet.size()); -} - -string EncodeBase32(const unsigned char* pch, size_t len) -{ - static const char *pbase32 = "abcdefghijklmnopqrstuvwxyz234567"; - - string strRet=""; - strRet.reserve((len+4)/5*8); - - int mode=0, left=0; - const unsigned char *pchEnd = pch+len; - - while (pch> 3]; - left = (enc & 7) << 2; - mode = 1; - break; - - case 1: // we have three bits - strRet += pbase32[left | (enc >> 6)]; - strRet += pbase32[(enc >> 1) & 31]; - left = (enc & 1) << 4; - mode = 2; - break; - - case 2: // we have one bit - strRet += pbase32[left | (enc >> 4)]; - left = (enc & 15) << 1; - mode = 3; - break; - - case 3: // we have four bits - strRet += pbase32[left | (enc >> 7)]; - strRet += pbase32[(enc >> 2) & 31]; - left = (enc & 3) << 3; - mode = 4; - break; - - case 4: // we have two bits - strRet += pbase32[left | (enc >> 5)]; - strRet += pbase32[enc & 31]; - mode = 0; - } - } - - static const int nPadding[5] = {0, 6, 4, 3, 1}; - if (mode) - { - strRet += pbase32[left]; - for (int n=0; n DecodeBase32(const char* p, bool* pfInvalid) -{ - static const int decode32_table[256] = - { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 0, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - }; - - if (pfInvalid) - *pfInvalid = false; - - vector vchRet; - vchRet.reserve((strlen(p))*5/8); - - int mode = 0; - int left = 0; - - while (1) - { - int dec = decode32_table[(unsigned char)*p]; - if (dec == -1) break; - p++; - switch (mode) - { - case 0: // we have no bits and get 5 - left = dec; - mode = 1; - break; - - case 1: // we have 5 bits and keep 2 - vchRet.push_back((left<<3) | (dec>>2)); - left = dec & 3; - mode = 2; - break; - - case 2: // we have 2 bits and keep 7 - left = left << 5 | dec; - mode = 3; - break; - - case 3: // we have 7 bits and keep 4 - vchRet.push_back((left<<1) | (dec>>4)); - left = dec & 15; - mode = 4; - break; - - case 4: // we have 4 bits, and keep 1 - vchRet.push_back((left<<4) | (dec>>1)); - left = dec & 1; - mode = 5; - break; - - case 5: // we have 1 bit, and keep 6 - left = left << 5 | dec; - mode = 6; - break; - - case 6: // we have 6 bits, and keep 3 - vchRet.push_back((left<<2) | (dec>>3)); - left = dec & 7; - mode = 7; - break; - - case 7: // we have 3 bits, and keep 0 - vchRet.push_back((left<<5) | dec); - mode = 0; - break; - } - } - - if (pfInvalid) - switch (mode) - { - case 0: // 8n base32 characters processed: ok - break; - - case 1: // 8n+1 base32 characters processed: impossible - case 3: // +3 - case 6: // +6 - *pfInvalid = true; - break; - - case 2: // 8n+2 base32 characters processed: require '======' - if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || p[3] != '=' || p[4] != '=' || p[5] != '=' || decode32_table[(unsigned char)p[6]] != -1) - *pfInvalid = true; - break; - - case 4: // 8n+4 base32 characters processed: require '====' - if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || p[3] != '=' || decode32_table[(unsigned char)p[4]] != -1) - *pfInvalid = true; - break; - - case 5: // 8n+5 base32 characters processed: require '===' - if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || decode32_table[(unsigned char)p[3]] != -1) - *pfInvalid = true; - break; - - case 7: // 8n+7 base32 characters processed: require '=' - if (left || p[0] != '=' || decode32_table[(unsigned char)p[1]] != -1) - *pfInvalid = true; - break; - } - - return vchRet; -} - -string DecodeBase32(const string& str) -{ - vector vchRet = DecodeBase32(str.c_str()); - return string((const char*)&vchRet[0], vchRet.size()); -} - - -bool WildcardMatch(const char* psz, const char* mask) -{ - loop - { - switch (*mask) - { - case '\0': - return (*psz == '\0'); - case '*': - return WildcardMatch(psz, mask+1) || (*psz && WildcardMatch(psz+1, mask)); - case '?': - if (*psz == '\0') - return false; - break; - default: - if (*psz != *mask) - return false; - break; - } - psz++; - mask++; - } -} - -bool WildcardMatch(const string& str, const string& mask) -{ - return WildcardMatch(str.c_str(), mask.c_str()); -} - - - - -static std::string FormatException(std::exception* pex, const char* pszThread) -{ -#ifdef WIN32 - char pszModule[MAX_PATH] = ""; - GetModuleFileNameA(NULL, pszModule, sizeof(pszModule)); -#else - const char* pszModule = "triangles"; -#endif - if (pex) - return strprintf( - "EXCEPTION: %s \n%s \n%s in %s \n", typeid(*pex).name(), pex->what(), pszModule, pszThread); - else - return strprintf( - "UNKNOWN EXCEPTION \n%s in %s \n", pszModule, pszThread); -} - -void LogException(std::exception* pex, const char* pszThread) -{ - std::string message = FormatException(pex, pszThread); - printf("\n%s", message.c_str()); -} - -void PrintException(std::exception* pex, const char* pszThread) -{ - std::string message = FormatException(pex, pszThread); - printf("\n\n************************\n%s\n", message.c_str()); - fprintf(stderr, "\n\n************************\n%s\n", message.c_str()); - strMiscWarning = message; - throw; -} - -void LogStackTrace() { - printf("\n\n******* exception encountered *******\n"); - if (fileout) - { -#ifndef WIN32 - void* pszBuffer[32]; - size_t size; - size = backtrace(pszBuffer, 32); - backtrace_symbols_fd(pszBuffer, size, fileno(fileout)); -#endif - } -} - -void PrintExceptionContinue(std::exception* pex, const char* pszThread) -{ - std::string message = FormatException(pex, pszThread); - printf("\n\n************************\n%s\n", message.c_str()); - fprintf(stderr, "\n\n************************\n%s\n", message.c_str()); - strMiscWarning = message; -} - -boost::filesystem::path GetDefaultDataDir() -{ - namespace fs = boost::filesystem; - // Windows < Vista: C:\Documents and Settings\Username\Application Data\triangles - // Windows >= Vista: C:\Users\Username\AppData\Roaming\triangles - // Mac: ~/Library/Application Support/triangles - // Unix: ~/.triangles -#ifdef WIN32 - // Windows - return GetSpecialFolderPath(CSIDL_APPDATA) / "triangles"; -#else - fs::path pathRet; - char* pszHome = getenv("HOME"); - if (pszHome == NULL || strlen(pszHome) == 0) - pathRet = fs::path("/"); - else - pathRet = fs::path(pszHome); -#ifdef MAC_OSX - // Mac - pathRet /= "Library/Application Support"; - fs::create_directory(pathRet); - return pathRet / "triangles"; -#else - // Unix - return pathRet / ".triangles"; -#endif -#endif -} - -const boost::filesystem::path &GetDataDir(bool fNetSpecific) -{ - namespace fs = boost::filesystem; - - static fs::path pathCached[2]; - static CCriticalSection csPathCached; - static bool cachedPath[2] = {false, false}; - - fs::path &path = pathCached[fNetSpecific]; - - // This can be called during exceptions by printf, so we cache the - // value so we don't have to do memory allocations after that. - if (cachedPath[fNetSpecific]) - return path; - - LOCK(csPathCached); - - if (mapArgs.count("-datadir")) { - path = fs::system_complete(mapArgs["-datadir"]); - if (!fs::is_directory(path)) { - path = ""; - return path; - } - } else { - path = GetDefaultDataDir(); - } - if (fNetSpecific && GetBoolArg("-testnet", false)) - path /= "testnet2"; - - fs::create_directory(path); - - cachedPath[fNetSpecific]=true; - return path; -} - -boost::filesystem::path GetConfigFile() -{ - boost::filesystem::path pathConfigFile(GetArg("-conf", "triangles.conf")); - if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile; - return pathConfigFile; -} - -void ReadConfigFile(map& mapSettingsRet, - map >& mapMultiSettingsRet) -{ - boost::filesystem::ifstream streamConfig(GetConfigFile()); - if (!streamConfig.good()) - return; // No bitcoin.conf file is OK - - set setOptions; - setOptions.insert("*"); - - for (boost::program_options::detail::config_file_iterator it(streamConfig, setOptions), end; it != end; ++it) - { - // Don't overwrite existing settings so command line settings override bitcoin.conf - string strKey = string("-") + it->string_key; - if (mapSettingsRet.count(strKey) == 0) - { - mapSettingsRet[strKey] = it->value[0]; - // interpret nofoo=1 as foo=0 (and nofoo=0 as foo=1) as long as foo not set) - InterpretNegativeSetting(strKey, mapSettingsRet); - } - mapMultiSettingsRet[strKey].push_back(it->value[0]); - } -} - -boost::filesystem::path GetPidFile() -{ - boost::filesystem::path pathPidFile(GetArg("-pid", "trianglesd.pid")); - if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile; - return pathPidFile; -} - -void CreatePidFile(const boost::filesystem::path &path, pid_t pid) -{ - FILE* file = fopen(path.string().c_str(), "w"); - if (file) - { - fprintf(file, "%d\n", pid); - fclose(file); - } -} - -bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest) -{ -#ifdef WIN32 - return MoveFileExA(src.string().c_str(), dest.string().c_str(), - MOVEFILE_REPLACE_EXISTING); -#else - int rc = std::rename(src.string().c_str(), dest.string().c_str()); - return (rc == 0); -#endif /* WIN32 */ -} - -void FileCommit(FILE *fileout) -{ - fflush(fileout); // harmless if redundantly called -#ifdef WIN32 - _commit(_fileno(fileout)); -#else - fsync(fileno(fileout)); -#endif -} - -int GetFilesize(FILE* file) -{ - int nSavePos = ftell(file); - int nFilesize = -1; - if (fseek(file, 0, SEEK_END) == 0) - nFilesize = ftell(file); - fseek(file, nSavePos, SEEK_SET); - return nFilesize; -} - -void ShrinkDebugFile() -{ - // Scroll debug.log if it's getting too big - boost::filesystem::path pathLog = GetDataDir() / "debug.log"; - FILE* file = fopen(pathLog.string().c_str(), "r"); - if (file && GetFilesize(file) > 10 * 1000000) - { - // Restart the file with some of the end - char pch[200000]; - fseek(file, -sizeof(pch), SEEK_END); - int nBytes = fread(pch, 1, sizeof(pch), file); - fclose(file); - - file = fopen(pathLog.string().c_str(), "w"); - if (file) - { - fwrite(pch, 1, nBytes, file); - fclose(file); - } - } -} - - -// -// "Never go to sea with two chronometers; take one or three." -// Our three time sources are: -// - System clock -// - Median of other nodes clocks -// - The user (asking the user to fix the system clock if the first two disagree) -// -static int64 nMockTime = 0; // For unit testing - -int64 GetTime() -{ - if (nMockTime) return nMockTime; - - return time(NULL); -} - -void SetMockTime(int64 nMockTimeIn) -{ - nMockTime = nMockTimeIn; -} - -static int64 nTimeOffset = 0; - -int64 GetAdjustedTime() -{ - return GetTime() + nTimeOffset; -} - -void AddTimeData(const CNetAddr& ip, int64 nTime) -{ - int64 nOffsetSample = nTime - GetTime(); - - // Ignore duplicates - static set setKnown; - if (!setKnown.insert(ip).second) - return; - - // Add data - vTimeOffsets.input(nOffsetSample); - printf("Added time data, samples %d, offset %+"PRI64d" (%+"PRI64d" minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60); - if (vTimeOffsets.size() >= 5 && vTimeOffsets.size() % 2 == 1) - { - int64 nMedian = vTimeOffsets.median(); - std::vector vSorted = vTimeOffsets.sorted(); - // Only let other nodes change our time by so much - if (abs64(nMedian) < 70 * 60) - { - nTimeOffset = nMedian; - } - else - { - nTimeOffset = 0; - - static bool fDone; - if (!fDone) - { - // If nobody has a time different than ours but within 5 minutes of ours, give a warning - bool fMatch = false; - BOOST_FOREACH(int64 nOffset, vSorted) - if (nOffset != 0 && abs64(nOffset) < 5 * 60) - fMatch = true; - - if (!fMatch) - { - fDone = true; - string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong triangles will not work properly."); - strMiscWarning = strMessage; - printf("*** %s\n", strMessage.c_str()); - uiInterface.ThreadSafeMessageBox(strMessage+" ", string("triangles"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION); - } - } - } - if (fDebug) { - BOOST_FOREACH(int64 n, vSorted) - printf("%+"PRI64d" ", n); - printf("| "); - } - printf("nTimeOffset = %+"PRI64d" (%+"PRI64d" minutes)\n", nTimeOffset, nTimeOffset/60); - } -} - - -string FormatVersion(int nVersion) -{ - if (nVersion%100 == 0) - return strprintf("%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100); - else - return strprintf("%d.%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100, nVersion%100); -} - -string FormatFullVersion() -{ - return CLIENT_BUILD; -} - -// Format the subversion field according to BIP 14 spec (https://en.bitcoin.it/wiki/BIP_0014) -std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments) -{ - std::ostringstream ss; - ss << "/"; - ss << name << ":" << FormatVersion(nClientVersion); - if (!comments.empty()) - ss << "(" << boost::algorithm::join(comments, "; ") << ")"; - ss << "/"; - return ss.str(); -} - -#ifdef WIN32 -boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate) -{ - namespace fs = boost::filesystem; - - char pszPath[MAX_PATH] = ""; - - if(SHGetSpecialFolderPathA(NULL, pszPath, nFolder, fCreate)) - { - return fs::path(pszPath); - } - - printf("SHGetSpecialFolderPathA() failed, could not obtain requested path.\n"); - return fs::path(""); -} -#endif - -void runCommand(std::string strCommand) -{ - int nErr = ::system(strCommand.c_str()); - if (nErr) - 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); - -// This is XCode 10.6-and-later; bring back if we drop 10.5 support: -// #elif defined(MAC_OSX) -// pthread_setname_np(name); - -#else - // Prevent warnings for unused parameters... - (void)name; -#endif -} - -bool NewThread(void(*pfn)(void*), void* parg) -{ - try - { - boost::thread(pfn, parg); // thread detaches when out of scope - } catch(boost::thread_resource_error &e) { - printf("Error creating thread: %s\n", e.what()); - return false; - } - return true; -} +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2009-2012 The Bitcoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "util.h" +#include "sync.h" +#include "strlcpy.h" +#include "version.h" +#include "ui_interface.h" +#include + +// Work around clang compilation problem in Boost 1.46: +// /usr/include/boost/program_options/detail/config_file.hpp:163:17: error: call to function 'to_internal' that is neither visible in the template definition nor found by argument-dependent lookup +// See also: http://stackoverflow.com/questions/10020179/compilation-fail-in-boost-librairies-program-options +// http://clang.debian.net/status.php?version=3.0&key=CANNOT_FIND_FUNCTION +namespace boost { + namespace program_options { + std::string to_internal(const std::string&); + } +} + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef WIN32 +#ifdef _MSC_VER +#pragma warning(disable:4786) +#pragma warning(disable:4804) +#pragma warning(disable:4805) +#pragma warning(disable:4717) +#endif +#ifdef _WIN32_WINNT +#undef _WIN32_WINNT +#endif +#define _WIN32_WINNT 0x0501 +#ifdef _WIN32_IE +#undef _WIN32_IE +#endif +#define _WIN32_IE 0x0501 +#define WIN32_LEAN_AND_MEAN 1 +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include /* for _commit */ +#include "shlobj.h" +#elif defined(__linux__) +# include +#endif + +#ifndef WIN32 +#include +#endif + + +using namespace std; + +map mapArgs; +map > mapMultiArgs; +bool fDebug = false; +bool fDebugNet = false; +bool fDebugSmsg = false; +bool fNoSmsg = false; +bool fPrintToConsole = false; +bool fPrintToDebugger = false; +bool fRequestShutdown = false; +bool fShutdown = false; +bool fDaemon = false; +bool fServer = false; +bool fCommandLine = false; +string strMiscWarning; +bool fTestNet = false; +bool fNoListen = false; +bool fLogTimestamps = false; +CMedianFilter vTimeOffsets(200,0); +bool fReopenDebugLog = false; + +// Init OpenSSL library multithreading support +static CCriticalSection** ppmutexOpenSSL; +void locking_callback(int mode, int i, const char* file, int line) +{ + if (mode & CRYPTO_LOCK) { + ENTER_CRITICAL_SECTION(*ppmutexOpenSSL[i]); + } else { + LEAVE_CRITICAL_SECTION(*ppmutexOpenSSL[i]); + } +} + +LockedPageManager LockedPageManager::instance; + +// Init +class CInit +{ +public: + CInit() + { + // 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(); + CRYPTO_set_locking_callback(locking_callback); + +#ifdef WIN32 + // Seed random number generator with screen scrape and other hardware sources + RAND_screen(); +#endif + + // Seed random number generator with performance counter + RandAddSeed(); + } + ~CInit() + { + // Shutdown OpenSSL library multithreading support + CRYPTO_set_locking_callback(NULL); + for (int i = 0; i < CRYPTO_num_locks(); i++) + delete ppmutexOpenSSL[i]; + OPENSSL_free(ppmutexOpenSSL); + } +} +instance_of_cinit; + + + + + + + + +void RandAddSeed() +{ + // Seed with CPU performance counter + int64_t nCounter = GetPerformanceCounter(); + RAND_add(&nCounter, sizeof(nCounter), 1.5); + memset(&nCounter, 0, sizeof(nCounter)); +} + +void RandAddSeedPerfmon() +{ + RandAddSeed(); + + // This can take up to 2 seconds, so only do it every 10 minutes + static int64_t nLastPerfmon; + if (GetTime() < nLastPerfmon + 10 * 60) + return; + nLastPerfmon = GetTime(); + +#ifdef WIN32 + // Don't need this on Linux, OpenSSL automatically uses /dev/urandom + // Seed with the entire set of perfmon data + unsigned char pdata[250000]; + memset(pdata, 0, sizeof(pdata)); + unsigned long nSize = sizeof(pdata); + long ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, pdata, &nSize); + RegCloseKey(HKEY_PERFORMANCE_DATA); + if (ret == ERROR_SUCCESS) + { + RAND_add(pdata, nSize, nSize/100.0); + memset(pdata, 0, nSize); + printf("RandAddSeed() %lu bytes\n", nSize); + } +#endif +} + +uint64_t GetRand(uint64_t nMax) +{ + if (nMax == 0) + return 0; + + // The range of the random source must be a multiple of the modulus + // to give every possible output value an equal possibility + uint64_t nRange = (std::numeric_limits::max() / nMax) * nMax; + uint64_t nRand = 0; + do + RAND_bytes((unsigned char*)&nRand, sizeof(nRand)); + while (nRand >= nRange); + return (nRand % nMax); +} + +int GetRandInt(int nMax) +{ + return GetRand(nMax); +} + +uint256 GetRandHash() +{ + uint256 hash; + RAND_bytes((unsigned char*)&hash, sizeof(hash)); + return hash; +} + + + + + + +static FILE* fileout = NULL; + +inline int OutputDebugStringF(const char* pszFormat, ...) +{ + int ret = 0; + if (fPrintToConsole) + { + // print to console + va_list arg_ptr; + va_start(arg_ptr, pszFormat); + ret = vprintf(pszFormat, arg_ptr); + va_end(arg_ptr); + } + else if (!fPrintToDebugger) + { + // print to debug.log + + if (!fileout) + { + boost::filesystem::path pathDebug = GetDataDir() / "debug.log"; + fileout = fopen(pathDebug.string().c_str(), "a"); + if (fileout) setbuf(fileout, NULL); // unbuffered + } + if (fileout) + { + static bool fStartedNewLine = true; + + // This routine may be called by global destructors during shutdown. + // Since the order of destruction of static/global objects is undefined, + // allocate mutexDebugLog on the heap the first time this routine + // is called to avoid crashes during shutdown. + static boost::mutex* mutexDebugLog = NULL; + if (mutexDebugLog == NULL) mutexDebugLog = new boost::mutex(); + boost::mutex::scoped_lock scoped_lock(*mutexDebugLog); + + // reopen the log file, if requested + if (fReopenDebugLog) { + fReopenDebugLog = false; + boost::filesystem::path pathDebug = GetDataDir() / "debug.log"; + if (freopen(pathDebug.string().c_str(),"a",fileout) != NULL) + setbuf(fileout, NULL); // unbuffered + } + + // Debug print useful for profiling + if (fLogTimestamps && fStartedNewLine) + fprintf(fileout, "%s ", DateTimeStrFormat("%x %H:%M:%S", GetTime()).c_str()); + if (pszFormat[strlen(pszFormat) - 1] == '\n') + fStartedNewLine = true; + else + fStartedNewLine = false; + + va_list arg_ptr; + va_start(arg_ptr, pszFormat); + ret = vfprintf(fileout, pszFormat, arg_ptr); + va_end(arg_ptr); + } + } + +#ifdef WIN32 + if (fPrintToDebugger) + { + static CCriticalSection cs_OutputDebugStringF; + + // accumulate and output a line at a time + { + LOCK(cs_OutputDebugStringF); + static std::string buffer; + + va_list arg_ptr; + va_start(arg_ptr, pszFormat); + buffer += vstrprintf(pszFormat, arg_ptr); + va_end(arg_ptr); + + int line_start = 0, line_end; + while((line_end = buffer.find('\n', line_start)) != -1) + { + OutputDebugStringA(buffer.substr(line_start, line_end - line_start).c_str()); + line_start = line_end + 1; + } + buffer.erase(0, line_start); + } + } +#endif + return ret; +} + +string vstrprintf(const char *format, va_list ap) +{ + char buffer[50000]; + char* p = buffer; + int limit = sizeof(buffer); + int ret; + while (true) + { + va_list arg_ptr; + va_copy(arg_ptr, ap); +#ifdef WIN32 + ret = _vsnprintf(p, limit, format, arg_ptr); +#else + ret = vsnprintf(p, limit, format, arg_ptr); +#endif + va_end(arg_ptr); + if (ret >= 0 && ret < limit) + break; + if (p != buffer) + delete[] p; + limit *= 2; + p = new char[limit]; + if (p == NULL) + throw std::bad_alloc(); + } + string str(p, p+ret); + if (p != buffer) + delete[] p; + return str; +} + +string real_strprintf(const char *format, int dummy, ...) +{ + va_list arg_ptr; + va_start(arg_ptr, dummy); + string str = vstrprintf(format, arg_ptr); + va_end(arg_ptr); + return str; +} + +string real_strprintf(const std::string &format, int dummy, ...) +{ + va_list arg_ptr; + va_start(arg_ptr, dummy); + string str = vstrprintf(format.c_str(), arg_ptr); + va_end(arg_ptr); + return str; +} + +bool error(const char *format, ...) +{ + va_list arg_ptr; + va_start(arg_ptr, format); + std::string str = vstrprintf(format, arg_ptr); + va_end(arg_ptr); + printf("ERROR: %s\n", str.c_str()); + return false; +} + + +void ParseString(const string& str, char c, vector& v) +{ + if (str.empty()) + return; + string::size_type i1 = 0; + string::size_type i2; + while (true) + { + i2 = str.find(c, i1); + if (i2 == str.npos) + { + v.push_back(str.substr(i1)); + return; + } + v.push_back(str.substr(i1, i2-i1)); + i1 = i2+1; + } +} + + +string FormatMoney(int64_t n, bool fPlus) +{ + // Note: not using straight sprintf here because we do NOT want + // localized number formatting. + int64_t n_abs = (n > 0 ? n : -n); + int64_t quotient = n_abs/COIN; + int64_t remainder = n_abs%COIN; + string str = strprintf("%"PRId64".%08"PRId64, quotient, remainder); + + // 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; + if (nTrim) + str.erase(str.size()-nTrim, nTrim); + + if (n < 0) + str.insert((unsigned int)0, 1, '-'); + else if (fPlus && n > 0) + str.insert((unsigned int)0, 1, '+'); + return str; +} + + +bool ParseMoney(const string& str, int64_t& nRet) +{ + return ParseMoney(str.c_str(), nRet); +} + +bool ParseMoney(const char* pszIn, int64_t& nRet) +{ + string strWhole; + int64_t nUnits = 0; + const char* p = pszIn; + while (isspace(*p)) + p++; + for (; *p; p++) + { + if (*p == '.') + { + p++; + int64_t nMult = CENT*10; + while (isdigit(*p) && (nMult > 0)) + { + nUnits += nMult * (*p++ - '0'); + nMult /= 10; + } + break; + } + if (isspace(*p)) + break; + if (!isdigit(*p)) + return false; + strWhole.insert(strWhole.end(), *p); + } + for (; *p; p++) + if (!isspace(*p)) + return false; + if (strWhole.size() > 10) // guard against 63 bit overflow + return false; + if (nUnits < 0 || nUnits > COIN) + return false; + int64_t nWhole = atoi64(strWhole); + int64_t nValue = nWhole*COIN + nUnits; + + nRet = nValue; + return true; +} + + +static const signed char phexdigit[256] = +{ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + 0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1, + -1,0xa,0xb,0xc,0xd,0xe,0xf,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,0xa,0xb,0xc,0xd,0xe,0xf,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, }; + +bool IsHex(const string& str) +{ + BOOST_FOREACH(unsigned char c, str) + { + if (phexdigit[c] < 0) + return false; + } + return (str.size() > 0) && (str.size()%2 == 0); +} + +vector ParseHex(const char* psz) +{ + // convert hex dump to vector + vector vch; + while (true) + { + while (isspace(*psz)) + psz++; + signed char c = phexdigit[(unsigned char)*psz++]; + if (c == (signed char)-1) + break; + unsigned char n = (c << 4); + c = phexdigit[(unsigned char)*psz++]; + if (c == (signed char)-1) + break; + n |= c; + vch.push_back(n); + } + return vch; +} + +vector ParseHex(const string& str) +{ + return ParseHex(str.c_str()); +} + +static void InterpretNegativeSetting(string name, map& mapSettingsRet) +{ + // interpret -nofoo as -foo=0 (and -nofoo=0 as -foo=1) as long as -foo not set + if (name.find("-no") == 0) + { + std::string positive("-"); + positive.append(name.begin()+3, name.end()); + if (mapSettingsRet.count(positive) == 0) + { + bool value = !GetBoolArg(name); + mapSettingsRet[positive] = (value ? "1" : "0"); + } + } +} + +void ParseParameters(int argc, const char* const argv[]) +{ + mapArgs.clear(); + mapMultiArgs.clear(); + for (int i = 1; i < argc; i++) + { + char psz[10000]; + strlcpy(psz, argv[i], sizeof(psz)); + char* pszValue = (char*)""; + if (strchr(psz, '=')) + { + pszValue = strchr(psz, '='); + *pszValue++ = '\0'; + } + #ifdef WIN32 + _strlwr(psz); + if (psz[0] == '/') + psz[0] = '-'; + #endif + if (psz[0] != '-') + break; + + mapArgs[psz] = pszValue; + mapMultiArgs[psz].push_back(pszValue); + } + + // New 0.6 features: + BOOST_FOREACH(const PAIRTYPE(string,string)& entry, mapArgs) + { + string name = entry.first; + + // interpret --foo as -foo (as long as both are not set) + if (name.find("--") == 0) + { + std::string singleDash(name.begin()+1, name.end()); + if (mapArgs.count(singleDash) == 0) + mapArgs[singleDash] = entry.second; + name = singleDash; + } + + // interpret -nofoo as -foo=0 (and -nofoo=0 as -foo=1) as long as -foo not set + InterpretNegativeSetting(name, mapArgs); + } +} + +std::string GetArg(const std::string& strArg, const std::string& strDefault) +{ + if (mapArgs.count(strArg)) + return mapArgs[strArg]; + return strDefault; +} + +int64_t GetArg(const std::string& strArg, int64_t nDefault) +{ + if (mapArgs.count(strArg)) + return atoi64(mapArgs[strArg]); + return nDefault; +} + +bool GetBoolArg(const std::string& strArg, bool fDefault) +{ + if (mapArgs.count(strArg)) + { + if (mapArgs[strArg].empty()) + return true; + return (atoi(mapArgs[strArg]) != 0); + } + return fDefault; +} + +bool SoftSetArg(const std::string& strArg, const std::string& strValue) +{ + if (mapArgs.count(strArg)) + return false; + mapArgs[strArg] = strValue; + return true; +} + +bool SoftSetBoolArg(const std::string& strArg, bool fValue) +{ + if (fValue) + return SoftSetArg(strArg, std::string("1")); + else + return SoftSetArg(strArg, std::string("0")); +} + + +string EncodeBase64(const unsigned char* pch, size_t len) +{ + static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + string strRet=""; + strRet.reserve((len+2)/3*4); + + int mode=0, left=0; + const unsigned char *pchEnd = pch+len; + + while (pch> 2]; + left = (enc & 3) << 4; + mode = 1; + break; + + case 1: // we have two bits + strRet += pbase64[left | (enc >> 4)]; + left = (enc & 15) << 2; + mode = 2; + break; + + case 2: // we have four bits + strRet += pbase64[left | (enc >> 6)]; + strRet += pbase64[enc & 63]; + mode = 0; + break; + } + } + + if (mode) + { + strRet += pbase64[left]; + strRet += '='; + if (mode == 1) + strRet += '='; + } + + return strRet; +} + +string EncodeBase64(const string& str) +{ + return EncodeBase64((const unsigned char*)str.c_str(), str.size()); +} + +vector DecodeBase64(const char* p, bool* pfInvalid) +{ + static const int decode64_table[256] = + { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, + -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + }; + + if (pfInvalid) + *pfInvalid = false; + + vector vchRet; + vchRet.reserve(strlen(p)*3/4); + + int mode = 0; + int left = 0; + + while (1) + { + int dec = decode64_table[(unsigned char)*p]; + if (dec == -1) break; + p++; + switch (mode) + { + case 0: // we have no bits and get 6 + left = dec; + mode = 1; + break; + + case 1: // we have 6 bits and keep 4 + vchRet.push_back((left<<2) | (dec>>4)); + left = dec & 15; + mode = 2; + break; + + case 2: // we have 4 bits and get 6, we keep 2 + vchRet.push_back((left<<4) | (dec>>2)); + left = dec & 3; + mode = 3; + break; + + case 3: // we have 2 bits and get 6 + vchRet.push_back((left<<6) | dec); + mode = 0; + break; + } + } + + if (pfInvalid) + switch (mode) + { + case 0: // 4n base64 characters processed: ok + break; + + case 1: // 4n+1 base64 character processed: impossible + *pfInvalid = true; + break; + + case 2: // 4n+2 base64 characters processed: require '==' + if (left || p[0] != '=' || p[1] != '=' || decode64_table[(unsigned char)p[2]] != -1) + *pfInvalid = true; + break; + + case 3: // 4n+3 base64 characters processed: require '=' + if (left || p[0] != '=' || decode64_table[(unsigned char)p[1]] != -1) + *pfInvalid = true; + break; + } + + return vchRet; +} + +string DecodeBase64(const string& str) +{ + vector vchRet = DecodeBase64(str.c_str()); + return string((const char*)&vchRet[0], vchRet.size()); +} + +string EncodeBase32(const unsigned char* pch, size_t len) +{ + static const char *pbase32 = "abcdefghijklmnopqrstuvwxyz234567"; + + string strRet=""; + strRet.reserve((len+4)/5*8); + + int mode=0, left=0; + const unsigned char *pchEnd = pch+len; + + while (pch> 3]; + left = (enc & 7) << 2; + mode = 1; + break; + + case 1: // we have three bits + strRet += pbase32[left | (enc >> 6)]; + strRet += pbase32[(enc >> 1) & 31]; + left = (enc & 1) << 4; + mode = 2; + break; + + case 2: // we have one bit + strRet += pbase32[left | (enc >> 4)]; + left = (enc & 15) << 1; + mode = 3; + break; + + case 3: // we have four bits + strRet += pbase32[left | (enc >> 7)]; + strRet += pbase32[(enc >> 2) & 31]; + left = (enc & 3) << 3; + mode = 4; + break; + + case 4: // we have two bits + strRet += pbase32[left | (enc >> 5)]; + strRet += pbase32[enc & 31]; + mode = 0; + } + } + + static const int nPadding[5] = {0, 6, 4, 3, 1}; + if (mode) + { + strRet += pbase32[left]; + for (int n=0; n DecodeBase32(const char* p, bool* pfInvalid) +{ + static const int decode32_table[256] = + { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 0, 1, 2, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + }; + + if (pfInvalid) + *pfInvalid = false; + + vector vchRet; + vchRet.reserve((strlen(p))*5/8); + + int mode = 0; + int left = 0; + + while (1) + { + int dec = decode32_table[(unsigned char)*p]; + if (dec == -1) break; + p++; + switch (mode) + { + case 0: // we have no bits and get 5 + left = dec; + mode = 1; + break; + + case 1: // we have 5 bits and keep 2 + vchRet.push_back((left<<3) | (dec>>2)); + left = dec & 3; + mode = 2; + break; + + case 2: // we have 2 bits and keep 7 + left = left << 5 | dec; + mode = 3; + break; + + case 3: // we have 7 bits and keep 4 + vchRet.push_back((left<<1) | (dec>>4)); + left = dec & 15; + mode = 4; + break; + + case 4: // we have 4 bits, and keep 1 + vchRet.push_back((left<<4) | (dec>>1)); + left = dec & 1; + mode = 5; + break; + + case 5: // we have 1 bit, and keep 6 + left = left << 5 | dec; + mode = 6; + break; + + case 6: // we have 6 bits, and keep 3 + vchRet.push_back((left<<2) | (dec>>3)); + left = dec & 7; + mode = 7; + break; + + case 7: // we have 3 bits, and keep 0 + vchRet.push_back((left<<5) | dec); + mode = 0; + break; + } + } + + if (pfInvalid) + switch (mode) + { + case 0: // 8n base32 characters processed: ok + break; + + case 1: // 8n+1 base32 characters processed: impossible + case 3: // +3 + case 6: // +6 + *pfInvalid = true; + break; + + case 2: // 8n+2 base32 characters processed: require '======' + if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || p[3] != '=' || p[4] != '=' || p[5] != '=' || decode32_table[(unsigned char)p[6]] != -1) + *pfInvalid = true; + break; + + case 4: // 8n+4 base32 characters processed: require '====' + if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || p[3] != '=' || decode32_table[(unsigned char)p[4]] != -1) + *pfInvalid = true; + break; + + case 5: // 8n+5 base32 characters processed: require '===' + if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || decode32_table[(unsigned char)p[3]] != -1) + *pfInvalid = true; + break; + + case 7: // 8n+7 base32 characters processed: require '=' + if (left || p[0] != '=' || decode32_table[(unsigned char)p[1]] != -1) + *pfInvalid = true; + break; + } + + return vchRet; +} + +string DecodeBase32(const string& str) +{ + vector vchRet = DecodeBase32(str.c_str()); + return string((const char*)&vchRet[0], vchRet.size()); +} + + +bool WildcardMatch(const char* psz, const char* mask) +{ + while (true) + { + switch (*mask) + { + case '\0': + return (*psz == '\0'); + case '*': + return WildcardMatch(psz, mask+1) || (*psz && WildcardMatch(psz+1, mask)); + case '?': + if (*psz == '\0') + return false; + break; + default: + if (*psz != *mask) + return false; + break; + } + psz++; + mask++; + } +} + +bool WildcardMatch(const string& str, const string& mask) +{ + return WildcardMatch(str.c_str(), mask.c_str()); +} + + + + + + + + +static std::string FormatException(std::exception* pex, const char* pszThread) +{ +#ifdef WIN32 + char pszModule[MAX_PATH] = ""; + GetModuleFileNameA(NULL, pszModule, sizeof(pszModule)); +#else + const char* pszModule = "Triangles"; +#endif + if (pex) + return strprintf( + "EXCEPTION: %s \n%s \n%s in %s \n", typeid(*pex).name(), pex->what(), pszModule, pszThread); + else + return strprintf( + "UNKNOWN EXCEPTION \n%s in %s \n", pszModule, pszThread); +} + +void LogException(std::exception* pex, const char* pszThread) +{ + std::string message = FormatException(pex, pszThread); + printf("\n%s", message.c_str()); +} + +void PrintException(std::exception* pex, const char* pszThread) +{ + std::string message = FormatException(pex, pszThread); + printf("\n\n************************\n%s\n", message.c_str()); + fprintf(stderr, "\n\n************************\n%s\n", message.c_str()); + strMiscWarning = message; + throw; +} + +void LogStackTrace() { + printf("\n\n******* exception encountered *******\n"); + if (fileout) + { +#ifndef WIN32 + void* pszBuffer[32]; + size_t size; + size = backtrace(pszBuffer, 32); + backtrace_symbols_fd(pszBuffer, size, fileno(fileout)); +#endif + } +} + +void PrintExceptionContinue(std::exception* pex, const char* pszThread) +{ + std::string message = FormatException(pex, pszThread); + printf("\n\n************************\n%s\n", message.c_str()); + fprintf(stderr, "\n\n************************\n%s\n", message.c_str()); + strMiscWarning = message; +} + +boost::filesystem::path GetDefaultDataDir() +{ + namespace fs = boost::filesystem; + // Windows < Vista: C:\Documents and Settings\Username\Application Data\triangles + // Windows >= Vista: C:\Users\Username\AppData\Roaming\triangles + // Mac: ~/Library/Application Support/triangles + // Unix: ~/.triangles +#ifdef WIN32 + // Windows + return GetSpecialFolderPath(CSIDL_APPDATA) / "triangles"; +#else + fs::path pathRet; + char* pszHome = getenv("HOME"); + if (pszHome == NULL || strlen(pszHome) == 0) + pathRet = fs::path("/"); + else + pathRet = fs::path(pszHome); +#ifdef MAC_OSX + // Mac + pathRet /= "Library/Application Support"; + fs::create_directory(pathRet); + return pathRet / "triangles"; +#else + // Unix + return pathRet / ".triangles"; +#endif +#endif +} + +const boost::filesystem::path &GetDataDir(bool fNetSpecific) +{ + namespace fs = boost::filesystem; + + static fs::path pathCached[2]; + static CCriticalSection csPathCached; + static bool cachedPath[2] = {false, false}; + + fs::path &path = pathCached[fNetSpecific]; + + // This can be called during exceptions by printf, so we cache the + // value so we don't have to do memory allocations after that. + if (cachedPath[fNetSpecific]) + return path; + + LOCK(csPathCached); + + if (mapArgs.count("-datadir")) { + path = fs::system_complete(mapArgs["-datadir"]); + if (!fs::is_directory(path)) { + path = ""; + return path; + } + } else { + path = GetDefaultDataDir(); + } + if (fNetSpecific && fTestNet) + path /= "testnet"; + + fs::create_directory(path); + + cachedPath[fNetSpecific]=true; + return path; +} + +boost::filesystem::path GetConfigFile() +{ + boost::filesystem::path pathConfigFile(GetArg("-conf", "triangles.conf")); + if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile; + return pathConfigFile; +} + +void ReadConfigFile(map& mapSettingsRet, + map >& mapMultiSettingsRet) +{ + boost::filesystem::ifstream streamConfig(GetConfigFile()); + if (!streamConfig.good()) + return; // No triangles.conf file is OK + + set setOptions; + setOptions.insert("*"); + + for (boost::program_options::detail::config_file_iterator it(streamConfig, setOptions), end; it != end; ++it) + { + // Don't overwrite existing settings so command line settings override triangles.conf + string strKey = string("-") + it->string_key; + if (mapSettingsRet.count(strKey) == 0) + { + mapSettingsRet[strKey] = it->value[0]; + // interpret nofoo=1 as foo=0 (and nofoo=0 as foo=1) as long as foo not set) + InterpretNegativeSetting(strKey, mapSettingsRet); + } + mapMultiSettingsRet[strKey].push_back(it->value[0]); + } +} + +boost::filesystem::path GetPidFile() +{ + boost::filesystem::path pathPidFile(GetArg("-pid", "trianglesd.pid")); + if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile; + return pathPidFile; +} + +#ifndef WIN32 +void CreatePidFile(const boost::filesystem::path &path, pid_t pid) +{ + FILE* file = fopen(path.string().c_str(), "w"); + if (file) + { + fprintf(file, "%d\n", pid); + fclose(file); + } +} +#endif + +bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest) +{ +#ifdef WIN32 + return MoveFileExA(src.string().c_str(), dest.string().c_str(), + MOVEFILE_REPLACE_EXISTING); +#else + int rc = std::rename(src.string().c_str(), dest.string().c_str()); + return (rc == 0); +#endif /* WIN32 */ +} + +void FileCommit(FILE *fileout) +{ + fflush(fileout); // harmless if redundantly called +#ifdef WIN32 + _commit(_fileno(fileout)); +#else + fsync(fileno(fileout)); +#endif +} + +void ShrinkDebugFile() +{ + // Scroll debug.log if it's getting too big + boost::filesystem::path pathLog = GetDataDir() / "debug.log"; + FILE* file = fopen(pathLog.string().c_str(), "r"); + if (file && boost::filesystem::file_size(pathLog) > 10 * 1000000) + { + // Restart the file with some of the end + char pch[200000]; + fseek(file, -sizeof(pch), SEEK_END); + int nBytes = fread(pch, 1, sizeof(pch), file); + fclose(file); + + file = fopen(pathLog.string().c_str(), "w"); + if (file) + { + fwrite(pch, 1, nBytes, file); + fclose(file); + } + } +} + +// +// "Never go to sea with two chronometers; take one or three." +// Our three time sources are: +// - System clock +// - Median of other nodes clocks +// - The user (asking the user to fix the system clock if the first two disagree) +// +static int64_t nMockTime = 0; // For unit testing + +int64_t GetTime() +{ + if (nMockTime) return nMockTime; + + return time(NULL); +} + +void SetMockTime(int64_t nMockTimeIn) +{ + nMockTime = nMockTimeIn; +} + +static int64_t nTimeOffset = 0; + +int64_t GetTimeOffset() +{ + return nTimeOffset; +} + +int64_t GetAdjustedTime() +{ + return GetTime() + GetTimeOffset(); +} + +void AddTimeData(const CNetAddr& ip, int64_t nTime) +{ + int64_t nOffsetSample = nTime - GetTime(); + + // Ignore duplicates + static set setKnown; + if (!setKnown.insert(ip).second) + return; + + // Add data + vTimeOffsets.input(nOffsetSample); + printf("Added time data, samples %d, offset %+"PRId64" (%+"PRId64" minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60); + if (vTimeOffsets.size() >= 5 && vTimeOffsets.size() % 2 == 1) + { + int64_t nMedian = vTimeOffsets.median(); + std::vector vSorted = vTimeOffsets.sorted(); + // Only let other nodes change our time by so much + if (abs64(nMedian) < 70 * 60) + { + nTimeOffset = nMedian; + } + else + { + nTimeOffset = 0; + + static bool fDone; + if (!fDone) + { + // If nobody has a time different than ours but within 5 minutes of ours, give a warning + bool fMatch = false; + BOOST_FOREACH(int64_t nOffset, vSorted) + if (nOffset != 0 && abs64(nOffset) < 5 * 60) + fMatch = true; + + if (!fMatch) + { + fDone = true; + string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Triangles will not work properly."); + strMiscWarning = strMessage; + printf("*** %s\n", strMessage.c_str()); + uiInterface.ThreadSafeMessageBox(strMessage+" ", string("triangles"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION); + } + } + } + if (fDebug) { + BOOST_FOREACH(int64_t n, vSorted) + printf("%+"PRId64" ", n); + printf("| "); + } + printf("nTimeOffset = %+"PRId64" (%+"PRId64" minutes)\n", nTimeOffset, nTimeOffset/60); + } +} + + + + + + + + +string FormatVersion(int nVersion) +{ + if (nVersion%100 == 0) + return strprintf("%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100); + else + return strprintf("%d.%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100, nVersion%100); +} + +string FormatFullVersion() +{ + return CLIENT_BUILD; +} + +// Format the subversion field according to BIP 14 spec (https://en.triangles.it/wiki/BIP_0014) +std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments) +{ + std::ostringstream ss; + ss << "/"; + ss << name << ":" << FormatVersion(nClientVersion); + if (!comments.empty()) + ss << "(" << boost::algorithm::join(comments, "; ") << ")"; + ss << "/"; + return ss.str(); +} + +#ifdef WIN32 +boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate) +{ + namespace fs = boost::filesystem; + + char pszPath[MAX_PATH] = ""; + + if(SHGetSpecialFolderPathA(NULL, pszPath, nFolder, fCreate)) + { + return fs::path(pszPath); + } + + printf("SHGetSpecialFolderPathA() failed, could not obtain requested path.\n"); + return fs::path(""); +} +#endif + +void runCommand(std::string strCommand) +{ + int nErr = ::system(strCommand.c_str()); + if (nErr) + 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); + +// This is XCode 10.6-and-later; bring back if we drop 10.5 support: +// #elif defined(MAC_OSX) +// pthread_setname_np(name); + +#else + // Prevent warnings for unused parameters... + (void)name; +#endif +} + +bool NewThread(void(*pfn)(void*), void* parg) +{ + try + { + boost::thread(pfn, parg); // thread detaches when out of scope + } catch(boost::thread_resource_error &e) { + printf("Error creating thread: %s\n", e.what()); + return false; + } + return true; +} diff --git a/src/util.h b/src/util.h index c02ea9e..6ccf7f3 100644 --- a/src/util.h +++ b/src/util.h @@ -2,8 +2,9 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_UTIL_H -#define BITCOIN_UTIL_H + +#ifndef TRIANGLES_UTIL_H +#define TRIANGLES_UTIL_H #include "uint256.h" @@ -11,9 +12,8 @@ #include #include #include -#else -typedef int pid_t; /* define for Windows compatibility */ #endif + #include #include #include @@ -29,13 +29,15 @@ typedef int pid_t; /* define for Windows compatibility */ #include "netbase.h" // for AddTimeData -typedef long long int64; -typedef unsigned long long uint64; +// to obtain PRId64 on some old systems +#define __STDC_FORMAT_MACROS 1 -static const int64 COIN = 1000000; -static const int64 CENT = 10000; +#include +#include + +static const int64_t COIN = 1000000; +static const int64_t CENT = 10000; -#define loop for (;;) #define BEGIN(a) ((char*)&(a)) #define END(a) ((char*)&((&(a))[1])) #define UBEGIN(a) ((unsigned char*)&(a)) @@ -47,18 +49,6 @@ static const int64 CENT = 10000; #define UINTBEGIN(a) ((uint32_t*)&(a)) #define CUINTBEGIN(a) ((const uint32_t*)&(a)) -#ifndef PRI64d -#if defined(_MSC_VER) || defined(__MSVCRT__) -#define PRI64d "I64d" -#define PRI64u "I64u" -#define PRI64x "I64x" -#else -#define PRI64d "lld" -#define PRI64u "llu" -#define PRI64x "llx" -#endif -#endif - #ifndef THROW_WITH_STACKTRACE #define THROW_WITH_STACKTRACE(exception) \ { \ @@ -116,14 +106,17 @@ T* alignup(T* p) #endif #else #define MAX_PATH 1024 -inline void Sleep(int64 n) -{ - /*Boost has a year 2038 problem— if the request sleep time is past epoch+2^31 seconds the sleep returns instantly. - So we clamp our sleeps here to 10 years and hope that boost is fixed by 2028.*/ - boost::thread::sleep(boost::get_system_time() + boost::posix_time::milliseconds(n>315576000000LL?315576000000LL:n)); -} #endif +inline void MilliSleep(int64_t n) +{ +#if BOOST_VERSION >= 105000 + boost::this_thread::sleep_for(boost::chrono::milliseconds(n)); +#else + boost::this_thread::sleep(boost::posix_time::milliseconds(n)); +#endif +} + /* This GNU C extension enables the compiler to check the format string against the parameters provided. * X is the number of the "format string" parameter, and Y is the number of the first variadic parameter. * Parameters count from 1. @@ -137,11 +130,16 @@ inline void Sleep(int64 n) + + + + extern std::map mapArgs; extern std::map > mapMultiArgs; extern bool fDebug; -extern bool fStaking; extern bool fDebugNet; +extern bool fDebugSmsg; +extern bool fNoSmsg; extern bool fPrintToConsole; extern bool fPrintToDebugger; extern bool fRequestShutdown; @@ -151,6 +149,7 @@ extern bool fServer; extern bool fCommandLine; extern std::string strMiscWarning; extern bool fTestNet; +extern bool fNoListen; extern bool fLogTimestamps; extern bool fReopenDebugLog; @@ -188,10 +187,9 @@ void LogException(std::exception* pex, const char* pszThread); void PrintException(std::exception* pex, const char* pszThread); void PrintExceptionContinue(std::exception* pex, const char* pszThread); void ParseString(const std::string& str, char c, std::vector& v); -std::string FormatMoney(int64 n, bool fPlus=false); -bool ParseMoney(const std::string& str, int64& nRet); -bool ParseMoney(const char* pszIn, int64& nRet); -std::string SanitizeString(const std::string& str); +std::string FormatMoney(int64_t n, bool fPlus=false); +bool ParseMoney(const std::string& str, int64_t& nRet); +bool ParseMoney(const char* pszIn, int64_t& nRet); std::vector ParseHex(const char* psz); std::vector ParseHex(const std::string& str); bool IsHex(const std::string& str); @@ -207,28 +205,29 @@ void ParseParameters(int argc, const char*const argv[]); bool WildcardMatch(const char* psz, const char* mask); bool WildcardMatch(const std::string& str, const std::string& mask); void FileCommit(FILE *fileout); -int GetFilesize(FILE* file); bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest); boost::filesystem::path GetDefaultDataDir(); const boost::filesystem::path &GetDataDir(bool fNetSpecific = true); boost::filesystem::path GetConfigFile(); boost::filesystem::path GetPidFile(); +#ifndef WIN32 void CreatePidFile(const boost::filesystem::path &path, pid_t pid); +#endif void ReadConfigFile(std::map& mapSettingsRet, std::map >& mapMultiSettingsRet); #ifdef WIN32 boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true); #endif void ShrinkDebugFile(); int GetRandInt(int nMax); -uint64 GetRand(uint64 nMax); +uint64_t GetRand(uint64_t nMax); uint256 GetRandHash(); -int64 GetTime(); -void SetMockTime(int64 nMockTimeIn); -int64 GetAdjustedTime(); -long hex2long(const char* hexString); +int64_t GetTime(); +void SetMockTime(int64_t nMockTimeIn); +int64_t GetAdjustedTime(); +int64_t GetTimeOffset(); std::string FormatFullVersion(); std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments); -void AddTimeData(const CNetAddr& ip, int64 nTime); +void AddTimeData(const CNetAddr& ip, int64_t nTime); void runCommand(std::string strCommand); @@ -239,9 +238,9 @@ void runCommand(std::string strCommand); -inline std::string i64tostr(int64 n) +inline std::string i64tostr(int64_t n) { - return strprintf("%"PRI64d, n); + return strprintf("%"PRId64, n); } inline std::string itostr(int n) @@ -249,7 +248,7 @@ inline std::string itostr(int n) return strprintf("%d", n); } -inline int64 atoi64(const char* psz) +inline int64_t atoi64(const char* psz) { #ifdef _MSC_VER return _atoi64(psz); @@ -258,7 +257,7 @@ inline int64 atoi64(const char* psz) #endif } -inline int64 atoi64(const std::string& str) +inline int64_t atoi64(const std::string& str) { #ifdef _MSC_VER return _atoi64(str.c_str()); @@ -277,16 +276,26 @@ inline int roundint(double d) return (int)(d > 0 ? d + 0.5 : d - 0.5); } -inline int64 roundint64(double d) +inline int64_t roundint64(double d) { - return (int64)(d > 0 ? d + 0.5 : d - 0.5); + return (int64_t)(d > 0 ? d + 0.5 : d - 0.5); } -inline int64 abs64(int64 n) +inline int64_t abs64(int64_t n) { return (n >= 0 ? n : -n); } +inline std::string leftTrim(std::string src, char chr) +{ + std::string::size_type pos = src.find_first_not_of(chr, 0); + + if(pos > 0) + src.erase(0, pos); + + return src; +} + template std::string HexStr(const T itbegin, const T itend, bool fSpaces=false) { @@ -322,26 +331,32 @@ inline void PrintHex(const std::vector& vch, const char* pszForma printf(pszFormat, HexStr(vch, fSpaces).c_str()); } -inline int64 GetPerformanceCounter() +inline int64_t GetPerformanceCounter() { - int64 nCounter = 0; + int64_t nCounter = 0; #ifdef WIN32 QueryPerformanceCounter((LARGE_INTEGER*)&nCounter); #else timeval t; gettimeofday(&t, NULL); - nCounter = (int64) t.tv_sec * 1000000 + t.tv_usec; + nCounter = (int64_t) t.tv_sec * 1000000 + t.tv_usec; #endif return nCounter; } -inline int64 GetTimeMillis() +inline int64_t GetTimeMillis() { return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) - boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_milliseconds(); } -inline std::string DateTimeStrFormat(const char* pszFormat, int64 nTime) +inline int64_t GetTimeMicros() +{ + return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) - + boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_microseconds(); +} + +inline std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime) { time_t n = nTime; struct tm* ptmTime = gmtime(&n); @@ -351,7 +366,7 @@ inline std::string DateTimeStrFormat(const char* pszFormat, int64 nTime) } static const std::string strTimestampFormat = "%Y-%m-%d %H:%M:%S UTC"; -inline std::string DateTimeStrFormat(int64 nTime) +inline std::string DateTimeStrFormat(int64_t nTime) { return DateTimeStrFormat(strTimestampFormat.c_str(), nTime); } @@ -389,7 +404,7 @@ std::string GetArg(const std::string& strArg, const std::string& strDefault); * @param default (e.g. 1) * @return command-line argument (0 if invalid number) or default value */ -int64 GetArg(const std::string& strArg, int64 nDefault); +int64_t GetArg(const std::string& strArg, int64_t nDefault); /** * Return boolean argument or default value @@ -528,6 +543,20 @@ inline uint160 Hash160(const std::vector& vch) return hash2; } +/** + * Timing-attack-resistant comparison. + * Takes time proportional to length + * of first argument. + */ +template +bool TimingResistantEqual(const T& a, const T& b) +{ + if (b.size() == 0) return a.size() == 0; + size_t accumulator = a.size() ^ b.size(); + for (size_t i = 0; i < a.size(); i++) + accumulator |= a[i] ^ b[i%b.size()]; + return accumulator == 0; +} /** Median filter over a stream of values. * Returns the median of the last N numbers @@ -538,7 +567,6 @@ private: std::vector vValues; std::vector vSorted; unsigned int nSize; - T tInitial; public: CMedianFilter(unsigned int size, T initial_value): nSize(size) @@ -546,7 +574,6 @@ public: vValues.reserve(size); vValues.push_back(initial_value); vSorted = vValues; - tInitial = initial_value; } void input(T value) @@ -562,27 +589,6 @@ public: std::sort(vSorted.begin(), vSorted.end()); } - // remove last instance of a value - void removeLast(T value) - { - for (int i = vValues.size()-1; i >= 0; --i) - { - if (vValues[i] == value) - { - vValues.erase(vValues.begin()+i); - break; - } - } - if (vValues.empty()) - { - vValues.push_back(tInitial); - } - - vSorted.resize(vValues.size()); - std::copy(vValues.begin(), vValues.end(), vSorted.begin()); - std::sort(vSorted.begin(), vSorted.end()); - } - T median() const { int size = vSorted.size(); diff --git a/src/version.cpp b/src/version.cpp index 03244ca..b584eab 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -6,9 +6,9 @@ #include "version.h" // Name of client reported in the 'version' message. Report the same name -// for both bitcoind and bitcoin-qt, to make it harder for attackers to +// for both trianglesd and triangles-qt, to make it harder for attackers to // target servers or GUI users specifically. -const std::string CLIENT_NAME("Cheops"); +const std::string CLIENT_NAME("Pharao"); // Client version number #define CLIENT_VERSION_SUFFIX "" diff --git a/src/version.h b/src/version.h index 9548ac7..f382329 100644 --- a/src/version.h +++ b/src/version.h @@ -1,8 +1,8 @@ // Copyright (c) 2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_VERSION_H -#define BITCOIN_VERSION_H +#ifndef TRIANGLES_VERSION_H +#define TRIANGLES_VERSION_H #include "clientversion.h" #include @@ -21,13 +21,21 @@ extern const std::string CLIENT_NAME; extern const std::string CLIENT_BUILD; extern const std::string CLIENT_DATE; +// +// database format versioning +// +static const int DATABASE_VERSION = 70509; + // // network protocol versioning // -static const int PROTOCOL_VERSION = 70203; + +static const int PROTOCOL_VERSION = 70204; // earlier versions not supported as of Aug 2014, and are disconnected -static const int MIN_PROTO_VERSION = 70203; +static const int MIN_PROTO_VERSION = 70204; + +static const int INIT_PROTO_VERSION = 209; // nTime field added to CAddress, starting with this version; // if possible, avoid requesting addresses nodes older than this @@ -35,7 +43,7 @@ static const int CADDR_TIME_VERSION = 70200; // only request blocks from nodes outside this range of versions static const int NOBLKS_VERSION_START = 0; -static const int NOBLKS_VERSION_END = 70202; +static const int NOBLKS_VERSION_END = 70203; // BIP 0031, pong message, is enabled for all versions AFTER this one static const int BIP0031_VERSION = 60000; @@ -43,9 +51,9 @@ static const int BIP0031_VERSION = 60000; // "mempool" command, enhanced "getdata" behavior starts with this version: static const int MEMPOOL_GD_VERSION = 60002; -#define DISPLAY_VERSION_MAJOR 3 -#define DISPLAY_VERSION_MINOR 4 -#define DISPLAY_VERSION_REVISION 3 -#define DISPLAY_VERSION_BUILD 1 +#define DISPLAY_VERSION_MAJOR 4 +#define DISPLAY_VERSION_MINOR 0 +#define DISPLAY_VERSION_REVISION 0 +#define DISPLAY_VERSION_BUILD 4 #endif diff --git a/src/wallet.cpp b/src/wallet.cpp index 134bdcf..cec54d8 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -3,7 +3,7 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "main.h" +#include "txdb.h" #include "wallet.h" #include "walletdb.h" #include "crypter.h" @@ -11,12 +11,13 @@ #include "base58.h" #include "kernel.h" #include "coincontrol.h" - -#include +#include using namespace std; -extern int nStakeMaxAge; +extern unsigned int nStakeMaxAge; +unsigned int nStakeSplitAge = 1 * 24 * 60 * 60; +int64_t nStakeCombineThreshold = 50 * COIN; ////////////////////////////////////////////////////////////////////////////// // @@ -25,8 +26,8 @@ extern int nStakeMaxAge; struct CompareValueOnly { - bool operator()(const pair >& t1, - const pair >& t2) const + bool operator()(const pair >& t1, + const pair >& t2) const { return t1.first < t2.first; } @@ -44,6 +45,14 @@ CPubKey CWallet::GenerateNewKey() if (fCompressed) SetMinVersion(FEATURE_COMPRPUBKEY); + CPubKey pubkey = key.GetPubKey(); + + // Create new metadata + int64_t nCreationTime = GetTime(); + mapKeyMetadata[pubkey.GetID()] = CKeyMetadata(nCreationTime); + if (!nTimeFirstKey || nCreationTime < nTimeFirstKey) + nTimeFirstKey = nCreationTime; + if (!AddKey(key)) throw std::runtime_error("CWallet::GenerateNewKey() : AddKey failed"); return key.GetPubKey(); @@ -51,12 +60,14 @@ CPubKey CWallet::GenerateNewKey() bool CWallet::AddKey(const CKey& key) { + CPubKey pubkey = key.GetPubKey(); + if (!CCryptoKeyStore::AddKey(key)) return false; if (!fFileBacked) return true; if (!IsCrypted()) - return CWalletDB(strWalletFile).WriteKey(key.GetPubKey(), key.GetPrivKey()); + return CWalletDB(strWalletFile).WriteKey(pubkey, key.GetPrivKey(), mapKeyMetadata[pubkey.GetID()]); return true; } @@ -69,13 +80,27 @@ bool CWallet::AddCryptedKey(const CPubKey &vchPubKey, const vectorWriteCryptedKey(vchPubKey, vchCryptedSecret); + return pwalletdbEncryption->WriteCryptedKey(vchPubKey, vchCryptedSecret, mapKeyMetadata[vchPubKey.GetID()]); else - return CWalletDB(strWalletFile).WriteCryptedKey(vchPubKey, vchCryptedSecret); + return CWalletDB(strWalletFile).WriteCryptedKey(vchPubKey, vchCryptedSecret, mapKeyMetadata[vchPubKey.GetID()]); } return false; } +bool CWallet::LoadKeyMetadata(const CPubKey &pubkey, const CKeyMetadata &meta) +{ + if (meta.nCreateTime && (!nTimeFirstKey || meta.nCreateTime < nTimeFirstKey)) + nTimeFirstKey = meta.nCreateTime; + + mapKeyMetadata[pubkey.GetID()] = meta; + return true; +} + +bool CWallet::LoadCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret) +{ + return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret); +} + bool CWallet::AddCScript(const CScript& redeemScript) { if (!CCryptoKeyStore::AddCScript(redeemScript)) @@ -85,9 +110,26 @@ bool CWallet::AddCScript(const CScript& redeemScript) return CWalletDB(strWalletFile).WriteCScript(Hash160(redeemScript), redeemScript); } -// triangles: optional setting to unlock wallet for block minting only; -// serves to disable the trivial sendmoney when OS account compromised -bool fWalletUnlockMintOnly = false; +// optional setting to unlock wallet for staking only +// serves to disable the trivial sendmoney when OS account compromised +// provides no real security +bool fWalletUnlockStakingOnly = false; + +bool CWallet::Lock() +{ + if (IsLocked()) + return true; + + if (fDebug) + printf("Locking wallet.\n"); + + { + LOCK(cs_wallet); + CWalletDB wdb(strWalletFile); + + } + return LockKeyStore(); +}; bool CWallet::Unlock(const SecureString& strWalletPassphrase) { @@ -108,6 +150,9 @@ bool CWallet::Unlock(const SecureString& strWalletPassphrase) if (CCryptoKeyStore::Unlock(vMasterKey)) return true; } + + SecureMsgWalletUnlocked(); + return true; } return false; } @@ -130,7 +175,7 @@ bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, return false; if (CCryptoKeyStore::Unlock(vMasterKey)) { - int64 nStartTime = GetTimeMillis(); + int64_t nStartTime = GetTimeMillis(); crypter.SetKeyFromPassphrase(strNewWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod); pMasterKey.second.nDeriveIterations = pMasterKey.second.nDeriveIterations * (100 / ((double)(GetTimeMillis() - nStartTime))); @@ -231,14 +276,14 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE); RAND_bytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE); - CMasterKey kMasterKey; + CMasterKey kMasterKey(nDerivationMethodIndex); RandAddSeedPerfmon(); kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE); RAND_bytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE); CCrypter crypter; - int64 nStartTime = GetTimeMillis(); + int64_t nStartTime = GetTimeMillis(); crypter.SetKeyFromPassphrase(strWalletPassphrase, kMasterKey.vchSalt, 25000, kMasterKey.nDerivationMethod); kMasterKey.nDeriveIterations = 2500000 / ((double)(GetTimeMillis() - nStartTime)); @@ -301,9 +346,9 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) return true; } -int64 CWallet::IncOrderPosNext(CWalletDB *pwalletdb) +int64_t CWallet::IncOrderPosNext(CWalletDB *pwalletdb) { - int64 nRet = nOrderPosNext++; + int64_t nRet = nOrderPosNext++; if (pwalletdb) { pwalletdb->WriteOrderPosNext(nOrderPosNext); } else { @@ -336,7 +381,7 @@ CWallet::TxItems CWallet::OrderedTxItems(std::list& acentries, return txOrdered; } -void CWallet::WalletUpdateSpent(const CTransaction &tx) +void CWallet::WalletUpdateSpent(const CTransaction &tx, bool fBlock) { // Anytime a signature is successfully verified, it's proof the outpoint is spent. // Update the wallet spent flag if it doesn't know due to wallet.dat being @@ -353,13 +398,31 @@ void CWallet::WalletUpdateSpent(const CTransaction &tx) printf("WalletUpdateSpent: bad wtx %s\n", wtx.GetHash().ToString().c_str()); else if (!wtx.IsSpent(txin.prevout.n) && IsMine(wtx.vout[txin.prevout.n])) { - printf("WalletUpdateSpent found spent coin %sTRI %s\n", FormatMoney(wtx.GetCredit()).c_str(), wtx.GetHash().ToString().c_str()); + printf("WalletUpdateSpent found spent coin %s TRI %s\n", FormatMoney(wtx.GetCredit()).c_str(), wtx.GetHash().ToString().c_str()); wtx.MarkSpent(txin.prevout.n); wtx.WriteToDisk(); NotifyTransactionChanged(this, txin.prevout.hash, CT_UPDATED); } } } + + if (fBlock) + { + uint256 hash = tx.GetHash(); + map::iterator mi = mapWallet.find(hash); + CWalletTx& wtx = (*mi).second; + + BOOST_FOREACH(const CTxOut& txout, tx.vout) + { + if (IsMine(txout)) + { + wtx.MarkUnspent(&txout - &tx.vout[0]); + wtx.WriteToDisk(); + NotifyTransactionChanged(this, hash, CT_UPDATED); + } + } + } + } } @@ -396,7 +459,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn) unsigned int latestEntry = 0; { // Tolerate times up to the last timestamp in the wallet not more than 5 minutes into the future - int64 latestTolerated = latestNow + 300; + int64_t latestTolerated = latestNow + 300; std::list acentries; TxItems txOrdered = OrderedTxItems(acentries); for (TxItems::reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it) @@ -405,7 +468,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn) if (pwtx == &wtx) continue; CAccountingEntry *const pacentry = (*it).second.second; - int64 nSmartTime; + int64_t nSmartTime; if (pwtx) { nSmartTime = pwtx->nTimeSmart; @@ -466,28 +529,30 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn) return false; #ifndef QT_GUI // If default receiving address gets used, replace it with a new one - CScript scriptDefaultKey; - scriptDefaultKey.SetDestination(vchDefaultKey.GetID()); - BOOST_FOREACH(const CTxOut& txout, wtx.vout) - { - if (txout.scriptPubKey == scriptDefaultKey) + if (vchDefaultKey.IsValid()) { + CScript scriptDefaultKey; + scriptDefaultKey.SetDestination(vchDefaultKey.GetID()); + BOOST_FOREACH(const CTxOut& txout, wtx.vout) { - CPubKey newDefaultKey; - if (GetKeyFromPool(newDefaultKey, false)) + if (txout.scriptPubKey == scriptDefaultKey) { - SetDefaultKey(newDefaultKey); - SetAddressBookName(vchDefaultKey.GetID(), ""); + CPubKey newDefaultKey; + if (GetKeyFromPool(newDefaultKey, false)) + { + SetDefaultKey(newDefaultKey); + SetAddressBookName(vchDefaultKey.GetID(), ""); + } } } } #endif // since AddToWallet is called directly for self-originating transactions, check for consumption of own coins - WalletUpdateSpent(wtx); + WalletUpdateSpent(wtx, (wtxIn.hashBlock != 0)); // Notify UI of new or updated transaction NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED); - // notify an external script when a wallet transaction comes in or is updated + // notify an external script when a wallet transaction comes in or is updated std::string strCmd = GetArg("-walletnotify", ""); if ( !strCmd.empty()) @@ -495,6 +560,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn) boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex()); boost::thread t(runCommand, strCmd); // thread runs free } + } return true; } @@ -509,9 +575,16 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl LOCK(cs_wallet); bool fExisted = mapWallet.count(hash); if (fExisted && !fUpdate) return false; + + mapValue_t mapNarr; + if (fExisted || IsMine(tx) || IsFromMe(tx)) { CWalletTx wtx(this,tx); + + if (!mapNarr.empty()) + wtx.mapValue.insert(mapNarr.begin(), mapNarr.end()); + // Get merkle branch if transaction was found in a block if (pblock) wtx.SetMerkleBranch(pblock); @@ -552,7 +625,7 @@ bool CWallet::IsMine(const CTxIn &txin) const return false; } -int64 CWallet::GetDebit(const CTxIn &txin) const +int64_t CWallet::GetDebit(const CTxIn &txin) const { { LOCK(cs_wallet); @@ -588,9 +661,9 @@ bool CWallet::IsChange(const CTxOut& txout) const return false; } -int64 CWalletTx::GetTxTime() const +int64_t CWalletTx::GetTxTime() const { - int64 n = nTimeSmart; + int64_t n = nTimeSmart; return n ? n : nTimeReceived; } @@ -633,82 +706,83 @@ int CWalletTx::GetRequestCount() const return nRequests; } -void CWalletTx::GetAmounts(int64& nGeneratedImmature, int64& nGeneratedMature, list >& listReceived, - list >& listSent, int64& nFee, string& strSentAccount) const +void CWalletTx::GetAmounts(list >& listReceived, + list >& listSent, int64_t& nFee, string& strSentAccount) const { - nGeneratedImmature = nGeneratedMature = nFee = 0; + nFee = 0; listReceived.clear(); listSent.clear(); strSentAccount = strFromAccount; // Compute fee: - int64 nDebit = GetDebit(); + int64_t nDebit = GetDebit(); if (nDebit > 0) // debit>0 means we signed/sent this transaction { - int64 nValueOut = GetValueOut(); + int64_t nValueOut = GetValueOut(); nFee = nDebit - nValueOut; } // Sent/received. BOOST_FOREACH(const CTxOut& txout, vout) { - CTxDestination address; - vector vchPubKey; - if (!ExtractDestination(txout.scriptPubKey, address)) - { - if(!IsCoinBaseOrStake()) - { - printf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n", - this->GetHash().ToString().c_str()); - } - continue; - } - - // Don't report 'change' txouts - if (nDebit > 0 && pwallet->IsChange(txout)) + // Skip special stake out + if (txout.scriptPubKey.empty()) continue; + bool fIsMine; + // Only need to handle txouts if AT LEAST one of these is true: + // 1) they debit from us (sent) + // 2) the output is to us (received) + if (nDebit > 0) + { + // Don't report 'change' txouts + if (pwallet->IsChange(txout)) + continue; + fIsMine = pwallet->IsMine(txout); + } + else if (!(fIsMine = pwallet->IsMine(txout))) + continue; + + // In either case, we need to get the destination address + CTxDestination address; + if (!ExtractDestination(txout.scriptPubKey, address)) + { + printf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n", + this->GetHash().ToString().c_str()); + address = CNoDestination(); + } + + // If we are debited by the transaction, add the output as a "sent" entry if (nDebit > 0) listSent.push_back(make_pair(address, txout.nValue)); - if (pwallet->IsMine(txout)) - { - if(IsCoinBaseOrStake()) - { - if(GetBlocksToMaturity() > 0) - nGeneratedImmature += txout.nValue; - else - nGeneratedMature += txout.nValue; - } - else - listReceived.push_back(make_pair(address, txout.nValue)); - } + // If we are receiving the output, add it as a "received" entry + if (fIsMine) + listReceived.push_back(make_pair(address, txout.nValue)); } } -void CWalletTx::GetAccountAmounts(const string& strAccount, int64& nGeneratedImmature, int64& nGeneratedMature, int64& nReceived, - int64& nSent, int64& nFee) const +void CWalletTx::GetAccountAmounts(const string& strAccount, int64_t& nReceived, + int64_t& nSent, int64_t& nFee) const { - nGeneratedImmature = nGeneratedMature = nReceived = nSent = nFee = 0; + nReceived = nSent = nFee = 0; - int64 allGeneratedImmature, allGeneratedMature, allFee; + int64_t allFee; string strSentAccount; - list > listReceived; - list > listSent; - GetAmounts(allGeneratedImmature, allGeneratedMature, listReceived, listSent, allFee, strSentAccount); + list > listReceived; + list > listSent; + GetAmounts(listReceived, listSent, allFee, strSentAccount); if (strAccount == strSentAccount) { - BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64)& s, listSent) + BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& s, listSent) nSent += s.second; nFee = allFee; - nGeneratedImmature = allGeneratedImmature; - nGeneratedMature = allGeneratedMature; } { LOCK(pwallet->cs_wallet); - BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64)& r, listReceived) + BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listReceived) { if (pwallet->mapAddressBook.count(r.first)) { @@ -801,6 +875,13 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) LOCK(cs_wallet); while (pindex) { + // no need to read and scan block, if block was created before + // our wallet birthday (as adjusted for block time variability) + if (nTimeFirstKey && (pindex->nTime < (nTimeFirstKey - 7200))) { + pindex = pindex->pnext; + continue; + } + CBlock block; block.ReadFromDisk(pindex, true); BOOST_FOREACH(CTransaction& tx, block.vtx) @@ -861,7 +942,7 @@ void CWallet::ReacceptWalletTransactions() } if (fUpdated) { - printf("ReacceptWalletTransactions found spent coin %snvc %s\n", FormatMoney(wtx.GetCredit()).c_str(), wtx.GetHash().ToString().c_str()); + printf("ReacceptWalletTransactions found spent coin %s SUM %s\n", FormatMoney(wtx.GetCredit()).c_str(), wtx.GetHash().ToString().c_str()); wtx.MarkDirty(); wtx.WriteToDisk(); } @@ -870,7 +951,7 @@ void CWallet::ReacceptWalletTransactions() { // Re-accept any txes of ours that aren't already in a block if (!(wtx.IsCoinBase() || wtx.IsCoinStake())) - wtx.AcceptWalletTransaction(txdb, false); + wtx.AcceptWalletTransaction(txdb); } } if (!vMissingTx.empty()) @@ -890,7 +971,7 @@ void CWalletTx::RelayWalletTransaction(CTxDB& txdb) { uint256 hash = tx.GetHash(); if (!txdb.ContainsTx(hash)) - RelayMessage(CInv(MSG_TX, hash), (CTransaction)tx); + RelayTransaction((CTransaction)tx, hash); } } if (!(IsCoinBase() || IsCoinStake())) @@ -899,7 +980,7 @@ void CWalletTx::RelayWalletTransaction(CTxDB& txdb) if (!txdb.ContainsTx(hash)) { printf("Relaying wtx %s\n", hash.ToString().substr(0,10).c_str()); - RelayMessage(CInv(MSG_TX, hash), (CTransaction)*this); + RelayTransaction((CTransaction)*this, hash); } } } @@ -910,23 +991,26 @@ void CWalletTx::RelayWalletTransaction() RelayWalletTransaction(txdb); } -void CWallet::ResendWalletTransactions() +void CWallet::ResendWalletTransactions(bool fForce) { - // Do this infrequently and randomly to avoid giving away - // that these are our transactions. - static int64 nNextTime; - if (GetTime() < nNextTime) - return; - bool fFirst = (nNextTime == 0); - nNextTime = GetTime() + GetRand(30 * 60); - if (fFirst) - return; + if (!fForce) + { + // Do this infrequently and randomly to avoid giving away + // that these are our transactions. + static int64_t nNextTime; + if (GetTime() < nNextTime) + return; + bool fFirst = (nNextTime == 0); + nNextTime = GetTime() + GetRand(30 * 60); + if (fFirst) + return; - // Only do it if there's been a new block since last time - static int64 nLastTime; - if (nTimeBestReceived < nLastTime) - return; - nLastTime = GetTime(); + // Only do it if there's been a new block since last time + static int64_t nLastTime; + if (nTimeBestReceived < nLastTime) + return; + nLastTime = GetTime(); + } // Rebroadcast any of our txes that aren't in a block yet printf("ResendWalletTransactions()\n"); @@ -940,7 +1024,7 @@ void CWallet::ResendWalletTransactions() CWalletTx& wtx = item.second; // Don't rebroadcast until it's had plenty of time that // it should have gotten in already by now. - if (nTimeBestReceived - (int64)wtx.nTimeReceived > 5 * 60) + if (fForce || nTimeBestReceived - (int64_t)wtx.nTimeReceived > 5 * 60) mapSorted.insert(make_pair(wtx.nTimeReceived, &wtx)); } BOOST_FOREACH(PAIRTYPE(const unsigned int, CWalletTx*)& item, mapSorted) @@ -965,15 +1049,15 @@ void CWallet::ResendWalletTransactions() // -int64 CWallet::GetBalance() const +int64_t CWallet::GetBalance() const { - int64 nTotal = 0; + int64_t nTotal = 0; { LOCK(cs_wallet); for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { const CWalletTx* pcoin = &(*it).second; - if (pcoin->IsFinal() && pcoin->IsConfirmed()) + if (pcoin->IsTrusted()) nTotal += pcoin->GetAvailableCredit(); } } @@ -981,24 +1065,24 @@ int64 CWallet::GetBalance() const return nTotal; } -int64 CWallet::GetUnconfirmedBalance() const +int64_t CWallet::GetUnconfirmedBalance() const { - int64 nTotal = 0; + int64_t nTotal = 0; { LOCK(cs_wallet); for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { const CWalletTx* pcoin = &(*it).second; - if (!pcoin->IsFinal() || !pcoin->IsConfirmed()) + if (!pcoin->IsFinal() || !pcoin->IsTrusted()) nTotal += pcoin->GetAvailableCredit(); } } return nTotal; } -int64 CWallet::GetImmatureBalance() const +int64_t CWallet::GetImmatureBalance() const { - int64 nTotal = 0; + int64_t nTotal = 0; { LOCK(cs_wallet); for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) @@ -1025,7 +1109,7 @@ void CWallet::AvailableCoins(vector& vCoins, bool fOnlyConfirmed, const if (!pcoin->IsFinal()) continue; - if (fOnlyConfirmed && !pcoin->IsConfirmed()) + if (fOnlyConfirmed && !pcoin->IsTrusted()) continue; if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0) @@ -1034,16 +1118,44 @@ void CWallet::AvailableCoins(vector& vCoins, bool fOnlyConfirmed, const if(pcoin->IsCoinStake() && pcoin->GetBlocksToMaturity() > 0) continue; + int nDepth = pcoin->GetDepthInMainChain(); + if (nDepth < 0) + continue; + for (unsigned int i = 0; i < pcoin->vout.size(); i++) - if (!(pcoin->IsSpent(i)) && IsMine(pcoin->vout[i]) && pcoin->vout[i].nValue > 0 && - (!coinControl || !coinControl->HasSelected() || coinControl->IsSelected((*it).first, i))) + if (!(pcoin->IsSpent(i)) && IsMine(pcoin->vout[i]) && pcoin->vout[i].nValue >= nMinimumInputValue && + (!coinControl || !coinControl->HasSelected() || coinControl->IsSelected((*it).first, i))) + vCoins.push_back(COutput(pcoin, i, nDepth)); + + } + } +} + +void CWallet::AvailableCoinsMinConf(vector& vCoins, int nConf) const +{ + vCoins.clear(); + + { + LOCK(cs_wallet); + for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) + { + const CWalletTx* pcoin = &(*it).second; + + if (!pcoin->IsFinal()) + continue; + + if(pcoin->GetDepthInMainChain() < nConf) + continue; + + for (unsigned int i = 0; i < pcoin->vout.size(); i++) + if (!(pcoin->IsSpent(i)) && IsMine(pcoin->vout[i]) && pcoin->vout[i].nValue >= nMinimumInputValue) vCoins.push_back(COutput(pcoin, i, pcoin->GetDepthInMainChain())); } } } -static void ApproximateBestSubset(vector > >vValue, int64 nTotalLower, int64 nTargetValue, - vector& vfBest, int64& nBest, int iterations = 1000) +static void ApproximateBestSubset(vector > >vValue, int64_t nTotalLower, int64_t nTargetValue, + vector& vfBest, int64_t& nBest, int iterations = 1000) { vector vfIncluded; @@ -1053,7 +1165,7 @@ static void ApproximateBestSubset(vector::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { @@ -1094,9 +1206,9 @@ int64 CWallet::GetStake() const return nTotal; } -int64 CWallet::GetNewMint() const +int64_t CWallet::GetNewMint() const { - int64 nTotal = 0; + int64_t nTotal = 0; LOCK(cs_wallet); for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { @@ -1107,17 +1219,17 @@ int64 CWallet::GetNewMint() const return nTotal; } -bool CWallet::SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, int nConfMine, int nConfTheirs, vector vCoins, set >& setCoinsRet, int64& nValueRet) const +bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, unsigned int nSpendTime, int nConfMine, int nConfTheirs, vector vCoins, set >& setCoinsRet, int64_t& nValueRet) const { setCoinsRet.clear(); nValueRet = 0; // List of values less than target - pair > coinLowestLarger; - coinLowestLarger.first = std::numeric_limits::max(); + pair > coinLowestLarger; + coinLowestLarger.first = std::numeric_limits::max(); coinLowestLarger.second.first = NULL; - vector > > vValue; - int64 nTotalLower = 0; + vector > > vValue; + int64_t nTotalLower = 0; random_shuffle(vCoins.begin(), vCoins.end(), GetRandInt); @@ -1130,12 +1242,13 @@ bool CWallet::SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, in int i = output.i; + // triangles: timestamp must not exceed spend time if (pcoin->nTime > nSpendTime) - continue; // triangles: timestamp must not exceed spend time + continue; - int64 n = pcoin->vout[i].nValue; + int64_t n = pcoin->vout[i].nValue; - pair > coin = make_pair(n,make_pair(pcoin, i)); + pair > coin = make_pair(n,make_pair(pcoin, i)); if (n == nTargetValue) { @@ -1176,7 +1289,7 @@ bool CWallet::SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, in // Solve subset sum by stochastic approximation sort(vValue.rbegin(), vValue.rend(), CompareValueOnly()); vector vfBest; - int64 nBest; + int64_t nBest; ApproximateBestSubset(vValue, nTotalLower, nTargetValue, vfBest, nBest, 1000); if (nBest != nTargetValue && nTotalLower >= nTargetValue + CENT) @@ -1212,7 +1325,7 @@ bool CWallet::SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, in return true; } -bool CWallet::SelectCoins(int64 nTargetValue, unsigned int nSpendTime, set >& setCoinsRet, int64& nValueRet, const CCoinControl* coinControl) const +bool CWallet::SelectCoins(int64_t nTargetValue, unsigned int nSpendTime, set >& setCoinsRet, int64_t& nValueRet, const CCoinControl* coinControl) const { vector vCoins; AvailableCoins(vCoins, true, coinControl); @@ -1233,10 +1346,54 @@ bool CWallet::SelectCoins(int64 nTargetValue, unsigned int nSpendTime, set >& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet, const CCoinControl* coinControl) +// Select some coins without random shuffle or best subset approximation +bool CWallet::SelectCoinsSimple(int64_t nTargetValue, unsigned int nSpendTime, int nMinConf, set >& setCoinsRet, int64_t& nValueRet) const { - int64 nValue = 0; - BOOST_FOREACH (const PAIRTYPE(CScript, int64)& s, vecSend) + vector vCoins; + AvailableCoinsMinConf(vCoins, nMinConf); + + setCoinsRet.clear(); + nValueRet = 0; + + BOOST_FOREACH(COutput output, vCoins) + { + const CWalletTx *pcoin = output.tx; + int i = output.i; + + // Stop if we've chosen enough inputs + if (nValueRet >= nTargetValue) + break; + + // Follow the timestamp rules + if (pcoin->nTime > nSpendTime) + continue; + + int64_t n = pcoin->vout[i].nValue; + + pair > coin = make_pair(n,make_pair(pcoin, i)); + + if (n >= nTargetValue) + { + // If input value is greater or equal to target then simply insert + // it into the current subset and exit + setCoinsRet.insert(coin.second); + nValueRet += coin.first; + break; + } + else if (n < nTargetValue + CENT) + { + setCoinsRet.insert(coin.second); + nValueRet += coin.first; + } + } + + return true; +} + +bool CWallet::CreateTransaction(const vector >& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, const CCoinControl* coinControl) +{ + int64_t nValue = 0; + BOOST_FOREACH (const PAIRTYPE(CScript, int64_t)& s, vecSend) { if (nValue < 0) return false; @@ -1246,84 +1403,87 @@ bool CWallet::CreateTransaction(const vector >& vecSend, CW return false; wtxNew.BindWallet(this); - + { LOCK2(cs_main, cs_wallet); // txdb must be opened before the mapWallet lock CTxDB txdb("r"); { nFeeRet = nTransactionFee; - loop + while (true) { wtxNew.vin.clear(); wtxNew.vout.clear(); wtxNew.fFromMe = true; - int64 nTotalValue = nValue + nFeeRet; + int64_t nTotalValue = nValue + nFeeRet; double dPriority = 0; // vouts to the payees - BOOST_FOREACH (const PAIRTYPE(CScript, int64)& s, vecSend) + BOOST_FOREACH (const PAIRTYPE(CScript, int64_t)& s, vecSend) wtxNew.vout.push_back(CTxOut(s.second, s.first)); // Choose coins to use set > setCoins; - int64 nValueIn = 0; + int64_t nValueIn = 0; if (!SelectCoins(nTotalValue, wtxNew.nTime, setCoins, nValueIn, coinControl)) return false; BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins) { - int64 nCredit = pcoin.first->vout[pcoin.second].nValue; + int64_t nCredit = pcoin.first->vout[pcoin.second].nValue; dPriority += (double)nCredit * pcoin.first->GetDepthInMainChain(); } - int64 nChange = nValueIn - nValue - nFeeRet; + int64_t nChange = nValueIn - nValue - nFeeRet; // if sub-cent change is required, the fee must be raised to at least MIN_TX_FEE // or until nChange becomes zero // NOTE: this depends on the exact behaviour of GetMinFee if (nFeeRet < MIN_TX_FEE && nChange > 0 && nChange < CENT) { - int64 nMoveToFee = min(nChange, MIN_TX_FEE - nFeeRet); + int64_t nMoveToFee = min(nChange, MIN_TX_FEE - nFeeRet); nChange -= nMoveToFee; nFeeRet += nMoveToFee; } - // triangles: sub-cent change is moved to fee - if (nChange > 0 && nChange < MIN_TXOUT_AMOUNT) - { - nFeeRet += nChange; - nChange = 0; - } - if (nChange > 0) { - // Fill a vout to ourself // TODO: pass in scriptChange instead of reservekey so - // change transaction isn't always pay-to-bitcoin-address + // change transaction isn't always pay-to-triangles-address CScript scriptChange; - - // coin control: send change to custom address - if (coinControl && !boost::get(&coinControl->destChange)) - scriptChange.SetDestination(coinControl->destChange); - - // no coin control: send change to newly generated address - else - { - // Note: We use a new key here to keep it from being obvious which side is the change. - // The drawback is that by not reusing a previous key, the change may be lost if a - // backup is restored, if the backup doesn't have the new private key for the change. - // If we reused the old key, it would be possible to add code to look for and - // rediscover unknown transactions that were written with keys of ours to recover - // post-backup change. - - // Reserve a new key pair from key pool - CPubKey vchPubKey = reservekey.GetReservedKey(); - - scriptChange.SetDestination(vchPubKey.GetID()); - } - + + // coin control: send change to custom address + if (coinControl && !boost::get(&coinControl->destChange)) + scriptChange.SetDestination(coinControl->destChange); + + // no coin control: send change to newly generated address + else + { + // Note: We use a new key here to keep it from being obvious which side is the change. + // The drawback is that by not reusing a previous key, the change may be lost if a + // backup is restored, if the backup doesn't have the new private key for the change. + // If we reused the old key, it would be possible to add code to look for and + // rediscover unknown transactions that were written with keys of ours to recover + // post-backup change. + + // Reserve a new key pair from key pool + CPubKey vchPubKey = reservekey.GetReservedKey(); + + scriptChange.SetDestination(vchPubKey.GetID()); + } + // Insert change txn at random position: - vector::iterator position = wtxNew.vout.begin()+GetRandInt(wtxNew.vout.size()); + vector::iterator position = wtxNew.vout.begin()+GetRandInt(wtxNew.vout.size() + 1); + + // -- don't put change output between value and narration outputs + if (position > wtxNew.vout.begin() && position < wtxNew.vout.end()) + { + while (position > wtxNew.vout.begin()) + { + if (position->nValue != 0) + break; + position--; + }; + }; wtxNew.vout.insert(position, CTxOut(nChange, scriptChange)); } else @@ -1346,8 +1506,8 @@ bool CWallet::CreateTransaction(const vector >& vecSend, CW dPriority /= nBytes; // Check that enough fee is included - int64 nPayFee = nTransactionFee * (1 + (int64)nBytes / 1000); - int64 nMinFee = wtxNew.GetMinFee(1, false, GMF_SEND, nBytes); + int64_t nPayFee = nTransactionFee * (1 + (int64_t)nBytes / 1000); + int64_t nMinFee = wtxNew.GetMinFee(1, GMF_SEND, nBytes); if (nFeeRet < max(nPayFee, nMinFee)) { @@ -1366,29 +1526,55 @@ bool CWallet::CreateTransaction(const vector >& vecSend, CW return true; } -bool CWallet::CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet, const CCoinControl* coinControl) + + + +bool CWallet::CreateTransaction(CScript scriptPubKey, int64_t nValue, std::string& sNarr, CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, const CCoinControl* coinControl) { - vector< pair > vecSend; + vector< pair > vecSend; vecSend.push_back(make_pair(scriptPubKey, nValue)); - return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, coinControl); + + if (sNarr.length() > 0) + { + std::vector vNarr(sNarr.c_str(), sNarr.c_str() + sNarr.length()); + std::vector vNDesc; + + vNDesc.resize(2); + vNDesc[0] = 'n'; + vNDesc[1] = 'p'; + + CScript scriptN = CScript() << OP_RETURN << vNDesc << OP_RETURN << vNarr; + + vecSend.push_back(make_pair(scriptN, 0)); + } + + // -- CreateTransaction won't place change between value and narr output. + // narration output will be for preceding output + + bool rv = CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, coinControl); + + // -- narration will be added to mapValue later in FindStealthTransactions From CommitTransaction + return rv; } -bool CWallet::GetStakeWeight(const CKeyStore& keystore, uint64& nMinWeight, uint64& nMaxWeight, uint64& nWeight) + + + + +bool CWallet::GetStakeWeight(const CKeyStore& keystore, uint64_t& nMinWeight, uint64_t& nMaxWeight, uint64_t& nWeight) { // Choose coins to use - int64 nBalance = GetBalance(); + int64_t nBalance = GetBalance(); - int64 nReserveBalance = 0; - if (mapArgs.count("-reservebalance") && !ParseMoney(mapArgs["-reservebalance"], nReserveBalance)) - return error("CreateCoinStake : invalid reserve balance amount"); if (nBalance <= nReserveBalance) return false; - set > setCoins; vector vwtxPrev; - int64 nValueIn = 0; - if (!SelectCoins(nBalance - nReserveBalance, GetTime(), setCoins, nValueIn)) + set > setCoins; + int64_t nValueIn = 0; + + if (!SelectCoinsSimple(nBalance - nReserveBalance, GetTime(), nCoinbaseMaturity, setCoins, nValueIn)) return false; if (setCoins.empty()) @@ -1404,7 +1590,7 @@ bool CWallet::GetStakeWeight(const CKeyStore& keystore, uint64& nMinWeight, uint continue; } - int64 nTimeWeight = GetWeight((int64)pcoin.first->nTime, (int64)GetTime()); + int64_t nTimeWeight = GetWeight((int64_t)pcoin.first->nTime, (int64_t)GetTime()); CBigNum bnCoinDayWeight = CBigNum(pcoin.first->vout[pcoin.second].nValue) * nTimeWeight / COIN / (24 * 60 * 60); // Weight is greater than zero @@ -1429,80 +1615,72 @@ bool CWallet::GetStakeWeight(const CKeyStore& keystore, uint64& nMinWeight, uint return true; } -// triangles: create coin stake transaction -bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64 nSearchInterval, CTransaction& txNew) +bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64_t nSearchInterval, int64_t nFees, CTransaction& txNew, CKey& key) { - // The following split & combine thresholds are important to security - // Should not be adjusted if you don't understand the consequences - static unsigned int nStakeSplitAge = (60 * 60 * 24 * 30); - const CBlockIndex* pIndex0 = GetLastBlockIndex(pindexBest, false); - int64 nCombineThreshold = 0; - if(pIndex0->pprev) - nCombineThreshold = GetProofOfWorkReward(pIndex0->nHeight, MIN_TX_FEE, pIndex0->pprev->GetBlockHash()) / 3; - + CBlockIndex* pindexPrev = pindexBest; CBigNum bnTargetPerCoinDay; bnTargetPerCoinDay.SetCompact(nBits); txNew.vin.clear(); txNew.vout.clear(); + // Mark coin stake transaction CScript scriptEmpty; scriptEmpty.clear(); txNew.vout.push_back(CTxOut(0, scriptEmpty)); + // Choose coins to use - int64 nBalance = GetBalance(); - int64 nReserveBalance = 0; - if (mapArgs.count("-reservebalance") && !ParseMoney(mapArgs["-reservebalance"], nReserveBalance)) - return error("CreateCoinStake : invalid reserve balance amount"); + int64_t nBalance = GetBalance(); + if (nBalance <= nReserveBalance) return false; - set > setCoins; vector vwtxPrev; - int64 nValueIn = 0; - if (!SelectCoins(nBalance - nReserveBalance, txNew.nTime, setCoins, nValueIn)) + + set > setCoins; + int64_t nValueIn = 0; + + // Select coins with suitable depth + if (!SelectCoinsSimple(nBalance - nReserveBalance, txNew.nTime, nCoinbaseMaturity , setCoins, nValueIn)) return false; if (setCoins.empty()) return false; - int64 nCredit = 0; + int64_t nCredit = 0; CScript scriptPubKeyKernel; + CTxDB txdb("r"); BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins) { - CTxDB txdb("r"); CTxIndex txindex; - { - LOCK2(cs_main, cs_wallet); - if (!txdb.ReadTxIndex(pcoin.first->GetHash(), txindex)) - continue; - } + { + LOCK2(cs_main, cs_wallet); + if (!txdb.ReadTxIndex(pcoin.first->GetHash(), txindex)) + continue; + } // Read block header CBlock block; - { - LOCK2(cs_main, cs_wallet); - if (!block.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos, false)) - continue; - } + { + LOCK2(cs_main, cs_wallet); + if (!block.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos, false)) + continue; + } static int nMaxStakeSearchInterval = 60; - - // printf(">> block.GetBlockTime() = %"PRI64d", nStakeMinAge = %d, txNew.nTime = %d\n", block.GetBlockTime(), nStakeMinAge,txNew.nTime); if (block.GetBlockTime() + nStakeMinAge > txNew.nTime - nMaxStakeSearchInterval) continue; // only count coins meeting min age requirement bool fKernelFound = false; - for (unsigned int n=0; n> In.....\n"); // Search backward in time from the given txNew timestamp // Search nSearchInterval seconds back up to nMaxStakeSearchInterval - uint256 hashProofOfStake = 0; + uint256 hashProofOfStake = 0, targetProofOfStake = 0; COutPoint prevoutStake = COutPoint(pcoin.first->GetHash(), pcoin.second); - if (CheckStakeKernelHash(nBits, block, txindex.pos.nTxPos - txindex.pos.nBlockPos, *pcoin.first, prevoutStake, txNew.nTime - n, hashProofOfStake)) + if (CheckStakeKernelHash(nBits, block, txindex.pos.nTxPos - txindex.pos.nBlockPos, *pcoin.first, prevoutStake, txNew.nTime - n, hashProofOfStake, targetProofOfStake)) { - // Found a kernel + // Found a kernel if (fDebug && GetBoolArg("-printcoinstake")) printf("CreateCoinStake : kernel found\n"); vector vSolutions; @@ -1526,7 +1704,6 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int if (whichType == TX_PUBKEYHASH) // pay to address type { // convert to pay to public key type - CKey key; if (!keystore.GetKey(uint160(vSolutions[0]), key)) { if (fDebug && GetBoolArg("-printcoinstake")) @@ -1535,34 +1712,50 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int } scriptPubKeyOut << key.GetPubKey() << OP_CHECKSIG; } - else - scriptPubKeyOut = scriptPubKeyKernel; + if (whichType == TX_PUBKEY) + { + valtype& vchPubKey = vSolutions[0]; + if (!keystore.GetKey(Hash160(vchPubKey), key)) + { + if (fDebug && GetBoolArg("-printcoinstake")) + printf("CreateCoinStake : failed to get key for kernel type=%d\n", whichType); + break; // unable to find corresponding public key + } - txNew.nTime -= n; + if (key.GetPubKey() != vchPubKey) + { + if (fDebug && GetBoolArg("-printcoinstake")) + printf("CreateCoinStake : invalid key for kernel type=%d\n", whichType); + break; // keys mismatch + } + + scriptPubKeyOut = scriptPubKeyKernel; + } + + txNew.nTime -= n; txNew.vin.push_back(CTxIn(pcoin.first->GetHash(), pcoin.second)); nCredit += pcoin.first->vout[pcoin.second].nValue; - - // printf(">> Wallet: CreateCoinStake: nCredit = %"PRI64d"\n", nCredit); - vwtxPrev.push_back(pcoin.first); txNew.vout.push_back(CTxOut(0, scriptPubKeyOut)); - if (block.GetBlockTime() + nStakeSplitAge > txNew.nTime) - txNew.vout.push_back(CTxOut(0, scriptPubKeyOut)); //split stake + if (GetWeight(block.GetBlockTime(), (int64_t)txNew.nTime) < nStakeSplitAge) + txNew.vout.push_back(CTxOut(0, scriptPubKeyOut)); //split stake if (fDebug && GetBoolArg("-printcoinstake")) printf("CreateCoinStake : added kernel type=%d\n", whichType); fKernelFound = true; break; } } + if (fKernelFound || fShutdown) break; // if kernel is found stop searching } + if (nCredit == 0 || nCredit > nBalance - nReserveBalance) - { - // printf(">> Wallet: CreateCoinStake: nCredit = %"PRI64d", nBalance = %"PRI64d", nReserveBalance = %"PRI64d"\n", nCredit, nBalance, nReserveBalance); + { + // printf(">> Wallet: CreateCoinStake: nCredit = %"PRI64d", nBalance = %"PRI64d", nReserveBalance = %"PRI64d"\n", nCredit, nBalance, nReserveBalance); return false; - } + } BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins) { @@ -1571,75 +1764,65 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int if (txNew.vout.size() == 2 && ((pcoin.first->vout[pcoin.second].scriptPubKey == scriptPubKeyKernel || pcoin.first->vout[pcoin.second].scriptPubKey == txNew.vout[1].scriptPubKey)) && pcoin.first->GetHash() != txNew.vin[0].prevout.hash) { + int64_t nTimeWeight = GetWeight((int64_t)pcoin.first->nTime, (int64_t)txNew.nTime); + // Stop adding more inputs if already too many inputs if (txNew.vin.size() >= 100) break; // Stop adding more inputs if value is already pretty significant - if (nCredit > nCombineThreshold) + if (nCredit >= nStakeCombineThreshold) break; // Stop adding inputs if reached reserve limit if (nCredit + pcoin.first->vout[pcoin.second].nValue > nBalance - nReserveBalance) break; // Do not add additional significant input - if (pcoin.first->vout[pcoin.second].nValue > nCombineThreshold) + if (pcoin.first->vout[pcoin.second].nValue >= nStakeCombineThreshold) continue; // Do not add input that is still too young - if (pcoin.first->nTime + nStakeMaxAge > txNew.nTime) + if (nTimeWeight < nStakeMinAge) continue; + txNew.vin.push_back(CTxIn(pcoin.first->GetHash(), pcoin.second)); nCredit += pcoin.first->vout[pcoin.second].nValue; vwtxPrev.push_back(pcoin.first); } } + // Calculate coin age reward { - uint64 nCoinAge; + uint64_t nCoinAge; CTxDB txdb("r"); - const CBlockIndex* pIndex0 = GetLastBlockIndex(pindexBest, false); - if (!txNew.GetCoinAge(txdb, nCoinAge)) return error("CreateCoinStake : failed to calculate coin age"); - nCredit += GetProofOfStakeReward(nCoinAge, nBits, txNew.nTime, pIndex0->nHeight); + + int64_t nReward = GetProofOfStakeReward(nCoinAge, nFees); + if (nReward <= 0) + return false; + + nCredit += nReward; } - int64 nMinFee = 0; - loop + // Set output amount + if (txNew.vout.size() == 3) { - // Set output amount - if (txNew.vout.size() == 3) - { - txNew.vout[1].nValue = ((nCredit - nMinFee) / 2 / CENT) * CENT; - txNew.vout[2].nValue = nCredit - nMinFee - txNew.vout[1].nValue; - } - else - txNew.vout[1].nValue = nCredit - nMinFee; - - // Sign - int nIn = 0; - BOOST_FOREACH(const CWalletTx* pcoin, vwtxPrev) - { - if (!SignSignature(*this, *pcoin, txNew, nIn++)) - return error("CreateCoinStake : failed to sign coinstake"); - } - - // Limit size - unsigned int nBytes = ::GetSerializeSize(txNew, SER_NETWORK, PROTOCOL_VERSION); - if (nBytes >= MAX_BLOCK_SIZE_GEN/5) - return error("CreateCoinStake : exceeded coinstake size limit"); - - // Check enough fee is paid - if (nMinFee < txNew.GetMinFee() - MIN_TX_FEE) - { - nMinFee = txNew.GetMinFee() - MIN_TX_FEE; - continue; // try signing again - } - else - { - if (fDebug && GetBoolArg("-printfee")) - printf("CreateCoinStake : fee for coinstake %s\n", FormatMoney(nMinFee).c_str()); - break; - } + txNew.vout[1].nValue = (nCredit / 2 / CENT) * CENT; + txNew.vout[2].nValue = nCredit - txNew.vout[1].nValue; } + else + txNew.vout[1].nValue = nCredit; + + // Sign + int nIn = 0; + BOOST_FOREACH(const CWalletTx* pcoin, vwtxPrev) + { + if (!SignSignature(*this, *pcoin, txNew, nIn++)) + return error("CreateCoinStake : failed to sign coinstake"); + } + + // Limit size + unsigned int nBytes = ::GetSerializeSize(txNew, SER_NETWORK, PROTOCOL_VERSION); + if (nBytes >= MAX_BLOCK_SIZE_GEN/5) + return error("CreateCoinStake : exceeded coinstake size limit"); // Successfully generated coinstake return true; @@ -1649,6 +1832,14 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int // Call after CreateTransaction unless you want to abort bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey) { + mapValue_t mapNarr; + + if (!mapNarr.empty()) + { + BOOST_FOREACH(const PAIRTYPE(string,string)& item, mapNarr) + wtxNew.mapValue[item.first] = item.second; + }; + { LOCK2(cs_main, cs_wallet); printf("CommitTransaction:\n%s", wtxNew.ToString().c_str()); @@ -1687,7 +1878,7 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey) if (!wtxNew.AcceptToMemoryPool()) { // This must not fail. The transaction has already been signed and recorded. - printf("CommitTransaction() : Error: Transaction not valid"); + printf("CommitTransaction() : Error: Transaction not valid\n"); return false; } wtxNew.RelayWalletTransaction(); @@ -1698,10 +1889,10 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey) -string CWallet::SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee) +string CWallet::SendMoney(CScript scriptPubKey, int64_t nValue, std::string& sNarr, CWalletTx& wtxNew, bool fAskFee) { CReserveKey reservekey(this); - int64 nFeeRequired; + int64_t nFeeRequired; if (IsLocked()) { @@ -1709,13 +1900,13 @@ string CWallet::SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, printf("SendMoney() : %s", strError.c_str()); return strError; } - if (fWalletUnlockMintOnly) + if (fWalletUnlockStakingOnly) { - string strError = _("Error: Wallet unlocked for block minting only, unable to create transaction."); + string strError = _("Error: Wallet unlocked for staking only, unable to create transaction."); printf("SendMoney() : %s", strError.c_str()); return strError; } - if (!CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired)) + if (!CreateTransaction(scriptPubKey, nValue, sNarr, wtxNew, reservekey, nFeeRequired)) { string strError; if (nValue + nFeeRequired > GetBalance()) @@ -1737,7 +1928,7 @@ string CWallet::SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, -string CWallet::SendMoneyToDestination(const CTxDestination& address, int64 nValue, CWalletTx& wtxNew, bool fAskFee) +string CWallet::SendMoneyToDestination(const CTxDestination& address, int64_t nValue, std::string& sNarr, CWalletTx& wtxNew, bool fAskFee) { // Check amount if (nValue <= 0) @@ -1745,11 +1936,14 @@ string CWallet::SendMoneyToDestination(const CTxDestination& address, int64 nVal if (nValue + nTransactionFee > GetBalance()) return _("Insufficient funds"); - // Parse Bitcoin address + if (sNarr.length() > 24) + return _("Narration must be 24 characters or less."); + + // Parse Triangles address CScript scriptPubKey; scriptPubKey.SetDestination(address); - return SendMoney(scriptPubKey, nValue, wtxNew, fAskFee); + return SendMoney(scriptPubKey, nValue, sNarr, wtxNew, fAskFee); } @@ -1783,21 +1977,49 @@ DBErrors CWallet::LoadWallet(bool& fFirstRunRet) bool CWallet::SetAddressBookName(const CTxDestination& address, const string& strName) { - std::map::iterator mi = mapAddressBook.find(address); - mapAddressBook[address] = strName; - NotifyAddressBookChanged(this, address, strName, ::IsMine(*this, address), (mi == mapAddressBook.end()) ? CT_NEW : CT_UPDATED); + bool fOwned; + ChangeType nMode; + { + LOCK(cs_wallet); // mapAddressBook + std::map::iterator mi = mapAddressBook.find(address); + nMode = (mi == mapAddressBook.end()) ? CT_NEW : CT_UPDATED; + fOwned = ::IsMine(*this, address); + + mapAddressBook[address] = strName; + } + + if (fOwned) + { + const CTrianglesAddress& caddress = address; + SecureMsgWalletKeyChanged(caddress.ToString(), strName, nMode); + } + NotifyAddressBookChanged(this, address, strName, fOwned, nMode); + if (!fFileBacked) return false; - return CWalletDB(strWalletFile).WriteName(CBitcoinAddress(address).ToString(), strName); + return CWalletDB(strWalletFile).WriteName(CTrianglesAddress(address).ToString(), strName); } bool CWallet::DelAddressBookName(const CTxDestination& address) { - mapAddressBook.erase(address); - NotifyAddressBookChanged(this, address, "", ::IsMine(*this, address), CT_DELETED); + { + LOCK(cs_wallet); // mapAddressBook + + mapAddressBook.erase(address); + } + + bool fOwned = ::IsMine(*this, address); + string sName = ""; + if (fOwned) + { + const CTrianglesAddress& caddress = address; + SecureMsgWalletKeyChanged(caddress.ToString(), sName, CT_DELETED); + } + NotifyAddressBookChanged(this, address, "", fOwned, CT_DELETED); + if (!fFileBacked) return false; - return CWalletDB(strWalletFile).EraseName(CBitcoinAddress(address).ToString()); + return CWalletDB(strWalletFile).EraseName(CTrianglesAddress(address).ToString()); } @@ -1808,12 +2030,12 @@ void CWallet::PrintWallet(const CBlock& block) if (block.IsProofOfWork() && mapWallet.count(block.vtx[0].GetHash())) { CWalletTx& wtx = mapWallet[block.vtx[0].GetHash()]; - printf(" mine: %d %d %"PRI64d"", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit()); + printf(" mine: %d %d %"PRId64"", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit()); } if (block.IsProofOfStake() && mapWallet.count(block.vtx[1].GetHash())) { CWalletTx& wtx = mapWallet[block.vtx[1].GetHash()]; - printf(" stake: %d %d %"PRI64d"", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit()); + printf(" stake: %d %d %"PRId64"", wtx.GetDepthInMainChain(), wtx.GetBlocksToMaturity(), wtx.GetCredit()); } } @@ -1862,26 +2084,26 @@ bool CWallet::NewKeyPool() { LOCK(cs_wallet); CWalletDB walletdb(strWalletFile); - BOOST_FOREACH(int64 nIndex, setKeyPool) + BOOST_FOREACH(int64_t nIndex, setKeyPool) walletdb.ErasePool(nIndex); setKeyPool.clear(); if (IsLocked()) return false; - int64 nKeys = max(GetArg("-keypool", 100), (int64)0); + int64_t nKeys = max(GetArg("-keypool", 100), (int64_t)0); for (int i = 0; i < nKeys; i++) { - int64 nIndex = i+1; + int64_t nIndex = i+1; walletdb.WritePool(nIndex, CKeyPool(GenerateNewKey())); setKeyPool.insert(nIndex); } - printf("CWallet::NewKeyPool wrote %"PRI64d" new keys\n", nKeys); + printf("CWallet::NewKeyPool wrote %"PRId64" new keys\n", nKeys); } return true; } -bool CWallet::TopUpKeyPool() +bool CWallet::TopUpKeyPool(unsigned int nSize) { { LOCK(cs_wallet); @@ -1892,22 +2114,27 @@ bool CWallet::TopUpKeyPool() CWalletDB walletdb(strWalletFile); // Top up key pool - unsigned int nTargetSize = max(GetArg("-keypool", 100), 0LL); + unsigned int nTargetSize; + if (nSize > 0) + nTargetSize = nSize; + else + nTargetSize = max(GetArg("-keypool", 100), (int64_t)0); + while (setKeyPool.size() < (nTargetSize + 1)) { - int64 nEnd = 1; + int64_t nEnd = 1; if (!setKeyPool.empty()) nEnd = *(--setKeyPool.end()) + 1; if (!walletdb.WritePool(nEnd, CKeyPool(GenerateNewKey()))) throw runtime_error("TopUpKeyPool() : writing generated key failed"); setKeyPool.insert(nEnd); - printf("keypool added key %"PRI64d", size=%"PRIszu"\n", nEnd, setKeyPool.size()); + printf("keypool added key %"PRId64", size=%"PRIszu"\n", nEnd, setKeyPool.size()); } } return true; } -void CWallet::ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool) +void CWallet::ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool) { nIndex = -1; keypool.vchPubKey = CPubKey(); @@ -1931,17 +2158,17 @@ void CWallet::ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool) throw runtime_error("ReserveKeyFromKeyPool() : unknown key in key pool"); assert(keypool.vchPubKey.IsValid()); if (fDebug && GetBoolArg("-printkeypool")) - printf("keypool reserve %"PRI64d"\n", nIndex); + printf("keypool reserve %"PRId64"\n", nIndex); } } -int64 CWallet::AddReserveKey(const CKeyPool& keypool) +int64_t CWallet::AddReserveKey(const CKeyPool& keypool) { { LOCK2(cs_main, cs_wallet); CWalletDB walletdb(strWalletFile); - int64 nIndex = 1 + *(--setKeyPool.end()); + int64_t nIndex = 1 + *(--setKeyPool.end()); if (!walletdb.WritePool(nIndex, keypool)) throw runtime_error("AddReserveKey() : writing added key failed"); setKeyPool.insert(nIndex); @@ -1950,7 +2177,7 @@ int64 CWallet::AddReserveKey(const CKeyPool& keypool) return -1; } -void CWallet::KeepKey(int64 nIndex) +void CWallet::KeepKey(int64_t nIndex) { // Remove from key pool if (fFileBacked) @@ -1959,23 +2186,23 @@ void CWallet::KeepKey(int64 nIndex) walletdb.ErasePool(nIndex); } if(fDebug) - printf("keypool keep %"PRI64d"\n", nIndex); + printf("keypool keep %"PRId64"\n", nIndex); } -void CWallet::ReturnKey(int64 nIndex) +void CWallet::ReturnKey(int64_t nIndex) { // Return to key pool { LOCK(cs_wallet); setKeyPool.insert(nIndex); } - //if(fDebug) - //printf("keypool return %"PRI64d"\n", nIndex); + if(fDebug) + printf("keypool return %"PRId64"\n", nIndex); } bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse) { - int64 nIndex = 0; + int64_t nIndex = 0; CKeyPool keypool; { LOCK(cs_wallet); @@ -1997,9 +2224,9 @@ bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse) return true; } -int64 CWallet::GetOldestKeyPoolTime() +int64_t CWallet::GetOldestKeyPoolTime() { - int64 nIndex = 0; + int64_t nIndex = 0; CKeyPool keypool; ReserveKeyFromKeyPool(nIndex, keypool); if (nIndex == -1) @@ -2008,9 +2235,9 @@ int64 CWallet::GetOldestKeyPoolTime() return keypool.nTime; } -std::map CWallet::GetAddressBalances() +std::map CWallet::GetAddressBalances() { - map balances; + map balances; { LOCK(cs_wallet); @@ -2018,7 +2245,7 @@ std::map CWallet::GetAddressBalances() { CWalletTx *pcoin = &walletEntry.second; - if (!pcoin->IsFinal() || !pcoin->IsConfirmed()) + if (!pcoin->IsFinal() || !pcoin->IsTrusted()) continue; if ((pcoin->IsCoinBase() || pcoin->IsCoinStake()) && pcoin->GetBlocksToMaturity() > 0) @@ -2036,7 +2263,7 @@ std::map CWallet::GetAddressBalances() if(!ExtractDestination(pcoin->vout[i].scriptPubKey, addr)) continue; - int64 n = pcoin->IsSpent(i) ? 0 : pcoin->vout[i].nValue; + int64_t n = pcoin->IsSpent(i) ? 0 : pcoin->vout[i].nValue; if (!balances.count(addr)) balances[addr] = 0; @@ -2133,7 +2360,7 @@ set< set > CWallet::GetAddressGroupings() // triangles: check 'spent' consistency between wallet and txindex // triangles: fix wallet spent state according to txindex -void CWallet::FixSpentCoins(int& nMismatchFound, int64& nBalanceInQuestion, bool fCheckOnly) +void CWallet::FixSpentCoins(int& nMismatchFound, int64_t& nBalanceInQuestion, bool fCheckOnly) { nMismatchFound = 0; nBalanceInQuestion = 0; @@ -2155,7 +2382,7 @@ void CWallet::FixSpentCoins(int& nMismatchFound, int64& nBalanceInQuestion, bool { if (IsMine(pcoin->vout[n]) && pcoin->IsSpent(n) && (txindex.vSpent.size() <= n || txindex.vSpent[n].IsNull())) { - printf("FixSpentCoins found lost coin %sTRI %s[%d], %s\n", + printf("FixSpentCoins found lost coin %s TRI %s[%d], %s\n", FormatMoney(pcoin->vout[n].nValue).c_str(), pcoin->GetHash().ToString().c_str(), n, fCheckOnly? "repair not attempted" : "repairing"); nMismatchFound++; nBalanceInQuestion += pcoin->vout[n].nValue; @@ -2167,7 +2394,7 @@ void CWallet::FixSpentCoins(int& nMismatchFound, int64& nBalanceInQuestion, bool } else if (IsMine(pcoin->vout[n]) && !pcoin->IsSpent(n) && (txindex.vSpent.size() > n && !txindex.vSpent[n].IsNull())) { - printf("FixSpentCoins found spent coin %sTRI %s[%d], %s\n", + printf("FixSpentCoins found spent coin %s TRI %s[%d], %s\n", FormatMoney(pcoin->vout[n].nValue).c_str(), pcoin->GetHash().ToString().c_str(), n, fCheckOnly? "repair not attempted" : "repairing"); nMismatchFound++; nBalanceInQuestion += pcoin->vout[n].nValue; @@ -2237,14 +2464,14 @@ void CReserveKey::ReturnKey() vchPubKey = CPubKey(); } -void CWallet::GetAllReserveKeys(set& setAddress) +void CWallet::GetAllReserveKeys(set& setAddress) const { setAddress.clear(); CWalletDB walletdb(strWalletFile); LOCK2(cs_main, cs_wallet); - BOOST_FOREACH(const int64& id, setKeyPool) + BOOST_FOREACH(const int64_t& id, setKeyPool) { CKeyPool keypool; if (!walletdb.ReadPool(id, keypool)) @@ -2267,3 +2494,56 @@ void CWallet::UpdatedTransaction(const uint256 &hashTx) NotifyTransactionChanged(this, hashTx, CT_UPDATED); } } + +void CWallet::GetKeyBirthTimes(std::map &mapKeyBirth) const { + mapKeyBirth.clear(); + + // get birth times for keys with metadata + for (std::map::const_iterator it = mapKeyMetadata.begin(); it != mapKeyMetadata.end(); it++) + if (it->second.nCreateTime) + mapKeyBirth[it->first] = it->second.nCreateTime; + + // map in which we'll infer heights of other keys + CBlockIndex *pindexMax = FindBlockByHeight(std::max(0, nBestHeight - 144)); // the tip can be reorganised; use a 144-block safety margin + std::map mapKeyFirstBlock; + std::set setKeys; + GetKeys(setKeys); + BOOST_FOREACH(const CKeyID &keyid, setKeys) { + if (mapKeyBirth.count(keyid) == 0) + mapKeyFirstBlock[keyid] = pindexMax; + } + setKeys.clear(); + + // if there are no such keys, we're done + if (mapKeyFirstBlock.empty()) + return; + + // find first block that affects those keys, if there are any left + std::vector vAffected; + for (std::map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); it++) { + // iterate over all wallet transactions... + const CWalletTx &wtx = (*it).second; + std::map::const_iterator blit = mapBlockIndex.find(wtx.hashBlock); + if (blit != mapBlockIndex.end() && blit->second->IsInMainChain()) { + // ... which are already in a block + int nHeight = blit->second->nHeight; + BOOST_FOREACH(const CTxOut &txout, wtx.vout) { + // iterate over all their outputs + ::ExtractAffectedKeys(*this, txout.scriptPubKey, vAffected); + BOOST_FOREACH(const CKeyID &keyid, vAffected) { + // ... and all their affected keys + std::map::iterator rit = mapKeyFirstBlock.find(keyid); + if (rit != mapKeyFirstBlock.end() && nHeight < rit->second->nHeight) + rit->second = blit->second; + } + vAffected.clear(); + } + } + } + + // Extract block timestamps for those keys + for (std::map::const_iterator it = mapKeyFirstBlock.begin(); it != mapKeyFirstBlock.end(); it++) + mapKeyBirth[it->first] = it->second->nTime - 7200; // block times can be 2h off +} + + diff --git a/src/wallet.h b/src/wallet.h index 55e3a27..d5e382a 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_WALLET_H -#define BITCOIN_WALLET_H +#ifndef TRIANGLES_WALLET_H +#define TRIANGLES_WALLET_H #include #include @@ -17,14 +17,19 @@ #include "ui_interface.h" #include "util.h" #include "walletdb.h" +#include "smessage.h" -extern bool fWalletUnlockMintOnly; +extern bool fWalletUnlockStakingOnly; +extern bool fConfChange; class CAccountingEntry; class CWalletTx; class CReserveKey; class COutput; class CCoinControl; +//typedef std::map StealthKeyMetaMap; +typedef std::map mapValue_t; + /** (client) version numbers for particular wallet features */ enum WalletFeature { @@ -36,12 +41,11 @@ enum WalletFeature FEATURE_LATEST = 60000 }; - /** A key pool entry */ class CKeyPool { public: - int64 nTime; + int64_t nTime; CPubKey vchPubKey; CKeyPool() @@ -70,7 +74,8 @@ public: class CWallet : public CCryptoKeyStore { private: - bool SelectCoins(int64 nTargetValue, unsigned int nSpendTime, std::set >& setCoinsRet, int64& nValueRet, const CCoinControl *coinControl=NULL) const; + bool SelectCoinsSimple(int64_t nTargetValue, unsigned int nSpendTime, int nMinConf, std::set >& setCoinsRet, int64_t& nValueRet) const; + bool SelectCoins(int64_t nTargetValue, unsigned int nSpendTime, std::set >& setCoinsRet, int64_t& nValueRet, const CCoinControl *coinControl=NULL) const; CWalletDB *pwalletdbEncryption; @@ -86,7 +91,8 @@ public: bool fFileBacked; std::string strWalletFile; - std::set setKeyPool; + std::set setKeyPool; + std::map mapKeyMetadata; typedef std::map MasterKeyMap; @@ -114,18 +120,20 @@ public: } std::map mapWallet; - int64 nOrderPosNext; + int64_t nOrderPosNext; std::map mapRequestCount; std::map mapAddressBook; CPubKey vchDefaultKey; + int64_t nTimeFirstKey; // check whether we are allowed to upgrade (or already support) to the named feature bool CanSupportFeature(enum WalletFeature wf) { return nWalletMaxVersion >= wf; } + void AvailableCoinsMinConf(std::vector& vCoins, int nConf) const; void AvailableCoins(std::vector& vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl=NULL) const; - bool SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, int nConfMine, int nConfTheirs, std::vector vCoins, std::set >& setCoinsRet, int64& nValueRet) const; + bool SelectCoinsMinConf(int64_t nTargetValue, unsigned int nSpendTime, int nConfMine, int nConfTheirs, std::vector vCoins, std::set >& setCoinsRet, int64_t& nValueRet) const; // keystore implementation // Generate a new key CPubKey GenerateNewKey(); @@ -133,27 +141,33 @@ public: bool AddKey(const CKey& key); // Adds a key to the store, without saving it to disk (used by LoadWallet) bool LoadKey(const CKey& key) { return CCryptoKeyStore::AddKey(key); } + // Load metadata (used by LoadWallet) + bool LoadKeyMetadata(const CPubKey &pubkey, const CKeyMetadata &metadata); bool LoadMinVersion(int nVersion) { nWalletVersion = nVersion; nWalletMaxVersion = std::max(nWalletMaxVersion, nVersion); return true; } // Adds an encrypted key to the store, and saves it to disk. bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret); // Adds an encrypted key to the store, without saving it to disk (used by LoadWallet) - bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret) { SetMinVersion(FEATURE_WALLETCRYPT); return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret); } + bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret); bool AddCScript(const CScript& redeemScript); bool LoadCScript(const CScript& redeemScript) { return CCryptoKeyStore::AddCScript(redeemScript); } + bool Lock(); bool Unlock(const SecureString& strWalletPassphrase); bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase); bool EncryptWallet(const SecureString& strWalletPassphrase); + void GetKeyBirthTimes(std::map &mapKeyBirth) const; + + /** Increment the next transaction order id @return next transaction order id */ - int64 IncOrderPosNext(CWalletDB *pwalletdb = NULL); + int64_t IncOrderPosNext(CWalletDB *pwalletdb = NULL); typedef std::pair TxPair; - typedef std::multimap TxItems; + typedef std::multimap TxItems; /** Get the wallet's activity log @return multimap of ordered transactions and accounting entries @@ -165,51 +179,54 @@ public: bool AddToWallet(const CWalletTx& wtxIn); bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate = false, bool fFindBlock = false); bool EraseFromWallet(uint256 hash); - void WalletUpdateSpent(const CTransaction& prevout); + void WalletUpdateSpent(const CTransaction& prevout, bool fBlock = false); int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false); int ScanForWalletTransaction(const uint256& hashTx); void ReacceptWalletTransactions(); - void ResendWalletTransactions(); - int64 GetBalance() const; - int64 GetUnconfirmedBalance() const; - int64 GetImmatureBalance() const; - int64 GetStake() const; - int64 GetNewMint() const; - bool CreateTransaction(const std::vector >& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet, const CCoinControl *coinControl=NULL); - bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet, const CCoinControl *coinControl=NULL); + void ResendWalletTransactions(bool fForce = false); + int64_t GetBalance() const; + int64_t GetUnconfirmedBalance() const; + int64_t GetImmatureBalance() const; + int64_t GetStake() const; + int64_t GetNewMint() const; + bool CreateTransaction(const std::vector >& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, const CCoinControl *coinControl=NULL); + bool CreateTransaction(CScript scriptPubKey, int64_t nValue, std::string& sNarr, CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, const CCoinControl *coinControl=NULL); bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey); - bool GetStakeWeight(const CKeyStore& keystore, uint64& nMinWeight, uint64& nMaxWeight, uint64& nWeight); - bool CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64 nSearchInterval, CTransaction& txNew); - std::string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false); - std::string SendMoneyToDestination(const CTxDestination &address, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false); + + bool GetStakeWeight(const CKeyStore& keystore, uint64_t& nMinWeight, uint64_t& nMaxWeight, uint64_t& nWeight); + bool CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64_t nSearchInterval, int64_t nFees, CTransaction& txNew, CKey& key); + + std::string SendMoney(CScript scriptPubKey, int64_t nValue, std::string& sNarr, CWalletTx& wtxNew, bool fAskFee=false); + std::string SendMoneyToDestination(const CTxDestination& address, int64_t nValue, std::string& sNarr, CWalletTx& wtxNew, bool fAskFee=false); + bool NewKeyPool(); - bool TopUpKeyPool(); - int64 AddReserveKey(const CKeyPool& keypool); - void ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool); - void KeepKey(int64 nIndex); - void ReturnKey(int64 nIndex); + bool TopUpKeyPool(unsigned int nSize = 0); + int64_t AddReserveKey(const CKeyPool& keypool); + void ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool); + void KeepKey(int64_t nIndex); + void ReturnKey(int64_t nIndex); bool GetKeyFromPool(CPubKey &key, bool fAllowReuse=true); - int64 GetOldestKeyPoolTime(); - void GetAllReserveKeys(std::set& setAddress); + int64_t GetOldestKeyPoolTime(); + void GetAllReserveKeys(std::set& setAddress) const; std::set< std::set > GetAddressGroupings(); - std::map GetAddressBalances(); + std::map GetAddressBalances(); bool IsMine(const CTxIn& txin) const; - int64 GetDebit(const CTxIn& txin) const; + int64_t GetDebit(const CTxIn& txin) const; bool IsMine(const CTxOut& txout) const { return ::IsMine(*this, txout.scriptPubKey); } - int64 GetCredit(const CTxOut& txout) const + int64_t GetCredit(const CTxOut& txout) const { if (!MoneyRange(txout.nValue)) throw std::runtime_error("CWallet::GetCredit() : value out of range"); return (IsMine(txout) ? txout.nValue : 0); } bool IsChange(const CTxOut& txout) const; - int64 GetChange(const CTxOut& txout) const + int64_t GetChange(const CTxOut& txout) const { if (!MoneyRange(txout.nValue)) throw std::runtime_error("CWallet::GetChange() : value out of range"); @@ -218,7 +235,7 @@ public: bool IsMine(const CTransaction& tx) const { BOOST_FOREACH(const CTxOut& txout, tx.vout) - if (IsMine(txout)) + if (IsMine(txout) && txout.nValue >= nMinimumInputValue) return true; return false; } @@ -226,9 +243,9 @@ public: { return (GetDebit(tx) > 0); } - int64 GetDebit(const CTransaction& tx) const + int64_t GetDebit(const CTransaction& tx) const { - int64 nDebit = 0; + int64_t nDebit = 0; BOOST_FOREACH(const CTxIn& txin, tx.vin) { nDebit += GetDebit(txin); @@ -237,9 +254,9 @@ public: } return nDebit; } - int64 GetCredit(const CTransaction& tx) const + int64_t GetCredit(const CTransaction& tx) const { - int64 nCredit = 0; + int64_t nCredit = 0; BOOST_FOREACH(const CTxOut& txout, tx.vout) { nCredit += GetCredit(txout); @@ -248,9 +265,9 @@ public: } return nCredit; } - int64 GetChange(const CTransaction& tx) const + int64_t GetChange(const CTransaction& tx) const { - int64 nChange = 0; + int64_t nChange = 0; BOOST_FOREACH(const CTxOut& txout, tx.vout) { nChange += GetChange(txout); @@ -281,7 +298,7 @@ public: } } - int GetKeyPoolSize() + unsigned int GetKeyPoolSize() { return setKeyPool.size(); } @@ -299,7 +316,7 @@ public: // get the current wallet format (the oldest client version guaranteed to understand this wallet) int GetVersion() { return nWalletVersion; } - void FixSpentCoins(int& nMismatchSpent, int64& nBalanceInQuestion, bool fCheckOnly = false); + void FixSpentCoins(int& nMismatchSpent, int64_t& nBalanceInQuestion, bool fCheckOnly = false); void DisableTransaction(const CTransaction &tx); /** Address book entry changed. @@ -318,7 +335,7 @@ class CReserveKey { protected: CWallet* pwallet; - int64 nIndex; + int64_t nIndex; CPubKey vchPubKey; public: CReserveKey(CWallet* pwalletIn) @@ -342,7 +359,7 @@ public: typedef std::map mapValue_t; -static void ReadOrderPos(int64& nOrderPos, mapValue_t& mapValue) +static void ReadOrderPos(int64_t& nOrderPos, mapValue_t& mapValue) { if (!mapValue.count("n")) { @@ -353,7 +370,7 @@ static void ReadOrderPos(int64& nOrderPos, mapValue_t& mapValue) } -static void WriteOrderPos(const int64& nOrderPos, mapValue_t& mapValue) +static void WriteOrderPos(const int64_t& nOrderPos, mapValue_t& mapValue) { if (nOrderPos == -1) return; @@ -379,17 +396,17 @@ public: char fFromMe; std::string strFromAccount; std::vector vfSpent; // which outputs are already spent - int64 nOrderPos; // position in ordered transaction list + int64_t nOrderPos; // position in ordered transaction list // memory only mutable bool fDebitCached; mutable bool fCreditCached; mutable bool fAvailableCreditCached; mutable bool fChangeCached; - mutable int64 nDebitCached; - mutable int64 nCreditCached; - mutable int64 nAvailableCreditCached; - mutable int64 nChangeCached; + mutable int64_t nDebitCached; + mutable int64_t nCreditCached; + mutable int64_t nAvailableCreditCached; + mutable int64_t nChangeCached; CWalletTx() { @@ -559,7 +576,7 @@ public: return (!!vfSpent[nOut]); } - int64 GetDebit() const + int64_t GetDebit() const { if (vin.empty()) return 0; @@ -570,7 +587,7 @@ public: return nDebitCached; } - int64 GetCredit(bool fUseCache=true) const + int64_t GetCredit(bool fUseCache=true) const { // Must wait until coinbase is safely deep enough in the chain before valuing it if ((IsCoinBase() || IsCoinStake()) && GetBlocksToMaturity() > 0) @@ -584,7 +601,7 @@ public: return nCreditCached; } - int64 GetAvailableCredit(bool fUseCache=true) const + int64_t GetAvailableCredit(bool fUseCache=true) const { // Must wait until coinbase is safely deep enough in the chain before valuing it if ((IsCoinBase() || IsCoinStake()) && GetBlocksToMaturity() > 0) @@ -593,7 +610,7 @@ public: if (fUseCache && fAvailableCreditCached) return nAvailableCreditCached; - int64 nCredit = 0; + int64_t nCredit = 0; for (unsigned int i = 0; i < vout.size(); i++) { if (!IsSpent(i)) @@ -611,7 +628,7 @@ public: } - int64 GetChange() const + int64_t GetChange() const { if (fChangeCached) return nChangeCached; @@ -620,26 +637,29 @@ public: return nChangeCached; } - void GetAmounts(int64& nGeneratedImmature, int64& nGeneratedMature, std::list >& listReceived, - std::list >& listSent, int64& nFee, std::string& strSentAccount) const; + void GetAmounts(std::list >& listReceived, + std::list >& listSent, int64_t& nFee, std::string& strSentAccount) const; - void GetAccountAmounts(const std::string& strAccount, int64& nGeneratedImmature, int64& nGeneratedMature, int64& nReceived, - int64& nSent, int64& nFee) const; + void GetAccountAmounts(const std::string& strAccount, int64_t& nReceived, + int64_t& nSent, int64_t& nFee) const; bool IsFromMe() const { return (GetDebit() > 0); } - bool IsConfirmed() const + bool IsTrusted() const { // Quick answer in most cases if (!IsFinal()) return false; - //triangles fix: show balance as confirmed after 4 confirmations - if (GetDepthInMainChain() >= 4) + int nDepth = GetDepthInMainChain(); + //traingles fix: show as available balance after 4 confirmations (instead of after 1 confirmation) + if (nDepth >= 4) return true; - if (!IsFromMe()) // using wtx's cached debit + if (nDepth < 0) + return false; + if (fConfChange || !IsFromMe()) // using wtx's cached debit return false; // If no confirmations but it's from us, we can still @@ -654,8 +674,11 @@ public: if (!ptx->IsFinal()) return false; - if (ptx->GetDepthInMainChain() >= 1) + int nPDepth = ptx->GetDepthInMainChain(); + if (nPDepth >= 1) continue; + if (nPDepth < 0) + return false; if (!pwallet->IsFromMe(*ptx)) return false; @@ -672,12 +695,13 @@ public: vWorkQueue.push_back(mapPrev[txin.prevout.hash]); } } + return true; } bool WriteToDisk(); - int64 GetTxTime() const; + int64_t GetTxTime() const; int GetRequestCount() const; void AddSupportingTransactions(CTxDB& txdb); @@ -723,13 +747,13 @@ class CWalletKey { public: CPrivKey vchPrivKey; - int64 nTimeCreated; - int64 nTimeExpires; + int64_t nTimeCreated; + int64_t nTimeExpires; std::string strComment; //// todo: add something to note what created it (user, getnewaddress, change) //// maybe should have a map property map - CWalletKey(int64 nExpires=0) + CWalletKey(int64_t nExpires=0) { nTimeCreated = (nExpires ? GetTime() : 0); nTimeExpires = nExpires; @@ -786,13 +810,13 @@ class CAccountingEntry { public: std::string strAccount; - int64 nCreditDebit; - int64 nTime; + int64_t nCreditDebit; + int64_t nTime; std::string strOtherAccount; std::string strComment; mapValue_t mapValue; - int64 nOrderPos; // position in ordered transaction list - uint64 nEntryNo; + int64_t nOrderPos; // position in ordered transaction list + uint64_t nEntryNo; CAccountingEntry() { diff --git a/src/walletdb.cpp b/src/walletdb.cpp index ad24172..aed93ae 100644 --- a/src/walletdb.cpp +++ b/src/walletdb.cpp @@ -5,14 +5,15 @@ #include "walletdb.h" #include "wallet.h" +#include #include using namespace std; using namespace boost; -static uint64 nAccountingEntryNumber = 0; -extern bool fWalletUnlockMintOnly; +static uint64_t nAccountingEntryNumber = 0; +extern bool fWalletUnlockStakingOnly; // // CWalletDB @@ -43,7 +44,7 @@ bool CWalletDB::WriteAccount(const string& strAccount, const CAccount& account) return Write(make_pair(string("acc"), strAccount), account); } -bool CWalletDB::WriteAccountingEntry(const uint64 nAccEntryNum, const CAccountingEntry& acentry) +bool CWalletDB::WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccountingEntry& acentry) { return Write(boost::make_tuple(string("acentry"), acentry.strAccount, nAccEntryNum), acentry); } @@ -53,12 +54,12 @@ bool CWalletDB::WriteAccountingEntry(const CAccountingEntry& acentry) return WriteAccountingEntry(++nAccountingEntryNumber, acentry); } -int64 CWalletDB::GetAccountCreditDebit(const string& strAccount) +int64_t CWalletDB::GetAccountCreditDebit(const string& strAccount) { list entries; ListAccountCreditDebit(strAccount, entries); - int64 nCreditDebit = 0; + int64_t nCreditDebit = 0; BOOST_FOREACH (const CAccountingEntry& entry, entries) nCreditDebit += entry.nCreditDebit; @@ -73,12 +74,12 @@ void CWalletDB::ListAccountCreditDebit(const string& strAccount, list TxPair; - typedef multimap TxItems; + typedef multimap TxItems; TxItems txByTime; for (map::iterator it = pwallet->mapWallet.begin(); it != pwallet->mapWallet.end(); ++it) @@ -133,14 +134,14 @@ CWalletDB::ReorderTransactions(CWallet* pwallet) txByTime.insert(make_pair(entry.nTime, TxPair((CWalletTx*)0, &entry))); } - int64& nOrderPosNext = pwallet->nOrderPosNext; + int64_t& nOrderPosNext = pwallet->nOrderPosNext; nOrderPosNext = 0; - std::vector nOrderPosOffsets; + std::vector nOrderPosOffsets; for (TxItems::iterator it = txByTime.begin(); it != txByTime.end(); ++it) { CWalletTx *const pwtx = (*it).second.first; CAccountingEntry *const pacentry = (*it).second.second; - int64& nOrderPos = (pwtx != 0) ? pwtx->nOrderPos : pacentry->nOrderPos; + int64_t& nOrderPos = (pwtx != 0) ? pwtx->nOrderPos : pacentry->nOrderPos; if (nOrderPos == -1) { @@ -154,8 +155,8 @@ CWalletDB::ReorderTransactions(CWallet* pwallet) } else { - int64 nOrderPosOff = 0; - BOOST_FOREACH(const int64& nOffsetStart, nOrderPosOffsets) + int64_t nOrderPosOff = 0; + BOOST_FOREACH(const int64_t& nOffsetStart, nOrderPosOffsets) { if (nOrderPos >= nOffsetStart) ++nOrderPosOff; @@ -181,11 +182,27 @@ CWalletDB::ReorderTransactions(CWallet* pwallet) return DB_LOAD_OK; } +class CWalletScanState { +public: + unsigned int nKeys; + unsigned int nCKeys; + unsigned int nKeyMeta; + bool fIsEncrypted; + bool fAnyUnordered; + int nFileVersion; + vector vWalletUpgrade; + + CWalletScanState() { + nKeys = nCKeys = nKeyMeta = 0; + fIsEncrypted = false; + fAnyUnordered = false; + nFileVersion = 0; + } +}; bool ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, - int& nFileVersion, vector& vWalletUpgrade, - bool& fIsEncrypted, bool& fAnyUnordered, string& strType, string& strErr) + CWalletScanState &wss, string& strType, string& strErr) { try { // Unserialize @@ -196,7 +213,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, { string strAddress; ssKey >> strAddress; - ssValue >> pwallet->mapAddressBook[CBitcoinAddress(strAddress).Get()]; + ssValue >> pwallet->mapAddressBook[CTrianglesAddress(strAddress).Get()]; } else if (strType == "tx") { @@ -229,15 +246,15 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, strErr = strprintf("LoadWallet() repairing tx ver=%d %s", wtx.fTimeReceivedIsTxTime, hash.ToString().c_str()); wtx.fTimeReceivedIsTxTime = 0; } - vWalletUpgrade.push_back(hash); + wss.vWalletUpgrade.push_back(hash); } if (wtx.nOrderPos == -1) - fAnyUnordered = true; + wss.fAnyUnordered = true; //// debug print //printf("LoadWallet %s\n", wtx.GetHash().ToString().c_str()); - //printf(" %12"PRI64d" %s %s %s\n", + //printf(" %12"PRId64" %s %s %s\n", // wtx.vout[0].nValue, // DateTimeStrFormat("%x %H:%M:%S", wtx.GetBlockTime()).c_str(), // wtx.hashBlock.ToString().substr(0,20).c_str(), @@ -247,17 +264,17 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, { string strAccount; ssKey >> strAccount; - uint64 nNumber; + uint64_t nNumber; ssKey >> nNumber; if (nNumber > nAccountingEntryNumber) nAccountingEntryNumber = nNumber; - if (!fAnyUnordered) + if (!wss.fAnyUnordered) { CAccountingEntry acentry; ssValue >> acentry; if (acentry.nOrderPos == -1) - fAnyUnordered = true; + wss.fAnyUnordered = true; } } else if (strType == "key" || strType == "wkey") @@ -267,6 +284,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, CKey key; if (strType == "key") { + wss.nKeys++; CPrivKey pkey; ssValue >> pkey; key.SetPubKey(vchPubKey); @@ -330,6 +348,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, } else if (strType == "ckey") { + wss.nCKeys++; vector vchPubKey; ssKey >> vchPubKey; vector vchPrivKey; @@ -339,23 +358,48 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, strErr = "Error reading wallet database: LoadCryptedKey failed"; return false; } - fIsEncrypted = true; + wss.fIsEncrypted = true; } + else if (strType == "keymeta") + { + CPubKey vchPubKey; + ssKey >> vchPubKey; + CKeyMetadata keyMeta; + ssValue >> keyMeta; + wss.nKeyMeta++; + + pwallet->LoadKeyMetadata(vchPubKey, keyMeta); + + // find earliest key creation time, as wallet birthday + if (!pwallet->nTimeFirstKey || + (keyMeta.nCreateTime < pwallet->nTimeFirstKey)) + pwallet->nTimeFirstKey = keyMeta.nCreateTime; + } else if (strType == "defaultkey") { ssValue >> pwallet->vchDefaultKey; } else if (strType == "pool") { - int64 nIndex; + int64_t nIndex; ssKey >> nIndex; + CKeyPool keypool; + ssValue >> keypool; pwallet->setKeyPool.insert(nIndex); + + // If no metadata exists yet, create a default with the pool key's + // creation time. Note that this may be overwritten by actually + // stored metadata for that key later, which is fine. + CKeyID keyid = keypool.vchPubKey.GetID(); + if (pwallet->mapKeyMetadata.count(keyid) == 0) + pwallet->mapKeyMetadata[keyid] = CKeyMetadata(keypool.nTime); + } else if (strType == "version") { - ssValue >> nFileVersion; - if (nFileVersion == 10300) - nFileVersion = 300; + ssValue >> wss.nFileVersion; + if (wss.nFileVersion == 10300) + wss.nFileVersion = 300; } else if (strType == "cscript") { @@ -389,10 +433,7 @@ static bool IsKeyType(string strType) DBErrors CWalletDB::LoadWallet(CWallet* pwallet) { pwallet->vchDefaultKey = CPubKey(); - int nFileVersion = 0; - vector vWalletUpgrade; - bool fIsEncrypted = false; - bool fAnyUnordered = false; + CWalletScanState wss; bool fNoncriticalErrors = false; DBErrors result = DB_LOAD_OK; @@ -414,7 +455,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet) return DB_CORRUPT; } - loop + while (true) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); @@ -430,8 +471,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet) // Try to be tolerant of single corrupt records: string strType, strErr; - if (!ReadKeyValue(pwallet, ssKey, ssValue, nFileVersion, - vWalletUpgrade, fIsEncrypted, fAnyUnordered, strType, strErr)) + if (!ReadKeyValue(pwallet, ssKey, ssValue, wss, strType, strErr)) { // losing keys is considered a catastrophic error, anything else // we assume the user can live with: @@ -464,19 +504,27 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet) if (result != DB_LOAD_OK) return result; - printf("nFileVersion = %d\n", nFileVersion); + printf("nFileVersion = %d\n", wss.nFileVersion); - BOOST_FOREACH(uint256 hash, vWalletUpgrade) + printf("Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total\n", + wss.nKeys, wss.nCKeys, wss.nKeyMeta, wss.nKeys + wss.nCKeys); + + // nTimeFirstKey is only reliable if all keys have metadata + if ((wss.nKeys + wss.nCKeys) != wss.nKeyMeta) + pwallet->nTimeFirstKey = 1; // 0 would be considered 'no value' + + + BOOST_FOREACH(uint256 hash, wss.vWalletUpgrade) WriteTx(hash, pwallet->mapWallet[hash]); // Rewrite encrypted wallets of versions 0.4.0 and 0.5.0rc: - if (fIsEncrypted && (nFileVersion == 40000 || nFileVersion == 50000)) + if (wss.fIsEncrypted && (wss.nFileVersion == 40000 || wss.nFileVersion == 50000)) return DB_NEED_REWRITE; - if (nFileVersion < CLIENT_VERSION) // Update + if (wss.nFileVersion < CLIENT_VERSION) // Update WriteVersion(CLIENT_VERSION); - if (fAnyUnordered) + if (wss.fAnyUnordered) result = ReorderTransactions(pwallet); return result; @@ -485,7 +533,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet) void ThreadFlushWalletDB(void* parg) { // Make this thread recognisable as the wallet flushing thread - RenameThread("bitcoin-wallet"); + RenameThread("Triangles-wallet"); const string& strFile = ((const string*)parg)[0]; static bool fOneThread; @@ -497,10 +545,10 @@ void ThreadFlushWalletDB(void* parg) unsigned int nLastSeen = nWalletDBUpdated; unsigned int nLastFlushed = nWalletDBUpdated; - int64 nLastWalletUpdate = GetTime(); + int64_t nLastWalletUpdate = GetTime(); while (!fShutdown) { - Sleep(500); + MilliSleep(500); if (nLastSeen != nWalletDBUpdated) { @@ -529,14 +577,14 @@ void ThreadFlushWalletDB(void* parg) { printf("Flushing wallet.dat\n"); nLastFlushed = nWalletDBUpdated; - int64 nStart = GetTimeMillis(); + int64_t nStart = GetTimeMillis(); // Flush wallet.dat so it's self contained bitdb.CloseDb(strFile); bitdb.CheckpointLSN(strFile); bitdb.mapFileUseCount.erase(mi++); - printf("Flushed wallet.dat %"PRI64d"ms\n", GetTimeMillis() - nStart); + printf("Flushed wallet.dat %"PRId64"ms\n", GetTimeMillis() - nStart); } } } @@ -579,7 +627,7 @@ bool BackupWallet(const CWallet& wallet, const string& strDest) } } } - Sleep(100); + MilliSleep(100); } return false; } @@ -596,8 +644,8 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys) // Rewrite salvaged data to wallet.dat // Set -rescan so any missing transactions will be // found. - int64 now = GetTime(); - std::string newFilename = strprintf("wallet.%"PRI64d".bak", now); + int64_t now = GetTime(); + std::string newFilename = strprintf("wallet.%"PRId64".bak", now); int result = dbenv.dbenv.dbrename(NULL, filename.c_str(), NULL, newFilename.c_str(), DB_AUTO_COMMIT); @@ -632,10 +680,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys) return false; } CWallet dummyWallet; - int nFileVersion = 0; - vector vWalletUpgrade; - bool fIsEncrypted = false; - bool fAnyUnordered = false; + CWalletScanState wss; DbTxn* ptxn = dbenv.TxnBegin(); BOOST_FOREACH(CDBEnv::KeyValPair& row, salvagedData) @@ -646,9 +691,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys) CDataStream ssValue(row.second, SER_DISK, CLIENT_VERSION); string strType, strErr; bool fReadOK = ReadKeyValue(&dummyWallet, ssKey, ssValue, - nFileVersion, vWalletUpgrade, - fIsEncrypted, fAnyUnordered, - strType, strErr); + wss, strType, strErr); if (!IsKeyType(strType)) continue; if (!fReadOK) diff --git a/src/walletdb.h b/src/walletdb.h index a3e779a..221c8e1 100644 --- a/src/walletdb.h +++ b/src/walletdb.h @@ -2,8 +2,8 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_WALLETDB_H -#define BITCOIN_WALLETDB_H +#ifndef TRIANGLES_WALLETDB_H +#define TRIANGLES_WALLETDB_H #include "db.h" #include "base58.h" @@ -23,6 +23,39 @@ enum DBErrors DB_NEED_REWRITE }; +class CKeyMetadata +{ +public: + static const int CURRENT_VERSION=1; + int nVersion; + int64_t nCreateTime; // 0 means unknown + + CKeyMetadata() + { + SetNull(); + } + CKeyMetadata(int64_t nCreateTime_) + { + nVersion = CKeyMetadata::CURRENT_VERSION; + nCreateTime = nCreateTime_; + } + + IMPLEMENT_SERIALIZE + ( + READWRITE(this->nVersion); + nVersion = this->nVersion; + READWRITE(nCreateTime); + ) + + void SetNull() + { + nVersion = CKeyMetadata::CURRENT_VERSION; + nCreateTime = 0; + } +}; + + + /** Access to the wallet database (wallet.dat) */ class CWalletDB : public CDB { @@ -34,6 +67,30 @@ private: CWalletDB(const CWalletDB&); void operator=(const CWalletDB&); public: + Dbc* GetAtCursor() + { + return GetCursor(); + } + + Dbc* GetTxnCursor() + { + if (!pdb) + return NULL; + + DbTxn* ptxnid = activeTxn; // call TxnBegin first + + Dbc* pcursor = NULL; + int ret = pdb->cursor(ptxnid, &pcursor, 0); + if (ret != 0) + return NULL; + return pcursor; + } + + DbTxn* GetAtActiveTxn() + { + return activeTxn; + } + bool WriteName(const std::string& strAddress, const std::string& strName); bool EraseName(const std::string& strAddress); @@ -49,16 +106,24 @@ public: nWalletDBUpdated++; return Erase(std::make_pair(std::string("tx"), hash)); } - - bool WriteKey(const CPubKey& vchPubKey, const CPrivKey& vchPrivKey) + bool WriteKey(const CPubKey& vchPubKey, const CPrivKey& vchPrivKey, const CKeyMetadata &keyMeta) { nWalletDBUpdated++; + + if(!Write(std::make_pair(std::string("keymeta"), vchPubKey), keyMeta)) + return false; + return Write(std::make_pair(std::string("key"), vchPubKey.Raw()), vchPrivKey, false); } - bool WriteCryptedKey(const CPubKey& vchPubKey, const std::vector& vchCryptedSecret, bool fEraseUnencryptedKey = true) + bool WriteCryptedKey(const CPubKey& vchPubKey, const std::vector& vchCryptedSecret, const CKeyMetadata &keyMeta) { nWalletDBUpdated++; + bool fEraseUnencryptedKey = true; + + if(!Write(std::make_pair(std::string("keymeta"), vchPubKey), keyMeta)) + return false; + if (!Write(std::make_pair(std::string("ckey"), vchPubKey.Raw()), vchCryptedSecret, false)) return false; if (fEraseUnencryptedKey) @@ -92,7 +157,7 @@ public: return Read(std::string("bestblock"), locator); } - bool WriteOrderPosNext(int64 nOrderPosNext) + bool WriteOrderPosNext(int64_t nOrderPosNext) { nWalletDBUpdated++; return Write(std::string("orderposnext"), nOrderPosNext); @@ -104,18 +169,18 @@ public: return Write(std::string("defaultkey"), vchPubKey.Raw()); } - bool ReadPool(int64 nPool, CKeyPool& keypool) + bool ReadPool(int64_t nPool, CKeyPool& keypool) { return Read(std::make_pair(std::string("pool"), nPool), keypool); } - bool WritePool(int64 nPool, const CKeyPool& keypool) + bool WritePool(int64_t nPool, const CKeyPool& keypool) { nWalletDBUpdated++; return Write(std::make_pair(std::string("pool"), nPool), keypool); } - bool ErasePool(int64 nPool) + bool ErasePool(int64_t nPool) { nWalletDBUpdated++; return Erase(std::make_pair(std::string("pool"), nPool)); @@ -148,10 +213,10 @@ public: bool ReadAccount(const std::string& strAccount, CAccount& account); bool WriteAccount(const std::string& strAccount, const CAccount& account); private: - bool WriteAccountingEntry(const uint64 nAccEntryNum, const CAccountingEntry& acentry); + bool WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccountingEntry& acentry); public: bool WriteAccountingEntry(const CAccountingEntry& acentry); - int64 GetAccountCreditDebit(const std::string& strAccount); + int64_t GetAccountCreditDebit(const std::string& strAccount); void ListAccountCreditDebit(const std::string& strAccount, std::list& acentries); DBErrors ReorderTransactions(CWallet*); @@ -160,4 +225,4 @@ public: static bool Recover(CDBEnv& dbenv, std::string filename); }; -#endif // BITCOIN_WALLETDB_H +#endif // TRIANGLES_WALLETDB_H diff --git a/src/xxhash/xxhash.c b/src/xxhash/xxhash.c new file mode 100644 index 0000000..c55b339 --- /dev/null +++ b/src/xxhash/xxhash.c @@ -0,0 +1,476 @@ +/* +xxHash - Fast Hash algorithm +Copyright (C) 2012-2014, Yann Collet. +BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +You can contact the author at : +- xxHash source repository : http://code.google.com/p/xxhash/ +*/ + + +//************************************** +// Tuning parameters +//************************************** +// Unaligned memory access is automatically enabled for "common" CPU, such as x86. +// For others CPU, the compiler will be more cautious, and insert extra code to ensure aligned access is respected. +// If you know your target CPU supports unaligned memory access, you want to force this option manually to improve performance. +// You can also enable this parameter if you know your input data will always be aligned (boundaries of 4, for U32). +#if defined(__ARM_FEATURE_UNALIGNED) || defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) +# define XXH_USE_UNALIGNED_ACCESS 1 +#endif + +// XXH_ACCEPT_NULL_INPUT_POINTER : +// If the input pointer is a null pointer, xxHash default behavior is to trigger a memory access error, since it is a bad pointer. +// When this option is enabled, xxHash output for null input pointers will be the same as a null-length input. +// This option has a very small performance cost (only measurable on small inputs). +// By default, this option is disabled. To enable it, uncomment below define : +//#define XXH_ACCEPT_NULL_INPUT_POINTER 1 + +// XXH_FORCE_NATIVE_FORMAT : +// By default, xxHash library provides endian-independant Hash values, based on little-endian convention. +// Results are therefore identical for little-endian and big-endian CPU. +// This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format. +// Should endian-independance be of no importance for your application, you may set the #define below to 1. +// It will improve speed for Big-endian CPU. +// This option has no impact on Little_Endian CPU. +#define XXH_FORCE_NATIVE_FORMAT 0 + + +//************************************** +// Compiler Specific Options +//************************************** +// Disable some Visual warning messages +#ifdef _MSC_VER // Visual Studio +# pragma warning(disable : 4127) // disable: C4127: conditional expression is constant +#endif + +#ifdef _MSC_VER // Visual Studio +# define FORCE_INLINE static __forceinline +#else +# ifdef __GNUC__ +# define FORCE_INLINE static inline __attribute__((always_inline)) +# else +# define FORCE_INLINE static inline +# endif +#endif + + +//************************************** +// Includes & Memory related functions +//************************************** +#include "xxhash.h" +// Modify the local functions below should you wish to use some other memory related routines +// for malloc(), free() +#include +FORCE_INLINE void* XXH_malloc(size_t s) { return malloc(s); } +FORCE_INLINE void XXH_free (void* p) { free(p); } +// for memcpy() +#include +FORCE_INLINE void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); } + + +//************************************** +// Basic Types +//************************************** +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L // C99 +# include + typedef uint8_t BYTE; + typedef uint16_t U16; + typedef uint32_t U32; + typedef int32_t S32; + typedef uint64_t U64; +#else + typedef unsigned char BYTE; + typedef unsigned short U16; + typedef unsigned int U32; + typedef signed int S32; + typedef unsigned long long U64; +#endif + +#if defined(__GNUC__) && !defined(XXH_USE_UNALIGNED_ACCESS) +# define _PACKED_XXH __attribute__ ((packed)) +#else +# define _PACKED_XXH +#endif + +#if !defined(XXH_USE_UNALIGNED_ACCESS) && !defined(__GNUC__) +# ifdef __IBMC__ +# pragma pack(1) +# else +# pragma pack(push, 1) +# endif +#endif + + +typedef struct _U32_S { U32 v; } _PACKED_XXH U32_S_XXH; + +#if !defined(XXH_USE_UNALIGNED_ACCESS) && !defined(__GNUC__) +# pragma pack(pop) +#endif + +#define A32_XXH(x) (((U32_S_XXH *)(x))->v) + + +//*************************************** +// Compiler-specific Functions and Macros +//*************************************** +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +// Note : although _rotl exists for minGW (GCC under windows), performance seems poor +#if defined(_MSC_VER) +# define XXH_rotl32(x,r) _rotl(x,r) +#else +# define XXH_rotl32(x,r) ((x << r) | (x >> (32 - r))) +#endif + +#if defined(_MSC_VER) // Visual Studio +# define XXH_swap32 _byteswap_ulong +#elif GCC_VERSION >= 403 +# define XXH_swap32 __builtin_bswap32 +#else +static inline U32 XXH_swap32 (U32 x) { + return ((x << 24) & 0xff000000 ) | + ((x << 8) & 0x00ff0000 ) | + ((x >> 8) & 0x0000ff00 ) | + ((x >> 24) & 0x000000ff );} +#endif + + +//************************************** +// Constants +//************************************** +#define PRIME32_1 2654435761U +#define PRIME32_2 2246822519U +#define PRIME32_3 3266489917U +#define PRIME32_4 668265263U +#define PRIME32_5 374761393U + + +//************************************** +// Architecture Macros +//************************************** +typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess; +#ifndef XXH_CPU_LITTLE_ENDIAN // It is possible to define XXH_CPU_LITTLE_ENDIAN externally, for example using a compiler switch + static const int one = 1; +# define XXH_CPU_LITTLE_ENDIAN (*(char*)(&one)) +#endif + + +//************************************** +// Macros +//************************************** +#define XXH_STATIC_ASSERT(c) { enum { XXH_static_assert = 1/(!!(c)) }; } // use only *after* variable declarations + + +//**************************** +// Memory reads +//**************************** +typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment; + +FORCE_INLINE U32 XXH_readLE32_align(const U32* ptr, XXH_endianess endian, XXH_alignment align) +{ + if (align==XXH_unaligned) + return endian==XXH_littleEndian ? A32_XXH(ptr) : XXH_swap32(A32_XXH(ptr)); + else + return endian==XXH_littleEndian ? *ptr : XXH_swap32(*ptr); +} + +FORCE_INLINE U32 XXH_readLE32(const U32* ptr, XXH_endianess endian) { return XXH_readLE32_align(ptr, endian, XXH_unaligned); } + + +//**************************** +// Simple Hash Functions +//**************************** +FORCE_INLINE U32 XXH32_endian_align(const void* input, int len, U32 seed, XXH_endianess endian, XXH_alignment align) +{ + const BYTE* p = (const BYTE*)input; + const BYTE* const bEnd = p + len; + U32 h32; + +#ifdef XXH_ACCEPT_NULL_INPUT_POINTER + if (p==NULL) { len=0; p=(const BYTE*)(size_t)16; } +#endif + + if (len>=16) + { + const BYTE* const limit = bEnd - 16; + U32 v1 = seed + PRIME32_1 + PRIME32_2; + U32 v2 = seed + PRIME32_2; + U32 v3 = seed + 0; + U32 v4 = seed - PRIME32_1; + + do + { + v1 += XXH_readLE32_align((const U32*)p, endian, align) * PRIME32_2; v1 = XXH_rotl32(v1, 13); v1 *= PRIME32_1; p+=4; + v2 += XXH_readLE32_align((const U32*)p, endian, align) * PRIME32_2; v2 = XXH_rotl32(v2, 13); v2 *= PRIME32_1; p+=4; + v3 += XXH_readLE32_align((const U32*)p, endian, align) * PRIME32_2; v3 = XXH_rotl32(v3, 13); v3 *= PRIME32_1; p+=4; + v4 += XXH_readLE32_align((const U32*)p, endian, align) * PRIME32_2; v4 = XXH_rotl32(v4, 13); v4 *= PRIME32_1; p+=4; + } while (p<=limit); + + h32 = XXH_rotl32(v1, 1) + XXH_rotl32(v2, 7) + XXH_rotl32(v3, 12) + XXH_rotl32(v4, 18); + } + else + { + h32 = seed + PRIME32_5; + } + + h32 += (U32) len; + + while (p<=bEnd-4) + { + h32 += XXH_readLE32_align((const U32*)p, endian, align) * PRIME32_3; + h32 = XXH_rotl32(h32, 17) * PRIME32_4 ; + p+=4; + } + + while (p> 15; + h32 *= PRIME32_2; + h32 ^= h32 >> 13; + h32 *= PRIME32_3; + h32 ^= h32 >> 16; + + return h32; +} + + +U32 XXH32(const void* input, int len, U32 seed) +{ +#if 0 + // Simple version, good for code maintenance, but unfortunately slow for small inputs + void* state = XXH32_init(seed); + XXH32_update(state, input, len); + return XXH32_digest(state); +#else + XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + +# if !defined(XXH_USE_UNALIGNED_ACCESS) + if ((((size_t)input) & 3)) // Input is aligned, let's leverage the speed advantage + { + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH32_endian_align(input, len, seed, XXH_littleEndian, XXH_aligned); + else + return XXH32_endian_align(input, len, seed, XXH_bigEndian, XXH_aligned); + } +# endif + + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH32_endian_align(input, len, seed, XXH_littleEndian, XXH_unaligned); + else + return XXH32_endian_align(input, len, seed, XXH_bigEndian, XXH_unaligned); +#endif +} + + +//**************************** +// Advanced Hash Functions +//**************************** + +struct XXH_state32_t +{ + U64 total_len; + U32 seed; + U32 v1; + U32 v2; + U32 v3; + U32 v4; + int memsize; + char memory[16]; +}; + + +int XXH32_sizeofState() +{ + XXH_STATIC_ASSERT(XXH32_SIZEOFSTATE >= sizeof(struct XXH_state32_t)); // A compilation error here means XXH32_SIZEOFSTATE is not large enough + return sizeof(struct XXH_state32_t); +} + + +XXH_errorcode XXH32_resetState(void* state_in, U32 seed) +{ + struct XXH_state32_t * state = (struct XXH_state32_t *) state_in; + state->seed = seed; + state->v1 = seed + PRIME32_1 + PRIME32_2; + state->v2 = seed + PRIME32_2; + state->v3 = seed + 0; + state->v4 = seed - PRIME32_1; + state->total_len = 0; + state->memsize = 0; + return XXH_OK; +} + + +void* XXH32_init (U32 seed) +{ + void* state = XXH_malloc (sizeof(struct XXH_state32_t)); + XXH32_resetState(state, seed); + return state; +} + + +FORCE_INLINE XXH_errorcode XXH32_update_endian (void* state_in, const void* input, int len, XXH_endianess endian) +{ + struct XXH_state32_t * state = (struct XXH_state32_t *) state_in; + const BYTE* p = (const BYTE*)input; + const BYTE* const bEnd = p + len; + +#ifdef XXH_ACCEPT_NULL_INPUT_POINTER + if (input==NULL) return XXH_ERROR; +#endif + + state->total_len += len; + + if (state->memsize + len < 16) // fill in tmp buffer + { + XXH_memcpy(state->memory + state->memsize, input, len); + state->memsize += len; + return XXH_OK; + } + + if (state->memsize) // some data left from previous update + { + XXH_memcpy(state->memory + state->memsize, input, 16-state->memsize); + { + const U32* p32 = (const U32*)state->memory; + state->v1 += XXH_readLE32(p32, endian) * PRIME32_2; state->v1 = XXH_rotl32(state->v1, 13); state->v1 *= PRIME32_1; p32++; + state->v2 += XXH_readLE32(p32, endian) * PRIME32_2; state->v2 = XXH_rotl32(state->v2, 13); state->v2 *= PRIME32_1; p32++; + state->v3 += XXH_readLE32(p32, endian) * PRIME32_2; state->v3 = XXH_rotl32(state->v3, 13); state->v3 *= PRIME32_1; p32++; + state->v4 += XXH_readLE32(p32, endian) * PRIME32_2; state->v4 = XXH_rotl32(state->v4, 13); state->v4 *= PRIME32_1; p32++; + } + p += 16-state->memsize; + state->memsize = 0; + } + + if (p <= bEnd-16) + { + const BYTE* const limit = bEnd - 16; + U32 v1 = state->v1; + U32 v2 = state->v2; + U32 v3 = state->v3; + U32 v4 = state->v4; + + do + { + v1 += XXH_readLE32((const U32*)p, endian) * PRIME32_2; v1 = XXH_rotl32(v1, 13); v1 *= PRIME32_1; p+=4; + v2 += XXH_readLE32((const U32*)p, endian) * PRIME32_2; v2 = XXH_rotl32(v2, 13); v2 *= PRIME32_1; p+=4; + v3 += XXH_readLE32((const U32*)p, endian) * PRIME32_2; v3 = XXH_rotl32(v3, 13); v3 *= PRIME32_1; p+=4; + v4 += XXH_readLE32((const U32*)p, endian) * PRIME32_2; v4 = XXH_rotl32(v4, 13); v4 *= PRIME32_1; p+=4; + } while (p<=limit); + + state->v1 = v1; + state->v2 = v2; + state->v3 = v3; + state->v4 = v4; + } + + if (p < bEnd) + { + XXH_memcpy(state->memory, p, bEnd-p); + state->memsize = (int)(bEnd-p); + } + + return XXH_OK; +} + +XXH_errorcode XXH32_update (void* state_in, const void* input, int len) +{ + XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH32_update_endian(state_in, input, len, XXH_littleEndian); + else + return XXH32_update_endian(state_in, input, len, XXH_bigEndian); +} + + + +FORCE_INLINE U32 XXH32_intermediateDigest_endian (void* state_in, XXH_endianess endian) +{ + struct XXH_state32_t * state = (struct XXH_state32_t *) state_in; + const BYTE * p = (const BYTE*)state->memory; + BYTE* bEnd = (BYTE*)state->memory + state->memsize; + U32 h32; + + if (state->total_len >= 16) + { + h32 = XXH_rotl32(state->v1, 1) + XXH_rotl32(state->v2, 7) + XXH_rotl32(state->v3, 12) + XXH_rotl32(state->v4, 18); + } + else + { + h32 = state->seed + PRIME32_5; + } + + h32 += (U32) state->total_len; + + while (p<=bEnd-4) + { + h32 += XXH_readLE32((const U32*)p, endian) * PRIME32_3; + h32 = XXH_rotl32(h32, 17) * PRIME32_4; + p+=4; + } + + while (p> 15; + h32 *= PRIME32_2; + h32 ^= h32 >> 13; + h32 *= PRIME32_3; + h32 ^= h32 >> 16; + + return h32; +} + + +U32 XXH32_intermediateDigest (void* state_in) +{ + XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + + if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) + return XXH32_intermediateDigest_endian(state_in, XXH_littleEndian); + else + return XXH32_intermediateDigest_endian(state_in, XXH_bigEndian); +} + + +U32 XXH32_digest (void* state_in) +{ + U32 h32 = XXH32_intermediateDigest(state_in); + + XXH_free(state_in); + + return h32; +} diff --git a/src/xxhash/xxhash.h b/src/xxhash/xxhash.h new file mode 100644 index 0000000..8491099 --- /dev/null +++ b/src/xxhash/xxhash.h @@ -0,0 +1,164 @@ +/* + xxHash - Fast Hash algorithm + Header File + Copyright (C) 2012-2014, Yann Collet. + BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + You can contact the author at : + - xxHash source repository : http://code.google.com/p/xxhash/ +*/ + +/* Notice extracted from xxHash homepage : + +xxHash is an extremely fast Hash algorithm, running at RAM speed limits. +It also successfully passes all tests from the SMHasher suite. + +Comparison (single thread, Windows Seven 32 bits, using SMHasher on a Core 2 Duo @3GHz) + +Name Speed Q.Score Author +xxHash 5.4 GB/s 10 +CrapWow 3.2 GB/s 2 Andrew +MumurHash 3a 2.7 GB/s 10 Austin Appleby +SpookyHash 2.0 GB/s 10 Bob Jenkins +SBox 1.4 GB/s 9 Bret Mulvey +Lookup3 1.2 GB/s 9 Bob Jenkins +SuperFastHash 1.2 GB/s 1 Paul Hsieh +CityHash64 1.05 GB/s 10 Pike & Alakuijala +FNV 0.55 GB/s 5 Fowler, Noll, Vo +CRC32 0.43 GB/s 9 +MD5-32 0.33 GB/s 10 Ronald L. Rivest +SHA1-32 0.28 GB/s 10 + +Q.Score is a measure of quality of the hash function. +It depends on successfully passing SMHasher test set. +10 is a perfect score. +*/ + +#pragma once + +#if defined (__cplusplus) +extern "C" { +#endif + + +//**************************** +// Type +//**************************** +typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode; + + + +//**************************** +// Simple Hash Functions +//**************************** + +unsigned int XXH32 (const void* input, int len, unsigned int seed); + +/* +XXH32() : + Calculate the 32-bits hash of sequence of length "len" stored at memory address "input". + The memory between input & input+len must be valid (allocated and read-accessible). + "seed" can be used to alter the result predictably. + This function successfully passes all SMHasher tests. + Speed on Core 2 Duo @ 3 GHz (single thread, SMHasher benchmark) : 5.4 GB/s + Note that "len" is type "int", which means it is limited to 2^31-1. + If your data is larger, use the advanced functions below. +*/ + + + +//**************************** +// Advanced Hash Functions +//**************************** + +void* XXH32_init (unsigned int seed); +XXH_errorcode XXH32_update (void* state, const void* input, int len); +unsigned int XXH32_digest (void* state); + +/* +These functions calculate the xxhash of an input provided in several small packets, +as opposed to an input provided as a single block. + +It must be started with : +void* XXH32_init() +The function returns a pointer which holds the state of calculation. + +This pointer must be provided as "void* state" parameter for XXH32_update(). +XXH32_update() can be called as many times as necessary. +The user must provide a valid (allocated) input. +The function returns an error code, with 0 meaning OK, and any other value meaning there is an error. +Note that "len" is type "int", which means it is limited to 2^31-1. +If your data is larger, it is recommended to chunk your data into blocks +of size for example 2^30 (1GB) to avoid any "int" overflow issue. + +Finally, you can end the calculation anytime, by using XXH32_digest(). +This function returns the final 32-bits hash. +You must provide the same "void* state" parameter created by XXH32_init(). +Memory will be freed by XXH32_digest(). +*/ + + +int XXH32_sizeofState(void); +XXH_errorcode XXH32_resetState(void* state, unsigned int seed); + +#define XXH32_SIZEOFSTATE 48 +typedef struct { long long ll[(XXH32_SIZEOFSTATE+(sizeof(long long)-1))/sizeof(long long)]; } XXH32_stateSpace_t; +/* +These functions allow user application to make its own allocation for state. + +XXH32_sizeofState() is used to know how much space must be allocated for the xxHash 32-bits state. +Note that the state must be aligned to access 'long long' fields. Memory must be allocated and referenced by a pointer. +This pointer must then be provided as 'state' into XXH32_resetState(), which initializes the state. + +For static allocation purposes (such as allocation on stack, or freestanding systems without malloc()), +use the structure XXH32_stateSpace_t, which will ensure that memory space is large enough and correctly aligned to access 'long long' fields. +*/ + + +unsigned int XXH32_intermediateDigest (void* state); +/* +This function does the same as XXH32_digest(), generating a 32-bit hash, +but preserve memory context. +This way, it becomes possible to generate intermediate hashes, and then continue feeding data with XXH32_update(). +To free memory context, use XXH32_digest(), or free(). +*/ + + + +//**************************** +// Deprecated function names +//**************************** +// The following translations are provided to ease code transition +// You are encouraged to no longer this function names +#define XXH32_feed XXH32_update +#define XXH32_result XXH32_digest +#define XXH32_getIntermediateResult XXH32_intermediateDigest + + + +#if defined (__cplusplus) +} +#endif diff --git a/triangles-qt.pro b/triangles-qt.pro index 9da2b25..de4fb7a 100644 --- a/triangles-qt.pro +++ b/triangles-qt.pro @@ -1,15 +1,46 @@ TEMPLATE = app TARGET = triangles-qt -VERSION = 3.3.4.4 -INCLUDEPATH += src src/json src/qt src/tor + +VERSION = 4.0.0.4 +INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN __NO_SYSTEM_INCLUDES CONFIG += no_include_pwd -CONFIG += thread+ -QT += gui core network +CONFIG += thread +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +lessThan(QT_MAJOR_VERSION, 5): CONFIG += static +QMAKE_CXXFLAGS = -fpermissive + +greaterThan(QT_MAJOR_VERSION, 4) { + QT += widgets + DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 +} # UNCOMMENT THIS SECTION TO BUILD ON WINDOWS -# Change paths if needed, these use the foocoin/deps.git repository locations +#win32 { +# BOOST_LIB_SUFFIX=-mgw48-mt-s-1_55 +# BOOST_INCLUDE_PATH=C:/Qt/deps/boost_1_55_0 +# BOOST_LIB_PATH=C:/Qt/deps/boost_1_55_0/stage/lib +# BDB_INCLUDE_PATH=C:/Qt/deps/db-4.8.30.NC/build_unix +# BDB_LIB_PATH=C:/Qt/deps/db-4.8.30.NC/build_unix +# OPENSSL_INCLUDE_PATH=C:/Qt/deps/openssl-1.0.1i/dist/include +# OPENSSL_LIB_PATH=C:/Qt/deps/openssl-1.0.1i/dist/lib +# MINIUPNPC_INCLUDE_PATH=C:/Qt/deps/miniupnpc +# MINIUPNPC_LIB_PATH=C:/Qt/deps/miniupnpc/miniupnpc +# #QRENCODE_INCLUDE_PATH=C:/Qt/deps/mingw_482/qrencode-3.4.3 +# #QRENCODE_LIB_PATH=C:Qt/deps/mingw_482/qrencode-3.4.3/.libs +# EVENT_INCLUDE_PATH=C:/Qt/deps/libevent-2.0.21-stable/include +# EVENT_LIB_PATH=C:/Qt/deps/libevent-2.0.21-stable/.libs +#} +# for boost 1.37, add -mt to the boost libraries +# use: qmake BOOST_LIB_SUFFIX=-mt +# for boost thread win32 with _win32 sufix +# use: BOOST_THREAD_LIB_SUFFIX=_win32-... +# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8 + +# Dependency library locations can be customized with: +# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH, +# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively OBJECTS_DIR = build MOC_DIR = build @@ -18,7 +49,7 @@ UI_DIR = build # use: qmake "RELEASE=1" contains(RELEASE, 1) { # Mac: compile for maximum compatibility (10.5, 32-bit) - macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk + macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk !windows:!macx { # Linux: static link @@ -34,7 +65,9 @@ QMAKE_LFLAGS *= -fstack-protector-all --param ssp-buffer-size=1 # This can be enabled for Windows, when we switch to MinGW >= 4.4.x. } # for extra security on Windows: enable ASLR and DEP via GCC linker flags -win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat +win32:QMAKE_LFLAGS *= -Wl,--large-address-aware -static +win32:QMAKE_LFLAGS += -static-libgcc -static-libstdc++ +lessThan(QT_MAJOR_VERSION, 5): win32: QMAKE_LFLAGS *= -static # use: qmake "USE_QRCODE=1" # libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support @@ -44,6 +77,7 @@ contains(USE_QRCODE, 1) { LIBS += -lqrencode } +#triangles: use UPNP with TOR USE_UPNP=1 # use: qmake "USE_UPNP=1" ( enabled by default; default) # or: qmake "USE_UPNP=0" (disabled by default) @@ -70,23 +104,59 @@ contains(USE_DBUS, 1) { QT += dbus } -# use: qmake "FIRST_CLASS_MESSAGING=1" -contains(FIRST_CLASS_MESSAGING, 1) { - message(Building with first-class messaging) - DEFINES += FIRST_CLASS_MESSAGING +# use: qmake "USE_IPV6=1" ( enabled by default; default) +# or: qmake "USE_IPV6=0" (disabled by default) +# or: qmake "USE_IPV6=-" (not supported) +contains(USE_IPV6, -) { + message(Building without IPv6 support) +} else { + count(USE_IPV6, 0) { + USE_IPV6=1 + } + DEFINES += USE_IPV6=$$USE_IPV6 } -contains(BITCOIN_NEED_QT_PLUGINS, 1) { - DEFINES += BITCOIN_NEED_QT_PLUGINS +contains(TRIANGLES_NEED_QT_PLUGINS, 1) { + DEFINES += TRIANGLES_NEED_QT_PLUGINS QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets } +INCLUDEPATH += src/leveldb/include src/leveldb/helpers +LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a +SOURCES += src/txdb-leveldb.cpp \ + src/blake.c \ + src/groestl.c \ + src/jh.c \ + src/keccak.c \ + src/skein.c \ + src/aes_helper.c \ + src/bmw.c \ + src/cubehash.c \ + src/echo.c \ + src/fugue.c \ + src/hamsi.c \ + src/hamsi_helper.c \ + src/luffa.c \ + src/shavite.c \ + src/simd.c + !win32 { - # for extra security against potential buffer overflows - QMAKE_CXXFLAGS += -fstack-protector - QMAKE_LFLAGS += -fstack-protector - # do not enable this on windows, as it will result in a non-working executable! + # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences + genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a +} else { + # make an educated guess about what the ranlib command is called + isEmpty(QMAKE_RANLIB) { + QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) + } + LIBS += -lshlwapi + genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a } +genleveldb.target = $$PWD/src/leveldb/libleveldb.a +genleveldb.depends = FORCE +PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a +QMAKE_EXTRA_TARGETS += genleveldb +# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it. +QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean # regenerate src/build.h !windows|contains(USE_BUILD_INFO, 1) { @@ -98,43 +168,64 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) { DEFINES += HAVE_BUILD_INFO } -QMAKE_CXXFLAGS += -msse2 -QMAKE_CFLAGS += -msse2 -QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector +contains(USE_O3, 1) { + message(Building O3 optimization flag) + QMAKE_CXXFLAGS_RELEASE -= -O2 + QMAKE_CFLAGS_RELEASE -= -O2 + QMAKE_CXXFLAGS += -O3 + QMAKE_CFLAGS += -O3 +} + + + #QMAKE_CXXFLAGS += -msse2 + #QMAKE_CFLAGS += -msse2 + +win32-g++ { + message("32 platform, adding -msse2 flag") + + QMAKE_CXXFLAGS += -msse2 + QMAKE_CFLAGS += -msse2 +} + +QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector + # Input DEPENDPATH += src src/json src/qt -HEADERS += src/qt/bitcoingui.h \ +HEADERS += src/qt/trianglesgui.h \ src/qt/transactiontablemodel.h \ src/qt/addresstablemodel.h \ src/qt/optionsdialog.h \ - src/qt/coincontroldialog.h \ + src/qt/coincontroldialog.h \ src/qt/coincontroltreewidget.h \ src/qt/sendcoinsdialog.h \ src/qt/addressbookpage.h \ src/qt/signverifymessagedialog.h \ src/qt/aboutdialog.h \ src/qt/editaddressdialog.h \ - src/qt/bitcoinaddressvalidator.h \ + src/qt/trianglesaddressvalidator.h \ src/alert.h \ src/addrman.h \ src/base58.h \ src/bignum.h \ src/checkpoints.h \ src/compat.h \ - src/coincontrol.h \ + src/coincontrol.h \ src/sync.h \ src/util.h \ src/uint256.h \ src/kernel.h \ - src/scrypt_mine.h \ + src/scrypt.h \ src/pbkdf2.h \ src/serialize.h \ src/strlcpy.h \ + src/smessage.h \ src/main.h \ + src/miner.h \ src/net.h \ src/key.h \ src/db.h \ + src/txdb.h \ src/walletdb.h \ src/script.h \ src/init.h \ @@ -157,19 +248,19 @@ HEADERS += src/qt/bitcoingui.h \ src/qt/monitoreddatamapper.h \ src/qt/transactiondesc.h \ src/qt/transactiondescdialog.h \ - src/qt/bitcoinamountfield.h \ + src/qt/trianglesamountfield.h \ src/wallet.h \ src/keystore.h \ src/qt/transactionfilterproxy.h \ src/qt/transactionview.h \ src/qt/walletmodel.h \ - src/bitcoinrpc.h \ + src/trianglesrpc.h \ src/qt/overviewpage.h \ src/qt/csvmodelwriter.h \ src/crypter.h \ src/qt/sendcoinsentry.h \ src/qt/qvalidatedlineedit.h \ - src/qt/bitcoinunits.h \ + src/qt/trianglesunits.h \ src/qt/qvaluecombobox.h \ src/qt/askpassphrasedialog.h \ src/protocol.h \ @@ -183,32 +274,40 @@ HEADERS += src/qt/bitcoingui.h \ src/clientversion.h \ src/hashblock.h \ src/sph_blake.h \ - src/sph_bmw.h \ - src/sph_cubehash.h \ - src/sph_echo.h \ src/sph_groestl.h \ src/sph_jh.h \ src/sph_keccak.h \ - src/sph_luffa.h \ - src/sph_shavite.h \ - src/sph_simd.h \ src/sph_skein.h \ + src/sph_types.h \ + src/qt/messagepage.h \ + src/qt/messagemodel.h \ + src/qt/sendmessagesdialog.h \ + src/qt/sendmessagesentry.h \ + src/qt/plugins/mrichtexteditor/mrichtextedit.h \ + src/qt/qvalidatedtextedit.h \ + src/txdb-leveldb.h \ + src/onionseed.h \ + src/sph_bmw.h \ + src/sph_cubehash.h \ + src/sph_echo.h \ src/sph_fugue.h \ src/sph_hamsi.h \ - src/sph_types.h \ + src/sph_luffa.h \ + src/sph_shavite.h \ + src/sph_simd.h -SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \ +SOURCES += src/qt/triangles.cpp src/qt/trianglesgui.cpp \ src/qt/transactiontablemodel.cpp \ src/qt/addresstablemodel.cpp \ src/qt/optionsdialog.cpp \ src/qt/sendcoinsdialog.cpp \ - src/qt/coincontroldialog.cpp \ + src/qt/coincontroldialog.cpp \ src/qt/coincontroltreewidget.cpp \ src/qt/addressbookpage.cpp \ src/qt/signverifymessagedialog.cpp \ src/qt/aboutdialog.cpp \ src/qt/editaddressdialog.cpp \ - src/qt/bitcoinaddressvalidator.cpp \ + src/qt/trianglesaddressvalidator.cpp \ src/tor/address.c \ src/tor/addressmap.c \ src/tor/aes.c \ @@ -289,11 +388,13 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \ src/alert.cpp \ src/version.cpp \ src/sync.cpp \ + src/smessage.cpp \ src/util.cpp \ src/netbase.cpp \ src/key.cpp \ src/script.cpp \ src/main.cpp \ + src/miner.cpp \ src/init.cpp \ src/net.cpp \ src/irc.cpp \ @@ -308,60 +409,52 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \ src/qt/monitoreddatamapper.cpp \ src/qt/transactiondesc.cpp \ src/qt/transactiondescdialog.cpp \ - src/qt/bitcoinstrings.cpp \ - src/qt/bitcoinamountfield.cpp \ + src/qt/trianglesstrings.cpp \ + src/qt/trianglesamountfield.cpp \ src/wallet.cpp \ src/keystore.cpp \ src/qt/transactionfilterproxy.cpp \ src/qt/transactionview.cpp \ src/qt/walletmodel.cpp \ - src/bitcoinrpc.cpp \ + src/trianglesrpc.cpp \ src/rpcdump.cpp \ src/rpcnet.cpp \ src/rpcmining.cpp \ src/rpcwallet.cpp \ src/rpcblockchain.cpp \ src/rpcrawtransaction.cpp \ + src/rpcsmessage.cpp \ src/qt/overviewpage.cpp \ src/qt/csvmodelwriter.cpp \ src/crypter.cpp \ src/qt/sendcoinsentry.cpp \ src/qt/qvalidatedlineedit.cpp \ - src/qt/bitcoinunits.cpp \ + src/qt/trianglesunits.cpp \ src/qt/qvaluecombobox.cpp \ src/qt/askpassphrasedialog.cpp \ src/protocol.cpp \ src/qt/notificator.cpp \ src/qt/qtipcserver.cpp \ src/qt/rpcconsole.cpp \ + src/qt/messagepage.cpp \ + src/qt/messagemodel.cpp \ + src/qt/sendmessagesdialog.cpp \ + src/qt/sendmessagesentry.cpp \ + src/qt/qvalidatedtextedit.cpp \ + src/qt/plugins/mrichtexteditor/mrichtextedit.cpp \ src/noui.cpp \ src/kernel.cpp \ src/scrypt-arm.S \ src/scrypt-x86.S \ src/scrypt-x86_64.S \ - src/scrypt_mine.cpp \ - src/pbkdf2.cpp \ - src/aes_helper.c \ - src/blake.c \ - src/bmw.c \ - src/cubehash.c \ - src/echo.c \ - src/groestl.c \ - src/jh.c \ - src/keccak.c \ - src/luffa.c \ - src/shavite.c \ - src/simd.c \ - src/skein.c \ - src/fugue.c \ - src/hamsi.c \ - src/scrypt.cpp + src/scrypt.cpp \ + src/pbkdf2.cpp RESOURCES += \ - src/qt/bitcoin.qrc + src/qt/triangles.qrc FORMS += \ - src/qt/forms/coincontroldialog.ui \ + src/qt/forms/coincontroldialog.ui \ src/qt/forms/sendcoinsdialog.ui \ src/qt/forms/addressbookpage.ui \ src/qt/forms/signverifymessagedialog.ui \ @@ -372,7 +465,11 @@ FORMS += \ src/qt/forms/sendcoinsentry.ui \ src/qt/forms/askpassphrasedialog.ui \ src/qt/forms/rpcconsole.ui \ - src/qt/forms/optionsdialog.ui + src/qt/forms/optionsdialog.ui \ + src/qt/forms/messagepage.ui \ + src/qt/forms/sendmessagesentry.ui \ + src/qt/forms/sendmessagesdialog.ui \ + src/qt/plugins/mrichtexteditor/mrichtextedit.ui contains(USE_QRCODE, 1) { HEADERS += src/qt/qrcodedialog.h @@ -380,21 +477,11 @@ SOURCES += src/qt/qrcodedialog.cpp FORMS += src/qt/forms/qrcodedialog.ui } -contains(BITCOIN_QT_TEST, 1) { -SOURCES += src/qt/test/test_main.cpp \ - src/qt/test/uritests.cpp -HEADERS += src/qt/test/uritests.h -DEPENDPATH += src/qt/test -QT += testlib -TARGET = triangles-qt_test -DEFINES += BITCOIN_QT_TEST -} - CODECFORTR = UTF-8 # for lrelease/lupdate -# also add new translations to src/qt/bitcoin.qrc under translations/ -TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts) +# also add new translations to src/qt/triangles.qrc under translations/ +TRANSLATIONS = $$files(src/qt/locale/triangles_*.ts) isEmpty(QMAKE_LRELEASE) { win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe @@ -411,12 +498,12 @@ QMAKE_EXTRA_COMPILERS += TSQM # "Other files" to show in Qt Creator OTHER_FILES += \ - doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt.rc src/test/*.cpp src/test/*.h src/qt/test/*.cpp src/qt/test/*.h + doc/*.rst doc/*.txt doc/README README.md res/triangles-qt.rc # platform specific defaults, if not overridden on command line isEmpty(BOOST_LIB_SUFFIX) { macx:BOOST_LIB_SUFFIX = -mt - windows:BOOST_LIB_SUFFIX = -mgw44-mt-s-1_55 + windows:BOOST_LIB_SUFFIX = -mgw48-mt-s-1_550 } isEmpty(BOOST_THREAD_LIB_SUFFIX) { @@ -444,7 +531,7 @@ isEmpty(BOOST_INCLUDE_PATH) { } windows:DEFINES += WIN32 -windows:RC_FILE = src/qt/res/bitcoin-qt.rc +windows:RC_FILE = src/qt/res/triangles-qt.rc windows:!contains(MINGW_THREAD_BUGFIX, 0) { # At least qmake's win32-g++-cross profile is missing the -lmingwthrd @@ -466,16 +553,28 @@ macx:HEADERS += src/qt/macdockiconhandler.hh macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 -macx:ICON = src/qt/res/icons/bitcoin.icns -macx:TARGET = "triangles-qt" +macx:ICON = src/qt/res/icons/triangles.icns +macx:TARGET = "Triangles-Qt" macx:QMAKE_CFLAGS_THREAD += -pthread macx:QMAKE_LFLAGS_THREAD += -pthread macx:QMAKE_CXXFLAGS_THREAD += -pthread # Set libraries and includes at end, to use platform-defined defaults if not overridden -INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH -LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,) -LIBS += -lssl -levent -lz -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX +#$$join(ADDITIONAL_LIBS_PATH,,-L,) +INCLUDEPATH += $$BOOST_INCLUDE_PATH \ + $$BDB_INCLUDE_PATH \ + $$OPENSSL_INCLUDE_PATH \ + #$$QRENCODE_INCLUDE_PATH \ + $$EVENT_INCLUDE_PATH + +LIBS += $$join(BOOST_LIB_PATH,,-L,) \ + $$join(BDB_LIB_PATH,,-L,) \ + $$join(OPENSSL_LIB_PATH,,-L,) \ + #$$join(QRENCODE_LIB_PATH,,-L,) \ + $$join(EVENT_LIB_PATH,,-L,) + +LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX +LIBS += -levent -lz # -lgdi32 has to happen after -lcrypto (see #681) windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX diff --git a/win32_mxe_crosscompile_triangles-qt.pro b/win32_mxe_crosscompile_triangles-qt.pro new file mode 100644 index 0000000..79ef271 --- /dev/null +++ b/win32_mxe_crosscompile_triangles-qt.pro @@ -0,0 +1,580 @@ +TEMPLATE = app +TARGET = triangles-qt + +VERSION = 4.0.0.4 +INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor +DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN __NO_SYSTEM_INCLUDES +CONFIG += no_include_pwd +CONFIG += thread +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +lessThan(QT_MAJOR_VERSION, 5): CONFIG += static +QMAKE_CXXFLAGS = -fpermissive + +greaterThan(QT_MAJOR_VERSION, 4) { + QT += widgets + DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 +} + +#INCLUDEPATH += /usr/include/i386-linux-gnu +INCLUDEPATH += /opt/mxe/usr/i686-pc-mingw32.static/include +LIBS_PATH=/opt/mxe/usr/i686-pc-mingw32.static/lib +LIBS += $$join(LIBS_PATH,,-L,) + +# for boost 1.37, add -mt to the boost libraries +# use: qmake BOOST_LIB_SUFFIX=-mt +# for boost thread win32 with _win32 sufix +# use: BOOST_THREAD_LIB_SUFFIX=_win32-... +# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8 + +# Dependency library locations can be customized with: +# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH, +# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively + +OBJECTS_DIR = build +MOC_DIR = build +UI_DIR = build + +# use: qmake "RELEASE=1" +contains(RELEASE, 1) { + # Mac: compile for maximum compatibility (10.5, 32-bit) + macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk + + !windows:!macx { + # Linux: static link + LIBS += -Wl,-Bstatic + } +} + +!win32 { +# for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection +QMAKE_CXXFLAGS *= -fstack-protector-all --param ssp-buffer-size=1 +QMAKE_LFLAGS *= -fstack-protector-all --param ssp-buffer-size=1 +# We need to exclude this for Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable! +# This can be enabled for Windows, when we switch to MinGW >= 4.4.x. +} +# for extra security on Windows: enable ASLR and DEP via GCC linker flags +win32:QMAKE_LFLAGS *= -Wl,--large-address-aware -static +win32:QMAKE_LFLAGS += -static-libgcc -static-libstdc++ +lessThan(QT_MAJOR_VERSION, 5): win32: QMAKE_LFLAGS *= -static + +# use: qmake "USE_QRCODE=1" +# libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support +contains(USE_QRCODE, 1) { + message(Building with QRCode support) + DEFINES += USE_QRCODE + LIBS += -lqrencode +} + +#triangles: use UPNP with TOR +USE_UPNP=1 +# use: qmake "USE_UPNP=1" ( enabled by default; default) +# or: qmake "USE_UPNP=0" (disabled by default) +# or: qmake "USE_UPNP=-" (not supported) +# miniupnpc (http://miniupnp.free.fr/files/) must be installed for support +contains(USE_UPNP, -) { + message(Building without UPNP support) +} else { + message(Building with UPNP support) + count(USE_UPNP, 0) { + USE_UPNP=1 + } + DEFINES += USE_UPNP=$$USE_UPNP STATICLIB + INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH + LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc + win32:LIBS += -liphlpapi +} + + +# use: qmake "USE_DBUS=1" +contains(USE_DBUS, 1) { + message(Building with DBUS (Freedesktop notifications) support) + DEFINES += USE_DBUS + QT += dbus +} + +# use: qmake "USE_IPV6=1" ( enabled by default; default) +# or: qmake "USE_IPV6=0" (disabled by default) +# or: qmake "USE_IPV6=-" (not supported) +contains(USE_IPV6, -) { + message(Building without IPv6 support) +} else { + count(USE_IPV6, 0) { + USE_IPV6=1 + } + DEFINES += USE_IPV6=$$USE_IPV6 +} + +contains(TRIANGLES_NEED_QT_PLUGINS, 1) { + DEFINES += TRIANGLES_NEED_QT_PLUGINS +# QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgeTs + QTPLUGIN += qtaccessiblewidgets +} + +INCLUDEPATH += src/leveldb/include src/leveldb/helpers +LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a +SOURCES += src/txdb-leveldb.cpp \ + src/blake.c \ + src/groestl.c \ + src/jh.c \ + src/keccak.c \ + src/skein.c \ + src/aes_helper.c \ + src/bmw.c \ + src/cubehash.c \ + src/echo.c \ + src/fugue.c \ + src/hamsi.c \ + src/hamsi_helper.c \ + src/luffa.c \ + src/shavite.c \ + src/simd.c + +!win32 { + # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences + genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a +} else { + # make an educated guess about what the ranlib command is called + isEmpty(QMAKE_RANLIB) { + QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) + } + LIBS += -lshlwapi + genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a +} +genleveldb.target = $$PWD/src/leveldb/libleveldb.a +genleveldb.depends = FORCE +PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a +QMAKE_EXTRA_TARGETS += genleveldb +# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it. +QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean + +# regenerate src/build.h +!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 + PRE_TARGETDEPS += $$OUT_PWD/build/build.h + QMAKE_EXTRA_TARGETS += genbuild + DEFINES += HAVE_BUILD_INFO +} + +contains(USE_O3, 1) { + message(Building O3 optimization flag) + QMAKE_CXXFLAGS_RELEASE -= -O2 + QMAKE_CFLAGS_RELEASE -= -O2 + QMAKE_CXXFLAGS += -O3 + QMAKE_CFLAGS += -O3 +} + + + #QMAKE_CXXFLAGS += -msse2 + #QMAKE_CFLAGS += -msse2 + +win32-g++ { + message("32 platform, adding -msse2 flag") + + QMAKE_CXXFLAGS += -msse2 + QMAKE_CFLAGS += -msse2 +} + +QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector + + +# Input +DEPENDPATH += src src/json src/qt +HEADERS += src/qt/trianglesgui.h \ + src/qt/transactiontablemodel.h \ + src/qt/addresstablemodel.h \ + src/qt/optionsdialog.h \ + src/qt/coincontroldialog.h \ + src/qt/coincontroltreewidget.h \ + src/qt/sendcoinsdialog.h \ + src/qt/addressbookpage.h \ + src/qt/signverifymessagedialog.h \ + src/qt/aboutdialog.h \ + src/qt/editaddressdialog.h \ + src/qt/trianglesaddressvalidator.h \ + src/alert.h \ + src/addrman.h \ + src/base58.h \ + src/bignum.h \ + src/checkpoints.h \ + src/compat.h \ + src/coincontrol.h \ + src/sync.h \ + src/util.h \ + src/uint256.h \ + src/kernel.h \ + src/scrypt.h \ + src/pbkdf2.h \ + src/serialize.h \ + src/strlcpy.h \ + src/smessage.h \ + src/main.h \ + src/miner.h \ + src/net.h \ + src/key.h \ + src/db.h \ + src/txdb.h \ + src/walletdb.h \ + src/script.h \ + src/init.h \ + src/irc.h \ + src/mruset.h \ + src/json/json_spirit_writer_template.h \ + src/json/json_spirit_writer.h \ + src/json/json_spirit_value.h \ + src/json/json_spirit_utils.h \ + src/json/json_spirit_stream_reader.h \ + src/json/json_spirit_reader_template.h \ + src/json/json_spirit_reader.h \ + src/json/json_spirit_error_position.h \ + src/json/json_spirit.h \ + src/qt/clientmodel.h \ + src/qt/guiutil.h \ + src/qt/transactionrecord.h \ + src/qt/guiconstants.h \ + src/qt/optionsmodel.h \ + src/qt/monitoreddatamapper.h \ + src/qt/transactiondesc.h \ + src/qt/transactiondescdialog.h \ + src/qt/trianglesamountfield.h \ + src/wallet.h \ + src/keystore.h \ + src/qt/transactionfilterproxy.h \ + src/qt/transactionview.h \ + src/qt/walletmodel.h \ + src/trianglesrpc.h \ + src/qt/overviewpage.h \ + src/qt/csvmodelwriter.h \ + src/crypter.h \ + src/qt/sendcoinsentry.h \ + src/qt/qvalidatedlineedit.h \ + src/qt/trianglesunits.h \ + src/qt/qvaluecombobox.h \ + src/qt/askpassphrasedialog.h \ + src/protocol.h \ + src/qt/notificator.h \ + src/qt/qtipcserver.h \ + src/allocators.h \ + src/ui_interface.h \ + src/qt/rpcconsole.h \ + src/version.h \ + src/netbase.h \ + src/clientversion.h \ + src/hashblock.h \ + src/sph_blake.h \ + src/sph_groestl.h \ + src/sph_jh.h \ + src/sph_keccak.h \ + src/sph_skein.h \ + src/sph_types.h \ + src/qt/messagepage.h \ + src/qt/messagemodel.h \ + src/qt/sendmessagesdialog.h \ + src/qt/sendmessagesentry.h \ + src/qt/plugins/mrichtexteditor/mrichtextedit.h \ + src/qt/qvalidatedtextedit.h \ + src/txdb-leveldb.h \ + src/onionseed.h \ + src/sph_bmw.h \ + src/sph_cubehash.h \ + src/sph_echo.h \ + src/sph_fugue.h \ + src/sph_hamsi.h \ + src/sph_luffa.h \ + src/sph_shavite.h \ + src/sph_simd.h + +SOURCES += src/qt/triangles.cpp src/qt/trianglesgui.cpp \ + src/qt/transactiontablemodel.cpp \ + src/qt/addresstablemodel.cpp \ + src/qt/optionsdialog.cpp \ + src/qt/sendcoinsdialog.cpp \ + src/qt/coincontroldialog.cpp \ + src/qt/coincontroltreewidget.cpp \ + src/qt/addressbookpage.cpp \ + src/qt/signverifymessagedialog.cpp \ + src/qt/aboutdialog.cpp \ + src/qt/editaddressdialog.cpp \ + src/qt/trianglesaddressvalidator.cpp \ + src/tor/address.c \ + src/tor/addressmap.c \ + src/tor/aes.c \ + src/tor/backtrace.c \ + src/tor/buffers.c \ + src/tor/channel.c \ + src/tor/channeltls.c \ + src/tor/circpathbias.c \ + src/tor/circuitbuild.c \ + src/tor/circuitlist.c \ + src/tor/circuitmux.c \ + src/tor/circuitmux_ewma.c \ + src/tor/circuitstats.c \ + src/tor/circuituse.c \ + src/tor/command.c \ + src/tor/compat.c \ + src/tor/compat_libevent.c \ + src/tor/config.c \ + src/tor/config_codedigest.c \ + src/tor/confparse.c \ + src/tor/connection.c \ + src/tor/connection_edge.c \ + src/tor/connection_or.c \ + src/tor/container.c \ + src/tor/control.c \ + src/tor/cpuworker.c \ + src/tor/crypto.c \ + src/tor/crypto_curve25519.c \ + src/tor/crypto_format.c \ + src/tor/curve25519-donna.c \ + src/tor/di_ops.c \ + src/tor/directory.c \ + src/tor/dirserv.c \ + src/tor/dirvote.c \ + src/tor/dns.c \ + src/tor/dnsserv.c \ + src/tor/entrynodes.c \ + src/tor/ext_orport.c \ + src/tor/fp_pair.c \ + src/tor/geoip.c \ + src/tor/hibernate.c \ + src/tor/log.c \ + src/tor/memarea.c \ + src/tor/mempool.c \ + src/tor/microdesc.c \ + src/tor/networkstatus.c \ + src/tor/nodelist.c \ + src/tor/onion.c \ + src/tor/onion_fast.c \ + src/tor/onion_main.c \ + src/tor/onion_ntor.c \ + src/tor/onion_tap.c \ + src/tor/policies.c \ + src/tor/anonymize.cpp \ + src/tor/procmon.c \ + src/tor/reasons.c \ + src/tor/relay.c \ + src/tor/rendclient.c \ + src/tor/rendcommon.c \ + src/tor/rendmid.c \ + src/tor/rendservice.c \ + src/tor/rephist.c \ + src/tor/replaycache.c \ + src/tor/router.c \ + src/tor/routerlist.c \ + src/tor/routerparse.c \ + src/tor/routerset.c \ + src/tor/sandbox.c \ + src/tor/statefile.c \ + src/tor/status.c \ + src/tor/strlcat.c \ + src/tor/strlcpy.c \ + src/tor/tor_util.c \ + src/tor/torgzip.c \ + src/tor/tortls.c \ + src/tor/transports.c \ + src/tor/util_codedigest.c \ + src/alert.cpp \ + src/version.cpp \ + src/sync.cpp \ + src/smessage.cpp \ + src/util.cpp \ + src/netbase.cpp \ + src/key.cpp \ + src/script.cpp \ + src/main.cpp \ + src/miner.cpp \ + src/init.cpp \ + src/net.cpp \ + src/irc.cpp \ + src/checkpoints.cpp \ + src/addrman.cpp \ + src/db.cpp \ + src/walletdb.cpp \ + src/qt/clientmodel.cpp \ + src/qt/guiutil.cpp \ + src/qt/transactionrecord.cpp \ + src/qt/optionsmodel.cpp \ + src/qt/monitoreddatamapper.cpp \ + src/qt/transactiondesc.cpp \ + src/qt/transactiondescdialog.cpp \ + src/qt/trianglesstrings.cpp \ + src/qt/trianglesamountfield.cpp \ + src/wallet.cpp \ + src/keystore.cpp \ + src/qt/transactionfilterproxy.cpp \ + src/qt/transactionview.cpp \ + src/qt/walletmodel.cpp \ + src/trianglesrpc.cpp \ + src/rpcdump.cpp \ + src/rpcnet.cpp \ + src/rpcmining.cpp \ + src/rpcwallet.cpp \ + src/rpcblockchain.cpp \ + src/rpcrawtransaction.cpp \ + src/rpcsmessage.cpp \ + src/qt/overviewpage.cpp \ + src/qt/csvmodelwriter.cpp \ + src/crypter.cpp \ + src/qt/sendcoinsentry.cpp \ + src/qt/qvalidatedlineedit.cpp \ + src/qt/trianglesunits.cpp \ + src/qt/qvaluecombobox.cpp \ + src/qt/askpassphrasedialog.cpp \ + src/protocol.cpp \ + src/qt/notificator.cpp \ + src/qt/qtipcserver.cpp \ + src/qt/rpcconsole.cpp \ + src/qt/messagepage.cpp \ + src/qt/messagemodel.cpp \ + src/qt/sendmessagesdialog.cpp \ + src/qt/sendmessagesentry.cpp \ + src/qt/qvalidatedtextedit.cpp \ + src/qt/plugins/mrichtexteditor/mrichtextedit.cpp \ + src/noui.cpp \ + src/kernel.cpp \ + src/scrypt-arm.S \ + src/scrypt-x86.S \ + src/scrypt-x86_64.S \ + src/scrypt.cpp \ + src/pbkdf2.cpp + +RESOURCES += \ + src/qt/triangles.qrc + +FORMS += \ + src/qt/forms/coincontroldialog.ui \ + src/qt/forms/sendcoinsdialog.ui \ + src/qt/forms/addressbookpage.ui \ + src/qt/forms/signverifymessagedialog.ui \ + src/qt/forms/aboutdialog.ui \ + src/qt/forms/editaddressdialog.ui \ + src/qt/forms/transactiondescdialog.ui \ + src/qt/forms/overviewpage.ui \ + src/qt/forms/sendcoinsentry.ui \ + src/qt/forms/askpassphrasedialog.ui \ + src/qt/forms/rpcconsole.ui \ + src/qt/forms/optionsdialog.ui \ + src/qt/forms/messagepage.ui \ + src/qt/forms/sendmessagesentry.ui \ + src/qt/forms/sendmessagesdialog.ui \ + src/qt/plugins/mrichtexteditor/mrichtextedit.ui + +contains(USE_QRCODE, 1) { +HEADERS += src/qt/qrcodedialog.h +SOURCES += src/qt/qrcodedialog.cpp +FORMS += src/qt/forms/qrcodedialog.ui +} + +CODECFORTR = UTF-8 + +# for lrelease/lupdate +# also add new translations to src/qt/triangles.qrc under translations/ +TRANSLATIONS = $$files(src/qt/locale/triangles_*.ts) + +isEmpty(QMAKE_LRELEASE) { + win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe + else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease +} +isEmpty(QM_DIR):QM_DIR = $$PWD/src/qt/locale +# automatically build translations, so they can be included in resource file +TSQM.name = lrelease ${QMAKE_FILE_IN} +TSQM.input = TRANSLATIONS +TSQM.output = $$QM_DIR/${QMAKE_FILE_BASE}.qm +TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} +TSQM.CONFIG = no_link +QMAKE_EXTRA_COMPILERS += TSQM + +# "Other files" to show in Qt Creator +OTHER_FILES += \ + doc/*.rst doc/*.txt doc/README README.md res/triangles-qt.rc + +# platform specific defaults, if not overridden on command line +isEmpty(BOOST_LIB_SUFFIX) { + macx:BOOST_LIB_SUFFIX = -mt + #windows:BOOST_LIB_SUFFIX = -mgw48-mt-s-1_550 + windows:BOOST_LIB_SUFFIX = -mt +} + +isEmpty(BOOST_THREAD_LIB_SUFFIX) { + BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX +} + +isEmpty(BDB_LIB_PATH) { + macx:BDB_LIB_PATH = /opt/local/lib/db48 +} + +isEmpty(BDB_LIB_SUFFIX) { + macx:BDB_LIB_SUFFIX = -4.8 +} + +isEmpty(BDB_INCLUDE_PATH) { + macx:BDB_INCLUDE_PATH = /opt/local/include/db48 +} + +isEmpty(BOOST_LIB_PATH) { + macx:BOOST_LIB_PATH = /opt/local/lib +} + +isEmpty(BOOST_INCLUDE_PATH) { + macx:BOOST_INCLUDE_PATH = /opt/local/include +} + +windows:DEFINES += WIN32 +windows:RC_FILE = src/qt/res/triangles-qt.rc + +windows:!contains(MINGW_THREAD_BUGFIX, 0) { + # At least qmake's win32-g++-cross profile is missing the -lmingwthrd + # thread-safety flag. GCC has -mthreads to enable this, but it doesn't + # work with static linking. -lmingwthrd must come BEFORE -lmingw, so + # it is prepended to QMAKE_LIBS_QT_ENTRY. + # It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes + # any problems on some untested qmake profile now or in the future. + DEFINES += _MT + QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY +} + +!windows:!macx { + DEFINES += LINUX + LIBS += -lrt +} + +macx:HEADERS += src/qt/macdockiconhandler.hh +macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm +macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit +macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 +macx:ICON = src/qt/res/icons/triangles.icns +macx:TARGET = "Triangles-Qt" +macx:QMAKE_CFLAGS_THREAD += -pthread +macx:QMAKE_LFLAGS_THREAD += -pthread +macx:QMAKE_CXXFLAGS_THREAD += -pthread + +# Set libraries and includes at end, to use platform-defined defaults if not overridden +#$$join(ADDITIONAL_LIBS_PATH,,-L,) +INCLUDEPATH += $$BOOST_INCLUDE_PATH \ + $$BDB_INCLUDE_PATH \ + $$OPENSSL_INCLUDE_PATH \ + #$$QRENCODE_INCLUDE_PATH \ + $$EVENT_INCLUDE_PATH + +LIBS += $$join(BOOST_LIB_PATH,,-L,) \ + $$join(BDB_LIB_PATH,,-L,) \ + $$join(OPENSSL_LIB_PATH,,-L,) \ + #$$join(QRENCODE_LIB_PATH,,-L,) \ + $$join(EVENT_LIB_PATH,,-L,) + +LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX +LIBS += -levent -lz +# -lgdi32 has to happen after -lcrypto (see #681) +windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 +LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread_win32$$BOOST_THREAD_LIB_SUFFIX +windows:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX + +contains(RELEASE, 1) { + !windows:!macx { + # Linux: turn dynamic linking back on for c/c++ runtime libraries + LIBS += -Wl,-Bdynamic + } +} + +system($$QMAKE_LRELEASE -silent $$_PRO_FILE_)