commit dc848ca62b4979066e6cac7ea070193b5a7bcc25 Author: cygnusxi Date: Sat May 10 14:49:26 2014 -0600 Curecoin Launch Initial launch of Curecoin. diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..412eeda --- /dev/null +++ b/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9d6bd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,215 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..2e2d7b0 --- /dev/null +++ b/COPYING @@ -0,0 +1,22 @@ +Copyright (c) 2013 curecoin Developers +Copyright (c) 2013 curecoin Developers +Copyright (c) 2011-2012 PPCoin Developers +Copyright (c) 2009-2012 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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..88ae101 --- /dev/null +++ b/INSTALL @@ -0,0 +1,9 @@ +Building curecoin + +See doc/readme-qt.rst for instructions on building curecoin QT, +the intended-for-end-users, nice-graphical-interface, reference +implementation of curecoin. + +See doc/build-*.txt for instructions on building curecoind, +the intended-for-services, no-graphical-interface, reference +implementation of curecoin. diff --git a/README b/README new file mode 100644 index 0000000..42061c0 --- /dev/null +++ b/README @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..4262221 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +curecoin + + diff --git a/UPDATE b/UPDATE new file mode 100644 index 0000000..4cb14ca --- /dev/null +++ b/UPDATE @@ -0,0 +1,14 @@ +Version 1.6 Download: +windows setup exe: http://sdrv.ms/12pywCy +.7z file: http://sdrv.ms/12pyESx + +Version 1.6 +- Add checkpoints +- Fix error of block 7887 +- add more chinese translation +- fix some little bugs + +Version 1.5 +- add function to see network hash speed (first implementation of this functions in all PoW+PoF coins) +- add Chinese translation +- fix several little bugs \ No newline at end of file diff --git a/curecoin-qt.pro b/curecoin-qt.pro new file mode 100644 index 0000000..09e4415 --- /dev/null +++ b/curecoin-qt.pro @@ -0,0 +1,380 @@ +TEMPLATE = app +TARGET = curecoin-qt +VERSION = 1.0.0 +INCLUDEPATH += src src/json src/qt +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 + +#uncomment the following section to enable building on windows: +#windows:LIBS += -lshlwapi +#LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,) +#LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX +#windows:LIBS += -lws2_32 -lole32 -loleaut32 -luuid -lgdi32 +#LIBS += -lboost_system-mgw46-mt-sd-1_53 -lboost_filesystem-mgw46-mt-sd-1_53 -lboost_program_options-mgw46-mt-sd-1_53 -lboost_thread-mgw46-mt-sd-1_53 +#BOOST_LIB_SUFFIX=-mgw46-mt-sd-1_53 +#BOOST_INCLUDE_PATH=C:/deps/boost +#BOOST_LIB_PATH=C:/deps/boost/stage/lib +#BDB_INCLUDE_PATH=c:/deps/db/build_unix +#BDB_LIB_PATH=c:/deps/db/build_unix +#OPENSSL_INCLUDE_PATH=c:/deps/ssl/include +#OPENSSL_LIB_PATH=c:/deps/ssl +#MINIUPNPC_LIB_PATH=c:/deps/miniupnpc +#MINIUPNPC_INCLUDE_PATH=c:/deps + +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 i386 -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,--dynamicbase -Wl,--nxcompat + +# 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 -lpthread +} + +# 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(curecoin_NEED_QT_PLUGINS, 1) { + DEFINES += curecoin_NEED_QT_PLUGINS + QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets +} + + +# 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 +} + +QMAKE_CXXFLAGS += -msse2 +QMAKE_CFLAGS += -msse2 +QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector + +# Input +DEPENDPATH += src src/json src/qt +HEADERS += src/qt/curecoingui.h \ + src/qt/transactiontablemodel.h \ + src/qt/addresstablemodel.h \ + src/qt/optionsdialog.h \ + src/qt/sendcoinsdialog.h \ + src/qt/addressbookpage.h \ + src/qt/signverifymessagedialog.h \ + src/qt/aboutdialog.h \ + src/qt/editaddressdialog.h \ + src/qt/curecoinaddressvalidator.h \ + src/alert.h \ + src/addrman.h \ + src/base58.h \ + src/bignum.h \ + src/checkpoints.h \ + src/compat.h \ + src/sync.h \ + src/util.h \ + src/uint256.h \ + src/kernel.h \ + src/serialize.h \ + src/strlcpy.h \ + src/main.h \ + src/net.h \ + src/key.h \ + src/db.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/curecoinamountfield.h \ + src/wallet.h \ + src/keystore.h \ + src/qt/transactionfilterproxy.h \ + src/qt/transactionview.h \ + src/qt/walletmodel.h \ + src/curecoinrpc.h \ + src/qt/overviewpage.h \ + src/qt/csvmodelwriter.h \ + src/crypter.h \ + src/qt/sendcoinsentry.h \ + src/qt/qvalidatedlineedit.h \ + src/qt/curecoinunits.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 + +SOURCES += src/qt/curecoin.cpp src/qt/curecoingui.cpp \ + src/qt/transactiontablemodel.cpp \ + src/qt/addresstablemodel.cpp \ + src/qt/optionsdialog.cpp \ + src/qt/sendcoinsdialog.cpp \ + src/qt/addressbookpage.cpp \ + src/qt/signverifymessagedialog.cpp \ + src/qt/aboutdialog.cpp \ + src/qt/editaddressdialog.cpp \ + src/qt/curecoinaddressvalidator.cpp \ + src/alert.cpp \ + src/version.cpp \ + src/sync.cpp \ + src/util.cpp \ + src/netbase.cpp \ + src/key.cpp \ + src/script.cpp \ + src/main.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/curecoinstrings.cpp \ + src/qt/curecoinamountfield.cpp \ + src/wallet.cpp \ + src/keystore.cpp \ + src/qt/transactionfilterproxy.cpp \ + src/qt/transactionview.cpp \ + src/qt/walletmodel.cpp \ + src/curecoinrpc.cpp \ + src/rpcdump.cpp \ + src/rpcnet.cpp \ + src/rpcmining.cpp \ + src/rpcwallet.cpp \ + src/rpcblockchain.cpp \ + src/rpcrawtransaction.cpp \ + src/qt/overviewpage.cpp \ + src/qt/csvmodelwriter.cpp \ + src/crypter.cpp \ + src/qt/sendcoinsentry.cpp \ + src/qt/qvalidatedlineedit.cpp \ + src/qt/curecoinunits.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/noui.cpp \ + src/kernel.cpp + +RESOURCES += \ + src/qt/curecoin.qrc + +FORMS += \ + 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 + +contains(USE_QRCODE, 1) { +HEADERS += src/qt/qrcodedialog.h +SOURCES += src/qt/qrcodedialog.cpp +FORMS += src/qt/forms/qrcodedialog.ui +} + +contains(curecoin_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 = curecoin-qt_test +DEFINES += curecoin_QT_TEST +} + +CODECFORTR = UTF-8 + +# for lrelease/lupdate +# also add new translations to src/qt/curecoin.qrc under translations/ +TRANSLATIONS = $$files(src/qt/locale/curecoin_*.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/curecoin-qt.rc src/test/*.cpp src/test/*.h src/qt/test/*.cpp src/qt/test/*.h + +# 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_50 +} + +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/curecoin-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.h +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/curecoin.icns +macx:TARGET = "curecoin-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 -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX +# -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 +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_) diff --git a/doc/Doxyfile b/doc/Doxyfile new file mode 100644 index 0000000..08d4f8c --- /dev/null +++ b/doc/Doxyfile @@ -0,0 +1,1752 @@ +# Doxyfile 1.7.4 + +# !!! Invoke doxygen from project root using: +# doxygen doc/Doxyfile + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +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 + +# 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 + +# 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 +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "P2P Digital Currency" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# 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 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc/doxygen + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.for \ + *.vhd \ + *.vhdl + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is adviced to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/doc/README b/doc/README new file mode 100644 index 0000000..e925926 --- /dev/null +++ b/doc/README @@ -0,0 +1,30 @@ +curecoin 0.1.1 BETA + +Copyright (c) 2009-2012 Bitcoin Developers +Copyright (c) 2011-2012 Litecoin Developers +Copyright (c) 2013 curecoin Developers +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/). This product includes +cryptographic software written by Eric Young (eay@cryptsoft.com). + + +Intro +----- +curecoin is a free open source peer-to-peer electronic cash system that is +completely decentralized, without the need for a central server or trusted +parties. Users hold the crypto keys to their own money and transact directly +with each other, with the help of a P2P network to check for double-spending. + + +Setup +----- +Unpack the files into a directory and run: + curecoin-qt (GUI) + curecoind (headless) + + +See the documentation at the bitcoin wiki: + https://en.bitcoin.it/wiki/Main_Page +for help and more information. diff --git a/doc/README_windows.txt b/doc/README_windows.txt new file mode 100644 index 0000000..79c15d8 --- /dev/null +++ b/doc/README_windows.txt @@ -0,0 +1,37 @@ +curecoin 0.1 BETA + +Copyright (c) 2009-2012 Bitcoin Developers +Copyright (c) 2011-2012 Litecoin Developers +Copyright (c) 2013 curecoin Developers +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/). This product includes +cryptographic software written by Eric Young (eay@cryptsoft.com). + + +Intro +----- +curecoin is a free open source peer-to-peer electronic cash system that is +completely decentralized, without the need for a central server or trusted +parties. Users hold the crypto keys to their own money and transact directly +with each other, with the help of a P2P network to check for double-spending. + + +Setup +----- +Unpack the files into a directory and run curecoin-qt.exe. + +If you have Microsoft Security Essentials, you need to add curecoin-qt.exe to its +"Excluded processes" list. Microsoft Security Essentials->Settings tab, +select Excluded processes, press Add, select curecoin-qt.exe, OK, Save changes. + +The software automatically finds other nodes to connect to. You can +enable Universal Plug and Play using a menu entry or set your firewall +to forward port 8512 (TCP) to your computer so you can receive +incoming connections. curecoin works without incoming connections, +but allowing incoming connections helps the curecoin network. + +See the bitcoin wiki at: + https://en.bitcoin.it/wiki/Main_Page +for more help and information. diff --git a/doc/assets-attribution.txt b/doc/assets-attribution.txt new file mode 100644 index 0000000..a905074 --- /dev/null +++ b/doc/assets-attribution.txt @@ -0,0 +1,60 @@ +Code: src/strlcpy.h +Author: Todd C. Miller +License: ISC + +Icon: src/qt/res/icons/clock*.png, src/qt/res/icons/tx*.png, + src/qt/res/src/*.svg +Designer: Wladimir van der Laan +License: MIT + +Icon: src/qt/res/icons/address-book.png, src/qt/res/icons/export.png, + src/qt/res/icons/history.png, src/qt/res/icons/key.png, + src/qt/res/icons/lock_*.png, src/qt/res/icons/overview.png, + src/qt/res/icons/receive.png, src/qt/res/icons/send.png, + src/qt/res/icons/synced.png, src/qt/res/icons/filesave.png +Icon Pack: NUVOLA ICON THEME for KDE 3.x +Designer: David Vignoni (david@icon-king.com) + ICON KING - www.icon-king.com +License: LGPL +Site: http://www.icon-king.com/projects/nuvola/ + +Icon: src/qt/res/icons/connect*.png +Icon Pack: Human-O2 +Designer: schollidesign +License: GNU/GPL +Site: http://findicons.com/icon/93743/blocks_gnome_netstatus_0 + +Icon: src/qt/res/icons/transaction*.png +Designer: md2k7 +Site: https://bitcointalk.org/index.php?topic=15276.0 +License: You are free to do with these icons as you wish, including selling, + copying, modifying etc. + +Icon: src/qt/res/icons/configure.png, src/qt/res/icons/quit.png, + src/qt/res/icons/editcopy.png, src/qt/res/icons/editpaste.png, + src/qt/res/icons/add.png, src/qt/res/icons/edit.png, + src/qt/res/icons/remove.png (edited) +Designer: http://www.everaldo.com +Icon Pack: Crystal SVG +License: LGPL + +Icon: src/qt/res/icons/curecoin.png, src/qt/res/icons/toolbar.png +Designer: Mao +License: Public Domain +Site: + +Icon: scripts/img/reload.xcf (modified),src/qt/res/movies/update_spinner.mng +Icon Pack: Kids +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), adapted to Litecoin by BitcoinPorn (forum) +Site: https://bitcointalk.org/index.php?topic=32273.0, https://bitcointalk.org/index.php?topic=47417.msg591988#msg591988 +License: Public domain + +Icon: src/qt/res/icons/debugwindow.png +Designer: Vignoni David +Site: http://www.oxygen-icons.org/ +License: Oxygen icon theme is dual licensed. You may copy it under the Creative Common Attribution-ShareAlike 3.0 License or the GNU Library General Public License. diff --git a/doc/bitcoin_logo_doxygen.png b/doc/bitcoin_logo_doxygen.png new file mode 100644 index 0000000..5b41b02 Binary files /dev/null and b/doc/bitcoin_logo_doxygen.png differ diff --git a/doc/build-msw.txt b/doc/build-msw.txt new file mode 100644 index 0000000..b5ed991 --- /dev/null +++ b/doc/build-msw.txt @@ -0,0 +1,86 @@ +Copyright (c) 2009-2012 Bitcoin Developers +Copyright (c) 2011-2012 Litecoin Developers +Copyright (c) 2013 curecoin Developers +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/). This product includes +cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP +software written by Thomas Bernard. + + +See readme-qt.rst for instructions on building curecoin-QT, the +graphical user interface. + +WINDOWS BUILD NOTES +=================== + +Compilers Supported +------------------- +TODO: What works? +Note: releases are cross-compiled using mingw running on Linux. + + +Dependencies +------------ +Libraries you need to download separately and build: + + default path download +OpenSSL \openssl-1.0.1e http://www.openssl.org/source/ +Berkeley DB \db-4.8.30.NC http://www.oracle.com/technology/software/products/berkeley-db/index.html +Boost \boost-1.54.0 http://www.boost.org/users/download/ +miniupnpc \miniupnpc-1.6 http://miniupnp.tuxfamily.org/files/ + +Their licenses: +OpenSSL Old BSD license with the problematic advertising requirement +Berkeley DB New BSD license with additional requirement that linked software must be free open source +Boost MIT-like license +miniupnpc New (3-clause) BSD license + +Versions used in this release: +OpenSSL 1.0.1b +Berkeley DB 4.8.30.NC +Boost 1.47.0 +miniupnpc 1.6 + + +OpenSSL +------- +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.1e +./config +make + +Berkeley DB +----------- +MSYS shell: +cd /c/db-4.8.30.NC/build_unix +sh ../dist/configure --enable-mingw --enable-cxx +make + +Boost +----- +DOS prompt: +downloaded boost jam 3.1.18 +cd \boost-1.54.0 +bjam toolset=gcc --build-type=complete stage + +MiniUPnPc +--------- +UPnP support is optional, make with USE_UPNP= to disable it. + +MSYS shell: +cd /c/miniupnpc-1.6 +make -f Makefile.mingw +mkdir miniupnpc +cp *.h miniupnpc/ + +curecoin +------- +DOS prompt: +cd \curecoin\src +mingw32-make -f makefile.mingw +strip curecoind.exe diff --git a/doc/build-osx.txt b/doc/build-osx.txt new file mode 100644 index 0000000..959d9ca --- /dev/null +++ b/doc/build-osx.txt @@ -0,0 +1,56 @@ +Copyright (c) 2009-2012 Bitcoin Developers +Copyright (c) 2011-2012 Litecoin Developers +Copyright (c) 2013 curecoin Developers +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/). This product includes +cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP +software written by Thomas Bernard. + + +Mac OS X curecoind build instructions +Laszlo Hanyecz +Douglas Huff + + +See readme-qt.rst for instructions on building curecoin-QT, the +graphical user interface. + +Tested on 10.5, 10.6 and 10.7 intel. PPC is not supported because it's big-endian. + +All of the commands should be executed in Terminal.app.. it's in +/Applications/Utilities + +You need to install XCode with all the options checked so that the compiler and +everything is available in /usr not just /Developer. XCode should be available on your OS X +install DVD, but if not, you can get the current version from https://developer.apple.com/xcode/ + + +1. Clone the github tree to get the source code: + +git clone git@github.com:curecoin/curecoin.git curecoin + +2. Download and install MacPorts from http://www.macports.org/ + +2a. (for 10.7 Lion) + Edit /opt/local/etc/macports/macports.conf and uncomment "build_arch i386" + +3. Install dependencies from MacPorts + +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 curecoind: + +cd curecoin/src +make -f makefile.osx USE_IPV6=1 + +Run: + ./curecoind --help # for a list of command-line options. +Run + ./curecoind -daemon # to start the curecoin daemon. +Run + ./curecoind 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 new file mode 100644 index 0000000..ac72eee --- /dev/null +++ b/doc/build-unix.txt @@ -0,0 +1,157 @@ +Copyright (c) 2009-2012 Bitcoin Developers +Copyright (c) 2011-2012 Litecoin Developers +Copyright (c) 2013 curecoin Developers +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/). This product includes +cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP +software written by Thomas Bernard. + + +UNIX BUILD NOTES +================ + +To Build +-------- + +cd src/ +make -f makefile.unix # Headless curecoin + +See readme-qt.rst for instructions on building curecoin-Qt, +the graphical user interface. + +Dependencies +------------ + + Library Purpose Description + ------- ------- ----------- + libssl SSL Support Secure communications + libdb4.8 Berkeley DB Blockchain & wallet storage + libboost Boost C++ Library + miniupnpc UPnP Support Optional firewall-jumping support + libqrencode QRCode generation Optional QRCode generation + +miniupnpc may be used for UPnP port mapping. It can be downloaded from +http://miniupnp.tuxfamily.org/files/. UPnP support is compiled in and +turned off by default. Set USE_UPNP to a different value to control this: + USE_UPNP=- No UPnP support - miniupnp not required + USE_UPNP=0 (the default) UPnP support turned off by default at runtime + USE_UPNP=1 UPnP support turned on by default at runtime + +libqrencode may be used for QRCode image generation. It can be downloaded +from http://fukuchi.org/works/qrencode/index.html.en, or installed via +your package manager. Set USE_QRCODE to control this: + USE_QRCODE=0 (the default) No QRCode support - libqrcode not required + USE_QRCODE=1 QRCode support enabled + +IPv6 support may be enabled by setting + USE_IPV6=1 Enable IPv6 support + +Licenses of statically linked libraries: + Berkeley DB New BSD license with additional requirement that linked + software must be free open source + Boost MIT-like license + miniupnpc New (3-clause) BSD license + +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 + +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 libqrencode-dev + +If using Boost 1.37, append -mt to the boost libraries in the makefile. + + +Dependency Build Instructions: Gentoo +------------------------------------- + +emerge -av1 --noreplace boost glib openssl sys-libs/db:4.8 + +Take the following steps to build (no UPnP support): + cd ${curecoin_DIR}/src + make -f makefile.unix USE_UPNP= USE_IPV6=1 BDB_INCLUDE_PATH='/usr/include/db4.8' + strip curecoind + + +Notes +----- +The release is built with GCC and then "strip curecoind" to strip the debug +symbols, which reduces the executable size by about 90%. + + +miniupnpc +--------- +tar -xzvf miniupnpc-1.6.tar.gz +cd miniupnpc-1.6 +make +sudo su +make install + + +Berkeley DB +----------- +You need Berkeley DB 4.8. If you have to build Berkeley DB yourself: +../dist/configure --enable-cxx +make + + +Boost +----- +If you need to build Boost yourself: +sudo su +./bootstrap.sh +./bjam install + + +Security +-------- +To help make your curecoin 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 + Build position independent code to take advantage of Address Space Layout Randomization + offered by some kernels. An attacker who is able to cause execution of code at an arbitrary + memory location is thwarted if he doesn't know where anything useful is located. + The stack and heap are randomly located by default but this allows the code section to be + randomly located as well. + + On an Amd64 processor where a library was not compiled with -fPIC, this will cause an error + such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;" + + To build with PIE, use: + make -f makefile.unix ... -e PIE=1 + + To test that you have built PIE executable, install scanelf, part of paxutils, and use: + scanelf -e ./curecoin + + The output should contain: + TYPE + ET_DYN + +* Non-executable Stack + If the stack is executable then trivial stack based buffer overflow exploits are possible if + vulnerable buffers are found. By default, curecoin 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 ./curecoin + + the output should contain: + STK/REL/PTL + RW- R-- RW- + + The STK RW- means that the stack is readable and writeable but not executable. diff --git a/doc/coding.txt b/doc/coding.txt new file mode 100644 index 0000000..392b59b --- /dev/null +++ b/doc/coding.txt @@ -0,0 +1,99 @@ +Please be consistent with the existing coding style. + +Block style: + +bool Function(char* psz, int n) +{ + // Comment summarising what this section of code does + for (int i = 0; i < n; i++) + { + // When something fails, return early + if (!Something()) + return false; + ... + } + + // Success return is usually at the end + return true; +} + +- ANSI/Allman block style +- 4 space indenting, no tabs +- No extra spaces inside parenthesis; please don't do ( this ) +- No space after function names, one space after if, for and while + +Variable names begin with the type in lowercase, like nSomeVariable. +Please don't put the first word of the variable name in lowercase like +someVariable. + +Common types: +n integer number: short, unsigned short, int, unsigned int, + int64, uint64, sometimes char if used as a number +d double, float +f flag +hash uint256 +p pointer or array, one p for each level of indirection +psz pointer to null terminated string +str string object +v vector or similar list objects +map map or multimap +set set or multiset +bn CBigNum + +------------------------- +Locking/mutex usage notes + +The code is multi-threaded, and uses mutexes and the +CRITICAL_BLOCK/TRY_CRITICAL_BLOCK macros to protect data structures. + +Deadlocks due to inconsistent lock ordering (thread 1 locks cs_main +and then cs_wallet, while thread 2 locks them in the opposite order: +result, deadlock as each waits for the other to release its lock) are +a problem. Compile with -DDEBUG_LOCKORDER to get lock order +inconsistencies reported in the debug.log file. + +Re-architecting the core code so there are better-defined interfaces +between the various components is a goal, with any necessary locking +done by the components (e.g. see the self-contained CKeyStore class +and its cs_KeyStore lock for example). + +------- +Threads + +StartNode : Starts other threads. + +ThreadGetMyExternalIP : Determines outside-the-firewall IP address, +sends addr message to connected peers when it determines it. + +ThreadIRCSeed : Joins IRC bootstrapping channel, watching for new +peers and advertising this node's IP address. + +ThreadSocketHandler : Sends/Receives data from peers on port 9333. + +ThreadMessageHandler : Higher-level message handling (sending and +receiving). + +ThreadOpenConnections : Initiates new connections to peers. + +ThreadTopUpKeyPool : replenishes the keystore's keypool. + +ThreadCleanWalletPassphrase : re-locks an encrypted wallet after user +has unlocked it for a period of time. + +SendingDialogStartTransfer : used by pay-via-ip-address code (obsolete) + +ThreadDelayedRepaint : repaint the gui + +ThreadFlushWalletDB : Close the wallet.dat file if it hasn't been used +in 500ms. + +ThreadRPCServer : Remote procedure call handler, listens on port 9332 +for connections and services them. + +ThreadcurecoinsMiner : Generates curecoins + +ThreadMapPort : Universal plug-and-play startup/shutdown + +Shutdown : Does an orderly shutdown of everything + +ExitTimeout : Windows-only, sleeps 5 seconds then exits application diff --git a/doc/readme-qt.rst b/doc/readme-qt.rst new file mode 100644 index 0000000..c03b653 --- /dev/null +++ b/doc/readme-qt.rst @@ -0,0 +1,152 @@ +curecoin-Qt: Qt4 GUI for curecoin +================================ + +Build instructions +=================== + +Debian +------- + +First, make sure that the required packages for Qt4 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 \ + libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev \ + libssl-dev libdb4.8++-dev + +then execute the following: + +:: + + qmake + make + +Alternatively, install `Qt Creator`_ and open the `curecoin-qt.pro` file. + +An executable named `curecoin-qt` will be built. + +.. _`Qt Creator`: http://qt.nokia.com/downloads/ + +Windows +-------- + +Windows build instructions: + +- Download the `Qt Windows SDK`_ and install it. You don't need the Symbian stuff, just the desktop Qt. + +- Download and extract the `dependencies archive`_ [#]_, or compile openssl, boost and dbcxx yourself. + +- Copy the contents of the folder "deps" to "X:\\QtSDK\\mingw", replace X:\\ with the location where you installed the Qt SDK. Make sure that the contents of "deps\\include" end up in the current "include" directory. + +- Open the bitcoin-qt.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`_) +.. _`610945D0`: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x610945D0 + + +Mac OS X +-------- + +- Download and install the `Qt Mac OS X SDK`_. It is recommended to also install Apple's Xcode with UNIX tools. + +- Download and install `MacPorts`_. + +- Execute the following commands in a terminal to get the dependencies: + +:: + + sudo port selfupdate + sudo port install boost db48 miniupnpc + +- Open the bitcoin-qt.pro file in Qt Creator and build as normal (cmd-B) + +.. _`Qt Mac OS X SDK`: http://qt.nokia.com/downloads/sdk-mac-os-cpp +.. _`MacPorts`: http://www.macports.org/install.php + + +Build configuration options +============================ + +UPnP port forwarding +--------------------- + +To use UPnP for port forwarding behind a NAT router (recommended, as more connections overall allow for a faster and more stable curecoin experience), pass the following argument to qmake: + +:: + + qmake "USE_UPNP=1" + +(in **Qt Creator**, you can find the setting for additional qmake arguments under "Projects" -> "Build Settings" -> "Build Steps", then click "Details" next to **qmake**) + +This requires miniupnpc for UPnP port mapping. It can be downloaded from +http://miniupnp.tuxfamily.org/files/. UPnP support is not compiled in by default. + +Set USE_UPNP to a different value to control this: + ++------------+--------------------------------------------------------------------------+ +| USE_UPNP=- | no UPnP support, miniupnpc not required; | ++------------+--------------------------------------------------------------------------+ +| USE_UPNP=0 | (the default) built with UPnP, support turned off by default at runtime; | ++------------+--------------------------------------------------------------------------+ +| USE_UPNP=1 | build with UPnP support turned on by default at runtime. | ++------------+--------------------------------------------------------------------------+ + +Notification support for recent (k)ubuntu versions +--------------------------------------------------- + +To see desktop notifications on (k)ubuntu versions starting from 10.04, enable usage of the +FreeDesktop notification interface through DBUS using the following qmake option: + +:: + + qmake "USE_DBUS=1" + +Generation of QR codes +----------------------- + +libqrencode may be used to generate QRCode images for payment requests. +It can be downloaded from http://fukuchi.org/works/qrencode/index.html.en, or installed via your package manager. Pass the USE_QRCODE +flag to qmake to control this: + ++--------------+--------------------------------------------------------------------------+ +| USE_QRCODE=0 | (the default) No QRCode support - libarcode not required | ++--------------+--------------------------------------------------------------------------+ +| USE_QRCODE=1 | QRCode support enabled | ++--------------+--------------------------------------------------------------------------+ + + +Berkely DB version warning +========================== + +A warning for people using the *static binary* version of curecoin on a Linux/UNIX-ish system (tl;dr: **Berkely DB databases are not forward compatible**). + +The static binary version of curecoin is linked against libdb4.8 (see also `this Debian issue`_). + +Now the nasty thing is that databases from 5.X are not compatible with 4.X. + +If the globally installed development package of Berkely DB installed on your system is 5.X, any source you +build yourself will be linked against that. The first time you run with a 5.X version the database will be upgraded, +and 4.X cannot open the new format. This means that you cannot go back to the old statically linked version without +significant hassle! + +.. _`this Debian issue`: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621425 + +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 curecoin-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 +disable screen reader functionality for Qt apps: + +:: + + sudo apt-get remove qt-at-spi + +.. _`launchpad bug 857790`: https://bugs.launchpad.net/ubuntu/+source/qt-at-spi/+bug/857790 diff --git a/doc/release-process.txt b/doc/release-process.txt new file mode 100644 index 0000000..d2f6810 --- /dev/null +++ b/doc/release-process.txt @@ -0,0 +1,143 @@ +* update translations (ping tcatm on IRC for now) + +* update (commit) version in sources + bitcoin-qt.pro + src/version.h + share/setup.nsi + doc/README* + +* tag version in git + + git tag -a v0.5.1 + +* write release notes. git shortlog helps a lot: + + git shortlog --no-merges v0.5.0.. + +* perform gitian builds + + * From a directory containing the curecoin source, gitian-builder and gitian.sigs + export SIGNER=(your gitian key, ie bluematt, sipa, etc) + export VERSION=0.5.1 + cd ./gitian-builder + + * Fetch and build inputs: + mkdir -p inputs; cd inputs/ + wget 'http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.6.tar.gz' -O miniupnpc-1.6.tar.gz + wget 'http://www.openssl.org/source/openssl-1.0.1b.tar.gz' + wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' + wget 'http://zlib.net/zlib-1.2.7.tar.gz' + wget 'ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.12.tar.gz' + wget 'http://fukuchi.org/works/qrencode/qrencode-3.2.0.tar.bz2' + 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 ../curecoin/contrib/gitian-descriptors/boost-win32.yml + cp build/out/boost-win32-1.47.0-gitian.zip inputs/ + ./bin/gbuild ../curecoin/contrib/gitian-descriptors/qt-win32.yml + cp build/out/qt-win32-4.7.4-gitian.zip inputs/ + ./bin/gbuild ../curecoin/contrib/gitian-descriptors/deps-win32.yml + cp build/out/curecoin-deps-0.0.3.zip inputs/ + + * Build curecoind and curecoin-qt on Linux32, Linux64, and Win32: + ./bin/gbuild --commit curecoin=v${VERSION} ../curecoin/contrib/gitian-descriptors/gitian.yml + ./bin/gsign --signer $SIGNER --release ${VERSION} --destination ../gitian.sigs/ ../curecoin/contrib/gitian-descriptors/gitian.yml + pushd build/out + zip -r curecoin-${VERSION}-linux-gitian.zip * + mv curecoin-${VERSION}-linux-gitian.zip ../../ + popd + ./bin/gbuild --commit curecoin=v${VERSION} ../curecoin/contrib/gitian-descriptors/gitian-win32.yml + ./bin/gsign --signer $SIGNER --release ${VERSION}-win32 --destination ../gitian.sigs/ ../curecoin/contrib/gitian-descriptors/gitian-win32.yml + pushd build/out + zip -r curecoin-${VERSION}-win32-gitian.zip * + mv curecoin-${VERSION}-win32-gitian.zip ../../ + popd + + Build output expected: + 1. linux 32-bit and 64-bit binaries + source (curecoin-${VERSION}-linux-gitian.zip) + 2. windows 32-bit binary, installer + source (curecoin-${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 curecoin-${VERSION}-linux-gitian.zip -d curecoin-${VERSION}-linux + tar czvf curecoin-${VERSION}-linux.tar.gz curecoin-${VERSION}-linux + rm -rf curecoin-${VERSION}-linux + + * Windows .zip and setup.exe: + unzip curecoin-${VERSION}-win32-gitian.zip -d curecoin-${VERSION}-win32 + mv curecoin-${VERSION}-win32/curecoin-*-setup.exe . + zip -r curecoin-${VERSION}-win32.zip curecoin-${VERSION}-win32 + rm -rf curecoin-${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 + 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 + 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 curecoin-Qt.app -add-qt-tr $T -dmg -fancy contrib/macdeploy/fancy.plist + + Build output expected: + curecoin-Qt.dmg + +* upload builds to SourceForge + +* create SHA256SUMS for builds, and PGP-sign it + +* update bitcoin.org version + make sure all OS download links go to the right versions + +* update forum version + +* update wiki download links + +* update wiki changelog: https://en.bitcoin.it/wiki/Changelog + +* Commit your signature to gitian.sigs: + pushd gitian.sigs + git add ${VERSION}/${SIGNER} + git add ${VERSION}-win32/${SIGNER} + git commit -a + git push # Assuming you can push to the gitian.sigs tree + popd + +------------------------------------------------------------------------- + +* After 3 or more people have gitian-built, repackage gitian-signed zips: + + * From a directory containing bitcoin 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 gitian + cp ../bitcoin/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 + done + zip -r bitcoin-${VERSION}-linux-gitian.zip * + cp bitcoin-${VERSION}-linux-gitian.zip ../ + popd + mkdir bitcoin-${VERSION}-win32-gitian + pushd bitcoin-${VERSION}-win32-gitian + unzip ../bitcoin-${VERSION}-win32-gitian.zip + mkdir gitian + cp ../bitcoin/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 + done + zip -r bitcoin-${VERSION}-win32-gitian.zip * + cp bitcoin-${VERSION}-win32-gitian.zip ../ + popd + + * Upload gitian zips to SourceForge diff --git a/doc/translation_process.md b/doc/translation_process.md new file mode 100644 index 0000000..c483020 --- /dev/null +++ b/doc/translation_process.md @@ -0,0 +1,103 @@ +Translations +============ + +The Qt GUI can be easily translated into other languages. Here's how we +handle those translations. + +Files and Folders +----------------- + +### bitcoin-qt.pro + +This file takes care of generating `.qm` files from `.ts` files. It is mostly +automated. + +### src/qt/bitcoin.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 + ... + + +### src/qt/locale/ + +This directory contains all translations. Filenames must adhere to this format: + + bitcoin_xx_YY.ts or bitcoin_xx.ts + +#### bitcoin_en.ts (Source file) + +`src/qt/locale/bitcoin_en.ts` is treated in a special way. It is used as the +source for all other translations. Whenever a string in the code is changed +this file must be updated to reflect those changes. This can be accomplished +by running `lupdate` (included in the Qt SDK). Also, a custom script is used +to extract strings from the non-Qt parts: + + python share/qt/extract_strings_qt.py + lupdate bitcoin-qt.pro -no-obsolete -locations none -ts src/qt/locale/bitcoin_en.ts + +##### Handling of plurals in the source file + +When new plurals are added to the source file, it's important to do the following steps: + +1. Open bitcoin_en.ts in Qt Linguist (also included in the Qt SDK) +2. Search for `%n`, which will take you to the parts in the translation that use plurals +3. Look for empty `English Translation (Singular)` and `English Translation (Plural)` fields +4. Add the appropriate strings for the singular and plural form of the base string +5. Mark the item as done (via the green arrow symbol in the toolbar) +6. Repeat from step 2. until all singular and plural forms are in the source file +7. Save the source file + +##### Creating the pull-request + +An updated source file should be merged to github and Transifex will pick it +up from there (can take some hours). Afterwards the new strings show up as "Remaining" +in Transifex and can be translated. + +To create the pull-request you have to do: + + git add src/qt/bitcoinstrings.cpp src/qt/locale/bitcoin_en.ts + git commit + +Syncing with Transifex +---------------------- + +We are using https://transifex.com as a frontend for translating the client. + +https://www.transifex.com/projects/p/bitcoin/resource/tx/ + +The "Transifex client" (see: http://help.transifex.com/features/client/) +will help with fetching new translations from Transifex. Use the following +config to be able to connect with the client: + +### .tx/config + + [main] + host = https://www.transifex.com + + [bitcoin.tx] + file_filter = src/qt/locale/bitcoin_.ts + source_file = src/qt/locale/bitcoin_en.ts + source_lang = en + +### .tx/config (for Windows) + + [main] + host = https://www.transifex.com + + [bitcoin.tx] + file_filter = src\qt\locale\bitcoin_.ts + source_file = src\qt\locale\bitcoin_en.ts + source_lang = en + +It is also possible to directly download new translations one by one from the Transifex website. + +### 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>/'` +3. `git add` new translations from `src/qt/locale/` diff --git a/share/genbuild.sh b/share/genbuild.sh new file mode 100644 index 0000000..d959877 --- /dev/null +++ b/share/genbuild.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +if [ $# -gt 0 ]; then + FILE="$1" + shift + if [ -f "$FILE" ]; then + INFO="$(head -n 1 "$FILE")" + fi +else + echo "Usage: $0 " + exit 1 +fi + +if [ -e "$(which git)" ]; then + # clean 'dirty' status of touched files that haven't been modified + git diff >/dev/null 2>/dev/null + + # get a string like "v0.6.0-66-g59887e8-dirty" + DESC="$(git describe --dirty 2>/dev/null)" + + # get a string like "2012-04-10 16:27:19 +0200" + TIME="$(git log -n 1 --format="%ci")" +fi + +if [ -n "$DESC" ]; then + NEWINFO="#define BUILD_DESC \"$DESC\"" +else + NEWINFO="// No build information available" +fi + +# only update build.h if necessary +if [ "$INFO" != "$NEWINFO" ]; then + echo "$NEWINFO" >"$FILE" + echo "#define BUILD_DATE \"$TIME\"" >>"$FILE" +fi diff --git a/share/pixmaps/addressbook16.bmp b/share/pixmaps/addressbook16.bmp new file mode 100644 index 0000000..c557691 Binary files /dev/null and b/share/pixmaps/addressbook16.bmp differ diff --git a/share/pixmaps/addressbook16mask.bmp b/share/pixmaps/addressbook16mask.bmp new file mode 100644 index 0000000..d3a478d Binary files /dev/null and b/share/pixmaps/addressbook16mask.bmp differ diff --git a/share/pixmaps/addressbook20.bmp b/share/pixmaps/addressbook20.bmp new file mode 100644 index 0000000..2b33b22 Binary files /dev/null and b/share/pixmaps/addressbook20.bmp differ diff --git a/share/pixmaps/addressbook20mask.bmp b/share/pixmaps/addressbook20mask.bmp new file mode 100644 index 0000000..56ce612 Binary files /dev/null and b/share/pixmaps/addressbook20mask.bmp differ diff --git a/share/pixmaps/bitcoin-bc.ico b/share/pixmaps/bitcoin-bc.ico new file mode 100644 index 0000000..476045c Binary files /dev/null and b/share/pixmaps/bitcoin-bc.ico differ diff --git a/share/pixmaps/bitcoin.ico b/share/pixmaps/bitcoin.ico new file mode 100644 index 0000000..8b12f82 Binary files /dev/null and b/share/pixmaps/bitcoin.ico differ diff --git a/share/pixmaps/bitcoin32.xpm b/share/pixmaps/bitcoin32.xpm new file mode 100644 index 0000000..6d2f9fa --- /dev/null +++ b/share/pixmaps/bitcoin32.xpm @@ -0,0 +1,112 @@ +/* XPM */ +static char * bitcoin32_xpm[] = { +"32 32 77 1", +" c None", +". c #A2A1A1", +"+ c #A1A1A1", +"@ c #A1A0A0", +"# c #9F9F9F", +"$ c #A7A7A7", +"% c #A9A9A9", +"& c #AEAEAE", +"* c #B0B0B0", +"= c #B1B1B1", +"- c #A8A8A8", +"; c #A4A4A4", +"> c #ACACAC", +", c #B2B2B2", +"' c #AAAAAA", +") c #ABABAB", +"! c #A6A6A6", +"~ c #A3A3A3", +"{ c #A8A7A7", +"] c #A5A5A5", +"^ c #ADADAD", +"/ c #9E9E9E", +"( c #ADACAC", +"_ c #A2A2A2", +": c #A0A0A0", +"< c #9D9D9D", +"[ c #A5A4A4", +"} c #9C9C9C", +"| c #9B9B9B", +"1 c #979797", +"2 c #8C8C8C", +"3 c #848484", +"4 c #838383", +"5 c #878787", +"6 c #929292", +"7 c #9A9A9A", +"8 c #AFAFAF", +"9 c #8B8B8B", +"0 c #7F7F7F", +"a c #808080", +"b c #7E7E7E", +"c c #828282", +"d c #969696", +"e c #939292", +"f c #999999", +"g c #898989", +"h c #8A8A8A", +"i c #888888", +"j c #959595", +"k c #939393", +"l c #909090", +"m c #8D8D8D", +"n c #9D9C9C", +"o c #B4B4B4", +"p c #B6B6B6", +"q c #919090", +"r c #A9A8A8", +"s c #B8B8B8", +"t c #BCBCBC", +"u c #B5B5B5", +"v c #C5C5C5", +"w c #C1C1C1", +"x c #B3B3B3", +"y c #C8C8C8", +"z c #BFBFBF", +"A c #B9B9B9", +"B c #AAA9A9", +"C c #9E9D9D", +"D c #949494", +"E c #919191", +"F c #8E8E8E", +"G c #858585", +"H c #B7B7B7", +"I c #818181", +"J c #989898", +"K c #949393", +"L c #989797", +" ", +" .+@ ", +" #$%&*==*&-; ", +" +>,')'!;~!%%)={ ", +" -*)&'!;+##+~]%^%*/ ", +" ()&'$;_:/<'[ ", +" ^%'!~+#/<}|||}/#+~!%-] ", +" '));_:/<}1234567<<#+~'%# ", +" _&8$_/<}}790aabcd<}&e ", +" *,);:/}% ", +" ]88$_/}<#+fkllmi47_:<}<+!^8j ", +" ^,);:<}<+;}7djkmh;!_/}<#~%>~ ", +" no8$_/<<#_]#:}|fk18';#<}/+!^= ", +" %^);:<}<:]]_]~_:}$p^!+/}<#~%=q ", +" r%$_#<<#_-!!%''%]st,';:/}/+]$# ", +" ;-;:<}<:;)!'^8,u&vwp&$+/}<#~~+ ", +" ]']+/}<:;-~-*=xuxyzu^]+/}<:~]+ ", +" ;>-~#<]+<}<:}f'=*)<^s8-~#<}<:;%)C ", +" !=*%~#<}/dD8=8+jEF2i9d}}/_$&u ", +" ou>]+<}|kD,**#|1DlmG57<:;'x* ", +" BH*%~#<7k<=*8&>%;+/gI7/+$^8+ ", +" :xu>]+<}1-=*8&^%]_:a4|#;',x9 ", +" (p*-~#/<~~_+_+#]~+:/}fJJfJ1dk6}_;'== ", +" +&=>-]_+#/<<<<<#:_;$)8&K ", +" [&u*^-]~+#<%]~+:_;$)8oo=L ", +" L*,Au*>-]]$)&oH,>2 ", +" #*p,o=^)8,8p)f ", +" D:]^=*>_#m ", +" "}; diff --git a/share/pixmaps/bitcoin80.xpm b/share/pixmaps/bitcoin80.xpm new file mode 100644 index 0000000..b8113a7 --- /dev/null +++ b/share/pixmaps/bitcoin80.xpm @@ -0,0 +1,229 @@ +/* XPM */ +static char * bitcoin80_xpm[] = { +"80 80 146 2", +" c None", +". c #C3C3C3", +"+ c #C0C0C0", +"@ c #C0BFBF", +"# c #939292", +"$ c #989898", +"% c #979797", +"& c #949494", +"* c #939393", +"= c #949393", +"- c #959595", +"; c #969595", +"> c #8D8D8D", +", c #A3A2A2", +"' c #8E8D8D", +") c #9D9D9D", +"! c #A9A9A9", +"~ c #ACACAC", +"{ c #AFAFAF", +"] c #B3B3B3", +"^ c #B7B7B7", +"/ c #BBBBBB", +"( c #C1C1C1", +"_ c #C2C2C2", +": c #BEBEBE", +"< c #B2B2B2", +"[ c #ADADAD", +"} c #A4A4A4", +"| c #878686", +"1 c #929191", +"2 c #A7A7A7", +"3 c #9F9F9F", +"4 c #C4C4C4", +"5 c #CACACA", +"6 c #B9B9B9", +"7 c #A0A0A0", +"8 c #A1A1A1", +"9 c #B0B0B0", +"0 c #CDCDCD", +"a c #A3A4A4", +"b c #7F7E7E", +"c c #9D9C9C", +"d c #969696", +"e c #B6B6B6", +"f c #BABABA", +"g c #A5A5A5", +"h c #A2A2A2", +"i c #ABABAB", +"j c #AAAAAA", +"k c #A8A8A8", +"l c #A6A6A6", +"m c #979696", +"n c #CCCCCC", +"o c #AEAEAE", +"p c #A3A3A3", +"q c #828181", +"r c #9B9B9B", +"s c #BCBCBC", +"t c #C5C5C5", +"u c #888888", +"v c #989797", +"w c #9C9C9C", +"x c #BDBDBD", +"y c #8B8B8B", +"z c #848383", +"A c #9B9A9A", +"B c #9E9E9E", +"C c #898888", +"D c #919191", +"E c #838282", +"F c #B4B4B4", +"G c #B1B1B1", +"H c #909090", +"I c #9A9999", +"J c #B5B5B5", +"K c #858383", +"L c #A09F9F", +"M c #9A9A9A", +"N c #999999", +"O c #8C8B8B", +"P c #8E8E8E", +"Q c #868686", +"R c #878787", +"S c #929292", +"T c #898989", +"U c #8A8A8A", +"V c #828282", +"W c #7E7E7E", +"X c #7D7D7D", +"Y c #7C7C7C", +"Z c #818181", +"` c #8F8F8F", +" . c #808080", +".. c #7F7F7F", +"+. c #8D8C8C", +"@. c #848484", +"#. c #8C8C8C", +"$. c #BFBFBF", +"%. c #807E7E", +"&. c #838383", +"*. c #959494", +"=. c #999898", +"-. c #858585", +";. c #A6A7A7", +">. c #7E7D7D", +",. c #C6C6C6", +"'. c #ACABAB", +"). c #B8B8B8", +"!. c #ABAAAA", +"~. c #868585", +"{. c #BCBBBB", +"]. c #7C7B7B", +"^. c #C7C7C7", +"/. c #848282", +"(. c #C8C8C8", +"_. c #9E9D9D", +":. c #C9C9C9", +"<. c #BCBDBD", +"[. c #8B8A8A", +"}. c #817F7F", +"|. c #8A8989", +"1. c #B7B8B8", +"2. c #908F8F", +"3. c #7B7B7B", +"4. c #818080", +"5. c #919090", +"6. c #7A7A7A", +"7. c #8E8C8C", +"8. c #828080", +"9. c #8F8E8E", +"0. c #B1B0B0", +"a. c #C5C4C4", +"b. c #979898", +"c. c #7D7C7C", +"d. c #A9A8A8", +"e. c #B9BABA", +"f. c #807F7F", +"g. c #AAABAB", +"h. c #CACBCB", +"i. c #B0AFAF", +"j. c #AEADAD", +"k. c #959393", +"l. c #888787", +"m. c #858484", +"n. c #CBCBCB", +"o. c #9B9C9C", +" ", +" ", +" ", +" . + @ ", +" # $ $ % & & * = & - ; % # > ", +" , > ' ) ! ~ { ] ^ / + ( _ : / ^ < { [ } * | 1 ", +" * > 2 3 2 4 5 6 ! 7 3 7 8 8 8 8 8 3 3 3 } 9 4 0 6 7 a $ b ", +" c d 7 e f 6 ] g h g ! i i j k 2 l g l 2 ! ! ! g 8 7 i ^ f / [ - 1 ", +" m = 9 j n { ) 2 o { [ ~ i ! k g g } p h p } g 2 ! j i [ [ j 8 3 + ( } k q ", +" r 7 6 s j } i 9 { [ ~ i ! k 2 l } p h h 8 h h } g l 2 k j i [ o ~ 2 } { t j ) u ", +" v h o _ o 3 o 9 { [ ~ j ! k 2 g } p h 8 7 7 3 7 8 8 h p g l 2 k ! i [ [ o k w x ] [ y ", +" * 2 ( < h ~ 9 { o ~ i j k l l } } p h 8 7 7 3 3 3 7 8 8 h p } g l 2 ! j ~ ~ { [ 2 7 4 [ 2 z ", +" A o x 2 g { { o [ i j k l g } p h h 8 7 3 3 B B ) B B 3 7 7 8 h p } g l 2 k j i [ o i 3 ] f , C ", +" D } } _ w i { o ~ i j k l g } p p 8 8 7 7 B B ) ) ) ) ) ) B B 3 7 7 8 h p p g l 2 ! j ~ ~ ~ g 7 ( 2 E ", +" D h F G h [ o ~ i j k l l } p p h 8 8 7 3 3 B B ) w w w w w ) B B B 3 7 8 8 h p } g l 2 ! ! i ~ k 8 : 2 H ", +" I l J ^ h ~ ~ i ! k 2 g } p h h 8 7 3 3 B B B w w ) ) ) ) ) ) ) w ) ) B B 3 3 7 8 h p p g l 2 ! ! i ! w + ! K ", +" * L < i g ~ i ! k l l } } h h 8 7 3 3 B B B ) w w w w r r r r r r w w ) ) B B B 3 7 8 8 h h } g l 2 ! ! k ) 6 p C ", +" 3 F e } o ~ ! l g } p h 8 8 7 3 B B B ) w w r M $ % - & * * * * - d % N r w ) ) ) B B 3 7 8 h h p g g 2 j j 7 ( l E ", +" O p f } { o i k g p h 8 8 3 7 B B ) ) w ) ) r N % * P y u Q Q Q R y > S - $ M r ) ) ) B B 3 3 7 8 8 p p l ! i j r s } T ", +" = j + h 9 { i ! l } h 8 7 3 3 B B ) ) w ) ) w N d H U V W X X X Y X X Z T ` - N r ) w w ) ) B B 3 7 7 8 h g 2 j ~ j g + d ", +" w 8 f 3 9 9 [ j 2 g h 8 7 3 B ) ) ) w ) ) ) ) M d H T .X X W ....W W X Y ..T H d r ) ) ) ) w ) ) B B 3 7 8 p l ! i o 2 j { +. ", +" A 6 [ o < o ~ ! l } 8 8 3 B B ) w w ) ) ) ) w N * y @.Z W X W ......W X X X V #.- M ) ) ) ) ) w w ) B B 3 8 p g 2 ! ~ [ } $.3 %. ", +" % 2 6 p F 9 [ j k g p 8 7 B B ) w ) ) ) w w ) ) $ D #.R &.@.T u R R Q @.&.V W X u * M ) ) w ) ) ) ) ) ) B 3 7 8 p l ! i o o 7 + *. ", +" =.f l < ] { ~ ! l } h 7 3 B ) w ) ) w w ) B B ) $ S > T Q T U U T u R Q -.V ..W Q * r B ) B ) w ) ) ) ) B B 3 8 p g 2 j ~ { ! ~ g u ", +" C o x j F 9 [ i k g p 8 7 3 ) ) ) ) w ) ) B B 3 B $ S ` #.y #.#.#.y U T u Q &.Z ..-.& w 7 B B ) ) w ) ) w ) B 3 7 h p g ! i o 9 } t 1 ", +" ;./ w F ] o ~ ! 2 } h 8 3 B ) w ) ) w B B 3 7 8 ) $ & S ` ` P P P > > y U u @.V Z R d B 7 7 7 3 B ) ) ) ) w ) B 3 8 p g 2 j ~ 9 i [ < >. ", +" ; B 6 ~ F 9 [ i 2 g p 8 7 B B w ) ) w ) B 3 7 8 h ) N - & * * H H H ` ` > #.U Q @.&.y N 8 h 8 8 7 3 ) ) ) ) ) ) ) 3 7 h } g ! ~ o G 3 6 ; ", +" H + k F < { ~ ! l } h 7 3 ) ) w ) ) ) ) 3 7 h p p B M $ $ % - * * S S D ` > y u R -.` B p g } p 8 7 B B w ) ) w ) B 3 8 h g 2 j ~ 9 ~ F h -. ", +" 2 ,.g F 9 [ i 2 g p 8 7 B ) w ) ) w ) ) 7 7 h } p 3 r M N M d d - - & * S H #.U u u - h 2 2 l } 8 7 3 B w ) ) ) w B 3 7 h p l ! i o 9 } . q ", +" % o 2 { < o ~ ! 2 } h 8 3 B ) w ) ) w B B 7 8 p } p 7 ) w w w $ $ % d d - * S P > y #.) 2 j j l g h 8 3 B ) w ) ) w ) B 7 8 p g 2 j ~ 9 } + M ", +" M ^ 7 ] 9 [ i k g p h 7 3 ) w ) ) ) ) B 3 8 h } l p 7 B ) B ) M M N N $ $ d & D ` > * p i [ j k g p h 7 3 ) ) w ) ) ) B 3 8 h } l ! ~ o i g [ ", +" '.v . ! < o ~ ! l } 8 8 3 B ) w ) ) w ) 3 3 8 p g l p 7 3 8 8 3 ) w w r r M $ % & * S r j 9 { [ j 2 g p 7 7 B ) w ) ) w B B 7 8 h g 2 ! ~ { 7 ^ | ", +" & p : o G [ j k g p 8 7 B B w ) ) w ) B 3 7 h } l l } 8 8 h g 8 7 3 B 3 B ) r N $ d d p 9 ] G o j k g p 8 7 3 ) ) ) ) ) ) B 3 7 h } l k i o g ( > ", +" C f i G { i ! l } h 7 3 B ) ) ) ) ) ) 3 7 8 p g k 2 p 8 h } 2 p p h h 8 8 7 B ) w r r ~ J e ] { [ ! 2 g h 8 3 B B w ) ) ) ) B 3 8 p } 2 ! [ j _ N ", +" > ,.3 9 [ i 2 g p h 7 3 ) ) ) ) w ) ) 3 7 h p l ! l p h p g k g g } } } } p 8 8 3 ) h < ).).J G o j k g } h 7 B ) ) w ) w ) B 3 8 h p l ! i i J !.~. ", +" - ,.B o ~ k l } h 8 3 B ) w ) w ) B B 7 8 p g k ! l p } g k ! 2 k k k k 2 2 } l } 7 ! ).s / ^ ] { [ ! 2 } p 8 3 B ) w ) ) w ) B 3 8 p } 2 j ~ 2 {.>. ", +" w + 8 [ i 2 g p h 7 B B w w ) w ) B 3 7 h } l ! j l } } l j ! ! j j i j j ! j i ! } 9 s + x 6 J < o i ! l } 8 7 3 B ) w ) ) ) B 3 7 8 p g 2 i B t ]. ", +" 7 6 } ~ ! l } h 8 3 B ) w ) ) ) ) 3 3 8 p g k j j l } g k i j i ~ ~ [ o o [ G { i ! )._ _ $./ e ] { [ ! 2 g h 8 7 B B ) ) ) ) B B 7 8 h g l j w ^.b ", +" h ] l j 2 g p 8 7 B ) ) ) ) w B B 7 7 h } l ! ~ ! l g 2 j ~ [ [ o { { G G G ^ < ~ { : ,.t ( s 6 J < o i k l } 8 7 3 B ) ) ) ) w B 3 7 h p g ! w t /. ", +" h { 2 ! l } h 8 7 B ) w ) ) w B B 7 8 p g 2 j [ j 2 l k ~ o o { 9 9 < < ] e f J o ^ t 5 (.. $./ e < { ~ ! 2 } h 8 3 B ) w ) ) w ) 3 7 8 p } k ) ( z ", +" _.} ~ j j 2 g p 8 7 3 ) ) ) ) w B B 3 7 h } 2 ! i l g g 2 j o 9 { G < < ] ] e ^ < [ f ,.:.,._ x 6 J G o i k l p 8 7 3 ) ) ) ) w ) B 3 7 h p g ! 3 <.y ", +" 8 g ~ i ~ k g } h 8 3 ) ) ) ) w ) ) 3 7 8 p g k k } h h g 2 o 9 9 9 G < ] ] J ] 9 [ x ^.(.4 $./ ^ F { [ j 2 g h 8 7 B ) ) ) ) w ) B 7 8 h } l j 3 + [. ", +" h { i ~ j 2 } p 8 7 B B w ) ) ) ) B 3 8 h } l g 8 3 7 p l 9 9 9 G G < < < 9 o ~ o $.,.,._ x f J < o i k l } 8 7 3 B ) w ) ) ) ) 3 7 h p g k i 3 ( E ", +" h G i o i k l p h 8 B B ) w ) w ) B B 7 h p g h 3 ) 3 8 ! 9 9 9 < < G G G ~ ! l 9 + t 4 $./ ).] 9 [ ! k g p 8 3 B ) ) ) ) w ) B 3 8 h } l ! ~ B 4 E ", +" 7 e k 9 ~ ! 2 g p 8 3 3 ) ) ) ) w B B 3 8 h } 7 w w ) 3 [ 9 G 9 < G G G i 2 } p 9 $.4 ( x 6 J G o ~ ! l } h 7 7 B ) w ) w ) B B 7 h p l k j [ ) ^.W ", +" M x } < o ~ k l } h 7 3 B ) ) ) ) ) ) B 7 8 8 w M N r B { 9 G G G G 9 9 l h 7 8 9 x ( $./ e ] { [ j k } h 8 3 B B w ) ) ) ) B 3 8 p } l j ~ { B ,.]. ", +" * _ 8 ] 9 ~ j 2 g p 8 7 B B w ) ) w ) B 3 7 3 M $ N M B 9 G G G G 9 { 9 3 3 ) ) i J e J < o i ! l } p 8 3 B B B ) w ) ) ) ) 3 7 h } g k i [ 9 g x }. ", +" |.t 3 J < o ~ ! l } h 8 3 ) ) ) ) ) w B B 3 w $ d d $ 7 9 G G 9 9 { { { M M N % w p } h 7 3 r M N N M r r r ) w w ) ) w ) B 3 8 h } 2 j ~ 9 9 < ~ ", +" | / ! e F 9 [ j k g h h 3 3 B w ) ) ) ) B B N d & d d l < 9 G G { 9 9 ! - % - & S D ` P y y U u T U > D d $ M r ) ) ) ) B 3 7 h p l k i [ G [ ( N ", +" *.g / ] e < o ~ ! l } p 8 3 B w ) ) ) ) B ) $ & * & * o G G 9 9 9 { 9 w S * S D P > y U T T R -.&.Z Z R P * $ r w ) ) ) B 7 8 h } l j ~ 9 ] k 4 U ", +" m . [ ).F 9 [ j k g p 8 7 B B ) ) ) w ) M d * S * & ] G G 9 { { { 9 P P H P > y T T u R -.@.&.&. ...W -.P d M w ) w B 3 7 h p g k i [ G F 8 f Z ", +" m 1.h 6 J G o ~ ! l } h 8 3 ) ) ) ) ) w $ - S S S B < 9 G { 9 { o [ B 3 7 B w r M $ d d & * S ` ` P ..W U * N w w ) B 3 8 p } 2 j ~ { ] 9 } i ", +" 2.{ g F ).] 9 [ j 2 } p 8 7 B B w ) ) w $ * S D D k G 9 9 G { { o { { { o ~ i ! k g } p 8 3 B w r $ X Y @.D N w ) ) B 7 h p g k i [ G J l ( *. ", +" } . 2 f J < o ~ k l p h 7 B B w w ) w % & S S S [ 9 9 G { 9 { o o o o ~ ~ j k 2 g } h 7 7 ) ) r H 3.3.&.H N w ) B 3 8 h } l j ~ 9 < J } :.4. ", +" T ( 2 6 ).F 9 [ j k g h 8 3 B ) ) ) w $ & & * & { G 9 9 9 { { { { o [ ~ i j k 2 g } h 8 7 B ) B &.3.3.V H N ) B B 7 8 p l k i [ G J G J p ", +" 5.8 ).{ 6 e < { ~ ! l } h 7 3 B ) w w N d - - N G G G G 9 9 { { o [ o ~ ~ j j k l g p h 8 3 B ) 6.3.Y &.S N ) B 3 8 h } l j ~ { ] J h x 7. ", +" h s B ).).F 9 [ j 2 g p 8 7 B B w ) w $ $ % } G G 9 9 G 9 9 { { [ o [ ~ i k k l g } h h 7 3 $ 6.3.Y Q * r ) 3 7 8 } g k i [ G J { k J Y ", +" 8.o f o f e < o ~ ! l p 8 7 3 B ) ) ) w w M [ 9 9 9 G G G 9 9 { { o o ~ i j ! 2 l g p p 8 8 * ..X W y - w B 3 8 h } 2 j ~ { ] J g :.#. ", +" D : g ^ ).F 9 [ j 2 g h 8 3 3 B ) B B ) w k k 2 l l l g g g g g g } } p p h 7 7 B r r $ $ y V Z -.H $ ) 3 7 8 p l k j [ G J o [ l q ", +" 9.k ^ l 6 e < o ~ ! l p h 8 7 3 B B B B ) ) w w M $ % - - d d % $ $ % % d d - - & S D P y u Q Q > - w B 7 7 h } l j ~ 9 ] ] B t [. ", +" 9.s i G ^ F 9 [ j 2 g p h h 7 7 3 3 B 3 B w w r N % % % d % % % $ % $ % d d d - & * D P > #.> & N B 7 8 h p g k i [ G ] 2 + B ", +" - w s 8 J J < o ~ ! g l p p h 8 7 7 3 3 B B ) r M N $ $ $ $ $ $ N $ $ $ $ % % % d d - - * & d N ) 7 h p } g l j [ { ] ~ g 0.@. ", +" | j + p e F 9 [ j k 2 l } } p h 8 7 7 7 3 B B ) r w r M M M r M M M M M M r M r r r r r ) B 7 8 h } g l 2 ! i o G { g a.+. ", +" ~.2 e k F < o [ ~ j ! k l l } h h 8 7 7 3 3 B B B ) ) ) ) ) ) ) ) ) ) ) ) B B 3 3 7 8 h h p } l l 2 ! i ~ o { { B ( b. ", +" - ^ { k ] G 9 o [ i j ! k g g p p 8 8 8 3 3 3 B ) ) ) ) ) ) ) w ) ) B B 3 3 3 7 8 h h } g l k ! i i o { G { 8 (.p c. ", +" - x 2 ! F F < 9 o [ ~ i ! k l g } p p h 8 7 3 B B B ) ) ) ) ) ) B 3 7 7 8 h h } g g 2 k j i ~ [ o 9 ] G 8 ).l Z ", +" L + i i e J J < 9 { [ ~ j k 2 l g } p h 8 8 7 3 B B ) ) ) 3 B 3 7 8 8 p p } g l k ! i ~ o o G < F < h 4 d.Z ", +" v e.9 l e ).e J < 9 { [ i j ! 2 l g } p h 8 7 3 3 B B B 3 7 8 h h p } g l k ! i ~ o { G ] F e < h : ! -. ", +" N < e g e 6 ).e J < 9 o [ ~ j ! k l g } p h 8 8 7 7 8 8 h h } g g 2 2 ! i ~ o o G ] J ^ ^ { 3 t ) 4. ", +" O [ _ h G f 6 ).J ] G 9 o [ ~ j ! 2 l g p p 8 8 7 8 h p } g l 2 k i i [ { 9 < F e ).e l ~ / r f. ", +" U ) ( j k e f 6 ).J F < 9 { [ i j ! 2 l } } p p p } g l k ! j ~ [ { G ] F ^ 6 ).9 g ^ f S ", +" E A g.5 8 ~ 6 f 6 ).J F < 9 { [ ~ i k 2 g g } g l k ! i ~ [ o 9 ] F e 6 6 F p o ^.8 E ", +" U _./ 6 ! ! ^ / f ).e F < 9 o [ i j k 2 l k ! i ~ [ { 9 ] F e ).6 G p 9 s G y ", +" O 8 : + 7 k ] ).6 ).e F < 9 o ~ ~ j j i ~ [ o 9 ] F e e J o h k h.[ *.b ", +" @.7 0.: $.k 8 j ] e e J ] G o o ~ [ { < ] F ] o } 7 < . 6 !.' q ", +" -.5.c / ,.e i k ! k k k k l l l 2 l 2 k ! i.$.4 j.k.l. ", +" b m.$ p i 6 t n.n.0 n.n n 0 5 + ] k o.O ..b ", +" m.-.R l.y #.O C R @.z ", +" ", +" "}; diff --git a/share/pixmaps/check.ico b/share/pixmaps/check.ico new file mode 100644 index 0000000..0c4e6e8 Binary files /dev/null and b/share/pixmaps/check.ico differ diff --git a/share/pixmaps/favicon.ico b/share/pixmaps/favicon.ico new file mode 100644 index 0000000..be52174 Binary files /dev/null and b/share/pixmaps/favicon.ico differ diff --git a/share/pixmaps/nsis-header.bmp b/share/pixmaps/nsis-header.bmp new file mode 100644 index 0000000..b5a3040 Binary files /dev/null and b/share/pixmaps/nsis-header.bmp differ diff --git a/share/pixmaps/nsis-wizard.bmp b/share/pixmaps/nsis-wizard.bmp new file mode 100644 index 0000000..e85bc19 Binary files /dev/null and b/share/pixmaps/nsis-wizard.bmp differ diff --git a/share/pixmaps/send16.bmp b/share/pixmaps/send16.bmp new file mode 100644 index 0000000..676b5c4 Binary files /dev/null and b/share/pixmaps/send16.bmp differ diff --git a/share/pixmaps/send16mask.bmp b/share/pixmaps/send16mask.bmp new file mode 100644 index 0000000..06c747f Binary files /dev/null and b/share/pixmaps/send16mask.bmp differ diff --git a/share/pixmaps/send16masknoshadow.bmp b/share/pixmaps/send16masknoshadow.bmp new file mode 100644 index 0000000..faf24e0 Binary files /dev/null and b/share/pixmaps/send16masknoshadow.bmp differ diff --git a/share/pixmaps/send20.bmp b/share/pixmaps/send20.bmp new file mode 100644 index 0000000..2b90422 Binary files /dev/null and b/share/pixmaps/send20.bmp differ diff --git a/share/pixmaps/send20mask.bmp b/share/pixmaps/send20mask.bmp new file mode 100644 index 0000000..f124d0d Binary files /dev/null and b/share/pixmaps/send20mask.bmp differ diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py new file mode 100644 index 0000000..1267b18 --- /dev/null +++ b/share/qt/extract_strings_qt.py @@ -0,0 +1,72 @@ +#!/usr/bin/python +''' +Extract _("...") strings for translation and convert to Qt4 stringdefs so that +they can be picked up by Qt linguist. +''' +from subprocess import Popen, PIPE +import glob +import operator + +OUT_CPP="src/qt/bitcoinstrings.cpp" +EMPTY=['""'] + +def parse_po(text): + """ + Parse 'po' format produced by xgettext. + Return a list of (msgid,msgstr) tuples. + """ + messages = [] + msgid = [] + msgstr = [] + in_msgid = False + in_msgstr = False + + for line in text.split('\n'): + line = line.rstrip('\r') + if line.startswith('msgid '): + if in_msgstr: + messages.append((msgid, msgstr)) + in_msgstr = False + # message start + in_msgid = True + + msgid = [line[6:]] + elif line.startswith('msgstr '): + in_msgid = False + in_msgstr = True + msgstr = [line[7:]] + elif line.startswith('"'): + if in_msgid: + msgid.append(line) + if in_msgstr: + msgstr.append(line) + + if in_msgstr: + messages.append((msgid, msgstr)) + + return messages + +files = glob.glob('src/*.cpp') + glob.glob('src/*.h') + +# xgettext -n --keyword=_ $FILES +child = Popen(['xgettext','--output=-','-n','--keyword=_'] + files, stdout=PIPE) +(out, err) = child.communicate() + +messages = parse_po(out) + +f = open(OUT_CPP, 'w') +f.write("""#include +// Automatically generated by extract_strings.py +#ifdef __GNUC__ +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif +""") +f.write('static const char UNUSED *bitcoin_strings[] = {\n') +messages.sort(key=operator.itemgetter(0)) +for (msgid, msgstr) in messages: + if msgid != EMPTY: + f.write('QT_TRANSLATE_NOOP("bitcoin-core", %s),\n' % ('\n'.join(msgid))) +f.write('};') +f.close() diff --git a/share/qt/img/reload.xcf b/share/qt/img/reload.xcf new file mode 100644 index 0000000..dc8be62 Binary files /dev/null and b/share/qt/img/reload.xcf differ diff --git a/share/qt/make_spinner.py b/share/qt/make_spinner.py new file mode 100644 index 0000000..136aff3 --- /dev/null +++ b/share/qt/make_spinner.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# W.J. van der Laan, 2011 +# Make spinning .mng animation from a .png +# Requires imagemagick 6.7+ +from __future__ import division +from os import path +from PIL import Image +from subprocess import Popen + +SRC='img/reload_scaled.png' +DST='../../src/qt/res/movies/update_spinner.mng' +TMPDIR='/tmp' +TMPNAME='tmp-%03i.png' +NUMFRAMES=35 +FRAMERATE=10.0 +CONVERT='convert' +CLOCKWISE=True +DSIZE=(16,16) + +im_src = Image.open(SRC) + +if CLOCKWISE: + im_src = im_src.transpose(Image.FLIP_LEFT_RIGHT) + +def frame_to_filename(frame): + return path.join(TMPDIR, TMPNAME % frame) + +frame_files = [] +for frame in xrange(NUMFRAMES): + rotation = (frame + 0.5) / NUMFRAMES * 360.0 + if CLOCKWISE: + rotation = -rotation + im_new = im_src.rotate(rotation, Image.BICUBIC) + im_new.thumbnail(DSIZE, Image.ANTIALIAS) + outfile = frame_to_filename(frame) + im_new.save(outfile, 'png') + frame_files.append(outfile) + +p = Popen([CONVERT, "-delay", str(FRAMERATE), "-dispose", "2"] + frame_files + [DST]) +p.communicate() + + + diff --git a/share/qt/make_windows_icon.sh b/share/qt/make_windows_icon.sh new file mode 100644 index 0000000..bf607b1 --- /dev/null +++ b/share/qt/make_windows_icon.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# create multiresolution windows icon +ICON_SRC=../../src/qt/res/icons/bitcoin.png +ICON_DST=../../src/qt/res/icons/bitcoin.ico +convert ${ICON_SRC} -resize 16x16 bitcoin-16.png +convert ${ICON_SRC} -resize 32x32 bitcoin-32.png +convert ${ICON_SRC} -resize 48x48 bitcoin-48.png +convert bitcoin-16.png bitcoin-32.png bitcoin-48.png ${ICON_DST} + diff --git a/share/setup.nsi b/share/setup.nsi new file mode 100644 index 0000000..2fd5759 --- /dev/null +++ b/share/setup.nsi @@ -0,0 +1,162 @@ +Name curecoin + +RequestExecutionLevel highest +SetCompressor /SOLID lzma + +# General Symbol Definitions +!define REGKEY "SOFTWARE\$(^Name)" +!define VERSION 0.6.9.2 +!define COMPANY "curecoin project" +!define URL http://www.org/ + +# MUI Symbol Definitions +!define MUI_ICON "../share/pixmaps/bitcoin.ico" +!define MUI_WELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp" +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_RIGHT +!define MUI_HEADERIMAGE_BITMAP "../share/pixmaps/nsis-header.bmp" +!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM +!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY} +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup +!define MUI_STARTMENUPAGE_DEFAULTFOLDER curecoin +!define MUI_FINISHPAGE_RUN $INSTDIR\curecoin-qt.exe +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" +!define MUI_UNWELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp" +!define MUI_UNFINISHPAGE_NOAUTOCLOSE + +# Included files +!include Sections.nsh +!include MUI2.nsh + +# Variables +Var StartMenuGroup + +# Installer pages +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES + +# Installer languages +!insertmacro MUI_LANGUAGE English + +# Installer attributes +OutFile curecoin-0.1-win32-setup.exe +InstallDir $PROGRAMFILES\curecoin +CRCCheck on +XPStyle on +BrandingText " " +ShowInstDetails show +VIProductVersion 0.6.9.2 +VIAddVersionKey ProductName curecoin +VIAddVersionKey ProductVersion "${VERSION}" +VIAddVersionKey CompanyName "${COMPANY}" +VIAddVersionKey CompanyWebsite "${URL}" +VIAddVersionKey FileVersion "${VERSION}" +VIAddVersionKey FileDescription "" +VIAddVersionKey LegalCopyright "" +InstallDirRegKey HKCU "${REGKEY}" Path +ShowUninstDetails show + +# Installer sections +Section -Main SEC0000 + SetOutPath $INSTDIR + SetOverwrite on + File ../release/curecoin-qt.exe + File /oname=license.txt ../COPYING + File /oname=readme.txt ../doc/README_windows.txt + SetOutPath $INSTDIR\daemon + File ../src/curecoind.exe + SetOutPath $INSTDIR\src + File /r /x *.exe /x *.o ../src\*.* + SetOutPath $INSTDIR + WriteRegStr HKCU "${REGKEY}\Components" Main 1 + + # Remove old wxwidgets-based-bitcoin executable and locales: + Delete /REBOOTOK $INSTDIR\curecoin.exe + RMDir /r /REBOOTOK $INSTDIR\locale +SectionEnd + +Section -post SEC0001 + WriteRegStr HKCU "${REGKEY}" Path $INSTDIR + SetOutPath $INSTDIR + WriteUninstaller $INSTDIR\uninstall.exe + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory $SMPROGRAMS\$StartMenuGroup + CreateShortcut "$SMPROGRAMS\$StartMenuGroup\curecoin.lnk" $INSTDIR\curecoin-qt.exe + CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall curecoin.lnk" $INSTDIR\uninstall.exe + !insertmacro MUI_STARTMENU_WRITE_END + WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)" + WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}" + WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}" + WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}" + WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe + WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe + WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1 + WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1 + WriteRegStr HKCR "curecoin" "URL Protocol" "" + WriteRegStr HKCR "curecoin" "" "URL:Bitcoin" + WriteRegStr HKCR "curecoin\DefaultIcon" "" $INSTDIR\curecoin-qt.exe + WriteRegStr HKCR "curecoin\shell\open\command" "" '"$INSTDIR\curecoin-qt.exe" "$$1"' +SectionEnd + +# Macro for selecting uninstaller sections +!macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID + Push $R0 + ReadRegStr $R0 HKCU "${REGKEY}\Components" "${SECTION_NAME}" + StrCmp $R0 1 0 next${UNSECTION_ID} + !insertmacro SelectSection "${UNSECTION_ID}" + GoTo done${UNSECTION_ID} +next${UNSECTION_ID}: + !insertmacro UnselectSection "${UNSECTION_ID}" +done${UNSECTION_ID}: + Pop $R0 +!macroend + +# Uninstaller sections +Section /o -un.Main UNSEC0000 + Delete /REBOOTOK $INSTDIR\curecoin-qt.exe + Delete /REBOOTOK $INSTDIR\license.txt + Delete /REBOOTOK $INSTDIR\readme.txt + RMDir /r /REBOOTOK $INSTDIR\daemon + RMDir /r /REBOOTOK $INSTDIR\src + DeleteRegValue HKCU "${REGKEY}\Components" Main +SectionEnd + +Section -un.post UNSEC0001 + DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" + Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall curecoin.lnk" + Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\curecoin.lnk" + Delete /REBOOTOK "$SMSTARTUP\curecoin.lnk" + Delete /REBOOTOK $INSTDIR\uninstall.exe + Delete /REBOOTOK $INSTDIR\debug.log + Delete /REBOOTOK $INSTDIR\db.log + DeleteRegValue HKCU "${REGKEY}" StartMenuGroup + DeleteRegValue HKCU "${REGKEY}" Path + DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components" + DeleteRegKey /IfEmpty HKCU "${REGKEY}" + DeleteRegKey HKCR "curecoin" + RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup + RmDir /REBOOTOK $INSTDIR + Push $R0 + StrCpy $R0 $StartMenuGroup 1 + StrCmp $R0 ">" no_smgroup +no_smgroup: + Pop $R0 +SectionEnd + +# Installer functions +Function .onInit + InitPluginsDir +FunctionEnd + +# Uninstaller functions +Function un.onInit + ReadRegStr $INSTDIR HKCU "${REGKEY}" Path + !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup + !insertmacro SELECT_UNSECTION Main ${UNSEC0000} +FunctionEnd diff --git a/share/ui.rc b/share/ui.rc new file mode 100644 index 0000000..c3cece1 --- /dev/null +++ b/share/ui.rc @@ -0,0 +1,15 @@ +bitcoin ICON "pixmaps/bitcoin.ico" + +#include "wx/msw/wx.rc" + +check ICON "pixmaps/check.ico" +send16 BITMAP "pixmaps/send16.bmp" +send16mask BITMAP "pixmaps/send16mask.bmp" +send16masknoshadow BITMAP "pixmaps/send16masknoshadow.bmp" +send20 BITMAP "pixmaps/send20.bmp" +send20mask BITMAP "pixmaps/send20mask.bmp" +addressbook16 BITMAP "pixmaps/addressbook16.bmp" +addressbook16mask BITMAP "pixmaps/addressbook16mask.bmp" +addressbook20 BITMAP "pixmaps/addressbook20.bmp" +addressbook20mask BITMAP "pixmaps/addressbook20mask.bmp" +favicon ICON "pixmaps/favicon.ico" diff --git a/src/addrman.cpp b/src/addrman.cpp new file mode 100644 index 0000000..4428cd1 --- /dev/null +++ b/src/addrman.cpp @@ -0,0 +1,527 @@ +// 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. + +#include "addrman.h" + +using namespace std; + +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(); + + 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(); + return hash2 % ADDRMAN_TRIED_BUCKET_COUNT; +} + +int CAddrInfo::GetNewBucket(const std::vector &nKey, const CNetAddr& src) const +{ + CDataStream ss1(SER_GETHASH, 0); + std::vector vchGroupKey = GetGroup(); + std::vector vchSourceGroupKey = src.GetGroup(); + ss1 << nKey << vchGroupKey << vchSourceGroupKey; + uint64 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(); + return hash2 % ADDRMAN_NEW_BUCKET_COUNT; +} + +bool CAddrInfo::IsTerrible(int64 nNow) const +{ + if (nLastTry && nLastTry >= nNow-60) // never remove things tried the last minute + return false; + + if (nTime > nNow + 10*60) // came in a flying DeLorean + return true; + + if (nTime==0 || nNow-nTime > ADDRMAN_HORIZON_DAYS*86400) // not seen in over a month + return true; + + if (nLastSuccess==0 && nAttempts>=ADDRMAN_RETRIES) // tried three times and never a success + return true; + + if (nNow-nLastSuccess > ADDRMAN_MIN_FAIL_DAYS*86400 && nAttempts>=ADDRMAN_MAX_FAILURES) // 10 successive failures in the last week + return true; + + return false; +} + +double CAddrInfo::GetChance(int64 nNow) const +{ + double fChance = 1.0; + + int64 nSinceLastSeen = nNow - nTime; + int64 nSinceLastTry = nNow - nLastTry; + + if (nSinceLastSeen < 0) nSinceLastSeen = 0; + if (nSinceLastTry < 0) nSinceLastTry = 0; + + fChance *= 600.0 / (600.0 + nSinceLastSeen); + + // deprioritize very recent attempts away + if (nSinceLastTry < 60*10) + fChance *= 0.01; + + // deprioritize 50% after each failed attempt + for (int n=0; n::iterator it = mapAddr.find(addr); + if (it == mapAddr.end()) + return NULL; + if (pnId) + *pnId = (*it).second; + std::map::iterator it2 = mapInfo.find((*it).second); + if (it2 != mapInfo.end()) + return &(*it2).second; + return NULL; +} + +CAddrInfo* CAddrMan::Create(const CAddress &addr, const CNetAddr &addrSource, int *pnId) +{ + int nId = nIdCount++; + mapInfo[nId] = CAddrInfo(addr, addrSource); + mapAddr[addr] = nId; + mapInfo[nId].nRandomPos = vRandom.size(); + vRandom.push_back(nId); + if (pnId) + *pnId = nId; + return &mapInfo[nId]; +} + +void CAddrMan::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2) +{ + if (nRndPos1 == nRndPos2) + return; + + assert(nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size()); + + int nId1 = vRandom[nRndPos1]; + int nId2 = vRandom[nRndPos2]; + + assert(mapInfo.count(nId1) == 1); + assert(mapInfo.count(nId2) == 1); + + mapInfo[nId1].nRandomPos = nRndPos2; + mapInfo[nId2].nRandomPos = nRndPos1; + + vRandom[nRndPos1] = nId2; + vRandom[nRndPos2] = nId1; +} + +int CAddrMan::SelectTried(int nKBucket) +{ + std::vector &vTried = vvTried[nKBucket]; + + // random shuffle the first few elements (using the entire list) + // find the least recently tried among them + int64 nOldest = -1; + int nOldestPos = -1; + for (unsigned int i = 0; i < ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT && i < vTried.size(); i++) + { + int nPos = GetRandInt(vTried.size() - i) + i; + int nTemp = vTried[nPos]; + vTried[nPos] = vTried[i]; + vTried[i] = nTemp; + assert(nOldest == -1 || mapInfo.count(nTemp) == 1); + if (nOldest == -1 || mapInfo[nTemp].nLastSuccess < mapInfo[nOldest].nLastSuccess) { + nOldest = nTemp; + nOldestPos = nPos; + } + } + + return nOldestPos; +} + +int CAddrMan::ShrinkNew(int nUBucket) +{ + assert(nUBucket >= 0 && (unsigned int)nUBucket < vvNew.size()); + std::set &vNew = vvNew[nUBucket]; + + // first look for deletable items + for (std::set::iterator it = vNew.begin(); it != vNew.end(); it++) + { + assert(mapInfo.count(*it)); + CAddrInfo &info = mapInfo[*it]; + if (info.IsTerrible()) + { + if (--info.nRefCount == 0) + { + SwapRandom(info.nRandomPos, vRandom.size()-1); + vRandom.pop_back(); + mapAddr.erase(info); + mapInfo.erase(*it); + nNew--; + } + vNew.erase(it); + return 0; + } + } + + // otherwise, select four randomly, and pick the oldest of those to replace + int n[4] = {GetRandInt(vNew.size()), GetRandInt(vNew.size()), GetRandInt(vNew.size()), GetRandInt(vNew.size())}; + int nI = 0; + int nOldest = -1; + for (std::set::iterator it = vNew.begin(); it != vNew.end(); it++) + { + if (nI == n[0] || nI == n[1] || nI == n[2] || nI == n[3]) + { + assert(nOldest == -1 || mapInfo.count(*it) == 1); + if (nOldest == -1 || mapInfo[*it].nTime < mapInfo[nOldest].nTime) + nOldest = *it; + } + nI++; + } + assert(mapInfo.count(nOldest) == 1); + CAddrInfo &info = mapInfo[nOldest]; + if (--info.nRefCount == 0) + { + SwapRandom(info.nRandomPos, vRandom.size()-1); + vRandom.pop_back(); + mapAddr.erase(info); + mapInfo.erase(nOldest); + nNew--; + } + vNew.erase(nOldest); + + return 1; +} + +void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin) +{ + assert(vvNew[nOrigin].count(nId) == 1); + + // remove the entry from all new buckets + for (std::vector >::iterator it = vvNew.begin(); it != vvNew.end(); it++) + { + if ((*it).erase(nId)) + info.nRefCount--; + } + nNew--; + + assert(info.nRefCount == 0); + + // what tried bucket to move the entry to + int nKBucket = info.GetTriedBucket(nKey); + std::vector &vTried = vvTried[nKBucket]; + + // first check whether there is place to just add it + if (vTried.size() < ADDRMAN_TRIED_BUCKET_SIZE) + { + vTried.push_back(nId); + nTried++; + info.fInTried = true; + return; + } + + // otherwise, find an item to evict + int nPos = SelectTried(nKBucket); + + // find which new bucket it belongs to + assert(mapInfo.count(vTried[nPos]) == 1); + int nUBucket = mapInfo[vTried[nPos]].GetNewBucket(nKey); + std::set &vNew = vvNew[nUBucket]; + + // remove the to-be-replaced tried entry from the tried set + CAddrInfo& infoOld = mapInfo[vTried[nPos]]; + infoOld.fInTried = false; + infoOld.nRefCount = 1; + // do not update nTried, as we are going to move something else there immediately + + // check whether there is place in that one, + if (vNew.size() < ADDRMAN_NEW_BUCKET_SIZE) + { + // if so, move it back there + vNew.insert(vTried[nPos]); + } else { + // otherwise, move it to the new bucket nId came from (there is certainly place there) + vvNew[nOrigin].insert(vTried[nPos]); + } + nNew++; + + vTried[nPos] = nId; + // we just overwrote an entry in vTried; no need to update nTried + info.fInTried = true; + return; +} + +void CAddrMan::Good_(const CService &addr, int64 nTime) +{ +// printf("Good: addr=%s\n", addr.ToString().c_str()); + + int nId; + CAddrInfo *pinfo = Find(addr, &nId); + + // if not found, bail out + if (!pinfo) + return; + + CAddrInfo &info = *pinfo; + + // check whether we are talking about the exact same CService (including same port) + if (info != addr) + return; + + // update info + info.nLastSuccess = nTime; + info.nLastTry = nTime; + info.nTime = nTime; + info.nAttempts = 0; + + // if it is already in the tried set, don't do anything else + if (info.fInTried) + return; + + // find a bucket it is in now + int nRnd = GetRandInt(vvNew.size()); + int nUBucket = -1; + for (unsigned int n = 0; n < vvNew.size(); n++) + { + int nB = (n+nRnd) % vvNew.size(); + std::set &vNew = vvNew[nB]; + if (vNew.count(nId)) + { + nUBucket = nB; + break; + } + } + + // if no bucket is found, something bad happened; + // TODO: maybe re-add the node, but for now, just bail out + if (nUBucket == -1) return; + + printf("Moving %s to tried\n", addr.ToString().c_str()); + + // move nId to the tried tables + MakeTried(info, nId, nUBucket); +} + +bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64 nTimePenalty) +{ + if (!addr.IsRoutable()) + return false; + + bool fNew = false; + int nId; + CAddrInfo *pinfo = Find(addr, &nId); + + if (pinfo) + { + // periodically update nTime + bool fCurrentlyOnline = (GetAdjustedTime() - addr.nTime < 24 * 60 * 60); + int64 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); + + // add services + pinfo->nServices |= addr.nServices; + + // do not update if no new information is present + if (!addr.nTime || (pinfo->nTime && addr.nTime <= pinfo->nTime)) + return false; + + // do not update if the entry was already in the "tried" table + if (pinfo->fInTried) + return false; + + // do not update if the max reference count is reached + if (pinfo->nRefCount == ADDRMAN_NEW_BUCKETS_PER_ADDRESS) + return false; + + // stochastic test: previous nRefCount == N: 2^N times harder to increase it + int nFactor = 1; + for (int n=0; nnRefCount; n++) + nFactor *= 2; + if (nFactor > 1 && (GetRandInt(nFactor) != 0)) + return false; + } else { + pinfo = Create(addr, source, &nId); + pinfo->nTime = max((int64)0, (int64)pinfo->nTime - nTimePenalty); +// printf("Added %s [nTime=%fhr]\n", pinfo->ToString().c_str(), (GetAdjustedTime() - pinfo->nTime) / 3600.0); + nNew++; + fNew = true; + } + + int nUBucket = pinfo->GetNewBucket(nKey, source); + std::set &vNew = vvNew[nUBucket]; + if (!vNew.count(nId)) + { + pinfo->nRefCount++; + if (vNew.size() == ADDRMAN_NEW_BUCKET_SIZE) + ShrinkNew(nUBucket); + vvNew[nUBucket].insert(nId); + } + return fNew; +} + +void CAddrMan::Attempt_(const CService &addr, int64 nTime) +{ + CAddrInfo *pinfo = Find(addr); + + // if not found, bail out + if (!pinfo) + return; + + CAddrInfo &info = *pinfo; + + // check whether we are talking about the exact same CService (including same port) + if (info != addr) + return; + + // update info + info.nLastTry = nTime; + info.nAttempts++; +} + +CAddress CAddrMan::Select_(int nUnkBias) +{ + if (size() == 0) + return CAddress(); + + double nCorTried = sqrt(nTried) * (100.0 - nUnkBias); + double nCorNew = sqrt(nNew) * nUnkBias; + if ((nCorTried + nCorNew)*GetRandInt(1<<30)/(1<<30) < nCorTried) + { + // use a tried node + double fChanceFactor = 1.0; + while(1) + { + int nKBucket = GetRandInt(vvTried.size()); + std::vector &vTried = vvTried[nKBucket]; + if (vTried.size() == 0) continue; + int nPos = GetRandInt(vTried.size()); + assert(mapInfo.count(vTried[nPos]) == 1); + CAddrInfo &info = mapInfo[vTried[nPos]]; + if (GetRandInt(1<<30) < fChanceFactor*info.GetChance()*(1<<30)) + return info; + fChanceFactor *= 1.2; + } + } else { + // use a new node + double fChanceFactor = 1.0; + while(1) + { + int nUBucket = GetRandInt(vvNew.size()); + std::set &vNew = vvNew[nUBucket]; + if (vNew.size() == 0) continue; + int nPos = GetRandInt(vNew.size()); + std::set::iterator it = vNew.begin(); + while (nPos--) + it++; + assert(mapInfo.count(*it) == 1); + CAddrInfo &info = mapInfo[*it]; + if (GetRandInt(1<<30) < fChanceFactor*info.GetChance()*(1<<30)) + return info; + fChanceFactor *= 1.2; + } + } +} + +#ifdef DEBUG_ADDRMAN +int CAddrMan::Check_() +{ + std::set setTried; + std::map mapNew; + + if (vRandom.size() != nTried + nNew) return -7; + + for (std::map::iterator it = mapInfo.begin(); it != mapInfo.end(); it++) + { + int n = (*it).first; + CAddrInfo &info = (*it).second; + if (info.fInTried) + { + + if (!info.nLastSuccess) return -1; + if (info.nRefCount) return -2; + setTried.insert(n); + } else { + if (info.nRefCount < 0 || info.nRefCount > ADDRMAN_NEW_BUCKETS_PER_ADDRESS) return -3; + if (!info.nRefCount) return -4; + mapNew[n] = info.nRefCount; + } + if (mapAddr[info] != n) return -5; + if (info.nRandomPos<0 || info.nRandomPos>=vRandom.size() || vRandom[info.nRandomPos] != n) return -14; + if (info.nLastTry < 0) return -6; + if (info.nLastSuccess < 0) return -8; + } + + if (setTried.size() != nTried) return -9; + if (mapNew.size() != nNew) return -10; + + for (int n=0; n &vTried = vvTried[n]; + for (std::vector::iterator it = vTried.begin(); it != vTried.end(); it++) + { + if (!setTried.count(*it)) return -11; + setTried.erase(*it); + } + } + + for (int n=0; n &vNew = vvNew[n]; + for (std::set::iterator it = vNew.begin(); it != vNew.end(); it++) + { + if (!mapNew.count(*it)) return -12; + if (--mapNew[*it] == 0) + mapNew.erase(*it); + } + } + + if (setTried.size()) return -13; + if (mapNew.size()) return -15; + + return 0; +} +#endif + +void CAddrMan::GetAddr_(std::vector &vAddr) +{ + int nNodes = ADDRMAN_GETADDR_MAX_PCT*vRandom.size()/100; + if (nNodes > ADDRMAN_GETADDR_MAX) + nNodes = ADDRMAN_GETADDR_MAX; + + // perform a random shuffle over the first nNodes elements of vRandom (selecting from all) + for (int n = 0; n nUpdateInterval) + info.nTime = nTime; +} diff --git a/src/addrman.h b/src/addrman.h new file mode 100644 index 0000000..d6d20ff --- /dev/null +++ b/src/addrman.h @@ -0,0 +1,503 @@ +// 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 _curecoin_ADDRMAN +#define _curecoin_ADDRMAN 1 + +#include "netbase.h" +#include "protocol.h" +#include "util.h" +#include "sync.h" + + +#include +#include + +#include + + +/** Extended statistics about a CAddress */ +class CAddrInfo : public CAddress +{ +private: + // where knowledge about this address first came from + CNetAddr source; + + // last successful connection by us + int64 nLastSuccess; + + // last try whatsoever by us: + // int64 CAddress::nLastTry + + // connection attempts since last successful attempt + int nAttempts; + + // reference count in new sets (memory only) + int nRefCount; + + // in tried set? (memory only) + bool fInTried; + + // position in vRandom + int nRandomPos; + + friend class CAddrMan; + +public: + + IMPLEMENT_SERIALIZE( + CAddress* pthis = (CAddress*)(this); + READWRITE(*pthis); + READWRITE(source); + READWRITE(nLastSuccess); + READWRITE(nAttempts); + ) + + void Init() + { + nLastSuccess = 0; + nLastTry = 0; + nAttempts = 0; + nRefCount = 0; + fInTried = false; + nRandomPos = -1; + } + + CAddrInfo(const CAddress &addrIn, const CNetAddr &addrSource) : CAddress(addrIn), source(addrSource) + { + Init(); + } + + CAddrInfo() : CAddress(), source() + { + Init(); + } + + // Calculate in which "tried" bucket this entry belongs + int GetTriedBucket(const std::vector &nKey) const; + + // Calculate in which "new" bucket this entry belongs, given a certain source + int GetNewBucket(const std::vector &nKey, const CNetAddr& src) const; + + // Calculate in which "new" bucket this entry belongs, using its default source + int GetNewBucket(const std::vector &nKey) const + { + return GetNewBucket(nKey, source); + } + + // Determine whether the statistics about this entry are bad enough so that it can just be deleted + bool IsTerrible(int64 nNow = GetAdjustedTime()) const; + + // Calculate the relative chance this entry should be given when selecting nodes to connect to + double GetChance(int64 nNow = GetAdjustedTime()) const; + +}; + +// Stochastic address manager +// +// Design goals: +// * Only keep a limited number of addresses around, so that addr.dat and memory requirements do not grow without bound. +// * Keep the address tables in-memory, and asynchronously dump the entire to able in addr.dat. +// * Make sure no (localized) attacker can fill the entire table with his nodes/addresses. +// +// To that end: +// * Addresses are organized into buckets. +// * Address that have not yet been tried go into 256 "new" buckets. +// * Based on the address range (/16 for IPv4) of source of the information, 32 buckets are selected at random +// * The actual bucket is chosen from one of these, based on the range the address itself is located. +// * One single address can occur in up to 4 different buckets, to increase selection chances for addresses that +// are seen frequently. The chance for increasing this multiplicity decreases exponentially. +// * When adding a new address to a full bucket, a randomly chosen entry (with a bias favoring less recently seen +// ones) is removed from it first. +// * Addresses of nodes that are known to be accessible go into 64 "tried" buckets. +// * Each address range selects at random 4 of these buckets. +// * The actual bucket is chosen from one of these, based on the full address. +// * When adding a new good address to a full bucket, a randomly chosen entry (with a bias favoring less recently +// tried ones) is evicted from it, back to the "new" buckets. +// * Bucket selection is based on cryptographic hashing, using a randomly-generated 256-bit key, which should not +// be observable by adversaries. +// * Several indexes are kept for high performance. Defining DEBUG_ADDRMAN will introduce frequent (and expensive) +// consistency checks for the entire data structure. + +// total number of buckets for tried addresses +#define ADDRMAN_TRIED_BUCKET_COUNT 64 + +// maximum allowed number of entries in buckets for tried addresses +#define ADDRMAN_TRIED_BUCKET_SIZE 64 + +// total number of buckets for new addresses +#define ADDRMAN_NEW_BUCKET_COUNT 256 + +// maximum allowed number of entries in buckets for new addresses +#define ADDRMAN_NEW_BUCKET_SIZE 64 + +// over how many buckets entries with tried addresses from a single group (/16 for IPv4) are spread +#define ADDRMAN_TRIED_BUCKETS_PER_GROUP 4 + +// over how many buckets entries with new addresses originating from a single group are spread +#define ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP 32 + +// in how many buckets for entries with new addresses a single address may occur +#define ADDRMAN_NEW_BUCKETS_PER_ADDRESS 4 + +// how many entries in a bucket with tried addresses are inspected, when selecting one to replace +#define ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT 4 + +// how old addresses can maximally be +#define ADDRMAN_HORIZON_DAYS 30 + +// after how many failed attempts we give up on a new node +#define ADDRMAN_RETRIES 3 + +// how many successive failures are allowed ... +#define ADDRMAN_MAX_FAILURES 10 + +// ... in at least this many days +#define ADDRMAN_MIN_FAIL_DAYS 7 + +// the maximum percentage of nodes to return in a getaddr call +#define ADDRMAN_GETADDR_MAX_PCT 23 + +// the maximum number of nodes to return in a getaddr call +#define ADDRMAN_GETADDR_MAX 2500 + +/** Stochastical (IP) address manager */ +class CAddrMan +{ +private: + // critical section to protect the inner data structures + mutable CCriticalSection cs; + + // secret key to randomize bucket select with + std::vector nKey; + + // last used nId + int nIdCount; + + // table with information about all nIds + std::map mapInfo; + + // find an nId based on its network address + std::map mapAddr; + + // randomly-ordered vector of all nIds + std::vector vRandom; + + // number of "tried" entries + int nTried; + + // list of "tried" buckets + std::vector > vvTried; + + // number of (unique) "new" entries + int nNew; + + // list of "new" buckets + std::vector > vvNew; + +protected: + + // Find an entry. + CAddrInfo* Find(const CNetAddr& addr, int *pnId = NULL); + + // find an entry, creating it if necessary. + // nTime and nServices of found node is updated, if necessary. + CAddrInfo* Create(const CAddress &addr, const CNetAddr &addrSource, int *pnId = NULL); + + // Swap two elements in vRandom. + void SwapRandom(unsigned int nRandomPos1, unsigned int nRandomPos2); + + // Return position in given bucket to replace. + int SelectTried(int nKBucket); + + // Remove an element from a "new" bucket. + // This is the only place where actual deletes occur. + // They are never deleted while in the "tried" table, only possibly evicted back to the "new" table. + int ShrinkNew(int nUBucket); + + // Move an entry from the "new" table(s) to the "tried" table + // @pre vvUnkown[nOrigin].count(nId) != 0 + 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); + + // Add an entry to the "new" table. + bool Add_(const CAddress &addr, const CNetAddr& source, int64 nTimePenalty); + + // Mark an entry as attempted to connect. + void Attempt_(const CService &addr, int64 nTime); + + // Select an address to connect to. + // nUnkBias determines how much to favor new addresses over tried ones (min=0, max=100) + CAddress Select_(int nUnkBias); + +#ifdef DEBUG_ADDRMAN + // Perform consistency check. Returns an error code or zero. + int Check_(); +#endif + + // Select several addresses at once. + void GetAddr_(std::vector &vAddr); + + // Mark an entry as currently-connected-to. + void Connected_(const CService &addr, int64 nTime); + +public: + + IMPLEMENT_SERIALIZE + (({ + // serialized format: + // * version byte (currently 0) + // * nKey + // * nNew + // * nTried + // * number of "new" buckets + // * all nNew addrinfos in vvNew + // * all nTried addrinfos in vvTried + // * for each bucket: + // * number of elements + // * for each element: index + // + // Notice that vvTried, mapAddr and vVector are never encoded explicitly; + // they are instead reconstructed from the other information. + // + // vvNew is serialized, but only used if ADDRMAN_UNKOWN_BUCKET_COUNT didn't change, + // otherwise it is reconstructed as well. + // + // This format is more complex, but significantly smaller (at most 1.5 MiB), and supports + // changes to the ADDRMAN_ parameters without breaking the on-disk structure. + { + LOCK(cs); + unsigned char nVersion = 0; + READWRITE(nVersion); + READWRITE(nKey); + READWRITE(nNew); + READWRITE(nTried); + + CAddrMan *am = const_cast(this); + if (fWrite) + { + int nUBuckets = ADDRMAN_NEW_BUCKET_COUNT; + READWRITE(nUBuckets); + std::map mapUnkIds; + int nIds = 0; + for (std::map::iterator it = am->mapInfo.begin(); it != am->mapInfo.end(); it++) + { + if (nIds == nNew) break; // this means nNew was wrong, oh ow + mapUnkIds[(*it).first] = nIds; + CAddrInfo &info = (*it).second; + if (info.nRefCount) + { + READWRITE(info); + nIds++; + } + } + nIds = 0; + for (std::map::iterator it = am->mapInfo.begin(); it != am->mapInfo.end(); it++) + { + if (nIds == nTried) break; // this means nTried was wrong, oh ow + CAddrInfo &info = (*it).second; + if (info.fInTried) + { + READWRITE(info); + nIds++; + } + } + for (std::vector >::iterator it = am->vvNew.begin(); it != am->vvNew.end(); it++) + { + const std::set &vNew = (*it); + int nSize = vNew.size(); + READWRITE(nSize); + for (std::set::iterator it2 = vNew.begin(); it2 != vNew.end(); it2++) + { + int nIndex = mapUnkIds[*it2]; + READWRITE(nIndex); + } + } + } else { + int nUBuckets = 0; + READWRITE(nUBuckets); + am->nIdCount = 0; + am->mapInfo.clear(); + am->mapAddr.clear(); + am->vRandom.clear(); + am->vvTried = std::vector >(ADDRMAN_TRIED_BUCKET_COUNT, std::vector(0)); + am->vvNew = std::vector >(ADDRMAN_NEW_BUCKET_COUNT, std::set()); + for (int n = 0; n < am->nNew; n++) + { + CAddrInfo &info = am->mapInfo[n]; + READWRITE(info); + am->mapAddr[info] = n; + info.nRandomPos = vRandom.size(); + am->vRandom.push_back(n); + if (nUBuckets != ADDRMAN_NEW_BUCKET_COUNT) + { + am->vvNew[info.GetNewBucket(am->nKey)].insert(n); + info.nRefCount++; + } + } + am->nIdCount = am->nNew; + int nLost = 0; + for (int n = 0; n < am->nTried; n++) + { + CAddrInfo info; + READWRITE(info); + std::vector &vTried = am->vvTried[info.GetTriedBucket(am->nKey)]; + if (vTried.size() < ADDRMAN_TRIED_BUCKET_SIZE) + { + info.nRandomPos = vRandom.size(); + info.fInTried = true; + am->vRandom.push_back(am->nIdCount); + am->mapInfo[am->nIdCount] = info; + am->mapAddr[info] = am->nIdCount; + vTried.push_back(am->nIdCount); + am->nIdCount++; + } else { + nLost++; + } + } + am->nTried -= nLost; + for (int b = 0; b < nUBuckets; b++) + { + std::set &vNew = am->vvNew[b]; + int nSize = 0; + READWRITE(nSize); + for (int n = 0; n < nSize; n++) + { + int nIndex = 0; + READWRITE(nIndex); + CAddrInfo &info = am->mapInfo[nIndex]; + if (nUBuckets == ADDRMAN_NEW_BUCKET_COUNT && info.nRefCount < ADDRMAN_NEW_BUCKETS_PER_ADDRESS) + { + info.nRefCount++; + vNew.insert(nIndex); + } + } + } + } + } + });) + + CAddrMan() : vRandom(0), vvTried(ADDRMAN_TRIED_BUCKET_COUNT, std::vector(0)), vvNew(ADDRMAN_NEW_BUCKET_COUNT, std::set()) + { + nKey.resize(32); + RAND_bytes(&nKey[0], 32); + + nIdCount = 0; + nTried = 0; + nNew = 0; + } + + // Return the number of (unique) addresses in all tables. + int size() + { + return vRandom.size(); + } + + // Consistency check + void Check() + { +#ifdef DEBUG_ADDRMAN + { + LOCK(cs); + int err; + if ((err=Check_())) + printf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err); + } +#endif + } + + // Add a single address. + bool Add(const CAddress &addr, const CNetAddr& source, int64 nTimePenalty = 0) + { + bool fRet = false; + { + LOCK(cs); + Check(); + fRet |= Add_(addr, source, nTimePenalty); + Check(); + } + if (fRet) + printf("Added %s from %s: %i tried, %i new\n", addr.ToStringIPPort().c_str(), source.ToString().c_str(), nTried, nNew); + return fRet; + } + + // Add multiple addresses. + bool Add(const std::vector &vAddr, const CNetAddr& source, int64 nTimePenalty = 0) + { + int nAdd = 0; + { + LOCK(cs); + Check(); + for (std::vector::const_iterator it = vAddr.begin(); it != vAddr.end(); it++) + nAdd += Add_(*it, source, nTimePenalty) ? 1 : 0; + Check(); + } + if (nAdd) + printf("Added %i addresses from %s: %i tried, %i new\n", nAdd, source.ToString().c_str(), nTried, nNew); + return nAdd > 0; + } + + // Mark an entry as accessible. + void Good(const CService &addr, int64 nTime = GetAdjustedTime()) + { + { + LOCK(cs); + Check(); + Good_(addr, nTime); + Check(); + } + } + + // Mark an entry as connection attempted to. + void Attempt(const CService &addr, int64 nTime = GetAdjustedTime()) + { + { + LOCK(cs); + Check(); + Attempt_(addr, nTime); + Check(); + } + } + + // Choose an address to connect to. + // nUnkBias determines how much "new" entries are favored over "tried" ones (0-100). + CAddress Select(int nUnkBias = 50) + { + CAddress addrRet; + { + LOCK(cs); + Check(); + addrRet = Select_(nUnkBias); + Check(); + } + return addrRet; + } + + // Return a bunch of addresses, selected at random. + std::vector GetAddr() + { + Check(); + std::vector vAddr; + { + LOCK(cs); + GetAddr_(vAddr); + } + Check(); + return vAddr; + } + + // Mark an entry as currently-connected-to. + void Connected(const CService &addr, int64 nTime = GetAdjustedTime()) + { + { + LOCK(cs); + Check(); + Connected_(addr, nTime); + Check(); + } + } +}; + +#endif diff --git a/src/alert.cpp b/src/alert.cpp new file mode 100644 index 0000000..1b7f41a --- /dev/null +++ b/src/alert.cpp @@ -0,0 +1,242 @@ +// +// Alert system +// + +#include +#include + +#include "alert.h" +#include "key.h" +#include "net.h" +#include "sync.h" +#include "ui_interface.h" + +using namespace std; + +map mapAlerts; +CCriticalSection cs_mapAlerts; + +//static const char* pszMainKey = "043fa441fd4203d03f5df2b75ea14e36f20d39f43e7a61aa7552ab9bcd7ecb0e77a3be4585b13fcdaa22ef6e51f1ff6f2929bec2494385b086fb86610e33193195"; +//static const char* pszTestKey = "0471dc165db490094d35cde15b1f5d755fa6ad6f2b5ed0f340e3f17f57389c3c2af113a8cbcc885bde73305a553b5640c83021128008ddf882e856336269080496"; + +// TestNet alerts private key +// "308201130201010420b665cff1884e53da26376fd1b433812c9a5a8a4d5221533b15b9629789bb7e42a081a53081a2020101302c06072a8648ce3d0101022100fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f300604010004010704410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8022100fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141020101a1440342000471dc165db490094d35cde15b1f5d755fa6ad6f2b5ed0f340e3f17f57389c3c2af113a8cbcc885bde73305a553b5640c83021128008ddf882e856336269080496" + +void CUnsignedAlert::SetNull() +{ + nVersion = 1; + nRelayUntil = 0; + nExpiration = 0; + nID = 0; + nCancel = 0; + setCancel.clear(); + nMinVer = 0; + nMaxVer = 0; + setSubVer.clear(); + nPriority = 0; + + strComment.clear(); + strStatusBar.clear(); + strReserved.clear(); +} + +std::string CUnsignedAlert::ToString() const +{ + std::string strSetCancel; + BOOST_FOREACH(int n, setCancel) + strSetCancel += strprintf("%d ", n); + std::string strSetSubVer; + BOOST_FOREACH(std::string str, setSubVer) + strSetSubVer += "\"" + str + "\" "; + return strprintf( + "CAlert(\n" + " nVersion = %d\n" + " nRelayUntil = %"PRI64d"\n" + " nExpiration = %"PRI64d"\n" + " nID = %d\n" + " nCancel = %d\n" + " setCancel = %s\n" + " nMinVer = %d\n" + " nMaxVer = %d\n" + " setSubVer = %s\n" + " nPriority = %d\n" + " strComment = \"%s\"\n" + " strStatusBar = \"%s\"\n" + ")\n", + nVersion, + nRelayUntil, + nExpiration, + nID, + nCancel, + strSetCancel.c_str(), + nMinVer, + nMaxVer, + strSetSubVer.c_str(), + nPriority, + strComment.c_str(), + strStatusBar.c_str()); +} + +void CUnsignedAlert::print() const +{ + printf("%s", ToString().c_str()); +} + +void CAlert::SetNull() +{ + CUnsignedAlert::SetNull(); + vchMsg.clear(); + vchSig.clear(); +} + +bool CAlert::IsNull() const +{ + return (nExpiration == 0); +} + +uint256 CAlert::GetHash() const +{ + return Hash(this->vchMsg.begin(), this->vchMsg.end()); +} + +bool CAlert::IsInEffect() const +{ + return (GetAdjustedTime() < nExpiration); +} + +bool CAlert::Cancels(const CAlert& alert) const +{ + if (!IsInEffect()) + return false; // this was a no-op before 31403 + return (alert.nID <= nCancel || setCancel.count(alert.nID)); +} + +bool CAlert::AppliesTo(int nVersion, std::string strSubVerIn) const +{ + // TODO: rework for client-version-embedded-in-strSubVer ? + return (IsInEffect() && + nMinVer <= nVersion && nVersion <= nMaxVer && + (setSubVer.empty() || setSubVer.count(strSubVerIn))); +} + +bool CAlert::AppliesToMe() const +{ + return AppliesTo(PROTOCOL_VERSION, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector())); +} + +bool CAlert::RelayTo(CNode* pnode) const +{ + if (!IsInEffect()) + return false; + // returns true if wasn't already contained in the set + if (pnode->setKnown.insert(GetHash()).second) + { + if (AppliesTo(pnode->nVersion, pnode->strSubVer) || + AppliesToMe() || + GetAdjustedTime() < nRelayUntil) + { + pnode->PushMessage("alert", *this); + return true; + } + } + return false; +} + +bool CAlert::CheckSignature() const +{ + CKey key; + if (!key.SetPubKey(ParseHex(fTestNet ? pszTestKey : pszMainKey))) + return error("CAlert::CheckSignature() : SetPubKey failed"); + if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig)) + return error("CAlert::CheckSignature() : verify signature failed"); + + // Now unserialize the data + CDataStream sMsg(vchMsg, SER_NETWORK, PROTOCOL_VERSION); + sMsg >> *(CUnsignedAlert*)this; + return true; +} + +CAlert CAlert::getAlertByHash(const uint256 &hash) +{ + CAlert retval; + { + LOCK(cs_mapAlerts); + map::iterator mi = mapAlerts.find(hash); + if(mi != mapAlerts.end()) + retval = mi->second; + } + return retval; +} + +bool CAlert::ProcessAlert() +{ + if (!CheckSignature()) + return false; + if (!IsInEffect()) + return false; + + // alert.nID=max is reserved for if the alert key is + // compromised. It must have a pre-defined message, + // must never expire, must apply to all versions, + // and must cancel all previous + // alerts or it will be ignored (so an attacker can't + // send an "everything is OK, don't panic" version that + // cannot be overridden): + int maxInt = std::numeric_limits::max(); + if (nID == maxInt) + { + if (!( + nExpiration == maxInt && + nCancel == (maxInt-1) && + nMinVer == 0 && + nMaxVer == maxInt && + setSubVer.empty() && + nPriority == maxInt && + strStatusBar == "URGENT: Alert key compromised, upgrade required" + )) + return false; + } + + { + LOCK(cs_mapAlerts); + // Cancel previous alerts + for (map::iterator mi = mapAlerts.begin(); mi != mapAlerts.end();) + { + const CAlert& alert = (*mi).second; + if (Cancels(alert)) + { + printf("cancelling alert %d\n", alert.nID); + uiInterface.NotifyAlertChanged((*mi).first, CT_DELETED); + mapAlerts.erase(mi++); + } + else if (!alert.IsInEffect()) + { + printf("expiring alert %d\n", alert.nID); + uiInterface.NotifyAlertChanged((*mi).first, CT_DELETED); + mapAlerts.erase(mi++); + } + else + mi++; + } + + // Check if this alert has been cancelled + BOOST_FOREACH(PAIRTYPE(const uint256, CAlert)& item, mapAlerts) + { + const CAlert& alert = item.second; + if (alert.Cancels(*this)) + { + printf("alert already cancelled by %d\n", alert.nID); + return false; + } + } + + // Add to mapAlerts + mapAlerts.insert(make_pair(GetHash(), *this)); + // Notify UI if it applies to me + if(AppliesToMe()) + uiInterface.NotifyAlertChanged(GetHash(), CT_NEW); + } + + printf("accepted alert %d, AppliesToMe()=%d\n", nID, AppliesToMe()); + return true; +} diff --git a/src/alert.h b/src/alert.h new file mode 100644 index 0000000..6f30d0c --- /dev/null +++ b/src/alert.h @@ -0,0 +1,109 @@ +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef _curecoinALERT_H_ +#define _curecoinALERT_H_ 1 + +#include +#include + +#include "uint256.h" +#include "util.h" + + +static const char* pszMainKey = "043fa441fd4203d03f5df2b75ea14e36f20d39f43e7a61aa7552ab9bcd7ecb0e77a3be4585b13fcdaa22ef6e51f1ff6f2929bec2494385b086fb86610e33193195"; + +// TestNet alerts pubKey +static const char* pszTestKey = "0471dc165db490094d35cde15b1f5d755fa6ad6f2b5ed0f340e3f17f57389c3c2af113a8cbcc885bde73305a553b5640c83021128008ddf882e856336269080496"; + + +class CNode; + +/** Alerts are for notifying old versions if they become too obsolete and + * need to upgrade. The message is displayed in the status bar. + * Alert messages are broadcast as a vector of signed data. Unserializing may + * not read the entire buffer if the alert is for a newer version, but older + * versions can still relay the original data. + */ +class CUnsignedAlert +{ +public: + int nVersion; + int64 nRelayUntil; // when newer nodes stop relaying to newer nodes + int64 nExpiration; + int nID; + int nCancel; + std::set setCancel; + int nMinVer; // lowest version inclusive + int nMaxVer; // highest version inclusive + std::set setSubVer; // empty matches all + int nPriority; + + // Actions + std::string strComment; + std::string strStatusBar; + std::string strReserved; + + IMPLEMENT_SERIALIZE + ( + READWRITE(this->nVersion); + nVersion = this->nVersion; + READWRITE(nRelayUntil); + READWRITE(nExpiration); + READWRITE(nID); + READWRITE(nCancel); + READWRITE(setCancel); + READWRITE(nMinVer); + READWRITE(nMaxVer); + READWRITE(setSubVer); + READWRITE(nPriority); + + READWRITE(strComment); + READWRITE(strStatusBar); + READWRITE(strReserved); + ) + + void SetNull(); + + std::string ToString() const; + void print() const; +}; + +/** An alert is a combination of a serialized CUnsignedAlert and a signature. */ +class CAlert : public CUnsignedAlert +{ +public: + std::vector vchMsg; + std::vector vchSig; + + CAlert() + { + SetNull(); + } + + IMPLEMENT_SERIALIZE + ( + READWRITE(vchMsg); + READWRITE(vchSig); + ) + + void SetNull(); + bool IsNull() const; + uint256 GetHash() const; + bool IsInEffect() const; + bool Cancels(const CAlert& alert) const; + bool AppliesTo(int nVersion, std::string strSubVerIn) const; + bool AppliesToMe() const; + bool RelayTo(CNode* pnode) const; + bool CheckSignature() const; + bool ProcessAlert(); + + /* + * Get copy of (active) alert object by hash. Returns a null alert if it is not found. + */ + static CAlert getAlertByHash(const uint256 &hash); +}; + +#endif diff --git a/src/allocators.h b/src/allocators.h new file mode 100644 index 0000000..30355c3 --- /dev/null +++ b/src/allocators.h @@ -0,0 +1,257 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_ALLOCATORS_H +#define curecoin_ALLOCATORS_H + +#include +#include +#include +#include + +#ifdef WIN32 +#ifdef _WIN32_WINNT +#undef _WIN32_WINNT +#endif +#define _WIN32_WINNT 0x0501 +#define WIN32_LEAN_AND_MEAN 1 +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include +// This is used to attempt to keep keying material out of swap +// Note that VirtualLock does not provide this as a guarantee on Windows, +// but, in practice, memory that has been VirtualLock'd almost never gets written to +// the pagefile except in rare circumstances where memory is extremely low. +#else +#include +#include // for PAGESIZE +#include // for sysconf +#endif + +/** + * Thread-safe class to keep track of locked (ie, non-swappable) memory pages. + * + * Memory locks do not stack, that is, pages which have been locked several times by calls to mlock() + * will be unlocked by a single call to munlock(). This can result in keying material ending up in swap when + * those functions are used naively. This class simulates stacking memory locks by keeping a counter per page. + * + * @note By using a map from each page base address to lock count, this class is optimized for + * small objects that span up to a few pages, mostly smaller than a page. To support large allocations, + * something like an interval tree would be the preferred data structure. + */ +template class LockedPageManagerBase +{ +public: + LockedPageManagerBase(size_t page_size): + page_size(page_size) + { + // Determine bitmask for extracting page from address + assert(!(page_size & (page_size-1))); // size must be power of two + page_mask = ~(page_size - 1); + } + + // For all pages in affected range, increase lock count + void LockRange(void *p, size_t size) + { + boost::mutex::scoped_lock lock(mutex); + if(!size) return; + const size_t base_addr = reinterpret_cast(p); + const size_t start_page = base_addr & page_mask; + const size_t end_page = (base_addr + size - 1) & page_mask; + for(size_t page = start_page; page <= end_page; page += page_size) + { + Histogram::iterator it = histogram.find(page); + if(it == histogram.end()) // Newly locked page + { + locker.Lock(reinterpret_cast(page), page_size); + histogram.insert(std::make_pair(page, 1)); + } + else // Page was already locked; increase counter + { + it->second += 1; + } + } + } + + // For all pages in affected range, decrease lock count + void UnlockRange(void *p, size_t size) + { + boost::mutex::scoped_lock lock(mutex); + if(!size) return; + const size_t base_addr = reinterpret_cast(p); + const size_t start_page = base_addr & page_mask; + const size_t end_page = (base_addr + size - 1) & page_mask; + for(size_t page = start_page; page <= end_page; page += page_size) + { + Histogram::iterator it = histogram.find(page); + assert(it != histogram.end()); // Cannot unlock an area that was not locked + // Decrease counter for page, when it is zero, the page will be unlocked + it->second -= 1; + if(it->second == 0) // Nothing on the page anymore that keeps it locked + { + // Unlock page and remove the count from histogram + locker.Unlock(reinterpret_cast(page), page_size); + histogram.erase(it); + } + } + } + + // Get number of locked pages for diagnostics + int GetLockedPageCount() + { + boost::mutex::scoped_lock lock(mutex); + return histogram.size(); + } + +private: + Locker locker; + boost::mutex mutex; + size_t page_size, page_mask; + // map of page base address to lock count + typedef std::map Histogram; + Histogram histogram; +}; + +/** Determine system page size in bytes */ +static inline size_t GetSystemPageSize() +{ + size_t page_size; +#if defined(WIN32) + SYSTEM_INFO sSysInfo; + GetSystemInfo(&sSysInfo); + page_size = sSysInfo.dwPageSize; +#elif defined(PAGESIZE) // defined in limits.h + page_size = PAGESIZE; +#else // assume some POSIX OS + page_size = sysconf(_SC_PAGESIZE); +#endif + return page_size; +} + +/** + * OS-dependent memory page locking/unlocking. + * Defined as policy class to make stubbing for test possible. + */ +class MemoryPageLocker +{ +public: + /** Lock memory pages. + * addr and len must be a multiple of the system page size + */ + bool Lock(const void *addr, size_t len) + { +#ifdef WIN32 + return VirtualLock(const_cast(addr), len); +#else + return mlock(addr, len) == 0; +#endif + } + /** Unlock memory pages. + * addr and len must be a multiple of the system page size + */ + bool Unlock(const void *addr, size_t len) + { +#ifdef WIN32 + return VirtualUnlock(const_cast(addr), len); +#else + return munlock(addr, len) == 0; +#endif + } +}; + +/** + * Singleton class to keep track of locked (ie, non-swappable) memory pages, for use in + * std::allocator templates. + */ +class LockedPageManager: public LockedPageManagerBase +{ +public: + static LockedPageManager instance; // instantiated in util.cpp +private: + LockedPageManager(): + LockedPageManagerBase(GetSystemPageSize()) + {} +}; + +// +// Allocator that locks its contents from being paged +// out of memory and clears its contents before deletion. +// +template +struct secure_allocator : public std::allocator +{ + // MSVC8 default copy constructor is broken + typedef std::allocator base; + typedef typename base::size_type size_type; + typedef typename base::difference_type difference_type; + typedef typename base::pointer pointer; + typedef typename base::const_pointer const_pointer; + typedef typename base::reference reference; + typedef typename base::const_reference const_reference; + typedef typename base::value_type value_type; + secure_allocator() throw() {} + secure_allocator(const secure_allocator& a) throw() : base(a) {} + template + secure_allocator(const secure_allocator& a) throw() : base(a) {} + ~secure_allocator() throw() {} + template struct rebind + { typedef secure_allocator<_Other> other; }; + + T* allocate(std::size_t n, const void *hint = 0) + { + T *p; + p = std::allocator::allocate(n, hint); + if (p != NULL) + LockedPageManager::instance.LockRange(p, sizeof(T) * n); + return p; + } + + void deallocate(T* p, std::size_t n) + { + if (p != NULL) + { + memset(p, 0, sizeof(T) * n); + LockedPageManager::instance.UnlockRange(p, sizeof(T) * n); + } + std::allocator::deallocate(p, n); + } +}; + + +// +// Allocator that clears its contents before deletion. +// +template +struct zero_after_free_allocator : public std::allocator +{ + // MSVC8 default copy constructor is broken + typedef std::allocator base; + typedef typename base::size_type size_type; + typedef typename base::difference_type difference_type; + typedef typename base::pointer pointer; + typedef typename base::const_pointer const_pointer; + typedef typename base::reference reference; + typedef typename base::const_reference const_reference; + typedef typename base::value_type value_type; + zero_after_free_allocator() throw() {} + zero_after_free_allocator(const zero_after_free_allocator& a) throw() : base(a) {} + template + zero_after_free_allocator(const zero_after_free_allocator& a) throw() : base(a) {} + ~zero_after_free_allocator() throw() {} + template struct rebind + { typedef zero_after_free_allocator<_Other> other; }; + + void deallocate(T* p, std::size_t n) + { + if (p != NULL) + memset(p, 0, sizeof(T) * n); + std::allocator::deallocate(p, n); + } +}; + +// This is exactly like std::string, but with a custom allocator. +typedef std::basic_string, secure_allocator > SecureString; + +#endif diff --git a/src/base58.h b/src/base58.h new file mode 100644 index 0000000..d8cd093 --- /dev/null +++ b/src/base58.h @@ -0,0 +1,460 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + + +// +// Why base-58 instead of standard base-64 encoding? +// - Don't want 0OIl characters that look the same in some fonts and +// could be used to create visually identical looking account numbers. +// - A string with non-alphanumeric characters is not as easily accepted as an account number. +// - E-mail usually won't line-break if there's no punctuation to break at. +// - Double-clicking selects the whole number as one word if it's all alphanumeric. +// +#ifndef curecoin_BASE58_H +#define curecoin_BASE58_H + +#include +#include +#include "bignum.h" +#include "key.h" +#include "script.h" + +static const char* pszBase58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; + +// Encode a byte sequence as a base58-encoded string +inline std::string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend) +{ + CAutoBN_CTX pctx; + CBigNum bn58 = 58; + CBigNum bn0 = 0; + + // Convert big endian data to little endian + // Extra zero at the end make sure bignum will interpret as a positive number + std::vector vchTmp(pend-pbegin+1, 0); + reverse_copy(pbegin, pend, vchTmp.begin()); + + // Convert little endian data to bignum + CBigNum bn; + bn.setvch(vchTmp); + + // Convert bignum to std::string + std::string str; + // Expected size increase from base58 conversion is approximately 137% + // use 138% to be safe + str.reserve((pend - pbegin) * 138 / 100 + 1); + CBigNum dv; + CBigNum rem; + while (bn > bn0) + { + if (!BN_div(&dv, &rem, &bn, &bn58, pctx)) + throw bignum_error("EncodeBase58 : BN_div failed"); + bn = dv; + unsigned int c = rem.getulong(); + str += pszBase58[c]; + } + + // Leading zeroes encoded as base58 zeros + for (const unsigned char* p = pbegin; p < pend && *p == 0; p++) + str += pszBase58[0]; + + // Convert little endian std::string to big endian + reverse(str.begin(), str.end()); + return str; +} + +// Encode a byte vector as a base58-encoded string +inline std::string EncodeBase58(const std::vector& vch) +{ + return EncodeBase58(&vch[0], &vch[0] + vch.size()); +} + +// Decode a base58-encoded string psz into byte vector vchRet +// returns true if decoding is successful +inline bool DecodeBase58(const char* psz, std::vector& vchRet) +{ + CAutoBN_CTX pctx; + vchRet.clear(); + CBigNum bn58 = 58; + CBigNum bn = 0; + CBigNum bnChar; + while (isspace(*psz)) + psz++; + + // Convert big endian string to bignum + for (const char* p = psz; *p; p++) + { + const char* p1 = strchr(pszBase58, *p); + if (p1 == NULL) + { + while (isspace(*p)) + p++; + if (*p != '\0') + return false; + break; + } + bnChar.setulong(p1 - pszBase58); + if (!BN_mul(&bn, &bn, &bn58, pctx)) + throw bignum_error("DecodeBase58 : BN_mul failed"); + bn += bnChar; + } + + // Get bignum as little endian data + std::vector vchTmp = bn.getvch(); + + // Trim off sign byte if present + if (vchTmp.size() >= 2 && vchTmp.end()[-1] == 0 && vchTmp.end()[-2] >= 0x80) + vchTmp.erase(vchTmp.end()-1); + + // Restore leading zeros + int nLeadingZeros = 0; + for (const char* p = psz; *p == pszBase58[0]; p++) + nLeadingZeros++; + vchRet.assign(nLeadingZeros + vchTmp.size(), 0); + + // Convert little endian data to big endian + reverse_copy(vchTmp.begin(), vchTmp.end(), vchRet.end() - vchTmp.size()); + return true; +} + +// Decode a base58-encoded string str into byte vector vchRet +// returns true if decoding is successful +inline bool DecodeBase58(const std::string& str, std::vector& vchRet) +{ + return DecodeBase58(str.c_str(), vchRet); +} + + + + +// Encode a byte vector to a base58-encoded string, including checksum +inline std::string EncodeBase58Check(const std::vector& vchIn) +{ + // add 4-byte hash check to the end + std::vector vch(vchIn); + uint256 hash = Hash(vch.begin(), vch.end()); + vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4); + return EncodeBase58(vch); +} + +// Decode a base58-encoded string psz that includes a checksum, into byte vector vchRet +// returns true if decoding is successful +inline bool DecodeBase58Check(const char* psz, std::vector& vchRet) +{ + if (!DecodeBase58(psz, vchRet)) + return false; + if (vchRet.size() < 4) + { + vchRet.clear(); + return false; + } + uint256 hash = Hash(vchRet.begin(), vchRet.end()-4); + if (memcmp(&hash, &vchRet.end()[-4], 4) != 0) + { + vchRet.clear(); + return false; + } + vchRet.resize(vchRet.size()-4); + return true; +} + +// Decode a base58-encoded string str that includes a checksum, into byte vector vchRet +// returns true if decoding is successful +inline bool DecodeBase58Check(const std::string& str, std::vector& vchRet) +{ + return DecodeBase58Check(str.c_str(), vchRet); +} + + + + + +/** Base class for all base58-encoded data */ +class CBase58Data +{ +protected: + // the version byte + unsigned char nVersion; + + // the actually encoded data + std::vector vchData; + + CBase58Data() + { + nVersion = 0; + vchData.clear(); + } + + ~CBase58Data() + { + // zero the memory, as it may contain sensitive data + if (!vchData.empty()) + memset(&vchData[0], 0, vchData.size()); + } + + void SetData(int nVersionIn, const void* pdata, size_t nSize) + { + nVersion = nVersionIn; + vchData.resize(nSize); + if (!vchData.empty()) + memcpy(&vchData[0], pdata, nSize); + } + + void SetData(int nVersionIn, const unsigned char *pbegin, const unsigned char *pend) + { + SetData(nVersionIn, (void*)pbegin, pend - pbegin); + } + +public: + bool SetString(const char* psz) + { + std::vector vchTemp; + DecodeBase58Check(psz, vchTemp); + if (vchTemp.empty()) + { + vchData.clear(); + nVersion = 0; + return false; + } + nVersion = vchTemp[0]; + vchData.resize(vchTemp.size() - 1); + if (!vchData.empty()) + memcpy(&vchData[0], &vchTemp[1], vchData.size()); + memset(&vchTemp[0], 0, vchTemp.size()); + return true; + } + + bool SetString(const std::string& str) + { + return SetString(str.c_str()); + } + + std::string ToString() const + { + std::vector vch(1, nVersion); + vch.insert(vch.end(), vchData.begin(), vchData.end()); + return EncodeBase58Check(vch); + } + + int CompareTo(const CBase58Data& b58) const + { + if (nVersion < b58.nVersion) return -1; + if (nVersion > b58.nVersion) return 1; + if (vchData < b58.vchData) return -1; + if (vchData > b58.vchData) return 1; + return 0; + } + + bool operator==(const CBase58Data& b58) const { return CompareTo(b58) == 0; } + bool operator<=(const CBase58Data& b58) const { return CompareTo(b58) <= 0; } + bool operator>=(const CBase58Data& b58) const { return CompareTo(b58) >= 0; } + bool operator< (const CBase58Data& b58) const { return CompareTo(b58) < 0; } + bool operator> (const CBase58Data& b58) const { return CompareTo(b58) > 0; } +}; + +/** base58-encoded curecoin 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 CcurecoinAddress; +class CcurecoinAddressVisitor : public boost::static_visitor +{ +private: + CcurecoinAddress *addr; +public: + CcurecoinAddressVisitor(CcurecoinAddress *addrIn) : addr(addrIn) { } + bool operator()(const CKeyID &id) const; + bool operator()(const CScriptID &id) const; + bool operator()(const CNoDestination &no) const; +}; + +class CcurecoinAddress : public CBase58Data +{ +public: + enum + { + PUBKEY_ADDRESS = 25, + SCRIPT_ADDRESS = 30, + PUBKEY_ADDRESS_TEST = 111, + SCRIPT_ADDRESS_TEST = 196, + }; + + bool Set(const CKeyID &id) { + SetData(fTestNet ? PUBKEY_ADDRESS_TEST : PUBKEY_ADDRESS, &id, 20); + return true; + } + + bool Set(const CScriptID &id) { + SetData(fTestNet ? SCRIPT_ADDRESS_TEST : SCRIPT_ADDRESS, &id, 20); + return true; + } + + bool Set(const CTxDestination &dest) + { + return boost::apply_visitor(CcurecoinAddressVisitor(this), dest); + } + + bool IsValid() const + { + unsigned int nExpectedSize = 20; + bool fExpectTestNet = false; + switch(nVersion) + { + case PUBKEY_ADDRESS: + nExpectedSize = 20; // Hash of public key + fExpectTestNet = false; + break; + case SCRIPT_ADDRESS: + nExpectedSize = 20; // Hash of CScript + fExpectTestNet = false; + break; + + case PUBKEY_ADDRESS_TEST: + nExpectedSize = 20; + fExpectTestNet = true; + break; + case SCRIPT_ADDRESS_TEST: + nExpectedSize = 20; + fExpectTestNet = true; + break; + + default: + return false; + } + return fExpectTestNet == fTestNet && vchData.size() == nExpectedSize; + } + + CcurecoinAddress() + { + } + + CcurecoinAddress(const CTxDestination &dest) + { + Set(dest); + } + + CcurecoinAddress(const std::string& strAddress) + { + SetString(strAddress); + } + + CcurecoinAddress(const char* pszAddress) + { + SetString(pszAddress); + } + + CTxDestination Get() const { + if (!IsValid()) + return CNoDestination(); + switch (nVersion) { + case PUBKEY_ADDRESS: + case PUBKEY_ADDRESS_TEST: { + uint160 id; + memcpy(&id, &vchData[0], 20); + return CKeyID(id); + } + case SCRIPT_ADDRESS: + case SCRIPT_ADDRESS_TEST: { + uint160 id; + memcpy(&id, &vchData[0], 20); + return CScriptID(id); + } + } + return CNoDestination(); + } + + bool GetKeyID(CKeyID &keyID) const { + if (!IsValid()) + return false; + switch (nVersion) { + case PUBKEY_ADDRESS: + case PUBKEY_ADDRESS_TEST: { + uint160 id; + memcpy(&id, &vchData[0], 20); + keyID = CKeyID(id); + return true; + } + default: return false; + } + } + + bool IsScript() const { + if (!IsValid()) + return false; + switch (nVersion) { + case SCRIPT_ADDRESS: + case SCRIPT_ADDRESS_TEST: { + return true; + } + default: return false; + } + } +}; + +bool inline CcurecoinAddressVisitor::operator()(const CKeyID &id) const { return addr->Set(id); } +bool inline CcurecoinAddressVisitor::operator()(const CScriptID &id) const { return addr->Set(id); } +bool inline CcurecoinAddressVisitor::operator()(const CNoDestination &id) const { return false; } + +/** A base58-encoded secret key */ +class CcurecoinSecret : public CBase58Data +{ +public: + void SetSecret(const CSecret& vchSecret, bool fCompressed) + { + assert(vchSecret.size() == 32); + SetData(128 + (fTestNet ? CcurecoinAddress::PUBKEY_ADDRESS_TEST : CcurecoinAddress::PUBKEY_ADDRESS), &vchSecret[0], vchSecret.size()); + if (fCompressed) + vchData.push_back(1); + } + + CSecret GetSecret(bool &fCompressedOut) + { + CSecret vchSecret; + vchSecret.resize(32); + memcpy(&vchSecret[0], &vchData[0], 32); + fCompressedOut = vchData.size() == 33; + return vchSecret; + } + + bool IsValid() const + { + bool fExpectTestNet = false; + switch(nVersion) + { + case (128 + CcurecoinAddress::PUBKEY_ADDRESS): + break; + + case (128 + CcurecoinAddress::PUBKEY_ADDRESS_TEST): + fExpectTestNet = true; + break; + + default: + return false; + } + return fExpectTestNet == fTestNet && (vchData.size() == 32 || (vchData.size() == 33 && vchData[32] == 1)); + } + + bool SetString(const char* pszSecret) + { + return CBase58Data::SetString(pszSecret) && IsValid(); + } + + bool SetString(const std::string& strSecret) + { + return SetString(strSecret.c_str()); + } + + CcurecoinSecret(const CSecret& vchSecret, bool fCompressed) + { + SetSecret(vchSecret, fCompressed); + } + + CcurecoinSecret() + { + } +}; + +#endif diff --git a/src/bignum.h b/src/bignum.h new file mode 100644 index 0000000..61ce10f --- /dev/null +++ b/src/bignum.h @@ -0,0 +1,564 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_BIGNUM_H +#define curecoin_BIGNUM_H + +#include +#include +#include + +#include "util.h" // for uint64 + +/** Errors thrown by the bignum class */ +class bignum_error : public std::runtime_error +{ +public: + explicit bignum_error(const std::string& str) : std::runtime_error(str) {} +}; + + +/** RAII encapsulated BN_CTX (OpenSSL bignum context) */ +class CAutoBN_CTX +{ +protected: + BN_CTX* pctx; + BN_CTX* operator=(BN_CTX* pnew) { return pctx = pnew; } + +public: + CAutoBN_CTX() + { + pctx = BN_CTX_new(); + if (pctx == NULL) + throw bignum_error("CAutoBN_CTX : BN_CTX_new() returned NULL"); + } + + ~CAutoBN_CTX() + { + if (pctx != NULL) + BN_CTX_free(pctx); + } + + operator BN_CTX*() { return pctx; } + BN_CTX& operator*() { return *pctx; } + BN_CTX** operator&() { return &pctx; } + bool operator!() { return (pctx == NULL); } +}; + + +/** C++ wrapper for BIGNUM (OpenSSL bignum) */ +class CBigNum : public BIGNUM +{ +public: + CBigNum() + { + BN_init(this); + } + + CBigNum(const CBigNum& b) + { + BN_init(this); + if (!BN_copy(this, &b)) + { + BN_clear_free(this); + throw bignum_error("CBigNum::CBigNum(const CBigNum&) : BN_copy failed"); + } + } + + CBigNum& operator=(const CBigNum& b) + { + if (!BN_copy(this, &b)) + throw bignum_error("CBigNum::operator= : BN_copy failed"); + return (*this); + } + + ~CBigNum() + { + BN_clear_free(this); + } + + //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); } + + explicit CBigNum(const std::vector& vch) + { + BN_init(this); + setvch(vch); + } + + void setulong(unsigned long n) + { + if (!BN_set_word(this, n)) + throw bignum_error("CBigNum conversion from unsigned long : BN_set_word failed"); + } + + unsigned long getulong() const + { + return BN_get_word(this); + } + + unsigned int getuint() const + { + return BN_get_word(this); + } + + int getint() const + { + unsigned long n = BN_get_word(this); + if (!BN_is_negative(this)) + return (n > (unsigned long)std::numeric_limits::max() ? std::numeric_limits::max() : n); + else + return (n > (unsigned long)std::numeric_limits::max() ? std::numeric_limits::min() : -(int)n); + } + + void setint64(int64 sn) + { + unsigned char pch[sizeof(sn) + 6]; + unsigned char* p = pch + 4; + bool fNegative; + uint64 n; + + if (sn < (int64)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); + ++n; + fNegative = true; + } else { + n = sn; + fNegative = false; + } + + bool fLeadingZeroes = true; + for (int i = 0; i < 8; i++) + { + unsigned char c = (n >> 56) & 0xff; + n <<= 8; + if (fLeadingZeroes) + { + if (c == 0) + continue; + if (c & 0x80) + *p++ = (fNegative ? 0x80 : 0); + else if (fNegative) + c |= 0x80; + fLeadingZeroes = false; + } + *p++ = c; + } + unsigned int nSize = p - (pch + 4); + pch[0] = (nSize >> 24) & 0xff; + pch[1] = (nSize >> 16) & 0xff; + pch[2] = (nSize >> 8) & 0xff; + pch[3] = (nSize) & 0xff; + BN_mpi2bn(pch, p - pch, this); + } + + uint64 getuint64() + { + unsigned int nSize = BN_bn2mpi(this, NULL); + if (nSize < 4) + return 0; + std::vector vch(nSize); + BN_bn2mpi(this, &vch[0]); + if (vch.size() > 4) + vch[4] &= 0x7f; + uint64 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) + { + unsigned char pch[sizeof(n) + 6]; + unsigned char* p = pch + 4; + bool fLeadingZeroes = true; + for (int i = 0; i < 8; i++) + { + unsigned char c = (n >> 56) & 0xff; + n <<= 8; + if (fLeadingZeroes) + { + if (c == 0) + continue; + if (c & 0x80) + *p++ = 0; + fLeadingZeroes = false; + } + *p++ = c; + } + unsigned int nSize = p - (pch + 4); + pch[0] = (nSize >> 24) & 0xff; + pch[1] = (nSize >> 16) & 0xff; + pch[2] = (nSize >> 8) & 0xff; + pch[3] = (nSize) & 0xff; + BN_mpi2bn(pch, p - pch, this); + } + + void setuint256(uint256 n) + { + unsigned char pch[sizeof(n) + 6]; + unsigned char* p = pch + 4; + bool fLeadingZeroes = true; + unsigned char* pbegin = (unsigned char*)&n; + unsigned char* psrc = pbegin + sizeof(n); + while (psrc != pbegin) + { + unsigned char c = *(--psrc); + if (fLeadingZeroes) + { + if (c == 0) + continue; + if (c & 0x80) + *p++ = 0; + fLeadingZeroes = false; + } + *p++ = c; + } + unsigned int nSize = p - (pch + 4); + pch[0] = (nSize >> 24) & 0xff; + pch[1] = (nSize >> 16) & 0xff; + pch[2] = (nSize >> 8) & 0xff; + pch[3] = (nSize >> 0) & 0xff; + BN_mpi2bn(pch, p - pch, this); + } + + uint256 getuint256() + { + unsigned int nSize = BN_bn2mpi(this, NULL); + if (nSize < 4) + return 0; + std::vector vch(nSize); + BN_bn2mpi(this, &vch[0]); + if (vch.size() > 4) + vch[4] &= 0x7f; + uint256 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 setvch(const std::vector& vch) + { + std::vector vch2(vch.size() + 4); + unsigned int nSize = vch.size(); + // BIGNUM's byte stream format expects 4 bytes of + // big endian size data info at the front + vch2[0] = (nSize >> 24) & 0xff; + vch2[1] = (nSize >> 16) & 0xff; + vch2[2] = (nSize >> 8) & 0xff; + vch2[3] = (nSize >> 0) & 0xff; + // swap data to big endian + reverse_copy(vch.begin(), vch.end(), vch2.begin() + 4); + BN_mpi2bn(&vch2[0], vch2.size(), this); + } + + std::vector getvch() const + { + unsigned int nSize = BN_bn2mpi(this, NULL); + if (nSize <= 4) + return std::vector(); + std::vector vch(nSize); + BN_bn2mpi(this, &vch[0]); + vch.erase(vch.begin(), vch.begin() + 4); + reverse(vch.begin(), vch.end()); + return vch; + } + + CBigNum& SetCompact(unsigned int nCompact) + { + unsigned int nSize = nCompact >> 24; + std::vector vch(4 + nSize); + vch[3] = nSize; + if (nSize >= 1) vch[4] = (nCompact >> 16) & 0xff; + if (nSize >= 2) vch[5] = (nCompact >> 8) & 0xff; + if (nSize >= 3) vch[6] = (nCompact >> 0) & 0xff; + BN_mpi2bn(&vch[0], vch.size(), this); + return *this; + } + + unsigned int GetCompact() const + { + unsigned int nSize = BN_bn2mpi(this, NULL); + std::vector vch(nSize); + nSize -= 4; + BN_bn2mpi(this, &vch[0]); + unsigned int nCompact = nSize << 24; + if (nSize >= 1) nCompact |= (vch[4] << 16); + if (nSize >= 2) nCompact |= (vch[5] << 8); + if (nSize >= 3) nCompact |= (vch[6] << 0); + return nCompact; + } + + void SetHex(const std::string& str) + { + // skip 0x + const char* psz = str.c_str(); + while (isspace(*psz)) + psz++; + bool fNegative = false; + if (*psz == '-') + { + fNegative = true; + psz++; + } + if (psz[0] == '0' && tolower(psz[1]) == 'x') + psz += 2; + while (isspace(*psz)) + psz++; + + // hex string to bignum + static const signed char phexdigit[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0 }; + *this = 0; + while (isxdigit(*psz)) + { + *this <<= 4; + int n = phexdigit[(unsigned char)*psz++]; + *this += n; + } + if (fNegative) + *this = 0 - *this; + } + + std::string ToString(int nBase=10) const + { + CAutoBN_CTX pctx; + CBigNum bnBase = nBase; + CBigNum bn0 = 0; + std::string str; + CBigNum bn = *this; + BN_set_negative(&bn, false); + CBigNum dv; + CBigNum rem; + if (BN_cmp(&bn, &bn0) == 0) + return "0"; + while (BN_cmp(&bn, &bn0) > 0) + { + if (!BN_div(&dv, &rem, &bn, &bnBase, pctx)) + throw bignum_error("CBigNum::ToString() : BN_div failed"); + bn = dv; + unsigned int c = rem.getulong(); + str += "0123456789abcdef"[c]; + } + if (BN_is_negative(this)) + str += "-"; + reverse(str.begin(), str.end()); + return str; + } + + std::string GetHex() const + { + return ToString(16); + } + + unsigned int GetSerializeSize(int nType=0, int nVersion=PROTOCOL_VERSION) const + { + return ::GetSerializeSize(getvch(), nType, nVersion); + } + + template + void Serialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION) const + { + ::Serialize(s, getvch(), nType, nVersion); + } + + template + void Unserialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION) + { + std::vector vch; + ::Unserialize(s, vch, nType, nVersion); + setvch(vch); + } + + + bool operator!() const + { + return BN_is_zero(this); + } + + CBigNum& operator+=(const CBigNum& b) + { + if (!BN_add(this, this, &b)) + throw bignum_error("CBigNum::operator+= : BN_add failed"); + return *this; + } + + CBigNum& operator-=(const CBigNum& b) + { + *this = *this - b; + return *this; + } + + CBigNum& operator*=(const CBigNum& b) + { + CAutoBN_CTX pctx; + if (!BN_mul(this, this, &b, pctx)) + throw bignum_error("CBigNum::operator*= : BN_mul failed"); + return *this; + } + + CBigNum& operator/=(const CBigNum& b) + { + *this = *this / b; + return *this; + } + + CBigNum& operator%=(const CBigNum& b) + { + *this = *this % b; + return *this; + } + + CBigNum& operator<<=(unsigned int shift) + { + if (!BN_lshift(this, this, shift)) + throw bignum_error("CBigNum:operator<<= : BN_lshift failed"); + return *this; + } + + CBigNum& operator>>=(unsigned int shift) + { + // Note: BN_rshift segfaults on 64-bit if 2^shift is greater than the number + // if built on ubuntu 9.04 or 9.10, probably depends on version of OpenSSL + CBigNum a = 1; + a <<= shift; + if (BN_cmp(&a, this) > 0) + { + *this = 0; + return *this; + } + + if (!BN_rshift(this, this, shift)) + throw bignum_error("CBigNum:operator>>= : BN_rshift failed"); + return *this; + } + + + CBigNum& operator++() + { + // prefix operator + if (!BN_add(this, this, BN_value_one())) + throw bignum_error("CBigNum::operator++ : BN_add failed"); + return *this; + } + + const CBigNum operator++(int) + { + // postfix operator + const CBigNum ret = *this; + ++(*this); + return ret; + } + + CBigNum& operator--() + { + // prefix operator + CBigNum r; + if (!BN_sub(&r, this, BN_value_one())) + throw bignum_error("CBigNum::operator-- : BN_sub failed"); + *this = r; + return *this; + } + + const CBigNum operator--(int) + { + // postfix operator + const CBigNum ret = *this; + --(*this); + return ret; + } + + + 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); +}; + + + +inline const CBigNum operator+(const CBigNum& a, const CBigNum& b) +{ + CBigNum r; + if (!BN_add(&r, &a, &b)) + throw bignum_error("CBigNum::operator+ : BN_add failed"); + return r; +} + +inline const CBigNum operator-(const CBigNum& a, const CBigNum& b) +{ + CBigNum r; + if (!BN_sub(&r, &a, &b)) + throw bignum_error("CBigNum::operator- : BN_sub failed"); + return r; +} + +inline const CBigNum operator-(const CBigNum& a) +{ + CBigNum r(a); + BN_set_negative(&r, !BN_is_negative(&r)); + return r; +} + +inline const CBigNum operator*(const CBigNum& a, const CBigNum& b) +{ + CAutoBN_CTX pctx; + CBigNum r; + if (!BN_mul(&r, &a, &b, pctx)) + throw bignum_error("CBigNum::operator* : BN_mul failed"); + return r; +} + +inline const CBigNum operator/(const CBigNum& a, const CBigNum& b) +{ + CAutoBN_CTX pctx; + CBigNum r; + if (!BN_div(&r, NULL, &a, &b, pctx)) + throw bignum_error("CBigNum::operator/ : BN_div failed"); + return r; +} + +inline const CBigNum operator%(const CBigNum& a, const CBigNum& b) +{ + CAutoBN_CTX pctx; + CBigNum r; + if (!BN_mod(&r, &a, &b, pctx)) + throw bignum_error("CBigNum::operator% : BN_div failed"); + return r; +} + +inline const CBigNum operator<<(const CBigNum& a, unsigned int shift) +{ + CBigNum r; + if (!BN_lshift(&r, &a, shift)) + throw bignum_error("CBigNum:operator<< : BN_lshift failed"); + return r; +} + +inline const CBigNum operator>>(const CBigNum& a, unsigned int shift) +{ + CBigNum r = a; + r >>= shift; + return r; +} + +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 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 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); } + +#endif diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp new file mode 100644 index 0000000..3a095d5 --- /dev/null +++ b/src/checkpoints.cpp @@ -0,0 +1,437 @@ +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include // for 'map_list_of()' +#include + +#include "checkpoints.h" + +#include "db.h" +#include "main.h" +#include "uint256.h" + +namespace Checkpoints +{ +typedef std::map MapCheckpoints; + +// +// What makes a good checkpoint block? +// + Is surrounded by blocks with reasonable timestamps +// (no blocks before with a timestamp after, none after with +// timestamp before) +// + Contains no strange transactions +// +static MapCheckpoints mapCheckpoints = + boost::assign::map_list_of + ( 0, uint256("00000ce427729d5393dbf9f464e7a1d2c039e393e881f93448516b1530b688fc")) + ( 1, uint256("000000002f4984003de245a1666d8a8271ddf4236cf190bb9a2595dc4e7d4696")) + ; + + +static MapCheckpoints mapCheckpointsTestnet = + boost::assign::map_list_of + ( 0, hashGenesisBlockTestNet ) + ; + + bool CheckHardened(int nHeight, const uint256& hash) + { + MapCheckpoints& checkpoints = (fTestNet ? mapCheckpointsTestnet : mapCheckpoints); + + MapCheckpoints::const_iterator i = checkpoints.find(nHeight); + if (i == checkpoints.end()) return true; + return hash == i->second; + } + + int GetTotalBlocksEstimate() + { + MapCheckpoints& checkpoints = (fTestNet ? mapCheckpointsTestnet : mapCheckpoints); + + return checkpoints.rbegin()->first; + } + + CBlockIndex* GetLastCheckpoint(const std::map& mapBlockIndex) + { + MapCheckpoints& checkpoints = (fTestNet ? mapCheckpointsTestnet : mapCheckpoints); + + BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, checkpoints) + { + const uint256& hash = i.second; + std::map::const_iterator t = mapBlockIndex.find(hash); + if (t != mapBlockIndex.end()) + return t->second; + } + return NULL; + } + + // ppcoin: synchronized checkpoint (centrally broadcasted) + uint256 hashSyncCheckpoint = 0; + uint256 hashPendingCheckpoint = 0; + CSyncCheckpoint checkpointMessage; + CSyncCheckpoint checkpointMessagePending; + uint256 hashInvalidCheckpoint = 0; + CCriticalSection cs_hashSyncCheckpoint; + + // ppcoin: get last synchronized checkpoint + CBlockIndex* GetLastSyncCheckpoint() + { + LOCK(cs_hashSyncCheckpoint); + if (!mapBlockIndex.count(hashSyncCheckpoint)) + error("GetSyncCheckpoint: block index missing for current sync-checkpoint %s", hashSyncCheckpoint.ToString().c_str()); + else + return mapBlockIndex[hashSyncCheckpoint]; + return NULL; + } + + // ppcoin: only descendant of current sync-checkpoint is allowed + bool ValidateSyncCheckpoint(uint256 hashCheckpoint) + { + if (!mapBlockIndex.count(hashSyncCheckpoint)) + return error("ValidateSyncCheckpoint: block index missing for current sync-checkpoint %s", hashSyncCheckpoint.ToString().c_str()); + if (!mapBlockIndex.count(hashCheckpoint)) + return error("ValidateSyncCheckpoint: block index missing for received sync-checkpoint %s", hashCheckpoint.ToString().c_str()); + + CBlockIndex* pindexSyncCheckpoint = mapBlockIndex[hashSyncCheckpoint]; + CBlockIndex* pindexCheckpointRecv = mapBlockIndex[hashCheckpoint]; + + if (pindexCheckpointRecv->nHeight <= pindexSyncCheckpoint->nHeight) + { + // Received an older checkpoint, trace back from current checkpoint + // to the same height of the received checkpoint to verify + // that current checkpoint should be a descendant block + CBlockIndex* pindex = pindexSyncCheckpoint; + while (pindex->nHeight > pindexCheckpointRecv->nHeight) + if (!(pindex = pindex->pprev)) + return error("ValidateSyncCheckpoint: pprev1 null - block index structure failure"); + if (pindex->GetBlockHash() != hashCheckpoint) + { + hashInvalidCheckpoint = hashCheckpoint; + return error("ValidateSyncCheckpoint: new sync-checkpoint %s is conflicting with current sync-checkpoint %s", hashCheckpoint.ToString().c_str(), hashSyncCheckpoint.ToString().c_str()); + } + return false; // ignore older checkpoint + } + + // Received checkpoint should be a descendant block of the current + // checkpoint. Trace back to the same height of current checkpoint + // to verify. + CBlockIndex* pindex = pindexCheckpointRecv; + while (pindex->nHeight > pindexSyncCheckpoint->nHeight) + if (!(pindex = pindex->pprev)) + return error("ValidateSyncCheckpoint: pprev2 null - block index structure failure"); + if (pindex->GetBlockHash() != hashSyncCheckpoint) + { + hashInvalidCheckpoint = hashCheckpoint; + return error("ValidateSyncCheckpoint: new sync-checkpoint %s is not a descendant of current sync-checkpoint %s", hashCheckpoint.ToString().c_str(), hashSyncCheckpoint.ToString().c_str()); + } + return true; + } + + bool WriteSyncCheckpoint(const uint256& hashCheckpoint) + { + CTxDB txdb; + txdb.TxnBegin(); + if (!txdb.WriteSyncCheckpoint(hashCheckpoint)) + { + txdb.TxnAbort(); + return error("WriteSyncCheckpoint(): failed to write to db sync checkpoint %s", hashCheckpoint.ToString().c_str()); + } + 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; + } + + bool AcceptPendingSyncCheckpoint() + { + LOCK(cs_hashSyncCheckpoint); + if (hashPendingCheckpoint != 0 && mapBlockIndex.count(hashPendingCheckpoint)) + { + if (!ValidateSyncCheckpoint(hashPendingCheckpoint)) + { + hashPendingCheckpoint = 0; + checkpointMessagePending.SetNull(); + return false; + } + + CTxDB txdb; + CBlockIndex* pindexCheckpoint = mapBlockIndex[hashPendingCheckpoint]; + if (!pindexCheckpoint->IsInMainChain()) + { + CBlock block; + if (!block.ReadFromDisk(pindexCheckpoint)) + return error("AcceptPendingSyncCheckpoint: ReadFromDisk failed for sync checkpoint %s", hashPendingCheckpoint.ToString().c_str()); + if (!block.SetBestChain(txdb, pindexCheckpoint)) + { + hashInvalidCheckpoint = hashPendingCheckpoint; + 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()); + hashPendingCheckpoint = 0; + checkpointMessage = checkpointMessagePending; + checkpointMessagePending.SetNull(); + printf("AcceptPendingSyncCheckpoint : sync-checkpoint at %s\n", hashSyncCheckpoint.ToString().c_str()); + // relay the checkpoint + if (!checkpointMessage.IsNull()) + { + BOOST_FOREACH(CNode* pnode, vNodes) + checkpointMessage.RelayTo(pnode); + } + return true; + } + return false; + } + + // 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 maturity window + while (pindex->pnext && (pindex->GetBlockTime() + CHECKPOINT_MAX_SPAN <= pindexBest->GetBlockTime() || pindex->nHeight + std::min(6, nCoinbaseMaturity - 20) <= pindexBest->nHeight)) + pindex = pindex->pnext; + return pindex->GetBlockHash(); + } + + // Check against synchronized checkpoint + bool CheckSync(const uint256& hashBlock, const CBlockIndex* pindexPrev) + { + if (fTestNet) return true; // Testnet has no checkpoints + int nHeight = pindexPrev->nHeight + 1; + + LOCK(cs_hashSyncCheckpoint); + // sync-checkpoint should always be accepted block + assert(mapBlockIndex.count(hashSyncCheckpoint)); + const CBlockIndex* pindexSync = mapBlockIndex[hashSyncCheckpoint]; + + if (nHeight > pindexSync->nHeight) + { + // trace back to same height as sync-checkpoint + const CBlockIndex* pindex = pindexPrev; + while (pindex->nHeight > pindexSync->nHeight) + if (!(pindex = pindex->pprev)) + return error("CheckSync: pprev null - block index structure failure"); + if (pindex->nHeight < pindexSync->nHeight || pindex->GetBlockHash() != hashSyncCheckpoint) + return false; // only descendant of sync-checkpoint can pass check + } + if (nHeight == pindexSync->nHeight && hashBlock != hashSyncCheckpoint) + return false; // same height with sync-checkpoint + if (nHeight < pindexSync->nHeight && !mapBlockIndex.count(hashBlock)) + return false; // lower height than sync-checkpoint + return true; + } + + bool WantedByPendingSyncCheckpoint(uint256 hashBlock) + { + LOCK(cs_hashSyncCheckpoint); + if (hashPendingCheckpoint == 0) + return false; + if (hashBlock == hashPendingCheckpoint) + return true; + if (mapOrphanBlocks.count(hashPendingCheckpoint) + && hashBlock == WantedByOrphan(mapOrphanBlocks[hashPendingCheckpoint])) + return true; + return false; + } + + // ppcoin: reset synchronized checkpoint to last hardened checkpoint + bool ResetSyncCheckpoint() + { + LOCK(cs_hashSyncCheckpoint); + const uint256& hash = mapCheckpoints.rbegin()->second; + if (mapBlockIndex.count(hash) && !mapBlockIndex[hash]->IsInMainChain()) + { + // checkpoint block accepted but not yet in main chain + printf("ResetSyncCheckpoint: SetBestChain to hardened checkpoint %s\n", hash.ToString().c_str()); + CTxDB txdb; + CBlock block; + if (!block.ReadFromDisk(mapBlockIndex[hash])) + return error("ResetSyncCheckpoint: ReadFromDisk failed for hardened checkpoint %s", hash.ToString().c_str()); + if (!block.SetBestChain(txdb, mapBlockIndex[hash])) + { + return error("ResetSyncCheckpoint: SetBestChain failed for hardened checkpoint %s", hash.ToString().c_str()); + } + txdb.Close(); + } + else if(!mapBlockIndex.count(hash)) + { + // checkpoint block not yet accepted + hashPendingCheckpoint = hash; + checkpointMessagePending.SetNull(); + printf("ResetSyncCheckpoint: pending for sync-checkpoint %s\n", hashPendingCheckpoint.ToString().c_str()); + } + + BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, mapCheckpoints) + { + const uint256& hash = i.second; + if (mapBlockIndex.count(hash) && mapBlockIndex[hash]->IsInMainChain()) + { + if (!WriteSyncCheckpoint(hash)) + return error("ResetSyncCheckpoint: failed to write sync checkpoint %s", hash.ToString().c_str()); + printf("ResetSyncCheckpoint: sync-checkpoint reset to %s\n", hashSyncCheckpoint.ToString().c_str()); + return true; + } + } + + return false; + } + + void AskForPendingSyncCheckpoint(CNode* pfrom) + { + LOCK(cs_hashSyncCheckpoint); + if (pfrom && hashPendingCheckpoint != 0 && (!mapBlockIndex.count(hashPendingCheckpoint)) && (!mapOrphanBlocks.count(hashPendingCheckpoint))) + pfrom->AskFor(CInv(MSG_BLOCK, hashPendingCheckpoint)); + } + + bool SetCheckpointPrivKey(std::string strPrivKey) + { + // Test signing a sync-checkpoint with genesis block + CSyncCheckpoint checkpoint; + checkpoint.hashCheckpoint = !fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet; + CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION); + sMsg << (CUnsignedSyncCheckpoint)checkpoint; + checkpoint.vchMsg = std::vector(sMsg.begin(), sMsg.end()); + + std::vector vchPrivKey = ParseHex(strPrivKey); + CKey key; + key.SetPrivKey(CPrivKey(vchPrivKey.begin(), vchPrivKey.end())); // if key is not correct openssl may crash + if (!key.Sign(Hash(checkpoint.vchMsg.begin(), checkpoint.vchMsg.end()), checkpoint.vchSig)) + return false; + + // Test signing successful, proceed + CSyncCheckpoint::strMasterPrivKey = strPrivKey; + return true; + } + + bool SendSyncCheckpoint(uint256 hashCheckpoint) + { + CSyncCheckpoint checkpoint; + checkpoint.hashCheckpoint = hashCheckpoint; + CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION); + sMsg << (CUnsignedSyncCheckpoint)checkpoint; + checkpoint.vchMsg = std::vector(sMsg.begin(), sMsg.end()); + + if (CSyncCheckpoint::strMasterPrivKey.empty()) + return error("SendSyncCheckpoint: Checkpoint master key unavailable."); + std::vector vchPrivKey = ParseHex(CSyncCheckpoint::strMasterPrivKey); + CKey key; + key.SetPrivKey(CPrivKey(vchPrivKey.begin(), vchPrivKey.end())); // if key is not correct openssl may crash + if (!key.Sign(Hash(checkpoint.vchMsg.begin(), checkpoint.vchMsg.end()), checkpoint.vchSig)) + return error("SendSyncCheckpoint: Unable to sign checkpoint, check private key?"); + + if(!checkpoint.ProcessSyncCheckpoint(NULL)) + { + printf("WARNING: SendSyncCheckpoint: Failed to process checkpoint.\n"); + return false; + } + + // Relay checkpoint + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + checkpoint.RelayTo(pnode); + } + return true; + } + + // Is the sync-checkpoint outside maturity window? + bool IsMatureSyncCheckpoint() + { + LOCK(cs_hashSyncCheckpoint); + // sync-checkpoint should always be accepted block + assert(mapBlockIndex.count(hashSyncCheckpoint)); + const CBlockIndex* pindexSync = mapBlockIndex[hashSyncCheckpoint]; + 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()); + } +} + +// ppcoin: sync-checkpoint master key +const std::string CSyncCheckpoint::strMasterPubKey = "0489cab128b9f39a3e514a12c07a7644fa1808662195edcf2d4671b1cce76868b7f2f588a9dfad5753be3cd6b8e9518be439c936e2bad93a25bb6d32300fab41c3"; + +std::string CSyncCheckpoint::strMasterPrivKey = ""; + +// ppcoin: verify signature of sync-checkpoint message +bool CSyncCheckpoint::CheckSignature() +{ + CKey key; + if (!key.SetPubKey(ParseHex(CSyncCheckpoint::strMasterPubKey))) + return error("CSyncCheckpoint::CheckSignature() : SetPubKey failed"); + if (!key.Verify(Hash(vchMsg.begin(), vchMsg.end()), vchSig)) + return error("CSyncCheckpoint::CheckSignature() : verify signature failed"); + + // Now unserialize the data + CDataStream sMsg(vchMsg, SER_NETWORK, PROTOCOL_VERSION); + sMsg >> *(CUnsignedSyncCheckpoint*)this; + return true; +} + +// ppcoin: process synchronized checkpoint +bool CSyncCheckpoint::ProcessSyncCheckpoint(CNode* pfrom) +{ + if (!CheckSignature()) + return false; + + LOCK(Checkpoints::cs_hashSyncCheckpoint); + if (!mapBlockIndex.count(hashCheckpoint)) + { + // We haven't received the checkpoint chain, keep the checkpoint as pending + Checkpoints::hashPendingCheckpoint = hashCheckpoint; + Checkpoints::checkpointMessagePending = *this; + printf("ProcessSyncCheckpoint: pending for sync-checkpoint %s\n", hashCheckpoint.ToString().c_str()); + // Ask this guy to fill in what we're missing + if (pfrom) + { + pfrom->PushGetBlocks(pindexBest, hashCheckpoint); + // ask directly as well in case rejected earlier by duplicate + // proof-of-stake because getblocks may not get it this time + pfrom->AskFor(CInv(MSG_BLOCK, mapOrphanBlocks.count(hashCheckpoint)? WantedByOrphan(mapOrphanBlocks[hashCheckpoint]) : hashCheckpoint)); + } + return false; + } + + if (!Checkpoints::ValidateSyncCheckpoint(hashCheckpoint)) + return false; + + CTxDB txdb; + CBlockIndex* pindexCheckpoint = mapBlockIndex[hashCheckpoint]; + if (!pindexCheckpoint->IsInMainChain()) + { + // checkpoint chain received but not yet main chain + CBlock block; + if (!block.ReadFromDisk(pindexCheckpoint)) + return error("ProcessSyncCheckpoint: ReadFromDisk failed for sync checkpoint %s", hashCheckpoint.ToString().c_str()); + if (!block.SetBestChain(txdb, pindexCheckpoint)) + { + Checkpoints::hashInvalidCheckpoint = hashCheckpoint; + 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()); + Checkpoints::checkpointMessage = *this; + Checkpoints::hashPendingCheckpoint = 0; + Checkpoints::checkpointMessagePending.SetNull(); + printf("ProcessSyncCheckpoint: sync-checkpoint at %s\n", hashCheckpoint.ToString().c_str()); + return true; +} diff --git a/src/checkpoints.h b/src/checkpoints.h new file mode 100644 index 0000000..a0ec20e --- /dev/null +++ b/src/checkpoints.h @@ -0,0 +1,140 @@ +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_CHECKPOINT_H +#define curecoin_CHECKPOINT_H + +#include +#include "net.h" +#include "util.h" + +#define CHECKPOINT_MAX_SPAN (60 * 60 * 4) // max 4 hours before latest block + +class uint256; +class CBlockIndex; +class CSyncCheckpoint; + +/** Block-chain checkpoints are compiled-in sanity checks. + * They are updated every release or three. + */ +namespace Checkpoints +{ + // Returns true if block passes checkpoint checks + bool CheckHardened(int nHeight, const uint256& hash); + + // Return conservative estimate of total number of blocks, 0 if unknown + int GetTotalBlocksEstimate(); + + // Returns last CBlockIndex* in mapBlockIndex that is a checkpoint + CBlockIndex* GetLastCheckpoint(const std::map& mapBlockIndex); + + extern uint256 hashSyncCheckpoint; + extern CSyncCheckpoint checkpointMessage; + extern uint256 hashInvalidCheckpoint; + extern CCriticalSection cs_hashSyncCheckpoint; + + CBlockIndex* GetLastSyncCheckpoint(); + bool WriteSyncCheckpoint(const uint256& hashCheckpoint); + bool AcceptPendingSyncCheckpoint(); + uint256 AutoSelectSyncCheckpoint(); + bool CheckSync(const uint256& hashBlock, const CBlockIndex* pindexPrev); + bool WantedByPendingSyncCheckpoint(uint256 hashBlock); + bool ResetSyncCheckpoint(); + void AskForPendingSyncCheckpoint(CNode* pfrom); + bool SetCheckpointPrivKey(std::string strPrivKey); + bool SendSyncCheckpoint(uint256 hashCheckpoint); + bool IsMatureSyncCheckpoint(); + bool IsSyncCheckpointTooOld(unsigned int nSeconds); +} + +// ppcoin: synchronized checkpoint +class CUnsignedSyncCheckpoint +{ +public: + int nVersion; + uint256 hashCheckpoint; // checkpoint block + + IMPLEMENT_SERIALIZE + ( + READWRITE(this->nVersion); + nVersion = this->nVersion; + READWRITE(hashCheckpoint); + ) + + void SetNull() + { + nVersion = 1; + hashCheckpoint = 0; + } + + std::string ToString() const + { + return strprintf( + "CSyncCheckpoint(\n" + " nVersion = %d\n" + " hashCheckpoint = %s\n" + ")\n", + nVersion, + hashCheckpoint.ToString().c_str()); + } + + void print() const + { + printf("%s", ToString().c_str()); + } +}; + +class CSyncCheckpoint : public CUnsignedSyncCheckpoint +{ +public: + static const std::string strMasterPubKey; + static std::string strMasterPrivKey; + + std::vector vchMsg; + std::vector vchSig; + + CSyncCheckpoint() + { + SetNull(); + } + + IMPLEMENT_SERIALIZE + ( + READWRITE(vchMsg); + READWRITE(vchSig); + ) + + void SetNull() + { + CUnsignedSyncCheckpoint::SetNull(); + vchMsg.clear(); + vchSig.clear(); + } + + bool IsNull() const + { + return (hashCheckpoint == 0); + } + + uint256 GetHash() const + { + return SerializeHash(*this); + } + + bool RelayTo(CNode* pnode) const + { + // returns true if wasn't already sent + if (pnode->hashCheckpointKnown != hashCheckpoint) + { + pnode->hashCheckpointKnown = hashCheckpoint; + pnode->PushMessage("checkpoint", *this); + return true; + } + return false; + } + + bool CheckSignature(); + bool ProcessSyncCheckpoint(CNode* pfrom); +}; + +#endif diff --git a/src/clientversion.h b/src/clientversion.h new file mode 100644 index 0000000..b71bf87 --- /dev/null +++ b/src/clientversion.h @@ -0,0 +1,19 @@ +#ifndef CLIENTVERSION_H +#define CLIENTVERSION_H + +// +// client versioning +// + +// These need to be macros, as version.cpp's and curecoin-qt.rc's voodoo requires it +#define CLIENT_VERSION_MAJOR 1 +#define CLIENT_VERSION_MINOR 9 +#define CLIENT_VERSION_REVISION 1 +#define CLIENT_VERSION_BUILD 0 + +// Converts the parameter X to a string after macro replacement on X has been performed. +// Don't merge these into one macro! +#define STRINGIZE(X) DO_STRINGIZE(X) +#define DO_STRINGIZE(X) #X + +#endif // CLIENTVERSION_H diff --git a/src/compat.h b/src/compat.h new file mode 100644 index 0000000..8fd0dd1 --- /dev/null +++ b/src/compat.h @@ -0,0 +1,63 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef _curecoin_COMPAT_H +#define _curecoin_COMPAT_H 1 + +#ifdef WIN32 +#define _WIN32_WINNT 0x0501 +#define WIN32_LEAN_AND_MEAN 1 +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include +#include +#include +#else +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +typedef u_int SOCKET; +#ifdef WIN32 +#define MSG_NOSIGNAL 0 +#define MSG_DONTWAIT 0 +typedef int socklen_t; +#else +#include "errno.h" +#define WSAGetLastError() errno +#define WSAEINVAL EINVAL +#define WSAEALREADY EALREADY +#define WSAEWOULDBLOCK EWOULDBLOCK +#define WSAEMSGSIZE EMSGSIZE +#define WSAEINTR EINTR +#define WSAEINPROGRESS EINPROGRESS +#define WSAEADDRINUSE EADDRINUSE +#define WSAENOTSOCK EBADF +#define INVALID_SOCKET (SOCKET)(~0) +#define SOCKET_ERROR -1 +#endif + +inline int myclosesocket(SOCKET& hSocket) +{ + if (hSocket == INVALID_SOCKET) + return WSAENOTSOCK; +#ifdef WIN32 + int ret = closesocket(hSocket); +#else + int ret = close(hSocket); +#endif + hSocket = INVALID_SOCKET; + return ret; +} +#define closesocket(s) myclosesocket(s) + + +#endif diff --git a/src/crypter.cpp b/src/crypter.cpp new file mode 100644 index 0000000..d88cb6d --- /dev/null +++ b/src/crypter.cpp @@ -0,0 +1,121 @@ +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include +#include +#include +#include +#ifdef WIN32 +#include +#endif + +#include "crypter.h" + +bool CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::vector& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod) +{ + if (nRounds < 1 || chSalt.size() != WALLET_CRYPTO_SALT_SIZE) + return false; + + 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 (i != (int)WALLET_CRYPTO_KEY_SIZE) + { + memset(&chKey, 0, sizeof chKey); + memset(&chIV, 0, sizeof chIV); + return false; + } + + fKeySet = true; + return true; +} + +bool CCrypter::SetKey(const CKeyingMaterial& chNewKey, const std::vector& chNewIV) +{ + if (chNewKey.size() != WALLET_CRYPTO_KEY_SIZE || chNewIV.size() != WALLET_CRYPTO_KEY_SIZE) + return false; + + memcpy(&chKey[0], &chNewKey[0], sizeof chKey); + memcpy(&chIV[0], &chNewIV[0], sizeof chIV); + + fKeySet = true; + return true; +} + +bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, 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 = vchPlaintext.size(); + 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, chIV); + if (fOk) fOk = EVP_EncryptUpdate(&ctx, &vchCiphertext[0], &nCLen, &vchPlaintext[0], 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 CCrypter::Decrypt(const std::vector& vchCiphertext, CKeyingMaterial& vchPlaintext) +{ + if (!fKeySet) + return false; + + // plaintext will always be equal to or lesser than length of ciphertext + int nLen = vchCiphertext.size(); + int nPLen = nLen, nFLen = 0; + + vchPlaintext = CKeyingMaterial(nPLen); + + 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, chIV); + if (fOk) fOk = EVP_DecryptUpdate(&ctx, &vchPlaintext[0], &nPLen, &vchCiphertext[0], nLen); + 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; +} + + +bool EncryptSecret(CKeyingMaterial& vMasterKey, const CSecret &vchPlaintext, const uint256& nIV, std::vector &vchCiphertext) +{ + CCrypter cKeyCrypter; + std::vector chIV(WALLET_CRYPTO_KEY_SIZE); + memcpy(&chIV[0], &nIV, WALLET_CRYPTO_KEY_SIZE); + if(!cKeyCrypter.SetKey(vMasterKey, chIV)) + return false; + return cKeyCrypter.Encrypt((CKeyingMaterial)vchPlaintext, vchCiphertext); +} + +bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector& vchCiphertext, const uint256& nIV, CSecret& vchPlaintext) +{ + CCrypter cKeyCrypter; + std::vector chIV(WALLET_CRYPTO_KEY_SIZE); + memcpy(&chIV[0], &nIV, WALLET_CRYPTO_KEY_SIZE); + if(!cKeyCrypter.SetKey(vMasterKey, chIV)) + return false; + return cKeyCrypter.Decrypt(vchCiphertext, *((CKeyingMaterial*)&vchPlaintext)); +} diff --git a/src/crypter.h b/src/crypter.h new file mode 100644 index 0000000..6e868ea --- /dev/null +++ b/src/crypter.h @@ -0,0 +1,107 @@ +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef __CRYPTER_H__ +#define __CRYPTER_H__ + +#include "allocators.h" /* for SecureString */ +#include "key.h" +#include "serialize.h" + +const unsigned int WALLET_CRYPTO_KEY_SIZE = 32; +const unsigned int WALLET_CRYPTO_SALT_SIZE = 8; + +/* +Private key encryption is done based on a CMasterKey, +which holds a salt and random encryption key. + +CMasterKeys are encrypted using AES-256-CBC using a key +derived using derivation method nDerivationMethod +(0 == EVP_sha512()) and derivation iterations nDeriveIterations. +vchOtherDerivationParameters is provided for alternative algorithms +which may require more parameters (such as scrypt). + +Wallet Private Keys are then encrypted using AES-256-CBC +with the double-sha256 of the public key as the IV, and the +master key's key as the encryption key (see keystore.[ch]). +*/ + +/** Master key for wallet encryption */ +class CMasterKey +{ +public: + std::vector vchCryptedKey; + std::vector vchSalt; + // 0 = EVP_sha512() + // 1 = scrypt() + unsigned int nDerivationMethod; + unsigned int nDeriveIterations; + // Use this for more parameters to key derivation, + // such as the various parameters to scrypt + std::vector vchOtherDerivationParameters; + + IMPLEMENT_SERIALIZE + ( + READWRITE(vchCryptedKey); + READWRITE(vchSalt); + READWRITE(nDerivationMethod); + READWRITE(nDeriveIterations); + READWRITE(vchOtherDerivationParameters); + ) + CMasterKey() + { + // 25000 rounds is just under 0.1 seconds on a 1.86 GHz Pentium M + // ie slightly lower than the lowest hardware we need bother supporting + nDeriveIterations = 25000; + nDerivationMethod = 0; + vchOtherDerivationParameters = std::vector(0); + } +}; + +typedef std::vector > CKeyingMaterial; + +/** Encryption/decryption context with key information */ +class CCrypter +{ +private: + unsigned char chKey[WALLET_CRYPTO_KEY_SIZE]; + unsigned char chIV[WALLET_CRYPTO_KEY_SIZE]; + bool fKeySet; + +public: + bool SetKeyFromPassphrase(const SecureString &strKeyData, const std::vector& chSalt, const unsigned int nRounds, const unsigned int nDerivationMethod); + bool Encrypt(const CKeyingMaterial& vchPlaintext, std::vector &vchCiphertext); + bool Decrypt(const std::vector& vchCiphertext, CKeyingMaterial& vchPlaintext); + bool SetKey(const CKeyingMaterial& chNewKey, const std::vector& chNewIV); + + void CleanKey() + { + memset(&chKey, 0, sizeof chKey); + memset(&chIV, 0, sizeof chIV); + fKeySet = false; + } + + CCrypter() + { + fKeySet = false; + + // 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); + } + + ~CCrypter() + { + CleanKey(); + + LockedPageManager::instance.UnlockRange(&chKey[0], sizeof chKey); + LockedPageManager::instance.UnlockRange(&chIV[0], sizeof chIV); + } +}; + +bool EncryptSecret(CKeyingMaterial& vMasterKey, const CSecret &vchPlaintext, const uint256& nIV, std::vector &vchCiphertext); +bool DecryptSecret(const CKeyingMaterial& vMasterKey, const std::vector &vchCiphertext, const uint256& nIV, CSecret &vchPlaintext); + +#endif diff --git a/src/curecoin.cbp b/src/curecoin.cbp new file mode 100644 index 0000000..87738fe --- /dev/null +++ b/src/curecoin.cbp @@ -0,0 +1,136 @@ + + + + + + diff --git a/src/curecoinrpc.cpp b/src/curecoinrpc.cpp new file mode 100644 index 0000000..56494df --- /dev/null +++ b/src/curecoinrpc.cpp @@ -0,0 +1,1292 @@ +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "init.h" +#include "util.h" +#include "sync.h" +#include "ui_interface.h" +#include "base58.h" +#include "curecoinrpc.h" +#include "db.h" + +#undef printf +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define printf OutputDebugStringF + +using namespace std; +using namespace boost; +using namespace boost::asio; +using namespace json_spirit; + +void ThreadRPCServer2(void* parg); + +static std::string strRPCUserColonPass; + +const Object emptyobj; + +void ThreadRPCServer3(void* parg); + +static inline unsigned short GetDefaultRPCPort() +{ + return GetBoolArg("-testnet", false) ? DEF_TESTNET_RPCPORT : DEF_RPCPORT; +} + +Object JSONRPCError(int code, const string& message) +{ + Object error; + error.push_back(Pair("code", code)); + error.push_back(Pair("message", message)); + return error; +} + +void RPCTypeCheck(const Array& params, + const list& typesExpected, + bool fAllowNull) +{ + unsigned int i = 0; + BOOST_FOREACH(Value_type t, typesExpected) + { + if (params.size() <= i) + break; + + const Value& v = params[i]; + if (!((v.type() == t) || (fAllowNull && (v.type() == null_type)))) + { + string err = strprintf("Expected type %s, got %s", + Value_type_name[t], Value_type_name[v.type()]); + throw JSONRPCError(RPC_TYPE_ERROR, err); + } + i++; + } +} + +void RPCTypeCheck(const Object& o, + const map& typesExpected, + bool fAllowNull) +{ + BOOST_FOREACH(const PAIRTYPE(string, Value_type)& t, typesExpected) + { + const Value& v = find_value(o, t.first); + if (!fAllowNull && v.type() == null_type) + throw JSONRPCError(RPC_TYPE_ERROR, strprintf("Missing %s", t.first.c_str())); + + if (!((v.type() == t.second) || (fAllowNull && (v.type() == null_type)))) + { + string err = strprintf("Expected type %s for %s, got %s", + Value_type_name[t.second], t.first.c_str(), Value_type_name[v.type()]); + throw JSONRPCError(RPC_TYPE_ERROR, err); + } + } +} + +int64 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); + if (!MoneyRange(nAmount)) + throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount"); + return nAmount; +} + +Value ValueFromAmount(int64 amount) +{ + return (double)amount / (double)COIN; +} + +std::string HexBits(unsigned int nBits) +{ + union { + int32_t nBits; + char cBits[4]; + } uBits; + uBits.nBits = htonl((int32_t)nBits); + return HexStr(BEGIN(uBits.cBits), END(uBits.cBits)); +} + + + +/// +/// Note: This interface may still be subject to change. +/// + +string CRPCTable::help(string strCommand) const +{ + string strRet; + set setDone; + for (map::const_iterator mi = mapCommands.begin(); mi != mapCommands.end(); ++mi) + { + const CRPCCommand *pcmd = mi->second; + string strMethod = mi->first; + // We already filter duplicates, but these deprecated screw up the sort order + if (strMethod.find("label") != string::npos) + continue; + if (strCommand != "" && strMethod != strCommand) + continue; + try + { + Array params; + rpcfn_type pfn = pcmd->actor; + if (setDone.insert(pfn).second) + (*pfn)(params, true); + } + catch (std::exception& e) + { + // Help text is returned in an exception + string strHelp = string(e.what()); + if (strCommand == "") + if (strHelp.find('\n') != string::npos) + strHelp = strHelp.substr(0, strHelp.find('\n')); + strRet += strHelp + "\n"; + } + } + if (strRet == "") + strRet = strprintf("help: unknown command: %s\n", strCommand.c_str()); + strRet = strRet.substr(0,strRet.size()-1); + return strRet; +} + +Value help(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "help [command]\n" + "List commands, or get help for a command."); + + string strCommand; + if (params.size() > 0) + strCommand = params[0].get_str(); + + return tableRPC.help(strCommand); +} + + +Value stop(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "stop \n" + " is true or false to detach the database or not for this stop only\n" + "Stop curecoin 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 "curecoin server stopping"; +} + + + +// +// Call Table +// + + +static const CRPCCommand vRPCCommands[] = +{ // name function safemd unlocked + // ------------------------ ----------------------- ------ -------- + { "help", &help, true, true }, + { "stop", &stop, true, true }, + { "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 }, + { "getmininginfo", &getmininginfo, true, false }, + { "getnetworkhashps", &getnetworkhashps, true, false }, + { "getnewaddress", &getnewaddress, true, false }, + { "getnewpubkey", &getnewpubkey, true, false }, + { "getaccountaddress", &getaccountaddress, true, false }, + { "setaccount", &setaccount, true, false }, + { "getaccount", &getaccount, false, false }, + { "getaddressesbyaccount", &getaddressesbyaccount, true, false }, + { "sendtoaddress", &sendtoaddress, false, false }, + { "getreceivedbyaddress", &getreceivedbyaddress, false, false }, + { "getreceivedbyaccount", &getreceivedbyaccount, false, false }, + { "listreceivedbyaddress", &listreceivedbyaddress, false, false }, + { "listreceivedbyaccount", &listreceivedbyaccount, false, false }, + { "backupwallet", &backupwallet, true, false }, + { "keypoolrefill", &keypoolrefill, true, false }, + { "walletpassphrase", &walletpassphrase, true, false }, + { "walletpassphrasechange", &walletpassphrasechange, false, false }, + { "walletlock", &walletlock, true, false }, + { "encryptwallet", &encryptwallet, false, false }, + { "validateaddress", &validateaddress, true, false }, + { "validatepubkey", &validatepubkey, true, false }, + { "getbalance", &getbalance, false, false }, + { "move", &movecmd, false, false }, + { "sendfrom", &sendfrom, false, false }, + { "sendmany", &sendmany, false, false }, + { "addmultisigaddress", &addmultisigaddress, false, false }, + { "getrawmempool", &getrawmempool, true, false }, + { "getblock", &getblock, false, false }, + { "getblockbynumber", &getblockbynumber, false, false }, + { "getblockhash", &getblockhash, false, false }, + { "gettransaction", &gettransaction, false, false }, + { "listtransactions", &listtransactions, false, false }, + { "listaddressgroupings", &listaddressgroupings, false, false }, + { "signmessage", &signmessage, false, false }, + { "verifymessage", &verifymessage, false, false }, + { "getwork", &getwork, true, false }, + { "getworkex", &getworkex, true, false }, + { "listaccounts", &listaccounts, false, false }, + { "settxfee", &settxfee, false, false }, + { "getblocktemplate", &getblocktemplate, true, false }, + { "submitblock", &submitblock, false, false }, + { "listsinceblock", &listsinceblock, false, false }, + { "dumpprivkey", &dumpprivkey, false, false }, + { "importprivkey", &importprivkey, false, false }, + { "listunspent", &listunspent, false, false }, + { "getrawtransaction", &getrawtransaction, false, false }, + { "createrawtransaction", &createrawtransaction, false, false }, + { "decoderawtransaction", &decoderawtransaction, false, false }, + { "signrawtransaction", &signrawtransaction, false, false }, + { "sendrawtransaction", &sendrawtransaction, false, false }, + { "getcheckpoint", &getcheckpoint, true, false }, + { "reservebalance", &reservebalance, false, true}, + { "checkwallet", &checkwallet, false, true}, + { "repairwallet", &repairwallet, false, true}, + { "resendtx", &resendtx, false, true}, + { "makekeypair", &makekeypair, false, true}, + { "sendalert", &sendalert, false, false}, +}; + +CRPCTable::CRPCTable() +{ + unsigned int vcidx; + for (vcidx = 0; vcidx < (sizeof(vRPCCommands) / sizeof(vRPCCommands[0])); vcidx++) + { + const CRPCCommand *pcmd; + + pcmd = &vRPCCommands[vcidx]; + mapCommands[pcmd->name] = pcmd; + } +} + +const CRPCCommand *CRPCTable::operator[](string name) const +{ + map::const_iterator it = mapCommands.find(name); + if (it == mapCommands.end()) + return NULL; + return (*it).second; +} + +// +// HTTP protocol +// +// This ain't Apache. We're just using HTTP header for the length field +// and to be compatible with other JSON-RPC implementations. +// + +string HTTPPost(const string& strMsg, const map& mapRequestHeaders) +{ + ostringstream s; + s << "POST / HTTP/1.1\r\n" + << "User-Agent: curecoin-json-rpc/" << FormatFullVersion() << "\r\n" + << "Host: 127.0.0.1\r\n" + << "Content-Type: application/json\r\n" + << "Content-Length: " << strMsg.size() << "\r\n" + << "Connection: close\r\n" + << "Accept: application/json\r\n"; + BOOST_FOREACH(const PAIRTYPE(string, string)& item, mapRequestHeaders) + s << item.first << ": " << item.second << "\r\n"; + s << "\r\n" << strMsg; + + return s.str(); +} + +string rfc1123Time() +{ + char buffer[64]; + time_t now; + time(&now); + struct tm* now_gmt = gmtime(&now); + string locale(setlocale(LC_TIME, NULL)); + setlocale(LC_TIME, "C"); // we want POSIX (aka "C") weekday/month strings + strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S +0000", now_gmt); + setlocale(LC_TIME, locale.c_str()); + return string(buffer); +} + +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: curecoin-json-rpc/%s\r\n" + "WWW-Authenticate: Basic realm=\"jsonrpc\"\r\n" + "Content-Type: text/html\r\n" + "Content-Length: 296\r\n" + "\r\n" + "\r\n" + "\r\n" + "\r\n" + "Error\r\n" + "\r\n" + "\r\n" + "

401 Unauthorized.

\r\n" + "\r\n", rfc1123Time().c_str(), FormatFullVersion().c_str()); + const char *cStatus; + if (nStatus == HTTP_OK) cStatus = "OK"; + else if (nStatus == HTTP_BAD_REQUEST) cStatus = "Bad Request"; + else if (nStatus == HTTP_FORBIDDEN) cStatus = "Forbidden"; + else if (nStatus == HTTP_NOT_FOUND) cStatus = "Not Found"; + else if (nStatus == HTTP_INTERNAL_SERVER_ERROR) cStatus = "Internal Server Error"; + else cStatus = ""; + return strprintf( + "HTTP/1.1 %d %s\r\n" + "Date: %s\r\n" + "Connection: %s\r\n" + "Content-Length: %"PRIszu"\r\n" + "Content-Type: application/json\r\n" + "Server: curecoin-json-rpc/%s\r\n" + "\r\n" + "%s", + nStatus, + cStatus, + rfc1123Time().c_str(), + keepalive ? "keep-alive" : "close", + strMsg.size(), + FormatFullVersion().c_str(), + strMsg.c_str()); +} + +int ReadHTTPStatus(std::basic_istream& stream, int &proto) +{ + string str; + getline(stream, str); + vector vWords; + boost::split(vWords, str, boost::is_any_of(" ")); + if (vWords.size() < 2) + return HTTP_INTERNAL_SERVER_ERROR; + proto = 0; + const char *ver = strstr(str.c_str(), "HTTP/1."); + if (ver != NULL) + proto = atoi(ver+7); + return atoi(vWords[1].c_str()); +} + +int ReadHTTPHeader(std::basic_istream& stream, map& mapHeadersRet) +{ + int nLen = 0; + loop + { + string str; + std::getline(stream, str); + if (str.empty() || str == "\r") + break; + string::size_type nColon = str.find(":"); + if (nColon != string::npos) + { + string strHeader = str.substr(0, nColon); + boost::trim(strHeader); + boost::to_lower(strHeader); + string strValue = str.substr(nColon+1); + boost::trim(strValue); + mapHeadersRet[strHeader] = strValue; + if (strHeader == "content-length") + nLen = atoi(strValue.c_str()); + } + } + return nLen; +} + +int ReadHTTP(std::basic_istream& stream, map& mapHeadersRet, string& strMessageRet) +{ + mapHeadersRet.clear(); + strMessageRet = ""; + + // Read status + int nProto = 0; + int nStatus = ReadHTTPStatus(stream, nProto); + + // Read header + int nLen = ReadHTTPHeader(stream, mapHeadersRet); + if (nLen < 0 || nLen > (int)MAX_SIZE) + return HTTP_INTERNAL_SERVER_ERROR; + + // Read message + if (nLen > 0) + { + vector vch(nLen); + stream.read(&vch[0], nLen); + strMessageRet = string(vch.begin(), vch.end()); + } + + string sConHdr = mapHeadersRet["connection"]; + + if ((sConHdr != "close") && (sConHdr != "keep-alive")) + { + if (nProto >= 1) + mapHeadersRet["connection"] = "keep-alive"; + else + mapHeadersRet["connection"] = "close"; + } + + return nStatus; +} + +bool HTTPAuthorized(map& mapHeaders) +{ + string strAuth = mapHeaders["authorization"]; + if (strAuth.substr(0,6) != "Basic ") + return false; + string strUserPass64 = strAuth.substr(6); boost::trim(strUserPass64); + string strUserPass = DecodeBase64(strUserPass64); + return strUserPass == strRPCUserColonPass; +} + +// +// JSON-RPC protocol. curecoin 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'). +// +// 1.0 spec: http://json-rpc.org/wiki/specification +// 1.2 spec: http://groups.google.com/group/json-rpc/web/json-rpc-over-http +// http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx +// + +string JSONRPCRequest(const string& strMethod, const Array& params, const Value& id) +{ + Object request; + request.push_back(Pair("method", strMethod)); + request.push_back(Pair("params", params)); + request.push_back(Pair("id", id)); + return write_string(Value(request), false) + "\n"; +} + +Object JSONRPCReplyObj(const Value& result, const Value& error, const Value& id) +{ + Object reply; + if (error.type() != null_type) + reply.push_back(Pair("result", Value::null)); + else + reply.push_back(Pair("result", result)); + reply.push_back(Pair("error", error)); + reply.push_back(Pair("id", id)); + return reply; +} + +string JSONRPCReply(const Value& result, const Value& error, const Value& id) +{ + Object reply = JSONRPCReplyObj(result, error, id); + return write_string(Value(reply), false) + "\n"; +} + +void ErrorReply(std::ostream& stream, const Object& objError, const Value& id) +{ + // Send error reply from json-rpc error object + int nStatus = HTTP_INTERNAL_SERVER_ERROR; + int code = find_value(objError, "code").get_int(); + if (code == RPC_INVALID_REQUEST) nStatus = HTTP_BAD_REQUEST; + else if (code == RPC_METHOD_NOT_FOUND) nStatus = HTTP_NOT_FOUND; + string strReply = JSONRPCReply(Value::null, objError, id); + stream << HTTPReply(nStatus, strReply, false) << std::flush; +} + +bool ClientAllowed(const boost::asio::ip::address& address) +{ + // Make sure that IPv4-compatible and IPv4-mapped IPv6 addresses are treated as IPv4 addresses + if (address.is_v6() + && (address.to_v6().is_v4_compatible() + || address.to_v6().is_v4_mapped())) + return ClientAllowed(address.to_v6().to_v4()); + + if (address == asio::ip::address_v4::loopback() + || address == asio::ip::address_v6::loopback() + || (address.is_v4() + // Check whether IPv4 addresses match 127.0.0.0/8 (loopback subnet) + && (address.to_v4().to_ulong() & 0xff000000) == 0x7f000000)) + return true; + + const string strAddress = address.to_string(); + const vector& vAllow = mapMultiArgs["-rpcallowip"]; + BOOST_FOREACH(string strAllow, vAllow) + if (WildcardMatch(strAddress, strAllow)) + return true; + return false; +} + +// +// IOStream device that speaks SSL but can also speak non-SSL +// +template +class SSLIOStreamDevice : public iostreams::device { +public: + SSLIOStreamDevice(asio::ssl::stream &streamIn, bool fUseSSLIn) : stream(streamIn) + { + fUseSSL = fUseSSLIn; + fNeedHandshake = fUseSSLIn; + } + + void handshake(ssl::stream_base::handshake_type role) + { + if (!fNeedHandshake) return; + fNeedHandshake = false; + stream.handshake(role); + } + std::streamsize read(char* s, std::streamsize n) + { + handshake(ssl::stream_base::server); // HTTPS servers read first + if (fUseSSL) return stream.read_some(asio::buffer(s, n)); + return stream.next_layer().read_some(asio::buffer(s, n)); + } + std::streamsize write(const char* s, std::streamsize n) + { + handshake(ssl::stream_base::client); // HTTPS clients write first + if (fUseSSL) return asio::write(stream, asio::buffer(s, n)); + return asio::write(stream.next_layer(), asio::buffer(s, n)); + } + bool connect(const std::string& server, const std::string& port) + { + ip::tcp::resolver resolver(stream.get_io_service()); + ip::tcp::resolver::query query(server.c_str(), port.c_str()); + ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query); + ip::tcp::resolver::iterator end; + boost::system::error_code error = asio::error::host_not_found; + while (error && endpoint_iterator != end) + { + stream.lowest_layer().close(); + stream.lowest_layer().connect(*endpoint_iterator++, error); + } + if (error) + return false; + return true; + } + +private: + bool fNeedHandshake; + bool fUseSSL; + asio::ssl::stream& stream; +}; + +class AcceptedConnection +{ +public: + virtual ~AcceptedConnection() {} + + virtual std::iostream& stream() = 0; + virtual std::string peer_address_to_string() const = 0; + virtual void close() = 0; +}; + +template +class AcceptedConnectionImpl : public AcceptedConnection +{ +public: + AcceptedConnectionImpl( + asio::io_service& io_service, + ssl::context &context, + bool fUseSSL) : + sslStream(io_service, context), + _d(sslStream, fUseSSL), + _stream(_d) + { + } + + virtual std::iostream& stream() + { + return _stream; + } + + virtual std::string peer_address_to_string() const + { + return peer.address().to_string(); + } + + virtual void close() + { + _stream.close(); + } + + typename Protocol::endpoint peer; + asio::ssl::stream sslStream; + +private: + SSLIOStreamDevice _d; + iostreams::stream< SSLIOStreamDevice > _stream; +}; + +void ThreadRPCServer(void* parg) +{ + // Make this thread recognisable as the RPC listener + RenameThread("curecoin-rpclist"); + + try + { + vnThreadsRunning[THREAD_RPCLISTENER]++; + ThreadRPCServer2(parg); + vnThreadsRunning[THREAD_RPCLISTENER]--; + } + catch (std::exception& e) { + vnThreadsRunning[THREAD_RPCLISTENER]--; + PrintException(&e, "ThreadRPCServer()"); + } catch (...) { + vnThreadsRunning[THREAD_RPCLISTENER]--; + PrintException(NULL, "ThreadRPCServer()"); + } + printf("ThreadRPCServer exited\n"); +} + +// Forward declaration required for RPCListen +template +static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor > acceptor, + ssl::context& context, + bool fUseSSL, + AcceptedConnection* conn, + const boost::system::error_code& error); + +/** + * Sets up I/O resources to accept and handle a new connection. + */ +template +static void RPCListen(boost::shared_ptr< basic_socket_acceptor > acceptor, + ssl::context& context, + const bool fUseSSL) +{ + // Accept connection + AcceptedConnectionImpl* conn = new AcceptedConnectionImpl(acceptor->get_io_service(), context, fUseSSL); + + acceptor->async_accept( + conn->sslStream.lowest_layer(), + conn->peer, + boost::bind(&RPCAcceptHandler, + acceptor, + boost::ref(context), + fUseSSL, + conn, + boost::asio::placeholders::error)); +} + +/** + * Accept and handle incoming connection. + */ +template +static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor > acceptor, + ssl::context& context, + const bool fUseSSL, + AcceptedConnection* conn, + const boost::system::error_code& error) +{ + vnThreadsRunning[THREAD_RPCLISTENER]++; + + // Immediately start accepting new connections, except when we're cancelled or our socket is closed. + if (error != asio::error::operation_aborted + && acceptor->is_open()) + RPCListen(acceptor, context, fUseSSL); + + AcceptedConnectionImpl* tcp_conn = dynamic_cast< AcceptedConnectionImpl* >(conn); + + // TODO: Actually handle errors + if (error) + { + delete conn; + } + + // Restrict callers by IP. It is important to + // do this before starting client thread, to filter out + // certain DoS and misbehaving clients. + else if (tcp_conn + && !ClientAllowed(tcp_conn->peer.address())) + { + // Only send a 403 if we're not using SSL to prevent a DoS during the SSL handshake. + if (!fUseSSL) + conn->stream() << HTTPReply(HTTP_FORBIDDEN, "", false) << std::flush; + delete conn; + } + + // start HTTP client thread + else if (!NewThread(ThreadRPCServer3, conn)) { + printf("Failed to create RPC server client thread\n"); + delete conn; + } + + vnThreadsRunning[THREAD_RPCLISTENER]--; +} + +void ThreadRPCServer2(void* parg) +{ + printf("ThreadRPCServer started\n"); + + strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]; + if (mapArgs["-rpcpassword"] == "") + { + unsigned char rand_pwd[32]; + RAND_bytes(rand_pwd, 32); + string strWhatAmI = "To use curecoind"; + if (mapArgs.count("-server")) + strWhatAmI = strprintf(_("To use the %s option"), "\"-server\""); + else if (mapArgs.count("-daemon")) + strWhatAmI = strprintf(_("To use the %s option"), "\"-daemon\""); + 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=curecoinrpc\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"), + strWhatAmI.c_str(), + GetConfigFile().string().c_str(), + EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()), + _("Error"), CClientUIInterface::OK | CClientUIInterface::MODAL); + StartShutdown(); + return; + } + + const bool fUseSSL = GetBoolArg("-rpcssl"); + + asio::io_service io_service; + + ssl::context context(io_service, ssl::context::sslv23); + if (fUseSSL) + { + context.set_options(ssl::context::no_sslv2); + + filesystem::path pathCertFile(GetArg("-rpcsslcertificatechainfile", "server.cert")); + if (!pathCertFile.is_complete()) pathCertFile = filesystem::path(GetDataDir()) / pathCertFile; + if (filesystem::exists(pathCertFile)) context.use_certificate_chain_file(pathCertFile.string()); + else printf("ThreadRPCServer ERROR: missing server certificate file %s\n", pathCertFile.string().c_str()); + + filesystem::path pathPKFile(GetArg("-rpcsslprivatekeyfile", "server.pem")); + if (!pathPKFile.is_complete()) pathPKFile = filesystem::path(GetDataDir()) / pathPKFile; + if (filesystem::exists(pathPKFile)) context.use_private_key_file(pathPKFile.string(), ssl::context::pem); + else printf("ThreadRPCServer ERROR: missing server private key file %s\n", pathPKFile.string().c_str()); + + string strCiphers = GetArg("-rpcsslciphers", "TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH"); + SSL_CTX_set_cipher_list(context.impl(), strCiphers.c_str()); + } + + // Try a dual IPv6/IPv4 socket, falling back to separate IPv4 and IPv6 sockets + const bool loopback = !mapArgs.count("-rpcallowip"); + asio::ip::address bindAddress = loopback ? asio::ip::address_v6::loopback() : asio::ip::address_v6::any(); + ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", GetDefaultRPCPort())); + boost::system::error_code v6_only_error; + boost::shared_ptr acceptor(new ip::tcp::acceptor(io_service)); + + boost::signals2::signal StopRequests; + + bool fListening = false; + std::string strerr; + try + { + acceptor->open(endpoint.protocol()); + acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); + + // Try making the socket dual IPv6/IPv4 (if listening on the "any" address) + acceptor->set_option(boost::asio::ip::v6_only(loopback), v6_only_error); + + acceptor->bind(endpoint); + acceptor->listen(socket_base::max_connections); + + RPCListen(acceptor, context, fUseSSL); + // Cancel outstanding listen-requests for this acceptor when shutting down + StopRequests.connect(signals2::slot( + static_cast(&ip::tcp::acceptor::close), acceptor.get()) + .track(acceptor)); + + fListening = true; + } + catch(boost::system::system_error &e) + { + strerr = strprintf(_("An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s"), endpoint.port(), e.what()); + } + + try { + // If dual IPv6/IPv4 failed (or we're opening loopback interfaces only), open IPv4 separately + if (!fListening || loopback || v6_only_error) + { + bindAddress = loopback ? asio::ip::address_v4::loopback() : asio::ip::address_v4::any(); + endpoint.address(bindAddress); + + acceptor.reset(new ip::tcp::acceptor(io_service)); + acceptor->open(endpoint.protocol()); + acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); + acceptor->bind(endpoint); + acceptor->listen(socket_base::max_connections); + + RPCListen(acceptor, context, fUseSSL); + // Cancel outstanding listen-requests for this acceptor when shutting down + StopRequests.connect(signals2::slot( + static_cast(&ip::tcp::acceptor::close), acceptor.get()) + .track(acceptor)); + + fListening = true; + } + } + catch(boost::system::system_error &e) + { + strerr = strprintf(_("An error occurred while setting up the RPC port %u for listening on IPv4: %s"), endpoint.port(), e.what()); + } + + if (!fListening) { + uiInterface.ThreadSafeMessageBox(strerr, _("Error"), CClientUIInterface::OK | CClientUIInterface::MODAL); + StartShutdown(); + return; + } + + vnThreadsRunning[THREAD_RPCLISTENER]--; + while (!fShutdown) + io_service.run_one(); + vnThreadsRunning[THREAD_RPCLISTENER]++; + StopRequests(); +} + +class JSONRequest +{ +public: + Value id; + string strMethod; + Array params; + + JSONRequest() { id = Value::null; } + void parse(const Value& valRequest); +}; + +void JSONRequest::parse(const Value& valRequest) +{ + // Parse request + if (valRequest.type() != obj_type) + throw JSONRPCError(RPC_INVALID_REQUEST, "Invalid Request object"); + const Object& request = valRequest.get_obj(); + + // Parse id now so errors from here on will have the id + id = find_value(request, "id"); + + // Parse method + Value valMethod = find_value(request, "method"); + if (valMethod.type() == null_type) + throw JSONRPCError(RPC_INVALID_REQUEST, "Missing method"); + if (valMethod.type() != str_type) + throw JSONRPCError(RPC_INVALID_REQUEST, "Method must be a string"); + strMethod = valMethod.get_str(); + if (strMethod != "getwork" && strMethod != "getblocktemplate") + printf("ThreadRPCServer method=%s\n", strMethod.c_str()); + + // Parse params + Value valParams = find_value(request, "params"); + if (valParams.type() == array_type) + params = valParams.get_array(); + else if (valParams.type() == null_type) + params = Array(); + else + throw JSONRPCError(RPC_INVALID_REQUEST, "Params must be an array"); +} + +static Object JSONRPCExecOne(const Value& req) +{ + Object rpc_result; + + JSONRequest jreq; + try { + jreq.parse(req); + + Value result = tableRPC.execute(jreq.strMethod, jreq.params); + rpc_result = JSONRPCReplyObj(result, Value::null, jreq.id); + } + catch (Object& objError) + { + rpc_result = JSONRPCReplyObj(Value::null, objError, jreq.id); + } + catch (std::exception& e) + { + rpc_result = JSONRPCReplyObj(Value::null, + JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id); + } + + return rpc_result; +} + +static string JSONRPCExecBatch(const Array& vReq) +{ + Array ret; + for (unsigned int reqIdx = 0; reqIdx < vReq.size(); reqIdx++) + ret.push_back(JSONRPCExecOne(vReq[reqIdx])); + + return write_string(Value(ret), false) + "\n"; +} + +static CCriticalSection cs_THREAD_RPCHANDLER; + +void ThreadRPCServer3(void* parg) +{ + // Make this thread recognisable as the RPC handler + RenameThread("curecoin-rpchand"); + + { + LOCK(cs_THREAD_RPCHANDLER); + vnThreadsRunning[THREAD_RPCHANDLER]++; + } + AcceptedConnection *conn = (AcceptedConnection *) parg; + + bool fRun = true; + loop { + if (fShutdown || !fRun) + { + conn->close(); + delete conn; + { + LOCK(cs_THREAD_RPCHANDLER); + --vnThreadsRunning[THREAD_RPCHANDLER]; + } + return; + } + map mapHeaders; + string strRequest; + + ReadHTTP(conn->stream(), mapHeaders, strRequest); + + // Check authorization + if (mapHeaders.count("authorization") == 0) + { + conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush; + break; + } + if (!HTTPAuthorized(mapHeaders)) + { + printf("ThreadRPCServer incorrect password attempt from %s\n", conn->peer_address_to_string().c_str()); + /* Deter brute-forcing short passwords. + If this results in a DOS the user really + shouldn't have their RPC port exposed.*/ + if (mapArgs["-rpcpassword"].size() < 20) + Sleep(250); + + conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush; + break; + } + if (mapHeaders["connection"] == "close") + fRun = false; + + JSONRequest jreq; + try + { + // Parse request + Value valRequest; + if (!read_string(strRequest, valRequest)) + throw JSONRPCError(RPC_PARSE_ERROR, "Parse error"); + + string strReply; + + // singleton request + if (valRequest.type() == obj_type) { + jreq.parse(valRequest); + + Value result = tableRPC.execute(jreq.strMethod, jreq.params); + + // Send reply + strReply = JSONRPCReply(result, Value::null, jreq.id); + + // array of requests + } else if (valRequest.type() == array_type) + strReply = JSONRPCExecBatch(valRequest.get_array()); + else + throw JSONRPCError(RPC_PARSE_ERROR, "Top-level object parse error"); + + conn->stream() << HTTPReply(HTTP_OK, strReply, fRun) << std::flush; + } + catch (Object& objError) + { + ErrorReply(conn->stream(), objError, jreq.id); + break; + } + catch (std::exception& e) + { + ErrorReply(conn->stream(), JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id); + break; + } + } + + delete conn; + { + LOCK(cs_THREAD_RPCHANDLER); + vnThreadsRunning[THREAD_RPCHANDLER]--; + } +} + +json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_spirit::Array ¶ms) const +{ + // Find method + const CRPCCommand *pcmd = tableRPC[strMethod]; + if (!pcmd) + throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Method not found"); + + // Observe safe mode + string strWarning = GetWarnings("rpc"); + if (strWarning != "" && !GetBoolArg("-disablesafemode") && + !pcmd->okSafeMode) + throw JSONRPCError(RPC_FORBIDDEN_BY_SAFE_MODE, string("Safe mode: ") + strWarning); + + try + { + // Execute + Value result; + { + if (pcmd->unlocked) + result = pcmd->actor(params, false); + else { + LOCK2(cs_main, pwalletMain->cs_wallet); + result = pcmd->actor(params, false); + } + } + return result; + } + catch (std::exception& e) + { + throw JSONRPCError(RPC_MISC_ERROR, e.what()); + } +} + + +Object CallRPC(const string& strMethod, const Array& params) +{ + if (mapArgs["-rpcuser"] == "" && mapArgs["-rpcpassword"] == "") + throw runtime_error(strprintf( + _("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."), + GetConfigFile().string().c_str())); + + // Connect to localhost + bool fUseSSL = GetBoolArg("-rpcssl"); + asio::io_service io_service; + ssl::context context(io_service, ssl::context::sslv23); + context.set_options(ssl::context::no_sslv2); + asio::ssl::stream sslStream(io_service, context); + SSLIOStreamDevice d(sslStream, fUseSSL); + iostreams::stream< SSLIOStreamDevice > stream(d); + if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(GetDefaultRPCPort())))) + throw runtime_error("couldn't connect to server"); + + // HTTP basic authentication + string strUserPass64 = EncodeBase64(mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]); + map mapRequestHeaders; + mapRequestHeaders["Authorization"] = string("Basic ") + strUserPass64; + + // Send request + string strRequest = JSONRPCRequest(strMethod, params, 1); + string strPost = HTTPPost(strRequest, mapRequestHeaders); + stream << strPost << std::flush; + + // Receive reply + map mapHeaders; + string strReply; + int nStatus = ReadHTTP(stream, mapHeaders, strReply); + if (nStatus == HTTP_UNAUTHORIZED) + throw runtime_error("incorrect rpcuser or rpcpassword (authorization failed)"); + else if (nStatus >= 400 && nStatus != HTTP_BAD_REQUEST && nStatus != HTTP_NOT_FOUND && nStatus != HTTP_INTERNAL_SERVER_ERROR) + throw runtime_error(strprintf("server returned HTTP error %d", nStatus)); + else if (strReply.empty()) + throw runtime_error("no response from server"); + + // Parse reply + Value valReply; + if (!read_string(strReply, valReply)) + throw runtime_error("couldn't parse reply from server"); + const Object& reply = valReply.get_obj(); + if (reply.empty()) + throw runtime_error("expected reply to have result, error and id properties"); + + return reply; +} + + + + +template +void ConvertTo(Value& value, bool fAllowNull=false) +{ + if (fAllowNull && value.type() == null_type) + return; + if (value.type() == str_type) + { + // reinterpret string as unquoted json value + Value value2; + string strJSON = value.get_str(); + if (!read_string(strJSON, value2)) + throw runtime_error(string("Error parsing JSON:")+strJSON); + ConvertTo(value2, fAllowNull); + value = value2; + } + else + { + value = value.get_value(); + } +} + +// Convert strings to command-specific RPC representation +Array RPCConvertValues(const std::string &strMethod, const std::vector &strParams) +{ + Array params; + BOOST_FOREACH(const std::string ¶m, strParams) + params.push_back(param); + + int n = params.size(); + + // + // Special case non-string parameter types + // + if (strMethod == "stop" && n > 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 == "getnetworkhashps" && n > 0) ConvertTo(params[0]); + if (strMethod == "settxfee" && n > 0) ConvertTo(params[0]); + if (strMethod == "getreceivedbyaddress" && n > 1) ConvertTo(params[1]); + if (strMethod == "getreceivedbyaccount" && n > 1) ConvertTo(params[1]); + if (strMethod == "listreceivedbyaddress" && n > 0) ConvertTo(params[0]); + if (strMethod == "listreceivedbyaddress" && n > 1) ConvertTo(params[1]); + if (strMethod == "listreceivedbyaccount" && n > 0) ConvertTo(params[0]); + if (strMethod == "listreceivedbyaccount" && n > 1) ConvertTo(params[1]); + if (strMethod == "getbalance" && n > 1) ConvertTo(params[1]); + if (strMethod == "getblock" && n > 1) ConvertTo(params[1]); + if (strMethod == "getblockbynumber" && n > 0) ConvertTo(params[0]); + if (strMethod == "getblockbynumber" && n > 1) ConvertTo(params[1]); + if (strMethod == "getblockhash" && n > 0) ConvertTo(params[0]); + if (strMethod == "move" && n > 2) ConvertTo(params[2]); + if (strMethod == "move" && n > 3) ConvertTo(params[3]); + if (strMethod == "sendfrom" && n > 2) ConvertTo(params[2]); + if (strMethod == "sendfrom" && n > 3) ConvertTo(params[3]); + if (strMethod == "listtransactions" && n > 1) ConvertTo(params[1]); + if (strMethod == "listtransactions" && n > 2) ConvertTo(params[2]); + if (strMethod == "listaccounts" && n > 0) ConvertTo(params[0]); + if (strMethod == "walletpassphrase" && n > 1) ConvertTo(params[1]); + if (strMethod == "walletpassphrase" && n > 2) ConvertTo(params[2]); + if (strMethod == "getblocktemplate" && n > 0) ConvertTo(params[0]); + if (strMethod == "listsinceblock" && n > 1) ConvertTo(params[1]); + 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 == "addmultisigaddress" && n > 0) ConvertTo(params[0]); + if (strMethod == "addmultisigaddress" && n > 1) ConvertTo(params[1]); + if (strMethod == "listunspent" && n > 0) ConvertTo(params[0]); + if (strMethod == "listunspent" && n > 1) ConvertTo(params[1]); + if (strMethod == "listunspent" && n > 2) ConvertTo(params[2]); + if (strMethod == "getrawtransaction" && n > 1) ConvertTo(params[1]); + if (strMethod == "createrawtransaction" && n > 0) ConvertTo(params[0]); + if (strMethod == "createrawtransaction" && n > 1) ConvertTo(params[1]); + if (strMethod == "signrawtransaction" && n > 1) ConvertTo(params[1], true); + if (strMethod == "signrawtransaction" && n > 2) ConvertTo(params[2], true); + + return params; +} + +int CommandLineRPC(int argc, char *argv[]) +{ + string strPrint; + int nRet = 0; + try + { + // Skip switches + while (argc > 1 && IsSwitchChar(argv[1][0])) + { + argc--; + argv++; + } + + // Method + if (argc < 2) + throw runtime_error("too few parameters"); + string strMethod = argv[1]; + + // Parameters default to strings + std::vector strParams(&argv[2], &argv[argc]); + Array params = RPCConvertValues(strMethod, strParams); + + // Execute + Object reply = CallRPC(strMethod, params); + + // Parse reply + const Value& result = find_value(reply, "result"); + const Value& error = find_value(reply, "error"); + + if (error.type() != null_type) + { + // Error + strPrint = "error: " + write_string(error, false); + int code = find_value(error.get_obj(), "code").get_int(); + nRet = abs(code); + } + else + { + // Result + if (result.type() == null_type) + strPrint = ""; + else if (result.type() == str_type) + strPrint = result.get_str(); + else + strPrint = write_string(result, true); + } + } + catch (std::exception& e) + { + strPrint = string("error: ") + e.what(); + nRet = 87; + } + catch (...) + { + PrintException(NULL, "CommandLineRPC()"); + } + + if (strPrint != "") + { + fprintf((nRet == 0 ? stdout : stderr), "%s\n", strPrint.c_str()); + } + return nRet; +} + + + + +#ifdef TEST +int main(int argc, char *argv[]) +{ +#ifdef _MSC_VER + // Turn off Microsoft heap dump noise + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_WARN, CreateFile("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0)); +#endif + setbuf(stdin, NULL); + setbuf(stdout, NULL); + setbuf(stderr, NULL); + + try + { + if (argc >= 2 && string(argv[1]) == "-server") + { + printf("server ready\n"); + ThreadRPCServer(NULL); + } + else + { + return CommandLineRPC(argc, argv); + } + } + catch (std::exception& e) { + PrintException(&e, "main()"); + } catch (...) { + PrintException(NULL, "main()"); + } + return 0; +} +#endif + +const CRPCTable tableRPC; diff --git a/src/curecoinrpc.h b/src/curecoinrpc.h new file mode 100644 index 0000000..b3e2232 --- /dev/null +++ b/src/curecoinrpc.h @@ -0,0 +1,205 @@ +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef _curecoinRPC_H_ +#define _curecoinRPC_H_ 1 + +#include +#include +#include + +class CBlockIndex; + +#include "json/json_spirit_reader_template.h" +#include "json/json_spirit_writer_template.h" +#include "json/json_spirit_utils.h" + +#include "util.h" +#include "checkpoints.h" + +// HTTP status codes +enum HTTPStatusCode +{ + HTTP_OK = 200, + HTTP_BAD_REQUEST = 400, + HTTP_UNAUTHORIZED = 401, + HTTP_FORBIDDEN = 403, + HTTP_NOT_FOUND = 404, + HTTP_INTERNAL_SERVER_ERROR = 500, +}; + +// curecoin RPC error codes +enum RPCErrorCode +{ + // Standard JSON-RPC 2.0 errors + RPC_INVALID_REQUEST = -32600, + RPC_METHOD_NOT_FOUND = -32601, + RPC_INVALID_PARAMS = -32602, + RPC_INTERNAL_ERROR = -32603, + RPC_PARSE_ERROR = -32700, + + // General application defined errors + RPC_MISC_ERROR = -1, // std::exception thrown in command handling + RPC_FORBIDDEN_BY_SAFE_MODE = -2, // Server is in safe mode, and command is not allowed in safe mode + RPC_TYPE_ERROR = -3, // Unexpected type was passed as parameter + RPC_INVALID_ADDRESS_OR_KEY = -5, // Invalid address or key + RPC_OUT_OF_MEMORY = -7, // Ran out of memory during operation + 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 + + // P2P client errors + RPC_CLIENT_NOT_CONNECTED = -9, // curecoin is not connected + RPC_CLIENT_IN_INITIAL_DOWNLOAD = -10, // Still downloading initial blocks + + // Wallet errors + RPC_WALLET_ERROR = -4, // Unspecified problem with wallet (key not found etc.) + RPC_WALLET_INSUFFICIENT_FUNDS = -6, // Not enough funds in wallet or account + RPC_WALLET_INVALID_ACCOUNT_NAME = -11, // Invalid account name + RPC_WALLET_KEYPOOL_RAN_OUT = -12, // Keypool ran out, call keypoolrefill first + RPC_WALLET_UNLOCK_NEEDED = -13, // Enter the wallet passphrase with walletpassphrase first + RPC_WALLET_PASSPHRASE_INCORRECT = -14, // The wallet passphrase entered was incorrect + RPC_WALLET_WRONG_ENC_STATE = -15, // Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.) + RPC_WALLET_ENCRYPTION_FAILED = -16, // Failed to encrypt the wallet + RPC_WALLET_ALREADY_UNLOCKED = -17, // Wallet is already unlocked +}; + +json_spirit::Object JSONRPCError(int code, const std::string& message); + +void ThreadRPCServer(void* parg); +int CommandLineRPC(int argc, char *argv[]); + +/** Convert parameter values for RPC call from strings to command-specific JSON objects. */ +json_spirit::Array RPCConvertValues(const std::string &strMethod, const std::vector &strParams); + +/* + Type-check arguments; throws JSONRPCError if wrong type given. Does not check that + the right number of arguments are passed, just that any passed are the correct type. + Use like: RPCTypeCheck(params, boost::assign::list_of(str_type)(int_type)(obj_type)); +*/ +void RPCTypeCheck(const json_spirit::Array& params, + const std::list& typesExpected, bool fAllowNull=false); +/* + Check for expected keys/value types in an Object. + Use like: RPCTypeCheck(object, boost::assign::map_list_of("name", str_type)("value", int_type)); +*/ +void RPCTypeCheck(const json_spirit::Object& o, + const std::map& typesExpected, bool fAllowNull=false); + +typedef json_spirit::Value(*rpcfn_type)(const json_spirit::Array& params, bool fHelp); + +class CRPCCommand +{ +public: + std::string name; + rpcfn_type actor; + bool okSafeMode; + bool unlocked; +}; + +/** + * curecoin RPC command dispatcher. + */ +class CRPCTable +{ +private: + std::map mapCommands; +public: + CRPCTable(); + const CRPCCommand* operator[](std::string name) const; + std::string help(std::string name) const; + + /** + * Execute a method. + * @param method Method to execute + * @param params Array of arguments (JSON objects) + * @returns Result of the call. + * @throws an exception (json_spirit::Value) when an error happens. + */ + json_spirit::Value execute(const std::string &method, const json_spirit::Array ¶ms) const; +}; + +extern const CRPCTable tableRPC; + +extern int64 nWalletUnlockTime; +extern int64 AmountFromValue(const json_spirit::Value& value); +extern json_spirit::Value ValueFromAmount(int64 amount); +extern double GetDifficulty(const CBlockIndex* blockindex = NULL); +extern std::string HexBits(unsigned int nBits); +extern std::string HelpRequiringPassphrase(); +extern void EnsureWalletIsUnlocked(); + + +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 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 getmininginfo(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getnetworkhashps(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); +extern json_spirit::Value submitblock(const json_spirit::Array& params, bool fHelp); + +extern json_spirit::Value getnewaddress(const json_spirit::Array& params, bool fHelp); // in rpcwallet.cpp +extern json_spirit::Value getaccountaddress(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value setaccount(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getaccount(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getaddressesbyaccount(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value sendtoaddress(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value signmessage(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value verifymessage(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getreceivedbyaddress(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getreceivedbyaccount(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getbalance(const json_spirit::Array& params, bool fHelp); +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 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); +extern json_spirit::Value listaddressgroupings(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value listaccounts(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value listsinceblock(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value gettransaction(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value backupwallet(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value keypoolrefill(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value walletpassphrase(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value walletpassphrasechange(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value walletlock(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value encryptwallet(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value validateaddress(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getinfo(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value reservebalance(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value checkwallet(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value repairwallet(const json_spirit::Array& params, bool fHelp); +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 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 signrawtransaction(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value sendrawtransaction(const json_spirit::Array& params, bool fHelp); + +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); +extern json_spirit::Value getrawmempool(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getblockhash(const json_spirit::Array& params, bool fHelp); +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); + +#endif diff --git a/src/db.cpp b/src/db.cpp new file mode 100644 index 0000000..e6a52f5 --- /dev/null +++ b/src/db.cpp @@ -0,0 +1,976 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// 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 "net.h" +#include "checkpoints.h" +#include "util.h" +#include "main.h" +#include "kernel.h" +#include +#include +#include + +#ifndef WIN32 +#include "sys/stat.h" +#endif + +using namespace std; +using namespace boost; + + +unsigned int nWalletDBUpdated; + + + +// +// CDB +// + +CDBEnv bitdb; + +void CDBEnv::EnvShutdown() +{ + if (!fDbEnvInit) + return; + + fDbEnvInit = false; + int ret = dbenv.close(0); + if (ret != 0) + printf("EnvShutdown exception: %s (%d)\n", DbEnv::strerror(ret), ret); + if (!fMockDb) + DbEnv(0).remove(strPath.c_str(), 0); +} + +CDBEnv::CDBEnv() : dbenv(DB_CXX_NO_EXCEPTIONS) +{ + fDbEnvInit = false; + fMockDb = false; +} + +CDBEnv::~CDBEnv() +{ + EnvShutdown(); +} + +void CDBEnv::Close() +{ + EnvShutdown(); +} + +bool CDBEnv::Open(boost::filesystem::path pathEnv_) +{ + if (fDbEnvInit) + return true; + + if (fShutdown) + return false; + + pathEnv = pathEnv_; + filesystem::path pathDataDir = pathEnv; + strPath = pathDataDir.string(); + filesystem::path pathLogDir = pathDataDir / "database"; + filesystem::create_directory(pathLogDir); + filesystem::path pathErrorFile = pathDataDir / "db.log"; + printf("dbenv.open LogDir=%s ErrorFile=%s\n", pathLogDir.string().c_str(), pathErrorFile.string().c_str()); + + unsigned int nEnvFlags = 0; + if (GetBoolArg("-privdb", true)) + nEnvFlags |= DB_PRIVATE; + + int nDbCache = GetArg("-dbcache", 25); + dbenv.set_lg_dir(pathLogDir.string().c_str()); + 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); + 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); + int ret = dbenv.open(strPath.c_str(), + DB_CREATE | + DB_INIT_LOCK | + DB_INIT_LOG | + DB_INIT_MPOOL | + DB_INIT_TXN | + DB_THREAD | + DB_RECOVER | + nEnvFlags, + S_IRUSR | S_IWUSR); + if (ret != 0) + return error("CDB() : error %s (%d) opening database environment", DbEnv::strerror(ret), ret); + + fDbEnvInit = true; + fMockDb = false; + return true; +} + +void CDBEnv::MakeMock() +{ + if (fDbEnvInit) + throw runtime_error("CDBEnv::MakeMock(): already initialized"); + + if (fShutdown) + throw runtime_error("CDBEnv::MakeMock(): during shutdown"); + + printf("CDBEnv::MakeMock()\n"); + + dbenv.set_cachesize(1, 0, 1); + dbenv.set_lg_bsize(10485760*4); + dbenv.set_lg_max(10485760); + dbenv.set_lk_max_locks(10000); + dbenv.set_lk_max_objects(10000); + dbenv.set_flags(DB_AUTO_COMMIT, 1); +// dbenv.log_set_config(DB_LOG_IN_MEMORY, 1); + int ret = dbenv.open(NULL, + DB_CREATE | + DB_INIT_LOCK | + DB_INIT_LOG | + DB_INIT_MPOOL | + DB_INIT_TXN | + DB_THREAD | + DB_PRIVATE, + S_IRUSR | S_IWUSR); + if (ret > 0) + throw runtime_error(strprintf("CDBEnv::MakeMock(): error %d opening database environment", ret)); + + fDbEnvInit = true; + fMockDb = true; +} + +CDBEnv::VerifyResult CDBEnv::Verify(std::string strFile, bool (*recoverFunc)(CDBEnv& dbenv, std::string strFile)) +{ + LOCK(cs_db); + assert(mapFileUseCount.count(strFile) == 0); + + Db db(&dbenv, 0); + int result = db.verify(strFile.c_str(), NULL, NULL, 0); + if (result == 0) + return VERIFY_OK; + else if (recoverFunc == NULL) + return RECOVER_FAIL; + + // Try to recover: + bool fRecovered = (*recoverFunc)(*this, strFile); + return (fRecovered ? RECOVER_OK : RECOVER_FAIL); +} + +bool CDBEnv::Salvage(std::string strFile, bool fAggressive, + std::vector& vResult) +{ + LOCK(cs_db); + assert(mapFileUseCount.count(strFile) == 0); + + u_int32_t flags = DB_SALVAGE; + if (fAggressive) flags |= DB_AGGRESSIVE; + + stringstream strDump; + + Db db(&dbenv, 0); + int result = db.verify(strFile.c_str(), NULL, &strDump, flags); + if (result != 0) + { + printf("ERROR: db salvage failed\n"); + return false; + } + + // Format of bdb dump is ascii lines: + // header lines... + // HEADER=END + // hexadecimal key + // hexadecimal value + // ... repeated + // DATA=END + + string strLine; + while (!strDump.eof() && strLine != "HEADER=END") + getline(strDump, strLine); // Skip past header + + std::string keyHex, valueHex; + while (!strDump.eof() && keyHex != "DATA=END") + { + getline(strDump, keyHex); + if (keyHex != "DATA_END") + { + getline(strDump, valueHex); + vResult.push_back(make_pair(ParseHex(keyHex),ParseHex(valueHex))); + } + } + + return (result == 0); +} + + +void CDBEnv::CheckpointLSN(std::string strFile) +{ + dbenv.txn_checkpoint(0, 0, 0); + if (fMockDb) + return; + dbenv.lsn_reset(strFile.c_str(), 0); +} + + +CDB::CDB(const char *pszFile, const char* pszMode) : + pdb(NULL), activeTxn(NULL) +{ + int ret; + if (pszFile == NULL) + return; + + fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w')); + bool fCreate = strchr(pszMode, 'c'); + unsigned int nFlags = DB_THREAD; + if (fCreate) + nFlags |= DB_CREATE; + + { + LOCK(bitdb.cs_db); + if (!bitdb.Open(GetDataDir())) + throw runtime_error("env open failed"); + + strFile = pszFile; + ++bitdb.mapFileUseCount[strFile]; + pdb = bitdb.mapDb[strFile]; + if (pdb == NULL) + { + pdb = new Db(&bitdb.dbenv, 0); + + bool fMockDb = bitdb.IsMock(); + if (fMockDb) + { + DbMpoolFile*mpf = pdb->get_mpf(); + ret = mpf->set_flags(DB_MPOOL_NOFILE, 1); + if (ret != 0) + throw runtime_error(strprintf("CDB() : failed to configure for no temp file backing for database %s", pszFile)); + } + + ret = pdb->open(NULL, // Txn pointer + fMockDb ? NULL : pszFile, // Filename + "main", // Logical db name + DB_BTREE, // Database type + nFlags, // Flags + 0); + + if (ret != 0) + { + delete pdb; + pdb = NULL; + --bitdb.mapFileUseCount[strFile]; + strFile = ""; + throw runtime_error(strprintf("CDB() : can't open database file %s, error %d", pszFile, ret)); + } + + if (fCreate && !Exists(string("version"))) + { + bool fTmp = fReadOnly; + fReadOnly = false; + WriteVersion(CLIENT_VERSION); + fReadOnly = fTmp; + } + + bitdb.mapDb[strFile] = pdb; + } + } +} + +static bool IsChainFile(std::string strFile) +{ + if (strFile == "blkindex.dat") + return true; + + return false; +} + +void CDB::Close() +{ + if (!pdb) + return; + if (activeTxn) + activeTxn->abort(); + activeTxn = NULL; + pdb = NULL; + + // Flush database activity from memory pool to disk log + unsigned int nMinutes = 0; + if (fReadOnly) + nMinutes = 1; + if (IsChainFile(strFile)) + nMinutes = 2; + if (IsChainFile(strFile) && IsInitialBlockDownload()) + nMinutes = 5; + + bitdb.dbenv.txn_checkpoint(nMinutes ? GetArg("-dblogsize", 100)*1024 : 0, nMinutes, 0); + + { + LOCK(bitdb.cs_db); + --bitdb.mapFileUseCount[strFile]; + } +} + +void CDBEnv::CloseDb(const string& strFile) +{ + { + LOCK(cs_db); + if (mapDb[strFile] != NULL) + { + // Close the database handle + Db* pdb = mapDb[strFile]; + pdb->close(0); + delete pdb; + mapDb[strFile] = NULL; + } + } +} + +bool CDBEnv::RemoveDb(const string& strFile) +{ + this->CloseDb(strFile); + + LOCK(cs_db); + int rc = dbenv.dbremove(NULL, strFile.c_str(), NULL, DB_AUTO_COMMIT); + return (rc == 0); +} + +bool CDB::Rewrite(const string& strFile, const char* pszSkip) +{ + while (!fShutdown) + { + { + LOCK(bitdb.cs_db); + if (!bitdb.mapFileUseCount.count(strFile) || bitdb.mapFileUseCount[strFile] == 0) + { + // Flush log data to the dat file + bitdb.CloseDb(strFile); + bitdb.CheckpointLSN(strFile); + bitdb.mapFileUseCount.erase(strFile); + + bool fSuccess = true; + printf("Rewriting %s...\n", strFile.c_str()); + string strFileRes = strFile + ".rewrite"; + { // surround usage of db with extra {} + CDB db(strFile.c_str(), "r"); + Db* pdbCopy = new Db(&bitdb.dbenv, 0); + + int ret = pdbCopy->open(NULL, // Txn pointer + strFileRes.c_str(), // Filename + "main", // Logical db name + DB_BTREE, // Database type + DB_CREATE, // Flags + 0); + if (ret > 0) + { + printf("Cannot create database file %s\n", strFileRes.c_str()); + fSuccess = false; + } + + Dbc* pcursor = db.GetCursor(); + if (pcursor) + while (fSuccess) + { + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + CDataStream ssValue(SER_DISK, CLIENT_VERSION); + int ret = db.ReadAtCursor(pcursor, ssKey, ssValue, DB_NEXT); + if (ret == DB_NOTFOUND) + { + pcursor->close(); + break; + } + else if (ret != 0) + { + pcursor->close(); + fSuccess = false; + break; + } + if (pszSkip && + strncmp(&ssKey[0], pszSkip, std::min(ssKey.size(), strlen(pszSkip))) == 0) + continue; + if (strncmp(&ssKey[0], "\x07version", 8) == 0) + { + // Update version: + ssValue.clear(); + ssValue << CLIENT_VERSION; + } + Dbt datKey(&ssKey[0], ssKey.size()); + Dbt datValue(&ssValue[0], ssValue.size()); + int ret2 = pdbCopy->put(NULL, &datKey, &datValue, DB_NOOVERWRITE); + if (ret2 > 0) + fSuccess = false; + } + if (fSuccess) + { + db.Close(); + bitdb.CloseDb(strFile); + if (pdbCopy->close(0)) + fSuccess = false; + delete pdbCopy; + } + } + if (fSuccess) + { + Db dbA(&bitdb.dbenv, 0); + if (dbA.remove(strFile.c_str(), NULL, 0)) + fSuccess = false; + Db dbB(&bitdb.dbenv, 0); + if (dbB.rename(strFileRes.c_str(), NULL, strFile.c_str(), 0)) + fSuccess = false; + } + if (!fSuccess) + printf("Rewriting of %s FAILED!\n", strFileRes.c_str()); + return fSuccess; + } + } + Sleep(100); + } + return false; +} + + +void CDBEnv::Flush(bool fShutdown) +{ + int64 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"); + if (!fDbEnvInit) + return; + { + LOCK(cs_db); + map::iterator mi = mapFileUseCount.begin(); + while (mi != mapFileUseCount.end()) + { + string strFile = (*mi).first; + int nRefCount = (*mi).second; + printf("%s refcount=%d\n", strFile.c_str(), nRefCount); + if (nRefCount == 0) + { + // Move log data to the dat file + CloseDb(strFile); + printf("%s checkpoint\n", strFile.c_str()); + dbenv.txn_checkpoint(0, 0, 0); + if (!IsChainFile(strFile) || fDetachDB) { + printf("%s detach\n", strFile.c_str()); + if (!fMockDb) + dbenv.lsn_reset(strFile.c_str(), 0); + } + printf("%s closed\n", strFile.c_str()); + mapFileUseCount.erase(mi++); + } + else + mi++; + } + printf("DBFlush(%s)%s ended %15"PRI64d"ms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started", GetTimeMillis() - nStart); + if (fShutdown) + { + char** listp; + if (mapFileUseCount.empty()) + { + dbenv.log_archive(&listp, DB_ARCH_REMOVE); + Close(); + } + } + } +} + + + + + + +// +// 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(); + // ppcoin: 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()); + + // ppcoin: 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); + + // ppcoin: 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 +// + + +CAddrDB::CAddrDB() +{ + pathAddr = GetDataDir() / "peers.dat"; +} + +bool CAddrDB::Write(const CAddrMan& addr) +{ + // Generate random temporary filename + unsigned short randv = 0; + RAND_bytes((unsigned char *)&randv, sizeof(randv)); + std::string tmpfn = strprintf("peers.dat.%04x", randv); + + // serialize addresses, checksum data up to that point, then append csum + CDataStream ssPeers(SER_DISK, CLIENT_VERSION); + ssPeers << FLATDATA(pchMessageStart); + ssPeers << addr; + uint256 hash = Hash(ssPeers.begin(), ssPeers.end()); + ssPeers << hash; + + // open temp output file, and associate with CAutoFile + boost::filesystem::path pathTmp = GetDataDir() / tmpfn; + FILE *file = fopen(pathTmp.string().c_str(), "wb"); + CAutoFile fileout = CAutoFile(file, SER_DISK, CLIENT_VERSION); + if (!fileout) + return error("CAddrman::Write() : open failed"); + + // Write and commit header, data + try { + fileout << ssPeers; + } + catch (std::exception &e) { + return error("CAddrman::Write() : I/O error"); + } + FileCommit(fileout); + fileout.fclose(); + + // replace existing peers.dat, if any, with new peers.dat.XXXX + if (!RenameOver(pathTmp, pathAddr)) + return error("CAddrman::Write() : Rename-into-place failed"); + + return true; +} + +bool CAddrDB::Read(CAddrMan& addr) +{ + // open input file, and associate with CAutoFile + FILE *file = fopen(pathAddr.string().c_str(), "rb"); + CAutoFile filein = CAutoFile(file, SER_DISK, CLIENT_VERSION); + if (!filein) + return error("CAddrman::Read() : open failed"); + + // use file size to size memory buffer + int fileSize = GetFilesize(filein); + int dataSize = fileSize - sizeof(uint256); + vector vchData; + vchData.resize(dataSize); + uint256 hashIn; + + // read data and checksum from file + try { + filein.read((char *)&vchData[0], dataSize); + filein >> hashIn; + } + catch (std::exception &e) { + return error("CAddrman::Read() 2 : I/O error or stream data corrupted"); + } + filein.fclose(); + + CDataStream ssPeers(vchData, SER_DISK, CLIENT_VERSION); + + // verify stored checksum matches input data + uint256 hashTmp = Hash(ssPeers.begin(), ssPeers.end()); + if (hashIn != hashTmp) + return error("CAddrman::Read() : checksum mismatch; data corrupted"); + + unsigned char pchMsgTmp[4]; + try { + // de-serialize file header (pchMessageStart magic number) and + ssPeers >> FLATDATA(pchMsgTmp); + + // verify the network matches ours + if (memcmp(pchMsgTmp, pchMessageStart, sizeof(pchMsgTmp))) + return error("CAddrman::Read() : invalid network magic number"); + + // de-serialize address data into one CAddrMan object + ssPeers >> addr; + } + catch (std::exception &e) { + return error("CAddrman::Read() : I/O error or stream data corrupted"); + } + + return true; +} + diff --git a/src/db.h b/src/db.h new file mode 100644 index 0000000..05edbdc --- /dev/null +++ b/src/db.h @@ -0,0 +1,366 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_DB_H +#define curecoin_DB_H + +#include "main.h" + +#include +#include +#include + +#include + +class CAddress; +class CAddrMan; +class CBlockLocator; +class CDiskBlockIndex; +class CDiskTxPos; +class CMasterKey; +class COutPoint; +class CTxIndex; +class CWallet; +class CWalletTx; + +extern unsigned int nWalletDBUpdated; + +void ThreadFlushWalletDB(void* parg); +bool BackupWallet(const CWallet& wallet, const std::string& strDest); + + +class CDBEnv +{ +private: + bool fDetachDB; + bool fDbEnvInit; + bool fMockDb; + boost::filesystem::path pathEnv; + std::string strPath; + + void EnvShutdown(); + +public: + mutable CCriticalSection cs_db; + DbEnv dbenv; + std::map mapFileUseCount; + std::map mapDb; + + CDBEnv(); + ~CDBEnv(); + void MakeMock(); + bool IsMock() { return fMockDb; }; + + /* + * Verify that database file strFile is OK. If it is not, + * call the callback to try to recover. + * This must be called BEFORE strFile is opened. + * Returns true if strFile is OK. + */ + enum VerifyResult { VERIFY_OK, RECOVER_OK, RECOVER_FAIL }; + VerifyResult Verify(std::string strFile, bool (*recoverFunc)(CDBEnv& dbenv, std::string strFile)); + /* + * Salvage data from a file that Verify says is bad. + * fAggressive sets the DB_AGGRESSIVE flag (see berkeley DB->verify() method documentation). + * Appends binary key/value pairs to vResult, returns true if successful. + * NOTE: reads the entire database into memory, so cannot be used + * for huge databases. + */ + typedef std::pair, std::vector > KeyValPair; + bool Salvage(std::string strFile, bool fAggressive, std::vector& vResult); + + bool Open(boost::filesystem::path pathEnv_); + void Close(); + void Flush(bool fShutdown); + void CheckpointLSN(std::string strFile); + void SetDetach(bool fDetachDB_) { fDetachDB = fDetachDB_; } + bool GetDetach() { return fDetachDB; } + + void CloseDb(const std::string& strFile); + bool RemoveDb(const std::string& strFile); + + DbTxn *TxnBegin(int flags=DB_TXN_WRITE_NOSYNC) + { + DbTxn* ptxn = NULL; + int ret = dbenv.txn_begin(NULL, &ptxn, flags); + if (!ptxn || ret != 0) + return NULL; + return ptxn; + } +}; + +extern CDBEnv bitdb; + + +/** RAII class that provides access to a Berkeley database */ +class CDB +{ +protected: + Db* pdb; + std::string strFile; + DbTxn *activeTxn; + bool fReadOnly; + + explicit CDB(const char* pszFile, const char* pszMode="r+"); + ~CDB() { Close(); } +public: + void Close(); +private: + CDB(const CDB&); + void operator=(const CDB&); + +protected: + template + bool Read(const K& key, T& value) + { + if (!pdb) + return false; + + // Key + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(1000); + ssKey << key; + Dbt datKey(&ssKey[0], ssKey.size()); + + // Read + Dbt datValue; + datValue.set_flags(DB_DBT_MALLOC); + int ret = pdb->get(activeTxn, &datKey, &datValue, 0); + memset(datKey.get_data(), 0, datKey.get_size()); + if (datValue.get_data() == NULL) + return false; + + // Unserialize value + try { + CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK, CLIENT_VERSION); + ssValue >> value; + } + catch (std::exception &e) { + return false; + } + + // Clear and free memory + memset(datValue.get_data(), 0, datValue.get_size()); + free(datValue.get_data()); + return (ret == 0); + } + + template + bool Write(const K& key, const T& value, bool fOverwrite=true) + { + if (!pdb) + return false; + if (fReadOnly) + assert(!"Write called on database in read-only mode"); + + // Key + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(1000); + ssKey << key; + Dbt datKey(&ssKey[0], ssKey.size()); + + // Value + CDataStream ssValue(SER_DISK, CLIENT_VERSION); + ssValue.reserve(10000); + ssValue << value; + Dbt datValue(&ssValue[0], ssValue.size()); + + // Write + int ret = pdb->put(activeTxn, &datKey, &datValue, (fOverwrite ? 0 : DB_NOOVERWRITE)); + + // Clear memory in case it was a private key + memset(datKey.get_data(), 0, datKey.get_size()); + memset(datValue.get_data(), 0, datValue.get_size()); + return (ret == 0); + } + + template + bool Erase(const K& key) + { + if (!pdb) + return false; + if (fReadOnly) + assert(!"Erase called on database in read-only mode"); + + // Key + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(1000); + ssKey << key; + Dbt datKey(&ssKey[0], ssKey.size()); + + // Erase + int ret = pdb->del(activeTxn, &datKey, 0); + + // Clear memory + memset(datKey.get_data(), 0, datKey.get_size()); + return (ret == 0 || ret == DB_NOTFOUND); + } + + template + bool Exists(const K& key) + { + if (!pdb) + return false; + + // Key + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + ssKey.reserve(1000); + ssKey << key; + Dbt datKey(&ssKey[0], ssKey.size()); + + // Exists + int ret = pdb->exists(activeTxn, &datKey, 0); + + // Clear memory + memset(datKey.get_data(), 0, datKey.get_size()); + return (ret == 0); + } + + Dbc* GetCursor() + { + if (!pdb) + return NULL; + Dbc* pcursor = NULL; + int ret = pdb->cursor(NULL, &pcursor, 0); + if (ret != 0) + return NULL; + return pcursor; + } + + int ReadAtCursor(Dbc* pcursor, CDataStream& ssKey, CDataStream& ssValue, unsigned int fFlags=DB_NEXT) + { + // Read at cursor + Dbt datKey; + if (fFlags == DB_SET || fFlags == DB_SET_RANGE || fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE) + { + datKey.set_data(&ssKey[0]); + datKey.set_size(ssKey.size()); + } + Dbt datValue; + if (fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE) + { + datValue.set_data(&ssValue[0]); + datValue.set_size(ssValue.size()); + } + datKey.set_flags(DB_DBT_MALLOC); + datValue.set_flags(DB_DBT_MALLOC); + int ret = pcursor->get(&datKey, &datValue, fFlags); + if (ret != 0) + return ret; + else if (datKey.get_data() == NULL || datValue.get_data() == NULL) + return 99999; + + // Convert to streams + ssKey.SetType(SER_DISK); + ssKey.clear(); + ssKey.write((char*)datKey.get_data(), datKey.get_size()); + ssValue.SetType(SER_DISK); + ssValue.clear(); + ssValue.write((char*)datValue.get_data(), datValue.get_size()); + + // Clear and free memory + memset(datKey.get_data(), 0, datKey.get_size()); + memset(datValue.get_data(), 0, datValue.get_size()); + free(datKey.get_data()); + free(datValue.get_data()); + return 0; + } + +public: + bool TxnBegin() + { + if (!pdb || activeTxn) + return false; + DbTxn* ptxn = bitdb.TxnBegin(); + if (!ptxn) + return false; + activeTxn = ptxn; + return true; + } + + bool TxnCommit() + { + if (!pdb || !activeTxn) + return false; + int ret = activeTxn->commit(0); + activeTxn = NULL; + return (ret == 0); + } + + bool TxnAbort() + { + if (!pdb || !activeTxn) + return false; + int ret = activeTxn->abort(); + activeTxn = NULL; + return (ret == 0); + } + + bool ReadVersion(int& nVersion) + { + nVersion = 0; + return Read(std::string("version"), nVersion); + } + + bool WriteVersion(int nVersion) + { + return Write(std::string("version"), nVersion); + } + + bool static Rewrite(const std::string& strFile, const char* pszSkip = NULL); +}; + + + + + + + +/** 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 +{ +private: + boost::filesystem::path pathAddr; +public: + CAddrDB(); + bool Write(const CAddrMan& addr); + bool Read(CAddrMan& addr); +}; + +#endif // curecoin_DB_H diff --git a/src/init.cpp b/src/init.cpp new file mode 100644 index 0000000..e0cf5c0 --- /dev/null +++ b/src/init.cpp @@ -0,0 +1,878 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// 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 "walletdb.h" +#include "curecoinrpc.h" +#include "net.h" +#include "init.h" +#include "util.h" +#include "ui_interface.h" +#include "checkpoints.h" +#include +#include +#include +#include +#include +#include + +#ifndef WIN32 +#include +#endif + +using namespace std; +using namespace boost; + +CWallet* pwalletMain; +CClientUIInterface uiInterface; + +////////////////////////////////////////////////////////////////////////////// +// +// Shutdown +// + +void ExitTimeout(void* parg) +{ +#ifdef WIN32 + Sleep(5000); + ExitProcess(0); +#endif +} + +void StartShutdown() +{ +#ifdef QT_GUI + // ensure we leave the Qt main loop for a clean GUI exit (Shutdown() is called in curecoin.cpp afterwards) + uiInterface.QueueShutdown(); +#else + // Without UI, Shutdown() can simply be started in a new thread + NewThread(Shutdown, NULL); +#endif +} + +void Shutdown(void* parg) +{ + static CCriticalSection cs_Shutdown; + static bool fTaken; + + // Make this thread recognisable as the shutdown thread + RenameThread("curecoin-shutoff"); + + bool fFirstThread = false; + { + TRY_LOCK(cs_Shutdown, lockShutdown); + if (lockShutdown) + { + fFirstThread = !fTaken; + fTaken = true; + } + } + static bool fExit; + if (fFirstThread) + { + fShutdown = true; + nTransactionsUpdated++; + bitdb.Flush(false); + StopNode(); + bitdb.Flush(true); + boost::filesystem::remove(GetPidFile()); + UnregisterWallet(pwalletMain); + delete pwalletMain; + NewThread(ExitTimeout, NULL); + Sleep(50); + printf("curecoin exited\n\n"); + fExit = true; +#ifndef QT_GUI + // ensure non-UI client gets exited here, but let curecoin-Qt reach 'return 0;' in curecoin.cpp + exit(0); +#endif + } + else + { + while (!fExit) + Sleep(500); + Sleep(100); + ExitThread(0); + } +} + +void HandleSIGTERM(int) +{ + fRequestShutdown = true; +} + +void HandleSIGHUP(int) +{ + fReopenDebugLog = true; +} + + + + + +////////////////////////////////////////////////////////////////////////////// +// +// Start +// +#if !defined(QT_GUI) +bool AppInit(int argc, char* argv[]) +{ + bool fRet = false; + try + { + // + // Parameters + // + // If Qt is used, parameters/curecoin.conf are parsed in qt/curecoin.cpp's main() + ParseParameters(argc, argv); + if (!boost::filesystem::is_directory(GetDataDir(false))) + { + fprintf(stderr, "Error: Specified directory does not exist\n"); + Shutdown(NULL); + } + ReadConfigFile(mapArgs, mapMultiArgs); + + if (mapArgs.count("-?") || mapArgs.count("--help")) + { + // First part of help message is specific to curecoind / RPC client + std::string strUsage = _("curecoin version") + " " + FormatFullVersion() + "\n\n" + + _("Usage:") + "\n" + + " curecoind [options] " + "\n" + + " curecoind [options] [params] " + _("Send command to -server or curecoind") + "\n" + + " curecoind [options] help " + _("List commands") + "\n" + + " curecoind [options] help " + _("Get help for a command") + "\n"; + + strUsage += "\n" + HelpMessage(); + + fprintf(stdout, "%s", strUsage.c_str()); + return false; + } + + // Command-line RPC + for (int i = 1; i < argc; i++) + if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "curecoin:")) + fCommandLine = true; + + if (fCommandLine) + { + int ret = CommandLineRPC(argc, argv); + exit(ret); + } + + fRet = AppInit2(); + } + catch (std::exception& e) { + PrintException(&e, "AppInit()"); + } catch (...) { + PrintException(NULL, "AppInit()"); + } + if (!fRet) + Shutdown(NULL); + return fRet; +} + +extern void noui_connect(); +int main(int argc, char* argv[]) +{ + bool fRet = false; + + // Connect curecoind signal handlers + noui_connect(); + + fRet = AppInit(argc, argv); + + if (fRet && fDaemon) + return 0; + + return 1; +} +#endif + +bool static InitError(const std::string &str) +{ + uiInterface.ThreadSafeMessageBox(str, _("curecoin"), CClientUIInterface::OK | CClientUIInterface::MODAL); + return false; +} + +bool static InitWarning(const std::string &str) +{ + uiInterface.ThreadSafeMessageBox(str, _("curecoin"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); + return true; +} + + +bool static Bind(const CService &addr, bool fError = true) { + if (IsLimited(addr)) + return false; + std::string strError; + if (!BindListenPort(addr, strError)) { + if (fError) + return InitError(strError); + return false; + } + return true; +} + +// Core-specific options shared between UI and daemon +std::string HelpMessage() +{ + string strUsage = _("Options:") + "\n" + + " -? " + _("This help message") + "\n" + + " -conf= " + _("Specify configuration file (default: curecoin.conf)") + "\n" + + " -pid= " + _("Specify pid file (default: curecoind.pid)") + "\n" + + " -gen " + _("Generate coins") + "\n" + + " -gen=0 " + _("Don't generate coins") + "\n" + + " -datadir= " + _("Specify 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" + + " -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: 8512 or testnet: 8519)") + "\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: 1)") + "\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: 0)") + "\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" + + " -maxsendbuffer= " + _("Maximum per-connection send buffer, *1000 bytes (default: 1000)") + "\n" + +#ifdef USE_UPNP +#if USE_UPNP + " -upnp " + _("Use UPnP to map the listening port (default: 1 when listening)") + "\n" + +#else + " -upnp " + _("Use UPnP to map the listening port (default: 0)") + "\n" + +#endif +#endif + " -detachdb " + _("Detach block and address databases. Increases shutdown time (default: 0)") + "\n" + + " -paytxfee= " + _("Fee per KB to add to transactions you send") + "\n" + +#ifdef QT_GUI + " -server " + _("Accept command line and JSON-RPC commands") + "\n" + +#endif +#if !defined(WIN32) && !defined(QT_GUI) + " -daemon " + _("Run in the background as a daemon and accept commands") + "\n" + +#endif + " -testnet " + _("Use the test network") + "\n" + + " -debug " + _("Output extra debugging information. Implies all other -debug* options") + "\n" + + " -debugnet " + _("Output extra network debugging information") + "\n" + + " -logtimestamps " + _("Prepend debug output with timestamp") + "\n" + + " -shrinkdebugfile " + _("Shrink debug.log file on client startup (default: 1 when no -debug)") + "\n" + + " -printtoconsole " + _("Send trace/debug info to console instead of debug.log file") + "\n" + +#ifdef WIN32 + " -printtodebugger " + _("Send trace/debug info to debugger") + "\n" + +#endif + " -rpcuser= " + _("Username for JSON-RPC connections") + "\n" + + " -rpcpassword= " + _("Password for JSON-RPC connections") + "\n" + + " -rpcport= " + _("Listen for JSON-RPC connections on (default: 18512 or testnet: 18519)") + "\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" + + " -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" + + " -salvagewallet " + _("Attempt to recover private keys from a corrupt wallet.dat") + "\n" + + " -checkblocks= " + _("How many blocks to check at startup (default: 2500, 0 = all)") + "\n" + + " -checklevel= " + _("How thorough the block verification is (0-6, default: 1)") + "\n" + + " -loadblock= " + _("Imports blocks from external blk000?.dat file") + "\n" + + + "\n" + _("Block creation options:") + "\n" + + " -blockminsize= " + _("Set minimum block size in bytes (default: 0)") + "\n" + + " -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 curecoin 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"; + + return strUsage; +} + +/** Initialize curecoin. + * @pre Parameters should be parsed and config file should be read. + */ +bool AppInit2() +{ + // ********************************************************* Step 1: setup +#ifdef _MSC_VER + // Turn off Microsoft heap dump noise + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_WARN, CreateFileA("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0)); +#endif +#if _MSC_VER >= 1400 + // Disable confusing "helpful" text message on abort, Ctrl-C + _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); +#endif +#ifdef WIN32 + // Enable Data Execution Prevention (DEP) + // Minimum supported OS versions: WinXP SP3, WinVista >= SP1, Win Server 2008 + // A failure is non-critical and needs no further attention! +#ifndef PROCESS_DEP_ENABLE +// We define this here, because GCCs winbase.h limits this to _WIN32_WINNT >= 0x0601 (Windows 7), +// which is not correct. Can be removed, when GCCs winbase.h is fixed! +#define PROCESS_DEP_ENABLE 0x00000001 +#endif + typedef BOOL (WINAPI *PSETPROCDEPPOL)(DWORD); + PSETPROCDEPPOL setProcDEPPol = (PSETPROCDEPPOL)GetProcAddress(GetModuleHandleA("Kernel32.dll"), "SetProcessDEPPolicy"); + if (setProcDEPPol != NULL) setProcDEPPol(PROCESS_DEP_ENABLE); +#endif +#ifndef WIN32 + umask(077); + + // Clean shutdown on SIGTERM + struct sigaction sa; + sa.sa_handler = HandleSIGTERM; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sigaction(SIGTERM, &sa, NULL); + sigaction(SIGINT, &sa, NULL); + + // Reopen debug.log on SIGHUP + struct sigaction sa_hup; + sa_hup.sa_handler = HandleSIGHUP; + sigemptyset(&sa_hup.sa_mask); + sa_hup.sa_flags = 0; + sigaction(SIGHUP, &sa_hup, NULL); +#endif + + // ********************************************************* Step 2: parameter interactions + + 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 DNS, or listen by default + SoftSetBoolArg("-dnsseed", 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) + 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); + } + + // ********************************************************* Step 3: parameter-to-internal-flags + + fDebug = GetBoolArg("-debug"); + + // -debug implies fDebug* + if (fDebug) + fDebugNet = true; + else + fDebugNet = GetBoolArg("-debugnet"); + + bitdb.SetDetach(GetBoolArg("-detachdb", false)); + +#if !defined(WIN32) && !defined(QT_GUI) + fDaemon = GetBoolArg("-daemon"); +#else + fDaemon = false; +#endif + + if (fDaemon) + fServer = true; + else + fServer = GetBoolArg("-server"); + + /* force fServer when running without GUI */ +#if !defined(QT_GUI) + fServer = true; +#endif + fPrintToConsole = GetBoolArg("-printtoconsole"); + fPrintToDebugger = GetBoolArg("-printtodebugger"); + fLogTimestamps = GetBoolArg("-logtimestamps"); + + if (mapArgs.count("-timeout")) + { + int nNewTimeout = GetArg("-timeout", 5000); + if (nNewTimeout > 0 && nNewTimeout < 600000) + 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)) + return InitError(strprintf(_("Invalid amount for -paytxfee=: '%s'"), mapArgs["-paytxfee"].c_str())); + if (nTransactionFee > 0.25 * COIN) + InitWarning(_("Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.")); + } + + // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log + + std::string strDataDir = GetDataDir().string(); + + // Make sure only a single curecoin 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. curecoin is probably already running."), strDataDir.c_str())); + +#if !defined(WIN32) && !defined(QT_GUI) + if (fDaemon) + { + // Daemonize + pid_t pid = fork(); + if (pid < 0) + { + fprintf(stderr, "Error: fork() returned %d errno %d\n", pid, errno); + return false; + } + if (pid > 0) + { + CreatePidFile(GetPidFile(), pid); + return true; + } + + pid_t sid = setsid(); + if (sid < 0) + fprintf(stderr, "Error: setsid() returned %d errno %d\n", sid, errno); + } +#endif + + 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("curecoin 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()); + printf("Default data directory %s\n", GetDefaultDataDir().string().c_str()); + printf("Used data directory %s\n", strDataDir.c_str()); + std::ostringstream strErrors; + + if (fDaemon) + fprintf(stdout, "curecoin server starting\n"); + + int64 nStart; + + // ********************************************************* Step 5: verify database integrity + + uiInterface.InitMessage(_("Verifying database integrity...")); + + if (!bitdb.Open(GetDataDir())) + { + string msg = strprintf(_("Error initializing database environment %s!" + " To recover, BACKUP THAT DIRECTORY, then remove" + " everything from it except for wallet.dat."), strDataDir.c_str()); + return InitError(msg); + } + + if (GetBoolArg("-salvagewallet")) + { + // Recover readable keypairs: + if (!CWalletDB::Recover(bitdb, "wallet.dat", true)) + return false; + } + + if (filesystem::exists(GetDataDir() / "wallet.dat")) + { + CDBEnv::VerifyResult r = bitdb.Verify("wallet.dat", 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, _("curecoin"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); + } + if (r == CDBEnv::RECOVER_FAIL) + return InitError(_("wallet.dat corrupt, salvage failed")); + } + + // ********************************************************* Step 6: network initialization + + int nSocksVersion = GetArg("-socks", 5); + + if (nSocksVersion != 4 && nSocksVersion != 5) + return InitError(strprintf(_("Unknown -socks proxy version requested: %i"), nSocksVersion)); + + if (mapArgs.count("-onlynet")) { + std::set nets; + BOOST_FOREACH(std::string snet, mapMultiArgs["-onlynet"]) { + enum Network net = ParseNetwork(snet); + if (net == NET_UNROUTABLE) + return InitError(strprintf(_("Unknown network specified in -onlynet: '%s'"), snet.c_str())); + nets.insert(net); + } + for (int n = 0; n < NET_MAX; n++) { + enum Network net = (enum Network)n; + if (!nets.count(net)) + SetLimited(net); + } + } +#if defined(USE_IPV6) +#if ! USE_IPV6 + else + SetLimited(NET_IPV6); +#endif +#endif + + CService addrProxy; + bool fProxy = false; + if (mapArgs.count("-proxy")) { + addrProxy = CService(mapArgs["-proxy"], 9050); + if (!addrProxy.IsValid()) + return InitError(strprintf(_("Invalid -proxy address: '%s'"), mapArgs["-proxy"].c_str())); + + if (!IsLimited(NET_IPV4)) + SetProxy(NET_IPV4, addrProxy, nSocksVersion); + if (nSocksVersion > 4) { +#ifdef USE_IPV6 + if (!IsLimited(NET_IPV6)) + SetProxy(NET_IPV6, addrProxy, nSocksVersion); +#endif + SetNameProxy(addrProxy, nSocksVersion); + } + fProxy = true; + } + + // -tor can override normal proxy, -notor disables tor entirely + if (!(mapArgs.count("-tor") && mapArgs["-tor"] == "0") && (fProxy || mapArgs.count("-tor"))) { + CService addrOnion; + if (!mapArgs.count("-tor")) + addrOnion = addrProxy; + else + addrOnion = CService(mapArgs["-tor"], 9050); + if (!addrOnion.IsValid()) + return InitError(strprintf(_("Invalid -tor address: '%s'"), mapArgs["-tor"].c_str())); + SetProxy(NET_TOR, addrOnion, 5); + SetReachable(NET_TOR); + } + + // see Step 2: parameter interactions for more information about these + 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 (!fNoListen) + { + std::string strError; + if (mapArgs.count("-bind")) { + BOOST_FOREACH(std::string strBind, mapMultiArgs["-bind"]) { + CService addrBind; + if (!Lookup(strBind.c_str(), addrBind, GetListenPort(), false)) + return InitError(strprintf(_("Cannot resolve -bind address: '%s'"), strBind.c_str())); + fBound |= Bind(addrBind); + } + } else { + struct in_addr inaddr_any; + inaddr_any.s_addr = INADDR_ANY; +#ifdef USE_IPV6 + if (!IsLimited(NET_IPV6)) + fBound |= Bind(CService(in6addr_any, GetListenPort()), false); +#endif + if (!IsLimited(NET_IPV4)) + fBound |= Bind(CService(inaddr_any, GetListenPort()), !fBound); + } + if (!fBound) + return InitError(_("Failed to listen on any port. Use -listen=0 if you want this.")); + } + + if (mapArgs.count("-externalip")) + { + BOOST_FOREACH(string strAddr, mapMultiArgs["-externalip"]) { + CService addrLocal(strAddr, GetListenPort(), fNameLookup); + if (!addrLocal.IsValid()) + return InitError(strprintf(_("Cannot resolve -externalip address: '%s'"), strAddr.c_str())); + AddLocal(CService(strAddr, GetListenPort(), fNameLookup), LOCAL_MANUAL); + } + } + + if (mapArgs.count("-reservebalance")) // ppcoin: reserve balance amount + { + int64 nReserveBalance = 0; + if (!ParseMoney(mapArgs["-reservebalance"], nReserveBalance)) + { + InitError(_("Invalid amount for -reservebalance=")); + return false; + } + } + + if (mapArgs.count("-checkpointkey")) // ppcoin: checkpoint master priv key + { + if (!Checkpoints::SetCheckpointPrivKey(GetArg("-checkpointkey", ""))) + InitError(_("Unable to sign checkpoint, wrong checkpointkey?\n")); + } + + BOOST_FOREACH(string strDest, mapMultiArgs["-seednode"]) + AddOneShot(strDest); + + // TODO: replace this by DNSseed + // AddOneShot(string("")); + + // ********************************************************* Step 7: load blockchain + + if (!bitdb.Open(GetDataDir())) + { + string msg = strprintf(_("Error initializing database environment %s!" + " To recover, BACKUP THAT DIRECTORY, then remove" + " everything from it except for wallet.dat."), strDataDir.c_str()); + return InitError(msg); + } + + if (GetBoolArg("-loadblockindextest")) + { + CTxDB txdb("r"); + txdb.LoadBlockIndex(); + PrintBlockTree(); + return false; + } + + uiInterface.InitMessage(_("Loading block index...")); + printf("Loading block index...\n"); + nStart = GetTimeMillis(); + if (!LoadBlockIndex()) + return InitError(_("Error loading blkindex.dat")); + + // as LoadBlockIndex can take several minutes, it's possible the user + // requested to kill curecoin-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); + + if (GetBoolArg("-printblockindex") || GetBoolArg("-printblocktree")) + { + PrintBlockTree(); + return false; + } + + if (mapArgs.count("-printblock")) + { + string strMatch = mapArgs["-printblock"]; + int nFound = 0; + for (map::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi) + { + uint256 hash = (*mi).first; + if (strncmp(hash.ToString().c_str(), strMatch.c_str(), strMatch.size()) == 0) + { + CBlockIndex* pindex = (*mi).second; + CBlock block; + block.ReadFromDisk(pindex); + block.BuildMerkleTree(); + block.print(); + printf("\n"); + nFound++; + } + } + if (nFound == 0) + printf("No blocks matching %s were found\n", strMatch.c_str()); + return false; + } + + // ********************************************************* Step 8: load wallet + + uiInterface.InitMessage(_("Loading wallet...")); + printf("Loading wallet...\n"); + nStart = GetTimeMillis(); + bool fFirstRun = true; + pwalletMain = new CWallet("wallet.dat"); + DBErrors nLoadWalletRet = pwalletMain->LoadWallet(fFirstRun); + if (nLoadWalletRet != DB_LOAD_OK) + { + if (nLoadWalletRet == DB_CORRUPT) + strErrors << _("Error loading wallet.dat: Wallet corrupted") << "\n"; + else if (nLoadWalletRet == DB_NONCRITICAL_ERROR) + { + 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, _("curecoin"), CClientUIInterface::OK | CClientUIInterface::ICON_EXCLAMATION | CClientUIInterface::MODAL); + } + else if (nLoadWalletRet == DB_TOO_NEW) + strErrors << _("Error loading wallet.dat: Wallet requires newer version of curecoin") << "\n"; + else if (nLoadWalletRet == DB_NEED_REWRITE) + { + strErrors << _("Wallet needed to be rewritten: restart curecoin to complete") << "\n"; + printf("%s", strErrors.str().c_str()); + return InitError(strErrors.str()); + } + else + strErrors << _("Error loading wallet.dat") << "\n"; + } + + if (GetBoolArg("-upgradewallet", fFirstRun)) + { + int nMaxVersion = GetArg("-upgradewallet", 0); + if (nMaxVersion == 0) // the -upgradewallet without argument case + { + printf("Performing wallet upgrade to %i\n", FEATURE_LATEST); + nMaxVersion = CLIENT_VERSION; + pwalletMain->SetMinVersion(FEATURE_LATEST); // permanently upgrade the wallet immediately + } + else + printf("Allowing wallet upgrade up to %i\n", nMaxVersion); + if (nMaxVersion < pwalletMain->GetVersion()) + strErrors << _("Cannot downgrade wallet") << "\n"; + pwalletMain->SetMaxVersion(nMaxVersion); + } + + if (fFirstRun) + { + // Create new keyUser and set as default key + RandAddSeedPerfmon(); + + CPubKey newDefaultKey; + if (!pwalletMain->GetKeyFromPool(newDefaultKey, false)) + strErrors << _("Cannot initialize keypool") << "\n"; + pwalletMain->SetDefaultKey(newDefaultKey); + if (!pwalletMain->SetAddressBookName(pwalletMain->vchDefaultKey.GetID(), "")) + strErrors << _("Cannot write default address") << "\n"; + } + + printf("%s", strErrors.str().c_str()); + printf(" wallet %15"PRI64d"ms\n", GetTimeMillis() - nStart); + + RegisterWallet(pwalletMain); + + CBlockIndex *pindexRescan = pindexBest; + if (GetBoolArg("-rescan")) + pindexRescan = pindexGenesisBlock; + else + { + CWalletDB walletdb("wallet.dat"); + CBlockLocator locator; + if (walletdb.ReadBestBlock(locator)) + pindexRescan = locator.GetBlockIndex(); + } + if (pindexBest != pindexRescan && pindexBest && pindexRescan && pindexBest->nHeight > pindexRescan->nHeight) + { + uiInterface.InitMessage(_("Rescanning...")); + 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); + } + + // ********************************************************* Step 9: import blocks + + if (mapArgs.count("-loadblock")) + { + uiInterface.InitMessage(_("Importing blockchain data file.")); + + BOOST_FOREACH(string strFile, mapMultiArgs["-loadblock"]) + { + FILE *file = fopen(strFile.c_str(), "rb"); + if (file) + LoadExternalBlockFile(file); + } + } + + filesystem::path pathBootstrap = GetDataDir() / "bootstrap.dat"; + if (filesystem::exists(pathBootstrap)) { + uiInterface.InitMessage(_("Importing bootstrap blockchain data file.")); + + FILE *file = fopen(pathBootstrap.string().c_str(), "rb"); + if (file) { + filesystem::path pathBootstrapOld = GetDataDir() / "bootstrap.dat.old"; + LoadExternalBlockFile(file); + RenameOver(pathBootstrap, pathBootstrapOld); + } + } + + // ********************************************************* Step 10: load peers + + uiInterface.InitMessage(_("Loading addresses...")); + printf("Loading addresses...\n"); + nStart = GetTimeMillis(); + + { + CAddrDB adb; + if (!adb.Read(addrman)) + printf("Invalid or missing peers.dat; recreating\n"); + } + + printf("Loaded %i addresses from peers.dat %"PRI64d"ms\n", + addrman.size(), GetTimeMillis() - nStart); + + // ********************************************************* Step 11: start node + + if (!CheckDiskSpace()) + return false; + + RandAddSeedPerfmon(); + + //// debug print + printf("mapBlockIndex.size() = %"PRIszu"\n", mapBlockIndex.size()); + printf("nBestHeight = %d\n", nBestHeight); + printf("setKeyPool.size() = %"PRIszu"\n", pwalletMain->setKeyPool.size()); + printf("mapWallet.size() = %"PRIszu"\n", pwalletMain->mapWallet.size()); + printf("mapAddressBook.size() = %"PRIszu"\n", pwalletMain->mapAddressBook.size()); + + if (!NewThread(StartNode, NULL)) + InitError(_("Error: could not start node")); + + if (fServer) + NewThread(ThreadRPCServer, NULL); + + // ********************************************************* Step 12: finished + + uiInterface.InitMessage(_("Done loading")); + printf("Done loading\n"); + + if (!strErrors.str().empty()) + return InitError(strErrors.str()); + + // Add wallet transactions that aren't already in a block to mapTransactions + pwalletMain->ReacceptWalletTransactions(); + +#if !defined(QT_GUI) + // Loop until process is exit()ed from shutdown() function, + // called from ThreadRPCServer thread when a "stop" command is received. + while (1) + Sleep(5000); +#endif + + return true; +} diff --git a/src/init.h b/src/init.h new file mode 100644 index 0000000..ab003b9 --- /dev/null +++ b/src/init.h @@ -0,0 +1,17 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_INIT_H +#define curecoin_INIT_H + +#include "wallet.h" + +extern CWallet* pwalletMain; + +void StartShutdown(); +void Shutdown(void* parg); +bool AppInit2(); +std::string HelpMessage(); + +#endif diff --git a/src/irc.cpp b/src/irc.cpp new file mode 100644 index 0000000..aa412c8 --- /dev/null +++ b/src/irc.cpp @@ -0,0 +1,409 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "irc.h" +#include "net.h" +#include "strlcpy.h" +#include "base58.h" + +using namespace std; +using namespace boost; + +int nGotIRCAddresses = 0; + +void ThreadIRCSeed2(void* parg); + + + + +#pragma pack(push, 1) +struct ircaddr +{ + struct in_addr ip; + short port; +}; +#pragma pack(pop) + +string EncodeAddress(const CService& addr) +{ + struct ircaddr tmp; + if (addr.GetInAddr(&tmp.ip)) + { + tmp.port = htons(addr.GetPort()); + + vector vch(UBEGIN(tmp), UEND(tmp)); + return string("u") + EncodeBase58Check(vch); + } + return ""; +} + +bool DecodeAddress(string str, CService& addr) +{ + vector vch; + if (!DecodeBase58Check(str.substr(1), vch)) + return false; + + struct ircaddr tmp; + if (vch.size() != sizeof(tmp)) + return false; + memcpy(&tmp, &vch[0], sizeof(tmp)); + + addr = CService(tmp.ip, ntohs(tmp.port)); + return true; +} + + + + + + +static bool Send(SOCKET hSocket, const char* pszSend) +{ + if (strstr(pszSend, "PONG") != pszSend) + printf("IRC SENDING: %s\n", pszSend); + const char* psz = pszSend; + const char* pszEnd = psz + strlen(psz); + while (psz < pszEnd) + { + int ret = send(hSocket, psz, pszEnd - psz, MSG_NOSIGNAL); + if (ret < 0) + return false; + psz += ret; + } + return true; +} + +bool RecvLineIRC(SOCKET hSocket, string& strLine) +{ + loop + { + bool fRet = RecvLine(hSocket, strLine); + if (fRet) + { + if (fShutdown) + return false; + vector vWords; + ParseString(strLine, ' ', vWords); + if (vWords.size() >= 1 && vWords[0] == "PING") + { + strLine[1] = 'O'; + strLine += '\r'; + Send(hSocket, strLine.c_str()); + continue; + } + } + return fRet; + } +} + +int RecvUntil(SOCKET hSocket, const char* psz1, const char* psz2=NULL, const char* psz3=NULL, const char* psz4=NULL) +{ + loop + { + string strLine; + strLine.reserve(10000); + if (!RecvLineIRC(hSocket, strLine)) + return 0; + printf("IRC %s\n", strLine.c_str()); + if (psz1 && strLine.find(psz1) != string::npos) + return 1; + if (psz2 && strLine.find(psz2) != string::npos) + return 2; + if (psz3 && strLine.find(psz3) != string::npos) + return 3; + if (psz4 && strLine.find(psz4) != string::npos) + return 4; + } +} + +bool Wait(int nSeconds) +{ + if (fShutdown) + return false; + printf("IRC waiting %d seconds to reconnect\n", nSeconds); + for (int i = 0; i < nSeconds; i++) + { + if (fShutdown) + return false; + Sleep(1000); + } + return true; +} + +bool RecvCodeLine(SOCKET hSocket, const char* psz1, string& strRet) +{ + strRet.clear(); + loop + { + string strLine; + if (!RecvLineIRC(hSocket, strLine)) + return false; + + vector vWords; + ParseString(strLine, ' ', vWords); + if (vWords.size() < 2) + continue; + + if (vWords[1] == psz1) + { + printf("IRC %s\n", strLine.c_str()); + strRet = strLine; + return true; + } + } +} + +bool GetIPFromIRC(SOCKET hSocket, string strMyName, CNetAddr& ipRet) +{ + Send(hSocket, strprintf("USERHOST %s\r", strMyName.c_str()).c_str()); + + string strLine; + if (!RecvCodeLine(hSocket, "302", strLine)) + return false; + + vector vWords; + ParseString(strLine, ' ', vWords); + if (vWords.size() < 4) + return false; + + string str = vWords[3]; + if (str.rfind("@") == string::npos) + return false; + string strHost = str.substr(str.rfind("@")+1); + + // Hybrid IRC used by lfnet always returns IP when you userhost yourself, + // but in case another IRC is ever used this should work. + printf("GetIPFromIRC() got userhost %s\n", strHost.c_str()); + CNetAddr addr(strHost, true); + if (!addr.IsValid()) + return false; + ipRet = addr; + + return true; +} + + + +void ThreadIRCSeed(void* parg) +{ + // Make this thread recognisable as the IRC seeding thread + RenameThread("curecoin-ircseed"); + + try + { + ThreadIRCSeed2(parg); + } + catch (std::exception& e) { + PrintExceptionContinue(&e, "ThreadIRCSeed()"); + } catch (...) { + PrintExceptionContinue(NULL, "ThreadIRCSeed()"); + } + printf("ThreadIRCSeed exited\n"); +} + +void ThreadIRCSeed2(void* parg) +{ + // Don't connect to IRC if we won't use IPv4 connections. + if (IsLimited(NET_IPV4)) + return; + + // ... or if we won't make outbound connections and won't accept inbound ones. + if (mapArgs.count("-connect") && fNoListen) + return; + + // ... or if IRC is not enabled. + if (!GetBoolArg("-irc", true)) + return; + + printf("ThreadIRCSeed started\n"); + int nErrorWait = 10; + int nRetryWait = 10; + int nNameRetry = 0; + + while (!fShutdown) + { + CService addrConnect("92.243.23.21", 6667); // irc.lfnet.org + + CService addrIRC("irc.lfnet.org", 6667, true); + if (addrIRC.IsValid()) + addrConnect = addrIRC; + + SOCKET hSocket; + if (!ConnectSocket(addrConnect, hSocket)) + { + addrConnect = CService("pelican.heliacal.net", 6667, true); + if (!ConnectSocket(addrConnect, hSocket)) + { + printf("IRC connect failed\n"); + nErrorWait = nErrorWait * 11 / 10; + if (Wait(nErrorWait += 60)) + continue; + else + return; + } + } + + if (!RecvUntil(hSocket, "Found your hostname", "using your IP address instead", "Couldn't look up your hostname", "ignoring hostname")) + { + closesocket(hSocket); + hSocket = INVALID_SOCKET; + nErrorWait = nErrorWait * 11 / 10; + if (Wait(nErrorWait += 60)) + continue; + else + return; + } + + CNetAddr addrIPv4("1.2.3.4"); // arbitrary IPv4 address to make GetLocal prefer IPv4 addresses + CService addrLocal; + 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 (!fNoListen && GetLocal(addrLocal, &addrIPv4) && nNameRetry<3) + strMyName = EncodeAddress(GetLocalAddress(&addrConnect)); + if (strMyName == "") + strMyName = strprintf("x%"PRI64u"", 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()); + + int nRet = RecvUntil(hSocket, " 004 ", " 433 "); + if (nRet != 1) + { + closesocket(hSocket); + hSocket = INVALID_SOCKET; + if (nRet == 2) + { + printf("IRC name already in use\n"); + nNameRetry++; + Wait(10); + continue; + } + nErrorWait = nErrorWait * 11 / 10; + if (Wait(nErrorWait += 60)) + continue; + else + return; + } + nNameRetry = 0; + Sleep(500); + + // Get our external IP from the IRC server and re-nick before joining the channel + CNetAddr addrFromIRC; + if (GetIPFromIRC(hSocket, strMyName, addrFromIRC)) + { + printf("GetIPFromIRC() returned %s\n", addrFromIRC.ToString().c_str()); + // Don't use our IP as our nick if we're not listening + if (!fNoListen && addrFromIRC.IsRoutable()) + { + // IRC lets you to re-nick + AddLocal(addrFromIRC, LOCAL_IRC); + strMyName = EncodeAddress(GetLocalAddress(&addrConnect)); + Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str()); + } + } + + if (fTestNet) { + Send(hSocket, "JOIN #curecoinTEST2\r"); + Send(hSocket, "WHO #curecoinTEST2\r"); + } else { + // randomly join #curecoin00-#curecoin05 + // int channel_number = GetRandInt(5); + + // Channel number is always 0 for initial release + int channel_number = 0; + Send(hSocket, strprintf("JOIN #curecoin%02d\r", channel_number).c_str()); + Send(hSocket, strprintf("WHO #curecoin%02d\r", channel_number).c_str()); + } + + int64 nStart = GetTime(); + string strLine; + strLine.reserve(10000); + while (!fShutdown && RecvLineIRC(hSocket, strLine)) + { + if (strLine.empty() || strLine.size() > 900 || strLine[0] != ':') + continue; + + vector vWords; + ParseString(strLine, ' ', vWords); + if (vWords.size() < 2) + continue; + + char pszName[10000]; + pszName[0] = '\0'; + + if (vWords[1] == "352" && vWords.size() >= 8) + { + // index 7 is limited to 16 characters + // could get full length name at index 10, but would be different from join messages + strlcpy(pszName, vWords[7].c_str(), sizeof(pszName)); + printf("IRC got who\n"); + } + + if (vWords[1] == "JOIN" && vWords[0].size() > 1) + { + // :username!username@50000007.F000000B.90000002.IP JOIN :#channelname + strlcpy(pszName, vWords[0].c_str() + 1, sizeof(pszName)); + if (strchr(pszName, '!')) + *strchr(pszName, '!') = '\0'; + printf("IRC got join\n"); + } + + if (pszName[0] == 'u') + { + CAddress addr; + if (DecodeAddress(pszName, addr)) + { + addr.nTime = GetAdjustedTime(); + if (addrman.Add(addr, addrConnect, 51 * 60)) + printf("IRC got new address: %s\n", addr.ToString().c_str()); + nGotIRCAddresses++; + } + else + { + printf("IRC decode failed\n"); + } + } + } + closesocket(hSocket); + hSocket = INVALID_SOCKET; + + if (GetTime() - nStart > 20 * 60) + { + nErrorWait /= 3; + nRetryWait /= 3; + } + + nRetryWait = nRetryWait * 11 / 10; + if (!Wait(nRetryWait += 60)) + return; + } +} + + + + + + + + + + +#ifdef TEST +int main(int argc, char *argv[]) +{ + WSADATA wsadata; + if (WSAStartup(MAKEWORD(2,2), &wsadata) != NO_ERROR) + { + printf("Error at WSAStartup()\n"); + return false; + } + + ThreadIRCSeed(NULL); + + WSACleanup(); + return 0; +} +#endif diff --git a/src/irc.h b/src/irc.h new file mode 100644 index 0000000..9c93720 --- /dev/null +++ b/src/irc.h @@ -0,0 +1,12 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_IRC_H +#define curecoin_IRC_H + +void ThreadIRCSeed(void* parg); + +extern int nGotIRCAddresses; + +#endif diff --git a/src/json/LICENSE.txt b/src/json/LICENSE.txt new file mode 100644 index 0000000..797d536 --- /dev/null +++ b/src/json/LICENSE.txt @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2007 - 2009 John W. Wilkinson + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/json/json_spirit.h b/src/json/json_spirit.h new file mode 100644 index 0000000..ac1879d --- /dev/null +++ b/src/json/json_spirit.h @@ -0,0 +1,18 @@ +#ifndef JSON_SPIRIT +#define JSON_SPIRIT + +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include "json_spirit_value.h" +#include "json_spirit_reader.h" +#include "json_spirit_writer.h" +#include "json_spirit_utils.h" + +#endif diff --git a/src/json/json_spirit_error_position.h b/src/json/json_spirit_error_position.h new file mode 100644 index 0000000..1720850 --- /dev/null +++ b/src/json/json_spirit_error_position.h @@ -0,0 +1,54 @@ +#ifndef JSON_SPIRIT_ERROR_POSITION +#define JSON_SPIRIT_ERROR_POSITION + +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include + +namespace json_spirit +{ + // An Error_position exception is thrown by the "read_or_throw" functions below on finding an error. + // Note the "read_or_throw" functions are around 3 times slower than the standard functions "read" + // functions that return a bool. + // + struct Error_position + { + Error_position(); + Error_position( unsigned int line, unsigned int column, const std::string& reason ); + bool operator==( const Error_position& lhs ) const; + unsigned int line_; + unsigned int column_; + std::string reason_; + }; + + inline Error_position::Error_position() + : line_( 0 ) + , column_( 0 ) + { + } + + inline Error_position::Error_position( unsigned int line, unsigned int column, const std::string& reason ) + : line_( line ) + , column_( column ) + , reason_( reason ) + { + } + + inline bool Error_position::operator==( const Error_position& lhs ) const + { + if( this == &lhs ) return true; + + return ( reason_ == lhs.reason_ ) && + ( line_ == lhs.line_ ) && + ( column_ == lhs.column_ ); +} +} + +#endif diff --git a/src/json/json_spirit_reader.cpp b/src/json/json_spirit_reader.cpp new file mode 100644 index 0000000..aa4f637 --- /dev/null +++ b/src/json/json_spirit_reader.cpp @@ -0,0 +1,137 @@ +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#include "json_spirit_reader.h" +#include "json_spirit_reader_template.h" + +using namespace json_spirit; + +bool json_spirit::read( const std::string& s, Value& value ) +{ + return read_string( s, value ); +} + +void json_spirit::read_or_throw( const std::string& s, Value& value ) +{ + read_string_or_throw( s, value ); +} + +bool json_spirit::read( std::istream& is, Value& value ) +{ + return read_stream( is, value ); +} + +void json_spirit::read_or_throw( std::istream& is, Value& value ) +{ + read_stream_or_throw( is, value ); +} + +bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ) +{ + return read_range( begin, end, value ); +} + +void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ) +{ + begin = read_range_or_throw( begin, end, value ); +} + +#ifndef BOOST_NO_STD_WSTRING + +bool json_spirit::read( const std::wstring& s, wValue& value ) +{ + return read_string( s, value ); +} + +void json_spirit::read_or_throw( const std::wstring& s, wValue& value ) +{ + read_string_or_throw( s, value ); +} + +bool json_spirit::read( std::wistream& is, wValue& value ) +{ + return read_stream( is, value ); +} + +void json_spirit::read_or_throw( std::wistream& is, wValue& value ) +{ + read_stream_or_throw( is, value ); +} + +bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ) +{ + return read_range( begin, end, value ); +} + +void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ) +{ + begin = read_range_or_throw( begin, end, value ); +} + +#endif + +bool json_spirit::read( const std::string& s, mValue& value ) +{ + return read_string( s, value ); +} + +void json_spirit::read_or_throw( const std::string& s, mValue& value ) +{ + read_string_or_throw( s, value ); +} + +bool json_spirit::read( std::istream& is, mValue& value ) +{ + return read_stream( is, value ); +} + +void json_spirit::read_or_throw( std::istream& is, mValue& value ) +{ + read_stream_or_throw( is, value ); +} + +bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ) +{ + return read_range( begin, end, value ); +} + +void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ) +{ + begin = read_range_or_throw( begin, end, value ); +} + +#ifndef BOOST_NO_STD_WSTRING + +bool json_spirit::read( const std::wstring& s, wmValue& value ) +{ + return read_string( s, value ); +} + +void json_spirit::read_or_throw( const std::wstring& s, wmValue& value ) +{ + read_string_or_throw( s, value ); +} + +bool json_spirit::read( std::wistream& is, wmValue& value ) +{ + return read_stream( is, value ); +} + +void json_spirit::read_or_throw( std::wistream& is, wmValue& value ) +{ + read_stream_or_throw( is, value ); +} + +bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ) +{ + return read_range( begin, end, value ); +} + +void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ) +{ + begin = read_range_or_throw( begin, end, value ); +} + +#endif diff --git a/src/json/json_spirit_reader.h b/src/json/json_spirit_reader.h new file mode 100644 index 0000000..96494a9 --- /dev/null +++ b/src/json/json_spirit_reader.h @@ -0,0 +1,62 @@ +#ifndef JSON_SPIRIT_READER +#define JSON_SPIRIT_READER + +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include "json_spirit_value.h" +#include "json_spirit_error_position.h" +#include + +namespace json_spirit +{ + // functions to reads a JSON values + + bool read( const std::string& s, Value& value ); + bool read( std::istream& is, Value& value ); + bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ); + + void read_or_throw( const std::string& s, Value& value ); + void read_or_throw( std::istream& is, Value& value ); + void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ); + +#ifndef BOOST_NO_STD_WSTRING + + bool read( const std::wstring& s, wValue& value ); + bool read( std::wistream& is, wValue& value ); + bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ); + + void read_or_throw( const std::wstring& s, wValue& value ); + void read_or_throw( std::wistream& is, wValue& value ); + void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ); + +#endif + + bool read( const std::string& s, mValue& value ); + bool read( std::istream& is, mValue& value ); + bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ); + + void read_or_throw( const std::string& s, mValue& value ); + void read_or_throw( std::istream& is, mValue& value ); + void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ); + +#ifndef BOOST_NO_STD_WSTRING + + bool read( const std::wstring& s, wmValue& value ); + bool read( std::wistream& is, wmValue& value ); + bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ); + + void read_or_throw( const std::wstring& s, wmValue& value ); + void read_or_throw( std::wistream& is, wmValue& value ); + void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ); + +#endif +} + +#endif diff --git a/src/json/json_spirit_reader_template.h b/src/json/json_spirit_reader_template.h new file mode 100644 index 0000000..4dec00e --- /dev/null +++ b/src/json/json_spirit_reader_template.h @@ -0,0 +1,612 @@ +#ifndef JSON_SPIRIT_READER_TEMPLATE +#define JSON_SPIRIT_READER_TEMPLATE + +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#include "json_spirit_value.h" +#include "json_spirit_error_position.h" + +//#define BOOST_SPIRIT_THREADSAFE // uncomment for multithreaded use, requires linking to boost.thread + +#include +#include +#include + +#if BOOST_VERSION >= 103800 + #include + #include + #include + #include + #include + #define spirit_namespace boost::spirit::classic +#else + #include + #include + #include + #include + #include + #define spirit_namespace boost::spirit +#endif + +namespace json_spirit +{ + const spirit_namespace::int_parser < boost::int64_t > int64_p = spirit_namespace::int_parser < boost::int64_t >(); + const spirit_namespace::uint_parser< boost::uint64_t > uint64_p = spirit_namespace::uint_parser< boost::uint64_t >(); + + template< class Iter_type > + bool is_eq( Iter_type first, Iter_type last, const char* c_str ) + { + for( Iter_type i = first; i != last; ++i, ++c_str ) + { + if( *c_str == 0 ) return false; + + if( *i != *c_str ) return false; + } + + return true; + } + + template< class Char_type > + Char_type hex_to_num( const Char_type c ) + { + if( ( c >= '0' ) && ( c <= '9' ) ) return c - '0'; + if( ( c >= 'a' ) && ( c <= 'f' ) ) return c - 'a' + 10; + if( ( c >= 'A' ) && ( c <= 'F' ) ) return c - 'A' + 10; + return 0; + } + + template< class Char_type, class Iter_type > + Char_type hex_str_to_char( Iter_type& begin ) + { + const Char_type c1( *( ++begin ) ); + const Char_type c2( *( ++begin ) ); + + return ( hex_to_num( c1 ) << 4 ) + hex_to_num( c2 ); + } + + template< class Char_type, class Iter_type > + Char_type unicode_str_to_char( Iter_type& begin ) + { + const Char_type c1( *( ++begin ) ); + const Char_type c2( *( ++begin ) ); + const Char_type c3( *( ++begin ) ); + const Char_type c4( *( ++begin ) ); + + return ( hex_to_num( c1 ) << 12 ) + + ( hex_to_num( c2 ) << 8 ) + + ( hex_to_num( c3 ) << 4 ) + + hex_to_num( c4 ); + } + + template< class String_type > + void append_esc_char_and_incr_iter( String_type& s, + typename String_type::const_iterator& begin, + typename String_type::const_iterator end ) + { + typedef typename String_type::value_type Char_type; + + const Char_type c2( *begin ); + + switch( c2 ) + { + case 't': s += '\t'; break; + case 'b': s += '\b'; break; + case 'f': s += '\f'; break; + case 'n': s += '\n'; break; + case 'r': s += '\r'; break; + case '\\': s += '\\'; break; + case '/': s += '/'; break; + case '"': s += '"'; break; + case 'x': + { + if( end - begin >= 3 ) // expecting "xHH..." + { + s += hex_str_to_char< Char_type >( begin ); + } + break; + } + case 'u': + { + if( end - begin >= 5 ) // expecting "uHHHH..." + { + s += unicode_str_to_char< Char_type >( begin ); + } + break; + } + } + } + + template< class String_type > + String_type substitute_esc_chars( typename String_type::const_iterator begin, + typename String_type::const_iterator end ) + { + typedef typename String_type::const_iterator Iter_type; + + if( end - begin < 2 ) return String_type( begin, end ); + + String_type result; + + result.reserve( end - begin ); + + const Iter_type end_minus_1( end - 1 ); + + Iter_type substr_start = begin; + Iter_type i = begin; + + for( ; i < end_minus_1; ++i ) + { + if( *i == '\\' ) + { + result.append( substr_start, i ); + + ++i; // skip the '\' + + append_esc_char_and_incr_iter( result, i, end ); + + substr_start = i + 1; + } + } + + result.append( substr_start, end ); + + return result; + } + + template< class String_type > + String_type get_str_( typename String_type::const_iterator begin, + typename String_type::const_iterator end ) + { + assert( end - begin >= 2 ); + + typedef typename String_type::const_iterator Iter_type; + + Iter_type str_without_quotes( ++begin ); + Iter_type end_without_quotes( --end ); + + return substitute_esc_chars< String_type >( str_without_quotes, end_without_quotes ); + } + + inline std::string get_str( std::string::const_iterator begin, std::string::const_iterator end ) + { + return get_str_< std::string >( begin, end ); + } + + inline std::wstring get_str( std::wstring::const_iterator begin, std::wstring::const_iterator end ) + { + return get_str_< std::wstring >( begin, end ); + } + + template< class String_type, class Iter_type > + String_type get_str( Iter_type begin, Iter_type end ) + { + const String_type tmp( begin, end ); // convert multipass iterators to string iterators + + return get_str( tmp.begin(), tmp.end() ); + } + + // this class's methods get called by the spirit parse resulting + // in the creation of a JSON object or array + // + // NB Iter_type could be a std::string iterator, wstring iterator, a position iterator or a multipass iterator + // + template< class Value_type, class Iter_type > + class Semantic_actions + { + public: + + typedef typename Value_type::Config_type Config_type; + typedef typename Config_type::String_type String_type; + typedef typename Config_type::Object_type Object_type; + typedef typename Config_type::Array_type Array_type; + typedef typename String_type::value_type Char_type; + + Semantic_actions( Value_type& value ) + : value_( value ) + , current_p_( 0 ) + { + } + + void begin_obj( Char_type c ) + { + assert( c == '{' ); + + begin_compound< Object_type >(); + } + + void end_obj( Char_type c ) + { + assert( c == '}' ); + + end_compound(); + } + + void begin_array( Char_type c ) + { + assert( c == '[' ); + + begin_compound< Array_type >(); + } + + void end_array( Char_type c ) + { + assert( c == ']' ); + + end_compound(); + } + + void new_name( Iter_type begin, Iter_type end ) + { + assert( current_p_->type() == obj_type ); + + name_ = get_str< String_type >( begin, end ); + } + + void new_str( Iter_type begin, Iter_type end ) + { + add_to_current( get_str< String_type >( begin, end ) ); + } + + void new_true( Iter_type begin, Iter_type end ) + { + assert( is_eq( begin, end, "true" ) ); + + add_to_current( true ); + } + + void new_false( Iter_type begin, Iter_type end ) + { + assert( is_eq( begin, end, "false" ) ); + + add_to_current( false ); + } + + void new_null( Iter_type begin, Iter_type end ) + { + assert( is_eq( begin, end, "null" ) ); + + add_to_current( Value_type() ); + } + + void new_int( boost::int64_t i ) + { + add_to_current( i ); + } + + void new_uint64( boost::uint64_t ui ) + { + add_to_current( ui ); + } + + void new_real( double d ) + { + add_to_current( d ); + } + + private: + + Semantic_actions& operator=( const Semantic_actions& ); + // to prevent "assignment operator could not be generated" warning + + Value_type* add_first( const Value_type& value ) + { + assert( current_p_ == 0 ); + + value_ = value; + current_p_ = &value_; + return current_p_; + } + + template< class Array_or_obj > + void begin_compound() + { + if( current_p_ == 0 ) + { + add_first( Array_or_obj() ); + } + else + { + stack_.push_back( current_p_ ); + + Array_or_obj new_array_or_obj; // avoid copy by building new array or object in place + + current_p_ = add_to_current( new_array_or_obj ); + } + } + + void end_compound() + { + if( current_p_ != &value_ ) + { + current_p_ = stack_.back(); + + stack_.pop_back(); + } + } + + Value_type* add_to_current( const Value_type& value ) + { + if( current_p_ == 0 ) + { + return add_first( value ); + } + else if( current_p_->type() == array_type ) + { + current_p_->get_array().push_back( value ); + + return ¤t_p_->get_array().back(); + } + + assert( current_p_->type() == obj_type ); + + return &Config_type::add( current_p_->get_obj(), name_, value ); + } + + Value_type& value_; // this is the object or array that is being created + Value_type* current_p_; // the child object or array that is currently being constructed + + std::vector< Value_type* > stack_; // previous child objects and arrays + + String_type name_; // of current name/value pair + }; + + template< typename Iter_type > + void throw_error( spirit_namespace::position_iterator< Iter_type > i, const std::string& reason ) + { + throw Error_position( i.get_position().line, i.get_position().column, reason ); + } + + template< typename Iter_type > + void throw_error( Iter_type i, const std::string& reason ) + { + throw reason; + } + + // the spirit grammer + // + template< class Value_type, class Iter_type > + class Json_grammer : public spirit_namespace::grammar< Json_grammer< Value_type, Iter_type > > + { + public: + + typedef Semantic_actions< Value_type, Iter_type > Semantic_actions_t; + + Json_grammer( Semantic_actions_t& semantic_actions ) + : actions_( semantic_actions ) + { + } + + static void throw_not_value( Iter_type begin, Iter_type end ) + { + throw_error( begin, "not a value" ); + } + + static void throw_not_array( Iter_type begin, Iter_type end ) + { + throw_error( begin, "not an array" ); + } + + static void throw_not_object( Iter_type begin, Iter_type end ) + { + throw_error( begin, "not an object" ); + } + + static void throw_not_pair( Iter_type begin, Iter_type end ) + { + throw_error( begin, "not a pair" ); + } + + static void throw_not_colon( Iter_type begin, Iter_type end ) + { + throw_error( begin, "no colon in pair" ); + } + + static void throw_not_string( Iter_type begin, Iter_type end ) + { + throw_error( begin, "not a string" ); + } + + template< typename ScannerT > + class definition + { + public: + + definition( const Json_grammer& self ) + { + using namespace spirit_namespace; + + typedef typename Value_type::String_type::value_type Char_type; + + // first we convert the semantic action class methods to functors with the + // parameter signature expected by spirit + + typedef boost::function< void( Char_type ) > Char_action; + typedef boost::function< void( Iter_type, Iter_type ) > Str_action; + typedef boost::function< void( double ) > Real_action; + typedef boost::function< void( boost::int64_t ) > Int_action; + typedef boost::function< void( boost::uint64_t ) > Uint64_action; + + Char_action begin_obj ( boost::bind( &Semantic_actions_t::begin_obj, &self.actions_, _1 ) ); + Char_action end_obj ( boost::bind( &Semantic_actions_t::end_obj, &self.actions_, _1 ) ); + Char_action begin_array( boost::bind( &Semantic_actions_t::begin_array, &self.actions_, _1 ) ); + Char_action end_array ( boost::bind( &Semantic_actions_t::end_array, &self.actions_, _1 ) ); + Str_action new_name ( boost::bind( &Semantic_actions_t::new_name, &self.actions_, _1, _2 ) ); + Str_action new_str ( boost::bind( &Semantic_actions_t::new_str, &self.actions_, _1, _2 ) ); + Str_action new_true ( boost::bind( &Semantic_actions_t::new_true, &self.actions_, _1, _2 ) ); + Str_action new_false ( boost::bind( &Semantic_actions_t::new_false, &self.actions_, _1, _2 ) ); + Str_action new_null ( boost::bind( &Semantic_actions_t::new_null, &self.actions_, _1, _2 ) ); + Real_action new_real ( boost::bind( &Semantic_actions_t::new_real, &self.actions_, _1 ) ); + Int_action new_int ( boost::bind( &Semantic_actions_t::new_int, &self.actions_, _1 ) ); + Uint64_action new_uint64 ( boost::bind( &Semantic_actions_t::new_uint64, &self.actions_, _1 ) ); + + // actual grammer + + json_ + = value_ | eps_p[ &throw_not_value ] + ; + + value_ + = string_[ new_str ] + | number_ + | object_ + | array_ + | str_p( "true" ) [ new_true ] + | str_p( "false" )[ new_false ] + | str_p( "null" ) [ new_null ] + ; + + object_ + = ch_p('{')[ begin_obj ] + >> !members_ + >> ( ch_p('}')[ end_obj ] | eps_p[ &throw_not_object ] ) + ; + + members_ + = pair_ >> *( ',' >> pair_ ) + ; + + pair_ + = string_[ new_name ] + >> ( ':' | eps_p[ &throw_not_colon ] ) + >> ( value_ | eps_p[ &throw_not_value ] ) + ; + + array_ + = ch_p('[')[ begin_array ] + >> !elements_ + >> ( ch_p(']')[ end_array ] | eps_p[ &throw_not_array ] ) + ; + + elements_ + = value_ >> *( ',' >> value_ ) + ; + + string_ + = lexeme_d // this causes white space inside a string to be retained + [ + confix_p + ( + '"', + *lex_escape_ch_p, + '"' + ) + ] + ; + + number_ + = strict_real_p[ new_real ] + | int64_p [ new_int ] + | uint64_p [ new_uint64 ] + ; + } + + spirit_namespace::rule< ScannerT > json_, object_, members_, pair_, array_, elements_, value_, string_, number_; + + const spirit_namespace::rule< ScannerT >& start() const { return json_; } + }; + + private: + + Json_grammer& operator=( const Json_grammer& ); // to prevent "assignment operator could not be generated" warning + + Semantic_actions_t& actions_; + }; + + template< class Iter_type, class Value_type > + Iter_type read_range_or_throw( Iter_type begin, Iter_type end, Value_type& value ) + { + Semantic_actions< Value_type, Iter_type > semantic_actions( value ); + + const spirit_namespace::parse_info< Iter_type > info = + spirit_namespace::parse( begin, end, + Json_grammer< Value_type, Iter_type >( semantic_actions ), + spirit_namespace::space_p ); + + if( !info.hit ) + { + assert( false ); // in theory exception should already have been thrown + throw_error( info.stop, "error" ); + } + + return info.stop; + } + + template< class Iter_type, class Value_type > + void add_posn_iter_and_read_range_or_throw( Iter_type begin, Iter_type end, Value_type& value ) + { + typedef spirit_namespace::position_iterator< Iter_type > Posn_iter_t; + + const Posn_iter_t posn_begin( begin, end ); + const Posn_iter_t posn_end( end, end ); + + read_range_or_throw( posn_begin, posn_end, value ); + } + + template< class Iter_type, class Value_type > + bool read_range( Iter_type& begin, Iter_type end, Value_type& value ) + { + try + { + begin = read_range_or_throw( begin, end, value ); + + return true; + } + catch( ... ) + { + return false; + } + } + + template< class String_type, class Value_type > + void read_string_or_throw( const String_type& s, Value_type& value ) + { + add_posn_iter_and_read_range_or_throw( s.begin(), s.end(), value ); + } + + template< class String_type, class Value_type > + bool read_string( const String_type& s, Value_type& value ) + { + typename String_type::const_iterator begin = s.begin(); + + return read_range( begin, s.end(), value ); + } + + template< class Istream_type > + struct Multi_pass_iters + { + typedef typename Istream_type::char_type Char_type; + typedef std::istream_iterator< Char_type, Char_type > istream_iter; + typedef spirit_namespace::multi_pass< istream_iter > Mp_iter; + + Multi_pass_iters( Istream_type& is ) + { + is.unsetf( std::ios::skipws ); + + begin_ = spirit_namespace::make_multi_pass( istream_iter( is ) ); + end_ = spirit_namespace::make_multi_pass( istream_iter() ); + } + + Mp_iter begin_; + Mp_iter end_; + }; + + template< class Istream_type, class Value_type > + bool read_stream( Istream_type& is, Value_type& value ) + { + Multi_pass_iters< Istream_type > mp_iters( is ); + + return read_range( mp_iters.begin_, mp_iters.end_, value ); + } + + template< class Istream_type, class Value_type > + void read_stream_or_throw( Istream_type& is, Value_type& value ) + { + const Multi_pass_iters< Istream_type > mp_iters( is ); + + add_posn_iter_and_read_range_or_throw( mp_iters.begin_, mp_iters.end_, value ); + } +} + +#endif diff --git a/src/json/json_spirit_stream_reader.h b/src/json/json_spirit_stream_reader.h new file mode 100644 index 0000000..7e59c9a --- /dev/null +++ b/src/json/json_spirit_stream_reader.h @@ -0,0 +1,70 @@ +#ifndef JSON_SPIRIT_READ_STREAM +#define JSON_SPIRIT_READ_STREAM + +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include "json_spirit_reader_template.h" + +namespace json_spirit +{ + // these classes allows you to read multiple top level contiguous values from a stream, + // the normal stream read functions have a bug that prevent multiple top level values + // from being read unless they are separated by spaces + + template< class Istream_type, class Value_type > + class Stream_reader + { + public: + + Stream_reader( Istream_type& is ) + : iters_( is ) + { + } + + bool read_next( Value_type& value ) + { + return read_range( iters_.begin_, iters_.end_, value ); + } + + private: + + typedef Multi_pass_iters< Istream_type > Mp_iters; + + Mp_iters iters_; + }; + + template< class Istream_type, class Value_type > + class Stream_reader_thrower + { + public: + + Stream_reader_thrower( Istream_type& is ) + : iters_( is ) + , posn_begin_( iters_.begin_, iters_.end_ ) + , posn_end_( iters_.end_, iters_.end_ ) + { + } + + void read_next( Value_type& value ) + { + posn_begin_ = read_range_or_throw( posn_begin_, posn_end_, value ); + } + + private: + + typedef Multi_pass_iters< Istream_type > Mp_iters; + typedef spirit_namespace::position_iterator< typename Mp_iters::Mp_iter > Posn_iter_t; + + Mp_iters iters_; + Posn_iter_t posn_begin_, posn_end_; + }; +} + +#endif diff --git a/src/json/json_spirit_utils.h b/src/json/json_spirit_utils.h new file mode 100644 index 0000000..553e3b9 --- /dev/null +++ b/src/json/json_spirit_utils.h @@ -0,0 +1,61 @@ +#ifndef JSON_SPIRIT_UTILS +#define JSON_SPIRIT_UTILS + +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include "json_spirit_value.h" +#include + +namespace json_spirit +{ + template< class Obj_t, class Map_t > + void obj_to_map( const Obj_t& obj, Map_t& mp_obj ) + { + mp_obj.clear(); + + for( typename Obj_t::const_iterator i = obj.begin(); i != obj.end(); ++i ) + { + mp_obj[ i->name_ ] = i->value_; + } + } + + template< class Obj_t, class Map_t > + void map_to_obj( const Map_t& mp_obj, Obj_t& obj ) + { + obj.clear(); + + for( typename Map_t::const_iterator i = mp_obj.begin(); i != mp_obj.end(); ++i ) + { + obj.push_back( typename Obj_t::value_type( i->first, i->second ) ); + } + } + + typedef std::map< std::string, Value > Mapped_obj; + +#ifndef BOOST_NO_STD_WSTRING + typedef std::map< std::wstring, wValue > wMapped_obj; +#endif + + template< class Object_type, class String_type > + const typename Object_type::value_type::Value_type& find_value( const Object_type& obj, const String_type& name ) + { + for( typename Object_type::const_iterator i = obj.begin(); i != obj.end(); ++i ) + { + if( i->name_ == name ) + { + return i->value_; + } + } + + return Object_type::value_type::Value_type::null; + } +} + +#endif diff --git a/src/json/json_spirit_value.cpp b/src/json/json_spirit_value.cpp new file mode 100644 index 0000000..44d2f06 --- /dev/null +++ b/src/json/json_spirit_value.cpp @@ -0,0 +1,8 @@ +/* Copyright (c) 2007 John W Wilkinson + + This source code can be used for any purpose as long as + this comment is retained. */ + +// json spirit version 2.00 + +#include "json_spirit_value.h" diff --git a/src/json/json_spirit_value.h b/src/json/json_spirit_value.h new file mode 100644 index 0000000..7541df9 --- /dev/null +++ b/src/json/json_spirit_value.h @@ -0,0 +1,534 @@ +#ifndef JSON_SPIRIT_VALUE +#define JSON_SPIRIT_VALUE + +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace json_spirit +{ + enum Value_type{ obj_type, array_type, str_type, bool_type, int_type, real_type, null_type }; + static const char* Value_type_name[]={"obj", "array", "str", "bool", "int", "real", "null"}; + + template< class Config > // Config determines whether the value uses std::string or std::wstring and + // whether JSON Objects are represented as vectors or maps + class Value_impl + { + public: + + typedef Config Config_type; + typedef typename Config::String_type String_type; + typedef typename Config::Object_type Object; + typedef typename Config::Array_type Array; + typedef typename String_type::const_pointer Const_str_ptr; // eg const char* + + Value_impl(); // creates null value + Value_impl( Const_str_ptr value ); + Value_impl( const String_type& value ); + Value_impl( const Object& value ); + Value_impl( const Array& value ); + Value_impl( bool value ); + Value_impl( int value ); + Value_impl( boost::int64_t value ); + Value_impl( boost::uint64_t value ); + Value_impl( double value ); + + Value_impl( const Value_impl& other ); + + bool operator==( const Value_impl& lhs ) const; + + Value_impl& operator=( const Value_impl& lhs ); + + Value_type type() const; + + bool is_uint64() const; + bool is_null() const; + + const String_type& get_str() const; + const Object& get_obj() const; + const Array& get_array() const; + bool get_bool() const; + int get_int() const; + boost::int64_t get_int64() const; + boost::uint64_t get_uint64() const; + double get_real() const; + + Object& get_obj(); + Array& get_array(); + + template< typename T > T get_value() const; // example usage: int i = value.get_value< int >(); + // or double d = value.get_value< double >(); + + static const Value_impl null; + + private: + + void check_type( const Value_type vtype ) const; + + typedef boost::variant< String_type, + boost::recursive_wrapper< Object >, boost::recursive_wrapper< Array >, + bool, boost::int64_t, double > Variant; + + Value_type type_; + Variant v_; + bool is_uint64_; + }; + + // vector objects + + template< class Config > + struct Pair_impl + { + typedef typename Config::String_type String_type; + typedef typename Config::Value_type Value_type; + + Pair_impl( const String_type& name, const Value_type& value ); + + bool operator==( const Pair_impl& lhs ) const; + + String_type name_; + Value_type value_; + }; + + template< class String > + struct Config_vector + { + typedef String String_type; + typedef Value_impl< Config_vector > Value_type; + typedef Pair_impl < Config_vector > Pair_type; + typedef std::vector< Value_type > Array_type; + typedef std::vector< Pair_type > Object_type; + + static Value_type& add( Object_type& obj, const String_type& name, const Value_type& value ) + { + obj.push_back( Pair_type( name , value ) ); + + return obj.back().value_; + } + + static String_type get_name( const Pair_type& pair ) + { + return pair.name_; + } + + static Value_type get_value( const Pair_type& pair ) + { + return pair.value_; + } + }; + + // typedefs for ASCII + + typedef Config_vector< std::string > Config; + + typedef Config::Value_type Value; + typedef Config::Pair_type Pair; + typedef Config::Object_type Object; + typedef Config::Array_type Array; + + // typedefs for Unicode + +#ifndef BOOST_NO_STD_WSTRING + + typedef Config_vector< std::wstring > wConfig; + + typedef wConfig::Value_type wValue; + typedef wConfig::Pair_type wPair; + typedef wConfig::Object_type wObject; + typedef wConfig::Array_type wArray; +#endif + + // map objects + + template< class String > + struct Config_map + { + typedef String String_type; + typedef Value_impl< Config_map > Value_type; + typedef std::vector< Value_type > Array_type; + typedef std::map< String_type, Value_type > Object_type; + typedef typename Object_type::value_type Pair_type; + + static Value_type& add( Object_type& obj, const String_type& name, const Value_type& value ) + { + return obj[ name ] = value; + } + + static String_type get_name( const Pair_type& pair ) + { + return pair.first; + } + + static Value_type get_value( const Pair_type& pair ) + { + return pair.second; + } + }; + + // typedefs for ASCII + + typedef Config_map< std::string > mConfig; + + typedef mConfig::Value_type mValue; + typedef mConfig::Object_type mObject; + typedef mConfig::Array_type mArray; + + // typedefs for Unicode + +#ifndef BOOST_NO_STD_WSTRING + + typedef Config_map< std::wstring > wmConfig; + + typedef wmConfig::Value_type wmValue; + typedef wmConfig::Object_type wmObject; + typedef wmConfig::Array_type wmArray; + +#endif + + /////////////////////////////////////////////////////////////////////////////////////////////// + // + // implementation + + template< class Config > + const Value_impl< Config > Value_impl< Config >::null; + + template< class Config > + Value_impl< Config >::Value_impl() + : type_( null_type ) + , is_uint64_( false ) + { + } + + template< class Config > + Value_impl< Config >::Value_impl( const Const_str_ptr value ) + : type_( str_type ) + , v_( String_type( value ) ) + , is_uint64_( false ) + { + } + + template< class Config > + Value_impl< Config >::Value_impl( const String_type& value ) + : type_( str_type ) + , v_( value ) + , is_uint64_( false ) + { + } + + template< class Config > + Value_impl< Config >::Value_impl( const Object& value ) + : type_( obj_type ) + , v_( value ) + , is_uint64_( false ) + { + } + + template< class Config > + Value_impl< Config >::Value_impl( const Array& value ) + : type_( array_type ) + , v_( value ) + , is_uint64_( false ) + { + } + + template< class Config > + Value_impl< Config >::Value_impl( bool value ) + : type_( bool_type ) + , v_( value ) + , is_uint64_( false ) + { + } + + template< class Config > + Value_impl< Config >::Value_impl( int value ) + : type_( int_type ) + , v_( static_cast< boost::int64_t >( value ) ) + , is_uint64_( false ) + { + } + + template< class Config > + Value_impl< Config >::Value_impl( boost::int64_t value ) + : type_( int_type ) + , v_( value ) + , is_uint64_( false ) + { + } + + template< class Config > + Value_impl< Config >::Value_impl( boost::uint64_t value ) + : type_( int_type ) + , v_( static_cast< boost::int64_t >( value ) ) + , is_uint64_( true ) + { + } + + template< class Config > + Value_impl< Config >::Value_impl( double value ) + : type_( real_type ) + , v_( value ) + , is_uint64_( false ) + { + } + + template< class Config > + Value_impl< Config >::Value_impl( const Value_impl< Config >& other ) + : type_( other.type() ) + , v_( other.v_ ) + , is_uint64_( other.is_uint64_ ) + { + } + + template< class Config > + Value_impl< Config >& Value_impl< Config >::operator=( const Value_impl& lhs ) + { + Value_impl tmp( lhs ); + + std::swap( type_, tmp.type_ ); + std::swap( v_, tmp.v_ ); + std::swap( is_uint64_, tmp.is_uint64_ ); + + return *this; + } + + template< class Config > + bool Value_impl< Config >::operator==( const Value_impl& lhs ) const + { + if( this == &lhs ) return true; + + if( type() != lhs.type() ) return false; + + return v_ == lhs.v_; + } + + template< class Config > + Value_type Value_impl< Config >::type() const + { + return type_; + } + + template< class Config > + bool Value_impl< Config >::is_uint64() const + { + return is_uint64_; + } + + template< class Config > + bool Value_impl< Config >::is_null() const + { + return type() == null_type; + } + + template< class Config > + void Value_impl< Config >::check_type( const Value_type vtype ) const + { + if( type() != vtype ) + { + std::ostringstream os; + + ///// curecoin: 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() ); + } + } + + template< class Config > + const typename Config::String_type& Value_impl< Config >::get_str() const + { + check_type( str_type ); + + return *boost::get< String_type >( &v_ ); + } + + template< class Config > + const typename Value_impl< Config >::Object& Value_impl< Config >::get_obj() const + { + check_type( obj_type ); + + return *boost::get< Object >( &v_ ); + } + + template< class Config > + const typename Value_impl< Config >::Array& Value_impl< Config >::get_array() const + { + check_type( array_type ); + + return *boost::get< Array >( &v_ ); + } + + template< class Config > + bool Value_impl< Config >::get_bool() const + { + check_type( bool_type ); + + return boost::get< bool >( v_ ); + } + + template< class Config > + int Value_impl< Config >::get_int() const + { + check_type( int_type ); + + return static_cast< int >( get_int64() ); + } + + template< class Config > + boost::int64_t Value_impl< Config >::get_int64() const + { + check_type( int_type ); + + return boost::get< boost::int64_t >( v_ ); + } + + template< class Config > + boost::uint64_t Value_impl< Config >::get_uint64() const + { + check_type( int_type ); + + return static_cast< boost::uint64_t >( get_int64() ); + } + + template< class Config > + double Value_impl< Config >::get_real() const + { + if( type() == int_type ) + { + return is_uint64() ? static_cast< double >( get_uint64() ) + : static_cast< double >( get_int64() ); + } + + check_type( real_type ); + + return boost::get< double >( v_ ); + } + + template< class Config > + typename Value_impl< Config >::Object& Value_impl< Config >::get_obj() + { + check_type( obj_type ); + + return *boost::get< Object >( &v_ ); + } + + template< class Config > + typename Value_impl< Config >::Array& Value_impl< Config >::get_array() + { + check_type( array_type ); + + return *boost::get< Array >( &v_ ); + } + + template< class Config > + Pair_impl< Config >::Pair_impl( const String_type& name, const Value_type& value ) + : name_( name ) + , value_( value ) + { + } + + template< class Config > + bool Pair_impl< Config >::operator==( const Pair_impl< Config >& lhs ) const + { + if( this == &lhs ) return true; + + return ( name_ == lhs.name_ ) && ( value_ == lhs.value_ ); + } + + // converts a C string, ie. 8 bit char array, to a string object + // + template < class String_type > + String_type to_str( const char* c_str ) + { + String_type result; + + for( const char* p = c_str; *p != 0; ++p ) + { + result += *p; + } + + return result; + } + + // + + namespace internal_ + { + template< typename T > + struct Type_to_type + { + }; + + template< class Value > + int get_value( const Value& value, Type_to_type< int > ) + { + return value.get_int(); + } + + template< class Value > + boost::int64_t get_value( const Value& value, Type_to_type< boost::int64_t > ) + { + return value.get_int64(); + } + + template< class Value > + boost::uint64_t get_value( const Value& value, Type_to_type< boost::uint64_t > ) + { + return value.get_uint64(); + } + + template< class Value > + double get_value( const Value& value, Type_to_type< double > ) + { + return value.get_real(); + } + + template< class Value > + typename Value::String_type get_value( const Value& value, Type_to_type< typename Value::String_type > ) + { + return value.get_str(); + } + + template< class Value > + typename Value::Array get_value( const Value& value, Type_to_type< typename Value::Array > ) + { + return value.get_array(); + } + + template< class Value > + typename Value::Object get_value( const Value& value, Type_to_type< typename Value::Object > ) + { + return value.get_obj(); + } + + template< class Value > + bool get_value( const Value& value, Type_to_type< bool > ) + { + return value.get_bool(); + } + } + + template< class Config > + template< typename T > + T Value_impl< Config >::get_value() const + { + return internal_::get_value( *this, internal_::Type_to_type< T >() ); + } +} + +#endif diff --git a/src/json/json_spirit_writer.cpp b/src/json/json_spirit_writer.cpp new file mode 100644 index 0000000..d24a632 --- /dev/null +++ b/src/json/json_spirit_writer.cpp @@ -0,0 +1,95 @@ +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#include "json_spirit_writer.h" +#include "json_spirit_writer_template.h" + +void json_spirit::write( const Value& value, std::ostream& os ) +{ + write_stream( value, os, false ); +} + +void json_spirit::write_formatted( const Value& value, std::ostream& os ) +{ + write_stream( value, os, true ); +} + +std::string json_spirit::write( const Value& value ) +{ + return write_string( value, false ); +} + +std::string json_spirit::write_formatted( const Value& value ) +{ + return write_string( value, true ); +} + +#ifndef BOOST_NO_STD_WSTRING + +void json_spirit::write( const wValue& value, std::wostream& os ) +{ + write_stream( value, os, false ); +} + +void json_spirit::write_formatted( const wValue& value, std::wostream& os ) +{ + write_stream( value, os, true ); +} + +std::wstring json_spirit::write( const wValue& value ) +{ + return write_string( value, false ); +} + +std::wstring json_spirit::write_formatted( const wValue& value ) +{ + return write_string( value, true ); +} + +#endif + +void json_spirit::write( const mValue& value, std::ostream& os ) +{ + write_stream( value, os, false ); +} + +void json_spirit::write_formatted( const mValue& value, std::ostream& os ) +{ + write_stream( value, os, true ); +} + +std::string json_spirit::write( const mValue& value ) +{ + return write_string( value, false ); +} + +std::string json_spirit::write_formatted( const mValue& value ) +{ + return write_string( value, true ); +} + +#ifndef BOOST_NO_STD_WSTRING + +void json_spirit::write( const wmValue& value, std::wostream& os ) +{ + write_stream( value, os, false ); +} + +void json_spirit::write_formatted( const wmValue& value, std::wostream& os ) +{ + write_stream( value, os, true ); +} + +std::wstring json_spirit::write( const wmValue& value ) +{ + return write_string( value, false ); +} + +std::wstring json_spirit::write_formatted( const wmValue& value ) +{ + return write_string( value, true ); +} + +#endif diff --git a/src/json/json_spirit_writer.h b/src/json/json_spirit_writer.h new file mode 100644 index 0000000..52e1406 --- /dev/null +++ b/src/json/json_spirit_writer.h @@ -0,0 +1,50 @@ +#ifndef JSON_SPIRIT_WRITER +#define JSON_SPIRIT_WRITER + +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include "json_spirit_value.h" +#include + +namespace json_spirit +{ + // functions to convert JSON Values to text, + // the "formatted" versions add whitespace to format the output nicely + + void write ( const Value& value, std::ostream& os ); + void write_formatted( const Value& value, std::ostream& os ); + std::string write ( const Value& value ); + std::string write_formatted( const Value& value ); + +#ifndef BOOST_NO_STD_WSTRING + + void write ( const wValue& value, std::wostream& os ); + void write_formatted( const wValue& value, std::wostream& os ); + std::wstring write ( const wValue& value ); + std::wstring write_formatted( const wValue& value ); + +#endif + + void write ( const mValue& value, std::ostream& os ); + void write_formatted( const mValue& value, std::ostream& os ); + std::string write ( const mValue& value ); + std::string write_formatted( const mValue& value ); + +#ifndef BOOST_NO_STD_WSTRING + + void write ( const wmValue& value, std::wostream& os ); + void write_formatted( const wmValue& value, std::wostream& os ); + std::wstring write ( const wmValue& value ); + std::wstring write_formatted( const wmValue& value ); + +#endif +} + +#endif diff --git a/src/json/json_spirit_writer_template.h b/src/json/json_spirit_writer_template.h new file mode 100644 index 0000000..095dbd9 --- /dev/null +++ b/src/json/json_spirit_writer_template.h @@ -0,0 +1,248 @@ +#ifndef JSON_SPIRIT_WRITER_TEMPLATE +#define JSON_SPIRIT_WRITER_TEMPLATE + +// Copyright John W. Wilkinson 2007 - 2009. +// Distributed under the MIT License, see accompanying file LICENSE.txt + +// json spirit version 4.03 + +#include "json_spirit_value.h" + +#include +#include +#include + +namespace json_spirit +{ + inline char to_hex_char( unsigned int c ) + { + assert( c <= 0xF ); + + const char ch = static_cast< char >( c ); + + if( ch < 10 ) return '0' + ch; + + return 'A' - 10 + ch; + } + + template< class String_type > + String_type non_printable_to_string( unsigned int c ) + { + typedef typename String_type::value_type Char_type; + + String_type result( 6, '\\' ); + + result[1] = 'u'; + + result[ 5 ] = to_hex_char( c & 0x000F ); c >>= 4; + result[ 4 ] = to_hex_char( c & 0x000F ); c >>= 4; + result[ 3 ] = to_hex_char( c & 0x000F ); c >>= 4; + result[ 2 ] = to_hex_char( c & 0x000F ); + + return result; + } + + template< typename Char_type, class String_type > + bool add_esc_char( Char_type c, String_type& s ) + { + switch( c ) + { + case '"': s += to_str< String_type >( "\\\"" ); return true; + case '\\': s += to_str< String_type >( "\\\\" ); return true; + case '\b': s += to_str< String_type >( "\\b" ); return true; + case '\f': s += to_str< String_type >( "\\f" ); return true; + case '\n': s += to_str< String_type >( "\\n" ); return true; + case '\r': s += to_str< String_type >( "\\r" ); return true; + case '\t': s += to_str< String_type >( "\\t" ); return true; + } + + return false; + } + + template< class String_type > + String_type add_esc_chars( const String_type& s ) + { + typedef typename String_type::const_iterator Iter_type; + typedef typename String_type::value_type Char_type; + + String_type result; + + const Iter_type end( s.end() ); + + for( Iter_type i = s.begin(); i != end; ++i ) + { + const Char_type c( *i ); + + if( add_esc_char( c, result ) ) continue; + + const wint_t unsigned_c( ( c >= 0 ) ? c : 256 + c ); + + if( iswprint( unsigned_c ) ) + { + result += c; + } + else + { + result += non_printable_to_string< String_type >( unsigned_c ); + } + } + + return result; + } + + // this class generates the JSON text, + // it keeps track of the indentation level etc. + // + template< class Value_type, class Ostream_type > + class Generator + { + typedef typename Value_type::Config_type Config_type; + typedef typename Config_type::String_type String_type; + typedef typename Config_type::Object_type Object_type; + typedef typename Config_type::Array_type Array_type; + typedef typename String_type::value_type Char_type; + typedef typename Object_type::value_type Obj_member_type; + + public: + + Generator( const Value_type& value, Ostream_type& os, bool pretty ) + : os_( os ) + , indentation_level_( 0 ) + , pretty_( pretty ) + { + output( value ); + } + + private: + + void output( const Value_type& value ) + { + switch( value.type() ) + { + case obj_type: output( value.get_obj() ); break; + case array_type: output( value.get_array() ); break; + case str_type: output( value.get_str() ); break; + case bool_type: output( value.get_bool() ); break; + case int_type: output_int( value ); break; + + /// curecoin: 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; + + case null_type: os_ << "null"; break; + default: assert( false ); + } + } + + void output( const Object_type& obj ) + { + output_array_or_obj( obj, '{', '}' ); + } + + void output( const Array_type& arr ) + { + output_array_or_obj( arr, '[', ']' ); + } + + void output( const Obj_member_type& member ) + { + output( Config_type::get_name( member ) ); space(); + os_ << ':'; space(); + output( Config_type::get_value( member ) ); + } + + void output_int( const Value_type& value ) + { + if( value.is_uint64() ) + { + os_ << value.get_uint64(); + } + else + { + os_ << value.get_int64(); + } + } + + void output( const String_type& s ) + { + os_ << '"' << add_esc_chars( s ) << '"'; + } + + void output( bool b ) + { + os_ << to_str< String_type >( b ? "true" : "false" ); + } + + template< class T > + void output_array_or_obj( const T& t, Char_type start_char, Char_type end_char ) + { + os_ << start_char; new_line(); + + ++indentation_level_; + + for( typename T::const_iterator i = t.begin(); i != t.end(); ++i ) + { + indent(); output( *i ); + + typename T::const_iterator next = i; + + if( ++next != t.end()) + { + os_ << ','; + } + + new_line(); + } + + --indentation_level_; + + indent(); os_ << end_char; + } + + void indent() + { + if( !pretty_ ) return; + + for( int i = 0; i < indentation_level_; ++i ) + { + os_ << " "; + } + } + + void space() + { + if( pretty_ ) os_ << ' '; + } + + void new_line() + { + if( pretty_ ) os_ << '\n'; + } + + Generator& operator=( const Generator& ); // to prevent "assignment operator could not be generated" warning + + Ostream_type& os_; + int indentation_level_; + bool pretty_; + }; + + template< class Value_type, class Ostream_type > + void write_stream( const Value_type& value, Ostream_type& os, bool pretty ) + { + Generator< Value_type, Ostream_type >( value, os, pretty ); + } + + template< class Value_type > + typename Value_type::String_type write_string( const Value_type& value, bool pretty ) + { + typedef typename Value_type::String_type::value_type Char_type; + + std::basic_ostringstream< Char_type > os; + + write_stream( value, os, pretty ); + + return os.str(); + } +} + +#endif diff --git a/src/kernel.cpp b/src/kernel.cpp new file mode 100644 index 0000000..df41e09 --- /dev/null +++ b/src/kernel.cpp @@ -0,0 +1,386 @@ +// 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. + +#include + +#include "kernel.h" +#include "db.h" + +using namespace std; + +extern int nStakeMaxAge; +extern int nStakeTargetSpacing; + +// Modifier interval: time to elapse before new modifier is computed +// Set to 6-hour for production network and 20-minute for test network +unsigned int nModifierInterval = MODIFIER_INTERVAL; + +// Hard checkpoints of stake modifiers to ensure they are deterministic +static std::map mapStakeModifierCheckpoints = + boost::assign::map_list_of + ( 0, 0x0e00670bu ) + ; + +// Get the last stake modifier and its generation time from a given block +static bool GetLastStakeModifier(const CBlockIndex* pindex, uint64& nStakeModifier, int64& nModifierTime) +{ + if (!pindex) + return error("GetLastStakeModifier: null pindex"); + while (pindex && pindex->pprev && !pindex->GeneratedStakeModifier()) + pindex = pindex->pprev; + if (!pindex->GeneratedStakeModifier()) + return error("GetLastStakeModifier: no generation at genesis block"); + nStakeModifier = pindex->nStakeModifier; + nModifierTime = pindex->GetBlockTime(); + return true; +} + +// Get selection interval section (in seconds) +static int64 GetStakeModifierSelectionIntervalSection(int nSection) +{ + assert (nSection >= 0 && nSection < 64); + return (nModifierInterval * 63 / (63 + ((63 - nSection) * (MODIFIER_INTERVAL_RATIO - 1)))); +} + +// Get stake modifier selection interval (in seconds) +static int64 GetStakeModifierSelectionInterval() +{ + int64 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) +{ + bool fSelected = false; + uint256 hashBest = 0; + *pindexSelected = (const CBlockIndex*) 0; + BOOST_FOREACH(const PAIRTYPE(int64, 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()); + const CBlockIndex* pindex = mapBlockIndex[item.second]; + if (fSelected && pindex->GetBlockTime() > nSelectionIntervalStop) + break; + if (mapSelectedBlocks.count(pindex->GetBlockHash()) > 0) + continue; + // compute the selection hash by hashing its proof-hash and the + // previous proof-of-stake modifier + uint256 hashProof = pindex->IsProofOfStake()? pindex->hashProofOfStake : pindex->GetBlockHash(); + CDataStream ss(SER_GETHASH, 0); + ss << hashProof << nStakeModifierPrev; + uint256 hashSelection = Hash(ss.begin(), ss.end()); + // the selection hash is divided by 2**32 so that proof-of-stake block + // is always favored over proof-of-work block. this is to preserve + // the energy efficiency property + if (pindex->IsProofOfStake()) + hashSelection >>= 32; + if (fSelected && hashSelection < hashBest) + { + hashBest = hashSelection; + *pindexSelected = (const CBlockIndex*) pindex; + } + else if (!fSelected) + { + fSelected = true; + hashBest = hashSelection; + *pindexSelected = (const CBlockIndex*) pindex; + } + } + if (fDebug && GetBoolArg("-printstakemodifier")) + printf("SelectBlockFromCandidates: selection hash=%s\n", hashBest.ToString().c_str()); + return fSelected; +} + +// Stake Modifier (hash modifier of proof-of-stake): +// The purpose of stake modifier is to prevent a txout (coin) owner from +// computing future proof-of-stake generated by this txout at the time +// of transaction confirmation. To meet kernel protocol, the txout +// must hash with a future stake modifier to generate the proof. +// Stake modifier consists of bits each of which is contributed from a +// selected block of a given block group in the past. +// The selection of a block is based on a hash of the block's proof-hash and +// the previous stake modifier. +// Stake modifier is recomputed at a fixed time interval instead of every +// 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) +{ + nStakeModifier = 0; + fGeneratedStakeModifier = false; + if (!pindexPrev) + { + fGeneratedStakeModifier = true; + return true; // genesis block's modifier is 0 + } + // First find current stake modifier and its generation block time + // if it's not old enough, return the same stake modifier + int64 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()); + } + 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; + const CBlockIndex* pindex = pindexPrev; + while (pindex && pindex->GetBlockTime() >= nSelectionIntervalStart) + { + vSortedByTimestamp.push_back(make_pair(pindex->GetBlockTime(), pindex->GetBlockHash())); + pindex = pindex->pprev; + } + int nHeightFirstCandidate = pindex ? (pindex->nHeight + 1) : 0; + reverse(vSortedByTimestamp.begin(), vSortedByTimestamp.end()); + sort(vSortedByTimestamp.begin(), vSortedByTimestamp.end()); + + // Select 64 blocks from candidate blocks to generate stake modifier + uint64 nStakeModifierNew = 0; + int64 nSelectionIntervalStop = nSelectionIntervalStart; + map mapSelectedBlocks; + for (int nRound=0; nRoundGetStakeEntropyBit()) << 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()); + } + + // Print selection map for visualization of the selected blocks + if (fDebug && GetBoolArg("-printstakemodifier")) + { + string strSelectionMap = ""; + // '-' indicates proof-of-work blocks not selected + strSelectionMap.insert(0, pindexPrev->nHeight - nHeightFirstCandidate + 1, '-'); + pindex = pindexPrev; + while (pindex && pindex->nHeight >= nHeightFirstCandidate) + { + // '=' indicates proof-of-stake blocks not selected + if (pindex->IsProofOfStake()) + strSelectionMap.replace(pindex->nHeight - nHeightFirstCandidate, 1, "="); + pindex = pindex->pprev; + } + BOOST_FOREACH(const PAIRTYPE(uint256, const CBlockIndex*)& item, mapSelectedBlocks) + { + // 'S' indicates selected proof-of-stake blocks + // 'W' indicates selected proof-of-work blocks + strSelectionMap.replace(item.second->nHeight - nHeightFirstCandidate, 1, item.second->IsProofOfStake()? "S" : "W"); + } + printf("ComputeNextStakeModifier: selection height [%d, %d] map %s\n", nHeightFirstCandidate, pindexPrev->nHeight, strSelectionMap.c_str()); + } + if (fDebug) + { + printf("ComputeNextStakeModifier: new modifier=0x%016"PRI64x" time=%s\n", nStakeModifierNew, DateTimeStrFormat(pindexPrev->GetBlockTime()).c_str()); + } + + nStakeModifier = nStakeModifierNew; + fGeneratedStakeModifier = true; + return true; +} + +// 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) +{ + nStakeModifier = 0; + if (!mapBlockIndex.count(hashBlockFrom)) + return error("GetKernelStakeModifier() : block not indexed"); + const CBlockIndex* pindexFrom = mapBlockIndex[hashBlockFrom]; + nStakeModifierHeight = pindexFrom->nHeight; + nStakeModifierTime = pindexFrom->GetBlockTime(); + int64 nStakeModifierSelectionInterval = GetStakeModifierSelectionInterval(); + const CBlockIndex* pindex = pindexFrom; + // loop to find the stake modifier later by a selection interval + while (nStakeModifierTime < pindexFrom->GetBlockTime() + nStakeModifierSelectionInterval) + { + if (!pindex->pnext) + { // reached best block; may happen if node is behind on block chain + if (fPrintProofOfStake || (pindex->GetBlockTime() + nStakeMinAge - nStakeModifierSelectionInterval > GetAdjustedTime())) + 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 + return false; + } + pindex = pindex->pnext; + if (pindex->GeneratedStakeModifier()) + { + nStakeModifierHeight = pindex->nHeight; + nStakeModifierTime = pindex->GetBlockTime(); + } + } + nStakeModifier = pindex->nStakeModifier; + return true; +} + +// ppcoin kernel protocol +// coinstake must meet hash target according to the protocol: +// kernel (input 0) must meet the formula +// hash(nStakeModifier + txPrev.block.nTime + txPrev.offset + txPrev.nTime + txPrev.vout.n + nTime) < bnTarget * nCoinDayWeight +// 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 +// 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 +// nodes generating coinstake at the same time +// txPrev.nTime: reduce the chance of nodes generating coinstake at the same +// time +// txPrev.vout.n: output number of txPrev, to reduce the chance of nodes +// generating coinstake at the same time +// block/tx hash should not be used here as they can be generated in vast +// 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) +{ + if (nTimeTx < txPrev.nTime) // Transaction timestamp violation + return error("CheckStakeKernelHash() : nTime violation"); + + unsigned int nTimeBlockFrom = blockFrom.GetBlockTime(); + if (nTimeBlockFrom + nStakeMinAge > nTimeTx) // Min age requirement + return error("CheckStakeKernelHash() : min age violation"); + + CBigNum bnTargetPerCoinDay; + bnTargetPerCoinDay.SetCompact(nBits); + int64 nValueIn = txPrev.vout[prevout.n].nValue; + + // v0.3 protocol kernel hash weight starts from 0 at the 30-day 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 * 60); + + // Calculate hash + CDataStream ss(SER_GETHASH, 0); + uint64 nStakeModifier = 0; + int nStakeModifierHeight = 0; + int64 nStakeModifierTime = 0; + + if (!GetKernelStakeModifier(blockFrom.GetHash(), nStakeModifier, nStakeModifierHeight, nStakeModifierTime, fPrintProofOfStake)) + return false; + 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", + nStakeModifier, nStakeModifierHeight, + DateTimeStrFormat(nStakeModifierTime).c_str(), + mapBlockIndex[blockFrom.GetHash()]->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", + 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) + return false; + if (fDebug && !fPrintProofOfStake) + { + printf("CheckStakeKernelHash() : using modifier 0x%016"PRI64x" at height=%d timestamp=%s for block from height=%d timestamp=%s\n", + nStakeModifier, nStakeModifierHeight, + DateTimeStrFormat(nStakeModifierTime).c_str(), + mapBlockIndex[blockFrom.GetHash()]->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", + nStakeModifier, + nTimeBlockFrom, nTxPrevOffset, txPrev.nTime, prevout.n, nTimeTx, + hashProofOfStake.ToString().c_str()); + } + return true; +} + +// Check kernel hash target and coinstake signature +bool CheckProofOfStake(const CTransaction& tx, unsigned int nBits, uint256& hashProofOfStake) +{ + if (!tx.IsCoinStake()) + return error("CheckProofOfStake() : called on non-coinstake %s", tx.GetHash().ToString().c_str()); + + // Kernel (input 0) must match the stake hash target per coin age (nBits) + const CTxIn& txin = tx.vin[0]; + + // First try finding the previous transaction in database + CTxDB txdb("r"); + CTransaction txPrev; + 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)) + return tx.DoS(100, error("CheckProofOfStake() : VerifySignature failed on coinstake %s", tx.GetHash().ToString().c_str())); + + // Read block header + CBlock block; + 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)) + 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) +{ + // v0.3 protocol + return (nTimeBlock == nTimeTx); +} + +// Get stake modifier checksum +unsigned int GetStakeModifierChecksum(const CBlockIndex* pindex) +{ + assert (pindex->pprev || pindex->GetBlockHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)); + // Hash previous checksum with flags, hashProofOfStake and nStakeModifier + CDataStream ss(SER_GETHASH, 0); + if (pindex->pprev) + ss << pindex->pprev->nStakeModifierChecksum; + ss << pindex->nFlags << pindex->hashProofOfStake << pindex->nStakeModifier; + uint256 hashChecksum = Hash(ss.begin(), ss.end()); + hashChecksum >>= (256 - 32); + return hashChecksum.Get64(); +} + +// Check stake modifier hard checkpoints +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; +} diff --git a/src/kernel.h b/src/kernel.h new file mode 100644 index 0000000..9241173 --- /dev/null +++ b/src/kernel.h @@ -0,0 +1,37 @@ +// 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 + +#include "main.h" + +// MODIFIER_INTERVAL: time to elapse before new modifier is computed +static const unsigned int MODIFIER_INTERVAL = 6 * 60 * 60; +extern unsigned int nModifierInterval; + +// MODIFIER_INTERVAL_RATIO: +// ratio of group interval length between the last group and the first group +static const int MODIFIER_INTERVAL_RATIO = 3; + +// Compute the hash modifier for proof-of-stake +bool ComputeNextStakeModifier(const CBlockIndex* pindexPrev, uint64& 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); + +// Check kernel hash target and coinstake signature +// Sets hashProofOfStake on success return +bool CheckProofOfStake(const CTransaction& tx, unsigned int nBits, uint256& hashProofOfStake); + +// Check whether the coinstake timestamp meets protocol +bool CheckCoinStakeTimestamp(int64 nTimeBlock, int64 nTimeTx); + +// Get stake modifier checksum +unsigned int GetStakeModifierChecksum(const CBlockIndex* pindex); + +// Check stake modifier hard checkpoints +bool CheckStakeModifierCheckpoints(int nHeight, unsigned int nStakeModifierChecksum); + +#endif // PPCOIN_KERNEL_H diff --git a/src/key.cpp b/src/key.cpp new file mode 100644 index 0000000..3a8dbbb --- /dev/null +++ b/src/key.cpp @@ -0,0 +1,406 @@ +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include + +#include +#include + +#include "key.h" + +// Generate a private key from just the secret parameter +int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key) +{ + int ok = 0; + BN_CTX *ctx = NULL; + EC_POINT *pub_key = NULL; + + if (!eckey) return 0; + + const EC_GROUP *group = EC_KEY_get0_group(eckey); + + if ((ctx = BN_CTX_new()) == NULL) + goto err; + + pub_key = EC_POINT_new(group); + + if (pub_key == NULL) + goto err; + + if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx)) + goto err; + + EC_KEY_set_private_key(eckey,priv_key); + EC_KEY_set_public_key(eckey,pub_key); + + ok = 1; + +err: + + if (pub_key) + EC_POINT_free(pub_key); + if (ctx != NULL) + BN_CTX_free(ctx); + + return(ok); +} + +// Perform ECDSA key recovery (see SEC1 4.1.6) for curves over (mod p)-fields +// recid selects which key is recovered +// if check is non-zero, additional checks are performed +int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned char *msg, int msglen, int recid, int check) +{ + if (!eckey) return 0; + + int ret = 0; + BN_CTX *ctx = NULL; + + BIGNUM *x = NULL; + BIGNUM *e = NULL; + BIGNUM *order = NULL; + BIGNUM *sor = NULL; + BIGNUM *eor = NULL; + BIGNUM *field = NULL; + EC_POINT *R = NULL; + EC_POINT *O = NULL; + EC_POINT *Q = NULL; + BIGNUM *rr = NULL; + BIGNUM *zero = NULL; + int n = 0; + int i = recid / 2; + + const EC_GROUP *group = EC_KEY_get0_group(eckey); + if ((ctx = BN_CTX_new()) == NULL) { ret = -1; goto err; } + BN_CTX_start(ctx); + order = BN_CTX_get(ctx); + if (!EC_GROUP_get_order(group, order, ctx)) { ret = -2; goto err; } + x = BN_CTX_get(ctx); + if (!BN_copy(x, order)) { ret=-1; goto err; } + if (!BN_mul_word(x, i)) { ret=-1; goto err; } + if (!BN_add(x, x, ecsig->r)) { ret=-1; goto err; } + field = BN_CTX_get(ctx); + if (!EC_GROUP_get_curve_GFp(group, field, NULL, NULL, ctx)) { ret=-2; goto err; } + if (BN_cmp(x, field) >= 0) { ret=0; goto err; } + if ((R = EC_POINT_new(group)) == NULL) { ret = -2; goto err; } + if (!EC_POINT_set_compressed_coordinates_GFp(group, R, x, recid % 2, ctx)) { ret=0; goto err; } + if (check) + { + if ((O = EC_POINT_new(group)) == NULL) { ret = -2; goto err; } + if (!EC_POINT_mul(group, O, NULL, R, order, ctx)) { ret=-2; goto err; } + if (!EC_POINT_is_at_infinity(group, O)) { ret = 0; goto err; } + } + if ((Q = EC_POINT_new(group)) == NULL) { ret = -2; goto err; } + n = EC_GROUP_get_degree(group); + e = BN_CTX_get(ctx); + if (!BN_bin2bn(msg, msglen, e)) { ret=-1; goto err; } + if (8*msglen > n) BN_rshift(e, e, 8-(n & 7)); + zero = BN_CTX_get(ctx); + if (!BN_zero(zero)) { ret=-1; goto err; } + if (!BN_mod_sub(e, zero, e, order, ctx)) { ret=-1; goto err; } + rr = BN_CTX_get(ctx); + if (!BN_mod_inverse(rr, ecsig->r, order, ctx)) { ret=-1; goto err; } + sor = BN_CTX_get(ctx); + if (!BN_mod_mul(sor, ecsig->s, rr, order, ctx)) { ret=-1; goto err; } + eor = BN_CTX_get(ctx); + if (!BN_mod_mul(eor, e, rr, order, ctx)) { ret=-1; goto err; } + if (!EC_POINT_mul(group, Q, eor, R, sor, ctx)) { ret=-2; goto err; } + if (!EC_KEY_set_public_key(eckey, Q)) { ret=-2; goto err; } + + ret = 1; + +err: + if (ctx) { + BN_CTX_end(ctx); + BN_CTX_free(ctx); + } + if (R != NULL) EC_POINT_free(R); + if (O != NULL) EC_POINT_free(O); + if (Q != NULL) EC_POINT_free(Q); + return ret; +} + +void CKey::SetCompressedPubKey() +{ + EC_KEY_set_conv_form(pkey, POINT_CONVERSION_COMPRESSED); + fCompressedPubKey = true; +} + +void CKey::Reset() +{ + fCompressedPubKey = false; + if (pkey != NULL) + EC_KEY_free(pkey); + pkey = EC_KEY_new_by_curve_name(NID_secp256k1); + if (pkey == NULL) + throw key_error("CKey::CKey() : EC_KEY_new_by_curve_name failed"); + fSet = false; +} + +CKey::CKey() +{ + pkey = NULL; + Reset(); +} + +CKey::CKey(const CKey& b) +{ + pkey = EC_KEY_dup(b.pkey); + if (pkey == NULL) + throw key_error("CKey::CKey(const CKey&) : EC_KEY_dup failed"); + fSet = b.fSet; +} + +CKey& CKey::operator=(const CKey& b) +{ + if (!EC_KEY_copy(pkey, b.pkey)) + throw key_error("CKey::operator=(const CKey&) : EC_KEY_copy failed"); + fSet = b.fSet; + return (*this); +} + +CKey::~CKey() +{ + EC_KEY_free(pkey); +} + +bool CKey::IsNull() const +{ + return !fSet; +} + +bool CKey::IsCompressed() const +{ + return fCompressedPubKey; +} + +void CKey::MakeNewKey(bool fCompressed) +{ + if (!EC_KEY_generate_key(pkey)) + throw key_error("CKey::MakeNewKey() : EC_KEY_generate_key failed"); + if (fCompressed) + SetCompressedPubKey(); + fSet = true; +} + +bool CKey::SetPrivKey(const CPrivKey& vchPrivKey) +{ + const unsigned char* pbegin = &vchPrivKey[0]; + if (d2i_ECPrivateKey(&pkey, &pbegin, vchPrivKey.size())) + { + // In testing, d2i_ECPrivateKey can return true + // but fill in pkey with a key that fails + // EC_KEY_check_key, so: + if (EC_KEY_check_key(pkey)) + { + fSet = true; + return true; + } + } + // If vchPrivKey data is bad d2i_ECPrivateKey() can + // leave pkey in a state where calling EC_KEY_free() + // crashes. To avoid that, set pkey to NULL and + // leak the memory (a leak is better than a crash) + pkey = NULL; + Reset(); + return false; +} + +bool CKey::SetSecret(const CSecret& vchSecret, bool fCompressed) +{ + EC_KEY_free(pkey); + pkey = EC_KEY_new_by_curve_name(NID_secp256k1); + if (pkey == NULL) + throw key_error("CKey::SetSecret() : EC_KEY_new_by_curve_name failed"); + if (vchSecret.size() != 32) + throw key_error("CKey::SetSecret() : secret must be 32 bytes"); + BIGNUM *bn = BN_bin2bn(&vchSecret[0],32,BN_new()); + if (bn == NULL) + throw key_error("CKey::SetSecret() : BN_bin2bn failed"); + if (!EC_KEY_regenerate_key(pkey,bn)) + { + BN_clear_free(bn); + throw key_error("CKey::SetSecret() : EC_KEY_regenerate_key failed"); + } + BN_clear_free(bn); + fSet = true; + if (fCompressed || fCompressedPubKey) + SetCompressedPubKey(); + return true; +} + +CSecret CKey::GetSecret(bool &fCompressed) const +{ + CSecret vchRet; + vchRet.resize(32); + const BIGNUM *bn = EC_KEY_get0_private_key(pkey); + int nBytes = BN_num_bytes(bn); + if (bn == NULL) + throw key_error("CKey::GetSecret() : EC_KEY_get0_private_key failed"); + int n=BN_bn2bin(bn,&vchRet[32 - nBytes]); + if (n != nBytes) + throw key_error("CKey::GetSecret(): BN_bn2bin failed"); + fCompressed = fCompressedPubKey; + return vchRet; +} + +CPrivKey CKey::GetPrivKey() const +{ + int nSize = i2d_ECPrivateKey(pkey, NULL); + if (!nSize) + throw key_error("CKey::GetPrivKey() : i2d_ECPrivateKey failed"); + CPrivKey vchPrivKey(nSize, 0); + unsigned char* pbegin = &vchPrivKey[0]; + if (i2d_ECPrivateKey(pkey, &pbegin) != nSize) + throw key_error("CKey::GetPrivKey() : i2d_ECPrivateKey returned unexpected size"); + return vchPrivKey; +} + +bool CKey::SetPubKey(const CPubKey& vchPubKey) +{ + const unsigned char* pbegin = &vchPubKey.vchPubKey[0]; + if (o2i_ECPublicKey(&pkey, &pbegin, vchPubKey.vchPubKey.size())) + { + fSet = true; + if (vchPubKey.vchPubKey.size() == 33) + SetCompressedPubKey(); + return true; + } + pkey = NULL; + Reset(); + return false; +} + +CPubKey CKey::GetPubKey() const +{ + int nSize = i2o_ECPublicKey(pkey, NULL); + if (!nSize) + throw key_error("CKey::GetPubKey() : i2o_ECPublicKey failed"); + std::vector vchPubKey(nSize, 0); + unsigned char* pbegin = &vchPubKey[0]; + if (i2o_ECPublicKey(pkey, &pbegin) != nSize) + throw key_error("CKey::GetPubKey() : i2o_ECPublicKey returned unexpected size"); + return CPubKey(vchPubKey); +} + +bool CKey::Sign(uint256 hash, std::vector& vchSig) +{ + 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; + } + vchSig.resize(nSize); // Shrink to fit actual size + return true; +} + +// create a compact signature (65 bytes), which allows reconstructing the used public key +// The format is one header byte, followed by two times 32 bytes for the serialized r and s values. +// The header byte: 0x1B = first key with even y, 0x1C = first key with odd y, +// 0x1D = second key with even y, 0x1E = second key with odd y +bool CKey::SignCompact(uint256 hash, std::vector& vchSig) +{ + bool fOk = false; + ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey); + if (sig==NULL) + return false; + vchSig.clear(); + vchSig.resize(65,0); + int nBitsR = BN_num_bits(sig->r); + int nBitsS = BN_num_bits(sig->s); + if (nBitsR <= 256 && nBitsS <= 256) + { + int nRecId = -1; + for (int i=0; i<4; i++) + { + CKey keyRec; + keyRec.fSet = true; + if (fCompressedPubKey) + keyRec.SetCompressedPubKey(); + if (ECDSA_SIG_recover_key_GFp(keyRec.pkey, sig, (unsigned char*)&hash, sizeof(hash), i, 1) == 1) + if (keyRec.GetPubKey() == this->GetPubKey()) + { + nRecId = i; + break; + } + } + + if (nRecId == -1) + 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]); + BN_bn2bin(sig->s,&vchSig[65-(nBitsS+7)/8]); + fOk = true; + } + ECDSA_SIG_free(sig); + return fOk; +} + +// reconstruct public key from a compact signature +// This is only slightly more CPU intensive than just verifying it. +// If this function succeeds, the recovered public key is guaranteed to be valid +// (the signature is a valid signature of the given data for that key) +bool CKey::SetCompactSignature(uint256 hash, const std::vector& vchSig) +{ + if (vchSig.size() != 65) + return false; + int nV = vchSig[0]; + if (nV<27 || nV>=35) + return false; + ECDSA_SIG *sig = ECDSA_SIG_new(); + BN_bin2bn(&vchSig[1],32,sig->r); + BN_bin2bn(&vchSig[33],32,sig->s); + + EC_KEY_free(pkey); + pkey = EC_KEY_new_by_curve_name(NID_secp256k1); + if (nV >= 31) + { + SetCompressedPubKey(); + nV -= 4; + } + if (ECDSA_SIG_recover_key_GFp(pkey, sig, (unsigned char*)&hash, sizeof(hash), nV - 27, 0) == 1) + { + fSet = true; + ECDSA_SIG_free(sig); + return true; + } + return false; +} + +bool CKey::Verify(uint256 hash, const std::vector& vchSig) +{ + // -1 = error, 0 = bad sig, 1 = good + if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1) + return false; + + return true; +} + +bool CKey::VerifyCompact(uint256 hash, const std::vector& vchSig) +{ + CKey key; + if (!key.SetCompactSignature(hash, vchSig)) + return false; + if (GetPubKey() != key.GetPubKey()) + return false; + + return true; +} + +bool CKey::IsValid() +{ + if (!fSet) + return false; + + if (!EC_KEY_check_key(pkey)) + return false; + + bool fCompr; + CSecret secret = GetSecret(fCompr); + CKey key2; + key2.SetSecret(secret, fCompr); + return GetPubKey() == key2.GetPubKey(); +} diff --git a/src/key.h b/src/key.h new file mode 100644 index 0000000..ed1f958 --- /dev/null +++ b/src/key.h @@ -0,0 +1,162 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_KEY_H +#define curecoin_KEY_H + +#include +#include + +#include "allocators.h" +#include "serialize.h" +#include "uint256.h" +#include "util.h" + +#include // for EC_KEY definition + +// secp160k1 +// const unsigned int PRIVATE_KEY_SIZE = 192; +// const unsigned int PUBLIC_KEY_SIZE = 41; +// const unsigned int SIGNATURE_SIZE = 48; +// +// secp192k1 +// const unsigned int PRIVATE_KEY_SIZE = 222; +// const unsigned int PUBLIC_KEY_SIZE = 49; +// const unsigned int SIGNATURE_SIZE = 57; +// +// secp224k1 +// const unsigned int PRIVATE_KEY_SIZE = 250; +// const unsigned int PUBLIC_KEY_SIZE = 57; +// const unsigned int SIGNATURE_SIZE = 66; +// +// secp256k1: +// const unsigned int PRIVATE_KEY_SIZE = 279; +// const unsigned int PUBLIC_KEY_SIZE = 65; +// const unsigned int SIGNATURE_SIZE = 72; +// +// see www.keylength.com +// script supports up to 75 for single byte push + +class key_error : public std::runtime_error +{ +public: + explicit key_error(const std::string& str) : std::runtime_error(str) {} +}; + +/** A reference to a CKey: the Hash160 of its serialized public key */ +class CKeyID : public uint160 +{ +public: + CKeyID() : uint160(0) { } + CKeyID(const uint160 &in) : uint160(in) { } +}; + +/** A reference to a CScript: the Hash160 of its serialization (see script.h) */ +class CScriptID : public uint160 +{ +public: + CScriptID() : uint160(0) { } + CScriptID(const uint160 &in) : uint160(in) { } +}; + +/** An encapsulated public key. */ +class CPubKey { +private: + std::vector vchPubKey; + friend class CKey; + +public: + CPubKey() { } + CPubKey(const std::vector &vchPubKeyIn) : vchPubKey(vchPubKeyIn) { } + friend bool operator==(const CPubKey &a, const CPubKey &b) { return a.vchPubKey == b.vchPubKey; } + friend bool operator!=(const CPubKey &a, const CPubKey &b) { return a.vchPubKey != b.vchPubKey; } + friend bool operator<(const CPubKey &a, const CPubKey &b) { return a.vchPubKey < b.vchPubKey; } + + IMPLEMENT_SERIALIZE( + READWRITE(vchPubKey); + ) + + CKeyID GetID() const { + return CKeyID(Hash160(vchPubKey)); + } + + uint256 GetHash() const { + return Hash(vchPubKey.begin(), vchPubKey.end()); + } + + bool IsValid() const { + return vchPubKey.size() == 33 || vchPubKey.size() == 65; + } + + bool IsCompressed() const { + return vchPubKey.size() == 33; + } + + std::vector Raw() const { + return vchPubKey; + } +}; + + +// secure_allocator is defined in allocators.h +// CPrivKey is a serialized private key, with all parameters included (279 bytes) +typedef std::vector > CPrivKey; +// CSecret is a serialization of just the secret parameter (32 bytes) +typedef std::vector > CSecret; + +/** An encapsulated OpenSSL Elliptic Curve key (public and/or private) */ +class CKey +{ +protected: + EC_KEY* pkey; + bool fSet; + bool fCompressedPubKey; + + void SetCompressedPubKey(); + +public: + + void Reset(); + + CKey(); + CKey(const CKey& b); + + CKey& operator=(const CKey& b); + + ~CKey(); + + bool IsNull() const; + bool IsCompressed() const; + + void MakeNewKey(bool fCompressed); + bool SetPrivKey(const CPrivKey& vchPrivKey); + bool SetSecret(const CSecret& vchSecret, bool fCompressed = false); + CSecret GetSecret(bool &fCompressed) const; + CPrivKey GetPrivKey() const; + bool SetPubKey(const CPubKey& vchPubKey); + CPubKey GetPubKey() const; + + bool Sign(uint256 hash, std::vector& vchSig); + + // create a compact signature (65 bytes), which allows reconstructing the used public key + // The format is one header byte, followed by two times 32 bytes for the serialized r and s values. + // The header byte: 0x1B = first key with even y, 0x1C = first key with odd y, + // 0x1D = second key with even y, 0x1E = second key with odd y + bool SignCompact(uint256 hash, std::vector& vchSig); + + // reconstruct public key from a compact signature + // This is only slightly more CPU intensive than just verifying it. + // If this function succeeds, the recovered public key is guaranteed to be valid + // (the signature is a valid signature of the given data for that key) + bool SetCompactSignature(uint256 hash, const std::vector& vchSig); + + bool Verify(uint256 hash, const std::vector& vchSig); + + // Verify a compact signature + bool VerifyCompact(uint256 hash, const std::vector& vchSig); + + bool IsValid(); +}; + +#endif diff --git a/src/keystore.cpp b/src/keystore.cpp new file mode 100644 index 0000000..2bdf89b --- /dev/null +++ b/src/keystore.cpp @@ -0,0 +1,221 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "keystore.h" +#include "script.h" + +bool CKeyStore::GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const +{ + CKey key; + if (!GetKey(address, key)) + return false; + vchPubKeyOut = key.GetPubKey(); + return true; +} + +bool CBasicKeyStore::AddKey(const CKey& key) +{ + bool fCompressed = false; + CSecret secret = key.GetSecret(fCompressed); + { + LOCK(cs_KeyStore); + mapKeys[key.GetPubKey().GetID()] = make_pair(secret, fCompressed); + } + return true; +} + +bool CBasicKeyStore::AddCScript(const CScript& redeemScript) +{ + { + LOCK(cs_KeyStore); + mapScripts[redeemScript.GetID()] = redeemScript; + } + return true; +} + +bool CBasicKeyStore::HaveCScript(const CScriptID& hash) const +{ + bool result; + { + LOCK(cs_KeyStore); + result = (mapScripts.count(hash) > 0); + } + return result; +} + + +bool CBasicKeyStore::GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const +{ + { + LOCK(cs_KeyStore); + ScriptMap::const_iterator mi = mapScripts.find(hash); + if (mi != mapScripts.end()) + { + redeemScriptOut = (*mi).second; + return true; + } + } + return false; +} + +bool CCryptoKeyStore::SetCrypted() +{ + { + LOCK(cs_KeyStore); + if (fUseCrypto) + return true; + if (!mapKeys.empty()) + return false; + fUseCrypto = true; + } + return true; +} + +bool CCryptoKeyStore::Lock() +{ + if (!SetCrypted()) + return false; + + { + LOCK(cs_KeyStore); + vMasterKey.clear(); + } + + NotifyStatusChanged(this); + return true; +} + +bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn) +{ + { + LOCK(cs_KeyStore); + if (!SetCrypted()) + return false; + + CryptedKeyMap::const_iterator mi = mapCryptedKeys.begin(); + for (; mi != mapCryptedKeys.end(); ++mi) + { + const CPubKey &vchPubKey = (*mi).second.first; + const std::vector &vchCryptedSecret = (*mi).second.second; + CSecret vchSecret; + if(!DecryptSecret(vMasterKeyIn, vchCryptedSecret, vchPubKey.GetHash(), vchSecret)) + return false; + if (vchSecret.size() != 32) + return false; + CKey key; + key.SetPubKey(vchPubKey); + key.SetSecret(vchSecret); + if (key.GetPubKey() == vchPubKey) + break; + return false; + } + vMasterKey = vMasterKeyIn; + } + NotifyStatusChanged(this); + return true; +} + +bool CCryptoKeyStore::AddKey(const CKey& key) +{ + { + LOCK(cs_KeyStore); + if (!IsCrypted()) + return CBasicKeyStore::AddKey(key); + + if (IsLocked()) + return false; + + std::vector vchCryptedSecret; + CPubKey vchPubKey = key.GetPubKey(); + bool fCompressed; + if (!EncryptSecret(vMasterKey, key.GetSecret(fCompressed), vchPubKey.GetHash(), vchCryptedSecret)) + return false; + + if (!AddCryptedKey(key.GetPubKey(), vchCryptedSecret)) + return false; + } + return true; +} + + +bool CCryptoKeyStore::AddCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret) +{ + { + LOCK(cs_KeyStore); + if (!SetCrypted()) + return false; + + mapCryptedKeys[vchPubKey.GetID()] = make_pair(vchPubKey, vchCryptedSecret); + } + return true; +} + +bool CCryptoKeyStore::GetKey(const CKeyID &address, CKey& keyOut) const +{ + { + LOCK(cs_KeyStore); + if (!IsCrypted()) + return CBasicKeyStore::GetKey(address, keyOut); + + CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address); + if (mi != mapCryptedKeys.end()) + { + const CPubKey &vchPubKey = (*mi).second.first; + const std::vector &vchCryptedSecret = (*mi).second.second; + CSecret vchSecret; + if (!DecryptSecret(vMasterKey, vchCryptedSecret, vchPubKey.GetHash(), vchSecret)) + return false; + if (vchSecret.size() != 32) + return false; + keyOut.SetPubKey(vchPubKey); + keyOut.SetSecret(vchSecret); + return true; + } + } + return false; +} + +bool CCryptoKeyStore::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const +{ + { + LOCK(cs_KeyStore); + if (!IsCrypted()) + return CKeyStore::GetPubKey(address, vchPubKeyOut); + + CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address); + if (mi != mapCryptedKeys.end()) + { + vchPubKeyOut = (*mi).second.first; + return true; + } + } + return false; +} + +bool CCryptoKeyStore::EncryptKeys(CKeyingMaterial& vMasterKeyIn) +{ + { + LOCK(cs_KeyStore); + if (!mapCryptedKeys.empty() || IsCrypted()) + return false; + + fUseCrypto = true; + BOOST_FOREACH(KeyMap::value_type& mKey, mapKeys) + { + CKey key; + if (!key.SetSecret(mKey.second.first, mKey.second.second)) + return false; + const CPubKey vchPubKey = key.GetPubKey(); + std::vector vchCryptedSecret; + bool fCompressed; + if (!EncryptSecret(vMasterKeyIn, key.GetSecret(fCompressed), vchPubKey.GetHash(), vchCryptedSecret)) + return false; + if (!AddCryptedKey(vchPubKey, vchCryptedSecret)) + return false; + } + mapKeys.clear(); + } + return true; +} diff --git a/src/keystore.h b/src/keystore.h new file mode 100644 index 0000000..e851e09 --- /dev/null +++ b/src/keystore.h @@ -0,0 +1,184 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_KEYSTORE_H +#define curecoin_KEYSTORE_H + +#include "crypter.h" +#include "sync.h" +#include + +class CScript; + +/** A virtual base class for key stores */ +class CKeyStore +{ +protected: + mutable CCriticalSection cs_KeyStore; + +public: + virtual ~CKeyStore() {} + + // Add a key to the store. + virtual bool AddKey(const CKey& key) =0; + + // Check whether a key corresponding to a given address is present in the store. + virtual bool HaveKey(const CKeyID &address) const =0; + virtual bool GetKey(const CKeyID &address, CKey& keyOut) const =0; + virtual void GetKeys(std::set &setAddress) const =0; + virtual bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const; + + // Support for BIP 0013 : see https://en.curecoin.it/wiki/BIP_0013 + virtual bool AddCScript(const CScript& redeemScript) =0; + virtual bool HaveCScript(const CScriptID &hash) const =0; + virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const =0; + + virtual bool GetSecret(const CKeyID &address, CSecret& vchSecret, bool &fCompressed) const + { + CKey key; + if (!GetKey(address, key)) + return false; + vchSecret = key.GetSecret(fCompressed); + return true; + } +}; + +typedef std::map > KeyMap; +typedef std::map ScriptMap; + +/** Basic key store, that keeps keys in an address->secret map */ +class CBasicKeyStore : public CKeyStore +{ +protected: + KeyMap mapKeys; + ScriptMap mapScripts; + +public: + bool AddKey(const CKey& key); + bool HaveKey(const CKeyID &address) const + { + bool result; + { + LOCK(cs_KeyStore); + result = (mapKeys.count(address) > 0); + } + return result; + } + void GetKeys(std::set &setAddress) const + { + setAddress.clear(); + { + LOCK(cs_KeyStore); + KeyMap::const_iterator mi = mapKeys.begin(); + while (mi != mapKeys.end()) + { + setAddress.insert((*mi).first); + mi++; + } + } + } + bool GetKey(const CKeyID &address, CKey &keyOut) const + { + { + LOCK(cs_KeyStore); + KeyMap::const_iterator mi = mapKeys.find(address); + if (mi != mapKeys.end()) + { + keyOut.Reset(); + keyOut.SetSecret((*mi).second.first, (*mi).second.second); + return true; + } + } + return false; + } + virtual bool AddCScript(const CScript& redeemScript); + virtual bool HaveCScript(const CScriptID &hash) const; + virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const; +}; + +typedef std::map > > CryptedKeyMap; + +/** Keystore which keeps the private keys encrypted. + * It derives from the basic key store, which is used if no encryption is active. + */ +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: + bool SetCrypted(); + + // will encrypt previously unencrypted keys + bool EncryptKeys(CKeyingMaterial& vMasterKeyIn); + + bool Unlock(const CKeyingMaterial& vMasterKeyIn); + +public: + CCryptoKeyStore() : fUseCrypto(false) + { + } + + bool IsCrypted() const + { + return fUseCrypto; + } + + bool IsLocked() const + { + if (!IsCrypted()) + return false; + bool result; + { + LOCK(cs_KeyStore); + result = vMasterKey.empty(); + } + return result; + } + + bool Lock(); + + virtual bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector &vchCryptedSecret); + bool AddKey(const CKey& key); + bool HaveKey(const CKeyID &address) const + { + { + LOCK(cs_KeyStore); + if (!IsCrypted()) + return CBasicKeyStore::HaveKey(address); + return mapCryptedKeys.count(address) > 0; + } + return false; + } + bool GetKey(const CKeyID &address, CKey& keyOut) const; + bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const; + void GetKeys(std::set &setAddress) const + { + if (!IsCrypted()) + { + CBasicKeyStore::GetKeys(setAddress); + return; + } + setAddress.clear(); + CryptedKeyMap::const_iterator mi = mapCryptedKeys.begin(); + while (mi != mapCryptedKeys.end()) + { + setAddress.insert((*mi).first); + mi++; + } + } + + /* Wallet status (encrypted, locked) changed. + * Note: Called without locks held. + */ + boost::signals2::signal NotifyStatusChanged; +}; + +#endif diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..5c29a63 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,4674 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "alert.h" +#include "checkpoints.h" +#include "db.h" +#include "net.h" +#include "init.h" +#include "ui_interface.h" +#include "kernel.h" +#include +#include +#include + +using namespace std; +using namespace boost; + +const bool IsCalculatingGenesisBlockHash = false; + +// +// Global state +// + +CCriticalSection cs_setpwalletRegistered; +set setpwalletRegistered; + +CCriticalSection cs_main; + +CTxMemPool mempool; +unsigned int nTransactionsUpdated = 0; + +map mapBlockIndex; +set > setStakeSeen; +uint256 hashGenesisBlock = hashGenesisBlockOfficial; +static CBigNum bnProofOfWorkLimit(~uint256(0) >> 20); +static CBigNum bnProofOfStakeLimit(~uint256(0) >> 24); +static CBigNum bnProofOfStakeHardLimit(~uint256(0) >> 30); + + +static CBigNum bnProofOfWorkLimitTestNet(~uint256(0) >> 16); +static CBigNum bnProofOfStakeLimitTestNet(~uint256(0) >> 20); + +unsigned int nStakeMinAge = 60 * 60 * 24 * 30; // minimum age for coin age +unsigned int nStakeMaxAge = 60 * 60 * 24 * 90; // stake age of full weight +unsigned int nStakeTargetSpacing = 1 * 600; // 600 seconds block spacing +const int64 nChainStartTime = 1398151422; +const int64 nTestNetStartTime = nChainStartTime; +int nCoinbaseMaturity = 10; // mining need 30 confirm +CBlockIndex* pindexGenesisBlock = NULL; +int nBestHeight = -1; +CBigNum bnBestChainTrust = 0; +CBigNum bnBestInvalidTrust = 0; +uint256 hashBestChain = 0; +CBlockIndex* pindexBest = NULL; +int64 nTimeBestReceived = 0; + +CMedianFilter cPeerBlockCounts(5, 0); // Amount of blocks that other nodes claim to have + +map mapOrphanBlocks; +multimap mapOrphanBlocksByPrev; +set > setStakeSeenOrphan; +map mapProofOfStake; + +map mapOrphanTransactions; +map > mapOrphanTransactionsByPrev; + +// Constant stuff for coinbase transactions we create: +CScript COINBASE_FLAGS; + +const string strMessageMagic = "curecoin Signed Message:\n"; + +double dHashesPerSec; +int64 nHPSTimerStart; + +// Settings +int64 nTransactionFee = MIN_TX_FEE; + + + + +////////////////////////////////////////////////////////////////////////////// +// +// dispatching functions +// + +// These functions dispatch to one or all registered wallets + + +void RegisterWallet(CWallet* pwalletIn) +{ + { + LOCK(cs_setpwalletRegistered); + setpwalletRegistered.insert(pwalletIn); + } +} + +void UnregisterWallet(CWallet* pwalletIn) +{ + { + LOCK(cs_setpwalletRegistered); + setpwalletRegistered.erase(pwalletIn); + } +} + +// check whether the passed transaction is from us +bool static IsFromMe(CTransaction& tx) +{ + BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) + if (pwallet->IsFromMe(tx)) + return true; + return false; +} + +// get the wallet transaction with the given hash (if it exists) +bool static GetTransaction(const uint256& hashTx, CWalletTx& wtx) +{ + BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) + if (pwallet->GetTransaction(hashTx,wtx)) + return true; + return false; +} + +// erases transaction with the given hash from all wallets +void static EraseFromWallets(uint256 hash) +{ + BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) + pwallet->EraseFromWallet(hash); +} + +// make sure all wallets know about the given transaction, in the given block +void SyncWithWallets(const CTransaction& tx, const CBlock* pblock, bool fUpdate, bool fConnect) +{ + if (!fConnect) + { + // ppcoin: wallets need to refund inputs when disconnecting coinstake + if (tx.IsCoinStake()) + { + BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) + if (pwallet->IsFromMe(tx)) + pwallet->DisableTransaction(tx); + } + return; + } + + BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) + pwallet->AddToWalletIfInvolvingMe(tx, pblock, fUpdate); +} + +// notify wallets about a new best chain +void static SetBestChain(const CBlockLocator& loc) +{ + BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) + pwallet->SetBestChain(loc); +} + +// notify wallets about an updated transaction +void static UpdatedTransaction(const uint256& hashTx) +{ + BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) + pwallet->UpdatedTransaction(hashTx); +} + +// dump all wallets +void static PrintWallets(const CBlock& block) +{ + BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) + pwallet->PrintWallet(block); +} + +// notify wallets about an incoming inventory (for request counts) +void static Inventory(const uint256& hash) +{ + BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) + pwallet->Inventory(hash); +} + +// ask wallets to resend their transactions +void ResendWalletTransactions() +{ + BOOST_FOREACH(CWallet* pwallet, setpwalletRegistered) + pwallet->ResendWalletTransactions(); +} + + + + + + + +////////////////////////////////////////////////////////////////////////////// +// +// mapOrphanTransactions +// + +bool AddOrphanTx(const CDataStream& vMsg) +{ + 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 + // it will rebroadcast it later, after the parent transaction(s) + // 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) + { + printf("ignoring large orphan tx (size: %"PRIszu", hash: %s)\n", pvMsg->size(), hash.ToString().substr(0,10).c_str()); + delete pvMsg; + return false; + } + + mapOrphanTransactions[hash] = pvMsg; + BOOST_FOREACH(const CTxIn& txin, tx.vin) + mapOrphanTransactionsByPrev[txin.prevout.hash].insert(make_pair(hash, pvMsg)); + + printf("stored orphan tx %s (mapsz %"PRIszu")\n", hash.ToString().substr(0,10).c_str(), + mapOrphanTransactions.size()); + return true; +} + +void static EraseOrphanTx(uint256 hash) +{ + if (!mapOrphanTransactions.count(hash)) + return; + const CDataStream* pvMsg = mapOrphanTransactions[hash]; + CTransaction tx; + CDataStream(*pvMsg) >> tx; + 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); +} + +unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) +{ + unsigned int nEvicted = 0; + while (mapOrphanTransactions.size() > nMaxOrphans) + { + // Evict a random orphan: + uint256 randomhash = GetRandHash(); + map::iterator it = mapOrphanTransactions.lower_bound(randomhash); + if (it == mapOrphanTransactions.end()) + it = mapOrphanTransactions.begin(); + EraseOrphanTx(it->first); + ++nEvicted; + } + return nEvicted; +} + + + + + + + +////////////////////////////////////////////////////////////////////////////// +// +// CTransaction and CTxIndex +// + +bool CTransaction::ReadFromDisk(CTxDB& txdb, COutPoint prevout, CTxIndex& txindexRet) +{ + SetNull(); + if (!txdb.ReadTxIndex(prevout.hash, txindexRet)) + return false; + if (!ReadFromDisk(txindexRet.pos)) + return false; + if (prevout.n >= vout.size()) + { + SetNull(); + return false; + } + return true; +} + +bool CTransaction::ReadFromDisk(CTxDB& txdb, COutPoint prevout) +{ + CTxIndex txindex; + return ReadFromDisk(txdb, prevout, txindex); +} + +bool CTransaction::ReadFromDisk(COutPoint prevout) +{ + CTxDB txdb("r"); + CTxIndex txindex; + return ReadFromDisk(txdb, prevout, txindex); +} + +bool CTransaction::IsStandard() const +{ + if (nVersion > CTransaction::CURRENT_VERSION) + return false; + // Disallow large transaction comments + if (strTxComment.length() > MAX_TX_COMMENT_LEN) + return false; + + BOOST_FOREACH(const CTxIn& txin, vin) + { + // Biggest 'standard' txin is a 3-signature 3-of-3 CHECKMULTISIG + // pay-to-script-hash, which is 3 ~80-byte signatures, 3 + // ~65-byte public keys, plus a few script ops. + if (txin.scriptSig.size() > 500) + return false; + if (!txin.scriptSig.IsPushOnly()) + return false; + } + BOOST_FOREACH(const CTxOut& txout, vout) { + if (!::IsStandard(txout.scriptPubKey)) + return false; + if (txout.nValue == 0) + return false; + } + return true; +} + +// +// Check transaction inputs, and make sure any +// pay-to-script-hash transactions are evaluating IsStandard scripts +// +// Why bother? To avoid denial-of-service attacks; an attacker +// can submit a standard HASH... OP_EQUAL transaction, +// which will get accepted into blocks. The redemption +// script can be anything; an attacker could use a very +// expensive-to-check-upon-redemption script like: +// DUP CHECKSIG DROP ... repeated 100 times... OP_1 +// +bool CTransaction::AreInputsStandard(const MapPrevTx& mapInputs) const +{ + if (IsCoinBase()) + return true; // Coinbases don't use vin normally + + for (unsigned int i = 0; i < vin.size(); i++) + { + const CTxOut& prev = GetOutputFor(vin[i], mapInputs); + + vector > vSolutions; + txnouttype whichType; + // get the scriptPubKey corresponding to this input: + const CScript& prevScript = prev.scriptPubKey; + if (!Solver(prevScript, whichType, vSolutions)) + return false; + int nArgsExpected = ScriptSigArgsExpected(whichType, vSolutions); + if (nArgsExpected < 0) + return false; + + // Transactions with extra stuff in their scriptSigs are + // non-standard. Note that this EvalScript() call will + // be quick, because if there are any operations + // beside "push data" in the scriptSig the + // IsStandard() call returns false + vector > stack; + if (!EvalScript(stack, vin[i].scriptSig, *this, i, 0)) + return false; + + if (whichType == TX_SCRIPTHASH) + { + if (stack.empty()) + return false; + CScript subscript(stack.back().begin(), stack.back().end()); + vector > vSolutions2; + txnouttype whichType2; + if (!Solver(subscript, whichType2, vSolutions2)) + return false; + if (whichType2 == TX_SCRIPTHASH) + return false; + + int tmpExpected; + tmpExpected = ScriptSigArgsExpected(whichType2, vSolutions2); + if (tmpExpected < 0) + return false; + nArgsExpected += tmpExpected; + } + + if (stack.size() != (unsigned int)nArgsExpected) + return false; + } + + return true; +} + +unsigned int +CTransaction::GetLegacySigOpCount() const +{ + unsigned int nSigOps = 0; + BOOST_FOREACH(const CTxIn& txin, vin) + { + nSigOps += txin.scriptSig.GetSigOpCount(false); + } + BOOST_FOREACH(const CTxOut& txout, vout) + { + nSigOps += txout.scriptPubKey.GetSigOpCount(false); + } + return nSigOps; +} + + +int CMerkleTx::SetMerkleBranch(const CBlock* pblock) +{ + if (fClient) + { + if (hashBlock == 0) + return 0; + } + else + { + CBlock blockTmp; + if (pblock == NULL) + { + // Load the block this tx is in + CTxIndex txindex; + if (!CTxDB("r").ReadTxIndex(GetHash(), txindex)) + return 0; + if (!blockTmp.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos)) + return 0; + pblock = &blockTmp; + } + + // Update the tx's hashBlock + hashBlock = pblock->GetHash(); + + // Locate the transaction + for (nIndex = 0; nIndex < (int)pblock->vtx.size(); nIndex++) + if (pblock->vtx[nIndex] == *(CTransaction*)this) + break; + if (nIndex == (int)pblock->vtx.size()) + { + vMerkleBranch.clear(); + nIndex = -1; + printf("ERROR: SetMerkleBranch() : couldn't find tx in block\n"); + return 0; + } + + // Fill in merkle branch + vMerkleBranch = pblock->GetMerkleBranch(nIndex); + } + + // Is the tx in a block that's in the main chain + map::iterator mi = mapBlockIndex.find(hashBlock); + if (mi == mapBlockIndex.end()) + return 0; + CBlockIndex* pindex = (*mi).second; + if (!pindex || !pindex->IsInMainChain()) + return 0; + + return pindexBest->nHeight - pindex->nHeight + 1; +} + + + + + + + +bool CTransaction::CheckTransaction() const +{ + // Basic checks that don't depend on any context + if (vin.empty()) + return DoS(10, error("CTransaction::CheckTransaction() : vin empty")); + if (vout.empty()) + return DoS(10, error("CTransaction::CheckTransaction() : vout empty")); + // Size limits + if (::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE) + return DoS(100, error("CTransaction::CheckTransaction() : size limits failed")); + + // Check for negative or overflow output values + int64 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")); + + // ppcoin: 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 > MAX_MONEY) + return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue too high")); + nValueOut += txout.nValue; + if (!MoneyRange(nValueOut)) + return DoS(100, error("CTransaction::CheckTransaction() : txout total out of range")); + } + + // Check for duplicate inputs + set vInOutPoints; + BOOST_FOREACH(const CTxIn& txin, vin) + { + if (vInOutPoints.count(txin.prevout)) + return false; + vInOutPoints.insert(txin.prevout); + } + + if (IsCoinBase()) + { + if (vin[0].scriptSig.size() < 2 || vin[0].scriptSig.size() > 100) + return DoS(100, error("CTransaction::CheckTransaction() : coinbase script size")); + } + else + { + BOOST_FOREACH(const CTxIn& txin, vin) + if (txin.prevout.IsNull()) + return DoS(10, error("CTransaction::CheckTransaction() : prevout is null")); + } + + return true; +} + +int64 CTransaction::GetMinFee(unsigned int nBlockSize, bool fAllowFree, + enum GetMinFee_mode mode) 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; + + unsigned int nBytes = ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION); + unsigned int nNewBlockSize = nBlockSize + nBytes; + int64 nMinFee = (1 + (int64)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) + { + BOOST_FOREACH(const CTxOut& txout, vout) + if (txout.nValue < CENT) + nMinFee = nBaseFee; + } + + // Raise the price as the block approaches full + if (nBlockSize != 1 && nNewBlockSize >= MAX_BLOCK_SIZE_GEN/2) + { + if (nNewBlockSize >= MAX_BLOCK_SIZE_GEN) + return MAX_MONEY; + nMinFee *= MAX_BLOCK_SIZE_GEN / (MAX_BLOCK_SIZE_GEN - nNewBlockSize); + } + + if (!MoneyRange(nMinFee)) + nMinFee = MAX_MONEY; + return nMinFee; +} + + +bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, + bool* pfMissingInputs) +{ + if (pfMissingInputs) + *pfMissingInputs = false; + + if (!tx.CheckTransaction()) + return error("CTxMemPool::accept() : CheckTransaction failed"); + + // Coinbase is only valid in a block, not as a loose transaction + if (tx.IsCoinBase()) + return tx.DoS(100, error("CTxMemPool::accept() : coinbase as individual tx")); + + // ppcoin: coinstake is also only valid in a block, not as a loose transaction + if (tx.IsCoinStake()) + 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()) + 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"); + + // Do we already have it? + uint256 hash = tx.GetHash(); + { + LOCK(cs); + if (mapTx.count(hash)) + return false; + } + if (fCheckInputs) + if (txdb.ContainsTx(hash)) + return false; + + // Check for conflicts with in-memory transactions + CTransaction* ptxOld = NULL; + for (unsigned int i = 0; i < tx.vin.size(); i++) + { + COutPoint outpoint = tx.vin[i].prevout; + if (mapNextTx.count(outpoint)) + { + // Disable replacement feature for now + return false; + + // Allow replacing with a newer version of the same transaction + if (i != 0) + return false; + ptxOld = mapNextTx[outpoint].ptx; + if (ptxOld->IsFinal()) + return false; + if (!tx.IsNewerThan(*ptxOld)) + return false; + for (unsigned int i = 0; i < tx.vin.size(); i++) + { + COutPoint outpoint = tx.vin[i].prevout; + if (!mapNextTx.count(outpoint) || mapNextTx[outpoint].ptx != ptxOld) + return false; + } + break; + } + } + + if (fCheckInputs) + { + MapPrevTx mapInputs; + map mapUnused; + bool fInvalid = false; + if (!tx.FetchInputs(txdb, mapUnused, false, false, mapInputs, fInvalid)) + { + if (fInvalid) + return error("CTxMemPool::accept() : FetchInputs found invalid tx %s", hash.ToString().substr(0,10).c_str()); + if (pfMissingInputs) + *pfMissingInputs = true; + return false; + } + + // Check for non-standard pay-to-script-hash in inputs + if (!tx.AreInputsStandard(mapInputs) && !fTestNet) + return error("CTxMemPool::accept() : nonstandard transaction input"); + + // Note: if you modify this code to accept non-standard transactions, then + // 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(); + 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); + if (nFees < txMinFee) + return error("CTxMemPool::accept() : not enough fees %s, %"PRI64d" < %"PRI64d, + hash.ToString().c_str(), + nFees, txMinFee); + + // Continuously rate-limit free transactions + // This mitigates 'penny-flooding' -- sending thousands of free transactions just to + // be annoying or make others' transactions take longer to confirm. + if (nFees < MIN_RELAY_TX_FEE) + { + static CCriticalSection cs; + static double dFreeCount; + static int64 nLastTime; + int64 nNow = GetTime(); + + { + LOCK(cs); + // Use an exponentially decaying ~10-minute window: + dFreeCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime)); + nLastTime = nNow; + // -limitfreerelay unit is thousand-bytes-per-minute + // At default rate it would take over a month to fill 1GB + if (dFreeCount > GetArg("-limitfreerelay", 15)*10*1000 && !IsFromMe(tx)) + return error("CTxMemPool::accept() : free transaction rejected by rate limiter"); + if (fDebug) + printf("Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize); + dFreeCount += nSize; + } + } + + // Check against previous transactions + // This is done last to help prevent CPU exhaustion denial-of-service attacks. + if (!tx.ConnectInputs(txdb, mapInputs, mapUnused, CDiskTxPos(1,1,1), pindexBest, false, false)) + { + return error("CTxMemPool::accept() : ConnectInputs failed %s", hash.ToString().substr(0,10).c_str()); + } + } + + // Store transaction in memory + { + LOCK(cs); + if (ptxOld) + { + printf("CTxMemPool::accept() : replacing tx %s with new version\n", ptxOld->GetHash().ToString().c_str()); + remove(*ptxOld); + } + addUnchecked(hash, tx); + } + + ///// are we sure this is ok when loading transactions or restoring block txes + // If updated, erase old tx from wallet + if (ptxOld) + EraseFromWallets(ptxOld->GetHash()); + + printf("CTxMemPool::accept() : accepted %s (poolsz %"PRIszu")\n", + hash.ToString().substr(0,10).c_str(), + mapTx.size()); + return true; +} + +bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMissingInputs) +{ + return mempool.accept(txdb, *this, fCheckInputs, pfMissingInputs); +} + +bool CTxMemPool::addUnchecked(const uint256& hash, CTransaction &tx) +{ + // Add to memory pool without checking anything. Don't call this directly, + // call CTxMemPool::accept to properly check the transaction first. + { + mapTx[hash] = tx; + for (unsigned int i = 0; i < tx.vin.size(); i++) + mapNextTx[tx.vin[i].prevout] = CInPoint(&mapTx[hash], i); + nTransactionsUpdated++; + } + return true; +} + + +bool CTxMemPool::remove(CTransaction &tx) +{ + // Remove transaction from memory pool + { + LOCK(cs); + uint256 hash = tx.GetHash(); + if (mapTx.count(hash)) + { + BOOST_FOREACH(const CTxIn& txin, tx.vin) + mapNextTx.erase(txin.prevout); + mapTx.erase(hash); + nTransactionsUpdated++; + } + } + return true; +} + +void CTxMemPool::clear() +{ + LOCK(cs); + mapTx.clear(); + mapNextTx.clear(); + ++nTransactionsUpdated; +} + +void CTxMemPool::queryHashes(std::vector& vtxid) +{ + vtxid.clear(); + + LOCK(cs); + vtxid.reserve(mapTx.size()); + for (map::iterator mi = mapTx.begin(); mi != mapTx.end(); ++mi) + vtxid.push_back((*mi).first); +} + + + + +int CMerkleTx::GetDepthInMainChain(CBlockIndex* &pindexRet) const +{ + if (hashBlock == 0 || nIndex == -1) + return 0; + + // Find the block it claims to be in + map::iterator mi = mapBlockIndex.find(hashBlock); + if (mi == mapBlockIndex.end()) + return 0; + CBlockIndex* pindex = (*mi).second; + if (!pindex || !pindex->IsInMainChain()) + return 0; + + // Make sure the merkle branch connects to this block + if (!fMerkleVerified) + { + if (CBlock::CheckMerkleBranch(GetHash(), vMerkleBranch, nIndex) != pindex->hashMerkleRoot) + return 0; + fMerkleVerified = true; + } + + pindexRet = pindex; + return pindexBest->nHeight - pindex->nHeight + 1; +} + + +int CMerkleTx::GetBlocksToMaturity() const +{ + if (!(IsCoinBase() || IsCoinStake())) + return 0; + return max(0, (nCoinbaseMaturity+20) - GetDepthInMainChain()); +} + + +bool CMerkleTx::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs) +{ + if (fClient) + { + if (!IsInMainChain() && !ClientConnectInputs()) + return false; + return CTransaction::AcceptToMemoryPool(txdb, false); + } + else + { + return CTransaction::AcceptToMemoryPool(txdb, fCheckInputs); + } +} + +bool CMerkleTx::AcceptToMemoryPool() +{ + CTxDB txdb("r"); + return AcceptToMemoryPool(txdb); +} + + + +bool CWalletTx::AcceptWalletTransaction(CTxDB& txdb, bool fCheckInputs) +{ + + { + LOCK(mempool.cs); + // Add previous supporting transactions first + BOOST_FOREACH(CMerkleTx& tx, vtxPrev) + { + if (!(tx.IsCoinBase() || tx.IsCoinStake())) + { + uint256 hash = tx.GetHash(); + if (!mempool.exists(hash) && !txdb.ContainsTx(hash)) + tx.AcceptToMemoryPool(txdb, fCheckInputs); + } + } + return AcceptToMemoryPool(txdb, fCheckInputs); + } + return false; +} + +bool CWalletTx::AcceptWalletTransaction() +{ + CTxDB txdb("r"); + return AcceptWalletTransaction(txdb); +} + +int CTxIndex::GetDepthInMainChain() const +{ + // Read block header + CBlock block; + if (!block.ReadFromDisk(pos.nFile, pos.nBlockPos, false)) + return 0; + // Find the block in the index + map::iterator mi = mapBlockIndex.find(block.GetHash()); + if (mi == mapBlockIndex.end()) + return 0; + CBlockIndex* pindex = (*mi).second; + if (!pindex || !pindex->IsInMainChain()) + return 0; + return 1 + nBestHeight - pindex->nHeight; +} + +// Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock +bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock) +{ + { + LOCK(cs_main); + { + LOCK(mempool.cs); + if (mempool.exists(hash)) + { + tx = mempool.lookup(hash); + return true; + } + } + CTxDB txdb("r"); + CTxIndex txindex; + if (tx.ReadFromDisk(txdb, COutPoint(hash, 0), txindex)) + { + CBlock block; + if (block.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos, false)) + hashBlock = block.GetHash(); + return true; + } + } + return false; +} + + + + + + + + +////////////////////////////////////////////////////////////////////////////// +// +// CBlock and CBlockIndex +// + +static CBlockIndex* pblockindexFBBHLast; +CBlockIndex* FindBlockByHeight(int nHeight) +{ + CBlockIndex *pblockindex; + if (nHeight < nBestHeight / 2) + pblockindex = pindexGenesisBlock; + else + pblockindex = pindexBest; + if (pblockindexFBBHLast && abs(nHeight - pblockindex->nHeight) > abs(nHeight - pblockindexFBBHLast->nHeight)) + pblockindex = pblockindexFBBHLast; + while (pblockindex->nHeight > nHeight) + pblockindex = pblockindex->pprev; + while (pblockindex->nHeight < nHeight) + pblockindex = pblockindex->pnext; + pblockindexFBBHLast = pblockindex; + return pblockindex; +} + +bool CBlock::ReadFromDisk(const CBlockIndex* pindex, bool fReadTransactions) +{ + if (!fReadTransactions) + { + *this = pindex->GetBlockHeader(); + return true; + } + if (!ReadFromDisk(pindex->nFile, pindex->nBlockPos, fReadTransactions)) + return false; + if (GetHash() != pindex->GetBlockHash()) + return error("CBlock::ReadFromDisk() : GetHash() doesn't match index"); + return true; +} + +uint256 static GetOrphanRoot(const CBlock* pblock) +{ + // Work back to the first block in the orphan chain + while (mapOrphanBlocks.count(pblock->hashPrevBlock)) + pblock = mapOrphanBlocks[pblock->hashPrevBlock]; + return pblock->GetHash(); +} + +// ppcoin: find block wanted by given orphan block +uint256 WantedByOrphan(const CBlock* pblockOrphan) +{ + // Work back to the first block in the orphan chain + while (mapOrphanBlocks.count(pblockOrphan->hashPrevBlock)) + pblockOrphan = mapOrphanBlocks[pblockOrphan->hashPrevBlock]; + return pblockOrphan->hashPrevBlock; +} + +// miner's coin base reward based on nBits +int64 GetProofOfWorkReward(int nHeight, int64 nFees, uint256 prevHash) +{ + int64 nSubsidy = MAX_MINT_PROOF_OF_WORK; + + if (nHeight == 1){ + nSubsidy = 23226285 * COIN; + } + else if (nHeight < 210240){ + nSubsidy = 13 * COIN; + } + else if (nHeight < 420480){ + nSubsidy = 6.5 * COIN; + } + else if (nHeight < 630720){ + nSubsidy = 3.25 * COIN; + } + else if (nHeight < 840960){ + nSubsidy = 1.625 * COIN; + } + else if (nHeight < 1051200){ + nSubsidy = 0.8125 * COIN; + } + else if (nHeight < 1261440){ + nSubsidy = 0.40625 * COIN; + } + else if (nHeight < 1471680){ + nSubsidy = 0.203125 * COIN; + } + else if (nHeight < 1681920){ + nSubsidy = 0.101562 * COIN; + } + else if (nHeight < 1892160){ + nSubsidy = 0.050781 * COIN; + } + else if (nHeight < 2102400){ + nSubsidy = 0.025390 * COIN; + } + else if (nHeight < 2312640){ + nSubsidy = 0.012695 * COIN; + } + else if (nHeight < 2522880){ + nSubsidy = 0.006347 * COIN; + } + else if (nHeight < 2733120){ + nSubsidy = 0.003173 * COIN; + } + else if (nHeight < 2943360){ + nSubsidy = 0.001586 * COIN; + } + else if (nHeight < 3153600){ + nSubsidy = 0.000793 * COIN; + } + else if (nHeight < 3363840){ + nSubsidy = 0.000396 * COIN; + } + else if (nHeight < 3574080){ + nSubsidy = 0.000198 * COIN; + } + else if (nHeight < 3784320){ + nSubsidy = 0.000099 * COIN; + } + else if (nHeight < 3994560){ + nSubsidy = 0.000049 * COIN; + } + else if (nHeight < 4204800){ + nSubsidy = 0.000024 * COIN; + } + else if (nHeight < 4415040){ + nSubsidy = 0.000012 * COIN; + } + else if (nHeight < 4625280){ + nSubsidy = 0.000006 * COIN; + } + else if (nHeight < 4835520){ + nSubsidy = 0.000003 * COIN; + } + else if (nHeight < 5045760){ + nSubsidy = 0.000001 * COIN; + } + else if (nHeight == 5045760){ + nSubsidy = 0.000001 * COIN; + } + else if (nHeight > 5045760){ + nSubsidy = 0.000001 * COIN; + } + + + return nSubsidy + nFees; +} + +// miner's coin stake reward based on nBits and coin age spent (coin-days) +int64 GetProofOfStakeReward(int64 nCoinAge, unsigned int nBits, unsigned int nTime) +{ + int64 nRewardCoinYear; + + + // Stage 2 of emission process is PoS-based. It will be active on mainNet since 20 Jun 2013. + + CBigNum bnRewardCoinYearLimit = MAX_MINT_PROOF_OF_STAKE; // Base stake mint rate, 100% year interest + CBigNum bnTarget; + bnTarget.SetCompact(nBits); + CBigNum bnTargetLimit = bnProofOfStakeLimit; + bnTargetLimit.SetCompact(bnTargetLimit.GetCompact()); + + // curecoin: reward for coin-year is cut in half every 64x multiply of PoS difficulty + // A reasonably continuous curve is used to avoid shock to market + // (nRewardCoinYearLimit / nRewardCoinYear) ** 4 == bnProofOfStakeLimit / bnTarget + // + // Human readable form: + // + // nRewardCoinYear = 1 / (posdiff ^ 1/4) + + CBigNum bnLowerBound = 1 * CENT; // Lower interest bound is 1% per year + CBigNum bnUpperBound = bnRewardCoinYearLimit; + while (bnLowerBound + CENT <= bnUpperBound) + { + CBigNum bnMidValue = (bnLowerBound + bnUpperBound) / 2; + if (fDebug && GetBoolArg("-printcreation")) + printf("GetProofOfStakeReward() : lower=%"PRI64d" upper=%"PRI64d" mid=%"PRI64d"\n", bnLowerBound.getuint64(), bnUpperBound.getuint64(), bnMidValue.getuint64()); + if (bnMidValue * bnMidValue * bnMidValue * bnMidValue * bnTargetLimit > bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnTarget) + bnUpperBound = bnMidValue; + else + bnLowerBound = bnMidValue; + } + nRewardCoinYear = bnUpperBound.getuint64(); + nRewardCoinYear = min(nRewardCoinYear, MAX_MINT_PROOF_OF_STAKE); + + + int64 nSubsidy = nRewardCoinYear * nCoinAge * 33 / (365 * 33 + 8) ; + + if (fDebug && GetBoolArg("-printcreation")) + printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRI64d" nBits=%d\n", FormatMoney(nSubsidy).c_str(), nCoinAge, nBits); + + return nSubsidy; +} + +static const int64 nTargetTimespan = 4 * 60 * 60; // 4-hour +static const int64 nTargetSpacingWorkMax = 12 * nStakeTargetSpacing; // 2-hour + +// +// minimum amount of work that could possibly be required nTime after +// minimum work required was nBase +// +unsigned int ComputeMinWork(unsigned int nBase, int64 nTime) +{ + CBigNum bnTargetLimit = bnProofOfWorkLimit; + + CBigNum bnResult; + bnResult.SetCompact(nBase); + bnResult *= 2; + while (nTime > 0 && bnResult < bnTargetLimit) + { + // Maximum 200% adjustment per day... + bnResult *= 2; + nTime -= 24 * 60 * 60; + } + if (bnResult > bnTargetLimit) + bnResult = bnTargetLimit; + return bnResult.GetCompact(); +} + +// ppcoin: find last block index up to pindex +const CBlockIndex* GetLastBlockIndex(const CBlockIndex* pindex, bool fProofOfStake) +{ + while (pindex && pindex->pprev && (pindex->IsProofOfStake() != fProofOfStake)) + pindex = pindex->pprev; + return pindex; +} + +unsigned int static 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 + if(fTestNet) + bnTargetLimit = bnProofOfStakeLimit; + else + { + if(pindexLast->nHeight + 1 > 15000) + bnTargetLimit = bnProofOfStakeLimit; + else if(pindexLast->nHeight + 1 > 14060) + bnTargetLimit = bnProofOfStakeHardLimit; + } + } + + if (pindexLast == NULL) + return bnTargetLimit.GetCompact(); // genesis block + + const CBlockIndex* pindexPrev = GetLastBlockIndex(pindexLast, fProofOfStake); + if (pindexPrev->pprev == NULL) + return bnTargetLimit.GetCompact(); // first block + const CBlockIndex* pindexPrevPrev = GetLastBlockIndex(pindexPrev->pprev, fProofOfStake); + if (pindexPrevPrev->pprev == NULL) + return bnTargetLimit.GetCompact(); // second block + + int64 nActualSpacing = pindexPrev->GetBlockTime() - pindexPrevPrev->GetBlockTime(); + + /*if(pindexLast->nHeight+1 > 10000) + { + if (nActualSpacing < nTargetSpacing/4) + nActualSpacing = nTargetSpacing/4; + if (nActualSpacing > nTargetSpacing*4) + nActualSpacing = nTargetSpacing*4; + } + else if(pindexLast->nHeight+1 > 5000) + { + if (nActualSpacing < nTargetSpacing/8) + nActualSpacing = nTargetSpacing/8; + if (nActualSpacing > nTargetSpacing*4) + nActualSpacing = nTargetSpacing*4; + } + else + { + if (nActualSpacing < nTargetSpacing/16) + nActualSpacing = nTargetSpacing/16; + if (nActualSpacing > nTargetSpacing*4) + nActualSpacing = nTargetSpacing*4; + }*/ + + // ppcoin: target change every block + // ppcoin: 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; + bnNew *= ((nInterval - 1) * nTargetSpacing + nActualSpacing + nActualSpacing); + bnNew /= ((nInterval + 1) * nTargetSpacing); + + if (bnNew > bnTargetLimit) + bnNew = bnTargetLimit; + + return bnNew.GetCompact(); +} + +bool CheckProofOfWork(uint256 hash, unsigned int nBits) +{ + //printf("block.nBits in CheckProofWork Func is:%d\n", nBits); + + + CBigNum bnTarget; + bnTarget.SetCompact(nBits); + + //printf("uint256 hash in CheckProofWork Func is:%s\n", hash.ToString().c_str()); + //printf("bnTarget.getuint256() in CheckProofWork Func is:%d\n", bnTarget.getuint256().ToString().c_str()); + + // Check range + if (bnTarget <= 0 || bnTarget > bnProofOfWorkLimit) + return error("CheckProofOfWork() : nBits below minimum work"); + + // Check proof of work matches claimed amount + if (hash > bnTarget.getuint256()) + return error("CheckProofOfWork() : hash doesn't match nBits"); + + return true; +} + +// Return maximum amount of blocks that other nodes claim to have +int GetNumBlocksOfPeers() +{ + return std::max(cPeerBlockCounts.median(), Checkpoints::GetTotalBlocksEstimate()); +} + +bool IsInitialBlockDownload() +{ + if (pindexBest == NULL || nBestHeight < Checkpoints::GetTotalBlocksEstimate()) + return true; + static int64 nLastUpdate; + static CBlockIndex* pindexLastBest; + if (pindexBest != pindexLastBest) + { + pindexLastBest = pindexBest; + nLastUpdate = GetTime(); + } + return (GetTime() - nLastUpdate < 10 && + pindexBest->GetBlockTime() < GetTime() - 24 * 60 * 60); +} + +void static InvalidChainFound(CBlockIndex* pindexNew) +{ + if (pindexNew->bnChainTrust > bnBestInvalidTrust) + { + bnBestInvalidTrust = pindexNew->bnChainTrust; + CTxDB().WriteBestInvalidTrust(bnBestInvalidTrust); + uiInterface.NotifyBlocksChanged(); + } + + printf("InvalidChainFound: invalid block=%s height=%d trust=%s 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(), + 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 + if (!IsCoinBase()) + { + BOOST_FOREACH(const CTxIn& txin, vin) + { + COutPoint prevout = txin.prevout; + + // Get prev txindex from disk + CTxIndex txindex; + if (!txdb.ReadTxIndex(prevout.hash, txindex)) + return error("DisconnectInputs() : ReadTxIndex failed"); + + if (prevout.n >= txindex.vSpent.size()) + return error("DisconnectInputs() : prevout.n out of range"); + + // Mark outpoint as not spent + txindex.vSpent[prevout.n].SetNull(); + + // Write back + if (!txdb.UpdateTxIndex(prevout.hash, txindex)) + return error("DisconnectInputs() : UpdateTxIndex failed"); + } + } + + // Remove transaction from index + // This can fail if a duplicate of this transaction was in a chain that got + // reorganized away. This is only possible if this transaction was completely + // spent, so erasing it would be a no-op anyway. + txdb.EraseTxIndex(*this); + + return true; +} + + +bool CTransaction::FetchInputs(CTxDB& txdb, const map& mapTestPool, + bool fBlock, bool fMiner, MapPrevTx& inputsRet, bool& fInvalid) +{ + // FetchInputs can return false either because we just haven't seen some inputs + // (in which case the transaction should be stored as an orphan) + // or because the transaction is malformed (in which case the transaction should + // be dropped). If tx is definitely invalid, fInvalid will be set to true. + fInvalid = false; + + if (IsCoinBase()) + return true; // Coinbase transactions have no inputs to fetch. + + for (unsigned int i = 0; i < vin.size(); i++) + { + COutPoint prevout = vin[i].prevout; + if (inputsRet.count(prevout.hash)) + continue; // Got it already + + // Read txindex + CTxIndex& txindex = inputsRet[prevout.hash].first; + bool fFound = true; + if ((fBlock || fMiner) && mapTestPool.count(prevout.hash)) + { + // Get txindex from current proposed changes + txindex = mapTestPool.find(prevout.hash)->second; + } + else + { + // Read txindex from txdb + fFound = txdb.ReadTxIndex(prevout.hash, txindex); + } + if (!fFound && (fBlock || fMiner)) + return fMiner ? false : error("FetchInputs() : %s prev tx %s index entry not found", GetHash().ToString().substr(0,10).c_str(), prevout.hash.ToString().substr(0,10).c_str()); + + // Read txPrev + CTransaction& txPrev = inputsRet[prevout.hash].second; + if (!fFound || txindex.pos == CDiskTxPos(1,1,1)) + { + // Get prev tx from single transactions in memory + { + LOCK(mempool.cs); + if (!mempool.exists(prevout.hash)) + return error("FetchInputs() : %s mempool Tx prev not found %s", GetHash().ToString().substr(0,10).c_str(), prevout.hash.ToString().substr(0,10).c_str()); + txPrev = mempool.lookup(prevout.hash); + } + if (!fFound) + txindex.vSpent.resize(txPrev.vout.size()); + } + else + { + // Get prev tx from disk + if (!txPrev.ReadFromDisk(txindex.pos)) + return error("FetchInputs() : %s ReadFromDisk prev tx %s failed", GetHash().ToString().substr(0,10).c_str(), prevout.hash.ToString().substr(0,10).c_str()); + } + } + + // Make sure all prevout.n indexes are valid: + for (unsigned int i = 0; i < vin.size(); i++) + { + const COutPoint prevout = vin[i].prevout; + assert(inputsRet.count(prevout.hash) != 0); + const CTxIndex& txindex = inputsRet[prevout.hash].first; + const CTransaction& txPrev = inputsRet[prevout.hash].second; + if (prevout.n >= txPrev.vout.size() || prevout.n >= txindex.vSpent.size()) + { + // Revisit this if/when transaction replacement is implemented and allows + // adding inputs: + fInvalid = true; + return DoS(100, error("FetchInputs() : %s prevout.n out of range %d %"PRIszu" %"PRIszu" prev tx %s\n%s", GetHash().ToString().substr(0,10).c_str(), prevout.n, txPrev.vout.size(), txindex.vSpent.size(), prevout.hash.ToString().substr(0,10).c_str(), txPrev.ToString().c_str())); + } + } + + return true; +} + +const CTxOut& CTransaction::GetOutputFor(const CTxIn& input, const MapPrevTx& inputs) const +{ + MapPrevTx::const_iterator mi = inputs.find(input.prevout.hash); + if (mi == inputs.end()) + throw std::runtime_error("CTransaction::GetOutputFor() : prevout.hash not found"); + + const CTransaction& txPrev = (mi->second).second; + if (input.prevout.n >= txPrev.vout.size()) + throw std::runtime_error("CTransaction::GetOutputFor() : prevout.n out of range"); + + return txPrev.vout[input.prevout.n]; +} + +int64 CTransaction::GetValueIn(const MapPrevTx& inputs) const +{ + if (IsCoinBase()) + return 0; + + int64 nResult = 0; + for (unsigned int i = 0; i < vin.size(); i++) + { + nResult += GetOutputFor(vin[i], inputs).nValue; + } + return nResult; + +} + +unsigned int CTransaction::GetP2SHSigOpCount(const MapPrevTx& inputs) const +{ + if (IsCoinBase()) + return 0; + + unsigned int nSigOps = 0; + for (unsigned int i = 0; i < vin.size(); i++) + { + const CTxOut& prevout = GetOutputFor(vin[i], inputs); + if (prevout.scriptPubKey.IsPayToScriptHash()) + nSigOps += prevout.scriptPubKey.GetSigOpCount(vin[i].scriptSig); + } + return nSigOps; +} + +bool CTransaction::ConnectInputs(CTxDB& txdb, MapPrevTx inputs, + map& mapTestPool, const CDiskTxPos& posThisTx, + const CBlockIndex* pindexBlock, bool fBlock, bool fMiner, bool fStrictPayToScriptHash) +{ + // 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 curecoin miner + // ... both are false when called from CTransaction::AcceptToMemoryPool + if (!IsCoinBase()) + { + int64 nValueIn = 0; + int64 nFees = 0; + for (unsigned int i = 0; i < vin.size(); i++) + { + COutPoint prevout = vin[i].prevout; + assert(inputs.count(prevout.hash) > 0); + CTxIndex& txindex = inputs[prevout.hash].first; + CTransaction& txPrev = inputs[prevout.hash].second; + + if (prevout.n >= txPrev.vout.size() || prevout.n >= txindex.vSpent.size()) + return DoS(100, error("ConnectInputs() : %s prevout.n out of range %d %"PRIszu" %"PRIszu" prev tx %s\n%s", GetHash().ToString().substr(0,10).c_str(), prevout.n, txPrev.vout.size(), txindex.vSpent.size(), prevout.hash.ToString().substr(0,10).c_str(), txPrev.ToString().c_str())); + + // If prev is coinbase or coinstake, check that it's matured + if (txPrev.IsCoinBase() || txPrev.IsCoinStake()) + for (const CBlockIndex* pindex = pindexBlock; pindex && pindexBlock->nHeight - pindex->nHeight < nCoinbaseMaturity; pindex = pindex->pprev) + if (pindex->nBlockPos == txindex.pos.nBlockPos && pindex->nFile == txindex.pos.nFile) + return error("ConnectInputs() : tried to spend %s at depth %d", txPrev.IsCoinBase() ? "coinbase" : "coinstake", pindexBlock->nHeight - pindex->nHeight); + + // ppcoin: check transaction timestamp + if (txPrev.nTime > nTime) + return DoS(100, error("ConnectInputs() : transaction timestamp earlier than input transaction")); + + // Check for negative or overflow input values + nValueIn += txPrev.vout[prevout.n].nValue; + if (!MoneyRange(txPrev.vout[prevout.n].nValue) || !MoneyRange(nValueIn)) + return DoS(100, error("ConnectInputs() : txin values out of range")); + + } + // The first loop above does all the inexpensive checks. + // Only if ALL inputs pass do we perform expensive ECDSA signature checks. + // Helps prevent CPU exhaustion attacks. + for (unsigned int i = 0; i < vin.size(); i++) + { + COutPoint prevout = vin[i].prevout; + assert(inputs.count(prevout.hash) > 0); + CTxIndex& txindex = inputs[prevout.hash].first; + CTransaction& txPrev = inputs[prevout.hash].second; + + // Check for conflicts (double-spend) + // This doesn't trigger the DoS code on purpose; if it did, it would make it easier + // for an attacker to attempt to split the network. + if (!txindex.vSpent[prevout.n].IsNull()) + return fMiner ? false : error("ConnectInputs() : %s prev tx already used at %s", GetHash().ToString().substr(0,10).c_str(), txindex.vSpent[prevout.n].ToString().c_str()); + + // Skip ECDSA signature verification when connecting blocks (fBlock=true) + // before the last blockchain checkpoint. This is safe because block merkle hashes are + // still computed and checked, and any change will be caught at the next checkpoint. + if (!(fBlock && (nBestHeight < Checkpoints::GetTotalBlocksEstimate()))) + { + // Verify signature + if (!VerifySignature(txPrev, *this, i, fStrictPayToScriptHash, 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())); + } + } + + // Mark outpoints as spent + txindex.vSpent[prevout.n] = posThisTx; + + // Write back + if (fBlock || fMiner) + { + mapTestPool[prevout.hash] = txindex; + } + } + + if (IsCoinStake()) + { + // ppcoin: 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) - GetMinFee() + MIN_TX_FEE) + return DoS(100, error("ConnectInputs() : %s stake reward exceeded", GetHash().ToString().substr(0,10).c_str())); + } + else + { + 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(); + if (nTxFee < 0) + return DoS(100, error("ConnectInputs() : %s nTxFee < 0", GetHash().ToString().substr(0,10).c_str())); + // ppcoin: 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; + + nFees += nTxFee; + if (!MoneyRange(nFees)) + return DoS(100, error("ConnectInputs() : nFees out of range")); + } + } + + return true; +} + + +bool CTransaction::ClientConnectInputs() +{ + if (IsCoinBase()) + return false; + + // Take over previous transactions' spent pointers + { + LOCK(mempool.cs); + int64 nValueIn = 0; + for (unsigned int i = 0; i < vin.size(); i++) + { + // Get prev tx from single transactions in memory + COutPoint prevout = vin[i].prevout; + if (!mempool.exists(prevout.hash)) + return false; + CTransaction& txPrev = mempool.lookup(prevout.hash); + + if (prevout.n >= txPrev.vout.size()) + return false; + + // Verify signature + if (!VerifySignature(txPrev, *this, i, true, 0)) + return error("ConnectInputs() : VerifySignature failed"); + + ///// this is redundant with the mempool.mapNextTx stuff, + ///// not sure which I want to get rid of + ///// this has to go away now that posNext is gone + // // Check for conflicts + // if (!txPrev.vout[prevout.n].posNext.IsNull()) + // return error("ConnectInputs() : prev tx already used"); + // + // // Flag outpoints as used + // txPrev.vout[prevout.n].posNext = posThisTx; + + nValueIn += txPrev.vout[prevout.n].nValue; + + if (!MoneyRange(txPrev.vout[prevout.n].nValue) || !MoneyRange(nValueIn)) + return error("ClientConnectInputs() : txin values out of range"); + } + if (GetValueOut() > nValueIn) + return false; + } + + return true; +} + + + + +bool CBlock::DisconnectBlock(CTxDB& txdb, CBlockIndex* pindex) +{ + // Disconnect in reverse order + for (int i = vtx.size()-1; i >= 0; i--) + if (!vtx[i].DisconnectInputs(txdb)) + 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) + { + CDiskBlockIndex blockindexPrev(pindex->pprev); + blockindexPrev.hashNext = 0; + if (!txdb.WriteBlockIndex(blockindexPrev)) + return error("DisconnectBlock() : WriteBlockIndex failed"); + } + + // ppcoin: clean up wallet after disconnecting coinstake + BOOST_FOREACH(CTransaction& tx, vtx) + SyncWithWallets(tx, this, false, false); + + return true; +} + +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)) + 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 curecoin + bool fStrictPayToScriptHash = true; // Always active in curecoin + + //// issue here: it doesn't know the version + unsigned int nTxPos; + if (fJustCheck) + // FetchInputs treats CDiskTxPos(1,1,1) as a special "refer to memorypool" indicator + // Since we're just checking the block and not actually connecting it, it might not (and probably shouldn't) be on the disk to get the transaction from + nTxPos = 1; + else + nTxPos = pindex->nBlockPos + ::GetSerializeSize(CBlock(), SER_DISK, CLIENT_VERSION) - (2 * GetSizeOfCompactSize(0)) + GetSizeOfCompactSize(vtx.size()); + + map mapQueuedChanges; + int64 nFees = 0; + int64 nValueIn = 0; + int64 nValueOut = 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; + } + } + + nSigOps += tx.GetLegacySigOpCount(); + if (nSigOps > MAX_BLOCK_SIGOPS) + return DoS(100, error("ConnectBlock() : too many sigops")); + + CDiskTxPos posThisTx(pindex->nFile, pindex->nBlockPos, nTxPos); + if (!fJustCheck) + nTxPos += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION); + + MapPrevTx mapInputs; + if (tx.IsCoinBase()) + nValueOut += tx.GetValueOut(); + else + { + bool fInvalid; + 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")); + } + + int64 nTxValueIn = tx.GetValueIn(mapInputs); + int64 nTxValueOut = tx.GetValueOut(); + nValueIn += nTxValueIn; + nValueOut += nTxValueOut; + if (!tx.IsCoinStake()) + nFees += nTxValueIn - nTxValueOut; + + if (!tx.ConnectInputs(txdb, mapInputs, mapQueuedChanges, posThisTx, pindex, true, false, fStrictPayToScriptHash)) + return false; + } + + mapQueuedChanges[hashTx] = CTxIndex(posThisTx, tx.vout.size()); + } + + // ppcoin: 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"); + + // ppcoin: fees are not collected by miners as in curecoin + // ppcoin: 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; + + // Write queued txindex changes + for (map::iterator mi = mapQueuedChanges.begin(); mi != mapQueuedChanges.end(); ++mi) + { + if (!txdb.UpdateTxIndex((*mi).first, (*mi).second)) + return error("ConnectBlock() : UpdateTxIndex failed"); + } + + + uint256 prevHash = 0; + if(pindex->pprev) + { + prevHash = pindex->pprev->GetBlockHash(); + 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) + { + CDiskBlockIndex blockindexPrev(pindex->pprev); + blockindexPrev.hashNext = pindex->GetBlockHash(); + if (!txdb.WriteBlockIndex(blockindexPrev)) + return error("ConnectBlock() : WriteBlockIndex failed"); + } + + // Watch for transactions paying to me + BOOST_FOREACH(CTransaction& tx, vtx) + SyncWithWallets(tx, this, true); + + return true; +} + +bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew) +{ + printf("REORGANIZE\n"); + + // Find the fork + CBlockIndex* pfork = pindexBest; + CBlockIndex* plonger = pindexNew; + while (pfork != plonger) + { + while (plonger->nHeight > pfork->nHeight) + if (!(plonger = plonger->pprev)) + return error("Reorganize() : plonger->pprev is null"); + if (pfork == plonger) + break; + if (!(pfork = pfork->pprev)) + return error("Reorganize() : pfork->pprev is null"); + } + + // List of what to disconnect + vector vDisconnect; + for (CBlockIndex* pindex = pindexBest; pindex != pfork; pindex = pindex->pprev) + vDisconnect.push_back(pindex); + + // List of what to connect + vector vConnect; + for (CBlockIndex* pindex = pindexNew; pindex != pfork; pindex = pindex->pprev) + vConnect.push_back(pindex); + reverse(vConnect.begin(), vConnect.end()); + + printf("REORGANIZE: Disconnect %"PRIszu" blocks; %s..%s\n", vDisconnect.size(), pfork->GetBlockHash().ToString().substr(0,20).c_str(), pindexBest->GetBlockHash().ToString().substr(0,20).c_str()); + printf("REORGANIZE: Connect %"PRIszu" blocks; %s..%s\n", vConnect.size(), pfork->GetBlockHash().ToString().substr(0,20).c_str(), pindexNew->GetBlockHash().ToString().substr(0,20).c_str()); + + // Disconnect shorter branch + vector vResurrect; + BOOST_FOREACH(CBlockIndex* pindex, vDisconnect) + { + CBlock block; + if (!block.ReadFromDisk(pindex)) + return error("Reorganize() : ReadFromDisk for disconnect failed"); + if (!block.DisconnectBlock(txdb, pindex)) + return error("Reorganize() : DisconnectBlock %s failed", pindex->GetBlockHash().ToString().substr(0,20).c_str()); + + // Queue memory transactions to resurrect + BOOST_FOREACH(const CTransaction& tx, block.vtx) + if (!(tx.IsCoinBase() || tx.IsCoinStake())) + vResurrect.push_back(tx); + } + + // Connect longer branch + vector vDelete; + for (unsigned int i = 0; i < vConnect.size(); i++) + { + CBlockIndex* pindex = vConnect[i]; + CBlock block; + if (!block.ReadFromDisk(pindex)) + return error("Reorganize() : ReadFromDisk for connect failed"); + if (!block.ConnectBlock(txdb, pindex)) + { + // Invalid block + return error("Reorganize() : ConnectBlock %s failed", pindex->GetBlockHash().ToString().substr(0,20).c_str()); + } + + // Queue memory transactions to delete + BOOST_FOREACH(const CTransaction& tx, block.vtx) + vDelete.push_back(tx); + } + if (!txdb.WriteHashBestChain(pindexNew->GetBlockHash())) + return error("Reorganize() : WriteHashBestChain failed"); + + // Make sure it's successfully written to disk before changing memory structure + if (!txdb.TxnCommit()) + return error("Reorganize() : TxnCommit failed"); + + // Disconnect shorter branch + BOOST_FOREACH(CBlockIndex* pindex, vDisconnect) + if (pindex->pprev) + pindex->pprev->pnext = NULL; + + // Connect longer branch + BOOST_FOREACH(CBlockIndex* pindex, vConnect) + if (pindex->pprev) + pindex->pprev->pnext = pindex; + + // Resurrect memory transactions that were in the disconnected branch + BOOST_FOREACH(CTransaction& tx, vResurrect) + tx.AcceptToMemoryPool(txdb, false); + + // Delete redundant memory transactions that are in the connected branch + BOOST_FOREACH(CTransaction& tx, vDelete) + mempool.remove(tx); + + printf("REORGANIZE: done\n"); + + return true; +} + + +// Called from inside SetBestChain: attaches a block to the new best chain being built +bool CBlock::SetBestChainInner(CTxDB& txdb, CBlockIndex *pindexNew) +{ + uint256 hash = GetHash(); + + // Adding to current best branch + if (!ConnectBlock(txdb, pindexNew) || !txdb.WriteHashBestChain(hash)) + { + txdb.TxnAbort(); + InvalidChainFound(pindexNew); + return false; + } + if (!txdb.TxnCommit()) + return error("SetBestChain() : TxnCommit failed"); + + // Add to current best branch + pindexNew->pprev->pnext = pindexNew; + + // Delete redundant memory transactions + BOOST_FOREACH(CTransaction& tx, vtx) + mempool.remove(tx); + + return true; +} + +bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew) +{ + uint256 hash = GetHash(); + + if (!txdb.TxnBegin()) + return error("SetBestChain() : TxnBegin failed"); + + if (pindexGenesisBlock == NULL && hash == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)) + { + txdb.WriteHashBestChain(hash); + if (!txdb.TxnCommit()) + return error("SetBestChain() : TxnCommit failed"); + pindexGenesisBlock = pindexNew; + } + else if (hashPrevBlock == hashBestChain) + { + if (!SetBestChainInner(txdb, pindexNew)) + return error("SetBestChain() : SetBestChainInner failed"); + } + else + { + // the first block in the new chain that will cause it to become the new best chain + CBlockIndex *pindexIntermediate = pindexNew; + + // list of blocks that need to be connected afterwards + std::vector vpindexSecondary; + + // 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) + { + vpindexSecondary.push_back(pindexIntermediate); + pindexIntermediate = pindexIntermediate->pprev; + } + + if (!vpindexSecondary.empty()) + printf("Postponing %"PRIszu" reconnects\n", vpindexSecondary.size()); + + // Switch to new best branch + if (!Reorganize(txdb, pindexIntermediate)) + { + txdb.TxnAbort(); + InvalidChainFound(pindexNew); + return error("SetBestChain() : Reorganize failed"); + } + + // Connect further blocks + BOOST_REVERSE_FOREACH(CBlockIndex *pindex, vpindexSecondary) + { + CBlock block; + if (!block.ReadFromDisk(pindex)) + { + printf("SetBestChain() : ReadFromDisk failed\n"); + break; + } + if (!txdb.TxnBegin()) { + printf("SetBestChain() : TxnBegin 2 failed\n"); + break; + } + // errors now are not fatal, we still did a reorganisation to a new chain in a valid way + if (!block.SetBestChainInner(txdb, pindex)) + break; + } + } + + // Update best block in wallet (so we can detect restored wallets) + bool fIsInitialDownload = IsInitialBlockDownload(); + if (!fIsInitialDownload) + { + const CBlockLocator locator(pindexNew); + ::SetBestChain(locator); + } + + // New best block + hashBestChain = hash; + pindexBest = pindexNew; + pblockindexFBBHLast = NULL; + nBestHeight = pindexBest->nHeight; + bnBestChainTrust = pindexNew->bnChainTrust; + nTimeBestReceived = GetTime(); + nTransactionsUpdated++; + printf("SetBestChain: new best=%s height=%d trust=%s date=%s,block hash= %s\n", + hashBestChain.ToString().substr(0,20).c_str(), nBestHeight, bnBestChainTrust.ToString().c_str(), + DateTimeStrFormat("%x %H:%M:%S", pindexBest->GetBlockTime()).c_str(), FindBlockByHeight(nBestHeight)->GetBlockHash().ToString().c_str()); + + // Check the version of the last 100 blocks to see if we need to upgrade: + if (!fIsInitialDownload) + { + int nUpgraded = 0; + const CBlockIndex* pindex = pindexBest; + for (int i = 0; i < 100 && pindex != NULL; i++) + { + if (pindex->nVersion > CBlock::CURRENT_VERSION) + ++nUpgraded; + pindex = pindex->pprev; + } + if (nUpgraded > 0) + printf("SetBestChain: %d of last 100 blocks above version %d\n", nUpgraded, CBlock::CURRENT_VERSION); + if (nUpgraded > 100/2) + // strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user: + strMiscWarning = _("Warning: This version is obsolete, upgrade required!"); + } + + std::string strCmd = GetArg("-blocknotify", ""); + + if (!fIsInitialDownload && !strCmd.empty()) + { + boost::replace_all(strCmd, "%s", hashBestChain.GetHex()); + boost::thread t(runCommand, strCmd); // thread runs free + } + + return true; +} + +// ppcoin: total coin age spent in transaction, in the unit of coin-days. +// Only those coins meeting minimum age requirement counts. As those +// transactions not in main chain are not currently indexed so we +// might not find out about their coin age. Older transactions are +// 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 +{ + CBigNum bnCentSecond = 0; // coin age in the unit of cent-seconds + nCoinAge = 0; + + if (IsCoinBase()) + return true; + + BOOST_FOREACH(const CTxIn& txin, vin) + { + // First try finding the previous transaction in database + CTransaction txPrev; + CTxIndex txindex; + if (!txPrev.ReadFromDisk(txdb, txin.prevout, txindex)) + continue; // previous transaction not in main chain + if (nTime < txPrev.nTime) + return false; // Transaction timestamp violation + + // Read block header + CBlock block; + if (!block.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos, false)) + return false; // unable to read block of previous transaction + if (block.GetBlockTime() + nStakeMinAge > nTime) + continue; // only count coins meeting min age requirement + + int64 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()); + } + + CBigNum bnCoinDay = bnCentSecond * CENT / COIN / (24 * 60 * 60); + if (fDebug && GetBoolArg("-printcoinage")) + printf("coin age bnCoinDay=%s\n", bnCoinDay.ToString().c_str()); + nCoinAge = bnCoinDay.getuint64(); + return true; +} + +// ppcoin: total coin age spent in block, in the unit of coin-days. +bool CBlock::GetCoinAge(uint64& nCoinAge) const +{ + nCoinAge = 0; + + CTxDB txdb("r"); + BOOST_FOREACH(const CTransaction& tx, vtx) + { + uint64 nTxCoinAge; + if (tx.GetCoinAge(txdb, nTxCoinAge)) + nCoinAge += nTxCoinAge; + else + return false; + } + + 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); + return true; +} + +bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos) +{ + // Check for duplicate + uint256 hash = GetHash(); + if (mapBlockIndex.count(hash)) + return error("AddToBlockIndex() : %s already exists", hash.ToString().substr(0,20).c_str()); + + // Construct new block index object + CBlockIndex* pindexNew = new CBlockIndex(nFile, nBlockPos, *this); + if (!pindexNew) + return error("AddToBlockIndex() : new CBlockIndex failed"); + pindexNew->phashBlock = &hash; + map::iterator miPrev = mapBlockIndex.find(hashPrevBlock); + if (miPrev != mapBlockIndex.end()) + { + pindexNew->pprev = (*miPrev).second; + pindexNew->nHeight = pindexNew->pprev->nHeight + 1; + } + + // ppcoin: compute chain trust score + pindexNew->bnChainTrust = (pindexNew->pprev ? pindexNew->pprev->bnChainTrust : 0) + pindexNew->GetBlockTrust(); + + // ppcoin: compute stake entropy bit for stake modifier + if (!pindexNew->SetStakeEntropyBit(GetStakeEntropyBit(pindexNew->nHeight))) + return error("AddToBlockIndex() : SetStakeEntropyBit() failed"); + + // ppcoin: 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]; + } + + // ppcoin: compute stake modifier + uint64 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); + + // Add to mapBlockIndex + map::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first; + if (pindexNew->IsProofOfStake()) + setStakeSeen.insert(make_pair(pindexNew->prevoutStake, pindexNew->nStakeTime)); + pindexNew->phashBlock = &((*mi).first); + + // Write to disk block index + CTxDB txdb; + if (!txdb.TxnBegin()) + return false; + txdb.WriteBlockIndex(CDiskBlockIndex(pindexNew)); + if (!txdb.TxnCommit()) + return false; + + // New best + if (pindexNew->bnChainTrust > bnBestChainTrust) + if (!SetBestChain(txdb, pindexNew)) + return false; + + txdb.Close(); + + if (pindexNew == pindexBest) + { + // Notify UI to display prev block's coinbase if it was ours + static uint256 hashPrevBestCoinBase; + UpdatedTransaction(hashPrevBestCoinBase); + hashPrevBestCoinBase = vtx[0].GetHash(); + } + + uiInterface.NotifyBlocksChanged(); + return true; +} + + + + +bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot) const +{ + // These are checks that are independent of context + // that can be verified before saving an orphan block. + + // --- patch start//Patch from XertroV, great thanks to him https://bitcointalk.org/index.php?action=profile;u=37740 + // blacklist + if (GetHash() == uint256("0x000000082f31f8c70dd7f9a857f04fe14f7df2a57bb9bc1f54d336c70dea6205")) + return error("CheckBlock() : hash == 000000082f31f8c70dd7f9a857f04fe14f7df2a57bb9bc1f54d336c70dea6205"); + // --- patch end + + // Size limits + if (vtx.empty() || vtx.size() > MAX_BLOCK_SIZE || ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE) + return DoS(100, error("CheckBlock() : size limits failed")); + + // Check proof of work matches claimed amount + //printf("block.nBits in CheckBlock Func is:%d\n", nBits); + + if (fCheckPOW && IsProofOfWork() && !CheckProofOfWork(GetHash(), nBits)) + return DoS(50, error("CheckBlock() : proof of work failed")); + + // Check timestamp + if (GetBlockTime() > GetAdjustedTime() + nMaxClockDrift) + return error("CheckBlock() : block timestamp too far in the future"); + + // First transaction must be coinbase, the rest must not be + if (vtx.empty() || !vtx[0].IsCoinBase()) + return DoS(100, error("CheckBlock() : first tx is not coinbase")); + for (unsigned int i = 1; i < vtx.size(); i++) + if (vtx[i].IsCoinBase()) + return DoS(100, error("CheckBlock() : more than one coinbase")); + + // ppcoin: 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")); + + // ppcoin: 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) + 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)); + + + // Check transactions + BOOST_FOREACH(const CTransaction& tx, vtx) + { + if (!tx.CheckTransaction()) + return DoS(tx.nDoS, error("CheckBlock() : CheckTransaction failed")); + + // ppcoin: check transaction timestamp + if (GetBlockTime() < (int64)tx.nTime) + return DoS(50, error("CheckBlock() : block timestamp earlier than transaction timestamp")); + } + + // Check for duplicate txids. This is caught by ConnectInputs(), + // but catching it earlier avoids a potential DoS attack: + set uniqueTx; + BOOST_FOREACH(const CTransaction& tx, vtx) + { + uniqueTx.insert(tx.GetHash()); + } + if (uniqueTx.size() != vtx.size()) + return DoS(100, error("CheckBlock() : duplicate transaction")); + + unsigned int nSigOps = 0; + BOOST_FOREACH(const CTransaction& tx, vtx) + { + nSigOps += tx.GetLegacySigOpCount(); + } + if (nSigOps > MAX_BLOCK_SIGOPS) + return DoS(100, error("CheckBlock() : out-of-bounds SigOpCount")); + + // Check merkle root + if (fCheckMerkleRoot && hashMerkleRoot != BuildMerkleTree()) + return DoS(100, error("CheckBlock() : hashMerkleRoot mismatch")); + + // ppcoin: check block signature + if (!CheckBlockSignature()) + return DoS(100, error("CheckBlock() : bad block signature")); + + return true; +} + +bool CBlock::AcceptBlock() +{ + // Check for duplicate + uint256 hash = GetHash(); + if (mapBlockIndex.count(hash)) + return error("AcceptBlock() : block already in mapBlockIndex"); + + // Get prev block index + map::iterator mi = mapBlockIndex.find(hashPrevBlock); + if (mi == mapBlockIndex.end()) + return DoS(10, error("AcceptBlock() : prev block not found")); + CBlockIndex* pindexPrev = (*mi).second; + int nHeight = pindexPrev->nHeight+1; + + // 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")); + + // Check timestamp against prev + if (GetBlockTime() <= pindexPrev->GetMedianTimePast() || GetBlockTime() + nMaxClockDrift < pindexPrev->GetBlockTime()) + return error("AcceptBlock() : block's timestamp is too early"); + + // Check that all transactions are finalized + BOOST_FOREACH(const CTransaction& tx, vtx) + if (!tx.IsFinal(nHeight, GetBlockTime())) + return DoS(10, error("AcceptBlock() : contains a non-final transaction")); + + // Check that the block chain matches the known block chain up to a checkpoint + if (!Checkpoints::CheckHardened(nHeight, hash)) + return DoS(100, error("AcceptBlock() : rejected by hardened checkpoint lock-in at %d", nHeight)); + + // ppcoin: check that the block satisfies synchronized checkpoint + if (!Checkpoints::CheckSync(hash, pindexPrev)) + { + if(!GetBoolArg("-nosynccheckpoints", false)) + { + return error("AcceptBlock() : rejected by synchronized checkpoint"); + } + else + { + strMiscWarning = _("WARNING: syncronized checkpoint violation detected, but skipped!"); + } + } + + // 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"); + + // 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())) + return DoS(100, error("AcceptBlock() : block height mismatch in coinbase")); + + // Write block to history file + if (!CheckDiskSpace(::GetSerializeSize(*this, SER_DISK, CLIENT_VERSION))) + return error("AcceptBlock() : out of disk space"); + unsigned int nFile = -1; + unsigned int nBlockPos = 0; + if (!WriteToDisk(nFile, nBlockPos)) + return error("AcceptBlock() : WriteToDisk failed"); + if (!AddToBlockIndex(nFile, nBlockPos)) + return error("AcceptBlock() : AddToBlockIndex failed"); + + // Relay inventory, but don't relay old inventory during initial block download + int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(); + if (hashBestChain == hash) + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + if (nBestHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) + pnode->PushInventory(CInv(MSG_BLOCK, hash)); + } + + // ppcoin: check pending sync-checkpoint + Checkpoints::AcceptPendingSyncCheckpoint(); + + return true; +} + +bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned int nRequired, unsigned int nToCheck) +{ + unsigned int nFound = 0; + for (unsigned int i = 0; i < nToCheck && nFound < nRequired && pstart != NULL; i++) + { + if (pstart->nVersion >= minVersion) + ++nFound; + pstart = pstart->pprev; + } + return (nFound >= nRequired); +} + +bool ProcessBlock(CNode* pfrom, CBlock* pblock) +{ + // Check for duplicate + uint256 hash = pblock->GetHash(); + if (mapBlockIndex.count(hash)) + return error("ProcessBlock() : already have block %d %s", mapBlockIndex[hash]->nHeight, hash.ToString().substr(0,20).c_str()); + if (mapOrphanBlocks.count(hash)) + return error("ProcessBlock() : already have block (orphan) %s", hash.ToString().substr(0,20).c_str()); + + // ppcoin: check proof-of-stake + // Limited duplicity on stake: prevents block flood attack + // Duplicate stake allowed only when there is orphan child block + if (pblock->IsProofOfStake() && setStakeSeen.count(pblock->GetProofOfStake()) && !mapOrphanBlocksByPrev.count(hash) && !Checkpoints::WantedByPendingSyncCheckpoint(hash)) + return error("ProcessBlock() : duplicate proof-of-stake (%s, %d) for block %s", pblock->GetProofOfStake().first.ToString().c_str(), pblock->GetProofOfStake().second, hash.ToString().c_str()); + + // Preliminary checks + if (!pblock->CheckBlock()) + return error("ProcessBlock() : CheckBlock FAILED"); + + // ppcoin: verify hash target and signature of coinstake tx + if (pblock->IsProofOfStake()) + { + uint256 hashProofOfStake = 0; + if (!CheckProofOfStake(pblock->vtx[1], pblock->nBits, hashProofOfStake)) + { + 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 && pblock->hashPrevBlock != hashBestChain && !Checkpoints::WantedByPendingSyncCheckpoint(hash)) + { + // Extra checks to prevent "fill up memory by spamming with bogus blocks" + int64 deltaTime = pblock->GetBlockTime() - pcheckpoint->nTime; + CBigNum bnNewBlock; + bnNewBlock.SetCompact(pblock->nBits); + CBigNum bnRequired; + bnRequired.SetCompact(ComputeMinWork(GetLastBlockIndex(pcheckpoint, pblock->IsProofOfStake())->nBits, deltaTime)); + if (bnNewBlock > bnRequired) + { + if (pfrom) + pfrom->Misbehaving(100); + return error("ProcessBlock() : block with too little %s", pblock->IsProofOfStake()? "proof-of-stake" : "proof-of-work"); + } + } + + // ppcoin: ask for pending sync-checkpoint if any + if (!IsInitialBlockDownload()) + Checkpoints::AskForPendingSyncCheckpoint(pfrom); + + // If don't already have its previous block, shunt it off to holding area until we get it + if (!mapBlockIndex.count(pblock->hashPrevBlock)) + { + printf("ProcessBlock: ORPHAN BLOCK, prev=%s\n", pblock->hashPrevBlock.ToString().substr(0,20).c_str()); + CBlock* pblock2 = new CBlock(*pblock); + // ppcoin: check proof-of-stake + if (pblock2->IsProofOfStake()) + { + // Limited duplicity on stake: prevents block flood attack + // Duplicate stake allowed only when there is orphan child block + if (setStakeSeenOrphan.count(pblock2->GetProofOfStake()) && !mapOrphanBlocksByPrev.count(hash) && !Checkpoints::WantedByPendingSyncCheckpoint(hash)) + return error("ProcessBlock() : duplicate proof-of-stake (%s, %d) for orphan block %s", pblock2->GetProofOfStake().first.ToString().c_str(), pblock2->GetProofOfStake().second, hash.ToString().c_str()); + else + setStakeSeenOrphan.insert(pblock2->GetProofOfStake()); + } + mapOrphanBlocks.insert(make_pair(hash, pblock2)); + mapOrphanBlocksByPrev.insert(make_pair(pblock2->hashPrevBlock, pblock2)); + + // Ask this guy to fill in what we're missing + if (pfrom) + { + pfrom->PushGetBlocks(pindexBest, GetOrphanRoot(pblock2)); + // ppcoin: getblocks may not obtain the ancestor block rejected + // earlier by duplicate-stake check so we ask for it again directly + if (!IsInitialBlockDownload()) + pfrom->AskFor(CInv(MSG_BLOCK, WantedByOrphan(pblock2))); + } + return true; + } + + // Store to disk + if (!pblock->AcceptBlock()) + return error("ProcessBlock() : AcceptBlock FAILED"); + + // Recursively process any orphan blocks that depended on this one + vector vWorkQueue; + vWorkQueue.push_back(hash); + for (unsigned int i = 0; i < vWorkQueue.size(); i++) + { + uint256 hashPrev = vWorkQueue[i]; + for (multimap::iterator mi = mapOrphanBlocksByPrev.lower_bound(hashPrev); + mi != mapOrphanBlocksByPrev.upper_bound(hashPrev); + ++mi) + { + CBlock* pblockOrphan = (*mi).second; + if (pblockOrphan->AcceptBlock()) + vWorkQueue.push_back(pblockOrphan->GetHash()); + mapOrphanBlocks.erase(pblockOrphan->GetHash()); + setStakeSeenOrphan.erase(pblockOrphan->GetProofOfStake()); + delete pblockOrphan; + } + mapOrphanBlocksByPrev.erase(hashPrev); + } + + printf("ProcessBlock: ACCEPTED\n"); + + // ppcoin: if responsible for sync-checkpoint send it + if (pfrom && !CSyncCheckpoint::strMasterPrivKey.empty()) + Checkpoints::SendSyncCheckpoint(Checkpoints::AutoSelectSyncCheckpoint()); + + return true; +} + +// ppcoin: sign block +bool CBlock::SignBlock(const CKeyStore& keystore) +{ + vector vSolutions; + txnouttype whichType; + + if(!IsProofOfStake()) + { + for(unsigned int i = 0; i < vtx[0].vout.size(); i++) + { + const CTxOut& txout = vtx[0].vout[i]; + + if (!Solver(txout.scriptPubKey, whichType, vSolutions)) + continue; + + if (whichType == TX_PUBKEY) + { + // Sign + valtype& vchPubKey = vSolutions[0]; + CKey key; + + if (!keystore.GetKey(Hash160(vchPubKey), key)) + continue; + if (key.GetPubKey() != vchPubKey) + continue; + if(!key.Sign(GetHash(), vchBlockSig)) + continue; + + return true; + } + } + } + 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); + } + } + + printf("Sign failed\n"); + return false; +} + +// ppcoin: check block signature +bool CBlock::CheckBlockSignature() const +{ + if (GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)) + return vchBlockSig.empty(); + + vector vSolutions; + txnouttype whichType; + + if(IsProofOfStake()) + { + const CTxOut& txout = vtx[1].vout[1]; + + 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 (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) +{ + uint64 nFreeBytesAvailable = filesystem::space(GetDataDir()).available; + + // Check for nMinDiskSpace bytes (currently 50MB) + if (nFreeBytesAvailable < nMinDiskSpace + nAdditionalBytes) + { + fShutdown = true; + string strMessage = _("Warning: Disk space is low!"); + strMiscWarning = strMessage; + printf("*** %s\n", strMessage.c_str()); + uiInterface.ThreadSafeMessageBox(strMessage, "curecoin", 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)) + return NULL; + FILE* file = fopen(BlockFilePath(nFile).string().c_str(), pszMode); + if (!file) + return NULL; + if (nBlockPos != 0 && !strchr(pszMode, 'a') && !strchr(pszMode, 'w')) + { + if (fseek(file, nBlockPos, SEEK_SET) != 0) + { + fclose(file); + return NULL; + } + } + return file; +} + +static unsigned int nCurrentBlockFile = 1; + +FILE* AppendBlockFile(unsigned int& nFileRet) +{ + nFileRet = 0; + loop + { + FILE* file = OpenBlockFile(nCurrentBlockFile, 0, "ab"); + if (!file) + return NULL; + if (fseek(file, 0, SEEK_END) != 0) + return NULL; + // FAT32 file size max 4GB, fseek and ftell max 2GB, so we must stay under 2GB + if (ftell(file) < (long)(0x7F000000 - MAX_SIZE)) + { + nFileRet = nCurrentBlockFile; + return file; + } + fclose(file); + nCurrentBlockFile++; + } +} + +bool LoadBlockIndex(bool fAllowNew) +{ + if (fTestNet) + { + pchMessageStart[0] = 0xcd; + pchMessageStart[1] = 0xf2; + pchMessageStart[2] = 0xc0; + pchMessageStart[3] = 0xef; + + bnProofOfStakeLimit = bnProofOfStakeLimitTestNet; // 0x00000fff PoS base target is fixed in testnet + bnProofOfWorkLimit = bnProofOfWorkLimitTestNet; // 0x0000ffff PoW base target is fixed in testnet + nStakeMinAge = 2 * 60 * 60; // test net min age is 2 hours + nModifierInterval = 20 * 60; // test modifier interval is 20 minutes + nCoinbaseMaturity = 10; // test maturity is 30 blocks + nStakeTargetSpacing = 3 * 60; // test block spacing is 3 minutes + } + + // + // Load block index + // + CTxDB txdb("cr"); + if (!txdb.LoadBlockIndex()) + return false; + txdb.Close(); + + // + // Init with genesis block + // + if (mapBlockIndex.empty()) + { + if (!fAllowNew) + return false; + + + // Genesis block + const char* pszTimestamp = "This Blind Man Can Show You How To Look On The Bright Side."; + CTransaction txNew; + txNew.nTime = nChainStartTime; + txNew.vin.resize(1); + 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(); + //txNew.vout[0].scriptPubKey = CScript() << ParseHex(pszMainKey) << OP_CHECKSIG; + txNew.strTxComment = "text:curecoin genesis block"; + + + CBlock block; + block.vtx.push_back(txNew); + block.hashPrevBlock = 0; + block.hashMerkleRoot = block.BuildMerkleTree(); + block.nVersion = 1; + block.nTime = nChainStartTime;; + block.nBits = bnProofOfWorkLimit.GetCompact(); + block.nNonce = 25338; + + if (IsCalculatingGenesisBlockHash && (block.GetHash() != hashGenesisBlock)) { + block.nNonce = 0; + + // 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 (block.nNonce % 10000 == 0) + { + printf("nonce %08u: hash = %s \n", block.nNonce, block.GetHash().ToString().c_str()); + } + } + } + + + //// debug print + block.print(); + printf("block.GetHash() == %s\n", block.GetHash().ToString().c_str()); + printf("block.hashMerkleRoot == %s\n", block.hashMerkleRoot.ToString().c_str()); + printf("block.nTime = %u \n", block.nTime); + printf("block.nNonce = %u \n", block.nNonce); + printf("block.nBits = %u \n", block.nBits); + + assert(block.hashMerkleRoot == uint256("0x149cd359a5ea486d50f10b4cef2a627d1890cb79eacea2eb36ce2dafec2fffbe")); + block.print(); + assert(block.GetHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)); + assert(block.CheckBlock()); + + // 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)) + return error("LoadBlockIndex() : genesis block not accepted"); + + // ppcoin: initialize synchronized checkpoint + if (!Checkpoints::WriteSyncCheckpoint((!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet))) + return error("LoadBlockIndex() : failed to init sync checkpoint"); + } + + // ppcoin: if checkpoint master key changed must reset sync-checkpoint + { + 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(); + } + + return true; +} + + + +void PrintBlockTree() +{ + // pre-compute tree structure + map > mapNext; + for (map::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi) + { + CBlockIndex* pindex = (*mi).second; + mapNext[pindex->pprev].push_back(pindex); + // test + //while (rand() % 3 == 0) + // mapNext[pindex->pprev].push_back(pindex); + } + + vector > vStack; + vStack.push_back(make_pair(0, pindexGenesisBlock)); + + int nPrevCol = 0; + while (!vStack.empty()) + { + int nCol = vStack.back().first; + CBlockIndex* pindex = vStack.back().second; + vStack.pop_back(); + + // print split or gap + if (nCol > nPrevCol) + { + for (int i = 0; i < nCol-1; i++) + printf("| "); + printf("|\\\n"); + } + else if (nCol < nPrevCol) + { + for (int i = 0; i < nCol; i++) + printf("| "); + printf("|\n"); + } + nPrevCol = nCol; + + // print columns + for (int i = 0; i < nCol; i++) + printf("| "); + + // print item + CBlock block; + block.ReadFromDisk(pindex); + printf("%d (%u,%u) %s %08x %s mint %7s tx %"PRIszu"", + pindex->nHeight, + pindex->nFile, + pindex->nBlockPos, + block.GetHash().ToString().c_str(), + block.nBits, + DateTimeStrFormat("%x %H:%M:%S", block.GetBlockTime()).c_str(), + FormatMoney(pindex->nMint).c_str(), + block.vtx.size()); + + PrintWallets(block); + + // put the main time-chain first + vector& vNext = mapNext[pindex]; + for (unsigned int i = 0; i < vNext.size(); i++) + { + if (vNext[i]->pnext) + { + swap(vNext[0], vNext[i]); + break; + } + } + + // iterate children + for (unsigned int i = 0; i < vNext.size(); i++) + vStack.push_back(make_pair(nCol+i, vNext[i])); + } +} + +bool LoadExternalBlockFile(FILE* fileIn) +{ + int64 nStart = GetTimeMillis(); + + int nLoaded = 0; + { + LOCK(cs_main); + try { + CAutoFile blkdat(fileIn, SER_DISK, CLIENT_VERSION); + unsigned int nPos = 0; + while (nPos != (unsigned int)-1 && blkdat.good() && !fRequestShutdown) + { + unsigned char pchData[65536]; + do { + fseek(blkdat, nPos, SEEK_SET); + int nRead = fread(pchData, 1, sizeof(pchData), blkdat); + if (nRead <= 8) + { + nPos = (unsigned int)-1; + break; + } + void* nFind = memchr(pchData, pchMessageStart[0], nRead+1-sizeof(pchMessageStart)); + if (nFind) + { + if (memcmp(nFind, pchMessageStart, sizeof(pchMessageStart))==0) + { + nPos += ((unsigned char*)nFind - pchData) + sizeof(pchMessageStart); + break; + } + nPos += ((unsigned char*)nFind - pchData) + 1; + } + else + nPos += sizeof(pchData) - sizeof(pchMessageStart) + 1; + } while(!fRequestShutdown); + if (nPos == (unsigned int)-1) + break; + fseek(blkdat, nPos, SEEK_SET); + unsigned int nSize; + blkdat >> nSize; + if (nSize > 0 && nSize <= MAX_BLOCK_SIZE) + { + CBlock block; + blkdat >> block; + if (ProcessBlock(NULL,&block)) + { + nLoaded++; + nPos += 4 + nSize; + } + } + } + } + catch (std::exception &e) { + printf("%s() : Deserialize or I/O error caught during load\n", + __PRETTY_FUNCTION__); + } + } + printf("Loaded %i blocks from external file in %"PRI64d"ms\n", nLoaded, GetTimeMillis() - nStart); + return nLoaded > 0; +} + + + + + + + + + +////////////////////////////////////////////////////////////////////////////// +// +// CAlert +// + +extern map mapAlerts; +extern CCriticalSection cs_mapAlerts; + +static string strMintMessage = "Info: Minting suspended due to locked wallet."; +static string strMintWarning; + +string GetWarnings(string strFor) +{ + int nPriority = 0; + string strStatusBar; + string strRPC; + + if (GetBoolArg("-testsafemode")) + strRPC = "test"; + + // ppcoin: wallet lock warning for minting + if (strMintWarning != "") + { + nPriority = 0; + strStatusBar = strMintWarning; + } + + // Misc warnings like out of disk space and clock is wrong + if (strMiscWarning != "") + { + nPriority = 1000; + strStatusBar = strMiscWarning; + } + + // ppcoin: should not enter safe mode for longer invalid chain + // ppcoin: if sync-checkpoint is too old do not enter safe mode + if (Checkpoints::IsSyncCheckpointTooOld(60 * 60 * 24 * 100) && !fTestNet && !IsInitialBlockDownload()) + { + nPriority = 100; + //strStatusBar = "WARNING: Checkpoint is too old. Wait for block chain to download, or notify developers."; + } + + // ppcoin: 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."; + } + + // Alerts + { + LOCK(cs_mapAlerts); + BOOST_FOREACH(PAIRTYPE(const uint256, CAlert)& item, mapAlerts) + { + const CAlert& alert = item.second; + if (alert.AppliesToMe() && alert.nPriority > nPriority) + { + nPriority = alert.nPriority; + strStatusBar = alert.strStatusBar; + if (nPriority > 1000) + strRPC = strStatusBar; // ppcoin: safe mode for high alert + } + } + } + + if (strFor == "statusbar") + return strStatusBar; + else if (strFor == "rpc") + return strRPC; + assert(!"GetWarnings() : invalid parameter"); + return "error"; +} + + + + + + + + +////////////////////////////////////////////////////////////////////////////// +// +// Messages +// + + +bool static AlreadyHave(CTxDB& txdb, const CInv& inv) +{ + switch (inv.type) + { + case MSG_TX: + { + bool txInMap = false; + { + LOCK(mempool.cs); + txInMap = (mempool.exists(inv.hash)); + } + return txInMap || + mapOrphanTransactions.count(inv.hash) || + txdb.ContainsTx(inv.hash); + } + + case MSG_BLOCK: + return mapBlockIndex.count(inv.hash) || + mapOrphanBlocks.count(inv.hash); + } + // Don't know what it is, just say we already got one + return true; +} + + + + +// The message start string is designed to be unlikely to occur in normal data. +// The characters are rarely used upper ASCII, not valid as UTF-8, and produce +// a large 4-byte int at any alignment. +unsigned char pchMessageStart[4] = { 0xe4, 0xe8, 0xe9, 0xe5 }; + +bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) +{ + static map mapReuseKey; + RandAddSeedPerfmon(); + if (fDebug) + printf("received: %s (%"PRIszu" bytes)\n", strCommand.c_str(), vRecv.size()); + if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0) + { + printf("dropmessagestest DROPPING RECV MESSAGE\n"); + return true; + } + + + + + + if (strCommand == "version") + { + // Each connection can only send one version message + if (pfrom->nVersion != 0) + { + pfrom->Misbehaving(1); + return false; + } + + int64 nTime; + CAddress addrMe; + CAddress addrFrom; + uint64 nNonce = 1; + vRecv >> pfrom->nVersion >> pfrom->nServices >> nTime >> addrMe; + if (pfrom->nVersion < MIN_PROTO_VERSION) + { + // Since February 20, 2012, the protocol is initiated at version 209, + // and earlier versions are no longer supported + printf("partner %s using obsolete version %i; disconnecting\n", pfrom->addr.ToString().c_str(), pfrom->nVersion); + pfrom->fDisconnect = true; + return false; + } + + if (pfrom->nVersion == 10300) + pfrom->nVersion = 300; + if (!vRecv.empty()) + vRecv >> addrFrom >> nNonce; + if (!vRecv.empty()) + vRecv >> pfrom->strSubVer; + if (!vRecv.empty()) + vRecv >> pfrom->nStartingHeight; + + if (pfrom->fInbound && addrMe.IsRoutable()) + { + pfrom->addrLocal = addrMe; + SeenLocal(addrMe); + } + + // Disconnect if we connected to ourself + if (nNonce == nLocalHostNonce && nNonce > 1) + { + printf("connected to self at %s, disconnecting\n", pfrom->addr.ToString().c_str()); + pfrom->fDisconnect = true; + return true; + } + + // ppcoin: record my external IP reported by peer + if (addrFrom.IsRoutable() && addrMe.IsRoutable()) + addrSeenByPeer = addrMe; + + // Be shy and don't send version until we hear + if (pfrom->fInbound) + pfrom->PushVersion(); + + pfrom->fClient = !(pfrom->nServices & NODE_NETWORK); + + AddTimeData(pfrom->addr, nTime); + + // Change version + pfrom->PushMessage("verack"); + pfrom->vSend.SetVersion(min(pfrom->nVersion, PROTOCOL_VERSION)); + + if (!pfrom->fInbound) + { + // Advertise our address + if (!fNoListen && !IsInitialBlockDownload()) + { + CAddress addr = GetLocalAddress(&pfrom->addr); + if (addr.IsRoutable()) + pfrom->PushAddress(addr); + } + + // Get recent addresses + if (pfrom->fOneShot || pfrom->nVersion >= CADDR_TIME_VERSION || addrman.size() < 1000) + { + pfrom->PushMessage("getaddr"); + pfrom->fGetAddr = true; + } + addrman.Good(pfrom->addr); + } else { + if (((CNetAddr)pfrom->addr) == (CNetAddr)addrFrom) + { + addrman.Add(addrFrom, addrFrom); + addrman.Good(addrFrom); + } + } + + // Ask the first connected node for block updates + static int nAskedForBlocks = 0; + if (!pfrom->fClient && !pfrom->fOneShot && + (pfrom->nStartingHeight > (nBestHeight - 144)) && + (pfrom->nVersion < NOBLKS_VERSION_START || + pfrom->nVersion >= NOBLKS_VERSION_END) && + (nAskedForBlocks < 1 || vNodes.size() <= 1)) + { + nAskedForBlocks++; + pfrom->PushGetBlocks(pindexBest, uint256(0)); + } + + // Relay alerts + { + LOCK(cs_mapAlerts); + BOOST_FOREACH(PAIRTYPE(const uint256, CAlert)& item, mapAlerts) + item.second.RelayTo(pfrom); + } + + // ppcoin: relay sync-checkpoint + { + LOCK(Checkpoints::cs_hashSyncCheckpoint); + if (!Checkpoints::checkpointMessage.IsNull()) + Checkpoints::checkpointMessage.RelayTo(pfrom); + } + + pfrom->fSuccessfullyConnected = true; + + printf("receive version message: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString().c_str(), addrFrom.ToString().c_str(), pfrom->addr.ToString().c_str()); + + cPeerBlockCounts.input(pfrom->nStartingHeight); + + // ppcoin: ask for pending sync-checkpoint if any + if (!IsInitialBlockDownload()) + Checkpoints::AskForPendingSyncCheckpoint(pfrom); + } + + + else if (pfrom->nVersion == 0) + { + // Must have a version message before anything else + pfrom->Misbehaving(1); + return false; + } + + + else if (strCommand == "verack") + { + pfrom->vRecv.SetVersion(min(pfrom->nVersion, PROTOCOL_VERSION)); + } + + + else if (strCommand == "addr") + { + vector vAddr; + vRecv >> vAddr; + + // Don't want addr from older versions unless seeding + if (pfrom->nVersion < CADDR_TIME_VERSION && addrman.size() > 1000) + return true; + if (vAddr.size() > 1000) + { + pfrom->Misbehaving(20); + return error("message addr size() = %"PRIszu"", vAddr.size()); + } + + // Store the new addresses + vector vAddrOk; + int64 nNow = GetAdjustedTime(); + int64 nSince = nNow - 10 * 60; + BOOST_FOREACH(CAddress& addr, vAddr) + { + if (fShutdown) + return true; + if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60) + addr.nTime = nNow - 5 * 24 * 60 * 60; + pfrom->AddAddressKnown(addr); + bool fReachable = IsReachable(addr); + if (addr.nTime > nSince && !pfrom->fGetAddr && vAddr.size() <= 10 && addr.IsRoutable()) + { + // Relay to a limited number of other nodes + { + LOCK(cs_vNodes); + // Use deterministic randomness to send to the same nodes for 24 hours + // at a time so the setAddrKnowns of the chosen nodes prevent repeats + static uint256 hashSalt; + if (hashSalt == 0) + hashSalt = GetRandHash(); + uint64 hashAddr = addr.GetHash(); + uint256 hashRand = hashSalt ^ (hashAddr<<32) ^ ((GetTime()+hashAddr)/(24*60*60)); + hashRand = Hash(BEGIN(hashRand), END(hashRand)); + multimap mapMix; + BOOST_FOREACH(CNode* pnode, vNodes) + { + if (pnode->nVersion < CADDR_TIME_VERSION) + continue; + unsigned int nPointer; + memcpy(&nPointer, &pnode, sizeof(nPointer)); + uint256 hashKey = hashRand ^ nPointer; + hashKey = Hash(BEGIN(hashKey), END(hashKey)); + mapMix.insert(make_pair(hashKey, pnode)); + } + int nRelayNodes = fReachable ? 2 : 1; // limited relaying of addresses outside our network(s) + for (multimap::iterator mi = mapMix.begin(); mi != mapMix.end() && nRelayNodes-- > 0; ++mi) + ((*mi).second)->PushAddress(addr); + } + } + // Do not store addresses outside our network + if (fReachable) + vAddrOk.push_back(addr); + } + addrman.Add(vAddrOk, pfrom->addr, 2 * 60 * 60); + if (vAddr.size() < 1000) + pfrom->fGetAddr = false; + if (pfrom->fOneShot) + pfrom->fDisconnect = true; + } + + + else if (strCommand == "inv") + { + vector vInv; + vRecv >> vInv; + if (vInv.size() > MAX_INV_SZ) + { + pfrom->Misbehaving(20); + return error("message inv size() = %"PRIszu"", vInv.size()); + } + + // find last block in inv vector + unsigned int nLastBlock = (unsigned int)(-1); + for (unsigned int nInv = 0; nInv < vInv.size(); nInv++) { + if (vInv[vInv.size() - 1 - nInv].type == MSG_BLOCK) { + nLastBlock = vInv.size() - 1 - nInv; + break; + } + } + CTxDB txdb("r"); + for (unsigned int nInv = 0; nInv < vInv.size(); nInv++) + { + const CInv &inv = vInv[nInv]; + + if (fShutdown) + return true; + pfrom->AddInventoryKnown(inv); + + bool fAlreadyHave = AlreadyHave(txdb, inv); + if (fDebug) + printf(" got inventory: %s %s\n", inv.ToString().c_str(), fAlreadyHave ? "have" : "new"); + + if (!fAlreadyHave) + pfrom->AskFor(inv); + else if (inv.type == MSG_BLOCK && mapOrphanBlocks.count(inv.hash)) { + pfrom->PushGetBlocks(pindexBest, GetOrphanRoot(mapOrphanBlocks[inv.hash])); + } else if (nInv == nLastBlock) { + // In case we are on a very long side-chain, it is possible that we already have + // the last block in an inv bundle sent in response to getblocks. Try to detect + // this situation and push another getblocks to continue. + pfrom->PushGetBlocks(mapBlockIndex[inv.hash], uint256(0)); + if (fDebug) + printf("force request: %s\n", inv.ToString().c_str()); + } + + // Track requests for our stuff + Inventory(inv.hash); + } + } + + + else if (strCommand == "getdata") + { + vector vInv; + vRecv >> vInv; + if (vInv.size() > MAX_INV_SZ) + { + pfrom->Misbehaving(20); + return error("message getdata size() = %"PRIszu"", vInv.size()); + } + + if (fDebugNet || (vInv.size() != 1)) + printf("received getdata (%"PRIszu" invsz)\n", vInv.size()); + + BOOST_FOREACH(const CInv& inv, vInv) + { + if (fShutdown) + return true; + if (fDebugNet || (vInv.size() == 1)) + printf("received getdata for: %s\n", inv.ToString().c_str()); + + if (inv.type == MSG_BLOCK) + { + // Send block from disk + map::iterator mi = mapBlockIndex.find(inv.hash); + if (mi != mapBlockIndex.end()) + { + CBlock block; + block.ReadFromDisk((*mi).second); + pfrom->PushMessage("block", block); + + // Trigger them to send a getblocks request for the next batch of inventory + if (inv.hash == pfrom->hashContinue) + { + // ppcoin: send latest proof-of-work block to allow the + // 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())); + pfrom->PushMessage("inv", vInv); + pfrom->hashContinue = 0; + } + } + } + else if (inv.IsKnownType()) + { + // Send stream from relay memory + bool pushed = false; + { + LOCK(cs_mapRelay); + map::iterator mi = mapRelay.find(inv); + if (mi != mapRelay.end()) { + pfrom->PushMessage(inv.GetCommand(), (*mi).second); + pushed = true; + } + } + if (!pushed && inv.type == MSG_TX) { + LOCK(mempool.cs); + if (mempool.exists(inv.hash)) { + CTransaction tx = mempool.lookup(inv.hash); + CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); + ss.reserve(1000); + ss << tx; + pfrom->PushMessage("tx", ss); + } + } + } + + // Track requests for our stuff + Inventory(inv.hash); + } + } + + + else if (strCommand == "getblocks") + { + CBlockLocator locator; + uint256 hashStop; + vRecv >> locator >> hashStop; + + // Find the last block the caller has in the main chain + CBlockIndex* pindex = locator.GetBlockIndex(); + + // Send the rest of the chain + if (pindex) + pindex = pindex->pnext; + int nLimit = 500; + printf("getblocks %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().substr(0,20).c_str(), nLimit); + for (; pindex; pindex = pindex->pnext) + { + if (pindex->GetBlockHash() == hashStop) + { + printf(" getblocks stopping at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString().substr(0,20).c_str()); + // ppcoin: tell downloading node about the latest block if it's + // without risk being rejected due to stake connection check + if (hashStop != hashBestChain && pindex->GetBlockTime() + nStakeMinAge > pindexBest->GetBlockTime()) + pfrom->PushInventory(CInv(MSG_BLOCK, hashBestChain)); + break; + } + pfrom->PushInventory(CInv(MSG_BLOCK, pindex->GetBlockHash())); + if (--nLimit <= 0) + { + // When this block is requested, we'll send an inv that'll make them + // getblocks the next batch of inventory. + printf(" getblocks stopping at limit %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString().substr(0,20).c_str()); + pfrom->hashContinue = pindex->GetBlockHash(); + break; + } + } + } + else if (strCommand == "checkpoint") + { + CSyncCheckpoint checkpoint; + vRecv >> checkpoint; + + if (checkpoint.ProcessSyncCheckpoint(pfrom)) + { + // Relay + pfrom->hashCheckpointKnown = checkpoint.hashCheckpoint; + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + checkpoint.RelayTo(pnode); + } + } + + else if (strCommand == "getheaders") + { + CBlockLocator locator; + uint256 hashStop; + vRecv >> locator >> hashStop; + + CBlockIndex* pindex = NULL; + if (locator.IsNull()) + { + // If locator is null, return the hashStop block + map::iterator mi = mapBlockIndex.find(hashStop); + if (mi == mapBlockIndex.end()) + return true; + pindex = (*mi).second; + } + else + { + // Find the last block the caller has in the main chain + pindex = locator.GetBlockIndex(); + if (pindex) + pindex = pindex->pnext; + } + + vector vHeaders; + int nLimit = 2000; + printf("getheaders %d to %s\n", (pindex ? pindex->nHeight : -1), hashStop.ToString().substr(0,20).c_str()); + for (; pindex; pindex = pindex->pnext) + { + vHeaders.push_back(pindex->GetBlockHeader()); + if (--nLimit <= 0 || pindex->GetBlockHash() == hashStop) + break; + } + pfrom->PushMessage("headers", vHeaders); + } + + + else if (strCommand == "tx") + { + vector vWorkQueue; + vector vEraseQueue; + CDataStream vMsg(vRecv); + CTxDB txdb("r"); + CTransaction tx; + vRecv >> tx; + + CInv inv(MSG_TX, tx.GetHash()); + pfrom->AddInventoryKnown(inv); + + bool fMissingInputs = false; + if (tx.AcceptToMemoryPool(txdb, true, &fMissingInputs)) + { + SyncWithWallets(tx, NULL, true); + RelayMessage(inv, vMsg); + mapAlreadyAskedFor.erase(inv); + vWorkQueue.push_back(inv.hash); + vEraseQueue.push_back(inv.hash); + + // Recursively process any orphan transactions that depended on this one + for (unsigned int i = 0; i < vWorkQueue.size(); i++) + { + uint256 hashPrev = vWorkQueue[i]; + for (map::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()); + bool fMissingInputs2 = false; + + if (tx.AcceptToMemoryPool(txdb, true, &fMissingInputs2)) + { + printf(" accepted orphan tx %s\n", inv.hash.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); + } + 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()); + } + } + } + + BOOST_FOREACH(uint256 hash, vEraseQueue) + EraseOrphanTx(hash); + } + else if (fMissingInputs) + { + AddOrphanTx(vMsg); + + // DoS prevention: do not allow mapOrphanTransactions to grow unbounded + unsigned int nEvicted = LimitOrphanTxSize(MAX_ORPHAN_TRANSACTIONS); + if (nEvicted > 0) + printf("mapOrphan overflow, removed %u tx\n", nEvicted); + } + if (tx.nDoS) pfrom->Misbehaving(tx.nDoS); + } + + + else if (strCommand == "block") + { + CBlock block; + vRecv >> block; + + printf("received block %s\n", block.GetHash().ToString().substr(0,20).c_str()); + + //block.print(); + //if(block.IsProofOfWork()) printf("block is proof of work\n"); + //if(block.IsProofOfStake()) printf("block is proof of stake\n"); + + CInv inv(MSG_BLOCK, block.GetHash()); + pfrom->AddInventoryKnown(inv); + + if (ProcessBlock(pfrom, &block)) + mapAlreadyAskedFor.erase(inv); + if (block.nDoS) pfrom->Misbehaving(block.nDoS); + } + + + else if (strCommand == "getaddr") + { + pfrom->vAddrToSend.clear(); + vector vAddr = addrman.GetAddr(); + BOOST_FOREACH(const CAddress &addr, vAddr) + pfrom->PushAddress(addr); + } + + + else if (strCommand == "mempool") + { + std::vector vtxid; + mempool.queryHashes(vtxid); + vector vInv; + for (unsigned int i = 0; i < vtxid.size(); i++) { + CInv inv(MSG_TX, vtxid[i]); + vInv.push_back(inv); + if (i == (MAX_INV_SZ - 1)) + break; + } + if (vInv.size() > 0) + pfrom->PushMessage("inv", vInv); + } + + + else if (strCommand == "checkorder") + { + uint256 hashReply; + vRecv >> hashReply; + + if (!GetBoolArg("-allowreceivebyip")) + { + pfrom->PushMessage("reply", hashReply, (int)2, string("")); + return true; + } + + CWalletTx order; + vRecv >> order; + + /// we have a chance to check the order here + + // Keep giving the same key to the same ip until they use it + if (!mapReuseKey.count(pfrom->addr)) + pwalletMain->GetKeyFromPool(mapReuseKey[pfrom->addr], true); + + // Send back approval of order and pubkey to use + CScript scriptPubKey; + scriptPubKey << mapReuseKey[pfrom->addr] << OP_CHECKSIG; + pfrom->PushMessage("reply", hashReply, (int)0, scriptPubKey); + } + + + else if (strCommand == "reply") + { + uint256 hashReply; + vRecv >> hashReply; + + CRequestTracker tracker; + { + LOCK(pfrom->cs_mapRequests); + map::iterator mi = pfrom->mapRequests.find(hashReply); + if (mi != pfrom->mapRequests.end()) + { + tracker = (*mi).second; + pfrom->mapRequests.erase(mi); + } + } + if (!tracker.IsNull()) + tracker.fn(tracker.param1, vRecv); + } + + + else if (strCommand == "ping") + { + if (pfrom->nVersion > BIP0031_VERSION) + { + uint64 nonce = 0; + vRecv >> nonce; + // Echo the message back with the nonce. This allows for two useful features: + // + // 1) A remote node can quickly check if the connection is operational + // 2) Remote nodes can measure the latency of the network thread. If this node + // is overloaded it won't respond to pings quickly and the remote node can + // avoid sending us more work, like chain download requests. + // + // The nonce stops the remote getting confused between different pings: without + // it, if the remote node sends a ping once per second and this node takes 5 + // seconds to respond to each, the 5th ping the remote sends would appear to + // return very quickly. + pfrom->PushMessage("pong", nonce); + } + } + + + else if (strCommand == "alert") + { + CAlert alert; + vRecv >> alert; + + uint256 alertHash = alert.GetHash(); + if (pfrom->setKnown.count(alertHash) == 0) + { + if (alert.ProcessAlert()) + { + // Relay + pfrom->setKnown.insert(alertHash); + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + alert.RelayTo(pnode); + } + } + else { + // Small DoS penalty so peers that send us lots of + // duplicate/expired/invalid-signature/whatever alerts + // eventually get banned. + // This isn't a Misbehaving(100) (immediate ban) because the + // peer might be an older or different implementation with + // a different signature key, etc. + pfrom->Misbehaving(10); + } + } + } + + + else + { + // Ignore unknown commands for extensibility + } + + + // Update the last seen time for this node's address + if (pfrom->fNetworkNode) + if (strCommand == "version" || strCommand == "addr" || strCommand == "inv" || strCommand == "getdata" || strCommand == "ping") + AddressCurrentlyConnected(pfrom->addr); + + + return true; +} + +bool ProcessMessages(CNode* pfrom) +{ + CDataStream& vRecv = pfrom->vRecv; + if (vRecv.empty()) + return true; + //if (fDebug) + // printf("ProcessMessages(%u bytes)\n", vRecv.size()); + + // + // Message format + // (4) message start + // (12) command + // (4) size + // (4) checksum + // (x) data + // + + loop + { + // Don't bother if send buffer is too full to respond anyway + if (pfrom->vSend.size() >= SendBufferSize()) + break; + + // 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); + } + 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; + if (!hdr.IsValid()) + { + printf("\n\nPROCESSMESSAGE: ERRORS IN HEADER %s\n\n\n", hdr.GetCommand().c_str()); + continue; + } + string strCommand = hdr.GetCommand(); + + // 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 + uint256 hash = Hash(vRecv.begin(), vRecv.begin() + nMessageSize); + unsigned int nChecksum = 0; + memcpy(&nChecksum, &hash, sizeof(nChecksum)); + if (nChecksum != hdr.nChecksum) + { + printf("ProcessMessages(%s, %u bytes) : CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n", + strCommand.c_str(), nMessageSize, nChecksum, hdr.nChecksum); + 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); + } + if (fShutdown) + return true; + } + catch (std::ios_base::failure& e) + { + if (strstr(e.what(), "end of data")) + { + // Allow exceptions from under-length message on vRecv + printf("ProcessMessages(%s, %u bytes) : Exception '%s' caught, normally caused by a message being shorter than its stated length\n", strCommand.c_str(), nMessageSize, e.what()); + } + else if (strstr(e.what(), "size too large")) + { + // Allow exceptions from over-long size + printf("ProcessMessages(%s, %u bytes) : Exception '%s' caught\n", strCommand.c_str(), nMessageSize, e.what()); + } + else + { + PrintExceptionContinue(&e, "ProcessMessages()"); + } + } + catch (std::exception& e) { + PrintExceptionContinue(&e, "ProcessMessages()"); + } catch (...) { + PrintExceptionContinue(NULL, "ProcessMessages()"); + } + + if (!fRet) + printf("ProcessMessage(%s, %u bytes) FAILED\n", strCommand.c_str(), nMessageSize); + } + + vRecv.Compact(); + return true; +} + + +bool SendMessages(CNode* pto, bool fSendTrickle) +{ + TRY_LOCK(cs_main, lockMain); + if (lockMain) { + // Don't send anything until we get their version message + if (pto->nVersion == 0) + return true; + + // 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->nVersion > BIP0031_VERSION) + pto->PushMessage("ping", nonce); + else + pto->PushMessage("ping"); + } + + // Resend wallet transactions that haven't gotten in a block yet + ResendWalletTransactions(); + + // Address refresh broadcast + static int64 nLastRebroadcast; + if (!IsInitialBlockDownload() && (GetTime() - nLastRebroadcast > 24 * 60 * 60)) + { + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + { + // Periodically clear setAddrKnown to allow refresh broadcasts + if (nLastRebroadcast) + pnode->setAddrKnown.clear(); + + // Rebroadcast our address + if (!fNoListen) + { + CAddress addr = GetLocalAddress(&pnode->addr); + if (addr.IsRoutable()) + pnode->PushAddress(addr); + } + } + } + nLastRebroadcast = GetTime(); + } + + // + // Message: addr + // + if (fSendTrickle) + { + vector vAddr; + vAddr.reserve(pto->vAddrToSend.size()); + BOOST_FOREACH(const CAddress& addr, pto->vAddrToSend) + { + // returns true if wasn't already contained in the set + if (pto->setAddrKnown.insert(addr).second) + { + vAddr.push_back(addr); + // receiver rejects addr messages larger than 1000 + if (vAddr.size() >= 1000) + { + pto->PushMessage("addr", vAddr); + vAddr.clear(); + } + } + } + pto->vAddrToSend.clear(); + if (!vAddr.empty()) + pto->PushMessage("addr", vAddr); + } + + + // + // Message: inventory + // + vector vInv; + vector vInvWait; + { + LOCK(pto->cs_inventory); + vInv.reserve(pto->vInventoryToSend.size()); + vInvWait.reserve(pto->vInventoryToSend.size()); + BOOST_FOREACH(const CInv& inv, pto->vInventoryToSend) + { + if (pto->setInventoryKnown.count(inv)) + continue; + + // trickle out tx inv to protect privacy + if (inv.type == MSG_TX && !fSendTrickle) + { + // 1/4 of tx invs blast to all immediately + static uint256 hashSalt; + if (hashSalt == 0) + hashSalt = GetRandHash(); + uint256 hashRand = inv.hash ^ hashSalt; + hashRand = Hash(BEGIN(hashRand), END(hashRand)); + bool fTrickleWait = ((hashRand & 3) != 0); + + // always trickle our own transactions + if (!fTrickleWait) + { + CWalletTx wtx; + if (GetTransaction(inv.hash, wtx)) + if (wtx.fFromMe) + fTrickleWait = true; + } + + if (fTrickleWait) + { + vInvWait.push_back(inv); + continue; + } + } + + // returns true if wasn't already contained in the set + if (pto->setInventoryKnown.insert(inv).second) + { + vInv.push_back(inv); + if (vInv.size() >= 1000) + { + pto->PushMessage("inv", vInv); + vInv.clear(); + } + } + } + pto->vInventoryToSend = vInvWait; + } + if (!vInv.empty()) + pto->PushMessage("inv", vInv); + + + // + // Message: getdata + // + vector vGetData; + int64 nNow = GetTime() * 1000000; + CTxDB txdb("r"); + while (!pto->mapAskFor.empty() && (*pto->mapAskFor.begin()).first <= nNow) + { + const CInv& inv = (*pto->mapAskFor.begin()).second; + if (!AlreadyHave(txdb, inv)) + { + if (fDebugNet) + printf("sending getdata: %s\n", inv.ToString().c_str()); + vGetData.push_back(inv); + if (vGetData.size() >= 1000) + { + pto->PushMessage("getdata", vGetData); + vGetData.clear(); + } + mapAlreadyAskedFor[inv] = nNow; + } + pto->mapAskFor.erase(pto->mapAskFor.begin()); + } + if (!vGetData.empty()) + pto->PushMessage("getdata", vGetData); + + } + return true; +} + + + + + + + + + + + + + + +////////////////////////////////////////////////////////////////////////////// +// +// curecoinMiner +// + +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]; +} + +// +// ScanHash scans nonces looking for a hash with at least some zero bits. +// It operates on big endian data. Caller does the byte reversing. +// All input buffers are 16-byte aligned. nNonce is usually preserved +// between calls, but periodically or if nNonce is 0xffff0000 or above, +// the block is rebuilt and nNonce starts over at zero. +// +unsigned int static ScanHash_CryptoPP(char* pmidstate, char* pdata, char* phash1, char* phash, unsigned int& nHashesDone) +{ + unsigned int& nNonce = *(unsigned int*)(pdata + 12); + for (;;) + { + // Crypto++ SHA-256 + // Hash pdata using pmidstate as the starting state into + // preformatted buffer phash1, then hash phash1 into phash + nNonce++; + SHA256Transform(phash1, pdata, pmidstate); + SHA256Transform(phash, phash1, pSHA256InitState); + + // Return the nonce if the hash has at least some zero bits, + // caller will check if it has enough to reach the target + if (((unsigned short*)phash)[14] == 0) + return nNonce; + + // If nothing found after trying for a while, return -1 + if ((nNonce & 0xffff) == 0) + { + nHashesDone = 0xffff+1; + return (unsigned int) -1; + } + } +} + +// 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); + + // ppcoin: 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) + { + 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; + + // ppcoin: 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 * 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 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("curecoinMiner : proof-of-work not meeting target"); + + //// debug print + printf("curecoinMiner:\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("curecoinMiner : 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("curecoinMiner : ProcessBlock, block not accepted"); + } + + return true; +} + +void static ThreadcurecoinMiner(void* parg); + +static bool fGeneratecurecoins = false; +static bool fLimitProcessors = false; +static int nLimitProcessors = -1; + +void curecoinMiner(CWallet *pwallet, bool fProofOfStake) +{ + printf("CPUMiner started for proof-of-%s\n", fProofOfStake? "stake" : "work"); + SetThreadPriority(THREAD_PRIORITY_LOWEST); + + // Make this thread recognisable as the mining thread + RenameThread("curecoin-miner"); + + // Each thread has its own key and counter + CReserveKey reservekey(pwallet); + unsigned int nExtraNonce = 0; + + while (fGeneratecurecoins || fProofOfStake) + { + if (fShutdown) + return; + while (vNodes.empty() || IsInitialBlockDownload()) + { + Sleep(1000); + if (fShutdown) + return; + if ((!fGeneratecurecoins) && !fProofOfStake) + return; + } + + while (pwallet->IsLocked()) + { + strMintWarning = strMintMessage; + Sleep(1000); + } + strMintWarning = ""; + + // + // 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) + { + // ppcoin: if proof-of-stake block found then process block + if (pblock->IsProofOfStake()) + { + if (!pblock->SignBlock(*pwalletMain)) + { + strMintWarning = strMintMessage; + continue; + } + strMintWarning = ""; + printf("CPUMiner : proof-of-stake block found %s\n", pblock->GetHash().ToString().c_str()); + SetThreadPriority(THREAD_PRIORITY_NORMAL); + CheckWork(pblock.get(), *pwalletMain, reservekey); + SetThreadPriority(THREAD_PRIORITY_LOWEST); + } + Sleep(500); + continue; + } + + printf("Running curecoinMiner with %"PRIszu" transactions in block (%u bytes)\n", pblock->vtx.size(), + ::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION)); + + // + // Pre-build hash buffers + // + char pmidstatebuf[32+16]; char* pmidstate = alignup<16>(pmidstatebuf); + char pdatabuf[128+16]; char* pdata = alignup<16>(pdatabuf); + char phash1buf[64+16]; char* phash1 = alignup<16>(phash1buf); + + FormatHashBuffers(pblock.get(), pmidstate, pdata, phash1); + + unsigned int& nBlockTime = *(unsigned int*)(pdata + 64 + 4); + unsigned int& nBlockNonce = *(unsigned int*)(pdata + 64 + 12); + + + // + // Search + // + int64 nStart = GetTime(); + uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); + uint256 hashbuf[2]; + uint256& hash = *alignup<16>(hashbuf); + loop + { + unsigned int nHashesDone = 0; + unsigned int nNonceFound; + + // Crypto++ SHA-256 + nNonceFound = ScanHash_CryptoPP(pmidstate, pdata + 64, phash1, + (char*)&hash, nHashesDone); + + // Check if something found + if (nNonceFound != (unsigned int) -1) + { + for (unsigned int i = 0; i < sizeof(hash)/4; i++) + ((unsigned int*)&hash)[i] = ByteReverse(((unsigned int*)&hash)[i]); + + if (hash <= hashTarget) + { + // Found a solution + pblock->nNonce = ByteReverse(nNonceFound); + assert(hash == pblock->GetHash()); + + SetThreadPriority(THREAD_PRIORITY_NORMAL); + CheckWork(pblock.get(), *pwalletMain, reservekey); + SetThreadPriority(THREAD_PRIORITY_LOWEST); + break; + } + } + + // Meter hashes/sec + static int64 nHashCounter; + if (nHPSTimerStart == 0) + { + nHPSTimerStart = GetTimeMillis(); + nHashCounter = 0; + } + else + nHashCounter += nHashesDone; + if (GetTimeMillis() - nHPSTimerStart > 4000) + { + static CCriticalSection cs; + { + LOCK(cs); + if (GetTimeMillis() - nHPSTimerStart > 4000) + { + dHashesPerSec = 1000.0 * nHashCounter / (GetTimeMillis() - nHPSTimerStart); + nHPSTimerStart = GetTimeMillis(); + nHashCounter = 0; + static int64 nLogTime; + if (GetTime() - nLogTime > 30 * 60) + { + nLogTime = GetTime(); + 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 (!fGeneratecurecoins) + return; + if (fLimitProcessors && vnThreadsRunning[THREAD_MINER] > nLimitProcessors) + return; + if (vNodes.empty()) + break; + if (nBlockNonce >= 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); + nBlockTime = ByteReverse(pblock->nTime); + + if (pblock->GetBlockTime() >= (int64)pblock->vtx[0].nTime + nMaxClockDrift) + break; // need to update coinbase timestamp + } + } +} + +void static ThreadcurecoinMiner(void* parg) +{ + CWallet* pwallet = (CWallet*)parg; + try + { + vnThreadsRunning[THREAD_MINER]++; + curecoinMiner(pwallet, false); + vnThreadsRunning[THREAD_MINER]--; + } + catch (std::exception& e) { + vnThreadsRunning[THREAD_MINER]--; + PrintException(&e, "ThreadcurecoinMiner()"); + } catch (...) { + vnThreadsRunning[THREAD_MINER]--; + PrintException(NULL, "ThreadcurecoinMiner()"); + } + nHPSTimerStart = 0; + if (vnThreadsRunning[THREAD_MINER] == 0) + dHashesPerSec = 0; + printf("ThreadcurecoinMiner exiting, %d threads remaining\n", vnThreadsRunning[THREAD_MINER]); +} + + +void Generatecurecoins(bool fGenerate, CWallet* pwallet) +{ + fGeneratecurecoins = fGenerate; + nLimitProcessors = GetArg("-genproclimit", -1); + if (nLimitProcessors == 0) + fGeneratecurecoins = 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 curecoinMiner threads\n", nAddThreads); + for (int i = 0; i < nAddThreads; i++) + { + if (!NewThread(ThreadcurecoinMiner, pwallet)) + printf("Error: NewThread(ThreadcurecoinMiner) failed\n"); + Sleep(10); + } + } +} diff --git a/src/main.h b/src/main.h new file mode 100644 index 0000000..e86c66d --- /dev/null +++ b/src/main.h @@ -0,0 +1,1614 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_MAIN_H +#define curecoin_MAIN_H + +#include "bignum.h" +#include "sync.h" +#include "net.h" +#include "script.h" + +#include + +class CWallet; +class CBlock; +class CBlockIndex; +class CKeyItem; +class CReserveKey; +class COutPoint; + +class CAddress; +class CInv; +class CRequestTracker; +class CNode; + +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 = 0.0001 * COIN; +static const int64 MIN_RELAY_TX_FEE = MIN_TX_FEE; +static const int64 MAX_MONEY = 156000000 * COIN;//156 million +static const int64 MAX_MINT_PROOF_OF_WORK = 13 * COIN; //Lucky number 13 Coins per block +static const int64 MAX_MINT_PROOF_OF_STAKE = 0.01 * MAX_MINT_PROOF_OF_WORK; //1% annual interest reward the folders and holders +static const int64 MIN_TXOUT_AMOUNT = MIN_TX_FEE; +static const unsigned int MAX_TX_COMMENT_LEN = 268; // curecoin: 256 bytes + 12 little extra + +inline bool MoneyRange(int64 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 + +#ifdef USE_UPNP +static const int fHaveUPnP = true; +#else +static const int fHaveUPnP = false; +#endif + +static const uint256 hashGenesisBlockOfficial("0x00000ce427729d5393dbf9f464e7a1d2c039e393e881f93448516b1530b688fc"); +static const uint256 hashGenesisBlockTestNet("0x"); + +static const int64 nMaxClockDrift = 2 * 60 * 60; // two hours + +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 int nCoinbaseMaturity; +extern int nBestHeight; +extern CBigNum bnBestChainTrust; +extern CBigNum bnBestInvalidTrust; +extern uint256 hashBestChain; +extern CBlockIndex* pindexBest; +extern unsigned int nTransactionsUpdated; +extern uint64 nLastBlockTx; +extern uint64 nLastBlockSize; +extern int64 nLastCoinStakeSearchInterval; +extern const std::string strMessageMagic; +extern double dHashesPerSec; +extern int64 nHPSTimerStart; +extern int64 nTimeBestReceived; +extern CCriticalSection cs_setpwalletRegistered; +extern std::set setpwalletRegistered; +extern unsigned char pchMessageStart[4]; +extern std::map mapOrphanBlocks; + +// Settings +extern int64 nTransactionFee; + +// Minimum disk space required - used in CheckDiskSpace() +static const uint64 nMinDiskSpace = 52428800; + + +class CReserveKey; +class CTxDB; +class CTxIndex; + +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); +FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode="rb"); +FILE* AppendBlockFile(unsigned int& nFileRet); +bool LoadBlockIndex(bool fAllowNew=true); +void PrintBlockTree(); +CBlockIndex* FindBlockByHeight(int nHeight); +bool ProcessMessages(CNode* pfrom); +bool SendMessages(CNode* pto, bool fSendTrickle); +bool LoadExternalBlockFile(FILE* fileIn); +void Generatecurecoins(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); +unsigned int ComputeMinWork(unsigned int nBase, int64 nTime); +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 curecoinMiner(CWallet *pwallet, bool fProofOfStake); +void ResendWalletTransactions(); + + + + + + + + + + +bool GetWalletFile(CWallet* pwallet, std::string &strWalletFileOut); + +/** Position on disk for a particular transaction. */ +class CDiskTxPos +{ +public: + unsigned int nFile; + unsigned int nBlockPos; + unsigned int nTxPos; + + CDiskTxPos() + { + SetNull(); + } + + CDiskTxPos(unsigned int nFileIn, unsigned int nBlockPosIn, unsigned int nTxPosIn) + { + nFile = nFileIn; + nBlockPos = nBlockPosIn; + nTxPos = nTxPosIn; + } + + IMPLEMENT_SERIALIZE( READWRITE(FLATDATA(*this)); ) + void SetNull() { nFile = (unsigned int) -1; nBlockPos = 0; nTxPos = 0; } + bool IsNull() const { return (nFile == (unsigned int) -1); } + + friend bool operator==(const CDiskTxPos& a, const CDiskTxPos& b) + { + return (a.nFile == b.nFile && + a.nBlockPos == b.nBlockPos && + a.nTxPos == b.nTxPos); + } + + friend bool operator!=(const CDiskTxPos& a, const CDiskTxPos& b) + { + return !(a == b); + } + + + std::string ToString() const + { + if (IsNull()) + return "null"; + else + return strprintf("(nFile=%u, nBlockPos=%u, nTxPos=%u)", nFile, nBlockPos, nTxPos); + } + + void print() const + { + printf("%s", ToString().c_str()); + } +}; + + + +/** An inpoint - a combination of a transaction and an index n into its vin */ +class CInPoint +{ +public: + CTransaction* ptx; + unsigned int n; + + CInPoint() { SetNull(); } + CInPoint(CTransaction* ptxIn, unsigned int nIn) { ptx = ptxIn; n = nIn; } + void SetNull() { ptx = NULL; n = (unsigned int) -1; } + bool IsNull() const { return (ptx == NULL && n == (unsigned int) -1); } +}; + + + +/** An outpoint - a combination of a transaction hash and an index n into its vout */ +class COutPoint +{ +public: + uint256 hash; + unsigned int n; + + COutPoint() { SetNull(); } + COutPoint(uint256 hashIn, unsigned int nIn) { hash = hashIn; n = nIn; } + IMPLEMENT_SERIALIZE( READWRITE(FLATDATA(*this)); ) + void SetNull() { hash = 0; n = (unsigned int) -1; } + bool IsNull() const { return (hash == 0 && n == (unsigned int) -1); } + + friend bool operator<(const COutPoint& a, const COutPoint& b) + { + return (a.hash < b.hash || (a.hash == b.hash && a.n < b.n)); + } + + friend bool operator==(const COutPoint& a, const COutPoint& b) + { + return (a.hash == b.hash && a.n == b.n); + } + + friend bool operator!=(const COutPoint& a, const COutPoint& b) + { + return !(a == b); + } + + std::string ToString() const + { + return strprintf("COutPoint(%s, %u)", hash.ToString().substr(0,10).c_str(), n); + } + + void print() const + { + printf("%s\n", ToString().c_str()); + } +}; + + + + +/** An input of a transaction. It contains the location of the previous + * transaction's output that it claims and a signature that matches the + * output's public key. + */ +class CTxIn +{ +public: + COutPoint prevout; + CScript scriptSig; + unsigned int nSequence; + + CTxIn() + { + nSequence = std::numeric_limits::max(); + } + + explicit CTxIn(COutPoint prevoutIn, CScript scriptSigIn=CScript(), unsigned int nSequenceIn=std::numeric_limits::max()) + { + prevout = prevoutIn; + scriptSig = scriptSigIn; + nSequence = nSequenceIn; + } + + CTxIn(uint256 hashPrevTx, unsigned int nOut, CScript scriptSigIn=CScript(), unsigned int nSequenceIn=std::numeric_limits::max()) + { + prevout = COutPoint(hashPrevTx, nOut); + scriptSig = scriptSigIn; + nSequence = nSequenceIn; + } + + IMPLEMENT_SERIALIZE + ( + READWRITE(prevout); + READWRITE(scriptSig); + READWRITE(nSequence); + ) + + bool IsFinal() const + { + return (nSequence == std::numeric_limits::max()); + } + + friend bool operator==(const CTxIn& a, const CTxIn& b) + { + return (a.prevout == b.prevout && + a.scriptSig == b.scriptSig && + a.nSequence == b.nSequence); + } + + friend bool operator!=(const CTxIn& a, const CTxIn& b) + { + return !(a == b); + } + + std::string ToStringShort() const + { + return strprintf(" %s %d", prevout.hash.ToString().c_str(), prevout.n); + } + + std::string ToString() const + { + std::string str; + str += "CTxIn("; + str += prevout.ToString(); + if (prevout.IsNull()) + str += strprintf(", coinbase %s", HexStr(scriptSig).c_str()); + else + str += strprintf(", scriptSig=%s", scriptSig.ToString().substr(0,24).c_str()); + if (nSequence != std::numeric_limits::max()) + str += strprintf(", nSequence=%u", nSequence); + str += ")"; + return str; + } + + void print() const + { + printf("%s\n", ToString().c_str()); + } +}; + + + + +/** An output of a transaction. It contains the public key that the next input + * must be able to sign with to claim it. + */ +class CTxOut +{ +public: + int64 nValue; + CScript scriptPubKey; + + CTxOut() + { + SetNull(); + } + + CTxOut(int64 nValueIn, CScript scriptPubKeyIn) + { + nValue = nValueIn; + scriptPubKey = scriptPubKeyIn; + } + + IMPLEMENT_SERIALIZE + ( + READWRITE(nValue); + READWRITE(scriptPubKey); + ) + + void SetNull() + { + nValue = -1; + scriptPubKey.clear(); + } + + bool IsNull() + { + return (nValue == -1); + } + + void SetEmpty() + { + nValue = 0; + scriptPubKey.clear(); + } + + bool IsEmpty() const + { + return (nValue == 0 && scriptPubKey.empty()); + } + + uint256 GetHash() const + { + return SerializeHash(*this); + } + + friend bool operator==(const CTxOut& a, const CTxOut& b) + { + return (a.nValue == b.nValue && + a.scriptPubKey == b.scriptPubKey); + } + + friend bool operator!=(const CTxOut& a, const CTxOut& b) + { + return !(a == b); + } + + std::string ToStringShort() const + { + return strprintf(" out %s %s", FormatMoney(nValue).c_str(), scriptPubKey.ToString(true).c_str()); + } + + std::string ToString() const + { + if (IsEmpty()) return "CTxOut(empty)"; + if (scriptPubKey.size() < 6) + return "CTxOut(error)"; + return strprintf("CTxOut(nValue=%s, scriptPubKey=%s)", FormatMoney(nValue).c_str(), scriptPubKey.ToString().c_str()); + } + + void print() const + { + printf("%s\n", ToString().c_str()); + } +}; + + + + +enum GetMinFee_mode +{ + GMF_BLOCK, + GMF_RELAY, + GMF_SEND, +}; + +typedef std::map > MapPrevTx; + +/** The basic transaction that is broadcasted on the network and contained in + * blocks. A transaction can contain multiple inputs and outputs. + */ +class CTransaction +{ +public: + static const int CURRENT_VERSION=1; + int nVersion; + unsigned int nTime; + std::vector vin; + std::vector vout; + unsigned int nLockTime; + std::string strTxComment; + + // Denial-of-service detection: + mutable int nDoS; + bool DoS(int nDoSIn, bool fIn) const { nDoS += nDoSIn; return fIn; } + + CTransaction() + { + SetNull(); + } + + IMPLEMENT_SERIALIZE + ( + READWRITE(this->nVersion); + nVersion = this->nVersion; + READWRITE(nTime); + READWRITE(vin); + READWRITE(vout); + READWRITE(nLockTime); + READWRITE(strTxComment); + ) + + void SetNull() + { + nVersion = CTransaction::CURRENT_VERSION; + nTime = GetAdjustedTime(); + vin.clear(); + vout.clear(); + nLockTime = 0; + strTxComment.clear(); + nDoS = 0; // Denial-of-service prevention + } + + bool IsNull() const + { + return (vin.empty() && vout.empty()); + } + + uint256 GetHash() const + { + return SerializeHash(*this); + } + + bool IsFinal(int nBlockHeight=0, int64 nBlockTime=0) const + { + // Time based nLockTime implemented in 0.1.6 + if (nLockTime == 0) + return true; + if (nBlockHeight == 0) + nBlockHeight = nBestHeight; + if (nBlockTime == 0) + nBlockTime = GetAdjustedTime(); + if ((int64)nLockTime < ((int64)nLockTime < LOCKTIME_THRESHOLD ? (int64)nBlockHeight : nBlockTime)) + return true; + BOOST_FOREACH(const CTxIn& txin, vin) + if (!txin.IsFinal()) + return false; + return true; + } + + bool IsNewerThan(const CTransaction& old) const + { + if (vin.size() != old.vin.size()) + return false; + for (unsigned int i = 0; i < vin.size(); i++) + if (vin[i].prevout != old.vin[i].prevout) + return false; + + bool fNewer = false; + unsigned int nLowest = std::numeric_limits::max(); + for (unsigned int i = 0; i < vin.size(); i++) + { + if (vin[i].nSequence != old.vin[i].nSequence) + { + if (vin[i].nSequence <= nLowest) + { + fNewer = false; + nLowest = vin[i].nSequence; + } + if (old.vin[i].nSequence < nLowest) + { + fNewer = true; + nLowest = old.vin[i].nSequence; + } + } + } + return fNewer; + } + + bool IsCoinBase() const + { + return (vin.size() == 1 && vin[0].prevout.IsNull() && vout.size() >= 1); + } + + bool IsCoinStake() const + { + // ppcoin: the coin stake transaction is marked with the first output empty + return (vin.size() > 0 && (!vin[0].prevout.IsNull()) && vout.size() >= 2 && vout[0].IsEmpty()); + } + + /** Check for standard transaction types + @return True if all outputs (scriptPubKeys) use only standard transaction forms + */ + bool IsStandard() const; + + /** Check for standard transaction types + @param[in] mapInputs Map of previous transactions that have outputs we're spending + @return True if all inputs (scriptSigs) use only standard transaction forms + @see CTransaction::FetchInputs + */ + bool AreInputsStandard(const MapPrevTx& mapInputs) const; + + /** Count ECDSA signature operations the old-fashioned (pre-0.6) way + @return number of sigops this transaction's outputs will produce when spent + @see CTransaction::FetchInputs + */ + unsigned int GetLegacySigOpCount() const; + + /** Count ECDSA signature operations in pay-to-script-hash inputs. + + @param[in] mapInputs Map of previous transactions that have outputs we're spending + @return maximum number of sigops required to validate this transaction's inputs + @see CTransaction::FetchInputs + */ + unsigned int GetP2SHSigOpCount(const MapPrevTx& mapInputs) const; + + /** Amount of curecoins spent by this transaction. + @return sum of all outputs (note: does not include fees) + */ + int64 GetValueOut() const + { + int64 nValueOut = 0; + BOOST_FOREACH(const CTxOut& txout, vout) + { + nValueOut += txout.nValue; + if (!MoneyRange(txout.nValue) || !MoneyRange(nValueOut)) + throw std::runtime_error("CTransaction::GetValueOut() : value out of range"); + } + return nValueOut; + } + + /** Amount of curecoins 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. + + @param[in] mapInputs Map of previous transactions that have outputs we're spending + @return Sum of value of all inputs (scriptSigs) + @see CTransaction::FetchInputs + */ + int64 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 * 1440 / 250; + } + + int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=false, enum GetMinFee_mode mode=GMF_BLOCK) const; + + bool ReadFromDisk(CDiskTxPos pos, FILE** pfileRet=NULL) + { + CAutoFile filein = CAutoFile(OpenBlockFile(pos.nFile, 0, pfileRet ? "rb+" : "rb"), SER_DISK, CLIENT_VERSION); + if (!filein) + return error("CTransaction::ReadFromDisk() : OpenBlockFile failed"); + + // Read transaction + if (fseek(filein, pos.nTxPos, SEEK_SET) != 0) + return error("CTransaction::ReadFromDisk() : fseek failed"); + + try { + filein >> *this; + } + catch (std::exception &e) { + return error("%s() : deserialize or I/O error", __PRETTY_FUNCTION__); + } + + // Return file pointer + if (pfileRet) + { + if (fseek(filein, pos.nTxPos, SEEK_SET) != 0) + return error("CTransaction::ReadFromDisk() : second fseek failed"); + *pfileRet = filein.release(); + } + return true; + } + + friend bool operator==(const CTransaction& a, const CTransaction& b) + { + return (a.nVersion == b.nVersion && + a.nTime == b.nTime && + a.vin == b.vin && + a.vout == b.vout && + a.nLockTime == b.nLockTime); + } + + friend bool operator!=(const CTransaction& a, const CTransaction& b) + { + return !(a == b); + } + + std::string ToStringShort() const + { + std::string str; + str += strprintf("%s %s", GetHash().ToString().c_str(), IsCoinBase()? "base" : (IsCoinStake()? "stake" : "user")); + return str; + } + + std::string ToString() const + { + std::string str; + str += IsCoinBase()? "Coinbase" : (IsCoinStake()? "Coinstake" : "CTransaction"); + str += strprintf("(hash=%s, nTime=%d, ver=%d, vin.size=%"PRIszu", vout.size=%"PRIszu", nLockTime=%d, strTxComment=%s)\n", + GetHash().ToString().substr(0,10).c_str(), + nTime, + nVersion, + vin.size(), + vout.size(), + nLockTime, + strTxComment.substr(0,30).c_str() + ); + for (unsigned int i = 0; i < vin.size(); i++) + str += " " + vin[i].ToString() + "\n"; + for (unsigned int i = 0; i < vout.size(); i++) + str += " " + vout[i].ToString() + "\n"; + return str; + } + + void print() const + { + printf("%s", ToString().c_str()); + } + + + bool ReadFromDisk(CTxDB& txdb, COutPoint prevout, CTxIndex& txindexRet); + bool ReadFromDisk(CTxDB& txdb, COutPoint prevout); + bool ReadFromDisk(COutPoint prevout); + bool DisconnectInputs(CTxDB& txdb); + + /** Fetch from memory and/or disk. inputsRet keys are transaction hashes. + + @param[in] txdb Transaction database + @param[in] mapTestPool List of pending changes to the transaction index database + @param[in] fBlock True if being called to add a new best-block to the chain + @param[in] fMiner True if being called by CreateNewBlock + @param[out] inputsRet Pointers to this transaction's inputs + @param[out] fInvalid returns true if transaction is invalid + @return Returns true if all inputs are in txdb or mapTestPool + */ + bool FetchInputs(CTxDB& txdb, const std::map& mapTestPool, + bool fBlock, bool fMiner, MapPrevTx& inputsRet, bool& fInvalid); + + /** Sanity check previous transactions, then, if all checks succeed, + mark them as spent by this transaction. + + @param[in] inputs Previous transactions (from FetchInputs) + @param[out] mapTestPool Keeps track of inputs that need to be updated on disk + @param[in] posThisTx Position of this transaction on disk + @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); + bool ClientConnectInputs(); + bool CheckTransaction() const; + bool AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs=true, bool* pfMissingInputs=NULL); + bool GetCoinAge(CTxDB& txdb, uint64& nCoinAge) const; // ppcoin: get transaction coin age + +protected: + const CTxOut& GetOutputFor(const CTxIn& input, const MapPrevTx& inputs) const; +}; + + + + + +/** A transaction with a merkle branch linking it to the block chain. */ +class CMerkleTx : public CTransaction +{ +public: + uint256 hashBlock; + std::vector vMerkleBranch; + int nIndex; + + // memory only + mutable bool fMerkleVerified; + + + CMerkleTx() + { + Init(); + } + + CMerkleTx(const CTransaction& txIn) : CTransaction(txIn) + { + Init(); + } + + void Init() + { + hashBlock = 0; + nIndex = -1; + fMerkleVerified = false; + } + + + IMPLEMENT_SERIALIZE + ( + nSerSize += SerReadWrite(s, *(CTransaction*)this, nType, nVersion, ser_action); + nVersion = this->nVersion; + READWRITE(hashBlock); + READWRITE(vMerkleBranch); + READWRITE(nIndex); + ) + + + int SetMerkleBranch(const CBlock* pblock=NULL); + int GetDepthInMainChain(CBlockIndex* &pindexRet) const; + int GetDepthInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); } + bool IsInMainChain() const { return GetDepthInMainChain() > 0; } + int GetBlocksToMaturity() const; + bool AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs=true); + bool AcceptToMemoryPool(); +}; + + + + +/** A txdb record that contains the disk location of a transaction and the + * locations of transactions that spend its outputs. vSpent is really only + * used as a flag, but having the location is very helpful for debugging. + */ +class CTxIndex +{ +public: + CDiskTxPos pos; + std::vector vSpent; + + CTxIndex() + { + SetNull(); + } + + CTxIndex(const CDiskTxPos& posIn, unsigned int nOutputs) + { + pos = posIn; + vSpent.resize(nOutputs); + } + + IMPLEMENT_SERIALIZE + ( + if (!(nType & SER_GETHASH)) + READWRITE(nVersion); + READWRITE(pos); + READWRITE(vSpent); + ) + + void SetNull() + { + pos.SetNull(); + vSpent.clear(); + } + + bool IsNull() + { + return pos.IsNull(); + } + + friend bool operator==(const CTxIndex& a, const CTxIndex& b) + { + return (a.pos == b.pos && + a.vSpent == b.vSpent); + } + + friend bool operator!=(const CTxIndex& a, const CTxIndex& b) + { + return !(a == b); + } + int GetDepthInMainChain() const; + +}; + + + + + +/** Nodes collect new transactions into a block, hash them into a hash tree, + * and scan through nonce values to make the block's hash satisfy proof-of-work + * requirements. When they solve the proof-of-work, they broadcast the block + * to everyone and the block is added to the block chain. The first transaction + * in the block is a special one that creates a new coin owned by the creator + * of the block. + * + * Blocks are appended to blk0001.dat files on disk. Their location on disk + * is indexed by CBlockIndex objects in memory. + */ +class CBlock +{ +public: + // header + static const int CURRENT_VERSION=4; + int nVersion; + uint256 hashPrevBlock; + uint256 hashMerkleRoot; + unsigned int nTime; + unsigned int nBits; + unsigned int nNonce; + + // network and disk + std::vector vtx; + + // ppcoin: block signature - signed by one of the coin base txout[N]'s owner + std::vector vchBlockSig; + + // memory only + mutable std::vector vMerkleTree; + + // Denial-of-service detection: + mutable int nDoS; + bool DoS(int nDoSIn, bool fIn) const { nDoS += nDoSIn; return fIn; } + + CBlock() + { + SetNull(); + } + + IMPLEMENT_SERIALIZE + ( + READWRITE(this->nVersion); + nVersion = this->nVersion; + READWRITE(hashPrevBlock); + READWRITE(hashMerkleRoot); + READWRITE(nTime); + READWRITE(nBits); + READWRITE(nNonce); + + // ConnectBlock depends on vtx following header to generate CDiskTxPos + if (!(nType & (SER_GETHASH|SER_BLOCKHEADERONLY))) + { + READWRITE(vtx); + READWRITE(vchBlockSig); + } + else if (fRead) + { + const_cast(this)->vtx.clear(); + const_cast(this)->vchBlockSig.clear(); + } + ) + + void SetNull() + { + nVersion = CBlock::CURRENT_VERSION; + hashPrevBlock = 0; + hashMerkleRoot = 0; + nTime = 0; + nBits = 0; + nNonce = 0; + vtx.clear(); + vchBlockSig.clear(); + vMerkleTree.clear(); + nDoS = 0; + } + + bool IsNull() const + { + return (nBits == 0); + } + + uint256 GetHash() const + { + return SerializeHash(*this); + } + + int64 GetBlockTime() const + { + return (int64)nTime; + } + + void UpdateTime(const CBlockIndex* pindexPrev); + + // ppcoin: entropy bit for stake modifier if chosen by modifier + unsigned int GetStakeEntropyBit(unsigned int nHeight) const + { + // Protocol switch to support p2pool at curecoin block #9689 + if (nHeight >= 9689 || fTestNet) + { + // 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); + return nEntropyBit; + } + // Before curecoin block #9689 - old protocol + uint160 hashSig = Hash160(vchBlockSig); + if (fDebug && GetBoolArg("-printstakemodifier")) + printf("GetStakeEntropyBit: hashSig=%s", hashSig.ToString().c_str()); + hashSig >>= 159; // take the first bit of the hash + if (fDebug && GetBoolArg("-printstakemodifier")) + printf(" entropybit=%"PRI64d"\n", hashSig.Get64()); + return hashSig.Get64(); + } + + // ppcoin: two types of block: proof-of-work or proof-of-stake + bool IsProofOfStake() const + { + return (vtx.size() > 1 && vtx[1].IsCoinStake()); + } + + bool IsProofOfWork() const + { + return !IsProofOfStake(); + } + + std::pair GetProofOfStake() const + { + return IsProofOfStake()? std::make_pair(vtx[1].vin[0].prevout, vtx[1].nTime) : std::make_pair(COutPoint(), (unsigned int)0); + } + + // ppcoin: get max transaction timestamp + int64 GetMaxTransactionTime() const + { + int64 maxTransactionTime = 0; + BOOST_FOREACH(const CTransaction& tx, vtx) + maxTransactionTime = std::max(maxTransactionTime, (int64)tx.nTime); + return maxTransactionTime; + } + + uint256 BuildMerkleTree() const + { + vMerkleTree.clear(); + BOOST_FOREACH(const CTransaction& tx, vtx) + vMerkleTree.push_back(tx.GetHash()); + int j = 0; + for (int nSize = vtx.size(); nSize > 1; nSize = (nSize + 1) / 2) + { + for (int i = 0; i < nSize; i += 2) + { + int i2 = std::min(i+1, nSize-1); + vMerkleTree.push_back(Hash(BEGIN(vMerkleTree[j+i]), END(vMerkleTree[j+i]), + BEGIN(vMerkleTree[j+i2]), END(vMerkleTree[j+i2]))); + } + j += nSize; + } + return (vMerkleTree.empty() ? 0 : vMerkleTree.back()); + } + + std::vector GetMerkleBranch(int nIndex) const + { + if (vMerkleTree.empty()) + BuildMerkleTree(); + std::vector vMerkleBranch; + int j = 0; + for (int nSize = vtx.size(); nSize > 1; nSize = (nSize + 1) / 2) + { + int i = std::min(nIndex^1, nSize-1); + vMerkleBranch.push_back(vMerkleTree[j+i]); + nIndex >>= 1; + j += nSize; + } + return vMerkleBranch; + } + + static uint256 CheckMerkleBranch(uint256 hash, const std::vector& vMerkleBranch, int nIndex) + { + if (nIndex == -1) + return 0; + BOOST_FOREACH(const uint256& otherside, vMerkleBranch) + { + if (nIndex & 1) + hash = Hash(BEGIN(otherside), END(otherside), BEGIN(hash), END(hash)); + else + hash = Hash(BEGIN(hash), END(hash), BEGIN(otherside), END(otherside)); + nIndex >>= 1; + } + return hash; + } + + + bool WriteToDisk(unsigned int& nFileRet, unsigned int& nBlockPosRet) + { + // Open history file to append + CAutoFile fileout = CAutoFile(AppendBlockFile(nFileRet), SER_DISK, CLIENT_VERSION); + if (!fileout) + return error("CBlock::WriteToDisk() : AppendBlockFile failed"); + + // Write index header + unsigned int nSize = fileout.GetSerializeSize(*this); + fileout << FLATDATA(pchMessageStart) << nSize; + + // Write block + long fileOutPos = ftell(fileout); + if (fileOutPos < 0) + return error("CBlock::WriteToDisk() : ftell failed"); + nBlockPosRet = fileOutPos; + fileout << *this; + + // Flush stdio buffers and commit to disk before returning + fflush(fileout); + if (!IsInitialBlockDownload() || (nBestHeight+1) % 500 == 0) + FileCommit(fileout); + + return true; + } + + bool ReadFromDisk(unsigned int nFile, unsigned int nBlockPos, bool fReadTransactions=true) + { + SetNull(); + + // Open history file to read + CAutoFile filein = CAutoFile(OpenBlockFile(nFile, nBlockPos, "rb"), SER_DISK, CLIENT_VERSION); + if (!filein) + return error("CBlock::ReadFromDisk() : OpenBlockFile failed"); + if (!fReadTransactions) + filein.nType |= SER_BLOCKHEADERONLY; + + // Read block + try { + filein >> *this; + } + catch (std::exception &e) { + return error("%s() : deserialize or I/O error", __PRETTY_FUNCTION__); + } + + // Check the header + if (fReadTransactions && IsProofOfWork() && !CheckProofOfWork(GetHash(), nBits)) + return error("CBlock::ReadFromDisk() : errors in block header"); + + return true; + } + + + + void print() const + { + printf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%"PRIszu", vchBlockSig=%s)\n", + GetHash().ToString().c_str(), + nVersion, + hashPrevBlock.ToString().c_str(), + hashMerkleRoot.ToString().c_str(), + nTime, nBits, nNonce, + vtx.size(), + HexStr(vchBlockSig.begin(), vchBlockSig.end()).c_str()); + for (unsigned int i = 0; i < vtx.size(); i++) + { + printf(" "); + vtx[i].print(); + } + printf(" vMerkleTree: "); + for (unsigned int i = 0; i < vMerkleTree.size(); i++) + printf("%s ", vMerkleTree[i].ToString().substr(0,10).c_str()); + printf("\n"); + } + + + bool DisconnectBlock(CTxDB& txdb, CBlockIndex* pindex); + bool ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck=false); + bool ReadFromDisk(const CBlockIndex* pindex, bool fReadTransactions=true); + bool SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew); + bool AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos); + bool CheckBlock(bool fCheckPOW=true, bool fCheckMerkleRoot=true) const; + bool AcceptBlock(); + bool GetCoinAge(uint64& nCoinAge) const; // ppcoin: calculate total coin age spent in block + bool SignBlock(const CKeyStore& keystore); + bool CheckBlockSignature() const; + +private: + bool SetBestChainInner(CTxDB& txdb, CBlockIndex *pindexNew); +}; + + + + + + +/** The block chain is a tree shaped structure starting with the + * genesis block at the root, with each block potentially having multiple + * candidates to be the next block. pprev and pnext link a path through the + * main/longest chain. A blockindex may have multiple pprev pointing back + * to it, but pnext will only point forward to the longest branch, or will + * be null if the block is not part of the longest chain. + */ +class CBlockIndex +{ +public: + const uint256* phashBlock; + CBlockIndex* pprev; + CBlockIndex* pnext; + unsigned int nFile; + unsigned int nBlockPos; + CBigNum bnChainTrust; // ppcoin: trust score of block chain + int nHeight; + + int64 nMint; + int64 nMoneySupply; + + unsigned int nFlags; // ppcoin: block index flags + 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 + unsigned int nStakeModifierChecksum; // checksum of index; in-memeory only + + // proof-of-stake specific fields + COutPoint prevoutStake; + unsigned int nStakeTime; + uint256 hashProofOfStake; + + // block header + int nVersion; + uint256 hashMerkleRoot; + unsigned int nTime; + unsigned int nBits; + unsigned int nNonce; + + CBlockIndex() + { + phashBlock = NULL; + pprev = NULL; + pnext = NULL; + nFile = 0; + nBlockPos = 0; + nHeight = 0; + bnChainTrust = 0; + nMint = 0; + nMoneySupply = 0; + nFlags = 0; + nStakeModifier = 0; + nStakeModifierChecksum = 0; + hashProofOfStake = 0; + prevoutStake.SetNull(); + nStakeTime = 0; + + nVersion = 0; + hashMerkleRoot = 0; + nTime = 0; + nBits = 0; + nNonce = 0; + } + + CBlockIndex(unsigned int nFileIn, unsigned int nBlockPosIn, CBlock& block) + { + phashBlock = NULL; + pprev = NULL; + pnext = NULL; + nFile = nFileIn; + nBlockPos = nBlockPosIn; + nHeight = 0; + bnChainTrust = 0; + nMint = 0; + nMoneySupply = 0; + nFlags = 0; + nStakeModifier = 0; + nStakeModifierChecksum = 0; + hashProofOfStake = 0; + if (block.IsProofOfStake()) + { + SetProofOfStake(); + prevoutStake = block.vtx[1].vin[0].prevout; + nStakeTime = block.vtx[1].nTime; + } + else + { + prevoutStake.SetNull(); + nStakeTime = 0; + } + + nVersion = block.nVersion; + hashMerkleRoot = block.hashMerkleRoot; + nTime = block.nTime; + nBits = block.nBits; + nNonce = block.nNonce; + } + + CBlock GetBlockHeader() const + { + CBlock block; + block.nVersion = nVersion; + if (pprev) + block.hashPrevBlock = pprev->GetBlockHash(); + block.hashMerkleRoot = hashMerkleRoot; + block.nTime = nTime; + block.nBits = nBits; + block.nNonce = nNonce; + return block; + } + + uint256 GetBlockHash() const + { + return *phashBlock; + } + + int64 GetBlockTime() const + { + return (int64)nTime; + } + + CBigNum GetBlockTrust() const + { + CBigNum bnTarget; + bnTarget.SetCompact(nBits); + if (bnTarget <= 0) + return 0; + return (IsProofOfStake()? (CBigNum(1)<<256) / (bnTarget+1) : 1); + } + + bool IsInMainChain() const + { + return (pnext || this == pindexBest); + } + + bool CheckIndex() const + { + return true; + } + + enum { nMedianTimeSpan=11 }; + + int64 GetMedianTimePast() const + { + int64 pmedian[nMedianTimeSpan]; + int64* pbegin = &pmedian[nMedianTimeSpan]; + int64* pend = &pmedian[nMedianTimeSpan]; + + const CBlockIndex* pindex = this; + for (int i = 0; i < nMedianTimeSpan && pindex; i++, pindex = pindex->pprev) + *(--pbegin) = pindex->GetBlockTime(); + + std::sort(pbegin, pend); + return pbegin[(pend - pbegin)/2]; + } + + int64 GetMedianTime() const + { + const CBlockIndex* pindex = this; + for (int i = 0; i < nMedianTimeSpan/2; i++) + { + if (!pindex->pnext) + return GetBlockTime(); + pindex = pindex->pnext; + } + return pindex->GetMedianTimePast(); + } + + /** + * Returns true if there are nRequired or more blocks of minVersion or above + * in the last nToCheck blocks, starting at pstart and going backwards. + */ + static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, + unsigned int nRequired, unsigned int nToCheck); + + + bool IsProofOfWork() const + { + return !(nFlags & BLOCK_PROOF_OF_STAKE); + } + + bool IsProofOfStake() const + { + return (nFlags & BLOCK_PROOF_OF_STAKE); + } + + void SetProofOfStake() + { + nFlags |= BLOCK_PROOF_OF_STAKE; + } + + unsigned int GetStakeEntropyBit() const + { + return ((nFlags & BLOCK_STAKE_ENTROPY) >> 1); + } + + bool SetStakeEntropyBit(unsigned int nEntropyBit) + { + if (nEntropyBit > 1) + return false; + nFlags |= (nEntropyBit? BLOCK_STAKE_ENTROPY : 0); + return true; + } + + bool GeneratedStakeModifier() const + { + return (nFlags & BLOCK_STAKE_MODIFIER); + } + + void SetStakeModifier(uint64 nModifier, bool fGeneratedStakeModifier) + { + nStakeModifier = nModifier; + if (fGeneratedStakeModifier) + nFlags |= BLOCK_STAKE_MODIFIER; + } + + 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)", + pprev, pnext, nFile, nBlockPos, nHeight, + FormatMoney(nMint).c_str(), FormatMoney(nMoneySupply).c_str(), + GeneratedStakeModifier() ? "MOD" : "-", GetStakeEntropyBit(), IsProofOfStake()? "PoS" : "PoW", + nStakeModifier, nStakeModifierChecksum, + hashProofOfStake.ToString().c_str(), + prevoutStake.ToString().c_str(), nStakeTime, + hashMerkleRoot.ToString().c_str(), + GetBlockHash().ToString().c_str()); + } + + void print() const + { + printf("%s\n", ToString().c_str()); + } +}; + + + +/** Used to marshal pointers into hashes for db storage. */ +class CDiskBlockIndex : public CBlockIndex +{ +public: + uint256 hashPrev; + uint256 hashNext; + + CDiskBlockIndex() + { + hashPrev = 0; + hashNext = 0; + } + + explicit CDiskBlockIndex(CBlockIndex* pindex) : CBlockIndex(*pindex) + { + hashPrev = (pprev ? pprev->GetBlockHash() : 0); + hashNext = (pnext ? pnext->GetBlockHash() : 0); + } + + IMPLEMENT_SERIALIZE + ( + if (!(nType & SER_GETHASH)) + READWRITE(nVersion); + + READWRITE(hashNext); + READWRITE(nFile); + READWRITE(nBlockPos); + READWRITE(nHeight); + READWRITE(nMint); + READWRITE(nMoneySupply); + READWRITE(nFlags); + READWRITE(nStakeModifier); + if (IsProofOfStake()) + { + READWRITE(prevoutStake); + READWRITE(nStakeTime); + READWRITE(hashProofOfStake); + } + else if (fRead) + { + const_cast(this)->prevoutStake.SetNull(); + const_cast(this)->nStakeTime = 0; + const_cast(this)->hashProofOfStake = 0; + } + + // block header + READWRITE(this->nVersion); + READWRITE(hashPrev); + READWRITE(hashMerkleRoot); + READWRITE(nTime); + READWRITE(nBits); + READWRITE(nNonce); + ) + + uint256 GetBlockHash() const + { + CBlock block; + block.nVersion = nVersion; + block.hashPrevBlock = hashPrev; + block.hashMerkleRoot = hashMerkleRoot; + block.nTime = nTime; + block.nBits = nBits; + block.nNonce = nNonce; + return block.GetHash(); + } + + + std::string ToString() const + { + std::string str = "CDiskBlockIndex("; + str += CBlockIndex::ToString(); + str += strprintf("\n hashBlock=%s, hashPrev=%s, hashNext=%s)", + GetBlockHash().ToString().c_str(), + hashPrev.ToString().c_str(), + hashNext.ToString().c_str()); + return str; + } + + void print() const + { + printf("%s\n", ToString().c_str()); + } +}; + + + + + + + + +/** Describes a place in the block chain to another node such that if the + * other node doesn't have the same branch, it can find a recent common trunk. + * The further back it is, the further before the fork it may be. + */ +class CBlockLocator +{ +protected: + std::vector vHave; +public: + + CBlockLocator() + { + } + + explicit CBlockLocator(const CBlockIndex* pindex) + { + Set(pindex); + } + + explicit CBlockLocator(uint256 hashBlock) + { + std::map::iterator mi = mapBlockIndex.find(hashBlock); + if (mi != mapBlockIndex.end()) + Set((*mi).second); + } + + CBlockLocator(const std::vector& vHaveIn) + { + vHave = vHaveIn; + } + + IMPLEMENT_SERIALIZE + ( + if (!(nType & SER_GETHASH)) + READWRITE(nVersion); + READWRITE(vHave); + ) + + void SetNull() + { + vHave.clear(); + } + + bool IsNull() + { + return vHave.empty(); + } + + void Set(const CBlockIndex* pindex) + { + vHave.clear(); + int nStep = 1; + while (pindex) + { + vHave.push_back(pindex->GetBlockHash()); + + // Exponentially larger steps back + for (int i = 0; pindex && i < nStep; i++) + pindex = pindex->pprev; + if (vHave.size() > 10) + nStep *= 2; + } + vHave.push_back((!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)); + } + + int GetDistanceBack() + { + // Retrace how far back it was in the sender's branch + int nDistance = 0; + int nStep = 1; + BOOST_FOREACH(const uint256& hash, vHave) + { + std::map::iterator mi = mapBlockIndex.find(hash); + if (mi != mapBlockIndex.end()) + { + CBlockIndex* pindex = (*mi).second; + if (pindex->IsInMainChain()) + return nDistance; + } + nDistance += nStep; + if (nDistance > 10) + nStep *= 2; + } + return nDistance; + } + + CBlockIndex* GetBlockIndex() + { + // Find the first block the caller has in the main chain + BOOST_FOREACH(const uint256& hash, vHave) + { + std::map::iterator mi = mapBlockIndex.find(hash); + if (mi != mapBlockIndex.end()) + { + CBlockIndex* pindex = (*mi).second; + if (pindex->IsInMainChain()) + return pindex; + } + } + return pindexGenesisBlock; + } + + uint256 GetBlockHash() + { + // Find the first block the caller has in the main chain + BOOST_FOREACH(const uint256& hash, vHave) + { + std::map::iterator mi = mapBlockIndex.find(hash); + if (mi != mapBlockIndex.end()) + { + CBlockIndex* pindex = (*mi).second; + if (pindex->IsInMainChain()) + return hash; + } + } + return (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet); + } + + int GetHeight() + { + CBlockIndex* pindex = GetBlockIndex(); + if (!pindex) + return 0; + return pindex->nHeight; + } +}; + + + + + + + + +class CTxMemPool +{ +public: + mutable CCriticalSection cs; + std::map mapTx; + std::map mapNextTx; + + bool accept(CTxDB& txdb, CTransaction &tx, + bool fCheckInputs, bool* pfMissingInputs); + bool addUnchecked(const uint256& hash, CTransaction &tx); + bool remove(CTransaction &tx); + void clear(); + void queryHashes(std::vector& vtxid); + + unsigned long size() + { + LOCK(cs); + return mapTx.size(); + } + + bool exists(uint256 hash) + { + return (mapTx.count(hash) != 0); + } + + CTransaction& lookup(uint256 hash) + { + return mapTx[hash]; + } +}; + +extern CTxMemPool mempool; + +#endif diff --git a/src/makefile.bsd b/src/makefile.bsd new file mode 100644 index 0000000..bea96d1 --- /dev/null +++ b/src/makefile.bsd @@ -0,0 +1,179 @@ +# 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/curecoinrpc.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 + + +all: curecoind + +test check: test_curecoin FORCE + ./test_curecoin + +# 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/%.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) + +curecoind: $(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_curecoin: $(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 curecoind test_curecoin + -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 new file mode 100644 index 0000000..bac7250 --- /dev/null +++ b/src/makefile.linux-mingw @@ -0,0 +1,116 @@ +# 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"$(DEPSDIR)/boost_1_54_0" \ + -I"$(DEPSDIR)/db-4.8.30.NC/build_unix" \ + -I"$(DEPSDIR)/openssl-1.0.1e/include" \ + -I"$(DEPSDIR)" + +LIBPATHS= \ + -L"$(DEPSDIR)/boost_1_54_0/stage/lib" \ + -L"$(DEPSDIR)/db-4.8.30.NC/build_unix" \ + -L"$(DEPSDIR)/openssl-1.0.1e" + +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/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/curecoinrpc.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 + +all: curecoind.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 $@ $< + +curecoind.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_curecoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) + i586-mingw32msvc-g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework-mt-s $(LIBS) + +clean: + -rm -f obj/*.o + -rm -f curecoind.exe + -rm -f obj-test/*.o + -rm -f test_curecoin.exe + -rm -f obj/build.h + +FORCE: diff --git a/src/makefile.mingw b/src/makefile.mingw new file mode 100644 index 0000000..3cf427d --- /dev/null +++ b/src/makefile.mingw @@ -0,0 +1,110 @@ +# 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:=1 +USE_IPV6:=1 + +BOOST_SUFFIX?=-mgw46-mt-sd-1_54 + +INCLUDEPATHS= \ + -I"/c/boost_1_54_0" \ + -I"/c/db-4.8.30.NC\build_unix" \ + -I"/c/openssl-1.0.1e\include" + +LIBPATHS= \ + -L"/c/boost_1_54_0\stage\lib" \ + -L"/c/db-4.8.30.NC\build_unix" \ + -L"/c/openssl-1.0.1e" + +LIBS= \ + -l boost_system-mgw46-mt-sd-1_54 \ + -l boost_filesystem-mgw46-mt-sd-1_54 \ + -l boost_program_options-mgw46-mt-sd-1_54 \ + -l boost_thread-mgw46-mt-sd-1_54 \ + -l boost_chrono-mgw46-mt-sd-1_54 \ + -l db_cxx \ + -l ssl \ + -l crypto + +DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE +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/miniupnpc-1.6" + LIBPATHS += -L"/c/\miniupnpc-1.6" + 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/curecoinrpc.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 + +all: curecoind.exe + +test check: test_curecoin.exe FORCE + test_curecoin.exe + +obj/%.o: %.cpp $(HEADERS) + g++ -c $(CFLAGS) -o $@ $< + +curecoind.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_curecoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) + g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS) + +clean: + -del /Q curecoind test_curecoin + -del /Q obj\* + -del /Q obj-test\* + +FORCE: diff --git a/src/makefile.osx b/src/makefile.osx new file mode 100644 index 0000000..50e5a5a --- /dev/null +++ b/src/makefile.osx @@ -0,0 +1,162 @@ +# -*- mode: Makefile; -*- +# Copyright (c) 2011 curecoin Developers +# 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 curecoin +# Originally by Laszlo Hanyecz (solar@heliacal.net) + +CXX=llvm-g++ +DEPSDIR=/opt/local + +INCLUDEPATHS= \ + -I"$(CURDIR)" \ + -I"$(CURDIR)"/obj \ + -I"$(DEPSDIR)/include" \ + -I"$(DEPSDIR)/include/db48" + +LIBPATHS= \ + -L"$(DEPSDIR)/lib" \ + -L"$(DEPSDIR)/lib/db48" + +USE_UPNP:=1 +USE_IPV6:=1 + +LIBS= -dead_strip + +TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) + +ifdef STATIC +# Build STATIC if you are redistributing the curecoind binary +TESTLIBS += \ + $(DEPSDIR)/lib/libboost_unit_test_framework-mt.a +LIBS += \ + $(DEPSDIR)/lib/db48/libdb_cxx-4.8.a \ + $(DEPSDIR)/lib/libboost_system-mt.a \ + $(DEPSDIR)/lib/libboost_filesystem-mt.a \ + $(DEPSDIR)/lib/libboost_program_options-mt.a \ + $(DEPSDIR)/lib/libboost_thread-mt.a \ + $(DEPSDIR)/lib/libssl.a \ + $(DEPSDIR)/lib/libcrypto.a \ + -lz +else +TESTLIBS += \ + -lboost_unit_test_framework-mt +LIBS += \ + -ldb_cxx-4.8 \ + -lboost_system-mt \ + -lboost_filesystem-mt \ + -lboost_program_options-mt \ + -lboost_thread-mt \ + -lssl \ + -lcrypto \ + -lz +TESTDEFS += -DBOOST_TEST_DYN_LINK +endif + +DEFS=-DMAC_OSX -DMSG_NOSIGNAL=0 -DBOOST_SPIRIT_THREADSAFE + +ifdef RELEASE +# Compile for maximum compatibility and smallest size. +# This requires that dependencies are compiled +# the same way. +CFLAGS = -mmacosx-version-min=10.5 -arch x86_64 -O3 -msse2 +else +CFLAGS = -g -msse2 +endif + +# ppc doesn't work because we don't support big-endian +CFLAGS += -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \ + $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) + +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/curecoinrpc.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/kernel.o \ + obj/wallet.o \ + obj/walletdb.o \ + obj/noui.o + +ifndef USE_UPNP + override USE_UPNP = - +endif +ifneq (${USE_UPNP}, -) + DEFS += -DUSE_UPNP=$(USE_UPNP) +ifdef STATIC + LIBS += $(DEPSDIR)/lib/libminiupnpc.a +else + LIBS += -lminiupnpc +endif +endif + +ifneq (${USE_IPV6}, -) + DEFS += -DUSE_IPV6=$(USE_IPV6) +endif + +all: curecoind + +test check: test_curecoin FORCE + ./test_curecoin + +# 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/%.o: %.cpp + $(CXX) -c $(CFLAGS) -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) + +curecoind: $(OBJS:obj/%=obj/%) + $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) + +TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) + +obj-test/%.o: test/%.cpp + $(CXX) -c $(TESTDEFS) $(CFLAGS) -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_curecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) + $(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) $(TESTLIBS) + +clean: + -rm -f curecoind test_curecoin + -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.unix b/src/makefile.unix new file mode 100644 index 0000000..350f40c --- /dev/null +++ b/src/makefile.unix @@ -0,0 +1,178 @@ +# 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 + +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=-O2 -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/curecoinrpc.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 + + +all: curecoind + +test check: test_curecoin FORCE + ./test_curecoin + +# 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/%.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) + +curecoind: $(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_curecoin: $(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 curecoind test_curecoin + -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/mruset.h b/src/mruset.h new file mode 100644 index 0000000..49d41b7 --- /dev/null +++ b/src/mruset.h @@ -0,0 +1,64 @@ +// Copyright (c) 2012 The curecoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_MRUSET_H +#define curecoin_MRUSET_H + +#include +#include + +/** STL-like set container that only keeps the most recent N elements. */ +template class mruset +{ +public: + typedef T key_type; + typedef T value_type; + typedef typename std::set::iterator iterator; + typedef typename std::set::const_iterator const_iterator; + typedef typename std::set::size_type size_type; + +protected: + std::set set; + std::deque queue; + size_type nMaxSize; + +public: + mruset(size_type nMaxSizeIn = 0) { nMaxSize = nMaxSizeIn; } + iterator begin() const { return set.begin(); } + iterator end() const { return set.end(); } + size_type size() const { return set.size(); } + 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); } + 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; } + std::pair insert(const key_type& x) + { + std::pair ret = set.insert(x); + if (ret.second) + { + if (nMaxSize && queue.size() == nMaxSize) + { + set.erase(queue.front()); + queue.pop_front(); + } + queue.push_back(x); + } + return ret; + } + size_type max_size() const { return nMaxSize; } + size_type max_size(size_type s) + { + if (s) + while (queue.size() > s) + { + set.erase(queue.front()); + queue.pop_front(); + } + nMaxSize = s; + return nMaxSize; + } +}; + +#endif diff --git a/src/net.cpp b/src/net.cpp new file mode 100644 index 0000000..042ee49 --- /dev/null +++ b/src/net.cpp @@ -0,0 +1,1957 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "irc.h" +#include "db.h" +#include "net.h" +#include "init.h" +#include "strlcpy.h" +#include "addrman.h" +#include "ui_interface.h" + +#ifdef WIN32 +#include +#endif + +#ifdef USE_UPNP +#include +#include +#include +#include +#endif + +using namespace std; +using namespace boost; + +static const int MAX_OUTBOUND_CONNECTIONS = 8; + +void ThreadMessageHandler2(void* parg); +void ThreadSocketHandler2(void* parg); +void ThreadOpenConnections2(void* parg); +void ThreadOpenAddedConnections2(void* parg); +#ifdef USE_UPNP +void ThreadMapPort2(void* parg); +#endif +void ThreadDNSAddressSeed2(void* parg); +bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false); + + +struct LocalServiceInfo { + int nScore; + int nPort; +}; + +// +// Global state variables +// +bool fClient = false; +bool fDiscover = true; +bool fUseUPnP = false; +uint64 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; +array vnThreadsRunning; +static std::vector vhListenSocket; +CAddrMan addrman; + +vector vNodes; +CCriticalSection cs_vNodes; +map mapRelay; +deque > vRelayExpiration; +CCriticalSection cs_mapRelay; +map mapAlreadyAskedFor; + +static deque vOneShots; +CCriticalSection cs_vOneShots; + +set setservAddNodeAddresses; +CCriticalSection cs_setservAddNodeAddresses; + +static CSemaphore *semOutbound = NULL; + +void AddOneShot(string strDest) +{ + LOCK(cs_vOneShots); + vOneShots.push_back(strDest); +} + +unsigned short GetListenPort() +{ + return (unsigned short)(GetArg("-port", GetDefaultPort())); +} + +void CNode::PushGetBlocks(CBlockIndex* pindexBegin, uint256 hashEnd) +{ + // Filter out duplicate requests + if (pindexBegin == pindexLastGetBlocksBegin && hashEnd == hashLastGetBlocksEnd) + return; + pindexLastGetBlocksBegin = pindexBegin; + hashLastGetBlocksEnd = hashEnd; + + PushMessage("getblocks", CBlockLocator(pindexBegin), 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; + { + LOCK(cs_mapLocalHost); + for (map::iterator it = mapLocalHost.begin(); it != mapLocalHost.end(); it++) + { + int nScore = (*it).second.nScore; + int nReachability = (*it).first.GetReachabilityFrom(paddrPeer); + if (nReachability > nBestReachability || (nReachability == nBestReachability && nScore > nBestScore)) + { + addr = CService((*it).first, (*it).second.nPort); + nBestReachability = nReachability; + nBestScore = nScore; + } + } + } + return nBestScore >= 0; +} + +// get best local address for a particular peer as a CAddress +CAddress GetLocalAddress(const CNetAddr *paddrPeer) +{ + CAddress ret(CService("0.0.0.0",0),0); + CService addr; + if (GetLocal(addr, paddrPeer)) + { + ret = CAddress(addr); + ret.nServices = nLocalServices; + ret.nTime = GetAdjustedTime(); + } + return ret; +} + +bool RecvLine(SOCKET hSocket, string& strLine) +{ + strLine = ""; + loop + { + char c; + int nBytes = recv(hSocket, &c, 1, 0); + if (nBytes > 0) + { + if (c == '\n') + continue; + if (c == '\r') + return true; + strLine += c; + if (strLine.size() >= 9000) + return true; + } + else if (nBytes <= 0) + { + if (fShutdown) + return false; + if (nBytes < 0) + { + int nErr = WSAGetLastError(); + if (nErr == WSAEMSGSIZE) + continue; + if (nErr == WSAEWOULDBLOCK || nErr == WSAEINTR || nErr == WSAEINPROGRESS) + { + Sleep(10); + continue; + } + } + if (!strLine.empty()) + return true; + if (nBytes == 0) + { + // socket closed + printf("socket closed\n"); + return false; + } + else + { + // socket error + int nErr = WSAGetLastError(); + printf("recv failed: %d\n", nErr); + return false; + } + } + } +} + +// used when scores of local addresses may have changed +// pushes better local address to peers +void static AdvertizeLocal() +{ + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + { + if (pnode->fSuccessfullyConnected) + { + CAddress addrLocal = GetLocalAddress(&pnode->addr); + if (addrLocal.IsRoutable() && (CService)addrLocal != (CService)pnode->addrLocal) + { + pnode->PushAddress(addrLocal); + pnode->addrLocal = addrLocal; + } + } + } +} + +void SetReachable(enum Network net, bool fFlag) +{ + LOCK(cs_mapLocalHost); + vfReachable[net] = fFlag; + if (net == NET_IPV6 && fFlag) + vfReachable[NET_IPV4] = true; +} + +// learn a new local address +bool AddLocal(const CService& addr, int nScore) +{ + if (!addr.IsRoutable()) + return false; + + if (!fDiscover && nScore < LOCAL_MANUAL) + return false; + + if (IsLimited(addr)) + return false; + + printf("AddLocal(%s,%i)\n", addr.ToString().c_str(), nScore); + + { + LOCK(cs_mapLocalHost); + bool fAlready = mapLocalHost.count(addr) > 0; + LocalServiceInfo &info = mapLocalHost[addr]; + if (!fAlready || nScore >= info.nScore) { + info.nScore = nScore + (fAlready ? 1 : 0); + info.nPort = addr.GetPort(); + } + SetReachable(addr.GetNetwork()); + } + + AdvertizeLocal(); + + return true; +} + +bool AddLocal(const CNetAddr &addr, int nScore) +{ + return AddLocal(CService(addr, GetListenPort()), nScore); +} + +/** Make a particular network entirely off-limits (no automatic connects to it) */ +void SetLimited(enum Network net, bool fLimited) +{ + if (net == NET_UNROUTABLE) + return; + LOCK(cs_mapLocalHost); + vfLimited[net] = fLimited; +} + +bool IsLimited(enum Network net) +{ + LOCK(cs_mapLocalHost); + return vfLimited[net]; +} + +bool IsLimited(const CNetAddr &addr) +{ + return IsLimited(addr.GetNetwork()); +} + +/** vote for a local address */ +bool SeenLocal(const CService& addr) +{ + { + LOCK(cs_mapLocalHost); + if (mapLocalHost.count(addr) == 0) + return false; + mapLocalHost[addr].nScore++; + } + + AdvertizeLocal(); + + return true; +} + +/** check whether a given address is potentially local */ +bool IsLocal(const CService& addr) +{ + LOCK(cs_mapLocalHost); + return mapLocalHost.count(addr) > 0; +} + +/** check whether a given address is in a network we can probably connect to */ +bool IsReachable(const CNetAddr& addr) +{ + LOCK(cs_mapLocalHost); + enum Network net = addr.GetNetwork(); + return vfReachable[net] && !vfLimited[net]; +} + +bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const char* pszKeyword, CNetAddr& ipRet) +{ + SOCKET hSocket; + if (!ConnectSocket(addrConnect, hSocket)) + return error("GetMyExternalIP() : connection to %s failed", addrConnect.ToString().c_str()); + + send(hSocket, pszGet, strlen(pszGet), MSG_NOSIGNAL); + + string strLine; + while (RecvLine(hSocket, strLine)) + { + if (strLine.empty()) // HTTP response is separated from headers by blank line + { + loop + { + if (!RecvLine(hSocket, strLine)) + { + closesocket(hSocket); + return false; + } + if (pszKeyword == NULL) + break; + if (strLine.find(pszKeyword) != string::npos) + { + strLine = strLine.substr(strLine.find(pszKeyword) + strlen(pszKeyword)); + break; + } + } + closesocket(hSocket); + if (strLine.find("<") != string::npos) + strLine = strLine.substr(0, strLine.find("<")); + strLine = strLine.substr(strspn(strLine.c_str(), " \t\n\r")); + while (strLine.size() > 0 && isspace(strLine[strLine.size()-1])) + strLine.resize(strLine.size()-1); + CService addr(strLine,0,true); + printf("GetMyExternalIP() received [%s] %s\n", strLine.c_str(), addr.ToString().c_str()); + if (!addr.IsValid() || !addr.IsRoutable()) + return false; + ipRet.SetIP(addr); + return true; + } + } + closesocket(hSocket); + return error("GetMyExternalIP() : connection closed"); +} + +// We now get our external IP from the IRC server first and only use this as a backup +bool GetMyExternalIP(CNetAddr& ipRet) +{ + CService addrConnect; + const char* pszGet; + const char* pszKeyword; + + for (int nLookup = 0; nLookup <= 1; nLookup++) + for (int nHost = 1; nHost <= 2; nHost++) + { + // We should be phasing out our use of sites like these. If we need + // replacements, we should ask for volunteers to put this simple + // php file on their web server that prints the client IP: + // + if (nHost == 1) + { + addrConnect = CService("91.198.22.70",80); // checkip.dyndns.org + + if (nLookup == 1) + { + CService addrIP("checkip.dyndns.org", 80, true); + if (addrIP.IsValid()) + addrConnect = addrIP; + } + + 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" + "Connection: close\r\n" + "\r\n"; + + pszKeyword = "Address:"; + } + else if (nHost == 2) + { + addrConnect = CService("74.208.43.192", 80); // www.showmyip.com + + if (nLookup == 1) + { + CService addrIP("www.showmyip.com", 80, true); + if (addrIP.IsValid()) + addrConnect = addrIP; + } + + 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" + "Connection: close\r\n" + "\r\n"; + + pszKeyword = NULL; // Returns just IP address + } + + if (GetMyExternalIP2(addrConnect, pszGet, pszKeyword, ipRet)) + return true; + } + + return false; +} + +void ThreadGetMyExternalIP(void* parg) +{ + // Make this thread recognisable as the external IP detection thread + RenameThread("curecoin-ext-ip"); + + CNetAddr addrLocalHost; + if (GetMyExternalIP(addrLocalHost)) + { + printf("GetMyExternalIP() returned %s\n", addrLocalHost.ToStringIP().c_str()); + AddLocal(addrLocalHost, LOCAL_HTTP); + } +} + + + + + +void AddressCurrentlyConnected(const CService& addr) +{ + addrman.Connected(addr); +} + + + + + + + +CNode* FindNode(const CNetAddr& ip) +{ + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + if ((CNetAddr)pnode->addr == ip) + return (pnode); + } + return NULL; +} + +CNode* FindNode(std::string addrName) +{ + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + if (pnode->addrName == addrName) + return (pnode); + return NULL; +} + +CNode* FindNode(const CService& addr) +{ + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + if ((CService)pnode->addr == addr) + return (pnode); + } + return NULL; +} + +CNode* ConnectNode(CAddress addrConnect, const char *pszDest, int64 nTimeout) +{ + if (pszDest == NULL) { + if (IsLocal(addrConnect)) + return NULL; + + // Look for an existing connection + CNode* pnode = FindNode((CService)addrConnect); + if (pnode) + { + if (nTimeout != 0) + pnode->AddRef(nTimeout); + else + pnode->AddRef(); + return pnode; + } + } + + + /// debug print + printf("trying connection %s lastseen=%.1fhrs\n", + pszDest ? pszDest : addrConnect.ToString().c_str(), + pszDest ? 0 : (double)(GetAdjustedTime() - addrConnect.nTime)/3600.0); + + // Connect + SOCKET hSocket; + if (pszDest ? ConnectSocketByName(addrConnect, hSocket, pszDest, GetDefaultPort()) : ConnectSocket(addrConnect, hSocket)) + { + addrman.Attempt(addrConnect); + + /// debug print + printf("connected %s\n", pszDest ? pszDest : addrConnect.ToString().c_str()); + + // Set to non-blocking +#ifdef WIN32 + u_long nOne = 1; + if (ioctlsocket(hSocket, FIONBIO, &nOne) == SOCKET_ERROR) + printf("ConnectSocket() : ioctlsocket non-blocking setting failed, error %d\n", WSAGetLastError()); +#else + if (fcntl(hSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR) + printf("ConnectSocket() : fcntl non-blocking setting failed, error %d\n", errno); +#endif + + // Add node + CNode* pnode = new CNode(hSocket, addrConnect, pszDest ? pszDest : "", false); + if (nTimeout != 0) + pnode->AddRef(nTimeout); + else + pnode->AddRef(); + + { + LOCK(cs_vNodes); + vNodes.push_back(pnode); + } + + pnode->nTimeConnected = GetTime(); + return pnode; + } + else + { + return NULL; + } +} + +void CNode::CloseSocketDisconnect() +{ + fDisconnect = true; + if (hSocket != INVALID_SOCKET) + { + printf("disconnecting node %s\n", addrName.c_str()); + closesocket(hSocket); + hSocket = INVALID_SOCKET; + vRecv.clear(); + } +} + +void CNode::Cleanup() +{ +} + + +void CNode::PushVersion() +{ + /// when NTP implemented, change to just nTime = GetAdjustedTime() + int64 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\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString().c_str(), addrYou.ToString().c_str(), addr.ToString().c_str()); + PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe, + nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector()), nBestHeight); +} + + + + + +std::map CNode::setBanned; +CCriticalSection CNode::cs_setBanned; + +void CNode::ClearBanned() +{ + setBanned.clear(); +} + +bool CNode::IsBanned(CNetAddr ip) +{ + bool fResult = false; + { + LOCK(cs_setBanned); + std::map::iterator i = setBanned.find(ip); + if (i != setBanned.end()) + { + int64 t = (*i).second; + if (GetTime() < t) + fResult = true; + } + } + return fResult; +} + +bool CNode::Misbehaving(int howmuch) +{ + if (addr.IsLocal()) + { + printf("Warning: Local node %s misbehaving (delta: %d)!\n", addrName.c_str(), howmuch); + return false; + } + + nMisbehavior += howmuch; + if (nMisbehavior >= GetArg("-banscore", 100)) + { + int64 banTime = GetTime()+GetArg("-bantime", 60*60*24); // Default 24-hour ban + printf("Misbehaving: %s (%d -> %d) DISCONNECTING\n", addr.ToString().c_str(), nMisbehavior-howmuch, nMisbehavior); + { + LOCK(cs_setBanned); + if (setBanned[addr] < banTime) + setBanned[addr] = banTime; + } + CloseSocketDisconnect(); + return true; + } else + printf("Misbehaving: %s (%d -> %d)\n", addr.ToString().c_str(), nMisbehavior-howmuch, nMisbehavior); + return false; +} + +#undef X +#define X(name) stats.name = name +void CNode::copyStats(CNodeStats &stats) +{ + X(nServices); + X(nLastSend); + X(nLastRecv); + X(nTimeConnected); + X(addrName); + X(nVersion); + X(strSubVer); + X(fInbound); + X(nReleaseTime); + X(nStartingHeight); + X(nMisbehavior); +} +#undef X + + + + + + + + + + +void ThreadSocketHandler(void* parg) +{ + // Make this thread recognisable as the networking thread + RenameThread("curecoin-net"); + + try + { + vnThreadsRunning[THREAD_SOCKETHANDLER]++; + ThreadSocketHandler2(parg); + vnThreadsRunning[THREAD_SOCKETHANDLER]--; + } + catch (std::exception& e) { + vnThreadsRunning[THREAD_SOCKETHANDLER]--; + PrintException(&e, "ThreadSocketHandler()"); + } catch (...) { + vnThreadsRunning[THREAD_SOCKETHANDLER]--; + throw; // support pthread_cancel() + } + printf("ThreadSocketHandler exited\n"); +} + +void ThreadSocketHandler2(void* parg) +{ + printf("ThreadSocketHandler started\n"); + list vNodesDisconnected; + unsigned int nPrevNodeCount = 0; + + loop + { + // + // Disconnect nodes + // + { + LOCK(cs_vNodes); + // Disconnect unused nodes + vector vNodesCopy = vNodes; + BOOST_FOREACH(CNode* pnode, vNodesCopy) + { + if (pnode->fDisconnect || + (pnode->GetRefCount() <= 0 && pnode->vRecv.empty() && pnode->vSend.empty())) + { + // remove from vNodes + vNodes.erase(remove(vNodes.begin(), vNodes.end(), pnode), vNodes.end()); + + // release outbound grant (if any) + pnode->grantOutbound.Release(); + + // close socket and cleanup + pnode->CloseSocketDisconnect(); + 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); + } + } + + // Delete disconnected nodes + list vNodesDisconnectedCopy = vNodesDisconnected; + BOOST_FOREACH(CNode* pnode, vNodesDisconnectedCopy) + { + // wait until threads are done using it + if (pnode->GetRefCount() <= 0) + { + bool fDelete = false; + { + TRY_LOCK(pnode->cs_vSend, lockSend); + if (lockSend) + { + TRY_LOCK(pnode->cs_vRecv, lockRecv); + if (lockRecv) + { + TRY_LOCK(pnode->cs_mapRequests, lockReq); + if (lockReq) + { + TRY_LOCK(pnode->cs_inventory, lockInv); + if (lockInv) + fDelete = true; + } + } + } + } + if (fDelete) + { + vNodesDisconnected.remove(pnode); + delete pnode; + } + } + } + } + if (vNodes.size() != nPrevNodeCount) + { + nPrevNodeCount = vNodes.size(); + uiInterface.NotifyNumConnectionsChanged(vNodes.size()); + } + + + // + // Find which sockets have data to receive + // + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 50000; // frequency to poll pnode->vSend + + fd_set fdsetRecv; + fd_set fdsetSend; + fd_set fdsetError; + FD_ZERO(&fdsetRecv); + FD_ZERO(&fdsetSend); + FD_ZERO(&fdsetError); + SOCKET hSocketMax = 0; + bool have_fds = false; + + BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket) { + FD_SET(hListenSocket, &fdsetRecv); + hSocketMax = max(hSocketMax, hListenSocket); + have_fds = true; + } + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + { + if (pnode->hSocket == INVALID_SOCKET) + continue; + FD_SET(pnode->hSocket, &fdsetRecv); + FD_SET(pnode->hSocket, &fdsetError); + hSocketMax = max(hSocketMax, pnode->hSocket); + have_fds = true; + { + TRY_LOCK(pnode->cs_vSend, lockSend); + if (lockSend && !pnode->vSend.empty()) + FD_SET(pnode->hSocket, &fdsetSend); + } + } + } + + vnThreadsRunning[THREAD_SOCKETHANDLER]--; + int nSelect = select(have_fds ? hSocketMax + 1 : 0, + &fdsetRecv, &fdsetSend, &fdsetError, &timeout); + vnThreadsRunning[THREAD_SOCKETHANDLER]++; + if (fShutdown) + return; + if (nSelect == SOCKET_ERROR) + { + if (have_fds) + { + int nErr = WSAGetLastError(); + printf("socket select error %d\n", nErr); + for (unsigned int i = 0; i <= hSocketMax; i++) + FD_SET(i, &fdsetRecv); + } + FD_ZERO(&fdsetSend); + FD_ZERO(&fdsetError); + Sleep(timeout.tv_usec/1000); + } + + + // + // Accept new connections + // + BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket) + if (hListenSocket != INVALID_SOCKET && FD_ISSET(hListenSocket, &fdsetRecv)) + { +#ifdef USE_IPV6 + struct sockaddr_storage sockaddr; +#else + struct sockaddr sockaddr; +#endif + socklen_t len = sizeof(sockaddr); + SOCKET hSocket = accept(hListenSocket, (struct sockaddr*)&sockaddr, &len); + CAddress addr; + int nInbound = 0; + + if (hSocket != INVALID_SOCKET) + if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr)) + printf("Warning: Unknown socket family\n"); + + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + if (pnode->fInbound) + nInbound++; + } + + if (hSocket == INVALID_SOCKET) + { + int nErr = WSAGetLastError(); + if (nErr != WSAEWOULDBLOCK) + printf("socket error accept failed: %d\n", nErr); + } + else if (nInbound >= GetArg("-maxconnections", 125) - MAX_OUTBOUND_CONNECTIONS) + { + { + LOCK(cs_setservAddNodeAddresses); + if (!setservAddNodeAddresses.count(addr)) + closesocket(hSocket); + } + } + else if (CNode::IsBanned(addr)) + { + printf("connection from %s dropped (banned)\n", addr.ToString().c_str()); + closesocket(hSocket); + } + else + { + printf("accepted connection %s\n", addr.ToString().c_str()); + CNode* pnode = new CNode(hSocket, addr, "", true); + pnode->AddRef(); + { + LOCK(cs_vNodes); + vNodes.push_back(pnode); + } + } + } + + + // + // Service each socket + // + vector vNodesCopy; + { + LOCK(cs_vNodes); + vNodesCopy = vNodes; + BOOST_FOREACH(CNode* pnode, vNodesCopy) + pnode->AddRef(); + } + BOOST_FOREACH(CNode* pnode, vNodesCopy) + { + if (fShutdown) + return; + + // + // Receive + // + if (pnode->hSocket == INVALID_SOCKET) + continue; + if (FD_ISSET(pnode->hSocket, &fdsetRecv) || FD_ISSET(pnode->hSocket, &fdsetError)) + { + TRY_LOCK(pnode->cs_vRecv, lockRecv); + if (lockRecv) + { + CDataStream& vRecv = pnode->vRecv; + unsigned int nPos = vRecv.size(); + + if (nPos > ReceiveBufferSize()) { + if (!pnode->fDisconnect) + printf("socket recv flood control disconnect (%"PRIszu" bytes)\n", vRecv.size()); + pnode->CloseSocketDisconnect(); + } + else { + // typical socket buffer is 8K-64K + char pchBuf[0x10000]; + int nBytes = recv(pnode->hSocket, pchBuf, sizeof(pchBuf), MSG_DONTWAIT); + if (nBytes > 0) + { + vRecv.resize(nPos + nBytes); + memcpy(&vRecv[nPos], pchBuf, nBytes); + pnode->nLastRecv = GetTime(); + } + else if (nBytes == 0) + { + // socket closed gracefully + if (!pnode->fDisconnect) + printf("socket closed\n"); + pnode->CloseSocketDisconnect(); + } + else if (nBytes < 0) + { + // error + int nErr = WSAGetLastError(); + if (nErr != WSAEWOULDBLOCK && nErr != WSAEMSGSIZE && nErr != WSAEINTR && nErr != WSAEINPROGRESS) + { + if (!pnode->fDisconnect) + printf("socket recv error %d\n", nErr); + pnode->CloseSocketDisconnect(); + } + } + } + } + } + + // + // Send + // + if (pnode->hSocket == INVALID_SOCKET) + continue; + if (FD_ISSET(pnode->hSocket, &fdsetSend)) + { + 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(); + } + } + } + } + } + + // + // Inactivity checking + // + if (pnode->vSend.empty()) + pnode->nLastSendEmpty = GetTime(); + if (GetTime() - pnode->nTimeConnected > 60) + { + if (pnode->nLastRecv == 0 || pnode->nLastSend == 0) + { + printf("socket no message in first 60 seconds, %d %d\n", pnode->nLastRecv != 0, pnode->nLastSend != 0); + pnode->fDisconnect = true; + } + else if (GetTime() - pnode->nLastSend > 90*60 && GetTime() - pnode->nLastSendEmpty > 90*60) + { + printf("socket not sending\n"); + pnode->fDisconnect = true; + } + else if (GetTime() - pnode->nLastRecv > 90*60) + { + printf("socket inactivity timeout\n"); + pnode->fDisconnect = true; + } + } + } + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodesCopy) + pnode->Release(); + } + + Sleep(10); + } +} + + + + + + + + + +#ifdef USE_UPNP +void ThreadMapPort(void* parg) +{ + // Make this thread recognisable as the UPnP thread + RenameThread("curecoin-UPnP"); + + try + { + vnThreadsRunning[THREAD_UPNP]++; + ThreadMapPort2(parg); + vnThreadsRunning[THREAD_UPNP]--; + } + catch (std::exception& e) { + vnThreadsRunning[THREAD_UPNP]--; + PrintException(&e, "ThreadMapPort()"); + } catch (...) { + vnThreadsRunning[THREAD_UPNP]--; + PrintException(NULL, "ThreadMapPort()"); + } + printf("ThreadMapPort exited\n"); +} + +void ThreadMapPort2(void* parg) +{ + printf("ThreadMapPort started\n"); + + std::string port = strprintf("%u", GetListenPort()); + const char * multicastif = 0; + const char * minissdpdpath = 0; + struct UPNPDev * devlist = 0; + char lanaddr[64]; + +#ifndef UPNPDISCOVER_SUCCESS + /* miniupnpc 1.5 */ + devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0); +#else + /* miniupnpc 1.6 */ + int error = 0; + devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error); +#endif + + struct UPNPUrls urls; + struct IGDdatas data; + int r; + + 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 = "curecoin " + FormatFullVersion(); +#ifndef UPNPDISCOVER_SUCCESS + /* miniupnpc 1.5 */ + r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, + port.c_str(), port.c_str(), lanaddr, strDesc.c_str(), "TCP", 0); +#else + /* miniupnpc 1.6 */ + r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, + port.c_str(), port.c_str(), lanaddr, strDesc.c_str(), "TCP", 0, "0"); +#endif + + if(r!=UPNPCOMMAND_SUCCESS) + printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n", + port.c_str(), port.c_str(), lanaddr, r, strupnperror(r)); + else + printf("UPnP Port Mapping successful.\n"); + int i = 1; + loop { + if (fShutdown || !fUseUPnP) + { + r = UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, port.c_str(), "TCP", 0); + printf("UPNP_DeletePortMapping() returned : %d\n", r); + freeUPNPDevlist(devlist); devlist = 0; + FreeUPNPUrls(&urls); + return; + } + if (i % 600 == 0) // Refresh every 20 minutes + { +#ifndef UPNPDISCOVER_SUCCESS + /* miniupnpc 1.5 */ + r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, + port.c_str(), port.c_str(), lanaddr, strDesc.c_str(), "TCP", 0); +#else + /* miniupnpc 1.6 */ + r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, + port.c_str(), port.c_str(), lanaddr, strDesc.c_str(), "TCP", 0, "0"); +#endif + + if(r!=UPNPCOMMAND_SUCCESS) + printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n", + port.c_str(), port.c_str(), lanaddr, r, strupnperror(r)); + else + printf("UPnP Port Mapping successful.\n");; + } + Sleep(2000); + i++; + } + } else { + printf("No valid UPnP IGDs found\n"); + freeUPNPDevlist(devlist); devlist = 0; + if (r != 0) + FreeUPNPUrls(&urls); + loop { + if (fShutdown || !fUseUPnP) + return; + Sleep(2000); + } + } +} + +void MapPort() +{ + if (fUseUPnP && vnThreadsRunning[THREAD_UPNP] < 1) + { + if (!NewThread(ThreadMapPort, NULL)) + printf("Error: ThreadMapPort(ThreadMapPort) failed\n"); + } +} +#else +void MapPort() +{ + // Intentionally left blank. +} +#endif + + + + + + + + + +// DNS seeds +// Each pair gives a source name and a seed name. +// The first name is used as information source for addrman. +// The second name should resolve to a list of seed addresses. +static const char *strDNSSeed[][2] = { + {"", ""}, +}; + +void ThreadDNSAddressSeed(void* parg) +{ + // Make this thread recognisable as the DNS seeding thread + RenameThread("curecoin-dnsseed"); + + try + { + vnThreadsRunning[THREAD_DNSSEED]++; + ThreadDNSAddressSeed2(parg); + vnThreadsRunning[THREAD_DNSSEED]--; + } + catch (std::exception& e) { + vnThreadsRunning[THREAD_DNSSEED]--; + PrintException(&e, "ThreadDNSAddressSeed()"); + } catch (...) { + vnThreadsRunning[THREAD_DNSSEED]--; + throw; // support pthread_cancel() + } + printf("ThreadDNSAddressSeed exited\n"); +} + +void ThreadDNSAddressSeed2(void* parg) +{ + printf("ThreadDNSAddressSeed started\n"); + int found = 0; + + if (!fTestNet) + { + printf("Loading addresses from DNS seeds (could take a while)\n"); + + for (unsigned int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) { + if (HaveNameProxy()) { + AddOneShot(strDNSSeed[seed_idx][1]); + } else { + vector vaddr; + vector vAdd; + if (LookupHost(strDNSSeed[seed_idx][1], vaddr)) + { + BOOST_FOREACH(CNetAddr& ip, vaddr) + { + int nOneDay = 24*3600; + CAddress addr = CAddress(CService(ip, GetDefaultPort())); + addr.nTime = GetTime() - 3*nOneDay - GetRand(4*nOneDay); // use a random age between 3 and 7 days old + vAdd.push_back(addr); + found++; + } + } + addrman.Add(vAdd, CNetAddr(strDNSSeed[seed_idx][0], true)); + } + } + } + + printf("%d addresses found from DNS seeds\n", found); +} + + + + + + + + + + + + +unsigned int pnSeed[] = +{ + 0x58099DD9 +}; + +void DumpAddresses() +{ + int64 nStart = GetTimeMillis(); + + CAddrDB adb; + adb.Write(addrman); + + printf("Flushed %d addresses to peers.dat %"PRI64d"ms\n", + addrman.size(), GetTimeMillis() - nStart); +} + +void ThreadDumpAddress2(void* parg) +{ + vnThreadsRunning[THREAD_DUMPADDRESS]++; + while (!fShutdown) + { + DumpAddresses(); + vnThreadsRunning[THREAD_DUMPADDRESS]--; + Sleep(100000); + vnThreadsRunning[THREAD_DUMPADDRESS]++; + } + vnThreadsRunning[THREAD_DUMPADDRESS]--; +} + +void ThreadDumpAddress(void* parg) +{ + // Make this thread recognisable as the address dumping thread + RenameThread("curecoin-adrdump"); + + try + { + ThreadDumpAddress2(parg); + } + catch (std::exception& e) { + PrintException(&e, "ThreadDumpAddress()"); + } + printf("ThreadDumpAddress exited\n"); +} + +void ThreadOpenConnections(void* parg) +{ + // Make this thread recognisable as the connection opening thread + RenameThread("curecoin-opencon"); + + try + { + vnThreadsRunning[THREAD_OPENCONNECTIONS]++; + ThreadOpenConnections2(parg); + vnThreadsRunning[THREAD_OPENCONNECTIONS]--; + } + catch (std::exception& e) { + vnThreadsRunning[THREAD_OPENCONNECTIONS]--; + PrintException(&e, "ThreadOpenConnections()"); + } catch (...) { + vnThreadsRunning[THREAD_OPENCONNECTIONS]--; + PrintException(NULL, "ThreadOpenConnections()"); + } + printf("ThreadOpenConnections exited\n"); +} + +void static ProcessOneShot() +{ + string strDest; + { + LOCK(cs_vOneShots); + if (vOneShots.empty()) + return; + strDest = vOneShots.front(); + vOneShots.pop_front(); + } + CAddress addr; + CSemaphoreGrant grant(*semOutbound, true); + if (grant) { + if (!OpenNetworkConnection(addr, &grant, strDest.c_str(), true)) + AddOneShot(strDest); + } +} + +// ppcoin: stake minter thread +void static ThreadStakeMinter(void* parg) +{ + printf("ThreadStakeMinter started\n"); + CWallet* pwallet = (CWallet*)parg; + try + { + vnThreadsRunning[THREAD_MINTER]++; + curecoinMiner(pwallet, true); + vnThreadsRunning[THREAD_MINTER]--; + } + catch (std::exception& e) { + vnThreadsRunning[THREAD_MINTER]--; + PrintException(&e, "ThreadStakeMinter()"); + } catch (...) { + vnThreadsRunning[THREAD_MINTER]--; + PrintException(NULL, "ThreadStakeMinter()"); + } + printf("ThreadStakeMinter exiting, %d threads remaining\n", vnThreadsRunning[THREAD_MINTER]); +} + +void ThreadOpenConnections2(void* parg) +{ + printf("ThreadOpenConnections started\n"); + + // Connect to specific addresses + if (mapArgs.count("-connect") && mapMultiArgs["-connect"].size() > 0) + { + for (int64 nLoop = 0;; nLoop++) + { + ProcessOneShot(); + BOOST_FOREACH(string strAddr, mapMultiArgs["-connect"]) + { + CAddress addr; + OpenNetworkConnection(addr, NULL, strAddr.c_str()); + for (int i = 0; i < 10 && i < nLoop; i++) + { + Sleep(500); + if (fShutdown) + return; + } + } + Sleep(500); + } + } + + // Initiate network connections + int64 nStart = GetTime(); + loop + { + ProcessOneShot(); + + vnThreadsRunning[THREAD_OPENCONNECTIONS]--; + Sleep(500); + vnThreadsRunning[THREAD_OPENCONNECTIONS]++; + if (fShutdown) + return; + + + vnThreadsRunning[THREAD_OPENCONNECTIONS]--; + CSemaphoreGrant grant(*semOutbound); + vnThreadsRunning[THREAD_OPENCONNECTIONS]++; + if (fShutdown) + return; + + // Add seed nodes if IRC isn't working + if (addrman.size()==0 && (GetTime() - nStart > 60) && !fTestNet) + { + std::vector vAdd; + for (unsigned int i = 0; i < ARRAYLEN(pnSeed); i++) + { + // It'll only connect to one or two seed nodes because once it connects, + // 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; + struct in_addr ip; + memcpy(&ip, &pnSeed[i], sizeof(ip)); + CAddress addr(CService(ip, GetDefaultPort())); + addr.nTime = GetTime()-GetRand(nOneWeek)-nOneWeek; + vAdd.push_back(addr); + } + addrman.Add(vAdd, CNetAddr("127.0.0.1")); + } + + // + // Choose an address to connect to based on most recently seen + // + CAddress addrConnect; + + // Only connect out to one peer per network group (/16 for IPv4). + // Do this here so we don't have to critsect vNodes inside mapAddresses critsect. + int nOutbound = 0; + set > setConnected; + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) { + if (!pnode->fInbound) { + setConnected.insert(pnode->addr.GetGroup()); + nOutbound++; + } + } + } + + int64 nANow = GetAdjustedTime(); + + int nTries = 0; + loop + { + // use an nUnkBias between 10 (no outgoing connections) and 90 (8 outgoing connections) + CAddress addr = addrman.Select(10 + min(nOutbound,8)*10); + + // if we selected an invalid address, restart + if (!addr.IsValid() || setConnected.count(addr.GetGroup()) || IsLocal(addr)) + break; + + // If we didn't find an appropriate destination after trying 100 addresses fetched from addrman, + // stop this loop, and let the outer loop run again (which sleeps, adds seed nodes, recalculates + // already-connected network ranges, ...) before trying new addrman addresses. + nTries++; + if (nTries > 100) + break; + + if (IsLimited(addr)) + continue; + + // only consider very recently tried nodes after 30 failed attempts + if (nANow - addr.nLastTry < 600 && nTries < 30) + continue; + + // do not allow non-default ports, unless after 50 invalid addresses selected already + if (addr.GetPort() != GetDefaultPort() && nTries < 50) + continue; + + addrConnect = addr; + break; + } + + if (addrConnect.IsValid()) + OpenNetworkConnection(addrConnect, &grant); + } +} + +void ThreadOpenAddedConnections(void* parg) +{ + // Make this thread recognisable as the connection opening thread + RenameThread("curecoin-opencon"); + + try + { + vnThreadsRunning[THREAD_ADDEDCONNECTIONS]++; + ThreadOpenAddedConnections2(parg); + vnThreadsRunning[THREAD_ADDEDCONNECTIONS]--; + } + catch (std::exception& e) { + vnThreadsRunning[THREAD_ADDEDCONNECTIONS]--; + PrintException(&e, "ThreadOpenAddedConnections()"); + } catch (...) { + vnThreadsRunning[THREAD_ADDEDCONNECTIONS]--; + PrintException(NULL, "ThreadOpenAddedConnections()"); + } + printf("ThreadOpenAddedConnections exited\n"); +} + +void ThreadOpenAddedConnections2(void* parg) +{ + printf("ThreadOpenAddedConnections started\n"); + + if (mapArgs.count("-addnode") == 0) + return; + + if (HaveNameProxy()) { + while(!fShutdown) { + BOOST_FOREACH(string& strAddNode, mapMultiArgs["-addnode"]) { + CAddress addr; + CSemaphoreGrant grant(*semOutbound); + OpenNetworkConnection(addr, &grant, strAddNode.c_str()); + Sleep(500); + } + vnThreadsRunning[THREAD_ADDEDCONNECTIONS]--; + Sleep(120000); // Retry every 2 minutes + vnThreadsRunning[THREAD_ADDEDCONNECTIONS]++; + } + return; + } + + vector > vservAddressesToAdd(0); + BOOST_FOREACH(string& strAddNode, mapMultiArgs["-addnode"]) + { + vector vservNode(0); + if(Lookup(strAddNode.c_str(), vservNode, GetDefaultPort(), fNameLookup, 0)) + { + vservAddressesToAdd.push_back(vservNode); + { + LOCK(cs_setservAddNodeAddresses); + BOOST_FOREACH(CService& serv, vservNode) + setservAddNodeAddresses.insert(serv); + } + } + } + loop + { + vector > vservConnectAddresses = vservAddressesToAdd; + // Attempt to connect to each IP for each addnode entry until at least one is successful per addnode entry + // (keeping in mind that addnode entries can have many IPs if fNameLookup) + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + for (vector >::iterator it = vservConnectAddresses.begin(); it != vservConnectAddresses.end(); it++) + BOOST_FOREACH(CService& addrNode, *(it)) + if (pnode->addr == addrNode) + { + it = vservConnectAddresses.erase(it); + it--; + break; + } + } + BOOST_FOREACH(vector& vserv, vservConnectAddresses) + { + CSemaphoreGrant grant(*semOutbound); + OpenNetworkConnection(CAddress(*(vserv.begin())), &grant); + Sleep(500); + if (fShutdown) + return; + } + if (fShutdown) + return; + vnThreadsRunning[THREAD_ADDEDCONNECTIONS]--; + Sleep(120000); // Retry every 2 minutes + vnThreadsRunning[THREAD_ADDEDCONNECTIONS]++; + if (fShutdown) + return; + } +} + +// if successful, this moves the passed grant to the constructed node +bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound, const char *strDest, bool fOneShot) +{ + // + // Initiate outbound network connection + // + if (fShutdown) + return false; + if (!strDest) + if (IsLocal(addrConnect) || + FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) || + FindNode(addrConnect.ToStringIPPort().c_str())) + return false; + if (strDest && FindNode(strDest)) + return false; + + vnThreadsRunning[THREAD_OPENCONNECTIONS]--; + CNode* pnode = ConnectNode(addrConnect, strDest); + vnThreadsRunning[THREAD_OPENCONNECTIONS]++; + if (fShutdown) + return false; + if (!pnode) + return false; + if (grantOutbound) + grantOutbound->MoveTo(pnode->grantOutbound); + pnode->fNetworkNode = true; + if (fOneShot) + pnode->fOneShot = true; + + return true; +} + + + + + + + + +void ThreadMessageHandler(void* parg) +{ + // Make this thread recognisable as the message handling thread + RenameThread("curecoin-msghand"); + + try + { + vnThreadsRunning[THREAD_MESSAGEHANDLER]++; + ThreadMessageHandler2(parg); + vnThreadsRunning[THREAD_MESSAGEHANDLER]--; + } + catch (std::exception& e) { + vnThreadsRunning[THREAD_MESSAGEHANDLER]--; + PrintException(&e, "ThreadMessageHandler()"); + } catch (...) { + vnThreadsRunning[THREAD_MESSAGEHANDLER]--; + PrintException(NULL, "ThreadMessageHandler()"); + } + printf("ThreadMessageHandler exited\n"); +} + +void ThreadMessageHandler2(void* parg) +{ + printf("ThreadMessageHandler started\n"); + SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL); + while (!fShutdown) + { + vector vNodesCopy; + { + LOCK(cs_vNodes); + vNodesCopy = vNodes; + BOOST_FOREACH(CNode* pnode, vNodesCopy) + pnode->AddRef(); + } + + // Poll the connected nodes for messages + CNode* pnodeTrickle = NULL; + if (!vNodesCopy.empty()) + pnodeTrickle = vNodesCopy[GetRand(vNodesCopy.size())]; + BOOST_FOREACH(CNode* pnode, vNodesCopy) + { + // Receive messages + { + TRY_LOCK(pnode->cs_vRecv, lockRecv); + if (lockRecv) + ProcessMessages(pnode); + } + if (fShutdown) + return; + + // Send messages + { + TRY_LOCK(pnode->cs_vSend, lockSend); + if (lockSend) + SendMessages(pnode, pnode == pnodeTrickle); + } + if (fShutdown) + return; + } + + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodesCopy) + pnode->Release(); + } + + // Wait and allow messages to bunch up. + // 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); + if (fRequestShutdown) + StartShutdown(); + vnThreadsRunning[THREAD_MESSAGEHANDLER]++; + if (fShutdown) + return; + } +} + + + + + + +bool BindListenPort(const CService &addrBind, string& strError) +{ + strError = ""; + int nOne = 1; + +#ifdef WIN32 + // Initialize Windows Sockets + WSADATA wsadata; + int ret = WSAStartup(MAKEWORD(2,2), &wsadata); + if (ret != NO_ERROR) + { + strError = strprintf("Error: TCP/IP socket library failed to start (WSAStartup returned error %d)", ret); + printf("%s\n", strError.c_str()); + return false; + } +#endif + + // Create socket for listening for incoming connections +#ifdef USE_IPV6 + struct sockaddr_storage sockaddr; +#else + struct sockaddr sockaddr; +#endif + socklen_t len = sizeof(sockaddr); + if (!addrBind.GetSockAddr((struct sockaddr*)&sockaddr, &len)) + { + strError = strprintf("Error: bind address family for %s not supported", addrBind.ToString().c_str()); + printf("%s\n", strError.c_str()); + return false; + } + + SOCKET hListenSocket = socket(((struct sockaddr*)&sockaddr)->sa_family, SOCK_STREAM, IPPROTO_TCP); + if (hListenSocket == INVALID_SOCKET) + { + strError = strprintf("Error: Couldn't open socket for incoming connections (socket returned error %d)", WSAGetLastError()); + printf("%s\n", strError.c_str()); + return false; + } + +#ifdef SO_NOSIGPIPE + // Different way of disabling SIGPIPE on BSD + setsockopt(hListenSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&nOne, sizeof(int)); +#endif + +#ifndef WIN32 + // Allow binding if the port is still in TIME_WAIT state after + // the program was closed and restarted. Not an issue on windows. + setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (void*)&nOne, sizeof(int)); +#endif + + +#ifdef WIN32 + // Set to non-blocking, incoming connections will also inherit this + if (ioctlsocket(hListenSocket, FIONBIO, (u_long*)&nOne) == SOCKET_ERROR) +#else + if (fcntl(hListenSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR) +#endif + { + strError = strprintf("Error: Couldn't set properties on socket for incoming connections (error %d)", WSAGetLastError()); + printf("%s\n", strError.c_str()); + return false; + } + +#ifdef USE_IPV6 + // some systems don't have IPV6_V6ONLY but are always v6only; others do have the option + // and enable it by default or not. Try to enable it, if possible. + if (addrBind.IsIPv6()) { +#ifdef IPV6_V6ONLY + setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&nOne, sizeof(int)); +#endif +#ifdef WIN32 + int nProtLevel = 10 /* PROTECTION_LEVEL_UNRESTRICTED */; + int nParameterId = 23 /* IPV6_PROTECTION_LEVEl */; + // this call is allowed to fail + setsockopt(hListenSocket, IPPROTO_IPV6, nParameterId, (const char*)&nProtLevel, sizeof(int)); +#endif + } +#endif + + if (::bind(hListenSocket, (struct sockaddr*)&sockaddr, len) == SOCKET_ERROR) + { + int nErr = WSAGetLastError(); + if (nErr == WSAEADDRINUSE) + strError = strprintf(_("Unable to bind to %s on this computer. curecoin 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()); + return false; + } + printf("Bound to %s\n", addrBind.ToString().c_str()); + + // Listen for incoming connections + if (listen(hListenSocket, SOMAXCONN) == SOCKET_ERROR) + { + strError = strprintf("Error: Listening for incoming connections failed (listen returned error %d)", WSAGetLastError()); + printf("%s\n", strError.c_str()); + return false; + } + + vhListenSocket.push_back(hListenSocket); + + if (addrBind.IsRoutable() && fDiscover) + AddLocal(addrBind, LOCAL_BIND); + + return true; +} + +void static Discover() +{ + if (!fDiscover) + return; + +#ifdef WIN32 + // Get local host IP + char pszHostName[1000] = ""; + if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR) + { + vector vaddr; + if (LookupHost(pszHostName, vaddr)) + { + BOOST_FOREACH (const CNetAddr &addr, vaddr) + { + AddLocal(addr, LOCAL_IF); + } + } + } +#else + // Get local host ip + struct ifaddrs* myaddrs; + if (getifaddrs(&myaddrs) == 0) + { + for (struct ifaddrs* ifa = myaddrs; ifa != NULL; ifa = ifa->ifa_next) + { + if (ifa->ifa_addr == NULL) continue; + if ((ifa->ifa_flags & IFF_UP) == 0) continue; + if (strcmp(ifa->ifa_name, "lo") == 0) continue; + if (strcmp(ifa->ifa_name, "lo0") == 0) continue; + if (ifa->ifa_addr->sa_family == AF_INET) + { + struct sockaddr_in* s4 = (struct sockaddr_in*)(ifa->ifa_addr); + CNetAddr addr(s4->sin_addr); + if (AddLocal(addr, LOCAL_IF)) + printf("IPv4 %s: %s\n", ifa->ifa_name, addr.ToString().c_str()); + } +#ifdef USE_IPV6 + else if (ifa->ifa_addr->sa_family == AF_INET6) + { + struct sockaddr_in6* s6 = (struct sockaddr_in6*)(ifa->ifa_addr); + CNetAddr addr(s6->sin6_addr); + if (AddLocal(addr, LOCAL_IF)) + printf("IPv6 %s: %s\n", ifa->ifa_name, addr.ToString().c_str()); + } +#endif + } + freeifaddrs(myaddrs); + } +#endif + + // Don't use external IPv4 discovery, when -onlynet="IPv6" + if (!IsLimited(NET_IPV4)) + NewThread(ThreadGetMyExternalIP, NULL); +} + +void StartNode(void* parg) +{ + // Make this thread recognisable as the startup thread + RenameThread("curecoin-start"); + + if (semOutbound == NULL) { + // initialize semaphore + int nMaxOutbound = min(MAX_OUTBOUND_CONNECTIONS, (int)GetArg("-maxconnections", 125)); + semOutbound = new CSemaphore(nMaxOutbound); + } + + if (pnodeLocalHost == NULL) + pnodeLocalHost = new CNode(INVALID_SOCKET, CAddress(CService("127.0.0.1", 0), nLocalServices)); + + Discover(); + + // + // Start threads + // + +/* + if (!GetBoolArg("-dnsseed", true)) + printf("DNS seeding disabled\n"); + else + if (!NewThread(ThreadDNSAddressSeed, NULL)) + printf("Error: NewThread(ThreadDNSAddressSeed) failed\n"); +*/ + + if (!GetBoolArg("-dnsseed", false)) + printf("DNS seeding disabled\n"); + if (GetBoolArg("-dnsseed", false)) + printf("DNS seeding NYI\n"); + + // Map ports with UPnP + if (fUseUPnP) + MapPort(); + + // Get addresses from IRC and advertise ours + if (!NewThread(ThreadIRCSeed, NULL)) + printf("Error: NewThread(ThreadIRCSeed) failed\n"); + + // Send and receive from sockets, accept connections + if (!NewThread(ThreadSocketHandler, NULL)) + printf("Error: NewThread(ThreadSocketHandler) failed\n"); + + // Initiate outbound connections from -addnode + if (!NewThread(ThreadOpenAddedConnections, NULL)) + printf("Error: NewThread(ThreadOpenAddedConnections) failed\n"); + + // Initiate outbound connections + if (!NewThread(ThreadOpenConnections, NULL)) + printf("Error: NewThread(ThreadOpenConnections) failed\n"); + + // Process messages + if (!NewThread(ThreadMessageHandler, NULL)) + printf("Error: NewThread(ThreadMessageHandler) failed\n"); + + // Dump network addresses + if (!NewThread(ThreadDumpAddress, NULL)) + printf("Error; NewThread(ThreadDumpAddress) failed\n"); + + // ppcoin: mint proof-of-stake blocks in the background + if (!NewThread(ThreadStakeMinter, pwalletMain)) + printf("Error: NewThread(ThreadStakeMinter) failed\n"); + + // Generate coins in the background + Generatecurecoins(GetBoolArg("-gen", false), pwalletMain); +} + +bool StopNode() +{ + printf("StopNode()\n"); + fShutdown = true; + nTransactionsUpdated++; + int64 nStart = GetTime(); + if (semOutbound) + for (int i=0; ipost(); + do + { + int nThreadsRunning = 0; + for (int n = 0; n < THREAD_MAX; n++) + nThreadsRunning += vnThreadsRunning[n]; + if (nThreadsRunning == 0) + break; + if (GetTime() - nStart > 20) + break; + Sleep(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("ThreadcurecoinMiner 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 + if (vnThreadsRunning[THREAD_UPNP] > 0) printf("ThreadMapPort still running\n"); +#endif + 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_MINTER] > 0) printf("ThreadStakeMinter still running\n"); + while (vnThreadsRunning[THREAD_MESSAGEHANDLER] > 0 || vnThreadsRunning[THREAD_RPCHANDLER] > 0) + Sleep(20); + Sleep(50); + DumpAddresses(); + return true; +} + +class CNetCleanup +{ +public: + CNetCleanup() + { + } + ~CNetCleanup() + { + // Close sockets + BOOST_FOREACH(CNode* pnode, vNodes) + if (pnode->hSocket != INVALID_SOCKET) + closesocket(pnode->hSocket); + BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket) + if (hListenSocket != INVALID_SOCKET) + if (closesocket(hListenSocket) == SOCKET_ERROR) + printf("closesocket(hListenSocket) failed with error %d\n", WSAGetLastError()); + +#ifdef WIN32 + // Shutdown Windows Sockets + WSACleanup(); +#endif + } +} +instance_of_cnetcleanup; diff --git a/src/net.h b/src/net.h new file mode 100644 index 0000000..fbad7a0 --- /dev/null +++ b/src/net.h @@ -0,0 +1,694 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_NET_H +#define curecoin_NET_H + +#include +#include +#include +#include + +#ifndef WIN32 +#include +#endif + +#include "mruset.h" +#include "netbase.h" +#include "protocol.h" +#include "addrman.h" + +class CRequestTracker; +class CNode; +class CBlockIndex; +extern int nBestHeight; + + + +inline unsigned int ReceiveBufferSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); } +inline unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 1*1000); } + +void AddOneShot(std::string strDest); +bool RecvLine(SOCKET hSocket, std::string& strLine); +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(); +unsigned short GetListenPort(); +bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string())); +void StartNode(void* parg); +bool StopNode(); + +enum +{ + LOCAL_NONE, // unknown + LOCAL_IF, // address a local interface listens on + LOCAL_BIND, // address explicit bound to + LOCAL_UPNP, // address reported by UPnP + LOCAL_IRC, // address reported by IRC (deprecated) + LOCAL_HTTP, // address reported by whatismyip.com and similar + LOCAL_MANUAL, // address explicitly specified (-externalip=) + + LOCAL_MAX +}; + +void SetLimited(enum Network net, bool fLimited = true); +bool IsLimited(enum Network net); +bool IsLimited(const CNetAddr& addr); +bool AddLocal(const CService& addr, int nScore = LOCAL_NONE); +bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE); +bool SeenLocal(const CService& addr); +bool IsLocal(const CService& addr); +bool GetLocal(CService &addr, const CNetAddr *paddrPeer = NULL); +bool IsReachable(const CNetAddr &addr); +void SetReachable(enum Network net, bool fFlag = true); +CAddress GetLocalAddress(const CNetAddr *paddrPeer = NULL); + + +enum +{ + MSG_TX = 1, + MSG_BLOCK, +}; + +class CRequestTracker +{ +public: + void (*fn)(void*, CDataStream&); + void* param1; + + explicit CRequestTracker(void (*fnIn)(void*, CDataStream&)=NULL, void* param1In=NULL) + { + fn = fnIn; + param1 = param1In; + } + + bool IsNull() + { + return fn == NULL; + } +}; + + +/** Thread types */ +enum threadId +{ + THREAD_SOCKETHANDLER, + THREAD_OPENCONNECTIONS, + THREAD_MESSAGEHANDLER, + THREAD_MINER, + THREAD_RPCLISTENER, + THREAD_UPNP, + THREAD_DNSSEED, + THREAD_ADDEDCONNECTIONS, + THREAD_DUMPADDRESS, + THREAD_RPCHANDLER, + THREAD_MINTER, + + THREAD_MAX +}; + +extern bool fClient; +extern bool fDiscover; +extern bool fUseUPnP; +extern uint64 nLocalServices; +extern uint64 nLocalHostNonce; +extern CAddress addrSeenByPeer; +extern boost::array vnThreadsRunning; +extern CAddrMan addrman; + +extern std::vector vNodes; +extern CCriticalSection cs_vNodes; +extern std::map mapRelay; +extern std::deque > vRelayExpiration; +extern CCriticalSection cs_mapRelay; +extern std::map mapAlreadyAskedFor; + + + + +class CNodeStats +{ +public: + uint64 nServices; + int64 nLastSend; + int64 nLastRecv; + int64 nTimeConnected; + std::string addrName; + int nVersion; + std::string strSubVer; + bool fInbound; + int64 nReleaseTime; + int nStartingHeight; + int nMisbehavior; +}; + + + + + +/** Information about a peer */ +class CNode +{ +public: + // socket + uint64 nServices; + SOCKET hSocket; + CDataStream vSend; + CDataStream vRecv; + CCriticalSection cs_vSend; + CCriticalSection cs_vRecv; + int64 nLastSend; + int64 nLastRecv; + int64 nLastSendEmpty; + int64 nTimeConnected; + int nHeaderStart; + unsigned int nMessageStart; + CAddress addr; + std::string addrName; + CService addrLocal; + int nVersion; + std::string strSubVer; + bool fOneShot; + bool fClient; + bool fInbound; + bool fNetworkNode; + bool fSuccessfullyConnected; + bool fDisconnect; + CSemaphoreGrant grantOutbound; +protected: + int nRefCount; + + // Denial-of-service detection/prevention + // Key is IP address, value is banned-until-time + static std::map setBanned; + static CCriticalSection cs_setBanned; + int nMisbehavior; + +public: + int64 nReleaseTime; + std::map mapRequests; + CCriticalSection cs_mapRequests; + uint256 hashContinue; + CBlockIndex* pindexLastGetBlocksBegin; + uint256 hashLastGetBlocksEnd; + int nStartingHeight; + + // flood relay + std::vector vAddrToSend; + std::set setAddrKnown; + bool fGetAddr; + std::set setKnown; + uint256 hashCheckpointKnown; // ppcoin: known sent sync-checkpoint + + // inventory based relay + mruset setInventoryKnown; + std::vector vInventoryToSend; + CCriticalSection cs_inventory; + 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) + { + nServices = 0; + hSocket = hSocketIn; + nLastSend = 0; + nLastRecv = 0; + nLastSendEmpty = GetTime(); + nTimeConnected = GetTime(); + nHeaderStart = -1; + nMessageStart = -1; + addr = addrIn; + addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn; + nVersion = 0; + strSubVer = ""; + fOneShot = false; + fClient = false; // set by version message + fInbound = fInboundIn; + fNetworkNode = false; + fSuccessfullyConnected = false; + fDisconnect = false; + nRefCount = 0; + nReleaseTime = 0; + hashContinue = 0; + pindexLastGetBlocksBegin = 0; + hashLastGetBlocksEnd = 0; + nStartingHeight = -1; + fGetAddr = false; + nMisbehavior = 0; + hashCheckpointKnown = 0; + setInventoryKnown.max_size(SendBufferSize() / 1000); + + // Be shy and don't send version until we hear + if (!fInbound) + PushVersion(); + } + + ~CNode() + { + if (hSocket != INVALID_SOCKET) + { + closesocket(hSocket); + hSocket = INVALID_SOCKET; + } + } + +private: + CNode(const CNode&); + void operator=(const CNode&); +public: + + + int GetRefCount() + { + return std::max(nRefCount, 0) + (GetTime() < nReleaseTime ? 1 : 0); + } + + CNode* AddRef(int64 nTimeout=0) + { + if (nTimeout != 0) + nReleaseTime = std::max(nReleaseTime, GetTime() + nTimeout); + else + nRefCount++; + return this; + } + + void Release() + { + nRefCount--; + } + + + + void AddAddressKnown(const CAddress& addr) + { + setAddrKnown.insert(addr); + } + + void PushAddress(const CAddress& addr) + { + // Known checking here is only to save space from duplicates. + // SendMessages will filter it again for knowns that were added + // after addresses were pushed. + if (addr.IsValid() && !setAddrKnown.count(addr)) + vAddrToSend.push_back(addr); + } + + + void AddInventoryKnown(const CInv& inv) + { + { + LOCK(cs_inventory); + setInventoryKnown.insert(inv); + } + } + + void PushInventory(const CInv& inv) + { + { + LOCK(cs_inventory); + if (!setInventoryKnown.count(inv)) + vInventoryToSend.push_back(inv); + } + } + + void AskFor(const CInv& inv) + { + // We're using mapAskFor as a priority queue, + // the key is the earliest time the request can be sent + int64& nRequestTime = mapAlreadyAskedFor[inv]; + if (fDebugNet) + printf("askfor %s %"PRI64d" (%s)\n", inv.ToString().c_str(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str()); + + // Make sure not to reuse time indexes to keep things in the same order + int64 nNow = (GetTime() - 1) * 1000000; + static int64 nLastTime; + ++nLastTime; + nNow = std::max(nNow, nLastTime); + nLastTime = nNow; + + // Each retry is 2 minutes after the last + nRequestTime = std::max(nRequestTime + 2 * 60 * 1000000, nNow); + mapAskFor.insert(std::make_pair(nRequestTime, inv)); + } + + + + void BeginMessage(const char* pszCommand) + { + ENTER_CRITICAL_SECTION(cs_vSend); + if (nHeaderStart != -1) + AbortMessage(); + nHeaderStart = vSend.size(); + vSend << CMessageHeader(pszCommand, 0); + nMessageStart = vSend.size(); + if (fDebug) + printf("sending: %s ", pszCommand); + } + + void AbortMessage() + { + if (nHeaderStart < 0) + return; + vSend.resize(nHeaderStart); + nHeaderStart = -1; + nMessageStart = -1; + LEAVE_CRITICAL_SECTION(cs_vSend); + + if (fDebug) + printf("(aborted)\n"); + } + + void EndMessage() + { + if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0) + { + printf("dropmessages DROPPING SEND MESSAGE\n"); + AbortMessage(); + return; + } + + if (nHeaderStart < 0) + return; + + // Set the size + unsigned int nSize = vSend.size() - nMessageStart; + memcpy((char*)&vSend[nHeaderStart] + CMessageHeader::MESSAGE_SIZE_OFFSET, &nSize, sizeof(nSize)); + + // Set the checksum + uint256 hash = Hash(vSend.begin() + nMessageStart, vSend.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)); + + if (fDebug) { + printf("(%d bytes)\n", nSize); + } + + nHeaderStart = -1; + nMessageStart = -1; + LEAVE_CRITICAL_SECTION(cs_vSend); + } + + void EndMessageAbortIfEmpty() + { + if (nHeaderStart < 0) + return; + int nSize = vSend.size() - nMessageStart; + if (nSize > 0) + EndMessage(); + else + AbortMessage(); + } + + + + void PushVersion(); + + + void PushMessage(const char* pszCommand) + { + try + { + BeginMessage(pszCommand); + EndMessage(); + } + catch (...) + { + AbortMessage(); + throw; + } + } + + template + void PushMessage(const char* pszCommand, const T1& a1) + { + try + { + BeginMessage(pszCommand); + vSend << a1; + EndMessage(); + } + catch (...) + { + AbortMessage(); + throw; + } + } + + template + void PushMessage(const char* pszCommand, const T1& a1, const T2& a2) + { + try + { + BeginMessage(pszCommand); + vSend << a1 << a2; + EndMessage(); + } + catch (...) + { + AbortMessage(); + throw; + } + } + + template + void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3) + { + try + { + BeginMessage(pszCommand); + vSend << a1 << a2 << a3; + EndMessage(); + } + catch (...) + { + AbortMessage(); + throw; + } + } + + template + void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3, const T4& a4) + { + try + { + BeginMessage(pszCommand); + vSend << a1 << a2 << a3 << a4; + EndMessage(); + } + catch (...) + { + AbortMessage(); + throw; + } + } + + template + void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5) + { + try + { + BeginMessage(pszCommand); + vSend << a1 << a2 << a3 << a4 << a5; + EndMessage(); + } + catch (...) + { + AbortMessage(); + throw; + } + } + + template + void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5, const T6& a6) + { + try + { + BeginMessage(pszCommand); + vSend << a1 << a2 << a3 << a4 << a5 << a6; + EndMessage(); + } + catch (...) + { + AbortMessage(); + throw; + } + } + + template + void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5, const T6& a6, const T7& a7) + { + try + { + BeginMessage(pszCommand); + vSend << a1 << a2 << a3 << a4 << a5 << a6 << a7; + EndMessage(); + } + catch (...) + { + AbortMessage(); + throw; + } + } + + template + void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5, const T6& a6, const T7& a7, const T8& a8) + { + try + { + BeginMessage(pszCommand); + vSend << a1 << a2 << a3 << a4 << a5 << a6 << a7 << a8; + EndMessage(); + } + catch (...) + { + AbortMessage(); + throw; + } + } + + template + void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5, const T6& a6, const T7& a7, const T8& a8, const T9& a9) + { + try + { + BeginMessage(pszCommand); + vSend << a1 << a2 << a3 << a4 << a5 << a6 << a7 << a8 << a9; + EndMessage(); + } + catch (...) + { + AbortMessage(); + throw; + } + } + + + void PushRequest(const char* pszCommand, + void (*fn)(void*, CDataStream&), void* param1) + { + uint256 hashReply; + RAND_bytes((unsigned char*)&hashReply, sizeof(hashReply)); + + { + LOCK(cs_mapRequests); + mapRequests[hashReply] = CRequestTracker(fn, param1); + } + + PushMessage(pszCommand, hashReply); + } + + template + void PushRequest(const char* pszCommand, const T1& a1, + void (*fn)(void*, CDataStream&), void* param1) + { + uint256 hashReply; + RAND_bytes((unsigned char*)&hashReply, sizeof(hashReply)); + + { + LOCK(cs_mapRequests); + mapRequests[hashReply] = CRequestTracker(fn, param1); + } + + PushMessage(pszCommand, hashReply, a1); + } + + template + void PushRequest(const char* pszCommand, const T1& a1, const T2& a2, + void (*fn)(void*, CDataStream&), void* param1) + { + uint256 hashReply; + RAND_bytes((unsigned char*)&hashReply, sizeof(hashReply)); + + { + LOCK(cs_mapRequests); + mapRequests[hashReply] = CRequestTracker(fn, param1); + } + + PushMessage(pszCommand, hashReply, a1, a2); + } + + + + void PushGetBlocks(CBlockIndex* pindexBegin, uint256 hashEnd); + bool IsSubscribed(unsigned int nChannel); + void Subscribe(unsigned int nChannel, unsigned int nHops=0); + void CancelSubscribe(unsigned int nChannel); + void CloseSocketDisconnect(); + void Cleanup(); + + + // Denial-of-service detection/prevention + // The idea is to detect peers that are behaving + // badly and disconnect/ban them, but do it in a + // one-coding-mistake-won't-shatter-the-entire-network + // way. + // IMPORTANT: There should be nothing I can give a + // node that it will forward on that will make that + // node's peers drop it. If there is, an attacker + // can isolate a node and/or try to split the network. + // Dropping a node for sending stuff that is invalid + // now but might be valid in a later version is also + // dangerous, because it can cause a network split + // between nodes running old code and nodes running + // new code. + static void ClearBanned(); // needed for unit testing + static bool IsBanned(CNetAddr ip); + bool Misbehaving(int howmuch); // 1 == a little, 100 == a lot + void copyStats(CNodeStats &stats); +}; + + + + + + + + + + +inline void RelayInventory(const CInv& inv) +{ + // Put on lists to offer to the other nodes + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + pnode->PushInventory(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); +} + + +#endif diff --git a/src/netbase.cpp b/src/netbase.cpp new file mode 100644 index 0000000..e86514c --- /dev/null +++ b/src/netbase.cpp @@ -0,0 +1,1180 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "netbase.h" +#include "util.h" +#include "sync.h" + +#ifndef WIN32 +#include +#endif + +#include "strlcpy.h" +#include // for to_lower() + +using namespace std; + +// Settings +static proxyType proxyInfo[NET_MAX]; +static proxyType nameproxyInfo; +static CCriticalSection cs_proxyInfos; +int nConnectTimeout = 5000; +bool fNameLookup = false; + +static const unsigned char pchIPv4[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff }; + +enum Network ParseNetwork(std::string net) { + boost::to_lower(net); + if (net == "ipv4") return NET_IPV4; + if (net == "ipv6") return NET_IPV6; + if (net == "tor") return NET_TOR; + if (net == "i2p") return NET_I2P; + return NET_UNROUTABLE; +} + +void SplitHostPort(std::string in, int &portOut, std::string &hostOut) { + size_t colon = in.find_last_of(':'); + // if a : is found, and it either follows a [...], or no other : is in the string, treat it as port separator + bool fHaveColon = colon != in.npos; + bool fBracketed = fHaveColon && (in[0]=='[' && in[colon-1]==']'); // if there is a colon, and in[0]=='[', colon is not 0, so in[colon-1] is safe + bool fMultiColon = fHaveColon && (in.find_last_of(':',colon-1) != in.npos); + if (fHaveColon && (colon==0 || fBracketed || !fMultiColon)) { + char *endp = NULL; + int n = strtol(in.c_str() + colon + 1, &endp, 10); + if (endp && *endp == 0 && n >= 0) { + in = in.substr(0, colon); + if (n > 0 && n < 0x10000) + portOut = n; + } + } + if (in.size()>0 && in[0] == '[' && in[in.size()-1] == ']') + hostOut = in.substr(1, in.size()-2); + else + hostOut = in; +} + +bool static LookupIntern(const char *pszName, std::vector& vIP, unsigned int nMaxSolutions, bool fAllowLookup) +{ + vIP.clear(); + + { + CNetAddr addr; + if (addr.SetSpecial(std::string(pszName))) { + vIP.push_back(addr); + return true; + } + } + + struct addrinfo aiHint; + memset(&aiHint, 0, sizeof(struct addrinfo)); + + aiHint.ai_socktype = SOCK_STREAM; + aiHint.ai_protocol = IPPROTO_TCP; +#ifdef WIN32 +# ifdef USE_IPV6 + aiHint.ai_family = AF_UNSPEC; +# else + aiHint.ai_family = AF_INET; +# endif + aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST; +#else +# ifdef USE_IPV6 + aiHint.ai_family = AF_UNSPEC; +# else + aiHint.ai_family = AF_INET; +# endif + aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST; +#endif + struct addrinfo *aiRes = NULL; + int nErr = getaddrinfo(pszName, NULL, &aiHint, &aiRes); + if (nErr) + return false; + + struct addrinfo *aiTrav = aiRes; + while (aiTrav != NULL && (nMaxSolutions == 0 || vIP.size() < nMaxSolutions)) + { + if (aiTrav->ai_family == AF_INET) + { + assert(aiTrav->ai_addrlen >= sizeof(sockaddr_in)); + vIP.push_back(CNetAddr(((struct sockaddr_in*)(aiTrav->ai_addr))->sin_addr)); + } + +#ifdef USE_IPV6 + if (aiTrav->ai_family == AF_INET6) + { + assert(aiTrav->ai_addrlen >= sizeof(sockaddr_in6)); + vIP.push_back(CNetAddr(((struct sockaddr_in6*)(aiTrav->ai_addr))->sin6_addr)); + } +#endif + + aiTrav = aiTrav->ai_next; + } + + freeaddrinfo(aiRes); + + return (vIP.size() > 0); +} + +bool LookupHost(const char *pszName, std::vector& vIP, unsigned int nMaxSolutions, bool fAllowLookup) +{ + if (pszName[0] == 0) + return false; + char psz[256]; + char *pszHost = psz; + strlcpy(psz, pszName, sizeof(psz)); + if (psz[0] == '[' && psz[strlen(psz)-1] == ']') + { + pszHost = psz+1; + psz[strlen(psz)-1] = 0; + } + + return LookupIntern(pszHost, vIP, nMaxSolutions, fAllowLookup); +} + +bool LookupHostNumeric(const char *pszName, std::vector& vIP, unsigned int nMaxSolutions) +{ + return LookupHost(pszName, vIP, nMaxSolutions, false); +} + +bool Lookup(const char *pszName, std::vector& vAddr, int portDefault, bool fAllowLookup, unsigned int nMaxSolutions) +{ + if (pszName[0] == 0) + return false; + int port = portDefault; + std::string hostname = ""; + SplitHostPort(std::string(pszName), port, hostname); + + std::vector vIP; + bool fRet = LookupIntern(hostname.c_str(), vIP, nMaxSolutions, fAllowLookup); + if (!fRet) + return false; + vAddr.resize(vIP.size()); + for (unsigned int i = 0; i < vIP.size(); i++) + vAddr[i] = CService(vIP[i], port); + return true; +} + +bool Lookup(const char *pszName, CService& addr, int portDefault, bool fAllowLookup) +{ + std::vector vService; + bool fRet = Lookup(pszName, vService, portDefault, fAllowLookup, 1); + if (!fRet) + return false; + addr = vService[0]; + return true; +} + +bool LookupNumeric(const char *pszName, CService& addr, int portDefault) +{ + return Lookup(pszName, addr, portDefault, false); +} + +bool static Socks4(const CService &addrDest, SOCKET& hSocket) +{ + printf("SOCKS4 connecting %s\n", addrDest.ToString().c_str()); + if (!addrDest.IsIPv4()) + { + closesocket(hSocket); + return error("Proxy destination is not IPv4"); + } + char pszSocks4IP[] = "\4\1\0\0\0\0\0\0user"; + struct sockaddr_in addr; + socklen_t len = sizeof(addr); + if (!addrDest.GetSockAddr((struct sockaddr*)&addr, &len) || addr.sin_family != AF_INET) + { + closesocket(hSocket); + return error("Cannot get proxy destination address"); + } + memcpy(pszSocks4IP + 2, &addr.sin_port, 2); + memcpy(pszSocks4IP + 4, &addr.sin_addr, 4); + char* pszSocks4 = pszSocks4IP; + int nSize = sizeof(pszSocks4IP); + + int ret = send(hSocket, pszSocks4, nSize, MSG_NOSIGNAL); + if (ret != nSize) + { + closesocket(hSocket); + return error("Error sending to proxy"); + } + char pchRet[8]; + if (recv(hSocket, pchRet, 8, 0) != 8) + { + closesocket(hSocket); + return error("Error reading proxy response"); + } + if (pchRet[1] != 0x5a) + { + closesocket(hSocket); + if (pchRet[1] != 0x5b) + printf("ERROR: Proxy returned error %d\n", pchRet[1]); + return false; + } + printf("SOCKS4 connected %s\n", addrDest.ToString().c_str()); + return true; +} + +bool static Socks5(string strDest, int port, SOCKET& hSocket) +{ + printf("SOCKS5 connecting %s\n", strDest.c_str()); + if (strDest.size() > 255) + { + closesocket(hSocket); + return error("Hostname too long"); + } + char pszSocks5Init[] = "\5\1\0"; + char *pszSocks5 = pszSocks5Init; + ssize_t nSize = sizeof(pszSocks5Init) - 1; + + ssize_t ret = send(hSocket, pszSocks5, nSize, MSG_NOSIGNAL); + if (ret != nSize) + { + closesocket(hSocket); + return error("Error sending to proxy"); + } + char pchRet1[2]; + if (recv(hSocket, pchRet1, 2, 0) != 2) + { + closesocket(hSocket); + return error("Error reading proxy response"); + } + if (pchRet1[0] != 0x05 || pchRet1[1] != 0x00) + { + closesocket(hSocket); + return error("Proxy failed to initialize"); + } + string strSocks5("\5\1"); + strSocks5 += '\000'; strSocks5 += '\003'; + strSocks5 += static_cast(std::min((int)strDest.size(), 255)); + strSocks5 += strDest; + strSocks5 += static_cast((port >> 8) & 0xFF); + strSocks5 += static_cast((port >> 0) & 0xFF); + ret = send(hSocket, strSocks5.c_str(), strSocks5.size(), MSG_NOSIGNAL); + if (ret != (ssize_t)strSocks5.size()) + { + closesocket(hSocket); + return error("Error sending to proxy"); + } + char pchRet2[4]; + if (recv(hSocket, pchRet2, 4, 0) != 4) + { + closesocket(hSocket); + return error("Error reading proxy response"); + } + if (pchRet2[0] != 0x05) + { + closesocket(hSocket); + return error("Proxy failed to accept request"); + } + if (pchRet2[1] != 0x00) + { + closesocket(hSocket); + switch (pchRet2[1]) + { + case 0x01: return error("Proxy error: general failure"); + case 0x02: return error("Proxy error: connection not allowed"); + case 0x03: return error("Proxy error: network unreachable"); + case 0x04: return error("Proxy error: host unreachable"); + case 0x05: return error("Proxy error: connection refused"); + case 0x06: return error("Proxy error: TTL expired"); + case 0x07: return error("Proxy error: protocol error"); + case 0x08: return error("Proxy error: address type not supported"); + default: return error("Proxy error: unknown"); + } + } + if (pchRet2[2] != 0x00) + { + closesocket(hSocket); + return error("Error: malformed proxy response"); + } + char pchRet3[256]; + switch (pchRet2[3]) + { + case 0x01: ret = recv(hSocket, pchRet3, 4, 0) != 4; break; + case 0x04: ret = recv(hSocket, pchRet3, 16, 0) != 16; break; + case 0x03: + { + ret = recv(hSocket, pchRet3, 1, 0) != 1; + if (ret) + return error("Error reading from proxy"); + int nRecv = pchRet3[0]; + ret = recv(hSocket, pchRet3, nRecv, 0) != nRecv; + break; + } + default: closesocket(hSocket); return error("Error: malformed proxy response"); + } + if (ret) + { + closesocket(hSocket); + return error("Error reading from proxy"); + } + if (recv(hSocket, pchRet3, 2, 0) != 2) + { + closesocket(hSocket); + return error("Error reading from proxy"); + } + printf("SOCKS5 connected %s\n", strDest.c_str()); + return true; +} + +bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRet, int nTimeout) +{ + hSocketRet = INVALID_SOCKET; + +#ifdef USE_IPV6 + struct sockaddr_storage sockaddr; +#else + struct sockaddr sockaddr; +#endif + socklen_t len = sizeof(sockaddr); + if (!addrConnect.GetSockAddr((struct sockaddr*)&sockaddr, &len)) { + printf("Cannot connect to %s: unsupported network\n", addrConnect.ToString().c_str()); + return false; + } + + SOCKET hSocket = socket(((struct sockaddr*)&sockaddr)->sa_family, SOCK_STREAM, IPPROTO_TCP); + if (hSocket == INVALID_SOCKET) + return false; +#ifdef SO_NOSIGPIPE + int set = 1; + setsockopt(hSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&set, sizeof(int)); +#endif + +#ifdef WIN32 + u_long fNonblock = 1; + if (ioctlsocket(hSocket, FIONBIO, &fNonblock) == SOCKET_ERROR) +#else + int fFlags = fcntl(hSocket, F_GETFL, 0); + if (fcntl(hSocket, F_SETFL, fFlags | O_NONBLOCK) == -1) +#endif + { + closesocket(hSocket); + return false; + } + + if (connect(hSocket, (struct sockaddr*)&sockaddr, len) == SOCKET_ERROR) + { + // WSAEINVAL is here because some legacy version of winsock uses it + if (WSAGetLastError() == WSAEINPROGRESS || WSAGetLastError() == WSAEWOULDBLOCK || WSAGetLastError() == WSAEINVAL) + { + struct timeval timeout; + timeout.tv_sec = nTimeout / 1000; + timeout.tv_usec = (nTimeout % 1000) * 1000; + + fd_set fdset; + FD_ZERO(&fdset); + FD_SET(hSocket, &fdset); + int nRet = select(hSocket + 1, NULL, &fdset, NULL, &timeout); + if (nRet == 0) + { + printf("connection timeout\n"); + closesocket(hSocket); + return false; + } + if (nRet == SOCKET_ERROR) + { + printf("select() for connection failed: %i\n",WSAGetLastError()); + closesocket(hSocket); + return false; + } + socklen_t nRetSize = sizeof(nRet); +#ifdef WIN32 + if (getsockopt(hSocket, SOL_SOCKET, SO_ERROR, (char*)(&nRet), &nRetSize) == SOCKET_ERROR) +#else + if (getsockopt(hSocket, SOL_SOCKET, SO_ERROR, &nRet, &nRetSize) == SOCKET_ERROR) +#endif + { + printf("getsockopt() for connection failed: %i\n",WSAGetLastError()); + closesocket(hSocket); + return false; + } + if (nRet != 0) + { + printf("connect() failed after select(): %s\n",strerror(nRet)); + closesocket(hSocket); + return false; + } + } +#ifdef WIN32 + else if (WSAGetLastError() != WSAEISCONN) +#else + else +#endif + { + printf("connect() failed: %i\n",WSAGetLastError()); + closesocket(hSocket); + return false; + } + } + + // this isn't even strictly necessary + // CNode::ConnectNode immediately turns the socket back to non-blocking + // but we'll turn it back to blocking just in case +#ifdef WIN32 + fNonblock = 0; + if (ioctlsocket(hSocket, FIONBIO, &fNonblock) == SOCKET_ERROR) +#else + fFlags = fcntl(hSocket, F_GETFL, 0); + if (fcntl(hSocket, F_SETFL, fFlags & !O_NONBLOCK) == SOCKET_ERROR) +#endif + { + closesocket(hSocket); + return false; + } + + hSocketRet = hSocket; + return true; +} + +bool SetProxy(enum Network net, CService addrProxy, int nSocksVersion) { + assert(net >= 0 && net < NET_MAX); + if (nSocksVersion != 0 && nSocksVersion != 4 && nSocksVersion != 5) + return false; + if (nSocksVersion != 0 && !addrProxy.IsValid()) + return false; + LOCK(cs_proxyInfos); + proxyInfo[net] = std::make_pair(addrProxy, nSocksVersion); + return true; +} + +bool GetProxy(enum Network net, proxyType &proxyInfoOut) { + assert(net >= 0 && net < NET_MAX); + LOCK(cs_proxyInfos); + if (!proxyInfo[net].second) + return false; + proxyInfoOut = proxyInfo[net]; + return true; +} + +bool SetNameProxy(CService addrProxy, int nSocksVersion) { + if (nSocksVersion != 0 && nSocksVersion != 5) + return false; + if (nSocksVersion != 0 && !addrProxy.IsValid()) + return false; + LOCK(cs_proxyInfos); + nameproxyInfo = std::make_pair(addrProxy, nSocksVersion); + return true; +} + +bool GetNameProxy(proxyType &nameproxyInfoOut) { + LOCK(cs_proxyInfos); + if (!nameproxyInfo.second) + return false; + nameproxyInfoOut = nameproxyInfo; + return true; +} + +bool HaveNameProxy() { + LOCK(cs_proxyInfos); + return nameproxyInfo.second != 0; +} + +bool IsProxy(const CNetAddr &addr) { + LOCK(cs_proxyInfos); + for (int i = 0; i < NET_MAX; i++) { + if (proxyInfo[i].second && (addr == (CNetAddr)proxyInfo[i].first)) + return true; + } + return false; +} + +bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout) +{ + proxyType proxy; + + // no proxy needed + if (!GetProxy(addrDest.GetNetwork(), proxy)) + return ConnectSocketDirectly(addrDest, hSocketRet, nTimeout); + + SOCKET hSocket = INVALID_SOCKET; + + // first connect to proxy server + if (!ConnectSocketDirectly(proxy.first, hSocket, nTimeout)) + return false; + + // do socks negotiation + switch (proxy.second) { + case 4: + if (!Socks4(addrDest, hSocket)) + return false; + break; + case 5: + if (!Socks5(addrDest.ToStringIP(), addrDest.GetPort(), hSocket)) + return false; + break; + default: + return false; + } + + hSocketRet = hSocket; + return true; +} + +bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout) +{ + string strDest; + int port = portDefault; + SplitHostPort(string(pszDest), port, strDest); + + SOCKET hSocket = INVALID_SOCKET; + + proxyType nameproxy; + GetNameProxy(nameproxy); + + CService addrResolved(CNetAddr(strDest, fNameLookup && !nameproxy.second), port); + if (addrResolved.IsValid()) { + addr = addrResolved; + return ConnectSocket(addr, hSocketRet, nTimeout); + } + addr = CService("0.0.0.0:0"); + if (!nameproxy.second) + return false; + if (!ConnectSocketDirectly(nameproxy.first, hSocket, nTimeout)) + return false; + + switch(nameproxy.second) { + default: + case 4: return false; + case 5: + if (!Socks5(strDest, port, hSocket)) + return false; + break; + } + + hSocketRet = hSocket; + return true; +} + +void CNetAddr::Init() +{ + memset(ip, 0, 16); +} + +void CNetAddr::SetIP(const CNetAddr& ipIn) +{ + memcpy(ip, ipIn.ip, sizeof(ip)); +} + +static const unsigned char pchOnionCat[] = {0xFD,0x87,0xD8,0x7E,0xEB,0x43}; +static const unsigned char pchGarliCat[] = {0xFD,0x60,0xDB,0x4D,0xDD,0xB5}; + +bool CNetAddr::SetSpecial(const std::string &strName) +{ + if (strName.size()>6 && strName.substr(strName.size() - 6, 6) == ".onion") { + std::vector vchAddr = DecodeBase32(strName.substr(0, strName.size() - 6).c_str()); + if (vchAddr.size() != 16-sizeof(pchOnionCat)) + return false; + memcpy(ip, pchOnionCat, sizeof(pchOnionCat)); + for (unsigned int i=0; i<16-sizeof(pchOnionCat); i++) + ip[i + sizeof(pchOnionCat)] = vchAddr[i]; + return true; + } + if (strName.size()>11 && strName.substr(strName.size() - 11, 11) == ".oc.b32.i2p") { + std::vector vchAddr = DecodeBase32(strName.substr(0, strName.size() - 11).c_str()); + if (vchAddr.size() != 16-sizeof(pchGarliCat)) + return false; + memcpy(ip, pchOnionCat, sizeof(pchGarliCat)); + for (unsigned int i=0; i<16-sizeof(pchGarliCat); i++) + ip[i + sizeof(pchGarliCat)] = vchAddr[i]; + return true; + } + return false; +} + +CNetAddr::CNetAddr() +{ + Init(); +} + +CNetAddr::CNetAddr(const struct in_addr& ipv4Addr) +{ + memcpy(ip, pchIPv4, 12); + memcpy(ip+12, &ipv4Addr, 4); +} + +#ifdef USE_IPV6 +CNetAddr::CNetAddr(const struct in6_addr& ipv6Addr) +{ + memcpy(ip, &ipv6Addr, 16); +} +#endif + +CNetAddr::CNetAddr(const char *pszIp, bool fAllowLookup) +{ + Init(); + std::vector vIP; + if (LookupHost(pszIp, vIP, 1, fAllowLookup)) + *this = vIP[0]; +} + +CNetAddr::CNetAddr(const std::string &strIp, bool fAllowLookup) +{ + Init(); + std::vector vIP; + if (LookupHost(strIp.c_str(), vIP, 1, fAllowLookup)) + *this = vIP[0]; +} + +unsigned int CNetAddr::GetByte(int n) const +{ + return ip[15-n]; +} + +bool CNetAddr::IsIPv4() const +{ + return (memcmp(ip, pchIPv4, sizeof(pchIPv4)) == 0); +} + +bool CNetAddr::IsIPv6() const +{ + return (!IsIPv4() && !IsTor() && !IsI2P()); +} + +bool CNetAddr::IsRFC1918() const +{ + return IsIPv4() && ( + GetByte(3) == 10 || + (GetByte(3) == 192 && GetByte(2) == 168) || + (GetByte(3) == 172 && (GetByte(2) >= 16 && GetByte(2) <= 31))); +} + +bool CNetAddr::IsRFC3927() const +{ + return IsIPv4() && (GetByte(3) == 169 && GetByte(2) == 254); +} + +bool CNetAddr::IsRFC3849() const +{ + return GetByte(15) == 0x20 && GetByte(14) == 0x01 && GetByte(13) == 0x0D && GetByte(12) == 0xB8; +} + +bool CNetAddr::IsRFC3964() const +{ + return (GetByte(15) == 0x20 && GetByte(14) == 0x02); +} + +bool CNetAddr::IsRFC6052() const +{ + static const unsigned char pchRFC6052[] = {0,0x64,0xFF,0x9B,0,0,0,0,0,0,0,0}; + return (memcmp(ip, pchRFC6052, sizeof(pchRFC6052)) == 0); +} + +bool CNetAddr::IsRFC4380() const +{ + return (GetByte(15) == 0x20 && GetByte(14) == 0x01 && GetByte(13) == 0 && GetByte(12) == 0); +} + +bool CNetAddr::IsRFC4862() const +{ + static const unsigned char pchRFC4862[] = {0xFE,0x80,0,0,0,0,0,0}; + return (memcmp(ip, pchRFC4862, sizeof(pchRFC4862)) == 0); +} + +bool CNetAddr::IsRFC4193() const +{ + return ((GetByte(15) & 0xFE) == 0xFC); +} + +bool CNetAddr::IsRFC6145() const +{ + static const unsigned char pchRFC6145[] = {0,0,0,0,0,0,0,0,0xFF,0xFF,0,0}; + return (memcmp(ip, pchRFC6145, sizeof(pchRFC6145)) == 0); +} + +bool CNetAddr::IsRFC4843() const +{ + return (GetByte(15) == 0x20 && GetByte(14) == 0x01 && GetByte(13) == 0x00 && (GetByte(12) & 0xF0) == 0x10); +} + +bool CNetAddr::IsTor() const +{ + return (memcmp(ip, pchOnionCat, sizeof(pchOnionCat)) == 0); +} + +bool CNetAddr::IsI2P() const +{ + return (memcmp(ip, pchGarliCat, sizeof(pchGarliCat)) == 0); +} + +bool CNetAddr::IsLocal() const +{ + // IPv4 loopback + if (IsIPv4() && (GetByte(3) == 127 || GetByte(3) == 0)) + return true; + + // IPv6 loopback (::1/128) + static const unsigned char pchLocal[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}; + if (memcmp(ip, pchLocal, 16) == 0) + return true; + + return false; +} + +bool CNetAddr::IsMulticast() const +{ + return (IsIPv4() && (GetByte(3) & 0xF0) == 0xE0) + || (GetByte(15) == 0xFF); +} + +bool CNetAddr::IsValid() const +{ + // Cleanup 3-byte shifted addresses caused by garbage in size field + // of addr messages from versions before 0.2.9 checksum. + // Two consecutive addr messages look like this: + // header20 vectorlen3 addr26 addr26 addr26 header20 vectorlen3 addr26 addr26 addr26... + // so if the first length field is garbled, it reads the second batch + // of addr misaligned by 3 bytes. + if (memcmp(ip, pchIPv4+3, sizeof(pchIPv4)-3) == 0) + return false; + + // unspecified IPv6 address (::/128) + unsigned char ipNone[16] = {}; + if (memcmp(ip, ipNone, 16) == 0) + return false; + + // documentation IPv6 address + if (IsRFC3849()) + return false; + + if (IsIPv4()) + { + // INADDR_NONE + uint32_t ipNone = INADDR_NONE; + if (memcmp(ip+12, &ipNone, 4) == 0) + return false; + + // 0 + ipNone = 0; + if (memcmp(ip+12, &ipNone, 4) == 0) + return false; + } + + return true; +} + +bool CNetAddr::IsRoutable() const +{ + return IsValid() && !(IsRFC1918() || IsRFC3927() || IsRFC4862() || (IsRFC4193() && !IsTor() && !IsI2P()) || IsRFC4843() || IsLocal()); +} + +enum Network CNetAddr::GetNetwork() const +{ + if (!IsRoutable()) + return NET_UNROUTABLE; + + if (IsIPv4()) + return NET_IPV4; + + if (IsTor()) + return NET_TOR; + + if (IsI2P()) + return NET_I2P; + + return NET_IPV6; +} + +std::string CNetAddr::ToStringIP() const +{ + if (IsTor()) + return EncodeBase32(&ip[6], 10) + ".onion"; + if (IsI2P()) + return EncodeBase32(&ip[6], 10) + ".oc.b32.i2p"; + CService serv(*this, 0); +#ifdef USE_IPV6 + struct sockaddr_storage sockaddr; +#else + struct sockaddr sockaddr; +#endif + socklen_t socklen = sizeof(sockaddr); + if (serv.GetSockAddr((struct sockaddr*)&sockaddr, &socklen)) { + char name[1025] = ""; + if (!getnameinfo((const struct sockaddr*)&sockaddr, socklen, name, sizeof(name), NULL, 0, NI_NUMERICHOST)) + return std::string(name); + } + if (IsIPv4()) + return strprintf("%u.%u.%u.%u", GetByte(3), GetByte(2), GetByte(1), GetByte(0)); + else + return strprintf("%x:%x:%x:%x:%x:%x:%x:%x", + GetByte(15) << 8 | GetByte(14), GetByte(13) << 8 | GetByte(12), + GetByte(11) << 8 | GetByte(10), GetByte(9) << 8 | GetByte(8), + GetByte(7) << 8 | GetByte(6), GetByte(5) << 8 | GetByte(4), + GetByte(3) << 8 | GetByte(2), GetByte(1) << 8 | GetByte(0)); +} + +std::string CNetAddr::ToString() const +{ + return ToStringIP(); +} + +bool operator==(const CNetAddr& a, const CNetAddr& b) +{ + return (memcmp(a.ip, b.ip, 16) == 0); +} + +bool operator!=(const CNetAddr& a, const CNetAddr& b) +{ + return (memcmp(a.ip, b.ip, 16) != 0); +} + +bool operator<(const CNetAddr& a, const CNetAddr& b) +{ + return (memcmp(a.ip, b.ip, 16) < 0); +} + +bool CNetAddr::GetInAddr(struct in_addr* pipv4Addr) const +{ + if (!IsIPv4()) + return false; + memcpy(pipv4Addr, ip+12, 4); + return true; +} + +#ifdef USE_IPV6 +bool CNetAddr::GetIn6Addr(struct in6_addr* pipv6Addr) const +{ + memcpy(pipv6Addr, ip, 16); + return true; +} +#endif + +// get canonical identifier of an address' group +// no two connections will be attempted to addresses with the same group +std::vector CNetAddr::GetGroup() const +{ + std::vector vchRet; + int nClass = NET_IPV6; + int nStartByte = 0; + int nBits = 16; + + // all local addresses belong to the same group + if (IsLocal()) + { + nClass = 255; + nBits = 0; + } + + // all unroutable addresses belong to the same group + if (!IsRoutable()) + { + nClass = NET_UNROUTABLE; + nBits = 0; + } + // for IPv4 addresses, '1' + the 16 higher-order bits of the IP + // includes mapped IPv4, SIIT translated IPv4, and the well-known prefix + else if (IsIPv4() || IsRFC6145() || IsRFC6052()) + { + nClass = NET_IPV4; + nStartByte = 12; + } + // for 6to4 tunnelled addresses, use the encapsulated IPv4 address + else if (IsRFC3964()) + { + nClass = NET_IPV4; + nStartByte = 2; + } + // for Teredo-tunnelled IPv6 addresses, use the encapsulated IPv4 address + else if (IsRFC4380()) + { + vchRet.push_back(NET_IPV4); + vchRet.push_back(GetByte(3) ^ 0xFF); + vchRet.push_back(GetByte(2) ^ 0xFF); + return vchRet; + } + else if (IsTor()) + { + nClass = NET_TOR; + nStartByte = 6; + nBits = 4; + } + else if (IsI2P()) + { + nClass = NET_I2P; + nStartByte = 6; + nBits = 4; + } + // for he.net, use /36 groups + else if (GetByte(15) == 0x20 && GetByte(14) == 0x11 && GetByte(13) == 0x04 && GetByte(12) == 0x70) + nBits = 36; + // for the rest of the IPv6 network, use /32 groups + else + nBits = 32; + + vchRet.push_back(nClass); + while (nBits >= 8) + { + vchRet.push_back(GetByte(15 - nStartByte)); + nStartByte++; + nBits -= 8; + } + if (nBits > 0) + vchRet.push_back(GetByte(15 - nStartByte) | ((1 << nBits) - 1)); + + return vchRet; +} + +uint64 CNetAddr::GetHash() const +{ + uint256 hash = Hash(&ip[0], &ip[16]); + uint64 nRet; + memcpy(&nRet, &hash, sizeof(nRet)); + return nRet; +} + +void CNetAddr::print() const +{ + printf("CNetAddr(%s)\n", ToString().c_str()); +} + +// private extensions to enum Network, only returned by GetExtNetwork, +// and only used in GetReachabilityFrom +static const int NET_UNKNOWN = NET_MAX + 0; +static const int NET_TEREDO = NET_MAX + 1; +int static GetExtNetwork(const CNetAddr *addr) +{ + if (addr == NULL) + return NET_UNKNOWN; + if (addr->IsRFC4380()) + return NET_TEREDO; + return addr->GetNetwork(); +} + +/** Calculates a metric for how reachable (*this) is from a given partner */ +int CNetAddr::GetReachabilityFrom(const CNetAddr *paddrPartner) const +{ + enum Reachability { + REACH_UNREACHABLE, + REACH_DEFAULT, + REACH_TEREDO, + REACH_IPV6_WEAK, + REACH_IPV4, + REACH_IPV6_STRONG, + REACH_PRIVATE + }; + + if (!IsRoutable()) + return REACH_UNREACHABLE; + + int ourNet = GetExtNetwork(this); + int theirNet = GetExtNetwork(paddrPartner); + bool fTunnel = IsRFC3964() || IsRFC6052() || IsRFC6145(); + + switch(theirNet) { + case NET_IPV4: + switch(ourNet) { + default: return REACH_DEFAULT; + case NET_IPV4: return REACH_IPV4; + } + case NET_IPV6: + switch(ourNet) { + default: return REACH_DEFAULT; + case NET_TEREDO: return REACH_TEREDO; + case NET_IPV4: return REACH_IPV4; + case NET_IPV6: return fTunnel ? REACH_IPV6_WEAK : REACH_IPV6_STRONG; // only prefer giving our IPv6 address if it's not tunnelled + } + case NET_TOR: + switch(ourNet) { + default: return REACH_DEFAULT; + case NET_IPV4: return REACH_IPV4; // Tor users can connect to IPv4 as well + case NET_TOR: return REACH_PRIVATE; + } + case NET_I2P: + switch(ourNet) { + default: return REACH_DEFAULT; + case NET_I2P: return REACH_PRIVATE; + } + case NET_TEREDO: + switch(ourNet) { + default: return REACH_DEFAULT; + case NET_TEREDO: return REACH_TEREDO; + case NET_IPV6: return REACH_IPV6_WEAK; + case NET_IPV4: return REACH_IPV4; + } + case NET_UNKNOWN: + case NET_UNROUTABLE: + default: + switch(ourNet) { + default: return REACH_DEFAULT; + case NET_TEREDO: return REACH_TEREDO; + case NET_IPV6: return REACH_IPV6_WEAK; + case NET_IPV4: return REACH_IPV4; + case NET_I2P: return REACH_PRIVATE; // assume connections from unroutable addresses are + case NET_TOR: return REACH_PRIVATE; // either from Tor/I2P, or don't care about our address + } + } +} + +void CService::Init() +{ + port = 0; +} + +CService::CService() +{ + Init(); +} + +CService::CService(const CNetAddr& cip, unsigned short portIn) : CNetAddr(cip), port(portIn) +{ +} + +CService::CService(const struct in_addr& ipv4Addr, unsigned short portIn) : CNetAddr(ipv4Addr), port(portIn) +{ +} + +#ifdef USE_IPV6 +CService::CService(const struct in6_addr& ipv6Addr, unsigned short portIn) : CNetAddr(ipv6Addr), port(portIn) +{ +} +#endif + +CService::CService(const struct sockaddr_in& addr) : CNetAddr(addr.sin_addr), port(ntohs(addr.sin_port)) +{ + assert(addr.sin_family == AF_INET); +} + +#ifdef USE_IPV6 +CService::CService(const struct sockaddr_in6 &addr) : CNetAddr(addr.sin6_addr), port(ntohs(addr.sin6_port)) +{ + assert(addr.sin6_family == AF_INET6); +} +#endif + +bool CService::SetSockAddr(const struct sockaddr *paddr) +{ + switch (paddr->sa_family) { + case AF_INET: + *this = CService(*(const struct sockaddr_in*)paddr); + return true; +#ifdef USE_IPV6 + case AF_INET6: + *this = CService(*(const struct sockaddr_in6*)paddr); + return true; +#endif + default: + return false; + } +} + +CService::CService(const char *pszIpPort, bool fAllowLookup) +{ + Init(); + CService ip; + if (Lookup(pszIpPort, ip, 0, fAllowLookup)) + *this = ip; +} + +CService::CService(const char *pszIpPort, int portDefault, bool fAllowLookup) +{ + Init(); + CService ip; + if (Lookup(pszIpPort, ip, portDefault, fAllowLookup)) + *this = ip; +} + +CService::CService(const std::string &strIpPort, bool fAllowLookup) +{ + Init(); + CService ip; + if (Lookup(strIpPort.c_str(), ip, 0, fAllowLookup)) + *this = ip; +} + +CService::CService(const std::string &strIpPort, int portDefault, bool fAllowLookup) +{ + Init(); + CService ip; + if (Lookup(strIpPort.c_str(), ip, portDefault, fAllowLookup)) + *this = ip; +} + +unsigned short CService::GetPort() const +{ + return port; +} + +bool operator==(const CService& a, const CService& b) +{ + return (CNetAddr)a == (CNetAddr)b && a.port == b.port; +} + +bool operator!=(const CService& a, const CService& b) +{ + return (CNetAddr)a != (CNetAddr)b || a.port != b.port; +} + +bool operator<(const CService& a, const CService& b) +{ + return (CNetAddr)a < (CNetAddr)b || ((CNetAddr)a == (CNetAddr)b && a.port < b.port); +} + +bool CService::GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const +{ + if (IsIPv4()) { + if (*addrlen < (socklen_t)sizeof(struct sockaddr_in)) + return false; + *addrlen = sizeof(struct sockaddr_in); + struct sockaddr_in *paddrin = (struct sockaddr_in*)paddr; + memset(paddrin, 0, *addrlen); + if (!GetInAddr(&paddrin->sin_addr)) + return false; + paddrin->sin_family = AF_INET; + paddrin->sin_port = htons(port); + return true; + } +#ifdef USE_IPV6 + if (IsIPv6()) { + if (*addrlen < (socklen_t)sizeof(struct sockaddr_in6)) + return false; + *addrlen = sizeof(struct sockaddr_in6); + struct sockaddr_in6 *paddrin6 = (struct sockaddr_in6*)paddr; + memset(paddrin6, 0, *addrlen); + if (!GetIn6Addr(&paddrin6->sin6_addr)) + return false; + paddrin6->sin6_family = AF_INET6; + paddrin6->sin6_port = htons(port); + return true; + } +#endif + return false; +} + +std::vector CService::GetKey() const +{ + std::vector vKey; + vKey.resize(18); + memcpy(&vKey[0], ip, 16); + vKey[16] = port / 0x100; + vKey[17] = port & 0x0FF; + return vKey; +} + +std::string CService::ToStringPort() const +{ + return strprintf("%u", port); +} + +std::string CService::ToStringIPPort() const +{ + if (IsIPv4() || IsTor() || IsI2P()) { + return ToStringIP() + ":" + ToStringPort(); + } else { + return "[" + ToStringIP() + "]:" + ToStringPort(); + } +} + +std::string CService::ToString() const +{ + return ToStringIPPort(); +} + +void CService::print() const +{ + printf("CService(%s)\n", ToString().c_str()); +} + +void CService::SetPort(unsigned short portIn) +{ + port = portIn; +} diff --git a/src/netbase.h b/src/netbase.h new file mode 100644 index 0000000..c0322a2 --- /dev/null +++ b/src/netbase.h @@ -0,0 +1,153 @@ +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_NETBASE_H +#define curecoin_NETBASE_H + +#include +#include + +#include "serialize.h" +#include "compat.h" + +extern int nConnectTimeout; + +#ifdef WIN32 +// In MSVC, this is defined as a macro, undefine it to prevent a compile and link error +#undef SetPort +#endif + +enum Network +{ + NET_UNROUTABLE, + NET_IPV4, + NET_IPV6, + NET_TOR, + NET_I2P, + + NET_MAX, +}; + +extern int nConnectTimeout; +extern bool fNameLookup; + +/** IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96)) */ +class CNetAddr +{ + protected: + unsigned char ip[16]; // in network byte order + + public: + CNetAddr(); + CNetAddr(const struct in_addr& ipv4Addr); + explicit CNetAddr(const char *pszIp, bool fAllowLookup = false); + explicit CNetAddr(const std::string &strIp, bool fAllowLookup = false); + void Init(); + void SetIP(const CNetAddr& ip); + bool SetSpecial(const std::string &strName); // for Tor and I2P addresses + bool IsIPv4() const; // IPv4 mapped address (::FFFF:0:0/96, 0.0.0.0/0) + bool IsIPv6() const; // IPv6 address (not mapped IPv4, not Tor/I2P) + bool IsRFC1918() const; // IPv4 private networks (10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12) + bool IsRFC3849() const; // IPv6 documentation address (2001:0DB8::/32) + bool IsRFC3927() const; // IPv4 autoconfig (169.254.0.0/16) + bool IsRFC3964() const; // IPv6 6to4 tunnelling (2002::/16) + bool IsRFC4193() const; // IPv6 unique local (FC00::/15) + bool IsRFC4380() const; // IPv6 Teredo tunnelling (2001::/32) + bool IsRFC4843() const; // IPv6 ORCHID (2001:10::/28) + bool IsRFC4862() const; // IPv6 autoconfig (FE80::/64) + bool IsRFC6052() const; // IPv6 well-known prefix (64:FF9B::/96) + bool IsRFC6145() const; // IPv6 IPv4-translated address (::FFFF:0:0:0/96) + bool IsTor() const; + bool IsI2P() const; + bool IsLocal() const; + bool IsRoutable() const; + bool IsValid() const; + bool IsMulticast() const; + enum Network GetNetwork() const; + std::string ToString() const; + std::string ToStringIP() const; + unsigned int GetByte(int n) const; + uint64 GetHash() const; + bool GetInAddr(struct in_addr* pipv4Addr) const; + std::vector GetGroup() const; + int GetReachabilityFrom(const CNetAddr *paddrPartner = NULL) const; + void print() const; + +#ifdef USE_IPV6 + CNetAddr(const struct in6_addr& pipv6Addr); + bool GetIn6Addr(struct in6_addr* pipv6Addr) const; +#endif + + friend bool operator==(const CNetAddr& a, const CNetAddr& b); + friend bool operator!=(const CNetAddr& a, const CNetAddr& b); + friend bool operator<(const CNetAddr& a, const CNetAddr& b); + + IMPLEMENT_SERIALIZE + ( + READWRITE(FLATDATA(ip)); + ) +}; + +/** A combination of a network address (CNetAddr) and a (TCP) port */ +class CService : public CNetAddr +{ + protected: + unsigned short port; // host order + + public: + CService(); + CService(const CNetAddr& ip, unsigned short port); + CService(const struct in_addr& ipv4Addr, unsigned short port); + CService(const struct sockaddr_in& addr); + explicit CService(const char *pszIpPort, int portDefault, bool fAllowLookup = false); + explicit CService(const char *pszIpPort, bool fAllowLookup = false); + explicit CService(const std::string& strIpPort, int portDefault, bool fAllowLookup = false); + explicit CService(const std::string& strIpPort, bool fAllowLookup = false); + void Init(); + void SetPort(unsigned short portIn); + unsigned short GetPort() const; + bool GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const; + bool SetSockAddr(const struct sockaddr* paddr); + friend bool operator==(const CService& a, const CService& b); + friend bool operator!=(const CService& a, const CService& b); + friend bool operator<(const CService& a, const CService& b); + std::vector GetKey() const; + std::string ToString() const; + std::string ToStringPort() const; + std::string ToStringIPPort() const; + void print() const; + +#ifdef USE_IPV6 + CService(const struct in6_addr& ipv6Addr, unsigned short port); + CService(const struct sockaddr_in6& addr); +#endif + + IMPLEMENT_SERIALIZE + ( + CService* pthis = const_cast(this); + READWRITE(FLATDATA(ip)); + unsigned short portN = htons(port); + READWRITE(portN); + if (fRead) + pthis->port = ntohs(portN); + ) +}; + +typedef std::pair proxyType; + +enum Network ParseNetwork(std::string net); +void SplitHostPort(std::string in, int &portOut, std::string &hostOut); +bool SetProxy(enum Network net, CService addrProxy, int nSocksVersion = 5); +bool GetProxy(enum Network net, proxyType &proxyInfoOut); +bool IsProxy(const CNetAddr &addr); +bool SetNameProxy(CService addrProxy, int nSocksVersion = 5); +bool HaveNameProxy(); +bool LookupHost(const char *pszName, std::vector& vIP, unsigned int nMaxSolutions = 0, bool fAllowLookup = true); +bool LookupHostNumeric(const char *pszName, std::vector& vIP, unsigned int nMaxSolutions = 0); +bool Lookup(const char *pszName, CService& addr, int portDefault = 0, bool fAllowLookup = true); +bool Lookup(const char *pszName, std::vector& vAddr, int portDefault = 0, bool fAllowLookup = true, unsigned int nMaxSolutions = 0); +bool LookupNumeric(const char *pszName, CService& addr, int portDefault = 0); +bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout = nConnectTimeout); +bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault = 0, int nTimeout = nConnectTimeout); + +#endif diff --git a/src/noui.cpp b/src/noui.cpp new file mode 100644 index 0000000..2ba6e0c --- /dev/null +++ b/src/noui.cpp @@ -0,0 +1,28 @@ +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include "ui_interface.h" +#include "init.h" +#include "curecoinrpc.h" + +#include + +static int noui_ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style) +{ + printf("%s: %s\n", caption.c_str(), message.c_str()); + fprintf(stderr, "%s: %s\n", caption.c_str(), message.c_str()); + return 4; +} + +static bool noui_ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption) +{ + return true; +} + +void noui_connect() +{ + // Connect curecoind signal handlers + uiInterface.ThreadSafeMessageBox.connect(noui_ThreadSafeMessageBox); + uiInterface.ThreadSafeAskFee.connect(noui_ThreadSafeAskFee); +} diff --git a/src/pbkdf2.cpp b/src/pbkdf2.cpp new file mode 100644 index 0000000..4f375ef --- /dev/null +++ b/src/pbkdf2.cpp @@ -0,0 +1,135 @@ +// Copyright (c) 2013 curecoin Developers + +#include +#include "pbkdf2.h" + +static inline uint32_t be32dec(const void *pp) +{ + const uint8_t *p = (uint8_t const *)pp; + return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) + + ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24)); +} + +static inline void be32enc(void *pp, uint32_t x) +{ + uint8_t * p = (uint8_t *)pp; + p[3] = x & 0xff; + p[2] = (x >> 8) & 0xff; + p[1] = (x >> 16) & 0xff; + p[0] = (x >> 24) & 0xff; +} + +/* Initialize an HMAC-SHA256 operation with the given key. */ +void HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen) +{ + unsigned char pad[64]; + unsigned char khash[32]; + const unsigned char * K = (const unsigned char *)_K; + size_t i; + + /* If Klen > 64, the key is really SHA256(K). */ + if (Klen > 64) { + SHA256_Init(&ctx->ictx); + SHA256_Update(&ctx->ictx, K, Klen); + SHA256_Final(khash, &ctx->ictx); + K = khash; + Klen = 32; + } + + /* Inner SHA256 operation is SHA256(K xor [block of 0x36] || data). */ + SHA256_Init(&ctx->ictx); + memset(pad, 0x36, 64); + for (i = 0; i < Klen; i++) + pad[i] ^= K[i]; + SHA256_Update(&ctx->ictx, pad, 64); + + /* Outer SHA256 operation is SHA256(K xor [block of 0x5c] || hash). */ + SHA256_Init(&ctx->octx); + memset(pad, 0x5c, 64); + for (i = 0; i < Klen; i++) + pad[i] ^= K[i]; + SHA256_Update(&ctx->octx, pad, 64); + + /* Clean the stack. */ + memset(khash, 0, 32); +} + +/* Add bytes to the HMAC-SHA256 operation. */ +void HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void *in, size_t len) +{ + /* Feed data to the inner SHA256 operation. */ + SHA256_Update(&ctx->ictx, in, len); +} + +/* Finish an HMAC-SHA256 operation. */ +void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX * ctx) +{ + unsigned char ihash[32]; + + /* Finish the inner SHA256 operation. */ + SHA256_Final(ihash, &ctx->ictx); + + /* Feed the inner hash to the outer SHA256 operation. */ + SHA256_Update(&ctx->octx, ihash, 32); + + /* Finish the outer SHA256 operation. */ + SHA256_Final(digest, &ctx->octx); + + /* Clean the stack. */ + memset(ihash, 0, 32); +} + +/** + * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): + * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and + * write the output to buf. The value dkLen must be at most 32 * (2^32 - 1). + */ +void PBKDF2_SHA256(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt, size_t saltlen, uint64_t c, uint8_t * buf, size_t dkLen) +{ + HMAC_SHA256_CTX PShctx, hctx; + size_t i; + uint8_t ivec[4]; + uint8_t U[32]; + uint8_t T[32]; + uint64_t j; + int k; + size_t clen; + + /* Compute HMAC state after processing P and S. */ + HMAC_SHA256_Init(&PShctx, passwd, passwdlen); + HMAC_SHA256_Update(&PShctx, salt, saltlen); + + /* Iterate through the blocks. */ + for (i = 0; i * 32 < dkLen; i++) { + /* Generate INT(i + 1). */ + be32enc(ivec, (uint32_t)(i + 1)); + + /* Compute U_1 = PRF(P, S || INT(i)). */ + memcpy(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX)); + HMAC_SHA256_Update(&hctx, ivec, 4); + HMAC_SHA256_Final(U, &hctx); + + /* T_i = U_1 ... */ + memcpy(T, U, 32); + + for (j = 2; j <= c; j++) { + /* Compute U_j. */ + HMAC_SHA256_Init(&hctx, passwd, passwdlen); + HMAC_SHA256_Update(&hctx, U, 32); + HMAC_SHA256_Final(U, &hctx); + + /* ... xor U_j ... */ + for (k = 0; k < 32; k++) + T[k] ^= U[k]; + } + + /* Copy as many bytes as necessary into buf. */ + clen = dkLen - i * 32; + if (clen > 32) + clen = 32; + memcpy(&buf[i * 32], T, clen); + } + + /* Clean PShctx, since we never called _Final on it. */ + memset(&PShctx, 0, sizeof(HMAC_SHA256_CTX)); +} diff --git a/src/pbkdf2.h b/src/pbkdf2.h new file mode 100644 index 0000000..37b889d --- /dev/null +++ b/src/pbkdf2.h @@ -0,0 +1,22 @@ +// Copyright (c) 2013 curecoin Developers + +#ifndef PBKDF2_H +#define PBKDF2_H + +#include +#include + +typedef struct HMAC_SHA256Context { + SHA256_CTX ictx; + SHA256_CTX octx; +} HMAC_SHA256_CTX; + +void HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen); + +void HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void *in, size_t len); + +void HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX * ctx); + +void PBKDF2_SHA256(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt, size_t saltlen, uint64_t c, uint8_t * buf, size_t dkLen); + +#endif // PBKDF2_H diff --git a/src/protocol.cpp b/src/protocol.cpp new file mode 100644 index 0000000..6a91aa3 --- /dev/null +++ b/src/protocol.cpp @@ -0,0 +1,150 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "protocol.h" +#include "util.h" +#include "netbase.h" + +#ifndef WIN32 +# include +#endif + +static const char* ppszTypeName[] = +{ + "ERROR", + "tx", + "block", +}; + +CMessageHeader::CMessageHeader() +{ + memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart)); + memset(pchCommand, 0, sizeof(pchCommand)); + pchCommand[1] = 1; + nMessageSize = -1; + nChecksum = 0; +} + +CMessageHeader::CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn) +{ + memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart)); + strncpy(pchCommand, pszCommand, COMMAND_SIZE); + nMessageSize = nMessageSizeIn; + nChecksum = 0; +} + +std::string CMessageHeader::GetCommand() const +{ + if (pchCommand[COMMAND_SIZE-1] == 0) + return std::string(pchCommand, pchCommand + strlen(pchCommand)); + else + return std::string(pchCommand, pchCommand + COMMAND_SIZE); +} + +bool CMessageHeader::IsValid() const +{ + // Check start string + if (memcmp(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart)) != 0) + return false; + + // Check the command string for errors + for (const char* p1 = pchCommand; p1 < pchCommand + COMMAND_SIZE; p1++) + { + if (*p1 == 0) + { + // Must be all zeros after the first zero + for (; p1 < pchCommand + COMMAND_SIZE; p1++) + if (*p1 != 0) + return false; + } + else if (*p1 < ' ' || *p1 > 0x7E) + return false; + } + + // Message size + if (nMessageSize > MAX_SIZE) + { + printf("CMessageHeader::IsValid() : (%s, %u bytes) nMessageSize > MAX_SIZE\n", GetCommand().c_str(), nMessageSize); + return false; + } + + return true; +} + + + +CAddress::CAddress() : CService() +{ + Init(); +} + +CAddress::CAddress(CService ipIn, uint64 nServicesIn) : CService(ipIn) +{ + Init(); + nServices = nServicesIn; +} + +void CAddress::Init() +{ + nServices = NODE_NETWORK; + nTime = 100000000; + nLastTry = 0; +} + +CInv::CInv() +{ + type = 0; + hash = 0; +} + +CInv::CInv(int typeIn, const uint256& hashIn) +{ + type = typeIn; + hash = hashIn; +} + +CInv::CInv(const std::string& strType, const uint256& hashIn) +{ + unsigned int i; + for (i = 1; i < ARRAYLEN(ppszTypeName); i++) + { + if (strType == ppszTypeName[i]) + { + type = i; + break; + } + } + if (i == ARRAYLEN(ppszTypeName)) + throw std::out_of_range(strprintf("CInv::CInv(string, uint256) : unknown type '%s'", strType.c_str())); + hash = hashIn; +} + +bool operator<(const CInv& a, const CInv& b) +{ + return (a.type < b.type || (a.type == b.type && a.hash < b.hash)); +} + +bool CInv::IsKnownType() const +{ + return (type >= 1 && type < (int)ARRAYLEN(ppszTypeName)); +} + +const char* CInv::GetCommand() const +{ + if (!IsKnownType()) + throw std::out_of_range(strprintf("CInv::GetCommand() : type=%d unknown type", type)); + return ppszTypeName[type]; +} + +std::string CInv::ToString() const +{ + return strprintf("%s %s", GetCommand(), hash.ToString().substr(0,20).c_str()); +} + +void CInv::print() const +{ + printf("CInv(%s)\n", ToString().c_str()); +} + diff --git a/src/protocol.h b/src/protocol.h new file mode 100644 index 0000000..795d769 --- /dev/null +++ b/src/protocol.h @@ -0,0 +1,142 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef __cplusplus +# error This header can only be compiled as C++. +#endif + +#ifndef __INCLUDED_PROTOCOL_H__ +#define __INCLUDED_PROTOCOL_H__ + +#include "serialize.h" +#include "netbase.h" +#include +#include "uint256.h" + +const int DEF_PROT=9911; +const int DEF_RPCPORT=19911; +const int DEF_TESTNET_PORT=8600; +const int DEF_TESTNET_RPCPORT=18600; + +extern bool fTestNet; +static inline unsigned short GetDefaultPort(const bool testnet = fTestNet) +{ + return testnet ? DEF_TESTNET_PORT : DEF_PROT; +} + + +extern unsigned char pchMessageStart[4]; + +/** Message header. + * (4) message start. + * (12) command. + * (4) size. + * (4) checksum. + */ +class CMessageHeader +{ + public: + CMessageHeader(); + CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn); + + std::string GetCommand() const; + bool IsValid() const; + + IMPLEMENT_SERIALIZE + ( + READWRITE(FLATDATA(pchMessageStart)); + READWRITE(FLATDATA(pchCommand)); + READWRITE(nMessageSize); + READWRITE(nChecksum); + ) + + // TODO: make private (improves encapsulation) + public: + enum { + MESSAGE_START_SIZE=sizeof(::pchMessageStart), + COMMAND_SIZE=12, + MESSAGE_SIZE_SIZE=sizeof(int), + CHECKSUM_SIZE=sizeof(int), + + MESSAGE_SIZE_OFFSET=MESSAGE_START_SIZE+COMMAND_SIZE, + CHECKSUM_OFFSET=MESSAGE_SIZE_OFFSET+MESSAGE_SIZE_SIZE + }; + char pchMessageStart[MESSAGE_START_SIZE]; + char pchCommand[COMMAND_SIZE]; + unsigned int nMessageSize; + unsigned int nChecksum; +}; + +/** nServices flags */ +enum +{ + NODE_NETWORK = (1 << 0), +}; + +/** A CService with information about it as peer */ +class CAddress : public CService +{ + public: + CAddress(); + explicit CAddress(CService ipIn, uint64 nServicesIn=NODE_NETWORK); + + void Init(); + + IMPLEMENT_SERIALIZE + ( + CAddress* pthis = const_cast(this); + CService* pip = (CService*)pthis; + if (fRead) + pthis->Init(); + if (nType & SER_DISK) + READWRITE(nVersion); + if ((nType & SER_DISK) || + (nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH))) + READWRITE(nTime); + READWRITE(nServices); + READWRITE(*pip); + ) + + void print() const; + + // TODO: make private (improves encapsulation) + public: + uint64 nServices; + + // disk and network only + unsigned int nTime; + + // memory only + int64 nLastTry; +}; + +/** inv message data */ +class CInv +{ + public: + CInv(); + CInv(int typeIn, const uint256& hashIn); + CInv(const std::string& strType, const uint256& hashIn); + + IMPLEMENT_SERIALIZE + ( + READWRITE(type); + READWRITE(hash); + ) + + friend bool operator<(const CInv& a, const CInv& b); + + bool IsKnownType() const; + const char* GetCommand() const; + std::string ToString() const; + void print() const; + + // TODO: make private (improves encapsulation) + public: + int type; + uint256 hash; +}; + +#endif // __INCLUDED_PROTOCOL_H__ diff --git a/src/qt/aboutdialog.cpp b/src/qt/aboutdialog.cpp new file mode 100644 index 0000000..0b98bef --- /dev/null +++ b/src/qt/aboutdialog.cpp @@ -0,0 +1,30 @@ +#include "aboutdialog.h" +#include "ui_aboutdialog.h" +#include "clientmodel.h" + +#include "version.h" + +AboutDialog::AboutDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::AboutDialog) +{ + ui->setupUi(this); +} + +void AboutDialog::setModel(ClientModel *model) +{ + if(model) + { + ui->versionLabel->setText(model->formatFullVersion()); + } +} + +AboutDialog::~AboutDialog() +{ + delete ui; +} + +void AboutDialog::on_buttonBox_accepted() +{ + close(); +} diff --git a/src/qt/aboutdialog.h b/src/qt/aboutdialog.h new file mode 100644 index 0000000..2ed9e9e --- /dev/null +++ b/src/qt/aboutdialog.h @@ -0,0 +1,28 @@ +#ifndef ABOUTDIALOG_H +#define ABOUTDIALOG_H + +#include + +namespace Ui { + class AboutDialog; +} +class ClientModel; + +/** "About" dialog box */ +class AboutDialog : public QDialog +{ + Q_OBJECT + +public: + explicit AboutDialog(QWidget *parent = 0); + ~AboutDialog(); + + void setModel(ClientModel *model); +private: + Ui::AboutDialog *ui; + +private slots: + void on_buttonBox_accepted(); +}; + +#endif // ABOUTDIALOG_H diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp new file mode 100644 index 0000000..ee432b1 --- /dev/null +++ b/src/qt/addressbookpage.cpp @@ -0,0 +1,374 @@ +#include "addressbookpage.h" +#include "ui_addressbookpage.h" + +#include "addresstablemodel.h" +#include "optionsmodel.h" +#include "curecoingui.h" +#include "editaddressdialog.h" +#include "csvmodelwriter.h" +#include "guiutil.h" + +#include +#include +#include +#include + +#ifdef USE_QRCODE +#include "qrcodedialog.h" +#endif + +AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : + QDialog(parent), + ui(new Ui::AddressBookPage), + model(0), + optionsModel(0), + mode(mode), + tab(tab) +{ + ui->setupUi(this); + +#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac + ui->newAddressButton->setIcon(QIcon()); + ui->copyToClipboard->setIcon(QIcon()); + ui->deleteButton->setIcon(QIcon()); +#endif + +#ifndef USE_QRCODE + ui->showQRCode->setVisible(false); +#endif + + switch(mode) + { + case ForSending: + connect(ui->tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(accept())); + ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); + ui->tableView->setFocus(); + break; + case ForEditing: + ui->buttonBox->setVisible(false); + break; + } + switch(tab) + { + case SendingTab: + ui->labelExplanation->setVisible(false); + ui->deleteButton->setVisible(true); + ui->signMessage->setVisible(false); + break; + case ReceivingTab: + ui->deleteButton->setVisible(false); + ui->signMessage->setVisible(true); + break; + } + + // Context menu actions + QAction *copyLabelAction = new QAction(tr("Copy &Label"), this); + QAction *copyAddressAction = new QAction(ui->copyToClipboard->text(), this); + QAction *editAction = new QAction(tr("&Edit"), this); + QAction *showQRCodeAction = new QAction(ui->showQRCode->text(), this); + QAction *signMessageAction = new QAction(ui->signMessage->text(), this); + QAction *verifyMessageAction = new QAction(ui->verifyMessage->text(), this); + deleteAction = new QAction(ui->deleteButton->text(), this); + + // Build context menu + contextMenu = new QMenu(); + contextMenu->addAction(copyAddressAction); + contextMenu->addAction(copyLabelAction); + contextMenu->addAction(editAction); + if(tab == SendingTab) + contextMenu->addAction(deleteAction); + contextMenu->addSeparator(); + contextMenu->addAction(showQRCodeAction); + if(tab == ReceivingTab) + contextMenu->addAction(signMessageAction); + else if(tab == SendingTab) + contextMenu->addAction(verifyMessageAction); + + // Connect signals for context menu actions + connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyToClipboard_clicked())); + connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction())); + connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction())); + connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked())); + connect(showQRCodeAction, SIGNAL(triggered()), this, SLOT(on_showQRCode_clicked())); + connect(signMessageAction, SIGNAL(triggered()), this, SLOT(on_signMessage_clicked())); + connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(on_verifyMessage_clicked())); + + connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); + + // Pass through accept action from button box + connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); +} + +AddressBookPage::~AddressBookPage() +{ + delete ui; +} + +void AddressBookPage::setModel(AddressTableModel *model) +{ + this->model = model; + if(!model) + return; + + proxyModel = new QSortFilterProxyModel(this); + proxyModel->setSourceModel(model); + proxyModel->setDynamicSortFilter(true); + proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); + proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); + switch(tab) + { + case ReceivingTab: + // Receive filter + proxyModel->setFilterRole(AddressTableModel::TypeRole); + proxyModel->setFilterFixedString(AddressTableModel::Receive); + break; + case SendingTab: + // Send filter + proxyModel->setFilterRole(AddressTableModel::TypeRole); + proxyModel->setFilterFixedString(AddressTableModel::Send); + break; + } + ui->tableView->setModel(proxyModel); + ui->tableView->sortByColumn(0, Qt::AscendingOrder); + + // Set column widths + ui->tableView->horizontalHeader()->resizeSection( + AddressTableModel::Address, 320); + ui->tableView->horizontalHeader()->setResizeMode( + AddressTableModel::Label, QHeaderView::Stretch); + + connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), + this, SLOT(selectionChanged())); + + // Select row for newly created address + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(selectNewAddress(QModelIndex,int,int))); + + selectionChanged(); +} + +void AddressBookPage::setOptionsModel(OptionsModel *optionsModel) +{ + this->optionsModel = optionsModel; +} + +void AddressBookPage::on_copyToClipboard_clicked() +{ + GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Address); +} + +void AddressBookPage::onCopyLabelAction() +{ + GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Label); +} + +void AddressBookPage::onEditAction() +{ + if(!ui->tableView->selectionModel()) + return; + QModelIndexList indexes = ui->tableView->selectionModel()->selectedRows(); + if(indexes.isEmpty()) + return; + + EditAddressDialog dlg( + tab == SendingTab ? + EditAddressDialog::EditSendingAddress : + EditAddressDialog::EditReceivingAddress); + dlg.setModel(model); + QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0)); + dlg.loadRow(origIndex.row()); + dlg.exec(); +} + +void AddressBookPage::on_signMessage_clicked() +{ + QTableView *table = ui->tableView; + QModelIndexList indexes = table->selectionModel()->selectedRows(AddressTableModel::Address); + QString addr; + + foreach (QModelIndex index, indexes) + { + QVariant address = index.data(); + addr = address.toString(); + } + + emit signMessage(addr); +} + +void AddressBookPage::on_verifyMessage_clicked() +{ + QTableView *table = ui->tableView; + QModelIndexList indexes = table->selectionModel()->selectedRows(AddressTableModel::Address); + QString addr; + + foreach (QModelIndex index, indexes) + { + QVariant address = index.data(); + addr = address.toString(); + } + + emit verifyMessage(addr); +} + +void AddressBookPage::on_newAddressButton_clicked() +{ + if(!model) + return; + EditAddressDialog dlg( + tab == SendingTab ? + EditAddressDialog::NewSendingAddress : + EditAddressDialog::NewReceivingAddress, this); + dlg.setModel(model); + if(dlg.exec()) + { + newAddressToSelect = dlg.getAddress(); + } +} + +void AddressBookPage::on_deleteButton_clicked() +{ + QTableView *table = ui->tableView; + if(!table->selectionModel()) + return; + QModelIndexList indexes = table->selectionModel()->selectedRows(); + if(!indexes.isEmpty()) + { + table->model()->removeRow(indexes.at(0).row()); + } +} + +void AddressBookPage::selectionChanged() +{ + // Set button states based on selected tab and selection + QTableView *table = ui->tableView; + if(!table->selectionModel()) + return; + + if(table->selectionModel()->hasSelection()) + { + switch(tab) + { + case SendingTab: + // In sending tab, allow deletion of selection + ui->deleteButton->setEnabled(true); + ui->deleteButton->setVisible(true); + deleteAction->setEnabled(true); + ui->signMessage->setEnabled(false); + ui->signMessage->setVisible(false); + ui->verifyMessage->setEnabled(true); + ui->verifyMessage->setVisible(true); + break; + case ReceivingTab: + // Deleting receiving addresses, however, is not allowed + ui->deleteButton->setEnabled(false); + ui->deleteButton->setVisible(false); + deleteAction->setEnabled(false); + ui->signMessage->setEnabled(true); + ui->signMessage->setVisible(true); + ui->verifyMessage->setEnabled(false); + ui->verifyMessage->setVisible(false); + break; + } + ui->copyToClipboard->setEnabled(true); + ui->showQRCode->setEnabled(true); + } + else + { + ui->deleteButton->setEnabled(false); + ui->showQRCode->setEnabled(false); + ui->copyToClipboard->setEnabled(false); + ui->signMessage->setEnabled(false); + ui->verifyMessage->setEnabled(false); + } +} + +void AddressBookPage::done(int retval) +{ + QTableView *table = ui->tableView; + if(!table->selectionModel() || !table->model()) + return; + // When this is a tab/widget and not a model dialog, ignore "done" + if(mode == ForEditing) + return; + + // Figure out which address was selected, and return it + QModelIndexList indexes = table->selectionModel()->selectedRows(AddressTableModel::Address); + + foreach (QModelIndex index, indexes) + { + QVariant address = table->model()->data(index); + returnValue = address.toString(); + } + + if(returnValue.isEmpty()) + { + // If no address entry selected, return rejected + retval = Rejected; + } + + QDialog::done(retval); +} + +void AddressBookPage::exportClicked() +{ + // CSV is currently the only supported format + QString filename = GUIUtil::getSaveFileName( + this, + tr("Export Address Book Data"), QString(), + tr("Comma separated file (*.csv)")); + + if (filename.isNull()) return; + + CSVModelWriter writer(filename); + + // name, column, role + writer.setModel(proxyModel); + writer.addColumn("Label", AddressTableModel::Label, Qt::EditRole); + writer.addColumn("Address", AddressTableModel::Address, Qt::EditRole); + + if(!writer.write()) + { + QMessageBox::critical(this, tr("Error exporting"), tr("Could not write to file %1.").arg(filename), + QMessageBox::Abort, QMessageBox::Abort); + } +} + +void AddressBookPage::on_showQRCode_clicked() +{ +#ifdef USE_QRCODE + QTableView *table = ui->tableView; + QModelIndexList indexes = table->selectionModel()->selectedRows(AddressTableModel::Address); + + foreach (QModelIndex index, indexes) + { + QString address = index.data().toString(), label = index.sibling(index.row(), 0).data(Qt::EditRole).toString(); + + QRCodeDialog *dialog = new QRCodeDialog(address, label, tab == ReceivingTab, this); + if(optionsModel) + dialog->setModel(optionsModel); + dialog->setAttribute(Qt::WA_DeleteOnClose); + dialog->show(); + } +#endif +} + +void AddressBookPage::contextualMenu(const QPoint &point) +{ + QModelIndex index = ui->tableView->indexAt(point); + if(index.isValid()) + { + contextMenu->exec(QCursor::pos()); + } +} + +void AddressBookPage::selectNewAddress(const QModelIndex &parent, int begin, int end) +{ + QModelIndex idx = proxyModel->mapFromSource(model->index(begin, AddressTableModel::Address, parent)); + if(idx.isValid() && (idx.data(Qt::EditRole).toString() == newAddressToSelect)) + { + // Select row of newly created address, once + ui->tableView->setFocus(); + ui->tableView->selectRow(idx.row()); + newAddressToSelect.clear(); + } +} diff --git a/src/qt/addressbookpage.h b/src/qt/addressbookpage.h new file mode 100644 index 0000000..df87486 --- /dev/null +++ b/src/qt/addressbookpage.h @@ -0,0 +1,85 @@ +#ifndef ADDRESSBOOKPAGE_H +#define ADDRESSBOOKPAGE_H + +#include + +namespace Ui { + class AddressBookPage; +} +class AddressTableModel; +class OptionsModel; + +QT_BEGIN_NAMESPACE +class QTableView; +class QItemSelection; +class QSortFilterProxyModel; +class QMenu; +class QModelIndex; +QT_END_NAMESPACE + +/** Widget that shows a list of sending or receiving addresses. + */ +class AddressBookPage : public QDialog +{ + Q_OBJECT + +public: + enum Tabs { + SendingTab = 0, + ReceivingTab = 1 + }; + + enum Mode { + ForSending, /**< Open address book to pick address for sending */ + ForEditing /**< Open address book for editing */ + }; + + explicit AddressBookPage(Mode mode, Tabs tab, QWidget *parent = 0); + ~AddressBookPage(); + + void setModel(AddressTableModel *model); + void setOptionsModel(OptionsModel *optionsModel); + const QString &getReturnValue() const { return returnValue; } + +public slots: + void done(int retval); + void exportClicked(); + +private: + Ui::AddressBookPage *ui; + AddressTableModel *model; + OptionsModel *optionsModel; + Mode mode; + Tabs tab; + QString returnValue; + QSortFilterProxyModel *proxyModel; + QMenu *contextMenu; + QAction *deleteAction; + QString newAddressToSelect; + +private slots: + void on_deleteButton_clicked(); + void on_newAddressButton_clicked(); + /** Copy address of currently selected address entry to clipboard */ + void on_copyToClipboard_clicked(); + void on_signMessage_clicked(); + void on_verifyMessage_clicked(); + void selectionChanged(); + void on_showQRCode_clicked(); + /** Spawn contextual menu (right mouse menu) for address book entry */ + void contextualMenu(const QPoint &point); + + /** Copy label of currently selected address entry to clipboard */ + void onCopyLabelAction(); + /** Edit currently selected address entry */ + void onEditAction(); + + /** New entry/entries were added to address table */ + void selectNewAddress(const QModelIndex &parent, int begin, int end); + +signals: + void signMessage(QString addr); + void verifyMessage(QString addr); +}; + +#endif // ADDRESSBOOKDIALOG_H diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp new file mode 100644 index 0000000..92e8f92 --- /dev/null +++ b/src/qt/addresstablemodel.cpp @@ -0,0 +1,406 @@ +#include "addresstablemodel.h" +#include "guiutil.h" +#include "walletmodel.h" + +#include "wallet.h" +#include "base58.h" + +#include +#include + +const QString AddressTableModel::Send = "S"; +const QString AddressTableModel::Receive = "R"; + +struct AddressTableEntry +{ + enum Type { + Sending, + Receiving + }; + + Type type; + QString label; + QString address; + + AddressTableEntry() {} + AddressTableEntry(Type type, const QString &label, const QString &address): + type(type), label(label), address(address) {} +}; + +struct AddressTableEntryLessThan +{ + bool operator()(const AddressTableEntry &a, const AddressTableEntry &b) const + { + return a.address < b.address; + } + bool operator()(const AddressTableEntry &a, const QString &b) const + { + return a.address < b; + } + bool operator()(const QString &a, const AddressTableEntry &b) const + { + return a < b.address; + } +}; + +// Private implementation +class AddressTablePriv +{ +public: + CWallet *wallet; + QList cachedAddressTable; + AddressTableModel *parent; + + AddressTablePriv(CWallet *wallet, AddressTableModel *parent): + wallet(wallet), parent(parent) {} + + void refreshAddressTable() + { + cachedAddressTable.clear(); + { + LOCK(wallet->cs_wallet); + BOOST_FOREACH(const PAIRTYPE(CTxDestination, std::string)& item, wallet->mapAddressBook) + { + const CcurecoinAddress& 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()))); + } + } + } + + void updateEntry(const QString &address, const QString &label, bool isMine, int status) + { + // Find address / label in model + QList::iterator lower = qLowerBound( + cachedAddressTable.begin(), cachedAddressTable.end(), address, AddressTableEntryLessThan()); + QList::iterator upper = qUpperBound( + cachedAddressTable.begin(), cachedAddressTable.end(), address, AddressTableEntryLessThan()); + int lowerIndex = (lower - cachedAddressTable.begin()); + int upperIndex = (upper - cachedAddressTable.begin()); + bool inModel = (lower != upper); + AddressTableEntry::Type newEntryType = isMine ? AddressTableEntry::Receiving : AddressTableEntry::Sending; + + switch(status) + { + case CT_NEW: + if(inModel) + { + OutputDebugStringF("Warning: AddressTablePriv::updateEntry: Got CT_NOW, but entry is already in model\n"); + break; + } + parent->beginInsertRows(QModelIndex(), lowerIndex, lowerIndex); + cachedAddressTable.insert(lowerIndex, AddressTableEntry(newEntryType, label, address)); + parent->endInsertRows(); + break; + case CT_UPDATED: + if(!inModel) + { + OutputDebugStringF("Warning: AddressTablePriv::updateEntry: Got CT_UPDATED, but entry is not in model\n"); + break; + } + lower->type = newEntryType; + lower->label = label; + parent->emitDataChanged(lowerIndex); + break; + case CT_DELETED: + if(!inModel) + { + OutputDebugStringF("Warning: AddressTablePriv::updateEntry: Got CT_DELETED, but entry is not in model\n"); + break; + } + parent->beginRemoveRows(QModelIndex(), lowerIndex, upperIndex-1); + cachedAddressTable.erase(lower, upper); + parent->endRemoveRows(); + break; + } + } + + int size() + { + return cachedAddressTable.size(); + } + + AddressTableEntry *index(int idx) + { + if(idx >= 0 && idx < cachedAddressTable.size()) + { + return &cachedAddressTable[idx]; + } + else + { + return 0; + } + } +}; + +AddressTableModel::AddressTableModel(CWallet *wallet, WalletModel *parent) : + QAbstractTableModel(parent),walletModel(parent),wallet(wallet),priv(0) +{ + columns << tr("Label") << tr("Address"); + priv = new AddressTablePriv(wallet, this); + priv->refreshAddressTable(); +} + +AddressTableModel::~AddressTableModel() +{ + delete priv; +} + +int AddressTableModel::rowCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent); + return priv->size(); +} + +int AddressTableModel::columnCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent); + return columns.length(); +} + +QVariant AddressTableModel::data(const QModelIndex &index, int role) const +{ + if(!index.isValid()) + return QVariant(); + + AddressTableEntry *rec = static_cast(index.internalPointer()); + + if(role == Qt::DisplayRole || role == Qt::EditRole) + { + switch(index.column()) + { + case Label: + if(rec->label.isEmpty() && role == Qt::DisplayRole) + { + return tr("(no label)"); + } + else + { + return rec->label; + } + case Address: + return rec->address; + } + } + else if (role == Qt::FontRole) + { + QFont font; + if(index.column() == Address) + { + font = GUIUtil::curecoinAddressFont(); + } + return font; + } + else if (role == TypeRole) + { + switch(rec->type) + { + case AddressTableEntry::Sending: + return Send; + case AddressTableEntry::Receiving: + return Receive; + default: break; + } + } + return QVariant(); +} + +bool AddressTableModel::setData(const QModelIndex & index, const QVariant & value, int role) +{ + if(!index.isValid()) + return false; + AddressTableEntry *rec = static_cast(index.internalPointer()); + + editStatus = OK; + + if(role == Qt::EditRole) + { + switch(index.column()) + { + case Label: + wallet->SetAddressBookName(CcurecoinAddress(rec->address.toStdString()).Get(), value.toString().toStdString()); + rec->label = value.toString(); + break; + case Address: + // Refuse to set invalid address, set error status and return false + if(!walletModel->validateAddress(value.toString())) + { + editStatus = INVALID_ADDRESS; + return false; + } + // Double-check that we're not overwriting a receiving address + if(rec->type == AddressTableEntry::Sending) + { + { + LOCK(wallet->cs_wallet); + // Remove old entry + wallet->DelAddressBookName(CcurecoinAddress(rec->address.toStdString()).Get()); + // Add new entry with new address + wallet->SetAddressBookName(CcurecoinAddress(value.toString().toStdString()).Get(), rec->label.toStdString()); + } + } + break; + } + + return true; + } + return false; +} + +QVariant AddressTableModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + if(orientation == Qt::Horizontal) + { + if(role == Qt::DisplayRole) + { + return columns[section]; + } + } + return QVariant(); +} + +Qt::ItemFlags AddressTableModel::flags(const QModelIndex & index) const +{ + if(!index.isValid()) + return 0; + AddressTableEntry *rec = static_cast(index.internalPointer()); + + Qt::ItemFlags retval = Qt::ItemIsSelectable | Qt::ItemIsEnabled; + // Can edit address and label for sending addresses, + // and only label for receiving addresses. + if(rec->type == AddressTableEntry::Sending || + (rec->type == AddressTableEntry::Receiving && index.column()==Label)) + { + retval |= Qt::ItemIsEditable; + } + return retval; +} + +QModelIndex AddressTableModel::index(int row, int column, const QModelIndex & parent) const +{ + Q_UNUSED(parent); + AddressTableEntry *data = priv->index(row); + if(data) + { + return createIndex(row, column, priv->index(row)); + } + else + { + return QModelIndex(); + } +} + +void AddressTableModel::updateEntry(const QString &address, const QString &label, bool isMine, int status) +{ + // Update address book model from curecoin core + priv->updateEntry(address, label, isMine, status); +} + +QString AddressTableModel::addRow(const QString &type, const QString &label, const QString &address) +{ + std::string strLabel = label.toStdString(); + std::string strAddress = address.toStdString(); + + editStatus = OK; + + if(type == Send) + { + if(!walletModel->validateAddress(address)) + { + editStatus = INVALID_ADDRESS; + return QString(); + } + // Check for duplicate addresses + { + LOCK(wallet->cs_wallet); + if(wallet->mapAddressBook.count(CcurecoinAddress(strAddress).Get())) + { + editStatus = DUPLICATE_ADDRESS; + return QString(); + } + } + } + else if(type == Receive) + { + // Generate a new address to associate with given label + WalletModel::UnlockContext ctx(walletModel->requestUnlock()); + if(!ctx.isValid()) + { + // Unlock wallet failed or was cancelled + editStatus = WALLET_UNLOCK_FAILURE; + return QString(); + } + CPubKey newKey; + if(!wallet->GetKeyFromPool(newKey, true)) + { + editStatus = KEY_GENERATION_FAILURE; + return QString(); + } + strAddress = CcurecoinAddress(newKey.GetID()).ToString(); + } + else + { + return QString(); + } + // Add entry + { + LOCK(wallet->cs_wallet); + wallet->SetAddressBookName(CcurecoinAddress(strAddress).Get(), strLabel); + } + return QString::fromStdString(strAddress); +} + +bool AddressTableModel::removeRows(int row, int count, const QModelIndex & parent) +{ + Q_UNUSED(parent); + AddressTableEntry *rec = priv->index(row); + if(count != 1 || !rec || rec->type == AddressTableEntry::Receiving) + { + // Can only remove one row at a time, and cannot remove rows not in model. + // Also refuse to remove receiving addresses. + return false; + } + { + LOCK(wallet->cs_wallet); + wallet->DelAddressBookName(CcurecoinAddress(rec->address.toStdString()).Get()); + } + return true; +} + +/* Look up label for address in address book, if not found return empty string. + */ +QString AddressTableModel::labelForAddress(const QString &address) const +{ + { + LOCK(wallet->cs_wallet); + CcurecoinAddress address_parsed(address.toStdString()); + std::map::iterator mi = wallet->mapAddressBook.find(address_parsed.Get()); + if (mi != wallet->mapAddressBook.end()) + { + return QString::fromStdString(mi->second); + } + } + return QString(); +} + +int AddressTableModel::lookupAddress(const QString &address) const +{ + QModelIndexList lst = match(index(0, Address, QModelIndex()), + Qt::EditRole, address, 1, Qt::MatchExactly); + if(lst.isEmpty()) + { + return -1; + } + else + { + return lst.at(0).row(); + } +} + +void AddressTableModel::emitDataChanged(int idx) +{ + emit dataChanged(index(idx, 0, QModelIndex()), index(idx, columns.length()-1, QModelIndex())); +} diff --git a/src/qt/addresstablemodel.h b/src/qt/addresstablemodel.h new file mode 100644 index 0000000..906ebfc --- /dev/null +++ b/src/qt/addresstablemodel.h @@ -0,0 +1,91 @@ +#ifndef ADDRESSTABLEMODEL_H +#define ADDRESSTABLEMODEL_H + +#include +#include + +class AddressTablePriv; +class CWallet; +class WalletModel; + +/** + Qt model of the address book in the core. This allows views to access and modify the address book. + */ +class AddressTableModel : public QAbstractTableModel +{ + Q_OBJECT +public: + explicit AddressTableModel(CWallet *wallet, WalletModel *parent = 0); + ~AddressTableModel(); + + enum ColumnIndex { + Label = 0, /**< User specified label */ + Address = 1 /**< curecoin address */ + }; + + enum RoleIndex { + TypeRole = Qt::UserRole /**< Type of address (#Send or #Receive) */ + }; + + /** 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 */ + }; + + 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); + 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; + /*@}*/ + + /* 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); + + /* Look up label for address in address book, if not found return empty string. + */ + QString labelForAddress(const QString &address) const; + + /* Look up row index of an address in the model. + Return -1 if not found. + */ + int lookupAddress(const QString &address) const; + + EditStatus getEditStatus() const { return editStatus; } + +private: + WalletModel *walletModel; + CWallet *wallet; + AddressTablePriv *priv; + QStringList columns; + EditStatus editStatus; + + /** Notify listeners that data changed. */ + void emitDataChanged(int index); + +signals: + void defaultAddressChanged(const QString &address); + +public slots: + /* Update address list from core. + */ + void updateEntry(const QString &address, const QString &label, bool isMine, int status); + + friend class AddressTablePriv; +}; + +#endif // ADDRESSTABLEMODEL_H diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp new file mode 100644 index 0000000..19f7486 --- /dev/null +++ b/src/qt/askpassphrasedialog.cpp @@ -0,0 +1,248 @@ +#include "askpassphrasedialog.h" +#include "ui_askpassphrasedialog.h" + +#include "guiconstants.h" +#include "walletmodel.h" + +#include +#include +#include + +AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) : + QDialog(parent), + ui(new Ui::AskPassphraseDialog), + mode(mode), + model(0), + fCapsLock(false) +{ + ui->setupUi(this); + ui->passEdit1->setMaxLength(MAX_PASSPHRASE_SIZE); + ui->passEdit2->setMaxLength(MAX_PASSPHRASE_SIZE); + ui->passEdit3->setMaxLength(MAX_PASSPHRASE_SIZE); + + // Setup Caps Lock detection. + ui->passEdit1->installEventFilter(this); + ui->passEdit2->installEventFilter(this); + ui->passEdit3->installEventFilter(this); + + switch(mode) + { + case Encrypt: // Ask passphrase x2 + ui->passLabel1->hide(); + ui->passEdit1->hide(); + 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 Unlock: // Ask passphrase + ui->warningLabel->setText(tr("This operation needs your wallet passphrase to unlock the wallet.")); + ui->passLabel2->hide(); + ui->passEdit2->hide(); + ui->passLabel3->hide(); + ui->passEdit3->hide(); + setWindowTitle(tr("Unlock wallet")); + break; + case Decrypt: // Ask passphrase + ui->warningLabel->setText(tr("This operation needs your wallet passphrase to decrypt the wallet.")); + ui->passLabel2->hide(); + ui->passEdit2->hide(); + ui->passLabel3->hide(); + ui->passEdit3->hide(); + setWindowTitle(tr("Decrypt wallet")); + break; + case ChangePass: // Ask old passphrase + new passphrase x2 + setWindowTitle(tr("Change passphrase")); + ui->warningLabel->setText(tr("Enter the old and new passphrase to the wallet.")); + break; + } + + textChanged(); + connect(ui->passEdit1, SIGNAL(textChanged(QString)), this, SLOT(textChanged())); + connect(ui->passEdit2, SIGNAL(textChanged(QString)), this, SLOT(textChanged())); + connect(ui->passEdit3, SIGNAL(textChanged(QString)), this, SLOT(textChanged())); +} + +AskPassphraseDialog::~AskPassphraseDialog() +{ + // Attempt to overwrite text so that they do not linger around in memory + ui->passEdit1->setText(QString(" ").repeated(ui->passEdit1->text().size())); + ui->passEdit2->setText(QString(" ").repeated(ui->passEdit2->text().size())); + ui->passEdit3->setText(QString(" ").repeated(ui->passEdit3->text().size())); + delete ui; +} + +void AskPassphraseDialog::setModel(WalletModel *model) +{ + this->model = model; +} + +void AskPassphraseDialog::accept() +{ + SecureString oldpass, newpass1, newpass2; + if(!model) + return; + oldpass.reserve(MAX_PASSPHRASE_SIZE); + newpass1.reserve(MAX_PASSPHRASE_SIZE); + newpass2.reserve(MAX_PASSPHRASE_SIZE); + // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) + // Alternately, find a way to make this input mlock()'d to begin with. + oldpass.assign(ui->passEdit1->text().toStdString().c_str()); + newpass1.assign(ui->passEdit2->text().toStdString().c_str()); + newpass2.assign(ui->passEdit3->text().toStdString().c_str()); + + switch(mode) + { + case Encrypt: { + if(newpass1.empty() || newpass2.empty()) + { + // Cannot encrypt with empty passphrase + break; + } + QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm wallet encryption"), + tr("Warning: If you encrypt your wallet and lose your passphrase, you will LOSE ALL OF YOUR COINS!") + "

" + tr("Are you sure you wish to encrypt your wallet?"), + QMessageBox::Yes|QMessageBox::Cancel, + QMessageBox::Cancel); + if(retval == QMessageBox::Yes) + { + if(newpass1 == newpass2) + { + if(model->setWalletEncrypted(true, newpass1)) + { + QMessageBox::warning(this, tr("Wallet encrypted"), + "" + + tr("curecoin 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.") + + "

" + + tr("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.") + + "
"); + QApplication::quit(); + } + else + { + QMessageBox::critical(this, tr("Wallet encryption failed"), + tr("Wallet encryption failed due to an internal error. Your wallet was not encrypted.")); + } + QDialog::accept(); // Success + } + else + { + QMessageBox::critical(this, tr("Wallet encryption failed"), + tr("The supplied passphrases do not match.")); + } + } + else + { + QDialog::reject(); // Cancelled + } + } break; + case Unlock: + if(!model->setWalletLocked(false, oldpass)) + { + QMessageBox::critical(this, tr("Wallet unlock failed"), + tr("The passphrase entered for the wallet decryption was incorrect.")); + } + else + { + QDialog::accept(); // Success + } + break; + case Decrypt: + if(!model->setWalletEncrypted(false, oldpass)) + { + QMessageBox::critical(this, tr("Wallet decryption failed"), + tr("The passphrase entered for the wallet decryption was incorrect.")); + } + else + { + QDialog::accept(); // Success + } + break; + case ChangePass: + if(newpass1 == newpass2) + { + if(model->changePassphrase(oldpass, newpass1)) + { + QMessageBox::information(this, tr("Wallet encrypted"), + tr("Wallet passphrase was successfully changed.")); + QDialog::accept(); // Success + } + else + { + QMessageBox::critical(this, tr("Wallet encryption failed"), + tr("The passphrase entered for the wallet decryption was incorrect.")); + } + } + else + { + QMessageBox::critical(this, tr("Wallet encryption failed"), + tr("The supplied passphrases do not match.")); + } + break; + } +} + +void AskPassphraseDialog::textChanged() +{ + // Validate input, set Ok button to enabled when acceptable + bool acceptable = false; + switch(mode) + { + case Encrypt: // New passphrase x2 + acceptable = !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty(); + break; + case Unlock: // Old passphrase x1 + case Decrypt: + acceptable = !ui->passEdit1->text().isEmpty(); + break; + case ChangePass: // Old passphrase x1, new passphrase x2 + acceptable = !ui->passEdit1->text().isEmpty() && !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty(); + break; + } + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(acceptable); +} + +bool AskPassphraseDialog::event(QEvent *event) +{ + // Detect Caps Lock key press. + if (event->type() == QEvent::KeyPress) { + QKeyEvent *ke = static_cast(event); + if (ke->key() == Qt::Key_CapsLock) { + fCapsLock = !fCapsLock; + } + if (fCapsLock) { + ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); + } else { + ui->capsLabel->clear(); + } + } + return QWidget::event(event); +} + +bool AskPassphraseDialog::eventFilter(QObject *object, QEvent *event) +{ + /* Detect Caps Lock. + * There is no good OS-independent way to check a key state in Qt, but we + * can detect Caps Lock by checking for the following condition: + * Shift key is down and the result is a lower case character, or + * Shift key is not down and the result is an upper case character. + */ + if (event->type() == QEvent::KeyPress) { + QKeyEvent *ke = static_cast(event); + QString str = ke->text(); + if (str.length() != 0) { + const QChar *psz = str.unicode(); + bool fShift = (ke->modifiers() & Qt::ShiftModifier) != 0; + if ((fShift && psz->isLower()) || (!fShift && psz->isUpper())) { + fCapsLock = true; + ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); + } else if (psz->isLetter()) { + fCapsLock = false; + ui->capsLabel->clear(); + } + } + } + return QDialog::eventFilter(object, event); +} diff --git a/src/qt/askpassphrasedialog.h b/src/qt/askpassphrasedialog.h new file mode 100644 index 0000000..b500ff4 --- /dev/null +++ b/src/qt/askpassphrasedialog.h @@ -0,0 +1,45 @@ +#ifndef ASKPASSPHRASEDIALOG_H +#define ASKPASSPHRASEDIALOG_H + +#include + +namespace Ui { + class AskPassphraseDialog; +} + +class WalletModel; + +/** Multifunctional dialog to ask for passphrases. Used for encryption, unlocking, and changing the passphrase. + */ +class AskPassphraseDialog : public QDialog +{ + Q_OBJECT + +public: + enum Mode { + Encrypt, /**< Ask passphrase twice and encrypt */ + 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); + ~AskPassphraseDialog(); + + void accept(); + + void setModel(WalletModel *model); + +private: + Ui::AskPassphraseDialog *ui; + Mode mode; + WalletModel *model; + bool fCapsLock; + +private slots: + void textChanged(); + bool event(QEvent *event); + bool eventFilter(QObject *, QEvent *event); +}; + +#endif // ASKPASSPHRASEDIALOG_H diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp new file mode 100644 index 0000000..df18b09 --- /dev/null +++ b/src/qt/clientmodel.cpp @@ -0,0 +1,203 @@ +#include "clientmodel.h" +#include "guiconstants.h" +#include "optionsmodel.h" +#include "addresstablemodel.h" +#include "transactiontablemodel.h" + +#include "alert.h" +#include "main.h" +#include "ui_interface.h" + +#include +#include + +static const int64 nClientStartupTime = GetTime(); + +ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) : + QObject(parent), optionsModel(optionsModel), + cachedNumBlocks(0), cachedNumBlocksOfPeers(0), pollTimer(0) +{ + numBlocksAtStartup = -1; + + pollTimer = new QTimer(this); + pollTimer->setInterval(MODEL_UPDATE_DELAY); + pollTimer->start(); + connect(pollTimer, SIGNAL(timeout()), this, SLOT(updateTimer())); + + subscribeToCoreSignals(); +} + +ClientModel::~ClientModel() +{ + unsubscribeFromCoreSignals(); +} + +int ClientModel::getNumConnections() const +{ + return vNodes.size(); +} + +int ClientModel::getNumBlocks() const +{ + return nBestHeight; +} + +int ClientModel::getNumBlocksAtStartup() +{ + if (numBlocksAtStartup == -1) numBlocksAtStartup = getNumBlocks(); + return numBlocksAtStartup; +} + +QDateTime ClientModel::getLastBlockDate() const +{ + return QDateTime::fromTime_t(pindexBest->GetBlockTime()); +} + +void ClientModel::updateTimer() +{ + // Some quantities (such as number of blocks) change so fast that we don't want to be notified for each change. + // Periodically check and update with a timer. + int newNumBlocks = getNumBlocks(); + int newNumBlocksOfPeers = getNumBlocksOfPeers(); + + if(cachedNumBlocks != newNumBlocks || cachedNumBlocksOfPeers != newNumBlocksOfPeers) + { + cachedNumBlocks = newNumBlocks; + cachedNumBlocksOfPeers = newNumBlocksOfPeers; + + emit numBlocksChanged(newNumBlocks, newNumBlocksOfPeers); + } +} + +void ClientModel::updateNumConnections(int numConnections) +{ + emit numConnectionsChanged(numConnections); +} + +void ClientModel::updateAlert(const QString &hash, int status) +{ + // Show error message notification for new alert + if(status == CT_NEW) + { + uint256 hash_256; + hash_256.SetHex(hash.toStdString()); + CAlert alert = CAlert::getAlertByHash(hash_256); + if(!alert.IsNull()) + { + emit error(tr("Network Alert"), QString::fromStdString(alert.strStatusBar), false); + } + } + + // Emit a numBlocksChanged when the status message changes, + // so that the view recomputes and updates the status bar. + emit numBlocksChanged(getNumBlocks(), getNumBlocksOfPeers()); +} + +double ClientModel::GetDifficulty() const +{ + // Floating point number that is a multiple of the minimum difficulty, + // minimum difficulty = 1.0. + + if (pindexBest == NULL) + return 1.0; + int nShift = (pindexBest->nBits >> 24) & 0xff; + + double dDiff = + (double)0x0000ffff / (double)(pindexBest->nBits & 0x00ffffff); + + while (nShift < 29) + { + dDiff *= 256.0; + nShift++; + } + while (nShift > 29) + { + dDiff /= 256.0; + nShift--; + } + + return dDiff; +} + +bool ClientModel::isTestNet() const +{ + return fTestNet; +} + +bool ClientModel::inInitialBlockDownload() const +{ + return IsInitialBlockDownload(); +} + +int ClientModel::getNumBlocksOfPeers() const +{ + return GetNumBlocksOfPeers(); +} + +QString ClientModel::getStatusBarWarnings() const +{ + return QString::fromStdString(GetWarnings("statusbar")); +} + +OptionsModel *ClientModel::getOptionsModel() +{ + return optionsModel; +} + +QString ClientModel::formatFullVersion() const +{ + return QString::fromStdString(FormatFullVersion()); +} + +QString ClientModel::formatBuildDate() const +{ + return QString::fromStdString(CLIENT_DATE); +} + +QString ClientModel::clientName() const +{ + return QString::fromStdString(CLIENT_NAME); +} + +QString ClientModel::formatClientStartupTime() const +{ + return QDateTime::fromTime_t(nClientStartupTime).toString(); +} + +// Handlers for core signals +static void NotifyBlocksChanged(ClientModel *clientmodel) +{ + // This notification is too frequent. Don't trigger a signal. + // Don't remove it, though, as it might be useful later. +} + +static void NotifyNumConnectionsChanged(ClientModel *clientmodel, int newNumConnections) +{ + // Too noisy: OutputDebugStringF("NotifyNumConnectionsChanged %i\n", newNumConnections); + QMetaObject::invokeMethod(clientmodel, "updateNumConnections", Qt::QueuedConnection, + Q_ARG(int, newNumConnections)); +} + +static void NotifyAlertChanged(ClientModel *clientmodel, const uint256 &hash, ChangeType status) +{ + OutputDebugStringF("NotifyAlertChanged %s status=%i\n", hash.GetHex().c_str(), status); + QMetaObject::invokeMethod(clientmodel, "updateAlert", Qt::QueuedConnection, + Q_ARG(QString, QString::fromStdString(hash.GetHex())), + Q_ARG(int, status)); +} + +void ClientModel::subscribeToCoreSignals() +{ + // Connect signals to client + uiInterface.NotifyBlocksChanged.connect(boost::bind(NotifyBlocksChanged, this)); + uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1)); + uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2)); +} + +void ClientModel::unsubscribeFromCoreSignals() +{ + // Disconnect signals from client + uiInterface.NotifyBlocksChanged.disconnect(boost::bind(NotifyBlocksChanged, this)); + uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1)); + uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2)); +} diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h new file mode 100644 index 0000000..8ef8b9d --- /dev/null +++ b/src/qt/clientmodel.h @@ -0,0 +1,72 @@ +#ifndef CLIENTMODEL_H +#define CLIENTMODEL_H + +#include + +class OptionsModel; +class AddressTableModel; +class TransactionTableModel; +class CWallet; + +QT_BEGIN_NAMESPACE +class QDateTime; +class QTimer; +QT_END_NAMESPACE + +/** Model for curecoin network client. */ +class ClientModel : public QObject +{ + Q_OBJECT +public: + explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); + ~ClientModel(); + + OptionsModel *getOptionsModel(); + + int getNumConnections() const; + int getNumBlocks() const; + int getNumBlocksAtStartup(); + + QDateTime getLastBlockDate() const; + + //! Return true if client connected to testnet + bool isTestNet() const; + //! Return true if core is doing initial block download + bool inInitialBlockDownload() const; + //! Return conservative estimate of total number of blocks, or 0 if unknown + int getNumBlocksOfPeers() const; + //! Return warnings to be displayed in status bar + QString getStatusBarWarnings() const; + + QString formatFullVersion() const; + QString formatBuildDate() const; + QString clientName() const; + QString formatClientStartupTime() const; + double GetDifficulty() const; + +private: + OptionsModel *optionsModel; + + int cachedNumBlocks; + int cachedNumBlocksOfPeers; + + int numBlocksAtStartup; + + QTimer *pollTimer; + + void subscribeToCoreSignals(); + void unsubscribeFromCoreSignals(); +signals: + void numConnectionsChanged(int count); + void numBlocksChanged(int count, int countOfPeers); + + //! Asynchronous error notification + void error(const QString &title, const QString &message, bool modal); + +public slots: + void updateTimer(); + void updateNumConnections(int numConnections); + void updateAlert(const QString &hash, int status); +}; + +#endif // CLIENTMODEL_H diff --git a/src/qt/csvmodelwriter.cpp b/src/qt/csvmodelwriter.cpp new file mode 100644 index 0000000..8a50bba --- /dev/null +++ b/src/qt/csvmodelwriter.cpp @@ -0,0 +1,88 @@ +#include "csvmodelwriter.h" + +#include +#include +#include + +CSVModelWriter::CSVModelWriter(const QString &filename, QObject *parent) : + QObject(parent), + filename(filename), model(0) +{ +} + +void CSVModelWriter::setModel(const QAbstractItemModel *model) +{ + this->model = model; +} + +void CSVModelWriter::addColumn(const QString &title, int column, int role) +{ + Column col; + col.title = title; + col.column = column; + col.role = role; + + columns.append(col); +} + +static void writeValue(QTextStream &f, const QString &value) +{ + QString escaped = value; + escaped.replace('"', "\"\""); + f << "\"" << escaped << "\""; +} + +static void writeSep(QTextStream &f) +{ + f << ","; +} + +static void writeNewline(QTextStream &f) +{ + f << "\n"; +} + +bool CSVModelWriter::write() +{ + QFile file(filename); + if(!file.open(QIODevice::WriteOnly | QIODevice::Text)) + return false; + QTextStream out(&file); + + int numRows = 0; + if(model) + { + numRows = model->rowCount(); + } + + // Header row + for(int i=0; iindex(j, columns[i].column).data(columns[i].role); + writeValue(out, data.toString()); + } + writeNewline(out); + } + + file.close(); + + return file.error() == QFile::NoError; +} + diff --git a/src/qt/csvmodelwriter.h b/src/qt/csvmodelwriter.h new file mode 100644 index 0000000..6c9dcba --- /dev/null +++ b/src/qt/csvmodelwriter.h @@ -0,0 +1,46 @@ +#ifndef CSVMODELWRITER_H +#define CSVMODELWRITER_H + +#include +#include + +QT_BEGIN_NAMESPACE +class QAbstractItemModel; +QT_END_NAMESPACE + +/** Export a Qt table model to a CSV file. This is useful for analyzing or post-processing the data in + a spreadsheet. + */ +class CSVModelWriter : public QObject +{ + Q_OBJECT +public: + explicit CSVModelWriter(const QString &filename, QObject *parent = 0); + + void setModel(const QAbstractItemModel *model); + void addColumn(const QString &title, int column, int role=Qt::EditRole); + + /** Perform export of the model to CSV. + @returns true on success, false otherwise + */ + bool write(); + +private: + QString filename; + const QAbstractItemModel *model; + + struct Column + { + QString title; + int column; + int role; + }; + QList columns; + +signals: + +public slots: + +}; + +#endif // CSVMODELWRITER_H diff --git a/src/qt/curecoin.cpp b/src/qt/curecoin.cpp new file mode 100644 index 0000000..0244b75 --- /dev/null +++ b/src/qt/curecoin.cpp @@ -0,0 +1,270 @@ +/* + * W.J. van der Laan 2011-2012 + */ +#include "curecoingui.h" +#include "clientmodel.h" +#include "walletmodel.h" +#include "optionsmodel.h" +#include "guiutil.h" +#include "guiconstants.h" + +#include "init.h" +#include "ui_interface.h" +#include "qtipcserver.h" + +#include +#include +#include +#include +#include +#include +#include + +#if defined(curecoin_NEED_QT_PLUGINS) && !defined(_curecoin_QT_PLUGINS_INCLUDED) +#define _curecoin_QT_PLUGINS_INCLUDED +#define __INSURE__ +#include +Q_IMPORT_PLUGIN(qcncodecs) +Q_IMPORT_PLUGIN(qjpcodecs) +Q_IMPORT_PLUGIN(qtwcodecs) +Q_IMPORT_PLUGIN(qkrcodecs) +Q_IMPORT_PLUGIN(qtaccessiblewidgets) +#endif + +// Need a global reference for the notifications to find the GUI +static curecoinGUI *guiref; +static QSplashScreen *splashref; + +static void ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style) +{ + // Message from network thread + if(guiref) + { + bool modal = (style & CClientUIInterface::MODAL); + // in case of modal message, use blocking connection to wait for user to click OK + QMetaObject::invokeMethod(guiref, "error", + modal ? GUIUtil::blockingGUIThreadConnection() : Qt::QueuedConnection, + Q_ARG(QString, QString::fromStdString(caption)), + Q_ARG(QString, QString::fromStdString(message)), + Q_ARG(bool, modal)); + } + else + { + printf("%s: %s\n", caption.c_str(), message.c_str()); + fprintf(stderr, "%s: %s\n", caption.c_str(), message.c_str()); + } +} + +static bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption) +{ + if(!guiref) + return false; + if(nFeeRequired < MIN_TX_FEE || nFeeRequired <= nTransactionFee || fDaemon) + return true; + bool payFee = false; + + QMetaObject::invokeMethod(guiref, "askFee", GUIUtil::blockingGUIThreadConnection(), + Q_ARG(qint64, nFeeRequired), + Q_ARG(bool*, &payFee)); + + return payFee; +} + +static void ThreadSafeHandleURI(const std::string& strURI) +{ + if(!guiref) + return; + + QMetaObject::invokeMethod(guiref, "handleURI", GUIUtil::blockingGUIThreadConnection(), + Q_ARG(QString, QString::fromStdString(strURI))); +} + +static void InitMessage(const std::string &message) +{ + if(splashref) + { + splashref->showMessage(QString::fromStdString(message), Qt::AlignBottom|Qt::AlignHCenter, QColor(255,255,200)); + QApplication::instance()->processEvents(); + } +} + +static void QueueShutdown() +{ + QMetaObject::invokeMethod(QCoreApplication::instance(), "quit", Qt::QueuedConnection); +} + +/* + Translate string to current locale using Qt. + */ +static std::string Translate(const char* psz) +{ + return QCoreApplication::translate("curecoin-core", psz).toStdString(); +} + +/* Handle runaway exceptions. Shows a message box with the problem and quits the program. + */ +static void handleRunawayException(std::exception *e) +{ + PrintExceptionContinue(e, "Runaway exception"); + QMessageBox::critical(0, "Runaway exception", curecoinGUI::tr("A fatal error occurred. curecoin can no longer continue safely and will quit.") + QString("\n\n") + QString::fromStdString(strMiscWarning)); + exit(1); +} + +#ifndef curecoin_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); + + // Internal string conversion is all UTF-8 + QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); + QTextCodec::setCodecForCStrings(QTextCodec::codecForTr()); + + Q_INIT_RESOURCE(curecoin); + QApplication app(argc, argv); + + // Install global event filter that makes sure that long tooltips can be word-wrapped + app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app)); + + // Command-line options take precedence: + ParseParameters(argc, argv); + + // ... then curecoin.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 curecoin.conf in the data directory) + QMessageBox::critical(0, "curecoin", + QString("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"]))); + return 1; + } + ReadConfigFile(mapArgs, mapMultiArgs); + + // Application identification (must be set before OptionsModel is initialized, + // as it is used to locate QSettings) + app.setOrganizationName("curecoin"); + app.setOrganizationDomain("curecoin.su"); + if(GetBoolArg("-testnet")) // Separate UI settings for testnet + app.setApplicationName("curecoin-Qt-testnet"); + else + app.setApplicationName("curecoin-Qt"); + + // ... then GUI settings: + OptionsModel optionsModel; + + // Get desired locale (e.g. "de_DE") from command line or use system locale + QString lang_territory = QString::fromStdString(GetArg("-lang", QLocale::system().name().toStdString())); + QString lang = lang_territory; + // Convert to "de" only by truncating "_DE" + lang.truncate(lang_territory.lastIndexOf('_')); + + QTranslator qtTranslatorBase, qtTranslator, translatorBase, translator; + // Load language files for configured locale: + // - First load the translator for the base language, without territory + // - Then load the more specific locale translator + + // Load e.g. qt_de.qm + if (qtTranslatorBase.load("qt_" + lang, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) + app.installTranslator(&qtTranslatorBase); + + // Load e.g. qt_de_DE.qm + if (qtTranslator.load("qt_" + lang_territory, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) + app.installTranslator(&qtTranslator); + + // Load e.g. curecoin_de.qm (shortcut "de" needs to be defined in curecoin.qrc) + if (translatorBase.load(lang, ":/translations/")) + app.installTranslator(&translatorBase); + + // Load e.g. curecoin_de_DE.qm (shortcut "de_DE" needs to be defined in curecoin.qrc) + if (translator.load(lang_territory, ":/translations/")) + app.installTranslator(&translator); + + // Subscribe to global signals from core + uiInterface.ThreadSafeMessageBox.connect(ThreadSafeMessageBox); + uiInterface.ThreadSafeAskFee.connect(ThreadSafeAskFee); + uiInterface.ThreadSafeHandleURI.connect(ThreadSafeHandleURI); + uiInterface.InitMessage.connect(InitMessage); + uiInterface.QueueShutdown.connect(QueueShutdown); + uiInterface.Translate.connect(Translate); + + // Show help message immediately after parsing command-line options (for "-lang") and setting locale, + // but before showing splash screen. + if (mapArgs.count("-?") || mapArgs.count("--help")) + { + GUIUtil::HelpMessageBox help; + help.showOrPrint(); + return 1; + } + + QSplashScreen splash(QPixmap(":/images/splash"), 0); + if (GetBoolArg("-splash", true) && !GetBoolArg("-min")) + { + splash.show(); + splash.setAutoFillBackground(true); + splashref = &splash; + } + + app.processEvents(); + + app.setQuitOnLastWindowClosed(false); + + try + { + // Regenerate startup link, to fix links to old versions + if (GUIUtil::GetStartOnSystemStartup()) + GUIUtil::SetStartOnSystemStartup(true); + + curecoinGUI window; + guiref = &window; + if(AppInit2()) + { + { + // 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); + + window.setClientModel(&clientModel); + window.setWalletModel(&walletModel); + + // If -min option passed, start window minimized. + if(GetBoolArg("-min")) + { + window.showMinimized(); + } + else + { + window.show(); + } + + // Place this here as guiref has to be defined if we don't want to lose URIs + ipcInit(argc, argv); + + app.exec(); + + window.hide(); + window.setClientModel(0); + window.setWalletModel(0); + guiref = 0; + } + // Shutdown the core and its threads, but don't exit curecoin-Qt here + Shutdown(NULL); + } + else + { + return 1; + } + } catch (std::exception& e) { + handleRunawayException(&e); + } catch (...) { + handleRunawayException(NULL); + } + return 0; +} +#endif // curecoin_QT_TEST diff --git a/src/qt/curecoin.qrc b/src/qt/curecoin.qrc new file mode 100644 index 0000000..c1e859e --- /dev/null +++ b/src/qt/curecoin.qrc @@ -0,0 +1,101 @@ + + + res/icons/curecoin-128.png + res/icons/address-book.png + res/icons/quit.png + res/icons/send.png + res/icons/curecoin-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/curecoin-128.png + res/icons/curecoin-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/key.png + res/icons/filesave.png + res/icons/qrcode.png + res/icons/debugwindow.png + + + res/images/about.png + res/images/splash2.jpg + res/images/wallet_bgcoin.png + + + res/movies/update_spinner.mng + + + locale/curecoin_en.qm + locale/curecoin_ru.qm + locale/curecoin_zh_CN.qm + locale/curecoin_af_ZA.qm + locale/curecoin_ar.qm + locale/curecoin_bg.qm + locale/curecoin_bs.qm + locale/curecoin_ca.qm + locale/curecoin_ca_ES.qm + locale/curecoin_cs.qm + locale/curecoin_cy.qm + locale/curecoin_da.qm + locale/curecoin_de.qm + locale/curecoin_el_GR.qm + locale/curecoin_eo.qm + locale/curecoin_es.qm + locale/curecoin_es_CL.qm + locale/curecoin_et.qm + locale/curecoin_eu_ES.qm + locale/curecoin_fa.qm + locale/curecoin_fa_IR.qm + locale/curecoin_fi.qm + locale/curecoin_fr.qm + locale/curecoin_fr_CA.qm + locale/curecoin_gu_IN.qm + locale/curecoin_he.qm + locale/curecoin_hi_IN.qm + locale/curecoin_hr.qm + locale/curecoin_hu.qm + locale/curecoin_it.qm + locale/curecoin_ja.qm + locale/curecoin_la.qm + locale/curecoin_lt.qm + locale/curecoin_lv_LV.qm + locale/curecoin_nb.qm + locale/curecoin_nl.qm + locale/curecoin_pl.qm + locale/curecoin_pt_BR.qm + locale/curecoin_pt_PT.qm + locale/curecoin_ro_RO.qm + locale/curecoin_sk.qm + locale/curecoin_sr.qm + locale/curecoin_sv.qm + locale/curecoin_th_TH.qm + locale/curecoin_tr.qm + locale/curecoin_uk.qm + locale/curecoin_zh_TW.qm + + diff --git a/src/qt/curecoinaddressvalidator.cpp b/src/qt/curecoinaddressvalidator.cpp new file mode 100644 index 0000000..bdb9d48 --- /dev/null +++ b/src/qt/curecoinaddressvalidator.cpp @@ -0,0 +1,77 @@ +#include "curecoinaddressvalidator.h" + +/* Base58 characters are: + "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" + + This is: + - All numbers except for '0' + - All upper-case letters except for 'I' and 'O' + - All lower-case letters except for 'l' + + User friendly Base58 input can map + - 'l' and 'I' to '1' + - '0' and 'O' to 'o' +*/ + +curecoinAddressValidator::curecoinAddressValidator(QObject *parent) : + QValidator(parent) +{ +} + +QValidator::State curecoinAddressValidator::validate(QString &input, int &pos) const +{ + // Correction + for(int idx=0; idx= '0' && ch<='9') || + (ch >= 'a' && ch<='z') || + (ch >= 'A' && ch<='Z')) && + ch != 'l' && ch != 'I' && ch != '0' && ch != 'O') + { + // Alphanumeric and not a 'forbidden' character + } + else + { + state = QValidator::Invalid; + } + } + + // Empty address is "intermediate" input + if(input.isEmpty()) + { + state = QValidator::Intermediate; + } + + return state; +} diff --git a/src/qt/curecoinaddressvalidator.h b/src/qt/curecoinaddressvalidator.h new file mode 100644 index 0000000..574b7d6 --- /dev/null +++ b/src/qt/curecoinaddressvalidator.h @@ -0,0 +1,24 @@ +#ifndef curecoinADDRESSVALIDATOR_H +#define curecoinADDRESSVALIDATOR_H + +#include + +/** Base48 entry widget validator. + Corrects near-miss characters and refuses characters that are no part of base48. + */ +class curecoinAddressValidator : public QValidator +{ + Q_OBJECT +public: + explicit curecoinAddressValidator(QObject *parent = 0); + + State validate(QString &input, int &pos) const; + + static const int MaxAddressLength = 35; +signals: + +public slots: + +}; + +#endif // curecoinADDRESSVALIDATOR_H diff --git a/src/qt/curecoinamountfield.cpp b/src/qt/curecoinamountfield.cpp new file mode 100644 index 0000000..3ac1d43 --- /dev/null +++ b/src/qt/curecoinamountfield.cpp @@ -0,0 +1,168 @@ +#include "curecoinamountfield.h" +#include "qvaluecombobox.h" +#include "curecoinunits.h" + +#include "guiconstants.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +curecoinAmountField::curecoinAmountField(QWidget *parent): + QWidget(parent), amount(0), currentUnit(-1) +{ + amount = new QDoubleSpinBox(this); + amount->setLocale(QLocale::c()); + amount->setDecimals(8); + amount->installEventFilter(this); + amount->setMaximumWidth(170); + amount->setSingleStep(0.001); + + QHBoxLayout *layout = new QHBoxLayout(this); + layout->addWidget(amount); + unit = new QValueComboBox(this); + unit->setModel(new curecoinUnits(this)); + layout->addWidget(unit); + layout->addStretch(1); + layout->setContentsMargins(0,0,0,0); + + setLayout(layout); + + setFocusPolicy(Qt::TabFocus); + setFocusProxy(amount); + + // If one if the widgets changes, the combined content changes as well + connect(amount, SIGNAL(valueChanged(QString)), this, SIGNAL(textChanged())); + connect(unit, SIGNAL(currentIndexChanged(int)), this, SLOT(unitChanged(int))); + + // Set default based on configuration + unitChanged(unit->currentIndex()); +} + +void curecoinAmountField::setText(const QString &text) +{ + if (text.isEmpty()) + amount->clear(); + else + amount->setValue(text.toDouble()); +} + +void curecoinAmountField::clear() +{ + amount->clear(); + unit->setCurrentIndex(0); +} + +bool curecoinAmountField::validate() +{ + bool valid = true; + if (amount->value() == 0.0) + valid = false; + if (valid && !curecoinUnits::parse(currentUnit, text(), 0)) + valid = false; + + setValid(valid); + + return valid; +} + +void curecoinAmountField::setValid(bool valid) +{ + if (valid) + amount->setStyleSheet(""); + else + amount->setStyleSheet(STYLE_INVALID); +} + +QString curecoinAmountField::text() const +{ + if (amount->text().isEmpty()) + return QString(); + else + return amount->text(); +} + +bool curecoinAmountField::eventFilter(QObject *object, QEvent *event) +{ + if (event->type() == QEvent::FocusIn) + { + // Clear invalid flag on focus + setValid(true); + } + else if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) + { + QKeyEvent *keyEvent = static_cast(event); + if (keyEvent->key() == Qt::Key_Comma) + { + // Translate a comma into a period + QKeyEvent periodKeyEvent(event->type(), Qt::Key_Period, keyEvent->modifiers(), ".", keyEvent->isAutoRepeat(), keyEvent->count()); + qApp->sendEvent(object, &periodKeyEvent); + return true; + } + } + return QWidget::eventFilter(object, event); +} + +QWidget *curecoinAmountField::setupTabChain(QWidget *prev) +{ + QWidget::setTabOrder(prev, amount); + return amount; +} + +qint64 curecoinAmountField::value(bool *valid_out) const +{ + qint64 val_out = 0; + bool valid = curecoinUnits::parse(currentUnit, text(), &val_out); + if(valid_out) + { + *valid_out = valid; + } + return val_out; +} + +void curecoinAmountField::setValue(qint64 value) +{ + setText(curecoinUnits::format(currentUnit, value)); +} + +void curecoinAmountField::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, curecoinUnits::UnitRole).toInt(); + + // Parse current value and convert to new unit + bool valid = false; + qint64 currentValue = value(&valid); + + currentUnit = newUnit; + + // Set max length after retrieving the value, to prevent truncation + amount->setDecimals(curecoinUnits::decimals(currentUnit)); + amount->setMaximum(qPow(10, curecoinUnits::amountDigits(currentUnit)) - qPow(10, -amount->decimals())); + + if(valid) + { + // If value was valid, re-place it in the widget with the new unit + setValue(currentValue); + } + else + { + // If current value is invalid, just clear field + setText(""); + } + setValid(true); +} + +void curecoinAmountField::setDisplayUnit(int newUnit) +{ + unit->setValue(newUnit); +} diff --git a/src/qt/curecoinamountfield.h b/src/qt/curecoinamountfield.h new file mode 100644 index 0000000..e6d586f --- /dev/null +++ b/src/qt/curecoinamountfield.h @@ -0,0 +1,60 @@ +#ifndef curecoinFIELD_H +#define curecoinFIELD_H + +#include + +QT_BEGIN_NAMESPACE +class QDoubleSpinBox; +class QValueComboBox; +QT_END_NAMESPACE + +/** Widget for entering curecoin amounts. + */ +class curecoinAmountField: public QWidget +{ + Q_OBJECT + Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY textChanged USER true) +public: + explicit curecoinAmountField(QWidget *parent = 0); + + qint64 value(bool *valid=0) const; + void setValue(qint64 value); + + /** Mark current value as invalid in UI. */ + void setValid(bool valid); + /** Perform input validation, mark field as invalid if entered value is not valid. */ + bool validate(); + + /** Change unit used to display amount. */ + void setDisplayUnit(int unit); + + /** Make field empty and ready for new input. */ + void clear(); + + /** Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907), + in these cases we have to set it up manually. + */ + QWidget *setupTabChain(QWidget *prev); + +signals: + void textChanged(); + +protected: + /** Intercept focus-in event and ',' key presses */ + bool eventFilter(QObject *object, QEvent *event); + +private: + QDoubleSpinBox *amount; + QValueComboBox *unit; + int currentUnit; + + void setText(const QString &text); + QString text() const; + +private slots: + void unitChanged(int idx); + +}; + + +#endif // curecoinFIELD_H diff --git a/src/qt/curecoingui.cpp b/src/qt/curecoingui.cpp new file mode 100644 index 0000000..0376fbd --- /dev/null +++ b/src/qt/curecoingui.cpp @@ -0,0 +1,877 @@ +/* + * Qt4 curecoin GUI. + * + * W.J. van der Laan 2011-2012 + * The curecoin Developers 2011-2012 + */ +#include "curecoingui.h" +#include "transactiontablemodel.h" +#include "addressbookpage.h" +#include "sendcoinsdialog.h" +#include "signverifymessagedialog.h" +#include "optionsdialog.h" +#include "aboutdialog.h" +#include "clientmodel.h" +#include "walletmodel.h" +#include "editaddressdialog.h" +#include "optionsmodel.h" +#include "transactiondescdialog.h" +#include "addresstablemodel.h" +#include "transactionview.h" +#include "overviewpage.h" +#include "curecoinunits.h" +#include "guiconstants.h" +#include "askpassphrasedialog.h" +#include "notificator.h" +#include "guiutil.h" +#include "rpcconsole.h" + +#ifdef Q_OS_MAC +#include "macdockiconhandler.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +curecoinGUI::curecoinGUI(QWidget *parent): + QMainWindow(parent), + clientModel(0), + walletModel(0), + encryptWalletAction(0), + changePassphraseAction(0), + aboutQtAction(0), + trayIcon(0), + notificator(0), + rpcConsole(0) +{ + resize(850, 550); + setWindowTitle(tr("curecoin") + " - " + tr("Wallet")); +#ifndef Q_OS_MAC + qApp->setWindowIcon(QIcon(":icons/curecoin")); + setWindowIcon(QIcon(":icons/curecoin")); +#else + setUnifiedTitleAndToolBarOnMac(true); + QApplication::setAttribute(Qt::AA_DontShowIconsInMenus); +#endif + // Accept D&D of URIs + setAcceptDrops(true); + + // Create actions for the toolbar, menu bar and tray/dock icon + createActions(); + + // Create application menu bar + createMenuBar(); + + // Create the toolbars + createToolBars(); + + // Create the tray icon (or setup the dock icon) + createTrayIcon(); + + // Create tabs + overviewPage = new OverviewPage(); + + transactionsPage = new QWidget(this); + QVBoxLayout *vbox = new QVBoxLayout(); + transactionView = new TransactionView(this); + vbox->addWidget(transactionView); + transactionsPage->setLayout(vbox); + + addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab); + + receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab); + + sendCoinsPage = new SendCoinsDialog(this); + + signVerifyMessageDialog = new SignVerifyMessageDialog(this); + + centralWidget = new QStackedWidget(this); + centralWidget->addWidget(overviewPage); + centralWidget->addWidget(transactionsPage); + centralWidget->addWidget(addressBookPage); + centralWidget->addWidget(receiveCoinsPage); + centralWidget->addWidget(sendCoinsPage); + setCentralWidget(centralWidget); + + // Create status bar + statusBar(); + + // Status bar notification icons + QFrame *frameBlocks = new QFrame(); + frameBlocks->setContentsMargins(0,0,0,0); + frameBlocks->setMinimumWidth(56); + frameBlocks->setMaximumWidth(56); + QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks); + frameBlocksLayout->setContentsMargins(3,0,3,0); + frameBlocksLayout->setSpacing(3); + labelEncryptionIcon = new QLabel(); + labelConnectionsIcon = new QLabel(); + labelBlocksIcon = new QLabel(); + frameBlocksLayout->addStretch(); + frameBlocksLayout->addWidget(labelEncryptionIcon); + frameBlocksLayout->addStretch(); + frameBlocksLayout->addWidget(labelConnectionsIcon); + frameBlocksLayout->addStretch(); + frameBlocksLayout->addWidget(labelBlocksIcon); + frameBlocksLayout->addStretch(); + + // Progress bar and label for blocks download + progressBarLabel = new QLabel(); + progressBarLabel->setVisible(false); + progressBar = new QProgressBar(); + progressBar->setAlignment(Qt::AlignCenter); + progressBar->setVisible(false); + + // Override style sheet for progress bar for styles that have a segmented progress bar, + // as they make the text unreadable (workaround for issue #1071) + // See https://qt-project.org/doc/qt-4.8/gallery.html + 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; }"); + } + + statusBar()->addWidget(progressBarLabel); + statusBar()->addWidget(progressBar); + statusBar()->addPermanentWidget(frameBlocks); + + syncIconMovie = new QMovie(":/movies/update_spinner", "mng", this); + + // Clicking on a transaction on the overview page simply sends you to transaction history page + connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage())); + connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex))); + + // Double-clicking on a transaction on the transaction history page shows details + connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails())); + + rpcConsole = new RPCConsole(this); + connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show())); + + // Clicking on "Verify Message" in the address book sends you to the verify message tab + connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString))); + // Clicking on "Sign Message" in the receive coins page sends you to the sign message tab + connect(receiveCoinsPage, SIGNAL(signMessage(QString)), this, SLOT(gotoSignMessageTab(QString))); + + gotoOverviewPage(); +} + +curecoinGUI::~curecoinGUI() +{ + if(trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu) + trayIcon->hide(); +#ifdef Q_OS_MAC + delete appMenuBar; +#endif +} + +void curecoinGUI::createActions() +{ + QActionGroup *tabGroup = new QActionGroup(this); + + overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this); + overviewAction->setToolTip(tr("Show general overview of wallet")); + overviewAction->setCheckable(true); + overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); + tabGroup->addAction(overviewAction); + + sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send coins"), this); + sendCoinsAction->setToolTip(tr("Send coins to a curecoin address")); + sendCoinsAction->setCheckable(true); + sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); + tabGroup->addAction(sendCoinsAction); + + receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive coins"), this); + receiveCoinsAction->setToolTip(tr("Show the list of addresses for receiving payments")); + receiveCoinsAction->setCheckable(true); + receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); + tabGroup->addAction(receiveCoinsAction); + + historyAction = new QAction(QIcon(":/icons/history"), tr("&Transactions"), this); + historyAction->setToolTip(tr("Browse transaction history")); + historyAction->setCheckable(true); + historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); + tabGroup->addAction(historyAction); + + addressBookAction = new QAction(QIcon(":/icons/address-book"), tr("&Address Book"), this); + addressBookAction->setToolTip(tr("Edit the list of stored addresses and labels")); + addressBookAction->setCheckable(true); + addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); + tabGroup->addAction(addressBookAction); + + connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); + connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); + connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); + connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); + connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); + connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); + connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); + connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); + connect(addressBookAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); + connect(addressBookAction, SIGNAL(triggered()), this, SLOT(gotoAddressBookPage())); + + 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/curecoin"), tr("&About curecoin"), this); + aboutAction->setToolTip(tr("Show information about curecoin")); + 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 curecoin")); + optionsAction->setMenuRole(QAction::PreferencesRole); + toggleHideAction = new QAction(QIcon(":/icons/curecoin"), 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); + backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet..."), this); + 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")); + signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this); + verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this); + + exportAction = new QAction(QIcon(":/icons/export"), tr("&Export..."), this); + exportAction->setToolTip(tr("Export the data in the current tab to a file")); + openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug window"), this); + openRPCConsoleAction->setToolTip(tr("Open debugging and diagnostic console")); + + connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); + connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); + connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); + connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); + connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); + connect(encryptWalletAction, SIGNAL(triggered(bool)), this, SLOT(encryptWallet(bool))); + connect(backupWalletAction, SIGNAL(triggered()), this, SLOT(backupWallet())); + connect(changePassphraseAction, SIGNAL(triggered()), this, SLOT(changePassphrase())); + connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); + connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab())); +} + +void curecoinGUI::createMenuBar() +{ +#ifdef Q_OS_MAC + // Create a decoupled menu bar on Mac which stays even if the window is closed + appMenuBar = new QMenuBar(); +#else + // Get the main window's menu bar on other platforms + appMenuBar = menuBar(); +#endif + + // Configure the menus + QMenu *file = appMenuBar->addMenu(tr("&File")); + file->addAction(backupWalletAction); + file->addAction(exportAction); + file->addAction(signMessageAction); + file->addAction(verifyMessageAction); + file->addSeparator(); + file->addAction(quitAction); + + QMenu *settings = appMenuBar->addMenu(tr("&Settings")); + settings->addAction(encryptWalletAction); + settings->addAction(changePassphraseAction); + settings->addSeparator(); + settings->addAction(optionsAction); + + QMenu *help = appMenuBar->addMenu(tr("&Help")); + help->addAction(openRPCConsoleAction); + help->addSeparator(); + help->addAction(aboutAction); + help->addAction(aboutQtAction); +} + +void curecoinGUI::createToolBars() +{ + QToolBar *toolbar = addToolBar(tr("Tabs toolbar")); + toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + toolbar->addAction(overviewAction); + toolbar->addAction(sendCoinsAction); + toolbar->addAction(receiveCoinsAction); + toolbar->addAction(historyAction); + toolbar->addAction(addressBookAction); + + QToolBar *toolbar2 = addToolBar(tr("Actions toolbar")); + toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + toolbar2->addAction(exportAction); +} + +void curecoinGUI::setClientModel(ClientModel *clientModel) +{ + this->clientModel = clientModel; + if(clientModel) + { + // Replace some strings and icons, when using the testnet + if(clientModel->isTestNet()) + { + setWindowTitle(windowTitle() + QString(" ") + tr("[testnet]")); +#ifndef Q_OS_MAC + qApp->setWindowIcon(QIcon(":icons/curecoin_testnet")); + setWindowIcon(QIcon(":icons/curecoin_testnet")); +#else + MacDockIconHandler::instance()->setIcon(QIcon(":icons/curecoin_testnet")); +#endif + if(trayIcon) + { + trayIcon->setToolTip(tr("curecoin client") + QString(" ") + tr("[testnet]")); + trayIcon->setIcon(QIcon(":/icons/toolbar_testnet")); + toggleHideAction->setIcon(QIcon(":/icons/toolbar_testnet")); + } + + aboutAction->setIcon(QIcon(":/icons/toolbar_testnet")); + } + + // Keep up to date with client + setNumConnections(clientModel->getNumConnections()); + connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int))); + + setNumBlocks(clientModel->getNumBlocks(), clientModel->getNumBlocksOfPeers()); + connect(clientModel, SIGNAL(numBlocksChanged(int,int)), this, SLOT(setNumBlocks(int,int))); + + // Report errors from network/worker thread + connect(clientModel, SIGNAL(error(QString,QString,bool)), this, SLOT(error(QString,QString,bool))); + + rpcConsole->setClientModel(clientModel); + addressBookPage->setOptionsModel(clientModel->getOptionsModel()); + receiveCoinsPage->setOptionsModel(clientModel->getOptionsModel()); + } +} + +void curecoinGUI::setWalletModel(WalletModel *walletModel) +{ + this->walletModel = walletModel; + if(walletModel) + { + // Report errors from wallet thread + connect(walletModel, SIGNAL(error(QString,QString,bool)), this, SLOT(error(QString,QString,bool))); + + // Put transaction list in tabs + transactionView->setModel(walletModel); + + overviewPage->setModel(walletModel); + addressBookPage->setModel(walletModel->getAddressTableModel()); + receiveCoinsPage->setModel(walletModel->getAddressTableModel()); + sendCoinsPage->setModel(walletModel); + signVerifyMessageDialog->setModel(walletModel); + + setEncryptionStatus(walletModel->getEncryptionStatus()); + connect(walletModel, SIGNAL(encryptionStatusChanged(int)), this, SLOT(setEncryptionStatus(int))); + + // Balloon pop-up for new transaction + connect(walletModel->getTransactionTableModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(incomingTransaction(QModelIndex,int,int))); + + // Ask for passphrase if needed + connect(walletModel, SIGNAL(requireUnlock()), this, SLOT(unlockWallet())); + } +} + +void curecoinGUI::createTrayIcon() +{ + QMenu *trayIconMenu; +#ifndef Q_OS_MAC + trayIcon = new QSystemTrayIcon(this); + trayIconMenu = new QMenu(this); + trayIcon->setContextMenu(trayIconMenu); + trayIcon->setToolTip(tr("curecoin client")); + trayIcon->setIcon(QIcon(":/icons/toolbar")); + connect(trayIcon, SIGNAL(activated(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(); + trayIconMenu = dockIconHandler->dockMenu(); +#endif + + // Configuration of the tray icon (or dock icon) icon menu + trayIconMenu->addAction(toggleHideAction); + trayIconMenu->addSeparator(); + trayIconMenu->addAction(sendCoinsAction); + trayIconMenu->addAction(receiveCoinsAction); + trayIconMenu->addSeparator(); + trayIconMenu->addAction(signMessageAction); + trayIconMenu->addAction(verifyMessageAction); + trayIconMenu->addSeparator(); + trayIconMenu->addAction(optionsAction); + trayIconMenu->addAction(openRPCConsoleAction); +#ifndef Q_OS_MAC // This is built-in on Mac + trayIconMenu->addSeparator(); + trayIconMenu->addAction(quitAction); +#endif + + notificator = new Notificator(qApp->applicationName(), trayIcon); +} + +#ifndef Q_OS_MAC +void curecoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason) +{ + if(reason == QSystemTrayIcon::Trigger) + { + // Click on system tray icon triggers show/hide of the main window + toggleHideAction->trigger(); + } +} +#endif + +void curecoinGUI::optionsClicked() +{ + if(!clientModel || !clientModel->getOptionsModel()) + return; + OptionsDialog dlg; + dlg.setModel(clientModel->getOptionsModel()); + dlg.exec(); +} + +void curecoinGUI::aboutClicked() +{ + AboutDialog dlg; + dlg.setModel(clientModel); + dlg.exec(); +} + +void curecoinGUI::setNumConnections(int count) +{ + QString icon; + switch(count) + { + case 0: icon = ":/icons/connect_0"; break; + case 1: case 2: case 3: icon = ":/icons/connect_1"; break; + case 4: case 5: case 6: icon = ":/icons/connect_2"; break; + case 7: case 8: case 9: icon = ":/icons/connect_3"; break; + default: icon = ":/icons/connect_4"; break; + } + labelConnectionsIcon->setPixmap(QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); + labelConnectionsIcon->setToolTip(tr("%n active connection(s) to curecoin network", "", count)); +} + +void curecoinGUI::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) + { + progressBarLabel->setVisible(false); + progressBar->setVisible(false); + + return; + } + + QString strStatusBarWarnings = clientModel->getStatusBarWarnings(); + QString tooltip; + + if(count < nTotalBlocks) + { + int nRemainingBlocks = nTotalBlocks - count; + float nPercentageDone = count / (nTotalBlocks * 0.01f); + + if (strStatusBarWarnings.isEmpty()) + { + progressBarLabel->setText(tr("Synchronizing with network...")); + progressBarLabel->setVisible(true); + progressBar->setFormat(tr("~%n block(s) remaining", "", nRemainingBlocks)); + progressBar->setMaximum(nTotalBlocks); + progressBar->setValue(count); + progressBar->setVisible(true); + } + + tooltip = tr("Downloaded %1 of %2 blocks of transaction history (%3% done).").arg(count).arg(nTotalBlocks).arg(nPercentageDone, 0, 'f', 2); + } + else + { + if (strStatusBarWarnings.isEmpty()) + progressBarLabel->setVisible(false); + + progressBar->setVisible(false); + tooltip = tr("Downloaded %1 blocks of transaction history.").arg(count); + } + + // Override progressBarLabel text and hide progress bar, when we have warnings to display + if (!strStatusBarWarnings.isEmpty()) + { + progressBarLabel->setText(strStatusBarWarnings); + progressBarLabel->setVisible(true); + progressBar->setVisible(false); + } + + tooltip = tr("Current difficulty is %1.").arg(clientModel->GetDifficulty()) + QString("
") + tooltip; + + QDateTime lastBlockDate = clientModel->getLastBlockDate(); + int secs = lastBlockDate.secsTo(QDateTime::currentDateTime()); + QString text; + + // Represent time from last generated block in human readable text + if(secs <= 0) + { + // Fully up to date. Leave text empty. + } + else if(secs < 60) + { + text = tr("%n second(s) ago","",secs); + } + else if(secs < 60*60) + { + text = tr("%n minute(s) ago","",secs/60); + } + else if(secs < 24*60*60) + { + text = tr("%n hour(s) ago","",secs/(60*60)); + } + else + { + text = tr("%n day(s) ago","",secs/(60*60*24)); + } + + // Set icon state: spinning if catching up, tick otherwise + if(secs < 90*60 && count >= nTotalBlocks) + { + tooltip = tr("Up to date") + QString(".
") + tooltip; + labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + + overviewPage->showOutOfSyncWarning(false); + } + else + { + tooltip = tr("Catching up...") + QString("
") + tooltip; + labelBlocksIcon->setMovie(syncIconMovie); + syncIconMovie->start(); + + overviewPage->showOutOfSyncWarning(true); + } + + if(!text.isEmpty()) + { + tooltip += QString("
"); + tooltip += tr("Last received block was generated %1.").arg(text); + } + + // Don't word-wrap this (fixed-width) tooltip + tooltip = QString("") + tooltip + QString(""); + + labelBlocksIcon->setToolTip(tooltip); + progressBarLabel->setToolTip(tooltip); + progressBar->setToolTip(tooltip); +} + +void curecoinGUI::error(const QString &title, const QString &message, bool modal) +{ + // Report errors from network/worker thread + if(modal) + { + QMessageBox::critical(this, title, message, QMessageBox::Ok, QMessageBox::Ok); + } else { + notificator->notify(Notificator::Critical, title, message); + } +} + +void curecoinGUI::changeEvent(QEvent *e) +{ + QMainWindow::changeEvent(e); +#ifndef Q_OS_MAC // Ignored on Mac + if(e->type() == QEvent::WindowStateChange) + { + if(clientModel && clientModel->getOptionsModel()->getMinimizeToTray()) + { + QWindowStateChangeEvent *wsevt = static_cast(e); + if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized()) + { + QTimer::singleShot(0, this, SLOT(hide())); + e->ignore(); + } + } + } +#endif +} + +void curecoinGUI::closeEvent(QCloseEvent *event) +{ + if(clientModel) + { +#ifndef Q_OS_MAC // Ignored on Mac + if(!clientModel->getOptionsModel()->getMinimizeToTray() && + !clientModel->getOptionsModel()->getMinimizeOnClose()) + { + qApp->quit(); + } +#endif + } + QMainWindow::closeEvent(event); +} + +void curecoinGUI::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( + curecoinUnits::formatWithUnit(curecoinUnits::BTC, nFeeRequired)); + QMessageBox::StandardButton retval = QMessageBox::question( + this, tr("Confirm transaction fee"), strMessage, + QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Yes); + *payFee = (retval == QMessageBox::Yes); +} + +void curecoinGUI::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(); + 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(); + QString type = ttm->index(start, TransactionTableModel::Type, parent) + .data().toString(); + QString address = ttm->index(start, TransactionTableModel::ToAddress, parent) + .data().toString(); + QIcon icon = qvariant_cast(ttm->index(start, + 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(curecoinUnits::formatWithUnit(walletModel->getOptionsModel()->getDisplayUnit(), amount, true)) + .arg(type) + .arg(address), icon); + } +} + +void curecoinGUI::gotoOverviewPage() +{ + overviewAction->setChecked(true); + centralWidget->setCurrentWidget(overviewPage); + + exportAction->setEnabled(false); + disconnect(exportAction, SIGNAL(triggered()), 0, 0); +} + +void curecoinGUI::gotoHistoryPage() +{ + historyAction->setChecked(true); + centralWidget->setCurrentWidget(transactionsPage); + + exportAction->setEnabled(true); + disconnect(exportAction, SIGNAL(triggered()), 0, 0); + connect(exportAction, SIGNAL(triggered()), transactionView, SLOT(exportClicked())); +} + +void curecoinGUI::gotoAddressBookPage() +{ + addressBookAction->setChecked(true); + centralWidget->setCurrentWidget(addressBookPage); + + exportAction->setEnabled(true); + disconnect(exportAction, SIGNAL(triggered()), 0, 0); + connect(exportAction, SIGNAL(triggered()), addressBookPage, SLOT(exportClicked())); +} + +void curecoinGUI::gotoReceiveCoinsPage() +{ + receiveCoinsAction->setChecked(true); + centralWidget->setCurrentWidget(receiveCoinsPage); + + exportAction->setEnabled(true); + disconnect(exportAction, SIGNAL(triggered()), 0, 0); + connect(exportAction, SIGNAL(triggered()), receiveCoinsPage, SLOT(exportClicked())); +} + +void curecoinGUI::gotoSendCoinsPage() +{ + sendCoinsAction->setChecked(true); + centralWidget->setCurrentWidget(sendCoinsPage); + + exportAction->setEnabled(false); + disconnect(exportAction, SIGNAL(triggered()), 0, 0); +} + +void curecoinGUI::gotoSignMessageTab(QString addr) +{ + // call show() in showTab_SM() + signVerifyMessageDialog->showTab_SM(true); + + if(!addr.isEmpty()) + signVerifyMessageDialog->setAddress_SM(addr); +} + +void curecoinGUI::gotoVerifyMessageTab(QString addr) +{ + // call show() in showTab_VM() + signVerifyMessageDialog->showTab_VM(true); + + if(!addr.isEmpty()) + signVerifyMessageDialog->setAddress_VM(addr); +} + +void curecoinGUI::dragEnterEvent(QDragEnterEvent *event) +{ + // Accept only URIs + if(event->mimeData()->hasUrls()) + event->acceptProposedAction(); +} + +void curecoinGUI::dropEvent(QDropEvent *event) +{ + if(event->mimeData()->hasUrls()) + { + int nValidUrisFound = 0; + QList uris = event->mimeData()->urls(); + foreach(const QUrl &uri, uris) + { + if (sendCoinsPage->handleURI(uri.toString())) + nValidUrisFound++; + } + + // if valid URIs were found + if (nValidUrisFound) + gotoSendCoinsPage(); + else + notificator->notify(Notificator::Warning, tr("URI handling"), tr("URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters.")); + } + + event->acceptProposedAction(); +} + +void curecoinGUI::handleURI(QString strURI) +{ + // URI has to be valid + if (sendCoinsPage->handleURI(strURI)) + { + showNormalIfMinimized(); + gotoSendCoinsPage(); + } + else + notificator->notify(Notificator::Warning, tr("URI handling"), tr("URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters.")); +} + +void curecoinGUI::setEncryptionStatus(int status) +{ + switch(status) + { + case WalletModel::Unencrypted: + labelEncryptionIcon->hide(); + encryptWalletAction->setChecked(false); + changePassphraseAction->setEnabled(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")); + encryptWalletAction->setChecked(true); + changePassphraseAction->setEnabled(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")); + encryptWalletAction->setChecked(true); + changePassphraseAction->setEnabled(true); + encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported + break; + } +} + +void curecoinGUI::encryptWallet(bool status) +{ + if(!walletModel) + return; + AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt: + AskPassphraseDialog::Decrypt, this); + dlg.setModel(walletModel); + dlg.exec(); + + setEncryptionStatus(walletModel->getEncryptionStatus()); +} + +void curecoinGUI::backupWallet() +{ + QString saveDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); + QString filename = QFileDialog::getSaveFileName(this, tr("Backup Wallet"), saveDir, tr("Wallet Data (*.dat)")); + if(!filename.isEmpty()) { + if(!walletModel->backupWallet(filename)) { + QMessageBox::warning(this, tr("Backup Failed"), tr("There was an error trying to save the wallet data to the new location.")); + } + } +} + +void curecoinGUI::changePassphrase() +{ + AskPassphraseDialog dlg(AskPassphraseDialog::ChangePass, this); + dlg.setModel(walletModel); + dlg.exec(); +} + +void curecoinGUI::unlockWallet() +{ + if(!walletModel) + return; + // Unlock wallet when requested by wallet model + if(walletModel->getEncryptionStatus() == WalletModel::Locked) + { + AskPassphraseDialog dlg(AskPassphraseDialog::Unlock, this); + dlg.setModel(walletModel); + dlg.exec(); + } +} + +void curecoinGUI::showNormalIfMinimized(bool fToggleHidden) +{ + // activateWindow() (sometimes) helps with keyboard focus on Windows + if (isHidden()) + { + show(); + activateWindow(); + } + else if (isMinimized()) + { + showNormal(); + activateWindow(); + } + else if (GUIUtil::isObscured(this)) + { + raise(); + activateWindow(); + } + else if(fToggleHidden) + hide(); +} + +void curecoinGUI::toggleHidden() +{ + showNormalIfMinimized(true); +} diff --git a/src/qt/curecoingui.h b/src/qt/curecoingui.h new file mode 100644 index 0000000..6369cfd --- /dev/null +++ b/src/qt/curecoingui.h @@ -0,0 +1,179 @@ +#ifndef curecoinGUI_H +#define curecoinGUI_H + +#include +#include + +class TransactionTableModel; +class ClientModel; +class WalletModel; +class TransactionView; +class OverviewPage; +class AddressBookPage; +class SendCoinsDialog; +class SignVerifyMessageDialog; +class Notificator; +class RPCConsole; + +QT_BEGIN_NAMESPACE +class QLabel; +class QLineEdit; +class QTableView; +class QAbstractItemModel; +class QModelIndex; +class QProgressBar; +class QStackedWidget; +class QUrl; +QT_END_NAMESPACE + +/** + curecoin GUI main class. This class represents the main window of the curecoin 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 curecoinGUI : public QMainWindow +{ + Q_OBJECT +public: + explicit curecoinGUI(QWidget *parent = 0); + ~curecoinGUI(); + + /** 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 curecoin wallet, and offers access to the list of transactions, address book and sending + functionality. + */ + void setWalletModel(WalletModel *walletModel); + +protected: + void changeEvent(QEvent *e); + void closeEvent(QCloseEvent *event); + void dragEnterEvent(QDragEnterEvent *event); + void dropEvent(QDropEvent *event); + +private: + ClientModel *clientModel; + WalletModel *walletModel; + + QStackedWidget *centralWidget; + + OverviewPage *overviewPage; + QWidget *transactionsPage; + AddressBookPage *addressBookPage; + AddressBookPage *receiveCoinsPage; + SendCoinsDialog *sendCoinsPage; + SignVerifyMessageDialog *signVerifyMessageDialog; + + QLabel *labelEncryptionIcon; + QLabel *labelConnectionsIcon; + QLabel *labelBlocksIcon; + QLabel *progressBarLabel; + QProgressBar *progressBar; + + QMenuBar *appMenuBar; + QAction *overviewAction; + QAction *historyAction; + QAction *quitAction; + QAction *sendCoinsAction; + QAction *addressBookAction; + QAction *signMessageAction; + QAction *verifyMessageAction; + QAction *aboutAction; + QAction *receiveCoinsAction; + QAction *optionsAction; + QAction *toggleHideAction; + QAction *exportAction; + QAction *encryptWalletAction; + QAction *backupWalletAction; + QAction *changePassphraseAction; + QAction *aboutQtAction; + QAction *openRPCConsoleAction; + + QSystemTrayIcon *trayIcon; + Notificator *notificator; + TransactionView *transactionView; + RPCConsole *rpcConsole; + + QMovie *syncIconMovie; + + /** Create the main UI actions. */ + void createActions(); + /** Create the menu bar and sub-menus. */ + void createMenuBar(); + /** Create the toolbars */ + void createToolBars(); + /** Create system tray (notification) icon */ + void createTrayIcon(); + +public slots: + /** Set number of connections shown in the UI */ + void setNumConnections(int count); + /** Set number of blocks shown in the UI */ + void setNumBlocks(int count, int nTotalBlocks); + /** Set the encryption status as shown in the UI. + @param[in] status current encryption status + @see WalletModel::EncryptionStatus + */ + void setEncryptionStatus(int status); + + /** Notify the user of an error in the network or transaction handling code. */ + void error(const QString &title, const QString &message, bool modal); + /** Asks the user whether to pay the transaction fee or to cancel the transaction. + It is currently not possible to pass a return value to another thread through + BlockingQueuedConnection, so an indirected pointer is used. + https://bugreports.qt-project.org/browse/QTBUG-10440 + + @param[in] nFeeRequired the required fee + @param[out] payFee true to pay the fee, false to not pay the fee + */ + void askFee(qint64 nFeeRequired, bool *payFee); + void handleURI(QString strURI); + +private slots: + /** Switch to overview (home) page */ + void gotoOverviewPage(); + /** Switch to history (transactions) page */ + void gotoHistoryPage(); + /** Switch to address book page */ + void gotoAddressBookPage(); + /** Switch to receive coins page */ + void gotoReceiveCoinsPage(); + /** Switch to send coins page */ + void gotoSendCoinsPage(); + + /** Show Sign/Verify Message dialog and switch to sign message tab */ + void gotoSignMessageTab(QString addr = ""); + /** Show Sign/Verify Message dialog and switch to verify message tab */ + void gotoVerifyMessageTab(QString addr = ""); + + /** Show configuration dialog */ + void optionsClicked(); + /** Show about dialog */ + void aboutClicked(); +#ifndef Q_OS_MAC + /** Handle tray icon clicked */ + void trayIconActivated(QSystemTrayIcon::ActivationReason reason); +#endif + /** Show incoming transaction notification for new transactions. + + The new items are those between start and end inclusive, under the given parent item. + */ + void incomingTransaction(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(); + /** Ask for passphrase to unlock wallet temporarily */ + void unlockWallet(); + + /** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */ + void showNormalIfMinimized(bool fToggleHidden = false); + /** simply calls showNormalIfMinimized(true) for use in SLOT() macro */ + void toggleHidden(); +}; + +#endif diff --git a/src/qt/curecoinstrings.cpp b/src/qt/curecoinstrings.cpp new file mode 100644 index 0000000..f12660f --- /dev/null +++ b/src/qt/curecoinstrings.cpp @@ -0,0 +1,177 @@ +#include +// Automatically generated by extract_strings.py +#ifdef __GNUC__ +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif +static const char UNUSED *curecoin_strings[] = { +QT_TRANSLATE_NOOP("curecoin-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=curecoinrpc\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("curecoin-core", "" +"Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:" +"@STRENGTH)"), +QT_TRANSLATE_NOOP("curecoin-core", "" +"An error occurred while setting up the RPC port %u for listening on IPv4: %s"), +QT_TRANSLATE_NOOP("curecoin-core", "" +"An error occurred while setting up the RPC port %u for listening on IPv6, " +"falling back to IPv4: %s"), +QT_TRANSLATE_NOOP("curecoin-core", "" +"Cannot obtain a lock on data directory %s. curecoin is probably already " +"running."), +QT_TRANSLATE_NOOP("curecoin-core", "" +"Detach block and address databases. Increases shutdown time (default: 0)"), +QT_TRANSLATE_NOOP("curecoin-core", "" +"Error initializing database environment %s! To recover, BACKUP THAT " +"DIRECTORY, then remove everything from it except for wallet.dat."), +QT_TRANSLATE_NOOP("curecoin-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("curecoin-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("curecoin-core", "" +"Error: Wallet unlocked for block minting only, unable to create transaction."), +QT_TRANSLATE_NOOP("curecoin-core", "" +"Execute command when the best block changes (%s in cmd is replaced by block " +"hash)"), +QT_TRANSLATE_NOOP("curecoin-core", "" +"Listen for JSON-RPC connections on (default: 8344 or testnet: 18344)"), +QT_TRANSLATE_NOOP("curecoin-core", "" +"Number of seconds to keep misbehaving peers from reconnecting (default: " +"86400)"), +QT_TRANSLATE_NOOP("curecoin-core", "" +"Set maximum size of high-priority/low-fee transactions in bytes (default: " +"27000)"), +QT_TRANSLATE_NOOP("curecoin-core", "" +"Unable to bind to %s on this computer. curecoin is probably already running."), +QT_TRANSLATE_NOOP("curecoin-core", "" +"Warning: -paytxfee is set very high! This is the transaction fee you will " +"pay if you send a transaction."), +QT_TRANSLATE_NOOP("curecoin-core", "" +"Warning: Please check that your computer's date and time are correct! If " +"your clock is wrong curecoin will not work properly."), +QT_TRANSLATE_NOOP("curecoin-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("curecoin-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("curecoin-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("curecoin-core", "Accept command line and JSON-RPC commands"), +QT_TRANSLATE_NOOP("curecoin-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"), +QT_TRANSLATE_NOOP("curecoin-core", "Add a node to connect to and attempt to keep the connection open"), +QT_TRANSLATE_NOOP("curecoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"), +QT_TRANSLATE_NOOP("curecoin-core", "Allow JSON-RPC connections from specified IP address"), +QT_TRANSLATE_NOOP("curecoin-core", "Attempt to recover private keys from a corrupt wallet.dat"), +QT_TRANSLATE_NOOP("curecoin-core", "Bind to given address. Use [host]:port notation for IPv6"), +QT_TRANSLATE_NOOP("curecoin-core", "Block creation options:"), +QT_TRANSLATE_NOOP("curecoin-core", "Cannot downgrade wallet"), +QT_TRANSLATE_NOOP("curecoin-core", "Cannot initialize keypool"), +QT_TRANSLATE_NOOP("curecoin-core", "Cannot resolve -bind address: '%s'"), +QT_TRANSLATE_NOOP("curecoin-core", "Cannot resolve -externalip address: '%s'"), +QT_TRANSLATE_NOOP("curecoin-core", "Cannot write default address"), +QT_TRANSLATE_NOOP("curecoin-core", "Connect only to the specified node(s)"), +QT_TRANSLATE_NOOP("curecoin-core", "Connect through socks proxy"), +QT_TRANSLATE_NOOP("curecoin-core", "Connect to a node to retrieve peer addresses, and disconnect"), +QT_TRANSLATE_NOOP("curecoin-core", "Discover own IP address (default: 1 when listening and no -externalip)"), +QT_TRANSLATE_NOOP("curecoin-core", "Don't generate coins"), +QT_TRANSLATE_NOOP("curecoin-core", "Done loading"), +QT_TRANSLATE_NOOP("curecoin-core", "Error loading blkindex.dat"), +QT_TRANSLATE_NOOP("curecoin-core", "Error loading wallet.dat"), +QT_TRANSLATE_NOOP("curecoin-core", "Error loading wallet.dat: Wallet corrupted"), +QT_TRANSLATE_NOOP("curecoin-core", "Error loading wallet.dat: Wallet requires newer version of curecoin"), +QT_TRANSLATE_NOOP("curecoin-core", "Error"), +QT_TRANSLATE_NOOP("curecoin-core", "Error: Transaction creation failed "), +QT_TRANSLATE_NOOP("curecoin-core", "Error: Wallet locked, unable to create transaction "), +QT_TRANSLATE_NOOP("curecoin-core", "Error: could not start node"), +QT_TRANSLATE_NOOP("curecoin-core", "Failed to listen on any port. Use -listen=0 if you want this."), +QT_TRANSLATE_NOOP("curecoin-core", "Fee per KB to add to transactions you send"), +QT_TRANSLATE_NOOP("curecoin-core", "Find peers using DNS lookup (default: 0)"), +QT_TRANSLATE_NOOP("curecoin-core", "Find peers using internet relay chat (default: 1)"), +QT_TRANSLATE_NOOP("curecoin-core", "Generate coins"), +QT_TRANSLATE_NOOP("curecoin-core", "Get help for a command"), +QT_TRANSLATE_NOOP("curecoin-core", "How many blocks to check at startup (default: 2500, 0 = all)"), +QT_TRANSLATE_NOOP("curecoin-core", "How thorough the block verification is (0-6, default: 1)"), +QT_TRANSLATE_NOOP("curecoin-core", "Importing blockchain data file."), +QT_TRANSLATE_NOOP("curecoin-core", "Importing bootstrap blockchain data file."), +QT_TRANSLATE_NOOP("curecoin-core", "Imports blocks from external blk000?.dat file"), +QT_TRANSLATE_NOOP("curecoin-core", "Insufficient funds"), +QT_TRANSLATE_NOOP("curecoin-core", "Invalid -proxy address: '%s'"), +QT_TRANSLATE_NOOP("curecoin-core", "Invalid -tor address: '%s'"), +QT_TRANSLATE_NOOP("curecoin-core", "Invalid amount for -paytxfee=: '%s'"), +QT_TRANSLATE_NOOP("curecoin-core", "Invalid amount for -reservebalance="), +QT_TRANSLATE_NOOP("curecoin-core", "Invalid amount"), +QT_TRANSLATE_NOOP("curecoin-core", "List commands"), +QT_TRANSLATE_NOOP("curecoin-core", "Listen for connections on (default: 7777 or testnet: 17777)"), +QT_TRANSLATE_NOOP("curecoin-core", "Loading addresses..."), +QT_TRANSLATE_NOOP("curecoin-core", "Loading block index..."), +QT_TRANSLATE_NOOP("curecoin-core", "Loading wallet..."), +QT_TRANSLATE_NOOP("curecoin-core", "Maintain at most connections to peers (default: 125)"), +QT_TRANSLATE_NOOP("curecoin-core", "Maximum per-connection receive buffer, *1000 bytes (default: 5000)"), +QT_TRANSLATE_NOOP("curecoin-core", "Maximum per-connection send buffer, *1000 bytes (default: 1000)"), +QT_TRANSLATE_NOOP("curecoin-core", "curecoin version"), +QT_TRANSLATE_NOOP("curecoin-core", "curecoin"), +QT_TRANSLATE_NOOP("curecoin-core", "Only connect to nodes in network (IPv4, IPv6 or Tor)"), +QT_TRANSLATE_NOOP("curecoin-core", "Options:"), +QT_TRANSLATE_NOOP("curecoin-core", "Output extra debugging information. Implies all other -debug* options"), +QT_TRANSLATE_NOOP("curecoin-core", "Output extra network debugging information"), +QT_TRANSLATE_NOOP("curecoin-core", "Password for JSON-RPC connections"), +QT_TRANSLATE_NOOP("curecoin-core", "Prepend debug output with timestamp"), +QT_TRANSLATE_NOOP("curecoin-core", "Rescan the block chain for missing wallet transactions"), +QT_TRANSLATE_NOOP("curecoin-core", "Rescanning..."), +QT_TRANSLATE_NOOP("curecoin-core", "Run in the background as a daemon and accept commands"), +QT_TRANSLATE_NOOP("curecoin-core", "SSL options: (see the curecoin Wiki for SSL setup instructions)"), +QT_TRANSLATE_NOOP("curecoin-core", "Select the version of socks proxy to use (4-5, default: 5)"), +QT_TRANSLATE_NOOP("curecoin-core", "Send command to -server or curecoind"), +QT_TRANSLATE_NOOP("curecoin-core", "Send commands to node running on (default: 127.0.0.1)"), +QT_TRANSLATE_NOOP("curecoin-core", "Send trace/debug info to console instead of debug.log file"), +QT_TRANSLATE_NOOP("curecoin-core", "Send trace/debug info to debugger"), +QT_TRANSLATE_NOOP("curecoin-core", "Sending..."), +QT_TRANSLATE_NOOP("curecoin-core", "Server certificate file (default: server.cert)"), +QT_TRANSLATE_NOOP("curecoin-core", "Server private key (default: server.pem)"), +QT_TRANSLATE_NOOP("curecoin-core", "Set database cache size in megabytes (default: 25)"), +QT_TRANSLATE_NOOP("curecoin-core", "Set database disk log size in megabytes (default: 100)"), +QT_TRANSLATE_NOOP("curecoin-core", "Set key pool size to (default: 100)"), +QT_TRANSLATE_NOOP("curecoin-core", "Set maximum block size in bytes (default: 250000)"), +QT_TRANSLATE_NOOP("curecoin-core", "Set minimum block size in bytes (default: 0)"), +QT_TRANSLATE_NOOP("curecoin-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"), +QT_TRANSLATE_NOOP("curecoin-core", "Specify configuration file (default: curecoin.conf)"), +QT_TRANSLATE_NOOP("curecoin-core", "Specify connection timeout in milliseconds (default: 5000)"), +QT_TRANSLATE_NOOP("curecoin-core", "Specify data directory"), +QT_TRANSLATE_NOOP("curecoin-core", "Specify pid file (default: curecoind.pid)"), +QT_TRANSLATE_NOOP("curecoin-core", "Specify your own public address"), +QT_TRANSLATE_NOOP("curecoin-core", "This help message"), +QT_TRANSLATE_NOOP("curecoin-core", "Threshold for disconnecting misbehaving peers (default: 100)"), +QT_TRANSLATE_NOOP("curecoin-core", "To use the %s option"), +QT_TRANSLATE_NOOP("curecoin-core", "Unable to bind to %s on this computer (bind returned error %d, %s)"), +QT_TRANSLATE_NOOP("curecoin-core", "Unable to sign checkpoint, wrong checkpointkey?\n"), +QT_TRANSLATE_NOOP("curecoin-core", "Unknown -socks proxy version requested: %i"), +QT_TRANSLATE_NOOP("curecoin-core", "Unknown network specified in -onlynet: '%s'"), +QT_TRANSLATE_NOOP("curecoin-core", "Upgrade wallet to latest format"), +QT_TRANSLATE_NOOP("curecoin-core", "Usage:"), +QT_TRANSLATE_NOOP("curecoin-core", "Use OpenSSL (https) for JSON-RPC connections"), +QT_TRANSLATE_NOOP("curecoin-core", "Use UPnP to map the listening port (default: 0)"), +QT_TRANSLATE_NOOP("curecoin-core", "Use UPnP to map the listening port (default: 1 when listening)"), +QT_TRANSLATE_NOOP("curecoin-core", "Use proxy to reach tor hidden services (default: same as -proxy)"), +QT_TRANSLATE_NOOP("curecoin-core", "Use the test network"), +QT_TRANSLATE_NOOP("curecoin-core", "Username for JSON-RPC connections"), +QT_TRANSLATE_NOOP("curecoin-core", "Verifying database integrity..."), +QT_TRANSLATE_NOOP("curecoin-core", "Wallet needed to be rewritten: restart curecoin to complete"), +QT_TRANSLATE_NOOP("curecoin-core", "Warning: Disk space is low!"), +QT_TRANSLATE_NOOP("curecoin-core", "Warning: This version is obsolete, upgrade required!"), +QT_TRANSLATE_NOOP("curecoin-core", "wallet.dat corrupt, salvage failed"), +}; \ No newline at end of file diff --git a/src/qt/curecoinunits.cpp b/src/qt/curecoinunits.cpp new file mode 100644 index 0000000..d01c56c --- /dev/null +++ b/src/qt/curecoinunits.cpp @@ -0,0 +1,181 @@ +#include "curecoinunits.h" + +#include + +curecoinUnits::curecoinUnits(QObject *parent): + QAbstractListModel(parent), + unitlist(availableUnits()) +{ +} + +QList curecoinUnits::availableUnits() +{ + QList unitlist; + unitlist.append(BTC); + unitlist.append(mBTC); + unitlist.append(uBTC); + return unitlist; +} + +bool curecoinUnits::valid(int unit) +{ + switch(unit) + { + case BTC: + case mBTC: + case uBTC: + return true; + default: + return false; + } +} + +QString curecoinUnits::name(int unit) +{ + switch(unit) + { + case BTC: return QString("CUR"); + case mBTC: return QString("mBOC"); + case uBTC: return QString::fromUtf8("μBOC"); + default: return QString("???"); + } +} + +QString curecoinUnits::description(int unit) +{ + switch(unit) + { + case BTC: return QString("curecoins"); + case mBTC: return QString("Milli-curecoins (1 / 1,000)"); + case uBTC: return QString("Micro-curecoins (1 / 1,000,000)"); + default: return QString("???"); + } +} + +qint64 curecoinUnits::factor(int unit) +{ + switch(unit) + { + case BTC: return 1000000; + case mBTC: return 1000; + case uBTC: return 1; + default: return 1000000; + } +} + +int curecoinUnits::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 + default: return 0; + } +} + +int curecoinUnits::decimals(int unit) +{ + switch(unit) + { + case BTC: return 6; + case mBTC: return 3; + case uBTC: return 0; + default: return 0; + } +} + +QString curecoinUnits::format(int unit, qint64 n, bool fPlus) +{ + // Note: not using straight sprintf here because we do NOT want + // localized number formatting. + if(!valid(unit)) + return QString(); // Refuse to format invalid unit + qint64 coin = factor(unit); + int num_decimals = decimals(unit); + qint64 n_abs = (n > 0 ? n : -n); + qint64 quotient = n_abs / coin; + qint64 remainder = n_abs % coin; + QString quotient_str = QString::number(quotient); + QString remainder_str = QString::number(remainder).rightJustified(num_decimals, '0'); + + // Right-trim excess zeros after the decimal point + int nTrim = 0; + for (int i = remainder_str.size()-1; i>=2 && (remainder_str.at(i) == '0'); --i) + ++nTrim; + remainder_str.chop(nTrim); + + if (n < 0) + quotient_str.insert(0, '-'); + else if (fPlus && n > 0) + quotient_str.insert(0, '+'); + return quotient_str + QString(".") + remainder_str; +} + +QString curecoinUnits::formatWithUnit(int unit, qint64 amount, bool plussign) +{ + return format(unit, amount, plussign) + QString(" ") + name(unit); +} + +bool curecoinUnits::parse(int unit, const QString &value, qint64 *val_out) +{ + if(!valid(unit) || value.isEmpty()) + return false; // Refuse to parse invalid unit or empty string + int num_decimals = decimals(unit); + QStringList parts = value.split("."); + + if(parts.size() > 2) + { + return false; // More than one dot + } + QString whole = parts[0]; + QString decimals; + + if(parts.size() > 1) + { + decimals = parts[1]; + } + if(decimals.size() > num_decimals) + { + return false; // Exceeds max precision + } + bool ok = false; + QString str = whole + decimals.leftJustified(num_decimals, '0'); + + if(str.size() > 18) + { + return false; // Longer numbers will exceed 63 bits + } + qint64 retvalue = str.toLongLong(&ok); + if(val_out) + { + *val_out = retvalue; + } + return ok; +} + +int curecoinUnits::rowCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent); + return unitlist.size(); +} + +QVariant curecoinUnits::data(const QModelIndex &index, int role) const +{ + int row = index.row(); + if(row >= 0 && row < unitlist.size()) + { + Unit unit = unitlist.at(row); + switch(role) + { + case Qt::EditRole: + case Qt::DisplayRole: + return QVariant(name(unit)); + case Qt::ToolTipRole: + return QVariant(description(unit)); + case UnitRole: + return QVariant(static_cast(unit)); + } + } + return QVariant(); +} diff --git a/src/qt/curecoinunits.h b/src/qt/curecoinunits.h new file mode 100644 index 0000000..400054a --- /dev/null +++ b/src/qt/curecoinunits.h @@ -0,0 +1,66 @@ +#ifndef curecoinUNITS_H +#define curecoinUNITS_H + +#include +#include + +/** curecoin unit definitions. Encapsulates parsing and formatting + and serves as list model for drop-down selection boxes. +*/ +class curecoinUnits: public QAbstractListModel +{ +public: + explicit curecoinUnits(QObject *parent); + + /** curecoin units. + @note Source: https://en.bitcoin.it/wiki/Units . Please add only sensible ones + */ + enum Unit + { + BTC, + mBTC, + uBTC + }; + + //! @name Static API + //! Unit conversion and formatting + ///@{ + + //! Get list of units, for drop-down box + static QList availableUnits(); + //! Is unit ID valid? + static bool valid(int unit); + //! Short name + static QString name(int unit); + //! Longer description + static QString description(int unit); + //! Number of Satoshis (1e-8) per unit + static qint64 factor(int unit); + //! Number of amount digits (to represent max number of coins) + static int amountDigits(int unit); + //! Number of decimals left + static int decimals(int unit); + //! Format as string + static QString format(int unit, qint64 amount, bool plussign=false); + //! Format as string (with unit) + static QString formatWithUnit(int unit, qint64 amount, bool plussign=false); + //! Parse string to coin amount + static bool parse(int unit, const QString &value, qint64 *val_out); + ///@} + + //! @name AbstractListModel implementation + //! List model for unit drop-down selection box. + ///@{ + enum RoleIndex { + /** Unit identifier */ + UnitRole = Qt::UserRole + }; + int rowCount(const QModelIndex &parent) const; + QVariant data(const QModelIndex &index, int role) const; + ///@} +private: + QList unitlist; +}; +typedef curecoinUnits::Unit curecoinUnit; + +#endif // curecoinUNITS_H diff --git a/src/qt/editaddressdialog.cpp b/src/qt/editaddressdialog.cpp new file mode 100644 index 0000000..3571f1f --- /dev/null +++ b/src/qt/editaddressdialog.cpp @@ -0,0 +1,128 @@ +#include "editaddressdialog.h" +#include "ui_editaddressdialog.h" +#include "addresstablemodel.h" +#include "guiutil.h" + +#include +#include + +EditAddressDialog::EditAddressDialog(Mode mode, QWidget *parent) : + QDialog(parent), + ui(new Ui::EditAddressDialog), mapper(0), mode(mode), model(0) +{ + ui->setupUi(this); + + GUIUtil::setupAddressWidget(ui->addressEdit, this); + + switch(mode) + { + case NewReceivingAddress: + setWindowTitle(tr("New receiving address")); + ui->addressEdit->setEnabled(false); + break; + case NewSendingAddress: + setWindowTitle(tr("New sending address")); + break; + case EditReceivingAddress: + setWindowTitle(tr("Edit receiving address")); + ui->addressEdit->setDisabled(true); + break; + case EditSendingAddress: + setWindowTitle(tr("Edit sending address")); + break; + } + + mapper = new QDataWidgetMapper(this); + mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit); +} + +EditAddressDialog::~EditAddressDialog() +{ + delete ui; +} + +void EditAddressDialog::setModel(AddressTableModel *model) +{ + this->model = model; + mapper->setModel(model); + mapper->addMapping(ui->labelEdit, AddressTableModel::Label); + mapper->addMapping(ui->addressEdit, AddressTableModel::Address); +} + +void EditAddressDialog::loadRow(int row) +{ + mapper->setCurrentIndex(row); +} + +bool EditAddressDialog::saveCurrentRow() +{ + if(!model) + return false; + switch(mode) + { + case NewReceivingAddress: + case NewSendingAddress: + address = model->addRow( + mode == NewSendingAddress ? AddressTableModel::Send : AddressTableModel::Receive, + ui->labelEdit->text(), + ui->addressEdit->text()); + break; + case EditReceivingAddress: + case EditSendingAddress: + if(mapper->submit()) + { + address = ui->addressEdit->text(); + } + break; + } + return !address.isEmpty(); +} + +void EditAddressDialog::accept() +{ + if(!model) + return; + if(!saveCurrentRow()) + { + switch(model->getEditStatus()) + { + 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 curecoin 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; + 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(); +} + +QString EditAddressDialog::getAddress() const +{ + return address; +} + +void EditAddressDialog::setAddress(const QString &address) +{ + this->address = address; + ui->addressEdit->setText(address); +} diff --git a/src/qt/editaddressdialog.h b/src/qt/editaddressdialog.h new file mode 100644 index 0000000..7ec053f --- /dev/null +++ b/src/qt/editaddressdialog.h @@ -0,0 +1,50 @@ +#ifndef EDITADDRESSDIALOG_H +#define EDITADDRESSDIALOG_H + +#include + +QT_BEGIN_NAMESPACE +class QDataWidgetMapper; +QT_END_NAMESPACE + +namespace Ui { + class EditAddressDialog; +} +class AddressTableModel; + +/** Dialog for editing an address and associated information. + */ +class EditAddressDialog : public QDialog +{ + Q_OBJECT + +public: + enum Mode { + NewReceivingAddress, + NewSendingAddress, + EditReceivingAddress, + EditSendingAddress + }; + + explicit EditAddressDialog(Mode mode, QWidget *parent = 0); + ~EditAddressDialog(); + + void setModel(AddressTableModel *model); + void loadRow(int row); + + void accept(); + + QString getAddress() const; + void setAddress(const QString &address); +private: + bool saveCurrentRow(); + + Ui::EditAddressDialog *ui; + QDataWidgetMapper *mapper; + Mode mode; + AddressTableModel *model; + + QString address; +}; + +#endif // EDITADDRESSDIALOG_H diff --git a/src/qt/forms/aboutdialog.ui b/src/qt/forms/aboutdialog.ui new file mode 100644 index 0000000..ace2fe5 --- /dev/null +++ b/src/qt/forms/aboutdialog.ui @@ -0,0 +1,187 @@ + + + AboutDialog + + + + 0 + 0 + 593 + 319 + + + + About curecoin + + + + + + + 0 + 0 + + + + :/images/about + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + IBeamCursor + + + <b>curecoin</b> version + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + IBeamCursor + + + 1.4.0.0 + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + IBeamCursor + + + Copyright © 2013 The curecoin Foundation + http://www.curecoin.com + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + IBeamCursor + + + +This is experimental software. If you don't treat it as such, you're likely to put an eye out! + +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. + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + + + + + buttonBox + accepted() + AboutDialog + accept() + + + 360 + 308 + + + 157 + 274 + + + + + buttonBox + rejected() + AboutDialog + reject() + + + 428 + 308 + + + 286 + 274 + + + + + diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui new file mode 100644 index 0000000..8f08c05 --- /dev/null +++ b/src/qt/forms/addressbookpage.ui @@ -0,0 +1,175 @@ + + + AddressBookPage + + + + 0 + 0 + 760 + 380 + + + + Address Book + + + + + + These are your curecoin 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 + + + 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 curecoin address + + + Sign &Message + + + + :/icons/edit:/icons/edit + + + + + + + Verify a message to ensure it was signed with a specified curecoin 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 new file mode 100644 index 0000000..2516904 --- /dev/null +++ b/src/qt/forms/askpassphrasedialog.ui @@ -0,0 +1,151 @@ + + + AskPassphraseDialog + + + + 0 + 0 + 598 + 198 + + + + + 0 + 0 + + + + + 550 + 0 + + + + Passphrase Dialog + + + + + + Qt::RichText + + + true + + + + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + Enter passphrase + + + + + + + QLineEdit::Password + + + + + + + New passphrase + + + + + + + QLineEdit::Password + + + + + + + Repeat new passphrase + + + + + + + QLineEdit::Password + + + + + + + + 75 + true + + + + + + + Qt::AlignCenter + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + AskPassphraseDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + AskPassphraseDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/qt/forms/editaddressdialog.ui b/src/qt/forms/editaddressdialog.ui new file mode 100644 index 0000000..b4a4c1b --- /dev/null +++ b/src/qt/forms/editaddressdialog.ui @@ -0,0 +1,105 @@ + + + EditAddressDialog + + + + 0 + 0 + 457 + 126 + + + + Edit Address + + + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + &Label + + + labelEdit + + + + + + + The label associated with this address book entry + + + + + + + &Address + + + addressEdit + + + + + + + The address associated with this address book entry. This can only be modified for sending addresses. + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + EditAddressDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + EditAddressDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui new file mode 100644 index 0000000..18b8b74 --- /dev/null +++ b/src/qt/forms/optionsdialog.ui @@ -0,0 +1,460 @@ + + + OptionsDialog + + + + 0 + 0 + 540 + 380 + + + + Options + + + true + + + + + + QTabWidget::North + + + 0 + + + + &Main + + + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.0001 recommended. + + + Qt::PlainText + + + true + + + + + + + + + Pay transaction &fee + + + Qt::PlainText + + + transactionFee + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Automatically start curecoin after logging in to the system. + + + &Start curecoin 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 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + &Network + + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + Map port using &UPnP + + + + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + + + &Connect through SOCKS proxy: + + + + + + + + + Proxy &IP: + + + Qt::PlainText + + + proxyIp + + + + + + + + 140 + 16777215 + + + + IP address of the proxy (e.g. 127.0.0.1) + + + + + + + &Port: + + + Qt::PlainText + + + proxyPort + + + + + + + + 55 + 16777215 + + + + Port of the proxy (e.g. 9050) + + + + + + + SOCKS &Version: + + + Qt::PlainText + + + socksVersion + + + + + + + SOCKS version of the proxy (e.g. 5) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + &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 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + &Display + + + + + + + + User Interface &language: + + + Qt::PlainText + + + lang + + + + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + + + + + + + + + + + &Unit to show amounts in: + + + Qt::PlainText + + + unit + + + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + + + + + Whether to show curecoin addresses in the transaction list or not. + + + &Display addresses in transaction list + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 48 + + + + + + + + + 75 + true + + + + + + + Qt::PlainText + + + true + + + + + + + Qt::Horizontal + + + + 40 + 48 + + + + + + + + &OK + + + + + + + &Cancel + + + false + + + + + + + &Apply + + + false + + + + + + + + + + QValidatedLineEdit + QWidget +
qvalidatedlineedit.h
+
+ + curecoinAmountField + QSpinBox +
curecoinamountfield.h
+
+ + QValueComboBox + QComboBox +
qvaluecombobox.h
+
+
+ + +
diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui new file mode 100644 index 0000000..005e9e8 --- /dev/null +++ b/src/qt/forms/overviewpage.ui @@ -0,0 +1,347 @@ + + + OverviewPage + + + + 0 + 0 + 573 + 342 + + + + Form + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + + 11 + 75 + true + + + + Wallet + + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin 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 + + + + + Balance: + + + + + + + + 75 + true + + + + IBeamCursor + + + Your current balance + + + 0 CUR + + + 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 CUR + + + 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 CUR + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Immature: + + + + + + + + 75 + true + + + + Mined balance that has not yet matured + + + 0 CUR + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Number of transactions: + + + + + + + Total number of transactions in wallet + + + 0 + + + + + + + + + + + + + + + :/images/wallet_bgcoin + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + <b>Recent transactions</b> + + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin 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 + + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + diff --git a/src/qt/forms/qrcodedialog.ui b/src/qt/forms/qrcodedialog.ui new file mode 100644 index 0000000..3ebd075 --- /dev/null +++ b/src/qt/forms/qrcodedialog.ui @@ -0,0 +1,212 @@ + + + QRCodeDialog + + + + 0 + 0 + 340 + 530 + + + + QR Code Dialog + + + + + + + 0 + 0 + + + + + 300 + 300 + + + + Qt::PlainText + + + Qt::AlignCenter + + + true + + + + + + + + 0 + 0 + + + + + 0 + 50 + + + + true + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + + + true + + + Request Payment + + + + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + Label: + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + lnLabel + + + + + + + + + + Message: + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + lnMessage + + + + + + + + + + + 0 + 0 + + + + Amount: + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + lnReqAmount + + + + + + + false + + + + 80 + 0 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + &Save As... + + + + + + + + + + + + + curecoinAmountField + QSpinBox +
curecoinamountfield.h
+
+
+ + + + chkReqPayment + clicked(bool) + lnReqAmount + setEnabled(bool) + + + 92 + 285 + + + 98 + 311 + + + + +
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui new file mode 100644 index 0000000..d1ac53f --- /dev/null +++ b/src/qt/forms/rpcconsole.ui @@ -0,0 +1,456 @@ + + + RPCConsole + + + + 0 + 0 + 740 + 450 + + + + curecoin - Debug window + + + + + + 0 + + + + &Information + + + + 12 + + + + + + 75 + true + + + + curecoin Core + + + + + + + Client name + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Client version + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Using OpenSSL version + + + 10 + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Build date + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Startup time + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 75 + true + + + + Network + + + + + + + Number of connections + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + On testnet + + + + + + + false + + + + + + + + + + + 75 + true + + + + Block chain + + + + + + + Current number of blocks + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Estimated total blocks + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Last block time + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Vertical + + + + 20 + 20 + + + + + + + + + 75 + true + + + + Debug log file + + + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + &Open + + + false + + + + + + + + 75 + true + + + + Command-line options + + + + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + + + &Show + + + false + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + &Console + + + + 3 + + + + + + 0 + 100 + + + + true + + + false + + + 2 + + + + + + + 3 + + + + + > + + + + + + + + + + + 24 + 24 + + + + Clear console + + + + + + + :/icons/remove:/icons/remove + + + Ctrl+L + + + false + + + + + + + + + + + + + + + + diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui new file mode 100644 index 0000000..7cda233 --- /dev/null +++ b/src/qt/forms/sendcoinsdialog.ui @@ -0,0 +1,221 @@ + + + SendCoinsDialog + + + + 0 + 0 + 686 + 217 + + + + Send Coins + + + + + + 0 + + + + + Transaction &comment: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + editTxComment + + + + + + + true + + + Enter a transaction comment (MAX 256 Characters) (Note: this information is public) + + + + + + + + + true + + + + + 0 + 0 + 666 + 145 + + + + + 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 + + + + + Balance: + + + + + + + IBeamCursor + + + 123.456 CUR + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 150 + 0 + + + + Confirm the send action + + + S&end + + + + :/icons/send:/icons/send + + + true + + + + + + + + + + QValidatedLineEdit + QWidget +
qvalidatedlineedit.h
+
+
+ + + + +
diff --git a/src/qt/forms/sendcoinsentry.ui b/src/qt/forms/sendcoinsentry.ui new file mode 100644 index 0000000..cd9aa80 --- /dev/null +++ b/src/qt/forms/sendcoinsentry.ui @@ -0,0 +1,169 @@ + + + SendCoinsEntry + + + + 0 + 0 + 729 + 136 + + + + Form + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + 12 + + + + + A&mount: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + payAmount + + + + + + + Pay &To: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + payTo + + + + + + + + + + 0 + + + + + true + + + Enter a label for this address to add it to your address book + + + + + + + + + &Label: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + addAsLabel + + + + + + + 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 + + + + + + + + + + QValidatedLineEdit + QLineEdit +
qvalidatedlineedit.h
+
+ + curecoinAmountField + QLineEdit +
curecoinamountfield.h
+ 1 +
+
+ + + + +
diff --git a/src/qt/forms/signverifymessagedialog.ui b/src/qt/forms/signverifymessagedialog.ui new file mode 100644 index 0000000..675897b --- /dev/null +++ b/src/qt/forms/signverifymessagedialog.ui @@ -0,0 +1,386 @@ + + + SignVerifyMessageDialog + + + + 0 + 0 + 700 + 380 + + + + Signatures - Sign / Verify a Message + + + true + + + + + + 1 + + + + &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. + + + Qt::PlainText + + + true + + + + + + + 0 + + + + + The address to sign the message with (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + 34 + + + + + + + Choose an address from the address book + + + + + + + :/icons/address-book:/icons/address-book + + + Alt+A + + + false + + + + + + + Paste address from clipboard + + + + + + + :/icons/editpaste:/icons/editpaste + + + Alt+P + + + false + + + + + + + + + Enter the message you want to sign here + + + + + + + 0 + + + + + + true + + + + true + + + + + + + Copy the current signature to the system clipboard + + + + + + + :/icons/editcopy:/icons/editcopy + + + false + + + + + + + + + + + Sign the message to prove you own this curecoin address + + + &Sign Message + + + + :/icons/edit:/icons/edit + + + false + + + + + + + Reset all sign message fields + + + Clear &All + + + + :/icons/remove:/icons/remove + + + false + + + + + + + Qt::Horizontal + + + + 40 + 48 + + + + + + + + + 75 + true + + + + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 48 + + + + + + + + + + + &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. + + + Qt::PlainText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + 0 + + + + + The address the message was signed with (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + 34 + + + + + + + Choose an address from the address book + + + + + + + :/icons/address-book:/icons/address-book + + + Alt+A + + + false + + + + + + + + + + + + + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + &Verify Message + + + + :/icons/transaction_0:/icons/transaction_0 + + + false + + + + + + + Reset all verify message fields + + + Clear &All + + + + :/icons/remove:/icons/remove + + + false + + + + + + + Qt::Horizontal + + + + 40 + 48 + + + + + + + + + 75 + true + + + + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 48 + + + + + + + + + + + + + + + QValidatedLineEdit + QLineEdit +
qvalidatedlineedit.h
+
+
+ + + + +
diff --git a/src/qt/forms/transactiondescdialog.ui b/src/qt/forms/transactiondescdialog.ui new file mode 100644 index 0000000..b38dffc --- /dev/null +++ b/src/qt/forms/transactiondescdialog.ui @@ -0,0 +1,74 @@ + + + TransactionDescDialog + + + + 0 + 0 + 620 + 250 + + + + Transaction details + + + + + + This pane shows a detailed description of the transaction + + + true + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close + + + + + + + + + buttonBox + accepted() + TransactionDescDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + TransactionDescDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h new file mode 100644 index 0000000..1705bd7 --- /dev/null +++ b/src/qt/guiconstants.h @@ -0,0 +1,34 @@ +#ifndef GUICONSTANTS_H +#define GUICONSTANTS_H + +/* Milliseconds between model updates */ +static const int MODEL_UPDATE_DELAY = 500; + +/* AskPassphraseDialog -- Maximum passphrase length */ +static const int MAX_PASSPHRASE_SIZE = 1024; + +/* curecoinGUI -- 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) +/* Transaction list -- negative amount */ +#define COLOR_NEGATIVE QColor(255, 0, 0) +/* Transaction list -- bare address (without label) */ +#define COLOR_BAREADDRESS QColor(140, 140, 140) + +/* Tooltips longer than this (in characters) are converted into rich text, + so that they can be word-wrapped. + */ +static const int TOOLTIP_WRAP_THRESHOLD = 80; + +/* Maximum allowed URI length */ +static const int MAX_URI_LENGTH = 255; + +/* QRCodeDialog -- size of exported QR Code image */ +#define EXPORT_IMAGE_SIZE 256 + +#endif // GUICONSTANTS_H diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp new file mode 100644 index 0000000..5d1fec5 --- /dev/null +++ b/src/qt/guiutil.cpp @@ -0,0 +1,457 @@ +#include "guiutil.h" +#include "curecoinaddressvalidator.h" +#include "walletmodel.h" +#include "curecoinunits.h" +#include "util.h" +#include "init.h" + +#include +#include +#include +#include +#include +#include +#include // For Qt::escape +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef WIN32 +#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 "shlwapi.h" +#include "shlobj.h" +#include "shellapi.h" +#endif + +namespace GUIUtil { + +QString dateTimeStr(const QDateTime &date) +{ + return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm"); +} + +QString dateTimeStr(qint64 nTime) +{ + return dateTimeStr(QDateTime::fromTime_t((qint32)nTime)); +} + +QFont curecoinAddressFont() +{ + QFont font("Monospace"); + font.setStyleHint(QFont::TypeWriter); + return font; +} + +void setupAddressWidget(QLineEdit *widget, QWidget *parent) +{ + widget->setMaxLength(curecoinAddressValidator::MaxAddressLength); + widget->setValidator(new curecoinAddressValidator(parent)); + widget->setFont(curecoinAddressFont()); +} + +void setupAmountWidget(QLineEdit *widget, QWidget *parent) +{ + QDoubleValidator *amountValidator = new QDoubleValidator(parent); + amountValidator->setDecimals(8); + amountValidator->setBottom(0.0); + widget->setValidator(amountValidator); + widget->setAlignment(Qt::AlignRight|Qt::AlignVCenter); +} + +bool parsecurecoinURI(const QUrl &uri, SendCoinsRecipient *out) +{ + if(uri.scheme() != QString("curecoin")) + return false; + + SendCoinsRecipient rv; + rv.address = uri.path(); + rv.amount = 0; + QList > items = uri.queryItems(); + for (QList >::iterator i = items.begin(); i != items.end(); i++) + { + bool fShouldReturnFalse = false; + if (i->first.startsWith("req-")) + { + i->first.remove(0, 4); + fShouldReturnFalse = true; + } + + if (i->first == "label") + { + rv.label = i->second; + fShouldReturnFalse = false; + } + else if (i->first == "amount") + { + if(!i->second.isEmpty()) + { + if(!curecoinUnits::parse(curecoinUnits::BTC, i->second, &rv.amount)) + { + return false; + } + } + fShouldReturnFalse = false; + } + + if (fShouldReturnFalse) + return false; + } + if(out) + { + *out = rv; + } + return true; +} + +bool parsecurecoinURI(QString uri, SendCoinsRecipient *out) +{ + // Convert curecoin:// to curecoin: + // + // Cannot handle this later, because curecoin:// will cause Qt to see the part after // as host, + // which will lower-case it (and thus invalidate the address). + if(uri.startsWith("curecoin://")) + { + uri.replace(0, 10, "curecoin:"); + } + QUrl uriInstance(uri); + return parsecurecoinURI(uriInstance, out); +} + +QString HtmlEscape(const QString& str, bool fMultiLine) +{ + QString escaped = Qt::escape(str); + if(fMultiLine) + { + escaped = escaped.replace("\n", "
\n"); + } + return escaped; +} + +QString HtmlEscape(const std::string& str, bool fMultiLine) +{ + return HtmlEscape(QString::fromStdString(str), fMultiLine); +} + +void copyEntryData(QAbstractItemView *view, int column, int role) +{ + if(!view || !view->selectionModel()) + return; + QModelIndexList selection = view->selectionModel()->selectedRows(column); + + if(!selection.isEmpty()) + { + // Copy first item + QApplication::clipboard()->setText(selection.at(0).data(role).toString()); + } +} + +QString getSaveFileName(QWidget *parent, const QString &caption, + const QString &dir, + const QString &filter, + QString *selectedSuffixOut) +{ + QString selectedFilter; + QString myDir; + if(dir.isEmpty()) // Default to user documents location + { + myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); + } + else + { + myDir = dir; + } + QString result = QFileDialog::getSaveFileName(parent, caption, myDir, filter, &selectedFilter); + + /* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */ + QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]"); + QString selectedSuffix; + if(filter_re.exactMatch(selectedFilter)) + { + selectedSuffix = filter_re.cap(1); + } + + /* Add suffix if needed */ + QFileInfo info(result); + if(!result.isEmpty()) + { + if(info.suffix().isEmpty() && !selectedSuffix.isEmpty()) + { + /* No suffix specified, add selected suffix */ + if(!result.endsWith(".")) + result.append("."); + result.append(selectedSuffix); + } + } + + /* Return selected suffix if asked to */ + if(selectedSuffixOut) + { + *selectedSuffixOut = selectedSuffix; + } + return result; +} + +Qt::ConnectionType blockingGUIThreadConnection() +{ + if(QThread::currentThread() != QCoreApplication::instance()->thread()) + { + return Qt::BlockingQueuedConnection; + } + else + { + return Qt::DirectConnection; + } +} + +bool checkPoint(const QPoint &p, const QWidget *w) +{ + QWidget *atW = qApp->widgetAt(w->mapToGlobal(p)); + if (!atW) return false; + return atW->topLevelWidget() == w; +} + +bool isObscured(QWidget *w) +{ + return !(checkPoint(QPoint(0, 0), w) + && checkPoint(QPoint(w->width() - 1, 0), w) + && checkPoint(QPoint(0, w->height() - 1), w) + && checkPoint(QPoint(w->width() - 1, w->height() - 1), w) + && checkPoint(QPoint(w->width() / 2, w->height() / 2), w)); +} + +void openDebugLogfile() +{ + boost::filesystem::path pathDebug = GetDataDir() / "debug.log"; + + /* Open debug.log with the associated application */ + if (boost::filesystem::exists(pathDebug)) + QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(pathDebug.string()))); +} + +ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) : + QObject(parent), size_threshold(size_threshold) +{ + +} + +bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt) +{ + if(evt->type() == QEvent::ToolTipChange) + { + QWidget *widget = static_cast(obj); + QString tooltip = widget->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); + widget->setToolTip(tooltip); + return true; + } + } + return QObject::eventFilter(obj, evt); +} + +#ifdef WIN32 +boost::filesystem::path static StartupShortcutPath() +{ + return GetSpecialFolderPath(CSIDL_STARTUP) / "curecoin.lnk"; +} + +bool GetStartOnSystemStartup() +{ + // check for curecoin.lnk + return boost::filesystem::exists(StartupShortcutPath()); +} + +bool SetStartOnSystemStartup(bool fAutoStart) +{ + // If the shortcut exists already, remove it for updating + boost::filesystem::remove(StartupShortcutPath()); + + if (fAutoStart) + { + CoInitialize(NULL); + + // Get a pointer to the IShellLink interface. + IShellLink* psl = NULL; + HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, + CLSCTX_INPROC_SERVER, IID_IShellLink, + reinterpret_cast(&psl)); + + if (SUCCEEDED(hres)) + { + // Get the current executable path + TCHAR pszExePath[MAX_PATH]; + GetModuleFileName(NULL, pszExePath, sizeof(pszExePath)); + + TCHAR pszArgs[5] = TEXT("-min"); + + // Set the path to the shortcut target + psl->SetPath(pszExePath); + PathRemoveFileSpec(pszExePath); + psl->SetWorkingDirectory(pszExePath); + psl->SetShowCmd(SW_SHOWMINNOACTIVE); + psl->SetArguments(pszArgs); + + // Query IShellLink for the IPersistFile interface for + // saving the shortcut in persistent storage. + IPersistFile* ppf = NULL; + hres = psl->QueryInterface(IID_IPersistFile, + reinterpret_cast(&ppf)); + if (SUCCEEDED(hres)) + { + WCHAR pwsz[MAX_PATH]; + // Ensure that the string is ANSI. + MultiByteToWideChar(CP_ACP, 0, StartupShortcutPath().string().c_str(), -1, pwsz, MAX_PATH); + // Save the link by calling IPersistFile::Save. + hres = ppf->Save(pwsz, TRUE); + ppf->Release(); + psl->Release(); + CoUninitialize(); + return true; + } + psl->Release(); + } + CoUninitialize(); + return false; + } + return true; +} + +#elif defined(LINUX) + +// Follow the Desktop Application Autostart Spec: +// http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html + +boost::filesystem::path static GetAutostartDir() +{ + namespace fs = boost::filesystem; + + char* pszConfigHome = getenv("XDG_CONFIG_HOME"); + if (pszConfigHome) return fs::path(pszConfigHome) / "autostart"; + char* pszHome = getenv("HOME"); + if (pszHome) return fs::path(pszHome) / ".config" / "autostart"; + return fs::path(); +} + +boost::filesystem::path static GetAutostartFilePath() +{ + return GetAutostartDir() / "curecoin.desktop"; +} + +bool GetStartOnSystemStartup() +{ + boost::filesystem::ifstream optionFile(GetAutostartFilePath()); + if (!optionFile.good()) + return false; + // Scan through file for "Hidden=true": + std::string line; + while (!optionFile.eof()) + { + getline(optionFile, line); + if (line.find("Hidden") != std::string::npos && + line.find("true") != std::string::npos) + return false; + } + optionFile.close(); + + return true; +} + +bool SetStartOnSystemStartup(bool fAutoStart) +{ + if (!fAutoStart) + boost::filesystem::remove(GetAutostartFilePath()); + else + { + char pszExePath[MAX_PATH+1]; + memset(pszExePath, 0, sizeof(pszExePath)); + if (readlink("/proc/self/exe", pszExePath, sizeof(pszExePath)-1) == -1) + return false; + + boost::filesystem::create_directories(GetAutostartDir()); + + boost::filesystem::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out|std::ios_base::trunc); + if (!optionFile.good()) + return false; + // Write a curecoin.desktop file to the autostart directory: + optionFile << "[Desktop Entry]\n"; + optionFile << "Type=Application\n"; + optionFile << "Name=curecoin\n"; + optionFile << "Exec=" << pszExePath << " -min\n"; + optionFile << "Terminal=false\n"; + optionFile << "Hidden=false\n"; + optionFile.close(); + } + return true; +} +#else + +// TODO: OSX startup stuff; see: +// https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Articles/CustomLogin.html + +bool GetStartOnSystemStartup() { return false; } +bool SetStartOnSystemStartup(bool fAutoStart) { return false; } + +#endif + +HelpMessageBox::HelpMessageBox(QWidget *parent) : + QMessageBox(parent) +{ + header = tr("curecoin-Qt") + " " + tr("version") + " " + + QString::fromStdString(FormatFullVersion()) + "\n\n" + + tr("Usage:") + "\n" + + " curecoin-qt [" + tr("command-line options") + "] " + "\n"; + + coreOptions = QString::fromStdString(HelpMessage()); + + uiOptions = tr("UI options") + ":\n" + + " -lang= " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" + + " -min " + tr("Start minimized") + "\n" + + " -splash " + tr("Show splash screen on startup (default: 1)") + "\n"; + + setWindowTitle(tr("curecoin-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)); + setDetailedText(coreOptions + "\n" + uiOptions); +} + +void HelpMessageBox::printToConsole() +{ + // On other operating systems, the expected action is to print the message to the console. + QString strUsage = header + "\n" + coreOptions + "\n" + uiOptions; + fprintf(stdout, "%s", strUsage.toStdString().c_str()); +} + +void HelpMessageBox::showOrPrint() +{ +#if defined(WIN32) + // On Windows, show a message box, as there is no stderr/stdout in windowed applications + exec(); +#else + // On other operating systems, print help text to console + printToConsole(); +#endif +} + +} // namespace GUIUtil + diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h new file mode 100644 index 0000000..8f13bf0 --- /dev/null +++ b/src/qt/guiutil.h @@ -0,0 +1,120 @@ +#ifndef GUIUTIL_H +#define GUIUTIL_H + +#include +#include +#include + +QT_BEGIN_NAMESPACE +class QFont; +class QLineEdit; +class QWidget; +class QDateTime; +class QUrl; +class QAbstractItemView; +QT_END_NAMESPACE +class SendCoinsRecipient; + +/** Utility functions used by the curecoin Qt UI. + */ +namespace GUIUtil +{ + // Create human-readable string from date + QString dateTimeStr(const QDateTime &datetime); + QString dateTimeStr(qint64 nTime); + + // Render curecoin addresses in monospace font + QFont curecoinAddressFont(); + + // Set up widgets for address and amounts + void setupAddressWidget(QLineEdit *widget, QWidget *parent); + void setupAmountWidget(QLineEdit *widget, QWidget *parent); + + // Parse "curecoin:" URI into recipient object, return true on successful parsing + // See curecoin URI definition discussion here: https://bitcointalk.org/index.php?topic=33490.0 + bool parsecurecoinURI(const QUrl &uri, SendCoinsRecipient *out); + bool parsecurecoinURI(QString uri, SendCoinsRecipient *out); + + // HTML escaping for rich text controls + QString HtmlEscape(const QString& str, bool fMultiLine=false); + QString HtmlEscape(const std::string& str, bool fMultiLine=false); + + /** Copy a field of the currently selected entry of a view to the clipboard. Does nothing if nothing + is selected. + @param[in] column Data column to extract from the model + @param[in] role Data role to extract from the model + @see TransactionView::copyLabel, TransactionView::copyAmount, TransactionView::copyAddress + */ + void copyEntryData(QAbstractItemView *view, int column, int role=Qt::EditRole); + + /** Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix + when no suffix is provided by the user. + + @param[in] parent Parent window (or 0) + @param[in] caption Window caption (or empty, for default) + @param[in] dir Starting directory (or empty, to default to documents directory) + @param[in] filter Filter specification such as "Comma Separated Files (*.csv)" + @param[out] selectedSuffixOut Pointer to return the suffix (file type) that was selected (or 0). + Can be useful when choosing the save file format based on suffix. + */ + QString getSaveFileName(QWidget *parent=0, const QString &caption=QString(), + const QString &dir=QString(), const QString &filter=QString(), + QString *selectedSuffixOut=0); + + /** Get connection type to call object slot in GUI thread with invokeMethod. The call will be blocking. + + @returns If called from the GUI thread, return a Qt::DirectConnection. + If called from another thread, return a Qt::BlockingQueuedConnection. + */ + Qt::ConnectionType blockingGUIThreadConnection(); + + // Determine whether a widget is hidden behind other windows + bool isObscured(QWidget *w); + + // Open debug.log + void openDebugLogfile(); + + /** Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text + representation if needed. This assures that Qt can word-wrap long tooltip messages. + Tooltips longer than the provided size threshold (in characters) are wrapped. + */ + class ToolTipToRichTextFilter : public QObject + { + Q_OBJECT + + public: + explicit ToolTipToRichTextFilter(int size_threshold, QObject *parent = 0); + + protected: + bool eventFilter(QObject *obj, QEvent *evt); + + private: + int size_threshold; + }; + + bool GetStartOnSystemStartup(); + bool SetStartOnSystemStartup(bool fAutoStart); + + /** Help message for curecoin-Qt, shown with --help. */ + class HelpMessageBox : public QMessageBox + { + Q_OBJECT + + public: + HelpMessageBox(QWidget *parent = 0); + + /** Show message box or print help message to standard output, based on operating system. */ + void showOrPrint(); + + /** Print help message to console */ + void printToConsole(); + + private: + QString header; + QString coreOptions; + QString uiOptions; + }; + +} // namespace GUIUtil + +#endif // GUIUTIL_H diff --git a/src/qt/locale/curecoin_af_ZA.qm b/src/qt/locale/curecoin_af_ZA.qm new file mode 100644 index 0000000..62a9db3 Binary files /dev/null and b/src/qt/locale/curecoin_af_ZA.qm differ diff --git a/src/qt/locale/curecoin_af_ZA.ts b/src/qt/locale/curecoin_af_ZA.ts new file mode 100644 index 0000000..ce47378 --- /dev/null +++ b/src/qt/locale/curecoin_af_ZA.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + + + + + <b>curecoin</b> version + <b>curecoin</b> weergawe + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Adres Boek + + + + Double-click to edit address or label + Dubbel-klik om die adres of etiket te wysig + + + + Create a new address + Skep 'n nuwe adres + + + + Copy the currently selected address to the system clipboard + Maak 'n kopie van die huidige adres na die stelsel klipbord + + + + &New Address + + + + + These are your curecoin 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 curecoin address + + + + + Sign &Message + Teken &Boodskap + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &Verwyder + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + Stuur &Muntstukke + + + + Export Address Book Data + Voer die Adresboek Data Uit + + + + Comma separated file (*.csv) + + + + + Error exporting + Fout uitvoering + + + + Could not write to file %1. + Kon nie na die %1 lêer skryf nie + + + + AddressTableModel + + + Label + Etiket + + + + Address + Adres + + + + (no label) + (geen etiket) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + Tik Wagwoord in + + + + New passphrase + Nuwe wagwoord + + + + Repeat new passphrase + Herhaal nuwe wagwoord + + + + 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>. + Tik die nuwe wagwoord vir die beursie in.<br/>Gebruik asseblief 'n wagwoord van <b>ten minste 10 ewekansige karakters</b>, of <b>agt (8) of meer woorde.</b> + + + + Encrypt wallet + Enkripteer beursie + + + + This operation needs your wallet passphrase to unlock the wallet. + Hierdie operasie benodig 'n wagwoord om die beursie oop te sluit. + + + + Unlock wallet + Sluit beursie oop + + + + This operation needs your wallet passphrase to decrypt the wallet. + Hierdie operasie benodig 'n wagwoord om die beursie oop te sluit. + + + + Decrypt wallet + Sluit beursie oop + + + + Change passphrase + Verander wagwoord + + + + Enter the old and new passphrase to the wallet. + Tik asseblief die ou en nuwe wagwoord vir die beursie in. + + + + Confirm wallet encryption + Bevestig beursie enkripsie. + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</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 + Die beursie is nou bewaak + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + + + + + + + + Wallet encryption failed + Die beursie kon nie bewaak word nie + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Beursie bewaaking het misluk as gevolg van 'n interne fout. Die beursie is nie bewaak nie! + + + + + The supplied passphrases do not match. + Die wagwoord stem nie ooreen nie + + + + Wallet unlock failed + Beursie oopsluiting het misluk + + + + + + The passphrase entered for the wallet decryption was incorrect. + Die wagwoord wat ingetik was om die beursie oop te sluit, was verkeerd. + + + + Wallet decryption failed + Beursie dekripsie het misluk + + + + Wallet passphrase was successfully changed. + + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Wysig die lys van gestoorde adresse en etikette + + + + Show the list of addresses for receiving payments + Wys die lys van adresse vir die ontvangs van betalings + + + + E&xit + S&luit af + + + + Quit application + Sluit af + + + + Show information about curecoin + Wys inligting oor curecoin + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + &Opsies + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + curecoin + + + + Wallet + Beursie + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Lêer + + + + &Settings + &Instellings + + + + &Help + &Hulp + + + + Tabs toolbar + Blad nutsbalk + + + + + [testnet] + + + + + curecoin client + + + + + %n active connection(s) to curecoin network + + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + %1 agter + + + + Last received block was generated %1 ago. + Ontvangs van laaste blok is %1 terug. + + + + Transactions after this will not yet be visible. + + + + + Error + Fout + + + + Warning + + + + + Information + Informasie + + + + 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? + + + + + Up to date + + + + + Catching up... + + + + + 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 curecoin 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> + + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + 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 curecoin address. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + + + + + version + + + + + 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) + + + + + OptionsDialog + + + Options + + + + + &Main + + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + + + + + Unconfirmed: + + + + + Wallet + Beursie + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + + + + + Your current balance + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 MEC + + + + + Confirm the send action + + + + + S&end + S&tuur + + + + <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. + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Die adres waarheen die betaling gestuur moet word (b.v. 1H7wyVL5HCNoVFyyBJSDojwyxcCChU7TPA) + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a curecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + + + + + &Sign Message + &Teken boodskap + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Signature + Handtekening + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + Teken &Boodskap + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + + + + + %1/offline + + + + + %1/unconfirmed + + + + + %1 confirmations + + + + + Status + + + + + , broadcast through %n node(s) + + + + + Date + Datum + + + + Source + + + + + Generated + + + + + + From + Van + + + + + + To + Na + + + + + own address + eie adres + + + + label + etiket + + + + + + + + Credit + Krediet + + + + matures in %n more block(s) + + + + + not accepted + nie aanvaar nie + + + + + + + Debit + Debiet + + + + Transaction fee + Transaksie fooi + + + + Net amount + Netto bedrag + + + + Message + Boodskap + + + + Comment + + + + + Transaction ID + Transaksie ID + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + Bedrag + + + + true + waar + + + + false + onwaar + + + + , has not been successfully broadcast yet + + + + + Open for %n more block(s) + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + Datum + + + + Type + Tipe + + + + Address + Adres + + + + Amount + Bedrag + + + + Open for %n more block(s) + + + + + Open until %1 + + + + + Offline (%1 confirmations) + + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + + + + + Generated but not accepted + + + + + Received with + Ontvang met + + + + Received from + + + + + Sent to + Gestuur na + + + + Payment to yourself + + + + + Mined + Gemyn + + + + (n/a) + (n.v.t) + + + + Transaction status. Hover over this field to show number of confirmations. + + + + + Date and time that the transaction was received. + Datum en tyd wat die transaksie ontvang was. + + + + Type of transaction. + Tipe transaksie. + + + + Destination address of transaction. + + + + + Amount removed from or added to balance. + + + + + TransactionView + + + + All + Alles + + + + Today + Vandag + + + + This week + Hierdie week + + + + This month + Hierdie maand + + + + Last month + Verlede maand + + + + This year + Hierdie jaar + + + + Range... + + + + + Received with + Ontvang met + + + + Sent to + Gestuur na + + + + To yourself + Aan/na jouself + + + + Mined + Gemyn + + + + Other + Ander + + + + Enter address or label to search + + + + + Min amount + Min bedrag + + + + Copy address + Maak kopie van adres + + + + Copy label + + + + + Copy amount + + + + + Copy transaction ID + + + + + Edit label + + + + + Show transaction details + + + + + Export Transaction Data + + + + + Comma separated file (*.csv) + + + + + Confirmed + + + + + Date + Datum + + + + Type + Tipe + + + + Label + Etiket + + + + Address + Adres + + + + Amount + Bedrag + + + + ID + ID + + + + Error exporting + Fout uitvoering + + + + Could not write to file %1. + Kon nie na die %1 lêer skryf nie + + + + Range: + + + + + to + + + + + WalletModel + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + curecoin weergawe + + + + Usage: + Gebruik: + + + + Send command to -server or curecoind + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + Fout: Hardeskyf spasie is baie laag! + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + Informasie + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + Sisteem fout: + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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... + Laai adresse... + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + Laai blok indeks... + + + + Add a node to connect to and attempt to keep the connection open + + + + + Unable to bind to %s on this computer. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + Laai beursie... + + + + Cannot downgrade wallet + + + + + Cannot write default address + + + + + Rescanning... + + + + + Done loading + Klaar gelaai + + + + To use the %s option + + + + + Error + Fout + + + + 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/curecoin_ar.qm b/src/qt/locale/curecoin_ar.qm new file mode 100644 index 0000000..dc01053 Binary files /dev/null and b/src/qt/locale/curecoin_ar.qm differ diff --git a/src/qt/locale/curecoin_ar.ts b/src/qt/locale/curecoin_ar.ts new file mode 100644 index 0000000..ffd8337 --- /dev/null +++ b/src/qt/locale/curecoin_ar.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + عن curecoin + + + + <b>curecoin</b> version + نسخة <b>curecoin</b> + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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 curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &أمسح + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + + + + + 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 + + + + + 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 curecoinS</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 + + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + + + + + curecoinGUI + + + Sign &message... + + + + + Synchronizing with network... + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Transactions + + + + + Browse transaction history + + + + + Edit the list of stored addresses and labels + + + + + Show the list of addresses for receiving payments + + + + + E&xit + + + + + Quit application + + + + + Show information about curecoin + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + + + + + Wallet + + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + + [testnet] + + + + + curecoin client + + + + + %n active connection(s) to curecoin network + + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + + + + + Catching up... + + + + + 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 curecoin 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> + + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + 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 curecoin address. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + + curecoin-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. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + + + + + Unconfirmed: + + + + + Wallet + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + + + + + Your current balance + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 MEC + + + + + Confirm the send action + + + + + S&end + + + + + <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. + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + + + + + %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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + Open for %n more block(s) + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + + + + + Amount + + + + + Open for %n more block(s) + + + + + Open until %1 + + + + + Offline (%1 confirmations) + + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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 + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + + + + + Cannot downgrade wallet + + + + + 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/curecoin_bg.qm b/src/qt/locale/curecoin_bg.qm new file mode 100644 index 0000000..550d3b9 Binary files /dev/null and b/src/qt/locale/curecoin_bg.qm differ diff --git a/src/qt/locale/curecoin_bg.ts b/src/qt/locale/curecoin_bg.ts new file mode 100644 index 0000000..79a7099 --- /dev/null +++ b/src/qt/locale/curecoin_bg.ts @@ -0,0 +1,2922 @@ + +UTF-8 + + AboutDialog + + + About curecoin + За Биткоин + + + + <b>curecoin</b> version + <b>Биткоин</b> версия + + + + +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. + +Това е експериментален софтуер. + +Разпространява се под MIT/X11 софтуерен лиценз, виж COPYING или http://www.opensource.org/licenses/mit-license.php. + +Използван е софтуер, разработен от OpenSSL Project за употреба в OpenSSL Toolkit (http://www.openssl.org/), криптографски софтуер разработен от Eric Young (eay@cryptsoft.com) и UPnP софтуер разработен от Thomas Bernard. + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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 + Покажи &QR код + + + + Sign a message to prove you own a curecoin address + Подпишете съобщение като доказателство, че притежавате определен адрес + + + + Sign &Message + Подпиши &съобщение + + + + Delete the currently selected address from the list + Изтрий избрания адрес от списъка + + + + Export the data in the current tab to a file + Запишете данните от текущия раздел във файл + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + Проверете съобщение, за да сте сигурни че е подписано с определен Биткоин адрес + + + + &Verify Message + &Провери съобщение + + + + &Delete + &Изтрий + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Копирай &име + + + + &Edit + &Редактирай + + + + Send &Coins + + + + + Export Address Book Data + Запазване на адреси + + + + Comma separated file (*.csv) + CSV файл (*.csv) + + + + Error exporting + Грешка при записа + + + + Could not write to file %1. + Неуспешен запис в %1. + + + + AddressTableModel + + + Label + Име + + + + Address + Адрес + + + + (no label) + (без име) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + Парола + + + + New passphrase + Нова парола + + + + Repeat new passphrase + Още веднъж + + + + 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>. + Въведете нова парола за портфейла.<br/>Моля използвайте <b>поне 10 случайни символа</b> или <b>8 или повече думи</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 curecoinS</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 + Портфейлът е криптиран + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + Паролата на портфейла беше променена успешно. + + + + curecoinGUI + + + Sign &message... + Подписване на &съобщение... + + + + Synchronizing with network... + Синхронизиране с мрежата... + + + + &Overview + &Баланс + + + + Show general overview of wallet + Обобщена информация за портфейла + + + + &Transactions + &Транзакции + + + + Browse transaction history + История на входящите и изходящи транзакции + + + + Edit the list of stored addresses and labels + Редактиране на адреси + + + + Show the list of addresses for receiving payments + Списък на адресите за получаване + + + + E&xit + Из&ход + + + + Quit application + Затваря приложението + + + + Show information about curecoin + Показва информация за Биткоин + + + + About &Qt + За &Qt + + + + Show information about Qt + + + + + &Options... + &Опции... + + + + &Encrypt Wallet... + &Криптиране на портфейла... + + + + &Backup Wallet... + &Запазване на портфейла... + + + + &Change Passphrase... + &Смяна на паролата... + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + Изпращане към Биткоин адрес + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + Променя паролата за портфейла + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + &Проверка на съобщение... + + + + + curecoin + Биткоин + + + + Wallet + Портфейл + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &За Биткоин + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Файл + + + + &Settings + &Настройки + + + + &Help + &Помощ + + + + Tabs toolbar + Раздели + + + + + [testnet] + [testnet] + + + + curecoin client + + + + + %n active connection(s) to curecoin network + %n връзка към Биткоин мрежата%n връзки към Биткоин мрежата + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Синхронизиран + + + + Catching up... + Зарежда блокове... + + + + 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 curecoin 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + 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. + Вече има адрес "%1" в списъка с адреси. + + + + The entered address "%1" is not a valid curecoin address. + "%1" не е валиден Биткоин адрес. + + + + Could not unlock wallet. + Отключването на портфейла беше неуспешно. + + + + New key generation failed. + Създаването на ключ беше неуспешно. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + + + + + version + + + + + Usage: + + + + + command-line options + + + + + UI options + UI Опции + + + + 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. + + + + + Pay transaction &fee + &Такса за изходяща транзакция + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + &Пускане на Биткоин при вход в системата + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + &Мрежа + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Автоматично отваряне на входящия curecoin порт. Работи само с рутери поддържащи UPnP. + + + + Map port using &UPnP + Отваряне на входящия порт чрез &UPnP + + + + Connect to the curecoin 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) + IP адрес на прокси сървъра (например 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 curecoin. + Промяната на езика ще влезе в сила след рестартиране на Биткоин. + + + + &Unit to show amounts in: + Мерни единици: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Изберете единиците, показвани по подразбиране в интерфейса. + + + + Whether to show curecoin addresses in the transaction list or not. + Ще се показват адресите в списъка с транзакции независимо от наличието на кратко име. + + + + &Display addresses in transaction list + Показвай и адресите в списъка с транзакции + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + Прокси адресът е невалиден. + + + + OverviewPage + + + Form + Форма + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + Баланс: + + + + Unconfirmed: + Непотвърдени: + + + + Wallet + Портфейл + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Последни транзакции</b> + + + + Your current balance + Вашият текущ баланс + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Сборът на все още непотвърдените транзакции, които не са част от текущия баланс + + + + + out of sync + несинхронизиран + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + + + + + Request Payment + Изискай плащане + + + + Amount: + Сума: + + + + Label: + Име: + + + + Message: + Съобщение: + + + + &Save As... + &Запази като... + + + + Error encoding URI into QR Code. + Грешка при създаването на QR Code от URI. + + + + 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 + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + Изчисти конзолата + + + + Welcome to the curecoin RPC console. + + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Използвайте стрелки надолу и нагореза разглеждане на историятаот команди и <b>Ctrl-L</b> за изчистване на конзолата. + + + + Type <b>help</b> for an overview of available commands. + + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Изпращане + + + + Send to multiple recipients at once + Изпращане към повече от един получател + + + + Add &Recipient + Добави &получател + + + + Remove all transaction fields + Изчистване на всички полета + + + + Clear &All + &Изчисти + + + + Balance: + Баланс: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Потвърдете изпращането + + + + S&end + И&зпрати + + + + <b>%1</b> to %2 (%3) + <b>%1</b> на %2 (%3) + + + + Confirm send coins + Потвърждаване + + + + Are you sure you want to send %1? + Сигурни ли сте, че искате да изпратите %1? + + + + and + и + + + + The recipient address is not valid, please recheck. + Невалиден адрес на получателя. + + + + The amount to pay must be larger than 0. + Сумата трябва да е по-голяма от 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. + Грешка: транзакцията беше отхвърлена. Това е възможно ако част от парите в портфейла са вече похарчени, например при паралелно използване на копие на wallet.dat + + + + SendCoinsEntry + + + Form + Форма + + + + A&mount: + С&ума: + + + + Pay &To: + Плати &На: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + Въведете име за този адрес, за да го добавите в списъка с адреси + + + + &Label: + &Име: + + + + Choose address from address book + Изберете от списъка с адреси + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Вмъкни от клипборда + + + + Alt+P + Alt+P + + + + Remove this recipient + Махни този получател + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Въведете Биткоин адрес (например 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Адресът, с който ще подпишете съобщението (например 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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 + Въведете съобщението тук + + + + Signature + + + + + Copy the current signature to the system clipboard + Копиране на текущия подпис + + + + Sign the message to prove you own this curecoin address + Подпишете съобщение като доказателство, че притежавате определен адрес + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Адресът, с който е подписано съобщението (например 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Проверете съобщение, за да сте сигурни че е подписано с определен Биткоин адрес + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Въведете Биткоин адрес (например 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Натиснете "Подписване на съобщение" за да създадете подпис + + + + Enter curecoin 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. + Съобщението е потвърдено. + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Подлежи на промяна до %1 + + + + %1/offline + %1/офлайн + + + + %1/unconfirmed + %1/непотвърдени + + + + %1 confirmations + включена в %1 блока + + + + 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 + ID + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + Транзакция + + + + Inputs + + + + + Amount + Сума + + + + true + true + + + + false + false + + + + , has not been successfully broadcast yet + , все още не е изпратено + + + + Open for %n more block(s) + + + + + unknown + неизвестен + + + + TransactionDescDialog + + + Transaction details + Транзакция + + + + This pane shows a detailed description of the transaction + Описание на транзакцията + + + + TransactionTableModel + + + Date + Дата + + + + Type + Тип + + + + Address + Адрес + + + + Amount + Сума + + + + Open for %n more block(s) + + + + + Open until %1 + Подлежи на промяна до %1 + + + + Offline (%1 confirmations) + Офлайн (%1 потвърждения) + + + + Unconfirmed (%1 of %2 confirmations) + Непотвърдени (%1 от %2 потвърждения) + + + + Confirmed (%1 confirmations) + Потвърдени (%1 потвърждения) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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) + (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) + CSV файл (*.csv) + + + + Confirmed + Потвърдени + + + + Date + Дата + + + + Type + Тип + + + + Label + Име + + + + Address + Адрес + + + + Amount + Сума + + + + ID + + + + + Error exporting + Грешка при записа + + + + Could not write to file %1. + Неуспешен запис в %1. + + + + Range: + От: + + + + to + до + + + + WalletModel + + + Send Coins + Изпращане + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + Запишете данните от текущия раздел във файл + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + Биткоин версия + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + + + + + Get help for a command + + + + + Options: + Опции: + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + Невалиден -tor адрес: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin to complete + + + + + Error loading wallet.dat + + + + + Invalid -proxy address: '%s' + Невалиден -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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + Зареждане на портфейла... + + + + Cannot downgrade wallet + + + + + 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/curecoin_bs.qm b/src/qt/locale/curecoin_bs.qm new file mode 100644 index 0000000..f3a7a15 Binary files /dev/null and b/src/qt/locale/curecoin_bs.qm differ diff --git a/src/qt/locale/curecoin_bs.ts b/src/qt/locale/curecoin_bs.ts new file mode 100644 index 0000000..b47e5b5 --- /dev/null +++ b/src/qt/locale/curecoin_bs.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + O curecoinu + + + + <b>curecoin</b> version + <b>curecoin</b> verzija + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Adresar + + + + 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 curecoin 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 curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + + + + + 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 + + + + + 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 curecoinS</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 + + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + + + + + curecoinGUI + + + Sign &message... + + + + + Synchronizing with network... + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Transactions + + + + + Browse transaction history + + + + + Edit the list of stored addresses and labels + + + + + Show the list of addresses for receiving payments + + + + + E&xit + + + + + Quit application + + + + + Show information about curecoin + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + + + + + Wallet + + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + + [testnet] + + + + + curecoin client + + + + + %n active connection(s) to curecoin network + + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + + + + + Catching up... + + + + + 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 curecoin 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> + + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + 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 curecoin address. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + + curecoin-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. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + + + + + Unconfirmed: + + + + + Wallet + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + + + + + Your current balance + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 MEC + + + + + Confirm the send action + + + + + S&end + + + + + <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. + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + + + + + %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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + Open for %n more block(s) + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + + + + + Amount + + + + + Open for %n more block(s) + + + + + Open until %1 + + + + + Offline (%1 confirmations) + + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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 + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + + + + + Cannot downgrade wallet + + + + + 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/curecoin_ca.qm b/src/qt/locale/curecoin_ca.qm new file mode 100644 index 0000000..3587e7b Binary files /dev/null and b/src/qt/locale/curecoin_ca.qm differ diff --git a/src/qt/locale/curecoin_ca.ts b/src/qt/locale/curecoin_ca.ts new file mode 100644 index 0000000..dbcccf9 --- /dev/null +++ b/src/qt/locale/curecoin_ca.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + A prop de curecoin + + + + <b>curecoin</b> version + + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Llibreta d'adreçes + + + + Double-click to edit address or label + + + + + Create a new address + + + + + Copy the currently selected address to the system clipboard + Copia la selecció actual al porta-retalls del sistema + + + + &New Address + + + + + These are your curecoin 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 curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + + + + + 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 + + + + + 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 curecoinS</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 + + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + + + + + curecoinGUI + + + Sign &message... + + + + + Synchronizing with network... + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Transactions + + + + + Browse transaction history + + + + + Edit the list of stored addresses and labels + + + + + Show the list of addresses for receiving payments + + + + + E&xit + + + + + Quit application + + + + + Show information about curecoin + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + + + + + Wallet + + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + + [testnet] + + + + + curecoin client + + + + + %n active connection(s) to curecoin network + + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + + + + + Catching up... + + + + + 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 curecoin 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> + + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + 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 curecoin address. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + + curecoin-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. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + + + + + Unconfirmed: + + + + + Wallet + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + + + + + Your current balance + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 MEC + + + + + Confirm the send action + + + + + S&end + + + + + <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. + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + + + + + %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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + Open for %n more block(s) + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + + + + + Amount + + + + + Open for %n more block(s) + + + + + Open until %1 + + + + + Offline (%1 confirmations) + + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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 + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + + + + + Cannot downgrade wallet + + + + + 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/curecoin_ca_ES.qm b/src/qt/locale/curecoin_ca_ES.qm new file mode 100644 index 0000000..08af955 Binary files /dev/null and b/src/qt/locale/curecoin_ca_ES.qm differ diff --git a/src/qt/locale/curecoin_ca_ES.ts b/src/qt/locale/curecoin_ca_ES.ts new file mode 100644 index 0000000..b47d177 --- /dev/null +++ b/src/qt/locale/curecoin_ca_ES.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Sobre curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> versió + + + + +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. + \n Aquest és software experimental.\n\n Distribuït sota llicència de software MIT/11, veure l'arxiu COPYING o http://www.opensource.org/licenses/mit-license.php.\n\nAquest producte inclou software desarrollat pel projecte OpenSSL per a l'ús de OppenSSL Toolkit (http://www.openssl.org/) i de softwqre criptogràfic escrit per l'Eric Young (eay@cryptsoft.com) i software UPnP escrit per en Thomas Bernard. + + + + Copyright + Copyright + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Llibreta d'adreces + + + + 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 + + + + Copy the currently selected address to the system clipboard + Copiar l'adreça seleccionada al porta-retalls del sistema + + + + &New Address + &Nova adreça + + + + These are your curecoin 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 curecoin per a rebre pagaments. Pot interesar-te proveïr diferents adreces a cadascun dels enviadors així pots identificar qui et va pagant. + + + + &Copy Address + &Copiar adreça + + + + Show &QR Code + Mostrar codi &QR + + + + Sign a message to prove you own a curecoin address + Signa el missatge per provar que ets propietari de l'adreça curecoin + + + + Sign &Message + Signar &Missatge + + + + Delete the currently selected address from the list + Esborrar l'adreça sel·leccionada + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + Verificar un missatge per asegurar-se que ha estat signat amb una adreça curecoin específica + + + + &Verify Message + &Verificar el missatge + + + + &Delete + &Esborrar + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Aquestes són la seva adreça de curecoin per enviar els pagaments. Sempre revisi la quantitat i l'adreça del destinatari abans transferència de monedes. + + + + Copy &Label + Copiar &Etiqueta + + + + &Edit + &Editar + + + + Send &Coins + Enviar &Monedes + + + + Export Address Book Data + Exporta llibreta d'adreces + + + + Comma separated file (*.csv) + Arxiu de separació per comes (*.csv) + + + + Error exporting + Error en l'exportació + + + + Could not write to file %1. + No s'ha pogut escriure a l'arxiu %1. + + + + AddressTableModel + + + Label + Etiqueta + + + + Address + Adreça + + + + (no label) + (sense etiqueta) + + + + AskPassphraseDialog + + + Passphrase Dialog + Dialeg de contrasenya + + + + Enter passphrase + Introdueix contrasenya + + + + New passphrase + Nova contrasenya + + + + Repeat new passphrase + Repeteix la nova contrasenya + + + + 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>. + Introdueixi la nova contrasenya al moneder<br/>Si us plau useu una contrasenya de <b>10 o més caracters aleatoris</b>, o <b>vuit o més paraules</b>. + + + + Encrypt wallet + Xifrar la cartera + + + + This operation needs your wallet passphrase to unlock the wallet. + Aquesta operació requereix la seva contrasenya del moneder per a desbloquejar-lo. + + + + Unlock wallet + Desbloqueja el moneder + + + + This operation needs your wallet passphrase to decrypt the wallet. + Aquesta operació requereix la seva contrasenya del moneder per a desencriptar-lo. + + + + Decrypt wallet + Desencripta el moneder + + + + Change passphrase + Canviar la contrasenya + + + + Enter the old and new passphrase to the wallet. + Introdueixi tant l'antiga com la nova contrasenya de moneder. + + + + Confirm wallet encryption + Confirmar l'encriptació del moneder + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Advertència: Si encripteu el vostre moneder i perdeu la constrasenya, <b>PERDREU TOTS ELS VOSTRES curecoinS</b>! + + + + Are you sure you wish to encrypt your wallet? + Esteu segur que voleu encriptar el vostre moneder? + + + + 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. + + + + + Warning: The Caps Lock key is on! + Advertència: Les lletres majúscules estàn activades! + + + + + Wallet encrypted + Moneder encriptat + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin es tancarà ara per acabar el procés d'encriptació. Recorda que encriptar el teu moneder no protegeix completament els teus curecoins de ser robades per programari maliciós instal·lat al teu ordinador. + + + + + + + Wallet encryption failed + L'encriptació del moneder ha fallat + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + L'encriptació del moneder ha fallat per un error intern. El seu moneder no ha estat encriptat. + + + + + The supplied passphrases do not match. + La contrasenya introduïda no coincideix. + + + + Wallet unlock failed + El desbloqueig del moneder ha fallat + + + + + + The passphrase entered for the wallet decryption was incorrect. + La contrasenya introduïda per a desencriptar el moneder és incorrecte. + + + + Wallet decryption failed + La desencriptació del moneder ha fallat + + + + Wallet passphrase was successfully changed. + La contrasenya del moneder ha estat modificada correctament. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Edita la llista d'adreces emmagatzemada i etiquetes + + + + Show the list of addresses for receiving payments + Mostra el llistat d'adreces per rebre pagaments + + + + E&xit + S&ortir + + + + Quit application + Sortir de l'aplicació + + + + Show information about curecoin + Mostra informació sobre curecoin + + + + 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... + + + + Importing blocks from disk... + Important blocs del disc.. + + + + Reindexing blocks on disk... + Re-indexant blocs al disc... + + + + Send coins to a curecoin address + Enviar monedes a una adreça curecoin + + + + Modify configuration options for curecoin + Modificar les opcions de configuració per curecoin + + + + 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.. + + + + + curecoin + curecoin + + + + Wallet + Moneder + + + + &Send + &Enviar + + + + &Receive + &Rebre + + + + &Addresses + &Adreces + + + + &About curecoin + &Sobre curecoin + + + + &Show / Hide + &Mostrar / Amagar + + + + Show or hide the main Window + Mostrar o amagar la finestra principal + + + + Encrypt the private keys that belong to your wallet + Xifrar les claus privades pertanyents al seu moneder + + + + Sign messages with your curecoin addresses to prove you own them + Signa el missatges amb la seva adreça de curecoin per provar que les poseeixes + + + + Verify messages to ensure they were signed with specified curecoin addresses + Verificar els missatges per assegurar-te que han estat signades amb una adreça curecoin específica. + + + + &File + &Arxiu + + + + &Settings + &Configuració + + + + &Help + &Ajuda + + + + Tabs toolbar + Barra d'eines de seccions + + + + + [testnet] + [testnet] + + + + curecoin client + Client curecoin + + + + %n active connection(s) to curecoin network + %n connexió activa a la xarxa curecoin%n connexions actives a la xarxa curecoin + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Processat el %1 de %2 (estimat) dels blocs del històric de transaccions. + + + + Processed %1 blocks of transaction history. + Proccessats %1 blocs del històric de transaccions. + + + + %n hour(s) + %n hora%n hores + + + + %n day(s) + %n dia%n dies + + + + %n week(s) + %n setmana%n setmanes + + + + %1 behind + %1 radera + + + + Last received block was generated %1 ago. + Lúltim bloc rebut ha estat generat fa %1. + + + + Transactions after this will not yet be visible. + Les transaccions a partir d'això no seràn visibles. + + + + Error + Error + + + + Warning + Avís + + + + Information + Informació + + + + 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ó supera el límit de tamany. Tot i així pots enviar-la amb una comissió de %1, que es destinen als nodes que processen la seva transacció i ajuda a donar suport a la xarxa. Vols pagar la comissió? + + + + Up to date + Al dia + + + + Catching up... + Posar-se al dia ... + + + + Confirm transaction fee + Confirmar comisió de transacció + + + + 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 curecoin address or malformed URI parameters. + la URI no pot ser processada! Això es pot ser causat per una adreça curecoin invalida 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Ha tingut lloc un error fatal. curecoin no pot continuar executant-se de manera segura i es tancará. + + + + ClientModel + + + Network Alert + Alerta de xarxa + + + + EditAddressDialog + + + Edit Address + Editar Adreça + + + + &Label + &Etiqueta + + + + The label associated with this address book entry + Etiqueta associada amb aquesta entrada de la llibreta d'adreces + + + + &Address + &Direcció + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Adreça associada amb aquesta entrada de la llibreta d'adreces. Només pot ser modificat per a enviar adreces. + + + + 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 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 curecoin address. + L'adreça introduida "%1" no és una adreça curecoin valida. + + + + Could not unlock wallet. + No s'ha pogut desbloquejar el moneder. + + + + New key generation failed. + Ha fallat la generació d'una nova clau. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versió + + + + Usage: + Ús: + + + + command-line options + Opcions de la línia d'ordres + + + + UI options + Opcions de IU + + + + Set language, for example "de_DE" (default: system locale) + Definir llenguatge, per exemple "de_DE" (per defecte: Preferències locals de sistema) + + + + Start minimized + Iniciar minimitzat + + + + Show splash screen on startup (default: 1) + Mostrar finestra de benvinguda a l'inici (per defecte: 1) + + + + OptionsDialog + + + Options + Opcions + + + + &Main + &Principal + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Pagar &comisió de transacció + + + + Automatically start curecoin after logging in to the system. + Iniciar automàticament curecoin després de l'inici de sessió del sistema. + + + + &Start curecoin on system login + &Iniciar curecoin al inici de sessió del sistema. + + + + Reset all client options to default. + Reestablir totes les opcions del client. + + + + &Reset Options + &Reestablir Opcions + + + + &Network + &Xarxa + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Obrir el port del client de curecoin al router de forma automàtica. Això només funciona quan el teu router implementa UPnP i l'opció està activada. + + + + Map port using &UPnP + Port obert amb &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Connectar a la xarxa curecoin a través de un SOCKS proxy (per exemple connectant a través de Tor). + + + + &Connect through SOCKS proxy: + &Connecta a través de un proxy SOCKS: + + + + Proxy &IP: + &IP del proxy: + + + + IP address of the proxy (e.g. 127.0.0.1) + Adreça IP del proxy (per exemple 127.0.0.1) + + + + &Port: + &Port: + + + + Port of the proxy (e.g. 9050) + Port del proxy (per exemple 9050) + + + + SOCKS &Version: + &Versió de SOCKS: + + + + SOCKS version of the proxy (e.g. 5) + Versió SOCKS del proxy (per exemple 5) + + + + &Window + &Finestra + + + + Show only a tray icon after minimizing the window. + Mostrar només l'icona de la barra al minimitzar l'aplicació. + + + + &Minimize to the tray instead of the taskbar + &Minimitzar a la barra d'aplicacions + + + + 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. + Minimitza en comptes de sortir de la aplicació al tancar la finestra. Quan aquesta opció està activa, la aplicació només es tancarà al seleccionar Sortir al menú. + + + + M&inimize on close + M&inimitzar al tancar + + + + &Display + &Pantalla + + + + User Interface &language: + Llenguatge de la Interfície d'Usuari: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Aquí pots definir el llenguatge de l'aplicatiu. Aquesta configuració tindrà efecte un cop es reiniciï curecoin. + + + + &Unit to show amounts in: + &Unitats per mostrar les quantitats en: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Sel·lecciona la unitat de subdivisió per defecte per mostrar en la interficie quan s'envien monedes. + + + + Whether to show curecoin addresses in the transaction list or not. + Mostrar adreces curecoin als llistats de transaccions o no. + + + + &Display addresses in transaction list + &Mostrar adreces al llistat de transaccions + + + + &OK + &OK + + + + &Cancel + &Cancel·la + + + + &Apply + &Aplicar + + + + default + Per defecte + + + + Confirm options reset + Confirmi el reestabliment de les opcions + + + + Some settings may require a client restart to take effect. + Algunes configuracions poden requerir reiniciar el client per a que tinguin efecte. + + + + Do you want to proceed? + Vols procedir? + + + + + Warning + Avís + + + + + This setting will take effect after restarting curecoin. + Aquesta configuració tindrà efecte un cop es reiniciï curecoin. + + + + The supplied proxy address is invalid. + L'adreça proxy introduïda és invalida. + + + + OverviewPage + + + Form + Formulari + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + La informació mostrada pot no estar al día. El teu moneder es sincronitza automàticament amb la xarxa curecoin un cop s'ha establert connexió, però aquest proces no s'ha completat encara. + + + + Balance: + Balanç: + + + + Unconfirmed: + Sense confirmar: + + + + Wallet + Moneder + + + + Immature: + Immatur: + + + + Mined balance that has not yet matured + Balanç minat que encara no ha madurat + + + + <b>Recent transactions</b> + <b>Transaccions recents</b> + + + + Your current balance + El seu balanç actual + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Total de transaccions encara sense confirmar, que encara no es content en el balanç actual + + + + + out of sync + Fora de sincronia + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + No es pot iniciar curecoin: manejador clicla-per-pagar + + + + QRCodeDialog + + + QR Code Dialog + Dialeg del codi QR + + + + Request Payment + Reclamar pagament + + + + Amount: + Quantitat: + + + + Label: + Etiqueta: + + + + Message: + Missatge: + + + + &Save As... + &Desar com... + + + + Error encoding URI into QR Code. + Error codificant la URI en un codi QR. + + + + The entered amount is invalid, please check. + La quantitat introduïda és invalida, si us plau comprovi-la. + + + + Resulting URI too long, try to reduce the text for label / message. + URI resultant massa llarga, intenta reduir el text per a la etiqueta / missatge + + + + Save QR Code + Desar codi QR + + + + PNG Images (*.png) + Imatges PNG (*.png) + + + + RPCConsole + + + Client name + Nom del client + + + + + + + + + + + + + N/A + N/A + + + + Client version + Versió del client + + + + &Information + &Informació + + + + Using OpenSSL version + Utilitzant OpenSSL versió + + + + Startup time + &Temps d'inici + + + + Network + Xarxa + + + + Number of connections + Nombre de connexions + + + + On testnet + A testnet + + + + Block chain + Bloquejar cadena + + + + Current number of blocks + Nombre de blocs actuals + + + + Estimated total blocks + Total estimat de blocs + + + + Last block time + Últim temps de bloc + + + + &Open + &Obrir + + + + Command-line options + Opcions de línia d'ordres + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Mostrar el missatge d'ajuda de curecoin-Qt per a obtenir un llistat de possibles ordres per a la línia d'ordres de curecoin. + + + + &Show + &Mostrar + + + + &Console + &Consola + + + + Build date + Data de compilació + + + + curecoin - Debug window + curecoin -Finestra de debug + + + + curecoin Core + Nucli de curecoin + + + + Debug log file + Dietàri de debug + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Obrir el dietari de debug de curecoin del directori de dades actual. Aixó pot trigar uns quants segons per a dietàris grossos. + + + + Clear console + Netejar consola + + + + Welcome to the curecoin RPC console. + Benvingut a la consola RPC de curecoin + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Utilitza les fletxes d'amunt i avall per navegar per l'històric, i <b>Ctrl-L<\b> per netejar la pantalla. + + + + Type <b>help</b> for an overview of available commands. + Escriu <b>help<\b> per a obtenir una llistat de les ordres disponibles. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Enviar monedes + + + + Send to multiple recipients at once + Enviar a multiples destinataris al mateix temps + + + + Add &Recipient + Affegir &Destinatari + + + + Remove all transaction fields + Netejar tots els camps de la transacció + + + + Clear &All + Esborrar &Tot + + + + Balance: + Balanç: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Confirmi l'acció d'enviament + + + + S&end + E&nviar + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send coins + Confirmar l'enviament de monedes + + + + Are you sure you want to send %1? + Estas segur que vols enviar %1? + + + + and + i + + + + The recipient address is not valid, please recheck. + L'adreça remetent no és vàlida, si us plau comprovi-la. + + + + The amount to pay must be larger than 0. + La quantitat a pagar ha de ser major que 0. + + + + The amount exceeds your balance. + Import superi el saldo de la seva compte. + + + + The total exceeds your balance when the %1 transaction fee is included. + El total excedeix el teu balanç quan s'afegeix la comisió a la transacció %1. + + + + 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: Transaction creation failed! + Error: La ceació de la transacció ha fallat! + + + + 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 estat rebutjada. Això pot passar si alguna de les monedes del teu moneder ja s'han gastat, com si haguesis usat una copia de l'arxiu wallet.dat i s'haguessin gastat monedes de la copia però sense marcar com gastades en aquest. + + + + SendCoinsEntry + + + Form + Formulari + + + + A&mount: + Q&uantitat: + + + + Pay &To: + Pagar &A: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + La adreça a on envia el pagament (per exemple: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Escollir adreça del llibre 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 + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introdueixi una adreça de curecoin (per exemple 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Signatures .Signar/Verificar un Missatge + + + + &Sign Message + &Signar Missatge + + + + 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. + Pots signar missatges amb la teva adreça per provar que són teus. Sigues cautelòs al signar qualsevol cosa, ja que els atacs phising poden intentar confondre't per a que els hi signis amb la teva identitat. Tan sols signa als documents completament detallats amb els que hi estàs d'acord. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + La adreça amb la que signat els missatges (per exemple 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Escollir una adreça de la llibreta de direccions + + + + + Alt+A + Alta+A + + + + Paste address from clipboard + Enganxar adreça del porta-retalls + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Introdueix aqui el missatge que vols signar + + + + Signature + Signatura + + + + Copy the current signature to the system clipboard + Copiar la signatura actual al porta-retalls del sistema + + + + Sign the message to prove you own this curecoin address + Signa el missatge per provar que ets propietari d'aquesta adreça curecoin + + + + Sign &Message + Signar &Missatge + + + + Reset all sign message fields + Neteja tots els camps de clau + + + + + Clear &All + Esborrar &Tot + + + + &Verify Message + &Verificar el missatge + + + + 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. + Introdueixi l'adreça signant, missatge (assegura't que copies salts de línia, espais, tabuladors, etc excactament tot el text) i la signatura a sota per verificar el missatge. Per evitar ser enganyat per un atac home-entre-mig, vés amb compte de no llegir més en la signatura del que hi ha al missatge signat mateix. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + La adreça amb el que el missatge va ser signat (per exemple 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Verificar el missatge per assegurar-se que ha estat signat amb una adreça curecoin específica + + + + Verify &Message + Verificar &Missatge + + + + Reset all verify message fields + Neteja tots els camps de verificació de missatge + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introdueixi una adreça de curecoin (per exemple 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Clica "Signar Missatge" per a generar una signatura + + + + Enter curecoin signature + Introduïr una clau curecoin + + + + + The entered address is invalid. + L'adreça intoduïda és invàlida. + + + + + + + Please check the address and try again. + Siu us plau, comprovi l'adreça i provi de nou. + + + + + The entered address does not refer to a key. + L'adreça introduïda no referencia a cap clau. + + + + Wallet unlock was cancelled. + El desbloqueig del moneder ha estat cancelat. + + + + Private key for the entered address is not available. + La clau privada per a la adreça introduïda no està disponible. + + + + Message signing failed. + El signat del missatge ha fallat. + + + + Message signed. + Missatge signat. + + + + The signature could not be decoded. + La signatura no s'ha pogut decodificar . + + + + + Please check the signature and try again. + Su us plau, comprovi la signatura i provi de nou. + + + + The signature did not match the message digest. + La signatura no coincideix amb el resum del missatge. + + + + Message verification failed. + Ha fallat la verificació del missatge. + + + + Message verified. + Missatge verificat. + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + Obert fins %1 + + + + %1/offline + %1/offline + + + + %1/unconfirmed + %1/sense confirmar + + + + %1 confirmations + %1 confrimacions + + + + Status + Estat + + + + , broadcast through %n node(s) + , difusió a través de %n node, difusió a través de %n nodes + + + + Date + Data + + + + Source + Font + + + + Generated + Generat + + + + + From + Des de + + + + + + To + A + + + + + own address + Adreça pròpia + + + + label + etiqueta + + + + + + + + Credit + Crèdit + + + + matures in %n more block(s) + disponible en %n bloc mésdisponibles en %n blocs més + + + + not accepted + no acceptat + + + + + + + Debit + Dèbit + + + + Transaction fee + Comissió de transacció + + + + Net amount + Quantitat neta + + + + Message + Missatge + + + + Comment + Comentar + + + + Transaction ID + ID de transacció + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Les monedes generades han de madurar 120 blocs abans de poder ser gastades. Quan has generat aquest bloc, aquest ha estat transmés a la xarxa per a ser afegit a la cadena de blocs. Si no arriba a ser acceptat a la cadena, el seu estat passará a "no acceptat" i no podrá ser gastat. Això pot ocòrrer ocasionalment si un altre node genera un bloc a pocs segons del teu. + + + + Debug information + Informació de debug + + + + Transaction + Transacció + + + + Inputs + Entrades + + + + Amount + Quantitat + + + + true + cert + + + + false + fals + + + + , has not been successfully broadcast yet + , encara no ha estat emès correctement + + + + Open for %n more block(s) + Obre per %n bloc mésObre per %n blocs més + + + + unknown + desconegut + + + + TransactionDescDialog + + + Transaction details + Detall de la transacció + + + + This pane shows a detailed description of the transaction + Aquest panell mostra una descripció detallada de la transacció + + + + TransactionTableModel + + + Date + Data + + + + Type + Tipus + + + + Address + Direcció + + + + Amount + Quantitat + + + + Open for %n more block(s) + Obre per %n bloc mésObre per %n blocs més + + + + Open until %1 + Obert fins %1 + + + + Offline (%1 confirmations) + Sense connexió (%1 confirmacions) + + + + Unconfirmed (%1 of %2 confirmations) + Sense confirmar (%1 de %2 confirmacions) + + + + Confirmed (%1 confirmations) + Confirmat (%1 confirmacions) + + + + Mined balance will be available when it matures in %n more block(s) + El saldo recent minat estarà disponible quan venci el termini en %n bloc mésEl saldo recent minat estarà disponible quan venci el termini en %n blocs més + + + + This block was not received by any other nodes and will probably not be accepted! + Aquest bloc no ha estat rebut per cap altre node i probablement no serà acceptat! + + + + Generated but not accepted + Generat però no acceptat + + + + Received with + Rebut amb + + + + Received from + Rebut de + + + + Sent to + Enviat a + + + + Payment to yourself + Pagament a un mateix + + + + Mined + Minat + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Data i hora en que la transacció va ser rebuda. + + + + Type of transaction. + Tipus de transacció. + + + + Destination address of transaction. + Adreça del destinatari de la transacció. + + + + Amount removed from or added to balance. + Quantitat extreta o afegida del balanç. + + + + TransactionView + + + + All + Tot + + + + Today + Avui + + + + This week + Aquesta setmana + + + + This month + Aquest mes + + + + Last month + El mes passat + + + + This year + Enguany + + + + Range... + Rang... + + + + Received with + Rebut amb + + + + Sent to + Enviat a + + + + To yourself + A tu mateix + + + + Mined + Minat + + + + Other + Altres + + + + Enter address or label to search + Introdueix una adreça o una etiqueta per cercar + + + + Min amount + Quantitat mínima + + + + Copy address + Copiar adreça + + + + Copy label + Copiar etiqueta + + + + Copy amount + Copiar quantitat + + + + Copy transaction ID + Copiar ID de transacció + + + + Edit label + Editar etiqueta + + + + Show transaction details + Mostra detalls de la transacció + + + + Export Transaction Data + Exportar detalls de la transacció + + + + Comma separated file (*.csv) + Arxiu de separació per comes (*.csv) + + + + Confirmed + Confirmat + + + + Date + Data + + + + Type + Tipus + + + + Label + Etiqueta + + + + Address + Direcció + + + + Amount + Quantitat + + + + ID + ID + + + + Error exporting + Error en l'exportació + + + + Could not write to file %1. + No s'ha pogut escriure a l'arxiu %1. + + + + Range: + Rang: + + + + to + a + + + + WalletModel + + + Send Coins + Enviar monedes + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + Realitzar còpia de seguretat del moneder + + + + Wallet Data (*.dat) + Dades del moneder (*.dat) + + + + Backup Failed + Còpia de seguretat faillida + + + + There was an error trying to save the wallet data to the new location. + Hi ha hagut un error intentant desar les dades del moneder al nou directori + + + + Backup Successful + Copia de seguretat realitzada correctament + + + + The wallet data was successfully saved to the new location. + Les dades del moneder han estat desades cirrectament al nou emplaçament. + + + + curecoin-core + + + curecoin version + Versió de curecoin + + + + Usage: + Ús: + + + + Send command to -server or curecoind + Enviar comanda a -servidor o curecoind + + + + List commands + Llista d'ordres + + + + Get help for a command + Obtenir ajuda per a un ordre. + + + + Options: + Opcions: + + + + Specify configuration file (default: curecoin.conf) + Especificat arxiu de configuració (per defecte: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Especificar arxiu pid (per defecte: curecoind.pid) + + + + Specify data directory + Especificar directori de dades + + + + Set database cache size in megabytes (default: 25) + Establir tamany de la memoria cau en megabytes (per defecte: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Escoltar connexions a <port> (per defecte: 7951 o testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Mantenir com a molt <n> connexions a peers (per defecte: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Connectar al node per obtenir les adreces de les connexions, i desconectar + + + + Specify your own public address + Especificar la teva adreça pública + + + + Threshold for disconnecting misbehaving peers (default: 100) + Límit per a desconectar connexions errònies (per defecte: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Nombre de segons abans de reconectar amb connexions errònies (per defecte: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Ha sorgit un error al configurar el port RPC %u escoltant a IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Escoltar connexions JSON-RPC al port <port> (per defecte: 7950 o testnet:17950) + + + + Accept command line and JSON-RPC commands + Acceptar línia d'ordres i ordres JSON-RPC + + + + Run in the background as a daemon and accept commands + Executar en segon pla com a programa dimoni i acceptar ordres + + + + Use the test network + Usar la xarxa de prova + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Aceptar connexions d'afora (per defecte: 1 si no -proxy o -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s has de establir una contrasenya RPC a l'arxiu de configuració:\n%s\nEs recomana que useu la següent constrasenya aleatòria:\nrpcuser=curecoinrpc\nrpcpassword=%s\n(no necesiteu recordar aquesta contrsenya)\nEl nom d'usuari i contrasenya NO HAN de ser els mateixos.\nSi l'arxiu no existeix, crea'l amb els permisos d'arxiu de només lectura per al propietari.\nTambé es recomana establir la notificació d'alertes i així seràs notificat de les incidències;\nper exemple: alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Ha sorgit un error al configurar el port RPC %u escoltant a IPv6, retrocedint a IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Vincular a una adreça específica i sempre escoltar-hi. Utilitza la notació [host]:port per IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + No es pot bloquejar el directori de dades %s. Probablement curecoin ja estigui en execució. + + + + 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 estat rebutjada. Això pot passar si alguna de les monedes del teu moneder ja s'han gastat, com si haguesis usat una copia de l'arxiu wallet.dat i s'haguessin gastat monedes de la copia però sense marcar com gastades en aquest. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Error: Aquesta transacció requereix una comissió d'almenys %s degut al seu import, complexitat o per l'ús de fons recentment rebuts! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Executar ordre al rebre una alerta rellevant (%s al cmd es reemplaça per message) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Executar una ordre quan una transacció del moneder canviï (%s in cmd es canvia per TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Establir una mida màxima de transaccions d'alta prioritat/baixa comisió en bytes (per defecte: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Aquesta és una versió de pre-llançament - utilitza-la sota la teva responsabilitat - No usar per a minería o aplicacions de compra-venda + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Advertència: el -paytxfee és molt elevat! Aquesta és la comissió de transacció que pagaràs quan enviis una transacció. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Advertència: Les transaccions mostrades poden no ser correctes! Pot esser que necessitis actualitzar, o bé que altres nodes ho necessitin. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Advertència: Si us plau comprovi que la data i hora del seu computador siguin correctes! Si el seu rellotge està mal configurat, curecoin no funcionará de manera apropiada. + + + + 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. + + + + 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. + Advertència: L'arxiu wallet.dat és corrupte, dades rescatades! L'arxiu wallet.dat original ha estat desat com wallet.{estampa_temporal}.bak al directori %s; si el teu balanç o transaccions son incorrectes hauries de restaurar-lo de un backup. + + + + Attempt to recover private keys from a corrupt wallet.dat + Intentar recuperar les claus privades d'un arxiu wallet.dat corrupte + + + + Block creation options: + Opcions de la creació de blocs: + + + + Connect only to the specified node(s) + Connectar només al(s) node(s) especificats + + + + Corrupted block database detected + S'ha detectat una base de dades de blocs corrupta + + + + Discover own IP address (default: 1 when listening and no -externalip) + Descobrir la pròpia adreça IP (per defecte: 1 quan escoltant i no -externalip) + + + + Do you want to rebuild the block database now? + Vols reconstruir la base de dades de blocs ara? + + + + Error initializing block database + Error carregant la base de dades de blocs + + + + Error initializing wallet database environment %s! + Error inicialitzant l'entorn de la base de dades del moneder %s! + + + + Error loading block database + Error carregant la base de dades del bloc + + + + Error opening block database + Error obrint la base de dades de blocs + + + + Error: Disk space is low! + Error: Espai al disc baix! + + + + Error: Wallet locked, unable to create transaction! + Error: El moneder està blocat, no és possible crear la transacció! + + + + Error: system error: + Error: error de sistema: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Error al escoltar a qualsevol port. Utilitza -listen=0 si vols això. + + + + Failed to read block info + Ha fallat la lectura de la informació del bloc + + + + Failed to read block + Ha fallat la lectura del bloc + + + + Failed to sync block index + Ha fallat la sincronització de l'índex de bloc + + + + Failed to write block index + Ha fallat la escriptura de l'índex de blocs + + + + Failed to write block info + Ha fallat la escriptura de la informació de bloc + + + + Failed to write block + Ha fallat l'escriptura del bloc + + + + Failed to write file info + Ha fallat l'escriptura de l'arxiu info + + + + Failed to write to coin database + Ha fallat l'escriptura de la basse de dades de monedes + + + + Failed to write transaction index + Ha fallat l'escriptura de l'índex de transaccions + + + + Failed to write undo data + Ha fallat el desfer de dades + + + + Find peers using DNS lookup (default: 1 unless -connect) + Cerca punts de connexió usant rastreig de DNS (per defecte: 1 tret d'usar -connect) + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + Quants blocs s'han de confirmar a l'inici (per defecte: 288, 0 = tots) + + + + How thorough the block verification is (0-4, default: 3) + Com verificar el bloc (0-4, per defecte 3) + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + Reconstruir l'índex de la cadena de blocs dels arxius actuals blk000??.dat + + + + Set the number of threads to service RPC calls (default: 4) + Estableix el nombre de fils per atendre trucades RPC (per defecte: 4) + + + + Verifying blocks... + Verificant blocs... + + + + Verifying wallet... + Verificant moneder... + + + + Imports blocks from external blk000??.dat file + Importa blocs de un fitxer blk000??.dat extern + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + &Informació + + + + Invalid -tor address: '%s' + Adreça -tor invàlida: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + Mantenir tot l'índex de transaccions (per defecte: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Mida màxima del buffer de recepció per a cada connexió, <n>*1000 bytes (default: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Mida màxima del buffer d'enviament per a cada connexió, <n>*1000 bytes (default: 5000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Tan sols acceptar cadenes de blocs que coincideixin amb els punts de prova (per defecte: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Només connectar als nodes de la xarxa <net> (IPv4, IPv6 o Tor) + + + + Output extra debugging information. Implies all other -debug* options + Sortida de la informació extra de debugging. Implica totes les demés opcions -debug* + + + + Output extra network debugging information + Sortida de la informació extra de debugging de xarxa. + + + + Prepend debug output with timestamp + Anteposar estampa temporal a les dades de debug + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Opcions SSL: (veure la Wiki de curecoin per a instruccions de configuració SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + Selecciona la versió de socks proxy a utilitzar (4-5, per defecte: 5) + + + + Send trace/debug info to console instead of debug.log file + Enviar informació de traça/debug a la consola en comptes del arxiu debug.log + + + + Send trace/debug info to debugger + Enviar informació de traça/debug a un debugger + + + + Set maximum block size in bytes (default: 250000) + Establir una mida màxima de bloc en bytes (per defecte: 250000) + + + + Set minimum block size in bytes (default: 0) + Establir una mida mínima de bloc en bytes (per defecte: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Reduir l'arxiu debug.log al iniciar el client (per defecte 1 quan no -debug) + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Especificar el temps limit per a un intent de connexió en milisegons (per defecte: 5000) + + + + System error: + Error de sistema: + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 1 quan s'escolta) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Utilitzar proxy per arribar als serveis tor amagats (per defecte: el mateix que -proxy) + + + + Username for JSON-RPC connections + Nom d'usuari per a connexions JSON-RPC + + + + Warning + Avís + + + + Warning: This version is obsolete, upgrade required! + Advertència: Aquetsa versió està obsoleta, és necessari actualitzar! + + + + You need to rebuild the databases using -reindex to change -txindex + Necessiteu reconstruir les bases de dades usant -reindex per canviar -txindex + + + + wallet.dat corrupt, salvage failed + L'arxiu wallet.data és corrupte, el rescat de les dades ha fallat + + + + Password for JSON-RPC connections + Contrasenya per a connexions JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + Permetre connexions JSON-RPC d'adreces IP específiques + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Enviar ordre al node en execució a <ip> (per defecte: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Executar orde quan el millor bloc canviï (%s al cmd es reemplaça per un bloc de hash) + + + + Upgrade wallet to latest format + Actualitzar moneder a l'últim format + + + + Set key pool size to <n> (default: 100) + Establir límit de nombre de claus a <n> (per defecte: 100) + + + + Rescan the block chain for missing wallet transactions + Re-escanejar cadena de blocs en cerca de transaccions de moneder perdudes + + + + Use OpenSSL (https) for JSON-RPC connections + Utilitzar OpenSSL (https) per a connexions JSON-RPC + + + + Server certificate file (default: server.cert) + Arxiu del certificat de servidor (per defecte: server.cert) + + + + Server private key (default: server.pem) + Clau privada del servidor (per defecte: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Xifrats acceptats (per defecte: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Aquest misatge d'ajuda + + + + 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) + + + + Connect through socks proxy + Connectar a través de socks proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Permetre consultes DNS per a -addnode, -seednode i -connect + + + + Loading addresses... + Carregant adreces... + + + + Error loading wallet.dat: Wallet corrupted + Error carregant wallet.dat: Moneder corrupte + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Error carregant wallet.dat: El moneder requereix una versió de curecoin més moderna + + + + Wallet needed to be rewritten: restart curecoin to complete + El moneder necesita ser re-escrit: re-inicia curecoin per a completar la tasca + + + + Error loading wallet.dat + Error carregant wallet.dat + + + + Invalid -proxy address: '%s' + Adreça -proxy invalida: '%s' + + + + Unknown network specified in -onlynet: '%s' + Xarxa desconeguda especificada a -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + S'ha demanat una versió desconeguda de -socks proxy: %i + + + + Cannot resolve -bind address: '%s' + No es pot resoldre l'adreça -bind: '%s' + + + + Cannot resolve -externalip address: '%s' + No es pot resoldre l'adreça -externalip: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Quantitat invalida per a -paytxfee=<amount>: '%s' + + + + Invalid amount + Quanitat invalida + + + + Insufficient funds + Balanç insuficient + + + + Loading block index... + Carregant índex de blocs... + + + + Add a node to connect to and attempt to keep the connection open + Afegir un node per a connectar's-hi i intentar mantenir la connexió oberta + + + + Unable to bind to %s on this computer. curecoin is probably already running. + Impossible d'unir %s en aquest ordinador. Probablement curecoin ja estigui en execució. + + + + Fee per KB to add to transactions you send + Comisió a afegir per cada KB de transaccions que enviïs + + + + Loading wallet... + Carregant moneder... + + + + Cannot downgrade wallet + No es pot reduir la versió del moneder + + + + Cannot write default address + No es pot escriure l'adreça per defecte + + + + Rescanning... + Re-escanejant... + + + + Done loading + Càrrega acabada + + + + To use the %s option + Utilitza la opció %s + + + + Error + 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. + 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 diff --git a/src/qt/locale/curecoin_cs.qm b/src/qt/locale/curecoin_cs.qm new file mode 100644 index 0000000..f8b4f67 Binary files /dev/null and b/src/qt/locale/curecoin_cs.qm differ diff --git a/src/qt/locale/curecoin_cs.ts b/src/qt/locale/curecoin_cs.ts new file mode 100644 index 0000000..ac267b1 --- /dev/null +++ b/src/qt/locale/curecoin_cs.ts @@ -0,0 +1,2938 @@ + +UTF-8 + + AboutDialog + + + About curecoin + O curecoinu + + + + <b>curecoin</b> version + <b>curecoin</b> verze + + + + +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. + +Tohle je experimentální program. + +Šířen pod licencí MIT/X11, viz přiložený soubor COPYING nebo http://www.opensource.org/licenses/mit-license.php. + +Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v OpenSSL Toolkitu (http://www.openssl.org/) a kryptografický program od Erika Younga (eay@cryptsoft.com) a program UPnP od Thomase Bernarda. + + + + Copyright + Copyright + + + + Dr. Kimoto Chan + Vývojáři curecoinu + + + + AddressBookPage + + + Address Book + Adresář + + + + Double-click to edit address or label + Dvojklikem myši začneš upravovat označení adresy + + + + Create a new address + Vytvoř novou adresu + + + + Copy the currently selected address to the system clipboard + Zkopíruj aktuálně vybranou adresu do systémové schránky + + + + &New Address + Nová &adresa + + + + These are your curecoin 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. + Tohle jsou tvé curecoinové adresy pro příjem plateb. Můžeš dát pokaždé každému plátci novou adresu, abys věděl, kdo ti kdy kolik platil. + + + + &Copy Address + &Kopíruj adresu + + + + Show &QR Code + Zobraz &QR kód + + + + Sign a message to prove you own a curecoin address + Podepiš zprávu, čímž prokážeš, že jsi vlastníkem curecoinové adresy + + + + Sign &Message + Po&depiš zprávu + + + + Delete the currently selected address from the list + Smaž zvolenou adresu ze seznamu + + + + Export the data in the current tab to a file + Exportuj data z tohoto panelu do souboru + + + + &Export + &Export + + + + Verify a message to ensure it was signed with a specified curecoin address + Ověř zprávu, aby ses ujistil, že byla podepsána danou curecoinovou adresou + + + + &Verify Message + &Ověř zprávu + + + + &Delete + S&maž + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Tohle jsou tvé curecoinové adresy pro posílání plateb. Před odesláním mincí si vždy zkontroluj částku a cílovou adresu. + + + + Copy &Label + Kopíruj &označení + + + + &Edit + &Uprav + + + + Send &Coins + Pošli min&ce + + + + Export Address Book Data + Exportuj data adresáře + + + + Comma separated file (*.csv) + CSV formát (*.csv) + + + + Error exporting + Chyba při exportu + + + + Could not write to file %1. + Nemohu zapisovat do souboru %1. + + + + AddressTableModel + + + Label + Označení + + + + Address + Adresa + + + + (no label) + (bez označení) + + + + AskPassphraseDialog + + + Passphrase Dialog + Změna hesla + + + + Enter passphrase + Zadej platné heslo + + + + New passphrase + Zadej nové heslo + + + + Repeat new passphrase + Totéž heslo ještě jednou + + + + 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>. + Zadej nové heslo k peněžence.<br/>Použij <b>alespoň 10 náhodných znaků</b> nebo <b>alespoň osm slov</b>. + + + + Encrypt wallet + Zašifruj peněženku + + + + This operation needs your wallet passphrase to unlock the wallet. + K provedení této operace musíš zadat heslo k peněžence, aby se mohla odemknout. + + + + Unlock wallet + Odemkni peněženku + + + + This operation needs your wallet passphrase to decrypt the wallet. + K provedení této operace musíš zadat heslo k peněžence, aby se mohla dešifrovat. + + + + Decrypt wallet + Dešifruj peněženku + + + + Change passphrase + Změň heslo + + + + Enter the old and new passphrase to the wallet. + Zadej staré a nové heslo k peněžence. + + + + Confirm wallet encryption + Potvrď zašifrování peněženky + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Varování: Pokud si zašifruješ peněženku a ztratíš či zapomeneš heslo, <b>PŘIJDEŠ O VŠECHNY curecoinS</b>! + + + + Are you sure you wish to encrypt your wallet? + Jsi si jistý, že chceš peněženku zašifrovat? + + + + 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šechny předchozí zálohy peněženky by měly být nahrazeny nově vygenerovanou, zašifrovanou peněženkou. Z bezpečnostních důvodů budou předchozí zálohy nešifrované peněženky nepoužitelné, jakmile začneš používat novou zašifrovanou peněženku. + + + + + Warning: The Caps Lock key is on! + Upozornění: Caps Lock je zapnutý! + + + + + Wallet encrypted + Peněženka je zašifrována + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin se teď ukončí, aby dokončil zašifrování. Pamatuj však, že pouhé zašifrování peněženky úplně nezabraňuje krádeži tvých curecoinů malwarem, kterým se může počítač nakazit. + + + + + + + Wallet encryption failed + Zašifrování peněženky selhalo + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Zašifrování peněženky selhalo kvůli vnitřní chybě. Tvá peněženka tedy nebyla zašifrována. + + + + + The supplied passphrases do not match. + Zadaná hesla nejsou shodná. + + + + Wallet unlock failed + Odemčení peněženky selhalo + + + + + + The passphrase entered for the wallet decryption was incorrect. + Nezadal jsi správné heslo pro dešifrování peněženky. + + + + Wallet decryption failed + Dešifrování peněženky selhalo + + + + Wallet passphrase was successfully changed. + Heslo k peněžence bylo v pořádku změněno. + + + + curecoinGUI + + + 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í + + + + Edit the list of stored addresses and labels + Uprav seznam uložených adres a jejich označení + + + + Show the list of addresses for receiving payments + Zobraz seznam adres pro příjem plateb + + + + E&xit + &Konec + + + + Quit application + Ukonči aplikaci + + + + Show information about curecoin + Zobraz informace o curecoinu + + + + 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... + + + + Importing blocks from disk... + Importuji bloky z disku... + + + + Reindexing blocks on disk... + Vytvářím nový index bloků na disku... + + + + Send coins to a curecoin address + Pošli mince na curecoinovou adresu + + + + Modify configuration options for curecoin + Uprav nastavení curecoinu + + + + 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... + + + + + curecoin + curecoin + + + + Wallet + Peněženka + + + + &Send + &Pošli + + + + &Receive + Při&jmi + + + + &Addresses + &Adresy + + + + &About curecoin + O &curecoinu + + + + &Show / Hide + &Zobraz/Skryj + + + + Show or hide the main Window + Zobraz nebo skryj hlavní okno + + + + Encrypt the private keys that belong to your wallet + Zašifruj soukromé klíče ve své peněžence + + + + Sign messages with your curecoin addresses to prove you own them + Podepiš zprávy svými curecoinovými adresami, čímž prokážeš, že jsi jejich vlastníkem + + + + Verify messages to ensure they were signed with specified curecoin addresses + Ověř zprávy, aby ses ujistil, že byly podepsány danými curecoinovými adresami + + + + &File + &Soubor + + + + &Settings + &Nastavení + + + + &Help + Ná&pověda + + + + Tabs toolbar + Panel s listy + + + + + [testnet] + [testnet] + + + + curecoin client + curecoin klient + + + + %n active connection(s) to curecoin network + %n aktivní spojení do curecoinové sítě%n aktivní spojení do curecoinové sítě%n aktivních spojení do curecoinové sítě + + + + No block source available... + Není dostupný žádný zdroj bloků... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Zpracováno %1 z přibližně %2 bloků transakční historie. + + + + Processed %1 blocks of transaction history. + Zpracováno %1 bloků transakční historie. + + + + %n hour(s) + hodinu%n hodiny%n hodin + + + + %n day(s) + den%n dny%n dnů + + + + %n week(s) + týden%n týdny%n týdnů + + + + %1 behind + Stahuji ještě bloky transakcí za poslední %1 + + + + Last received block was generated %1 ago. + Poslední stažený blok byl vygenerován %1 zpátky. + + + + Transactions after this will not yet be visible. + Následné transakce ještě nebudou vidět. + + + + Error + Chyba + + + + Warning + Upozornění + + + + Information + Informace + + + + 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? + Tahle transakce přesahuje velikostní limit. I tak ji ale můžeš poslat, pokud za ni zaplatíš poplatek %1, který půjde uzlům, které tvou transakci zpracují, a navíc tak podpoříš síť. Chceš zaplatit poplatek? + + + + Up to date + Aktuální + + + + Catching up... + Stahuji... + + + + Confirm transaction fee + Potvrď transakční poplatek + + + + 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 + Zpracování URI + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + Nepodařilo se analyzovat URI! Důvodem může být neplatná curecoinová adresa nebo poškozené parametry URI. + + + + 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Stala se fatální chyba. curecoin nemůže bezpečně pokračovat v činnosti, a proto skončí. + + + + ClientModel + + + Network Alert + Upozornění sítě + + + + EditAddressDialog + + + Edit Address + Uprav adresu + + + + &Label + &Označení + + + + The label associated with this address book entry + Označení spojené s tímto záznamem v adresáři + + + + &Address + &Adresa + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Adresa spojená s tímto záznamem v adresáři. Lze upravovat jen pro odesílací adresy. + + + + 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 already in the address book. + Zadaná adresa "%1" už v adresáři je. + + + + The entered address "%1" is not a valid curecoin address. + Zadaná adresa "%1" není platná curecoinová adresa. + + + + Could not unlock wallet. + Nemohu odemknout peněženku. + + + + New key generation failed. + Nepodařilo se mi vygenerovat nový klíč. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + verze + + + + Usage: + Užití: + + + + command-line options + možnosti příkazové řádky + + + + UI options + Možnosti UI + + + + Set language, for example "de_DE" (default: system locale) + Nastavit jazyk, například "de_DE" (výchozí: systémové nastavení) + + + + Start minimized + Nastartovat minimalizovaně + + + + Show splash screen on startup (default: 1) + Zobrazit startovací obrazovku (výchozí: 1) + + + + OptionsDialog + + + Options + Možnosti + + + + &Main + &Hlavní + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Dobrovolný transakční poplatek za každý započatý kB dopomáhá k rychlému zpracování tvých transakcí. Většina transakcí má do 1 kB. + + + + Pay transaction &fee + Platit &transakční poplatek + + + + Automatically start curecoin after logging in to the system. + Automaticky spustí curecoin po přihlášení do systému. + + + + &Start curecoin on system login + S&pustit curecoin po přihlášení do systému + + + + Reset all client options to default. + Vrátí všechny volby na výchozí hodnoty. + + + + &Reset Options + &Obnovit nastavení + + + + &Network + &Síť + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Automaticky otevře potřebný port na routeru. Tohle funguje jen za předpokladu, že tvůj router podporuje UPnP a že je UPnP povolené. + + + + Map port using &UPnP + Namapovat port přes &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Připojí se do curecoinové sítě přes SOCKS proxy (např. když se připojuje přes Tor). + + + + &Connect through SOCKS proxy: + &Připojit přes SOCKS proxy: + + + + Proxy &IP: + &IP adresa proxy: + + + + IP address of the proxy (e.g. 127.0.0.1) + IP adresa proxy (např. 127.0.0.1) + + + + &Port: + Por&t: + + + + Port of the proxy (e.g. 9050) + Port proxy (např. 9050) + + + + SOCKS &Version: + &Verze SOCKS: + + + + SOCKS version of the proxy (e.g. 5) + Verze SOCKS proxy (např. 5) + + + + &Window + O&kno + + + + Show only a tray icon after minimizing the window. + Po minimalizaci okna zobrazí pouze ikonu v panelu. + + + + &Minimize to the tray instead of the taskbar + &Minimalizovávat do ikony v panelu + + + + 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. + Zavřením se aplikace minimalizuje. Pokud je tato volba zaškrtnuta, tak se aplikace ukončí pouze zvolením Konec v menu. + + + + M&inimize on close + Za&vřením minimalizovat + + + + &Display + Zobr&azení + + + + User Interface &language: + &Jazyk uživatelského rozhraní: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Tady lze nastavit jazyk uživatelského rozhraní. Nastavení se projeví až po restartování curecoinu. + + + + &Unit to show amounts in: + J&ednotka pro částky: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Zvol výchozí podjednotku, která se bude zobrazovat v programu a při posílání mincí. + + + + Whether to show curecoin addresses in the transaction list or not. + Zda ukazovat curecoinové adresy ve výpisu transakcí nebo ne. + + + + &Display addresses in transaction list + Ukazo&vat adresy ve výpisu transakcí + + + + &OK + &Budiž + + + + &Cancel + &Zrušit + + + + &Apply + &Uložit + + + + default + výchozí + + + + Confirm options reset + Potvrzení obnovení nastavení + + + + Some settings may require a client restart to take effect. + Některá nastavení mohou vyžadovat restart klienta, aby se mohly projevit. + + + + Do you want to proceed? + Chceš pokračovat? + + + + + Warning + Upozornění + + + + + This setting will take effect after restarting curecoin. + Nastavení se projeví až po restartování curecoinu. + + + + The supplied proxy address is invalid. + Zadaná adresa proxy je neplatná. + + + + OverviewPage + + + Form + Formulář + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Zobrazené informace nemusí být aktuální. Tvá peněženka se automaticky sesynchronizuje s curecoinovou sítí, jakmile se s ní spojí. Zatím ale ještě není synchronizace dokončena. + + + + Balance: + Stav účtu: + + + + Unconfirmed: + Nepotvrzeno: + + + + Wallet + Peněženka + + + + Immature: + Nedozráno: + + + + Mined balance that has not yet matured + Vytěžené mince, které ještě nejsou zralé + + + + <b>Recent transactions</b> + <b>Poslední transakce</b> + + + + Your current balance + Aktuální stav tvého účtu + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Celkem z transakcí, které ještě nejsou potvrzené a které se ještě nezapočítávají do celkového stavu účtu + + + + + out of sync + nesynchronizováno + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + Nemůžu spustit curecoin: obsluha click-to-pay + + + + QRCodeDialog + + + QR Code Dialog + QR kód + + + + Request Payment + Požadovat platbu + + + + Amount: + Částka: + + + + Label: + Označení: + + + + Message: + Zpráva: + + + + &Save As... + &Ulož jako... + + + + Error encoding URI into QR Code. + Chyba při kódování URI do QR kódu. + + + + The entered amount is invalid, please check. + Zadaná částka je neplatná, překontroluj ji prosím. + + + + Resulting URI too long, try to reduce the text for label / message. + Výsledná URI je příliš dlouhá, zkus zkrátit text označení / zprávy. + + + + Save QR Code + Ulož QR kód + + + + PNG Images (*.png) + PNG obrázky (*.png) + + + + RPCConsole + + + Client name + Název klienta + + + + + + + + + + + + + N/A + N/A + + + + Client version + Verze klienta + + + + &Information + &Informace + + + + Using OpenSSL version + Používaná verze OpenSSL + + + + Startup time + Čas spuštění + + + + Network + Síť + + + + Number of connections + Počet spojení + + + + On testnet + V testnetu + + + + Block chain + Řetězec bloků + + + + Current number of blocks + Aktuální počet bloků + + + + Estimated total blocks + Odhad celkového počtu bloků + + + + Last block time + Čas posledního bloku + + + + &Open + &Otevřít + + + + Command-line options + Argumenty z příkazové řádky + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Seznam parametrů curecoinu pro příkazovou řádku získáš v nápovědě curecoinu Qt. + + + + &Show + &Zobrazit + + + + &Console + &Konzole + + + + Build date + Datum kompilace + + + + curecoin - Debug window + curecoin - ladicí okno + + + + curecoin Core + Jádro curecoinu + + + + Debug log file + Soubor s ladicími záznamy + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Otevři soubor s ladicími záznamy curecoinu z aktuálního datového adresáře. U velkých logů to může pár vteřin zabrat. + + + + Clear console + Vyčistit konzoli + + + + Welcome to the curecoin RPC console. + Vítej v curecoinové RPC konzoli. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + V historii se pohybuješ šipkami nahoru a dolů a pomocí <b>Ctrl-L</b> čistíš obrazovku. + + + + Type <b>help</b> for an overview of available commands. + Napsáním <b>help</b> si vypíšeš přehled dostupných příkazů. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Pošli mince + + + + 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 + Smaž všechny transakční formuláře + + + + Clear &All + Všechno s&maž + + + + Balance: + Stav účtu: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Potvrď odeslání + + + + S&end + P&ošli + + + + <b>%1</b> to %2 (%3) + <b>%1</b> pro %2 (%3) + + + + Confirm send coins + Potvrď odeslání mincí + + + + Are you sure you want to send %1? + Jsi si jistý, že chceš poslat %1? + + + + and + a + + + + The recipient address is not valid, please recheck. + Adresa příjemce je neplatná, překontroluj ji prosím. + + + + The amount to pay must be larger than 0. + Odesílaná částka musí být větší než 0. + + + + The amount exceeds your balance. + Částka překračuje stav účtu. + + + + The total exceeds your balance when the %1 transaction fee is included. + Celková částka při připočítání poplatku %1 překročí stav účtu. + + + + 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: Transaction creation failed! + Chyba: Vytvoření transakce selhalo! + + + + 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: Transakce byla odmítnuta. Tohle může nastat, pokud nějaké mince z tvé peněženky už jednou byly utraceny, například pokud používáš kopii souboru wallet.dat a mince byly utraceny v druhé kopii, ale nebyly označeny jako utracené v této. + + + + SendCoinsEntry + + + Form + Formulář + + + + A&mount: + Čás&tka: + + + + Pay &To: + &Komu: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adresa příjemce (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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í: + + + + Choose address from address book + Vyber adresu z adresáře + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Vlož adresu ze schránky + + + + Alt+P + Alt+P + + + + Remove this recipient + Smaž tohoto příjemce + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Zadej curecoinovou adresu (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Podpisy - podepsat/ověřit zprávu + + + + &Sign Message + &Podepiš zprávu + + + + 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. + Podepsáním zprávy svými adresami můžeš prokázat, že je skutečně vlastníš. Buď opatrný a nepodepisuj nic vágního; například při phishingových útocích můžeš být lákán, abys něco takového podepsal. Podepisuj pouze zcela úplná a detailní prohlášení, se kterými souhlasíš. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adresa, kterou se zpráva podepíše (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Vyber adresu z adresáře + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Vlož adresu ze schránky + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Sem vepiš zprávu, kterou chceš podepsat + + + + Signature + Podpis + + + + Copy the current signature to the system clipboard + Zkopíruj aktuálně vybraný podpis do systémové schránky + + + + Sign the message to prove you own this curecoin address + Podepiš zprávu, čímž prokážeš, že jsi vlastníkem této curecoinové adresy + + + + Sign &Message + Po&depiš zprávu + + + + Reset all sign message fields + Vymaž všechna pole formuláře pro podepsání zrávy + + + + + Clear &All + Všechno &smaž + + + + &Verify Message + &Ověř zprávu + + + + 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. + K ověření podpisu zprávy zadej podepisující adresu, zprávu (ověř si, že správně kopíruješ zalomení řádků, mezery, tabulátory apod.) a podpis. Dávej pozor na to, abys nezkopíroval do podpisu víc, než co je v samotné podepsané zprávě, abys nebyl napálen man-in-the-middle útokem. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adresa, kterou je zpráva podepsána (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Ověř zprávu, aby ses ujistil, že byla podepsána danou curecoinovou adresou + + + + Verify &Message + O&věř zprávu + + + + Reset all verify message fields + Vymaž všechna pole formuláře pro ověření zrávy + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Zadej curecoinovou adresu (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Kliknutím na "Podepiš zprávu" vygeneruješ podpis + + + + Enter curecoin signature + Vlož curecoinový podpis + + + + + The entered address is invalid. + Zadaná adresa je neplatná. + + + + + + + Please check the address and try again. + Zkontroluj ji prosím a zkus to pak znovu. + + + + + The entered address does not refer to a key. + Zadaná adresa nepasuje ke klíči. + + + + Wallet unlock was cancelled. + Odemčení peněženky bylo zrušeno. + + + + Private key for the entered address is not available. + Soukromý klíč pro zadanou adresu není dostupný. + + + + Message signing failed. + Podepisování zprávy selhalo. + + + + Message signed. + Zpráv podepsána. + + + + The signature could not be decoded. + Podpis nejde dekódovat. + + + + + Please check the signature and try again. + Zkontroluj ho prosím a zkus to pak znovu. + + + + The signature did not match the message digest. + Podpis se neshoduje s hašem zprávy. + + + + Message verification failed. + Ověřování zprávy selhalo. + + + + Message verified. + Zpráva ověřena. + + + + SplashScreen + + + Dr. Kimoto Chan + Vývojáři curecoinu + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Otřevřeno dokud %1 + + + + %1/offline + %1/offline + + + + %1/unconfirmed + %1/nepotvrzeno + + + + %1 confirmations + %1 potvrzení + + + + Status + Stav + + + + , broadcast through %n node(s) + , rozesláno přes 1 uzel, rozesláno přes %n uzly, rozesláno přes %n uzlů + + + + Date + Datum + + + + Source + Zdroj + + + + Generated + Vygenerováno + + + + + From + Od + + + + + + To + Pro + + + + + own address + vlastní adresa + + + + label + označení + + + + + + + + Credit + Příjem + + + + matures in %n more block(s) + dozraje po jednom blokudozraje po %n blocíchdozraje po %n blocích + + + + not accepted + neakceptováno + + + + + + + Debit + Výdaj + + + + Transaction fee + Transakční poplatek + + + + Net amount + Čistá částka + + + + Message + Zpráva + + + + Comment + Komentář + + + + Transaction ID + ID transakce + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Vygenerované mince musí čekat 120 bloků, než mohou být utraceny. Když jsi vygeneroval tenhle blok, tak byl rozposlán do sítě, aby byl přidán do řetězce bloků. Pokud se mu nepodaří dostat se do řetězce, změní se na "neakceptovaný" a nepůjde utratit. To se občas může stát, pokud jiný uzel vygeneruje blok zhruba ve stejném okamžiku jako ty. + + + + Debug information + Ladicí informace + + + + Transaction + Transakce + + + + Inputs + Vstupy + + + + Amount + Částka + + + + true + true + + + + false + false + + + + , has not been successfully broadcast yet + , ještě nebylo rozesláno + + + + Open for %n more block(s) + Otevřeno pro 1 další blokOtevřeno pro %n další blokyOtevřeno pro %n dalších bloků + + + + unknown + neznámo + + + + TransactionDescDialog + + + Transaction details + Detaily transakce + + + + This pane shows a detailed description of the transaction + Toto okno zobrazuje detailní popis transakce + + + + TransactionTableModel + + + Date + Datum + + + + Type + Typ + + + + Address + Adresa + + + + Amount + Částka + + + + Open for %n more block(s) + Otevřeno pro 1 další blokOtevřeno pro %n další blokyOtevřeno pro %n dalších bloků + + + + Open until %1 + Otřevřeno dokud %1 + + + + Offline (%1 confirmations) + Offline (%1 potvrzení) + + + + Unconfirmed (%1 of %2 confirmations) + Nepotvrzeno (%1 z %2 potvrzení) + + + + Confirmed (%1 confirmations) + Potvrzeno (%1 potvrzení) + + + + Mined balance will be available when it matures in %n more block(s) + Vytěžené mince budou použitelné po dozrání, tj. po jednom blokuVytěžené mince budou použitelné po dozrání, tj. po %n blocíchVytěžené mince budou použitelné po dozrání, tj. po %n blocích + + + + This block was not received by any other nodes and will probably not be accepted! + Tento blok nedostal žádný jiný uzel a pravděpodobně nebude akceptován! + + + + Generated but not accepted + Vygenerováno, ale neakceptováno + + + + Received with + Přijato do + + + + Received from + Přijato od + + + + Sent to + Posláno na + + + + Payment to yourself + Platba sama sobě + + + + Mined + Vytěženo + + + + (n/a) + (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í. + + + + Date and time that the transaction was received. + Datum a čas přijetí transakce. + + + + Type of transaction. + Druh transakce. + + + + Destination address of transaction. + Cílová adresa transakce. + + + + Amount removed from or added to balance. + Částka odečtená z nebo přičtená k účtu. + + + + TransactionView + + + + All + Vše + + + + Today + Dnes + + + + This week + Tento týden + + + + This month + Tento měsíc + + + + Last month + Minulý měsíc + + + + This year + Letos + + + + Range... + Rozsah... + + + + Received with + Přijato + + + + Sent to + Posláno + + + + To yourself + Sám sobě + + + + Mined + Vytěženo + + + + Other + Ostatní + + + + Enter address or label to search + Zadej adresu nebo označení pro její vyhledání + + + + Min amount + Minimální částka + + + + Copy address + Kopíruj adresu + + + + Copy label + Kopíruj její označení + + + + Copy amount + Kopíruj částku + + + + Copy transaction ID + Kopíruj ID transakce + + + + Edit label + Uprav označení + + + + Show transaction details + Zobraz detaily transakce + + + + Export Transaction Data + Exportuj transakční data + + + + Comma separated file (*.csv) + CSV formát (*.csv) + + + + Confirmed + Potvrzeno + + + + Date + Datum + + + + Type + Typ + + + + Label + Označení + + + + Address + Adresa + + + + Amount + Částka + + + + ID + ID + + + + Error exporting + Chyba při exportu + + + + Could not write to file %1. + Nemohu zapisovat do souboru %1. + + + + Range: + Rozsah: + + + + to + + + + + WalletModel + + + Send Coins + Pošli mince + + + + WalletView + + + &Export + &Export + + + + Export the data in the current tab to a file + Exportuj data z tohoto panelu do souboru + + + + Backup Wallet + Záloha peněženky + + + + Wallet Data (*.dat) + Data peněženky (*.dat) + + + + Backup Failed + Zálohování selhalo + + + + There was an error trying to save the wallet data to the new location. + Při ukládání peněženky na nové místo se přihodila nějaká chyba. + + + + Backup Successful + Úspěšně zazálohováno + + + + The wallet data was successfully saved to the new location. + Data z peněženky byla v pořádku uložena na nové místo. + + + + curecoin-core + + + curecoin version + Verze curecoinu + + + + Usage: + Užití: + + + + Send command to -server or curecoind + Poslat příkaz pro -server nebo curecoind + + + + List commands + Výpis příkazů + + + + Get help for a command + Získat nápovědu pro příkaz + + + + Options: + Možnosti: + + + + Specify configuration file (default: curecoin.conf) + Konfigurační soubor (výchozí: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + PID soubor (výchozí: curecoind.pid) + + + + Specify data directory + Adresář pro data + + + + Set database cache size in megabytes (default: 25) + Nastavit velikost databázové vyrovnávací paměti v megabajtech (výchozí: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Čekat na spojení na <portu> (výchozí: 7951 nebo testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Povolit nejvýše <n> připojení k uzlům (výchozí: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Připojit se k uzlu, získat adresy jeho protějšků a odpojit se + + + + Specify your own public address + Specifikuj svou veřejnou adresu + + + + Threshold for disconnecting misbehaving peers (default: 100) + Práh pro odpojování zlobivých uzlů (výchozí: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Doba ve vteřinách, po kterou se nebudou moci zlobivé uzly znovu připojit (výchozí: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Při nastavování naslouchacího RPC portu %i pro IPv4 nastala chyba: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Čekat na JSON RPC spojení na <portu> (výchozí: 7950 nebo testnet: 17950) + + + + Accept command line and JSON-RPC commands + Akceptovat příkazy z příkazové řádky a přes JSON-RPC + + + + Run in the background as a daemon and accept commands + Běžet na pozadí jako démon a akceptovat příkazy + + + + Use the test network + Použít testovací síť (testnet) + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Přijímat spojení zvenčí (výchozí: 1, pokud není zadáno -proxy nebo -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, musíš nastavit rpcpassword v konfiguračním souboru: +%s +Je vhodné použít následující náhodné heslo: +rpcuser=curecoinrpc +rpcpassword=%s +(není potřeba si ho pamatovat) +rpcuser a rpcpassword NESMÍ být stejné. +Pokud konfigurační soubor ještě neexistuje, vytvoř ho tak, aby ho mohl číst pouze vlastník. +Je také doporučeno si nastavit alertnotify, abys byl upozorněn na případné problémy; +například: alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Při nastavování naslouchacího RPC portu %u pro IPv6 nastala chyba, vracím se k IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Poslouchat na zadané adrese. Pro zápis IPv6 adresy použij notaci [adresa]:port + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Nedaří se mi získat zámek na datový adresář %s. curecoin pravděpodobně už jednou běží. + + + + 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: Transakce byla odmítnuta! Tohle může nastat, pokud nějaké mince z tvé peněženky už jednou byly utraceny, například pokud používáš kopii souboru wallet.dat a mince byly utraceny v druhé kopii, ale nebyly označeny jako utracené v této. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Chyba: Tahle transakce vyžaduje transakční poplatek nejméně %s kvůli velikosti zasílané částky, komplexnosti nebo použití nedávno přijatých mincí! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Spustit příkaz po přijetí relevantního hlášení (%s se v příkazu nahradí za zprávu) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Spustit příkaz, když se objeví transakce týkající se peněženky (%s se v příkazu nahradí za TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Nastavit maximální velikost prioritních/nízkopoplatkových transakcí v bajtech (výchozí: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Tohle je testovací verze – používej ji jen na vlastní riziko, ale rozhodně ji nepoužívej k těžbě nebo pro obchodní aplikace + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Upozornění: -paytxfee je nastaveno velmi vysoko! Toto je transakční poplatek, který zaplatíš za každou poslanou transakci. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Upozornění: Zobrazené transakce nemusí být správné! Možná potřebuješ aktualizovat nebo ostatní uzly potřebují aktualizovat. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Upozornění: Zkontroluj, že máš v počítači správně nastavený datum a čas! Pokud jsou nastaveny špatně, curecoin nebude fungovat správně. + + + + 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é. + + + + 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. + Upozornění: soubor wallet.dat je poškozený, data jsou však zachráněna! Původní soubor wallet.dat je uložený jako wallet.{timestamp}.bak v %s. Pokud je stav tvého účtu nebo transakce nesprávné, zřejmě bys měl obnovit zálohu. + + + + Attempt to recover private keys from a corrupt wallet.dat + Pokusit se zachránit soukromé klíče z poškozeného souboru wallet.dat + + + + Block creation options: + Možnosti vytvoření bloku: + + + + Connect only to the specified node(s) + Připojit se pouze k zadanému uzlu (příp. zadaným uzlům) + + + + Corrupted block database detected + Bylo zjištěno poškození databáze bloků + + + + Discover own IP address (default: 1 when listening and no -externalip) + Zjistit vlastní IP adresu (výchozí: 1, pokud naslouchá a není zadáno -externalip) + + + + Do you want to rebuild the block database now? + Chceš přestavět databázi bloků hned teď? + + + + Error initializing block database + Chyba při zakládání databáze bloků + + + + Error initializing wallet database environment %s! + Chyba při vytváření databázového prostředí %s pro peněženku! + + + + Error loading block database + Chyba při načítání databáze bloků + + + + Error opening block database + Chyba při otevírání databáze bloků + + + + Error: Disk space is low! + Problém: Na disku je málo místa! + + + + Error: Wallet locked, unable to create transaction! + Chyba: Peněženka je zamčená, nemohu vytvořit transakci! + + + + Error: system error: + Chyba: systémová chyba: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Nepodařilo se naslouchat na žádném portu. Použij -listen=0, pokud to byl tvůj záměr. + + + + Failed to read block info + Nepodařilo se přečíst informace o bloku + + + + Failed to read block + Nepodařilo se přečíst blok + + + + Failed to sync block index + Nepodařilo se sesynchronizovat index bloků + + + + Failed to write block index + Nepodařilo se zapsat index bloků + + + + Failed to write block info + Nepodařilo se zapsat informace o bloku + + + + Failed to write block + Nepodařilo se zapsat blok + + + + Failed to write file info + Nepodařilo se zapsat informace o souboru + + + + Failed to write to coin database + Selhal zápis do databáze mincí + + + + Failed to write transaction index + Nepodařilo se zapsat index transakcí + + + + Failed to write undo data + Nepodařilo se zapsat data o vracení změn + + + + Find peers using DNS lookup (default: 1 unless -connect) + Hledat uzly přes DNS (výchozí: 1, pokud není zadáno -connect) + + + + Generate coins (default: 0) + Generovat mince (výchozí: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Kolik bloků při startu zkontrolovat (výchozí: 288, 0 = všechny) + + + + How thorough the block verification is (0-4, default: 3) + Jak moc důkladná má být verifikace bloků (0-4, výchozí: 3) + + + + Not enough file descriptors available. + Je nedostatek deskriptorů souborů. + + + + Rebuild block chain index from current blk000??.dat files + Znovu vytvořit index řetězce bloků z aktuálních blk000??.dat souborů + + + + Set the number of threads to service RPC calls (default: 4) + Nastavení počtu vláken pro servisní RPC volání (výchozí: 4) + + + + Verifying blocks... + Ověřuji bloky... + + + + Verifying wallet... + Kontroluji peněženku... + + + + Imports blocks from external blk000??.dat file + Importovat bloky z externího souboru blk000??.dat + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Nastavení počtu vláken pro verifikaci skriptů (max. 16, 0 = automaticky, <0 = nechat daný počet jader volný, výchozí: 0) + + + + Information + Informace + + + + Invalid -tor address: '%s' + Neplatná -tor adresa: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + Neplatná částka pro -minrelaytxfee=<částka>: '%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + Neplatná částka pro -mintxfee=<částka>: '%s' + + + + Maintain a full transaction index (default: 0) + Spravovat úplný index transakcí (výchozí: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maximální velikost přijímacího bufferu pro každé spojení, <n>*1000 bajtů (výchozí: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maximální velikost odesílacího bufferu pro každé spojení, <n>*1000 bajtů (výchozí: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Uznávat pouze řetěz bloků, který odpovídá vnitřním kontrolním bodům (výchozí: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Připojit se pouze k uzlům v <net> síti (IPv4, IPv6 nebo Tor) + + + + Output extra debugging information. Implies all other -debug* options + Tisknout speciální ladicí informace. Implikuje použití všech -debug* voleb + + + + Output extra network debugging information + Tisknout speciální ladicí informace o síti + + + + Prepend debug output with timestamp + Připojit před ladicí výstup časové razítko + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Možnosti SSL: (viz instrukce nastavení SSL v curecoin Wiki) + + + + Select the version of socks proxy to use (4-5, default: 5) + Zvol verzi socks proxy (4-5, výchozí: 5) + + + + Send trace/debug info to console instead of debug.log file + Posílat stopovací/ladicí informace do konzole místo do souboru debug.log + + + + Send trace/debug info to debugger + Posílat stopovací/ladicí informace do debuggeru + + + + Set maximum block size in bytes (default: 250000) + Nastavit maximální velikost bloku v bajtech (výchozí: 250000) + + + + Set minimum block size in bytes (default: 0) + Nastavit minimální velikost bloku v bajtech (výchozí: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Při spuštění klienta zmenšit soubor debug.log (výchozí: 1, pokud není zadáno -debug) + + + + Signing transaction failed + Podepisování transakce selhalo + + + + Specify connection timeout in milliseconds (default: 5000) + Zadej časový limit spojení v milisekundách (výchozí: 5000) + + + + System error: + Systémová chyba: + + + + Transaction amount too small + Částka v transakci je příliš malá + + + + Transaction amounts must be positive + Částky v transakci musí být kladné + + + + Transaction too large + Transace je příliš velká + + + + Use UPnP to map the listening port (default: 0) + Použít UPnP k namapování naslouchacího portu (výchozí: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Použít UPnP k namapování naslouchacího portu (výchozí: 1, pokud naslouchá) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Použít proxy k připojení ke skryté služby (výchozí: stejné jako -proxy) + + + + Username for JSON-RPC connections + Uživatelské jméno pro JSON-RPC spojení + + + + Warning + Upozornění + + + + Warning: This version is obsolete, upgrade required! + Upozornění: tahle verze je zastaralá, měl bys ji aktualizovat! + + + + You need to rebuild the databases using -reindex to change -txindex + Je třeba přestavět databázi použitím -reindex, aby bylo možné změnit -txindex + + + + wallet.dat corrupt, salvage failed + Soubor wallet.dat je poškozen, jeho záchrana se nezdařila + + + + Password for JSON-RPC connections + Heslo pro JSON-RPC spojení + + + + Allow JSON-RPC connections from specified IP address + Povolit JSON-RPC spojení ze specifikované IP adresy + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Posílat příkazy uzlu běžícím na <ip> (výchozí: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Spustit příkaz, když se změní nejlepší blok (%s se v příkazu nahradí hashem bloku) + + + + Upgrade wallet to latest format + Převést peněženku na nejnovější formát + + + + Set key pool size to <n> (default: 100) + Nastavit zásobník klíčů na velikost <n> (výchozí: 100) + + + + Rescan the block chain for missing wallet transactions + Přeskenovat řetězec bloků na chybějící transakce tvé pěněženky + + + + Use OpenSSL (https) for JSON-RPC connections + Použít OpenSSL (https) pro JSON-RPC spojení + + + + Server certificate file (default: server.cert) + Soubor se serverovým certifikátem (výchozí: server.cert) + + + + Server private key (default: server.pem) + Soubor se serverovým soukromým klíčem (výchozí: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Akceptovatelné šifry (výchozí: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Tato nápověda + + + + 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 + Připojit se přes socks proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Povolit DNS dotazy pro -addnode (přidání uzlu), -seednode a -connect (připojení) + + + + Loading addresses... + Načítám adresy... + + + + Error loading wallet.dat: Wallet corrupted + Chyba při načítání wallet.dat: peněženka je poškozená + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Chyba při načítání wallet.dat: peněženka vyžaduje novější verzi curecoinu + + + + Wallet needed to be rewritten: restart curecoin to complete + Soubor s peněženkou potřeboval přepsat: restartuj curecoin, aby se operace dokončila + + + + Error loading wallet.dat + Chyba při načítání wallet.dat + + + + Invalid -proxy address: '%s' + Neplatná -proxy adresa: '%s' + + + + Unknown network specified in -onlynet: '%s' + V -onlynet byla uvedena neznámá síť: '%s' + + + + Unknown -socks proxy version requested: %i + V -socks byla požadována neznámá verze proxy: %i + + + + Cannot resolve -bind address: '%s' + Nemohu přeložit -bind adresu: '%s' + + + + Cannot resolve -externalip address: '%s' + Nemohu přeložit -externalip adresu: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Neplatná částka pro -paytxfee=<částka>: '%s' + + + + Invalid amount + Neplatná částka + + + + Insufficient funds + Nedostatek prostředků + + + + Loading block index... + Načítám index bloků... + + + + 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. curecoin is probably already running. + Nedaří se mi připojit na %s na tomhle počítači. curecoin už pravděpodobně jednou běží. + + + + Fee per KB to add to transactions you send + Poplatek za kB, který se přidá ke každé odeslané transakci + + + + Loading wallet... + Načítám peněženku... + + + + Cannot downgrade wallet + Nemohu převést peněženku do staršího formátu + + + + Cannot write default address + Nemohu napsat výchozí adresu + + + + Rescanning... + Přeskenovávám... + + + + Done loading + Načítání dokončeno + + + + To use the %s option + K použití volby %s + + + + Error + Chyba + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Musíš nastavit rpcpassword=<heslo> v konfiguračním souboru: +%s +Pokud konfigurační soubor ještě neexistuje, vytvoř ho tak, aby ho mohl číst pouze vlastník. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_cy.qm b/src/qt/locale/curecoin_cy.qm new file mode 100644 index 0000000..1cf1965 Binary files /dev/null and b/src/qt/locale/curecoin_cy.qm differ diff --git a/src/qt/locale/curecoin_cy.ts b/src/qt/locale/curecoin_cy.ts new file mode 100644 index 0000000..6c9c059 --- /dev/null +++ b/src/qt/locale/curecoin_cy.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + + + + + <b>curecoin</b> version + Fersiwn <b>curecoin</b> + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Llyfr Cyfeiriadau + + + + Double-click to edit address or label + Clicio dwywaith i olygu cyfeiriad neu label + + + + Create a new address + Creu cyfeiriad newydd + + + + Copy the currently selected address to the system clipboard + Copio'r cyfeiriad sydd wedi'i ddewis i'r clipfwrdd system + + + + &New Address + + + + + These are your curecoin 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 curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &Dileu + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + + + + + Export Address Book Data + Allforio Data Llyfr Cyfeiriad + + + + Comma separated file (*.csv) + + + + + Error exporting + Gwall allforio + + + + Could not write to file %1. + Ni ellir ysgrifennu i ffeil %1. + + + + AddressTableModel + + + Label + Label + + + + Address + Cyfeiriad + + + + (no label) + (heb label) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + Teipiwch gyfrinymadrodd + + + + New passphrase + Cyfrinymadrodd newydd + + + + Repeat new passphrase + Ailadroddwch gyfrinymadrodd newydd + + + + 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>. + Dewiswch gyfrinymadrodd newydd ar gyfer y waled. <br/> Defnyddiwch cyfrinymadrodd o <b>10 neu fwy o lythyrennau hapgyrch</b>, neu <b> wyth neu fwy o eiriau. + + + + Encrypt wallet + Amgryptio'r waled + + + + This operation needs your wallet passphrase to unlock the wallet. + Mae angen i'r gweithred hon ddefnyddio'ch cyfrinymadrodd er mwyn datgloi'r waled. + + + + Unlock wallet + Datgloi'r waled + + + + This operation needs your wallet passphrase to decrypt the wallet. + Mae angen i'r gweithred hon ddefnyddio'ch cyfrinymadrodd er mwyn dadgryptio'r waled. + + + + Decrypt wallet + Dadgryptio'r waled + + + + Change passphrase + Newid cyfrinymadrodd + + + + Enter the old and new passphrase to the wallet. + Teipiwch yr hen cyfrinymadrodd a chyfrinymadrodd newydd i mewn i'r waled. + + + + Confirm wallet encryption + Cadarnau amgryptiad y waled + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</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 + Waled wedi'i amgryptio + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + + + + + + + + Wallet encryption failed + Amgryptiad waled wedi methu + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Methodd amgryptiad y waled oherwydd gwall mewnol. Ni amgryptwyd eich waled. + + + + + The supplied passphrases do not match. + Dydy'r cyfrinymadroddion a ddarparwyd ddim yn cyd-fynd â'u gilydd. + + + + Wallet unlock failed + Methodd ddatgloi'r waled + + + + + + The passphrase entered for the wallet decryption was incorrect. + + + + + Wallet decryption failed + Methodd dadgryptiad y waled + + + + Wallet passphrase was successfully changed. + + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Golygu'r rhestr o cyfeiriadau a labeli ar gadw + + + + Show the list of addresses for receiving payments + Dangos rhestr o gyfeiriadau ar gyfer derbyn taliadau + + + + E&xit + + + + + Quit application + Gadael rhaglen + + + + Show information about curecoin + Dangos gwybodaeth am curecoin + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + &Opsiynau + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + 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... + + + + + + curecoin + + + + + Wallet + + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Ffeil + + + + &Settings + &Gosodiadau + + + + &Help + &Cymorth + + + + Tabs toolbar + Bar offer tabiau + + + + + [testnet] + [testnet] + + + + curecoin client + + + + + %n active connection(s) to curecoin network + + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Cyfamserol + + + + Catching up... + Dal i fyny + + + + 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 curecoin 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 + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + EditAddressDialog + + + Edit Address + Golygu'r cyfeiriad + + + + &Label + &Label + + + + The label associated with this address book entry + Mae'r label hon yn cysylltiedig gyda'r cofnod llyfr cyfeiriad hon + + + + &Address + &Cyfeiriad + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Mae'r cyfeiriad hon yn cysylltiedig gyda'r cofnod llyfr cyfeiriad hon. Gall hyn gael ei olygu dim ond ar gyfer y pwrpas o anfon cyfeiriadau. + + + + 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 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 curecoin address. + + + + + Could not unlock wallet. + Methodd ddatgloi'r waled. + + + + New key generation failed. + Methodd gynhyrchu allwedd newydd. + + + + GUIUtil::HelpMessageBox + + + + curecoin-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 + Opsiynau + + + + &Main + + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + Ffurflen + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + Gweddill: + + + + Unconfirmed: + Nas cadarnheir: + + + + Wallet + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Trafodion diweddar</b> + + + + Your current balance + Eich gweddill presennol + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Cyfanswm o drafodion sydd heb eu cadarnhau a heb eu cyfri tuag at y gweddill presennol + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + Anfon arian + + + + Send to multiple recipients at once + Anfon at pobl lluosog ar yr un pryd + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + Gweddill: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Cadarnhau'r gweithrediad anfon + + + + S&end + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send coins + + + + + Are you sure you want to send %1? + Ydych chi'n siwr eich bod chi eisiau anfon %1? + + + + and + a + + + + 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. + + + + + SendCoinsEntry + + + Form + Ffurflen + + + + A&mount: + &Maint + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + &Label: + + + + 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 + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Gludo cyfeiriad o'r glipfwrdd + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + Agor tan %1 + + + + %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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + Open for %n more block(s) + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + Cyfeiriad + + + + Amount + + + + + Open for %n more block(s) + + + + + Open until %1 + Agor tan %1 + + + + Offline (%1 confirmations) + + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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 + Label + + + + Address + Cyfeiriad + + + + Amount + + + + + ID + + + + + Error exporting + Gwall allforio + + + + Could not write to file %1. + Ni ellir ysgrifennu i ffeil %1. + + + + Range: + + + + + to + + + + + WalletModel + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + + + + + Cannot downgrade wallet + + + + + 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/curecoin_da.qm b/src/qt/locale/curecoin_da.qm new file mode 100644 index 0000000..c14d6cb Binary files /dev/null and b/src/qt/locale/curecoin_da.qm differ diff --git a/src/qt/locale/curecoin_da.ts b/src/qt/locale/curecoin_da.ts new file mode 100644 index 0000000..6a5aee0 --- /dev/null +++ b/src/qt/locale/curecoin_da.ts @@ -0,0 +1,2938 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Om curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> version + + + + +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. + +Dette program er ekperimentielt. + +Det er gjort tilgængeligt under MIT/X11-softwarelicensen. Se den tilhørende fil "COPYING" eller http://www.opensource.org/licenses/mit-license.php. + +Produktet indeholder software som er udviklet af OpenSSL Project til brug i OpenSSL Toolkit (http://www.openssl.org/), kryptografisk software skrevet af Eric Young (eay@cryptsoft.com) og UPnP-software skrevet af Thomas Bernard. + + + + Copyright + Copyright + + + + Dr. Kimoto Chan + curecoin-udviklerne + + + + AddressBookPage + + + Address Book + Adressebog + + + + Double-click to edit address or label + Dobbeltklik for at redigere adresse eller mærkat + + + + Create a new address + Opret en ny adresse + + + + Copy the currently selected address to the system clipboard + Kopier den valgte adresse til systemets udklipsholder + + + + &New Address + Ny adresse + + + + These are your curecoin 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 curecoin-adresser til at modtage betalinger med. Du kan give en forskellig adresse til hver afsender, så du kan holde styr på, hvem der betaler dig. + + + + &Copy Address + Kopier adresse + + + + Show &QR Code + Vis QR-kode + + + + Sign a message to prove you own a curecoin address + Underskriv en besked for at bevise, at en curecoin-adresse tilhører dig + + + + Sign &Message + Underskriv besked + + + + Delete the currently selected address from the list + Slet den markerede adresse fra listen + + + + Export the data in the current tab to a file + Eksportér den aktuelle visning til en fil + + + + &Export + Eksporter + + + + Verify a message to ensure it was signed with a specified curecoin address + Efterprøv en besked for at sikre, at den er underskrevet med den angivne curecoin-adresse + + + + &Verify Message + Efterprøv besked + + + + &Delete + Slet + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Disse er dine curecoin-adresser for at sende betalinger. Tjek altid beløb og modtageradresse, inden du sender curecoins. + + + + Copy &Label + Kopier mærkat + + + + &Edit + Rediger + + + + Send &Coins + Send curecoins + + + + Export Address Book Data + Eksporter adressebogsdata + + + + Comma separated file (*.csv) + Kommasepareret fil (*.csv) + + + + Error exporting + Fejl under eksport + + + + Could not write to file %1. + Kunne ikke skrive til filen %1. + + + + AddressTableModel + + + Label + Mærkat + + + + Address + Adresse + + + + (no label) + (ingen mærkat) + + + + AskPassphraseDialog + + + Passphrase Dialog + Adgangskodedialog + + + + Enter passphrase + Indtast adgangskode + + + + New passphrase + Ny adgangskode + + + + Repeat new passphrase + Gentag ny adgangskode + + + + 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>. + Indtast den nye adgangskode til tegnebogen.<br/>Brug venligst en adgangskode på <b>10 eller flere tilfældige tegn</b> eller <b>otte eller flere ord</b>. + + + + Encrypt wallet + Krypter tegnebog + + + + This operation needs your wallet passphrase to unlock the wallet. + Denne funktion har brug for din tegnebogs adgangskode for at låse tegnebogen op. + + + + Unlock wallet + Lås tegnebog op + + + + This operation needs your wallet passphrase to decrypt the wallet. + Denne funktion har brug for din tegnebogs adgangskode for at dekryptere tegnebogen. + + + + Decrypt wallet + Dekrypter tegnebog + + + + Change passphrase + Skift adgangskode + + + + Enter the old and new passphrase to the wallet. + Indtast den gamle og den nye adgangskode til tegnebogen. + + + + Confirm wallet encryption + Bekræft tegnebogskryptering + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Advarsel: Hvis du krypterer din tegnebog og mister din adgangskode, vil du <b>MISTE ALLE DINE curecoinS</b>! + + + + Are you sure you wish to encrypt your wallet? + Er du sikker på, at du ønsker at kryptere din tegnebog? + + + + 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. + + + + + Warning: The Caps Lock key is on! + Advarsel: Caps Lock-tasten er aktiveret! + + + + + Wallet encrypted + Tegnebog krypteret + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin vil nu lukke for at gennemføre krypteringsprocessen. Husk på, at kryptering af din tegnebog vil ikke beskytte dine curecoins fuldt ud mod at blive stjålet af malware på din computer. + + + + + + + Wallet encryption failed + Tegnebogskryptering mislykkedes + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Tegnebogskryptering mislykkedes på grund af en intern fejl. Din tegnebog blev ikke krypteret. + + + + + The supplied passphrases do not match. + De angivne adgangskoder stemmer ikke overens. + + + + Wallet unlock failed + Tegnebogsoplåsning mislykkedes + + + + + + The passphrase entered for the wallet decryption was incorrect. + Den angivne adgangskode for tegnebogsdekrypteringen er forkert. + + + + Wallet decryption failed + Tegnebogsdekryptering mislykkedes + + + + Wallet passphrase was successfully changed. + Tegnebogens adgangskode blev ændret. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Rediger listen over gemte adresser og mærkater + + + + Show the list of addresses for receiving payments + Vis listen over adresser for at modtage betalinger + + + + E&xit + Luk + + + + Quit application + Afslut program + + + + Show information about curecoin + Vis informationer om curecoin + + + + 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... + + + + Importing blocks from disk... + Importerer blokke fra disken... + + + + Reindexing blocks on disk... + Genindekserer blokke på disken... + + + + Send coins to a curecoin address + Send curecoins til en curecoin-adresse + + + + Modify configuration options for curecoin + Rediger konfigurationsindstillinger af curecoin + + + + 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... + Efterprøv besked... + + + + + curecoin + curecoin + + + + Wallet + Tegnebog + + + + &Send + Send + + + + &Receive + Modtag + + + + &Addresses + Adresser + + + + &About curecoin + Om curecoin + + + + &Show / Hide + Vis/skjul + + + + Show or hide the main Window + Vis eller skjul hovedvinduet + + + + Encrypt the private keys that belong to your wallet + Krypter de private nøgler, der hører til din tegnebog + + + + Sign messages with your curecoin addresses to prove you own them + Underskriv beskeder med dine curecoin-adresser for at bevise, at de tilhører dig + + + + Verify messages to ensure they were signed with specified curecoin addresses + Efterprøv beskeder for at sikre, at de er underskrevet med de(n) angivne curecoin-adresse(r) + + + + &File + Fil + + + + &Settings + Indstillinger + + + + &Help + Hjælp + + + + Tabs toolbar + Faneværktøjslinje + + + + + [testnet] + [testnetværk] + + + + curecoin client + curecoin-klient + + + + %n active connection(s) to curecoin network + %n aktiv(e) forbindelse(r) til curecoin-netværket%n aktiv(e) forbindelse(r) til curecoin-netværket + + + + No block source available... + Ingen blokkilde tilgængelig... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + %1 ud af %2 (estimeret) blokke af transaktionshistorikken er blevet behandlet. + + + + Processed %1 blocks of transaction history. + %1 blokke af transaktionshistorikken er blevet behandlet. + + + + %n hour(s) + %n time(r)%n time(r) + + + + %n day(s) + %n dag(e)%n dag(e) + + + + %n week(s) + %n uge(r)%n uge(r) + + + + %1 behind + %1 bagefter + + + + Last received block was generated %1 ago. + Senest modtagne blok blev genereret for %1 siden. + + + + Transactions after this will not yet be visible. + Transaktioner herefter vil endnu ikke være synlige. + + + + Error + Fejl + + + + Warning + Advarsel + + + + Information + Information + + + + 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? + Transaktionen overskrider størrelsesgrænsen. Du kan stadig sende den for et gebyr på %1, hvilket går til de knuder, der behandler din transaktion og hjælper med at understøtte netværket. Vil du betale gebyret? + + + + Up to date + Opdateret + + + + Catching up... + Indhenter... + + + + 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 curecoin address or malformed URI parameters. + URI kan ikke fortolkes! Dette kan skyldes en ugyldig curecoin-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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Der opstod en fatal fejl. curecoin kan ikke længere fortsætte sikkert og vil afslutte. + + + + ClientModel + + + Network Alert + Netværksadvarsel + + + + EditAddressDialog + + + Edit Address + Rediger adresse + + + + &Label + Mærkat + + + + The label associated with this address book entry + Mærkaten forbundet med denne post i adressebogen + + + + &Address + Adresse + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Adressen tilknyttet til denne post i adressebogen. Dette kan kun ændres for afsendelsesadresser. + + + + 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 already in the address book. + Den indtastede adresse "%1" er allerede i adressebogen. + + + + The entered address "%1" is not a valid curecoin address. + Den indtastede adresse "%1" er ikke en gyldig curecoin-adresse. + + + + Could not unlock wallet. + Kunne ikke låse tegnebog op. + + + + New key generation failed. + Ny nøglegenerering mislykkedes. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + version + + + + Usage: + Anvendelse: + + + + command-line options + kommandolinjetilvalg + + + + UI options + Brugergrænsefladeindstillinger + + + + Set language, for example "de_DE" (default: system locale) + Angiv sprog, f.eks "de_DE" (standard: systemlokalitet) + + + + Start minimized + Start minimeret + + + + Show splash screen on startup (default: 1) + Vis opstartsbillede ved start (standard: 1) + + + + OptionsDialog + + + Options + Indstillinger + + + + &Main + Generelt + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Valgfrit transaktionsgebyr pr. kB, der hjælper dine transaktioner med at blive behandlet hurtigt. De fleste transaktioner er på 1 kB. + + + + Pay transaction &fee + Betal transaktionsgebyr + + + + Automatically start curecoin after logging in to the system. + Start curecoin automatisk, når der logges ind på systemet + + + + &Start curecoin on system login + Start curecoin, når systemet startes + + + + Reset all client options to default. + Nulstil alle klientindstillinger til deres standard. + + + + &Reset Options + Nulstil indstillinger + + + + &Network + Netværk + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Åbn curecoin-klientens port på routeren automatisk. Dette virker kun, når din router understøtter UPnP og UPnP er aktiveret. + + + + Map port using &UPnP + Konfigurer port vha. UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Opret forbindelse til curecoin-netværket via en SOCKS-proxy (f.eks. ved tilslutning gennem Tor) + + + + &Connect through SOCKS proxy: + Forbind gennem SOCKS-proxy: + + + + Proxy &IP: + Proxy-IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + IP-adressen på proxyen (f.eks. 127.0.0.1) + + + + &Port: + Port: + + + + Port of the proxy (e.g. 9050) + Porten på proxyen (f.eks. 9050) + + + + SOCKS &Version: + SOCKS-version + + + + SOCKS version of the proxy (e.g. 5) + SOCKS-version af proxyen (f.eks. 5) + + + + &Window + Vindue + + + + Show only a tray icon after minimizing the window. + Vis kun et statusikon efter minimering af vinduet. + + + + &Minimize to the tray instead of the taskbar + Minimer til statusfeltet i stedet for proceslinjen + + + + 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. + Minimer i stedet for at afslutte programmet, når vinduet lukkes. Når denne indstilling er valgt, vil programmet kun blive lukket, når du har valgt Afslut i menuen. + + + + M&inimize on close + Minimer ved lukning + + + + &Display + Visning + + + + User Interface &language: + Brugergrænsefladesprog: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Brugergrænsefladesproget kan angives her. Denne indstilling træder først i kraft, når curecoin genstartes. + + + + &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 curecoins. + + + + Whether to show curecoin addresses in the transaction list or not. + Afgør hvorvidt curecoin-adresser skal vises i transaktionslisten eller ej. + + + + &Display addresses in transaction list + Vis adresser i transaktionsliste + + + + &OK + OK + + + + &Cancel + Annuller + + + + &Apply + Anvend + + + + default + standard + + + + Confirm options reset + Bekræft nulstilling af indstillinger + + + + Some settings may require a client restart to take effect. + Nogle indstillinger kan kræve, at klienten genstartes, før de træder i kraft. + + + + Do you want to proceed? + Ønsker du at fortsætte? + + + + + Warning + Advarsel + + + + + This setting will take effect after restarting curecoin. + Denne indstilling træder i kraft, efter curecoin genstartes. + + + + The supplied proxy address is invalid. + Ugyldig proxy-adresse + + + + OverviewPage + + + Form + Formular + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Den viste information kan være forældet. Din tegnebog synkroniserer automatisk med curecoin-netværket, når en forbindelse etableres, men denne proces er ikke gennemført endnu. + + + + Balance: + Saldo: + + + + Unconfirmed: + Ubekræftede: + + + + Wallet + Tegnebog + + + + Immature: + Umodne: + + + + Mined balance that has not yet matured + Udvunden saldo, som endnu ikke er modnet + + + + <b>Recent transactions</b> + <b>Nyeste transaktioner</b> + + + + Your current balance + Din nuværende saldo + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Summen af transaktioner, der endnu ikke er bekræftet og endnu ikke er inkluderet i den nuværende saldo + + + + + out of sync + ikke synkroniseret + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + Kan ikke starte curecoin: click-to-pay-håndtering + + + + QRCodeDialog + + + QR Code Dialog + QR-kode-dialog + + + + Request Payment + Anmod om betaling + + + + Amount: + Beløb: + + + + Label: + Mærkat: + + + + Message: + Besked: + + + + &Save As... + Gem som... + + + + Error encoding URI into QR Code. + Fejl ved kodning fra URI til QR-kode + + + + The entered amount is invalid, please check. + Det indtastede beløb er ugyldig, tjek venligst. + + + + Resulting URI too long, try to reduce the text for label / message. + Resulterende URI var for lang; prøv at forkorte teksten til mærkaten/beskeden. + + + + Save QR Code + Gem QR-kode + + + + PNG Images (*.png) + PNG-billeder (*.png) + + + + RPCConsole + + + Client name + Klientnavn + + + + + + + + + + + + + N/A + N/A + + + + Client version + Klientversion + + + + &Information + Information + + + + Using OpenSSL version + Anvendt OpenSSL-version + + + + Startup time + Opstartstid + + + + Network + Netværk + + + + Number of connections + Antal forbindelser + + + + On testnet + Tilsluttet testnetværk + + + + Block chain + Blokkæde + + + + Current number of blocks + Nuværende antal blokke + + + + Estimated total blocks + Estimeret antal blokke + + + + Last block time + Tidsstempel for seneste blok + + + + &Open + Åbn + + + + Command-line options + Kommandolinjetilvalg + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Vis curecoin-Qt-hjælpebeskeden for at få en liste over de tilgængelige curecoin-kommandolinjeindstillinger. + + + + &Show + Vis + + + + &Console + Konsol + + + + Build date + Byggedato + + + + curecoin - Debug window + curecoin - Fejlsøgningsvindue + + + + curecoin Core + curecoin Core + + + + Debug log file + Fejlsøgningslogfil + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Åbn curecoin-fejlsøgningslogfilen fra det nuværende datakatalog. Dette kan tage nogle få sekunder for en store logfiler. + + + + Clear console + Ryd konsol + + + + Welcome to the curecoin RPC console. + Velkommen til curecoin RPC-konsollen + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Brug op og ned-piletasterne til at navigere historikken og <b>Ctrl-L</b> til at rydde skærmen. + + + + Type <b>help</b> for an overview of available commands. + Tast <b>help</b> for en oversigt over de tilgængelige kommandoer. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Send curecoins + + + + Send to multiple recipients at once + Send til flere modtagere på en gang + + + + Add &Recipient + Tilføj modtager + + + + Remove all transaction fields + Fjern alle transaktionsfelter + + + + Clear &All + Ryd alle + + + + Balance: + Saldo: + + + + 123.456 MEC + 123,456 MEC + + + + Confirm the send action + Bekræft afsendelsen + + + + S&end + Afsend + + + + <b>%1</b> to %2 (%3) + <b>%1</b> til %2 (%3) + + + + Confirm send coins + Bekræft afsendelse af curecoins + + + + Are you sure you want to send %1? + Er du sikker på, at du vil sende %1? + + + + and + og + + + + The recipient address is not valid, please recheck. + Modtagerens adresse er ikke gyldig. Tjek venligst adressen igen. + + + + The amount to pay must be larger than 0. + Beløbet til betaling skal være større end 0. + + + + The amount exceeds your balance. + Beløbet overstiger din saldo. + + + + The total exceeds your balance when the %1 transaction fee is included. + Totalen overstiger din saldo, når %1 transaktionsgebyr er inkluderet. + + + + 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: Transaction creation failed! + Fejl: Oprettelse af transaktionen mislykkedes! + + + + 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 dine curecoins i din tegnebog allerede er brugt, som hvis du brugte en kopi af wallet.dat og dine curecoins er blevet brugt i kopien, men ikke er markeret som brugt her. + + + + SendCoinsEntry + + + Form + Formular + + + + A&mount: + Beløb: + + + + Pay &To: + Betal til: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + curecoin-adressen som betalingen skal sendes til (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Vælg adresse fra adressebog + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Indsæt adresse fra udklipsholderen + + + + Alt+P + Alt+P + + + + Remove this recipient + Fjern denne modtager + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Indtast en curecoin-adresse (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Underskrifter - Underskriv/efterprøv en besked + + + + &Sign Message + Underskriv besked + + + + 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 curecoin-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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + curecoin-adressen som beskeden skal underskrives med (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Vælg adresse fra adressebog + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Indsæt adresse fra udklipsholderen + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Indtast beskeden, du ønsker at underskrive + + + + Signature + Underskrift + + + + Copy the current signature to the system clipboard + Kopier den nuværende underskrift til systemets udklipsholder + + + + Sign the message to prove you own this curecoin address + Underskriv denne besked for at bevise, at curecoin-adressen tilhører dig + + + + Sign &Message + Underskriv besked + + + + Reset all sign message fields + Nulstil alle underskriv besked-indtastningsfelter + + + + + Clear &All + Ryd alle + + + + &Verify Message + Efterprøv besked + + + + 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. + Indtast den underskrevne adresse, beskeden (inkluder linjeskift, mellemrum mv. nøjagtigt, som de fremgår) og underskriften for at efterprøve beskeden. Vær forsigtig med ikke at lægge mere i underskriften end besked selv, så du undgår at blive narret af et man-in-the-middle-angreb. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + curecoin-adressen som beskeden er underskrevet med (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Efterprøv beskeden for at sikre, at den er underskrevet med den angivne curecoin-adresse + + + + Verify &Message + Efterprøv besked + + + + Reset all verify message fields + Nulstil alle efterprøv besked-indtastningsfelter + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Indtast en curecoin-adresse (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Klik "Underskriv besked" for at generere underskriften + + + + Enter curecoin signature + Indtast curecoin-underskriften + + + + + The entered address is invalid. + Den indtastede adresse er ugyldig. + + + + + + + Please check the address and try again. + Tjek venligst adressen, og forsøg igen. + + + + + The entered address does not refer to a key. + Den indtastede adresse henviser ikke til en nøgle. + + + + Wallet unlock was cancelled. + Tegnebogsoplåsning annulleret. + + + + Private key for the entered address is not available. + Den private nøgle for den indtastede adresse er ikke tilgængelig. + + + + Message signing failed. + Underskrivning af besked mislykkedes. + + + + Message signed. + Besked underskrevet. + + + + The signature could not be decoded. + Underskriften kunne ikke afkodes. + + + + + Please check the signature and try again. + Tjek venligst underskriften, og forsøg igen. + + + + The signature did not match the message digest. + Underskriften matcher ikke beskedens indhold. + + + + Message verification failed. + Efterprøvelse af besked mislykkedes. + + + + Message verified. + Besked efterprøvet. + + + + SplashScreen + + + Dr. Kimoto Chan + curecoin-udviklerne + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Åben indtil %1 + + + + %1/offline + %1/offline + + + + %1/unconfirmed + %1/ubekræftet + + + + %1 confirmations + %1 bekræftelser + + + + Status + Status + + + + , broadcast through %n node(s) + , transmitteret igennem %n knude(r), transmitteret igennem %n knude(r) + + + + Date + Dato + + + + Source + Kilde + + + + Generated + Genereret + + + + + From + Fra + + + + + + To + Til + + + + + own address + egen adresse + + + + label + mærkat + + + + + + + + Credit + Kredit + + + + matures in %n more block(s) + modner efter yderligere %n blok(ke)modner efter yderligere %n blok(ke) + + + + not accepted + ikke accepteret + + + + + + + Debit + Debet + + + + Transaction fee + Transaktionsgebyr + + + + Net amount + Nettobeløb + + + + Message + Besked + + + + Comment + Kommentar + + + + Transaction ID + Transaktionens ID + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Genererede curecoins skal vente 120 blokke, før de kan blive brugt. Da du genererede denne blok, blev den transmitteret til netværket for at blive føjet til blokkæden. Hvis det mislykkes at komme ind i kæden, vil den skifte til "ikke godkendt" og ikke blive kunne bruges. Dette kan lejlighedsvis ske, hvis en anden knude genererer en blok inden for få sekunder af din. + + + + Debug information + Fejlsøgningsinformation + + + + Transaction + Transaktion + + + + Inputs + Input + + + + Amount + Beløb + + + + true + sand + + + + false + falsk + + + + , has not been successfully broadcast yet + , er ikke blevet transmitteret endnu + + + + Open for %n more block(s) + Åben %n blok yderligereÅben %n blokke yderligere + + + + unknown + ukendt + + + + TransactionDescDialog + + + Transaction details + Transaktionsdetaljer + + + + This pane shows a detailed description of the transaction + Denne rude viser en detaljeret beskrivelse af transaktionen + + + + TransactionTableModel + + + Date + Dato + + + + Type + Type + + + + Address + Adresse + + + + Amount + Beløb + + + + Open for %n more block(s) + Åben %n blok(ke) yderligereÅben %n blok(ke) yderligere + + + + Open until %1 + Åben indtil %1 + + + + Offline (%1 confirmations) + Offline (%1 bekræftelser) + + + + Unconfirmed (%1 of %2 confirmations) + Ubekræftet (%1 af %2 bekræftelser) + + + + Confirmed (%1 confirmations) + Bekræftet (%1 bekræftelser) + + + + Mined balance will be available when it matures in %n more block(s) + Udvunden saldo, som vil være tilgængelig, når den modner efter yderligere %n blok(ke)Udvunden saldo, som vil være tilgængelig, når den modner efter yderligere %n blok(ke) + + + + This block was not received by any other nodes and will probably not be accepted! + Denne blok blev ikke modtaget af nogen andre knuder og vil formentlig ikke blive accepteret! + + + + Generated but not accepted + Genereret, men ikke accepteret + + + + Received with + Modtaget med + + + + Received from + Modtaget fra + + + + Sent to + Sendt til + + + + Payment to yourself + Betaling til dig selv + + + + Mined + Udvundne + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Dato og klokkeslæt for modtagelse af transaktionen. + + + + Type of transaction. + Transaktionstype. + + + + Destination address of transaction. + Destinationsadresse for transaktion. + + + + Amount removed from or added to balance. + Beløb fjernet eller tilføjet balance. + + + + TransactionView + + + + All + Alle + + + + Today + I dag + + + + This week + Denne uge + + + + This month + Denne måned + + + + Last month + Sidste måned + + + + This year + Dette år + + + + Range... + Interval... + + + + Received with + Modtaget med + + + + Sent to + Sendt til + + + + To yourself + Til dig selv + + + + Mined + Udvundne + + + + Other + Andet + + + + Enter address or label to search + Indtast adresse eller mærkat for at søge + + + + Min amount + Minimumsbeløb + + + + Copy address + Kopier adresse + + + + Copy label + Kopier mærkat + + + + Copy amount + Kopier beløb + + + + Copy transaction ID + Kopier transaktionens ID + + + + Edit label + Rediger mærkat + + + + Show transaction details + Vis transaktionsdetaljer + + + + Export Transaction Data + Eksporter transaktionsdata + + + + Comma separated file (*.csv) + Kommasepareret fil (*.csv) + + + + Confirmed + Bekræftet + + + + Date + Dato + + + + Type + Type + + + + Label + Mærkat + + + + Address + Adresse + + + + Amount + Beløb + + + + ID + ID + + + + Error exporting + Fejl under eksport + + + + Could not write to file %1. + Kunne ikke skrive til filen %1. + + + + Range: + Interval: + + + + to + til + + + + WalletModel + + + Send Coins + Send curecoins + + + + WalletView + + + &Export + Eksporter + + + + Export the data in the current tab to a file + Eksportér den aktuelle visning til en fil + + + + Backup Wallet + Sikkerhedskopier tegnebog + + + + Wallet Data (*.dat) + Tegnebogsdata (*.dat) + + + + Backup Failed + Foretagelse af sikkerhedskopi fejlede + + + + There was an error trying to save the wallet data to the new location. + Der opstod en fejl i forbindelse med at gemme tegnebogsdata til det nye sted + + + + Backup Successful + Sikkerhedskopieret problemfri + + + + The wallet data was successfully saved to the new location. + Tegnebogsdata blev problemfrit gemt til det nye sted. + + + + curecoin-core + + + curecoin version + curecoin-version + + + + Usage: + Anvendelse: + + + + Send command to -server or curecoind + Send kommando til -server eller curecoind + + + + List commands + Liste over kommandoer + + + + Get help for a command + Få hjælp til en kommando + + + + Options: + Indstillinger: + + + + Specify configuration file (default: curecoin.conf) + Angiv konfigurationsfil (standard: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Angiv pid-fil (default: curecoind.pid) + + + + Specify data directory + Angiv datakatalog + + + + Set database cache size in megabytes (default: 25) + Angiv databasecachestørrelse i megabytes (standard: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Lyt til forbindelser på <port> (standard: 7951 eller testnetværk: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Oprethold højest <n> forbindelser til andre i netværket (standard: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Forbind til en knude for at modtage adresse, og afbryd + + + + Specify your own public address + Angiv din egen offentlige adresse + + + + Threshold for disconnecting misbehaving peers (default: 100) + Grænse for afbrydelse til dårlige forbindelser (standard: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Antal sekunder dårlige forbindelser skal vente før reetablering (standard: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Der opstod en fejl ved angivelse af RPC-porten %u til at lytte på IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Lyt til JSON-RPC-forbindelser på <port> (standard: 7950 eller testnetværk: 17950) + + + + Accept command line and JSON-RPC commands + Accepter kommandolinje- og JSON-RPC-kommandoer + + + + Run in the background as a daemon and accept commands + Kør i baggrunden som en service, og accepter kommandoer + + + + Use the test network + Brug testnetværket + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Accepter forbindelser udefra (standard: 1 hvis hverken -proxy eller -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, du skal angive en RPC-adgangskode i konfigurationsfilen: +%s +Det anbefales, at du bruger nedenstående, tilfældige adgangskode: +rpcuser=curecoinrpc +rpcpassword=%s +(du behøver ikke huske denne adgangskode) +Brugernavnet og adgangskode MÅ IKKE være det samme. +Hvis filen ikke eksisterer, opret den og giv ingen andre end ejeren læserettighed. +Det anbefales også at angive alertnotify, så du påmindes om problemer; +f.eks.: alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Der opstod en fejl ved angivelse af RPC-porten %u til at lytte på IPv6, falder tilbage til IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Tildel til den givne adresse og lyt altid på den. Brug [vært]:port-notation for IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Kan ikke opnå lås på datakatalog %s. curecoin er sandsynligvis allerede startet. + + + + 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 dine curecoins i din tegnebog allerede er brugt, som hvis du brugte en kopi af wallet.dat og dine curecoins er blevet brugt i kopien, men ikke er markeret som brugt her. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Fejl: Denne transaktion kræver et transaktionsgebyr på minimum %s pga. dens størrelse, kompleksitet eller anvendelse af nyligt modtagne curecoins! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Udfør kommando, når en relevant advarsel modtages (%s i kommandoen erstattes med beskeden) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Udfør kommando, når en transaktion i tegnebogen ændres (%s i kommandoen erstattes med TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Angiv maksimumstørrelse for høj prioritet/lavt gebyr-transaktioner i bytes (standard: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Dette er en foreløbig testudgivelse - brug på eget ansvar - brug ikke til udvinding eller handelsprogrammer + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Advarsel: -paytxfee er sat meget højt! Dette er det gebyr du vil betale, hvis du sender en transaktion. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Advarsel: Viste transaktioner kan være ukorrekte! Du eller andre knuder kan have behov for at opgradere. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Advarsel: Undersøg venligst, at din computers dato og klokkeslæt er korrekt indstillet! Hvis der er fejl i disse, vil curecoin 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. + + + + 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. + Advarsel: wallet.dat ødelagt, data reddet! Oprindelig wallet.net gemt som wallet.{timestamp}.bak i %s; hvis din saldo eller dine transaktioner er forkert, bør du genskabe fra en sikkerhedskopi. + + + + Attempt to recover private keys from a corrupt wallet.dat + Forsøg at genskabe private nøgler fra ødelagt wallet.dat + + + + Block creation options: + Blokoprettelsestilvalg: + + + + Connect only to the specified node(s) + Tilslut kun til de(n) angivne knude(r) + + + + Corrupted block database detected + Ødelagt blokdatabase opdaget + + + + Discover own IP address (default: 1 when listening and no -externalip) + Find egen IP-adresse (standard: 1 når lytter og ingen -externalip) + + + + Do you want to rebuild the block database now? + Ønsker du at genbygge blokdatabasen nu? + + + + Error initializing block database + Klargøring af blokdatabase mislykkedes + + + + Error initializing wallet database environment %s! + Klargøring af tegnebogsdatabasemiljøet %s mislykkedes! + + + + Error loading block database + Indlæsning af blokdatabase mislykkedes + + + + Error opening block database + Åbning af blokdatabase mislykkedes + + + + Error: Disk space is low! + Fejl: Mangel på ledig diskplads! + + + + Error: Wallet locked, unable to create transaction! + Fejl: Tegnebog låst, kan ikke oprette transaktion! + + + + Error: system error: + Fejl: systemfejl: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Lytning på enhver port mislykkedes. Brug -listen=0, hvis du ønsker dette. + + + + Failed to read block info + Læsning af blokinformation mislykkedes + + + + Failed to read block + Læsning af blok mislykkedes + + + + Failed to sync block index + Synkronisering af blokindeks mislykkedes + + + + Failed to write block index + Skrivning af blokindeks mislykkedes + + + + Failed to write block info + Skrivning af blokinformation mislykkedes + + + + Failed to write block + Skrivning af blok mislykkedes + + + + Failed to write file info + Skriving af filinformation mislykkedes + + + + Failed to write to coin database + Skrivning af curecoin-database mislykkedes + + + + Failed to write transaction index + Skrivning af transaktionsindeks mislykkedes + + + + Failed to write undo data + Skrivning af genskabelsesdata mislykkedes + + + + Find peers using DNS lookup (default: 1 unless -connect) + Find ligeværdige ved DNS-opslag (standard: 1 hvis ikke -connect) + + + + Generate coins (default: 0) + Generer curecoins (standard: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Antal blokke som tjekkes ved opstart (0=alle, standard: 288) + + + + How thorough the block verification is (0-4, default: 3) + Grundighed af efterprøvning af blokke (0-4, standard: 3) + + + + Not enough file descriptors available. + For få tilgængelige fildeskriptorer. + + + + Rebuild block chain index from current blk000??.dat files + Genbyg blokkædeindeks fra nuværende blk000??.dat filer + + + + Set the number of threads to service RPC calls (default: 4) + Angiv antallet af tråde til at håndtere RPC-kald (standard: 4) + + + + Verifying blocks... + Efterprøver blokke... + + + + Verifying wallet... + Efterprøver tegnebog... + + + + Imports blocks from external blk000??.dat file + Importerer blokke fra ekstern blk000??.dat fil + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Angiv nummeret af skriptefterprøvningstråde (op til 16, 0 = automatisk, <0 = efterlad det antal kerner tilgængelige, standard: 0) + + + + Information + Information + + + + Invalid -tor address: '%s' + Ugyldig -tor adresse: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + Ugyldigt beløb til -minrelaytxfee=<beløb>:'%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + Ugyldigt beløb til -mintxfee=<beløb>:'%s' + + + + Maintain a full transaction index (default: 0) + Vedligehold et komplet transaktionsindeks (standard: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maksimum for modtagelsesbuffer pr. forbindelse, <n>*1000 bytes (standard: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maksimum for afsendelsesbuffer pr. forbindelse, <n>*1000 bytes (standard: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Accepter kun blokkæde, som matcher indbyggede kontrolposter (standard: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Tilslut kun til knuder i netværk <net> (IPv4, IPv6 eller Tor) + + + + Output extra debugging information. Implies all other -debug* options + Skriv ekstra fejlsøgningsinformation. Indebærer alle andre -debug* tilvalg + + + + Output extra network debugging information + Skriv ekstra netværksfejlsøgningsinformation + + + + Prepend debug output with timestamp + Tilføj fejlsøgningsoutput med tidsstempel + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL-indstillinger: (se curecoin Wiki for SSL-opsætningsinstruktioner) + + + + Select the version of socks proxy to use (4-5, default: 5) + Angiv version af SOCKS-proxyen (4-5, standard: 5) + + + + Send trace/debug info to console instead of debug.log file + Send sporings-/fejlsøgningsinformation til konsollen i stedet for debug.log filen + + + + Send trace/debug info to debugger + Send sporings-/fejlsøgningsinformation til fejlsøgningprogrammet + + + + Set maximum block size in bytes (default: 250000) + Angiv maksimumblokstørrelse i bytes (standard: 250000) + + + + Set minimum block size in bytes (default: 0) + Angiv minimumsblokstørrelse i bytes (standard: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Formindsk debug.log filen ved klientopstart (standard: 1 hvis ikke -debug) + + + + Signing transaction failed + Underskrift af transaktion mislykkedes + + + + Specify connection timeout in milliseconds (default: 5000) + Angiv tilslutningstimeout i millisekunder (standard: 5000) + + + + System error: + Systemfejl: + + + + Transaction amount too small + Transaktionsbeløb er for lavt + + + + Transaction amounts must be positive + Transaktionsbeløb skal være positive + + + + Transaction too large + Transaktionen er for stor + + + + Use UPnP to map the listening port (default: 0) + Forsøg at bruge UPnP til at konfigurere den lyttende port (standard: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Forsøg at bruge UPnP til at konfigurere den lyttende port (standard: 1 når lytter) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Brug proxy til at tilgå Tor Hidden Services (standard: som -proxy) + + + + Username for JSON-RPC connections + Brugernavn til JSON-RPC-forbindelser + + + + Warning + Advarsel + + + + Warning: This version is obsolete, upgrade required! + Advarsel: Denne version er forældet, opgradering påkrævet! + + + + You need to rebuild the databases using -reindex to change -txindex + Du skal genbygge databaserne med -reindex for at ændre -txindex + + + + wallet.dat corrupt, salvage failed + wallet.dat ødelagt, redning af data mislykkedes + + + + Password for JSON-RPC connections + Adgangskode til JSON-RPC-forbindelser + + + + Allow JSON-RPC connections from specified IP address + Tillad JSON-RPC-forbindelser fra bestemt IP-adresse + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Send kommandoer til knude, der kører på <ip> (standard: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Udfør kommando, når den bedste blok ændres (%s i kommandoen erstattes med blokhash) + + + + Upgrade wallet to latest format + Opgrader tegnebog til seneste format + + + + Set key pool size to <n> (default: 100) + Angiv nøglepoolstørrelse til <n> (standard: 100) + + + + Rescan the block chain for missing wallet transactions + Gennemsøg blokkæden for manglende tegnebogstransaktioner + + + + Use OpenSSL (https) for JSON-RPC connections + Brug OpenSSL (https) for JSON-RPC-forbindelser + + + + Server certificate file (default: server.cert) + Servercertifikat-fil (standard: server.cert) + + + + Server private key (default: server.pem) + Serverens private nøgle (standard: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Acceptable ciphers (standard: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Denne hjælpebesked + + + + 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) + + + + Connect through socks proxy + Tilslut via SOCKS-proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Tillad DNS-opslag for -addnode, -seednode og -connect + + + + Loading addresses... + Indlæser adresser... + + + + Error loading wallet.dat: Wallet corrupted + Fejl ved indlæsning af wallet.dat: Tegnebog ødelagt + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Fejl ved indlæsning af wallet.dat: Tegnebog kræver en nyere version af curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Det var nødvendigt at genskrive tegnebogen: genstart curecoin for at gennemføre + + + + Error loading wallet.dat + Fejl ved indlæsning af wallet.dat + + + + Invalid -proxy address: '%s' + Ugyldig -proxy adresse: '%s' + + + + Unknown network specified in -onlynet: '%s' + Ukendt netværk anført i -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Ukendt -socks proxy-version: %i + + + + Cannot resolve -bind address: '%s' + Kan ikke finde -bind adressen: '%s' + + + + Cannot resolve -externalip address: '%s' + Kan ikke finde -externalip adressen: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Ugyldigt beløb for -paytxfee=<amount>: '%s' + + + + Invalid amount + Ugyldigt beløb + + + + Insufficient funds + Manglende dækning + + + + Loading block index... + Indlæser blokindeks... + + + + Add a node to connect to and attempt to keep the connection open + Tilføj en knude til at forbinde til og forsøg at holde forbindelsen åben + + + + Unable to bind to %s on this computer. curecoin is probably already running. + Kunne ikke tildele %s på denne computer. curecoin kører sikkert allerede. + + + + Fee per KB to add to transactions you send + Gebyr pr. kB, som skal tilføjes til transaktioner, du sender + + + + Loading wallet... + Indlæser tegnebog... + + + + Cannot downgrade wallet + Kan ikke nedgradere tegnebog + + + + Cannot write default address + Kan ikke skrive standardadresse + + + + Rescanning... + Genindlæser... + + + + Done loading + Indlæsning gennemført + + + + To use the %s option + For at bruge %s mulighed + + + + Error + Fejl + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Du skal angive rpcpassword=<password> i konfigurationsfilen: +%s +Hvis filen ikke eksisterer, opret den og giv ingen andre end ejeren læserettighed. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_de.qm b/src/qt/locale/curecoin_de.qm new file mode 100644 index 0000000..5249415 Binary files /dev/null and b/src/qt/locale/curecoin_de.qm differ diff --git a/src/qt/locale/curecoin_de.ts b/src/qt/locale/curecoin_de.ts new file mode 100644 index 0000000..f0b80c4 --- /dev/null +++ b/src/qt/locale/curecoin_de.ts @@ -0,0 +1,2937 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Über curecoin + + + + <b>curecoin</b> version + <b>curecoin</b>-Version + + + + +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. + +Dies ist experimentelle Software. + +Veröffentlicht unter der MIT/X11-Softwarelizenz, siehe beiligende Datei COPYING oder http://www.opensource.org/licenses/mit-license.php. + +Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im OpenSSL-Toolkit (http://www.openssl.org/) entwickelt wurde, sowie kryptographische Software geschrieben von Eric Young (eay@cryptsoft.com) und UPnP-Software geschrieben von Thomas Bernard. + + + + Copyright + Copyright + + + + Dr. Kimoto Chan + Die curecoinentwickler + + + + AddressBookPage + + + Address Book + 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 + + + + Copy the currently selected address to the system clipboard + Ausgewählte Adresse in die Zwischenablage kopieren + + + + &New Address + &Neue Adresse + + + + These are your curecoin 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. + Dies sind Ihre curecoin-Adressen zum Empfangen von Zahlungen. Es steht Ihnen frei, jedem Absender eine Andere mitzuteilen, um einen besseren Überblick über eingehende Zahlungen zu erhalten. + + + + &Copy Address + Adresse &kopieren + + + + Show &QR Code + &QR-Code anzeigen + + + + Sign a message to prove you own a curecoin address + Eine Nachricht signieren, um den Besitz einer curecoin-Adresse zu beweisen + + + + Sign &Message + Nachricht &signieren + + + + Delete the currently selected address from the list + Die ausgewählte Adresse aus der Liste entfernen. + + + + Export the data in the current tab to a file + Daten der aktuellen Ansicht in eine Datei exportieren + + + + &Export + E&xportieren + + + + Verify a message to ensure it was signed with a specified curecoin address + Eine Nachricht verifizieren, um sicherzustellen, dass diese mit einer angegebenen curecoin-Adresse signiert wurde + + + + &Verify Message + Nachricht &verifizieren + + + + &Delete + &Löschen + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Dies sind Ihre curecoin-Adressen zum Tätigen von Überweisungen. Bitte prüfen Sie den Betrag und die Empfangsadresse, bevor Sie curecoins überweisen. + + + + Copy &Label + &Bezeichnung kopieren + + + + &Edit + &Editieren + + + + Send &Coins + curecoins &überweisen + + + + Export Address Book Data + Adressbuch exportieren + + + + Comma separated file (*.csv) + Kommagetrennte-Datei (*.csv) + + + + Error exporting + Fehler beim Exportieren + + + + Could not write to file %1. + Konnte nicht in Datei %1 schreiben. + + + + AddressTableModel + + + Label + Bezeichnung + + + + Address + Adresse + + + + (no label) + (keine Bezeichnung) + + + + AskPassphraseDialog + + + Passphrase Dialog + Passphrasendialog + + + + Enter passphrase + Passphrase eingeben + + + + New passphrase + Neue Passphrase + + + + Repeat new passphrase + Neue Passphrase wiederholen + + + + 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>. + Geben Sie die neue Passphrase für die Brieftasche ein.<br>Bitte benutzen Sie eine Passphrase bestehend aus <b>10 oder mehr zufälligen Zeichen</b> oder <b>8 oder mehr Wörtern</b>. + + + + Encrypt wallet + Brieftasche verschlüsseln + + + + This operation needs your wallet passphrase to unlock the wallet. + Dieser Vorgang benötigt Ihre Passphrase, um die Brieftasche zu entsperren. + + + + Unlock wallet + Brieftasche entsperren + + + + This operation needs your wallet passphrase to decrypt the wallet. + Dieser Vorgang benötigt Ihre Passphrase, um die Brieftasche zu entschlüsseln. + + + + Decrypt wallet + Brieftasche entschlüsseln + + + + Change passphrase + Passphrase ändern + + + + Enter the old and new passphrase to the wallet. + Geben Sie die alte und neue Passphrase der Brieftasche ein. + + + + Confirm wallet encryption + Verschlüsselung der Brieftasche bestätigen + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Warnung: Wenn Sie Ihre Brieftasche verschlüsseln und Ihre Passphrase verlieren, werden Sie <b>alle Ihre curecoinS verlieren</b>! + + + + Are you sure you wish to encrypt your wallet? + Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten? + + + + 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. + WICHTIG: Alle vorherigen Sicherungen Ihrer Brieftasche sollten durch die neu erzeugte, verschlüsselte Brieftasche ersetzt werden. Aus Sicherheitsgründen werden vorherige Sicherungen der unverschlüsselten Brieftasche nutzlos, sobald Sie die neue, verschlüsselte Brieftasche verwenden. + + + + + Warning: The Caps Lock key is on! + Warnung: Die Feststelltaste ist aktiviert! + + + + + Wallet encrypted + Brieftasche verschlüsselt + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Verschlüsselung Ihrer Brieftasche nicht vollständig vor Diebstahl Ihrer curecoins durch Schadsoftware schützt, die Ihren Computer befällt. + + + + + + + Wallet encryption failed + Verschlüsselung der Brieftasche fehlgeschlagen + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Die Verschlüsselung der Brieftasche ist aufgrund eines internen Fehlers fehlgeschlagen. Ihre Brieftasche wurde nicht verschlüsselt. + + + + + The supplied passphrases do not match. + Die eingegebenen Passphrasen stimmen nicht überein. + + + + Wallet unlock failed + Entsperrung der Brieftasche fehlgeschlagen + + + + + + The passphrase entered for the wallet decryption was incorrect. + Die eingegebene Passphrase zum Entschlüsseln der Brieftasche war nicht korrekt. + + + + Wallet decryption failed + Entschlüsselung der Brieftasche fehlgeschlagen + + + + Wallet passphrase was successfully changed. + Die Passphrase der Brieftasche wurde erfolgreich geändert. + + + + curecoinGUI + + + Sign &message... + Nachricht s&ignieren... + + + + Synchronizing with network... + Synchronisiere mit Netzwerk... + + + + &Overview + &Übersicht + + + + Show general overview of wallet + Allgemeine Übersicht der Brieftasche anzeigen + + + + &Transactions + &Transaktionen + + + + Browse transaction history + Transaktionsverlauf durchsehen + + + + Edit the list of stored addresses and labels + Liste der gespeicherten Zahlungsadressen und Bezeichnungen bearbeiten + + + + Show the list of addresses for receiving payments + Liste der Empfangsadressen anzeigen + + + + E&xit + &Beenden + + + + Quit application + Anwendung beenden + + + + Show information about curecoin + Informationen über curecoin anzeigen + + + + About &Qt + Über &Qt + + + + Show information about Qt + Informationen über Qt anzeigen + + + + &Options... + &Konfiguration... + + + + &Encrypt Wallet... + Brieftasche &verschlüsseln... + + + + &Backup Wallet... + Brieftasche &sichern... + + + + &Change Passphrase... + Passphrase &ändern... + + + + Importing blocks from disk... + Importiere Blöcke von Laufwerk... + + + + Reindexing blocks on disk... + Reindiziere Blöcke auf Laufwerk... + + + + Send coins to a curecoin address + curecoins an eine curecoin-Adresse überweisen + + + + Modify configuration options for curecoin + Die Konfiguration des Clients bearbeiten + + + + Backup wallet to another location + Eine Sicherungskopie der Brieftasche erstellen und abspeichern + + + + Change the passphrase used for wallet encryption + Ändert die Passphrase, die für die Verschlüsselung der Brieftasche benutzt wird + + + + &Debug window + &Debugfenster + + + + Open debugging and diagnostic console + Debugging- und Diagnosekonsole öffnen + + + + &Verify message... + Nachricht &verifizieren... + + + + + curecoin + curecoin + + + + Wallet + Brieftasche + + + + &Send + Überweisen + + + + &Receive + &Empfangen + + + + &Addresses + &Adressen + + + + &About curecoin + &Über curecoin + + + + &Show / Hide + &Anzeigen / Verstecken + + + + Show or hide the main Window + Das Hauptfenster anzeigen oder verstecken + + + + Encrypt the private keys that belong to your wallet + Verschlüsselt die zu Ihrer Brieftasche gehörenden privaten Schlüssel + + + + Sign messages with your curecoin addresses to prove you own them + Nachrichten signieren, um den Besitz Ihrer curecoin-Adressen zu beweisen + + + + Verify messages to ensure they were signed with specified curecoin addresses + Nachrichten verifizieren, um sicherzustellen, dass diese mit den angegebenen curecoin-Adressen signiert wurden + + + + &File + &Datei + + + + &Settings + &Einstellungen + + + + &Help + &Hilfe + + + + Tabs toolbar + Registerkartenleiste + + + + + [testnet] + [Testnetz] + + + + curecoin client + curecoin-Client + + + + %n active connection(s) to curecoin network + %n aktive Verbindung zum curecoin-Netzwerk%n aktive Verbindungen zum curecoin-Netzwerk + + + + No block source available... + Keine Blockquelle verfügbar... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + %1 von (geschätzten) %2 Blöcken des Transaktionsverlaufs verarbeitet. + + + + Processed %1 blocks of transaction history. + %1 Blöcke des Transaktionsverlaufs verarbeitet. + + + + %n hour(s) + %n Stunde%n Stunden + + + + %n day(s) + %n Tag%n Tage + + + + %n week(s) + %n Woche%n Wochen + + + + %1 behind + %1 im Rückstand + + + + Last received block was generated %1 ago. + Der letzte empfangene Block ist %1 alt. + + + + Transactions after this will not yet be visible. + Transaktionen hiernach werden noch nicht angezeigt. + + + + Error + Fehler + + + + Warning + Warnung + + + + Information + Hinweis + + + + 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? + Die Transaktion übersteigt das Größenlimit. Sie können sie trotzdem senden, wenn Sie eine zusätzliche Transaktionsgebühr in Höhe von %1 zahlen. Diese wird an die Knoten verteilt, die Ihre Transaktion bearbeiten und unterstützt damit das curecoin-Netzwerk. Möchten Sie die Gebühr bezahlen? + + + + Up to date + Auf aktuellem Stand + + + + Catching up... + Hole auf... + + + + Confirm transaction fee + Transaktionsgebühr bestätigen + + + + 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 Verarbeitung + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + URI kann nicht analysiert werden! Dies kann durch eine ungültige curecoin-Adresse oder fehlerhafte URI-Parameter verursacht werden. + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Brieftasche ist <b>verschlüsselt</b> und aktuell <b>entsperrt</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Brieftasche ist <b>verschlüsselt</b> und aktuell <b>gesperrt</b> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Ein schwerer Fehler ist aufgetreten. curecoin kann nicht stabil weiter ausgeführt werden und wird beendet. + + + + ClientModel + + + Network Alert + Netzwerkalarm + + + + EditAddressDialog + + + Edit Address + Adresse bearbeiten + + + + &Label + &Bezeichnung + + + + The label associated with this address book entry + Die Bezeichnung dieses Adressbuchseintrags + + + + &Address + &Adresse + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Die Adresse des Adressbucheintrags. Diese kann nur für Zahlungsadressen bearbeitet werden. + + + + 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 already in the address book. + Die eingegebene Adresse "%1" befindet sich bereits im Adressbuch. + + + + The entered address "%1" is not a valid curecoin address. + Die eingegebene Adresse "%1" ist keine gültige curecoin-Adresse. + + + + Could not unlock wallet. + Die Brieftasche konnte nicht entsperrt werden. + + + + New key generation failed. + Generierung eines neuen Schlüssels fehlgeschlagen. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + Version + + + + Usage: + Benutzung: + + + + command-line options + Kommandozeilenoptionen + + + + UI options + UI-Optionen + + + + Set language, for example "de_DE" (default: system locale) + Sprache festlegen, z.B. "de_DE" (Standard: System Locale) + + + + Start minimized + Minimiert starten + + + + Show splash screen on startup (default: 1) + Startbildschirm beim Starten anzeigen (Standard: 1) + + + + OptionsDialog + + + Options + Erweiterte Einstellungen + + + + &Main + &Allgemein + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Optionale Transaktionsgebühr pro KB, die sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß. + + + + Pay transaction &fee + Transaktions&gebühr bezahlen + + + + Automatically start curecoin after logging in to the system. + curecoin nach der Anmeldung am System automatisch ausführen. + + + + &Start curecoin on system login + &Starte curecoin nach Systemanmeldung + + + + Reset all client options to default. + Setzt die Clientkonfiguration auf Standardwerte zurück. + + + + &Reset Options + Konfiguration &zurücksetzen + + + + &Network + &Netzwerk + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Automatisch den curecoin-Clientport auf dem Router öffnen. Dies funktioniert nur, wenn Ihr Router UPnP unterstützt und dies aktiviert ist. + + + + Map port using &UPnP + Portweiterleitung via &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Über einen SOCKS-Proxy mit dem curecoin-Netzwerk verbinden (z.B. beim Verbinden über Tor). + + + + &Connect through SOCKS proxy: + Über einen SOCKS-Proxy &verbinden: + + + + Proxy &IP: + Proxy-&IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + IP-Adresse des Proxies (z.B. 127.0.0.1) + + + + &Port: + &Port: + + + + Port of the proxy (e.g. 9050) + Port des Proxies (z.B. 9050) + + + + SOCKS &Version: + SOCKS-&Version: + + + + SOCKS version of the proxy (e.g. 5) + SOCKS-Version des Proxies (z.B. 5) + + + + &Window + &Programmfenster + + + + Show only a tray icon after minimizing the window. + Nur ein Symbol im Infobereich anzeigen, nachdem das Programmfenster minimiert wurde. + + + + &Minimize to the tray instead of the taskbar + In den Infobereich anstatt in die Taskleiste &minimieren + + + + 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. + Minimiert die Anwendung anstatt sie zu beenden wenn das Fenster geschlossen wird. Wenn dies aktiviert ist, müssen Sie das Programm über "Beenden" im Menü schließen. + + + + M&inimize on close + Beim Schließen m&inimieren + + + + &Display + &Anzeige + + + + User Interface &language: + &Sprache der Benutzeroberfläche: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Legt die Sprache der Benutzeroberfläche fest. Diese Einstellung wird erst nach einem Neustart von curecoin aktiv. + + + + &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 curecoins angezeigt werden soll. + + + + Whether to show curecoin addresses in the transaction list or not. + Legt fest, ob curecoin-Adressen in der Transaktionsliste angezeigt werden. + + + + &Display addresses in transaction list + Adressen in der Transaktionsliste &anzeigen + + + + &OK + &OK + + + + &Cancel + &Abbrechen + + + + &Apply + &Übernehmen + + + + default + Standard + + + + Confirm options reset + Zurücksetzen der Konfiguration bestätigen + + + + Some settings may require a client restart to take effect. + Einige Einstellungen benötigen möglicherweise einen Clientneustart, um aktiv zu werden. + + + + Do you want to proceed? + Wollen Sie fortfahren? + + + + + Warning + Warnung + + + + + This setting will take effect after restarting curecoin. + Diese Einstellung wird erst nach einem Neustart von curecoin aktiv. + + + + The supplied proxy address is invalid. + Die eingegebene Proxyadresse ist ungültig. + + + + OverviewPage + + + Form + Formular + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Die angezeigten Informationen sind möglicherweise nicht mehr aktuell. Ihre Brieftasche wird automatisch synchronisiert, nachdem eine Verbindung zum curecoin-Netzwerk hergestellt wurde. Dieser Prozess ist jedoch derzeit noch nicht abgeschlossen. + + + + Balance: + Kontostand: + + + + Unconfirmed: + Unbestätigt: + + + + Wallet + Brieftasche + + + + Immature: + Unreif: + + + + Mined balance that has not yet matured + Erarbeiteter Betrag der noch nicht gereift ist + + + + <b>Recent transactions</b> + <b>Letzte Transaktionen</b> + + + + Your current balance + Ihr aktueller Kontostand + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Betrag aus unbestätigten Transaktionen, der noch nicht im aktuellen Kontostand enthalten ist + + + + + out of sync + nicht synchron + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + "curecoin: Klicken-zum-Bezahlen"-Handler konnte nicht gestartet werden + + + + QRCodeDialog + + + QR Code Dialog + QR-Code-Dialog + + + + Request Payment + Zahlung anfordern + + + + Amount: + Betrag: + + + + Label: + Bezeichnung: + + + + Message: + Nachricht: + + + + &Save As... + &Speichern unter... + + + + Error encoding URI into QR Code. + Fehler beim Kodieren der URI in den QR-Code. + + + + The entered amount is invalid, please check. + Der eingegebene Betrag ist ungültig, bitte überprüfen. + + + + Resulting URI too long, try to reduce the text for label / message. + Resultierende URI zu lang, bitte den Text für Bezeichnung / Nachricht kürzen. + + + + Save QR Code + QR-Code abspeichern + + + + PNG Images (*.png) + PNG-Bild (*.png) + + + + RPCConsole + + + Client name + Clientname + + + + + + + + + + + + + N/A + n.v. + + + + Client version + Clientversion + + + + &Information + &Information + + + + Using OpenSSL version + Verwendete OpenSSL-Version + + + + Startup time + Startzeit + + + + Network + Netzwerk + + + + Number of connections + Anzahl Verbindungen + + + + On testnet + Im Testnetz + + + + Block chain + Blockkette + + + + Current number of blocks + Aktuelle Anzahl Blöcke + + + + Estimated total blocks + Geschätzte Gesamtzahl Blöcke + + + + Last block time + Letzte Blockzeit + + + + &Open + &Öffnen + + + + Command-line options + Kommandozeilenoptionen + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Zeige die curecoin-Qt-Hilfsnachricht, um eine Liste mit möglichen Kommandozeilenoptionen zu erhalten. + + + + &Show + &Anzeigen + + + + &Console + &Konsole + + + + Build date + Erstellungsdatum + + + + curecoin - Debug window + curecoin - Debugfenster + + + + curecoin Core + curecoin-Kern + + + + Debug log file + Debugprotokolldatei + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Öffnet die curecoin-Debugprotokolldatei aus dem aktuellen Datenverzeichnis. Dies kann bei großen Protokolldateien einige Sekunden dauern. + + + + Clear console + Konsole zurücksetzen + + + + Welcome to the curecoin RPC console. + Willkommen in der curecoin-RPC-Konsole. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Pfeiltaste hoch und runter, um die Historie durchzublättern und <b>Strg-L</b>, um die Konsole zurückzusetzen. + + + + Type <b>help</b> for an overview of available commands. + Bitte <b>help</b> eingeben, um eine Übersicht verfügbarer Befehle zu erhalten. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + curecoins überweisen + + + + 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 + Alle Überweisungsfelder zurücksetzen + + + + Clear &All + &Zurücksetzen + + + + Balance: + Kontostand: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Überweisung bestätigen + + + + S&end + &Überweisen + + + + <b>%1</b> to %2 (%3) + <b>%1</b> an %2 (%3) + + + + Confirm send coins + Überweisung bestätigen + + + + Are you sure you want to send %1? + Sind Sie sich sicher, dass Sie die folgende Überweisung ausführen möchten?<br>%1 + + + + and + und + + + + The recipient address is not valid, please recheck. + Die Zahlungsadresse ist ungültig, bitte nochmals überprüfen. + + + + The amount to pay must be larger than 0. + Der zu zahlende Betrag muss größer als 0 sein. + + + + The amount exceeds your balance. + Der angegebene Betrag übersteigt Ihren Kontostand. + + + + The total exceeds your balance when the %1 transaction fee is included. + Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 Ihren Kontostand. + + + + 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: Transaction creation failed! + Fehler: Transaktionserstellung fehlgeschlagen! + + + + 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. + Fehler: Die Transaktion wurde abgelehnt. Dies kann passieren, wenn einige curecoins aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die curecoins dort ausgegeben haben und dies daher in der derzeit aktiven Brieftasche nicht vermerkt ist. + + + + SendCoinsEntry + + + Form + Formular + + + + A&mount: + &Betrag: + + + + Pay &To: + &Empfänger: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Die Zahlungsadresse der Überweisung (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Adresse aus Adressbuch wählen + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Adresse aus der Zwischenablage einfügen + + + + Alt+P + Alt+P + + + + Remove this recipient + Diesen Empfänger entfernen + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + curecoin-Adresse eingeben (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Signaturen - eine Nachricht signieren / verifizieren + + + + &Sign Message + Nachricht &signieren + + + + 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. + Sie können Nachrichten mit Ihren Adressen signieren, um den Besitz dieser Adressen zu beweisen. Bitte nutzen Sie diese Funktion mit Vorsicht und nehmen Sie sich vor Phishingangriffen in Acht. Signieren Sie nur Nachrichten, mit denen Sie vollständig einverstanden sind. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Die Adresse mit der die Nachricht signiert wird (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Eine Adresse aus dem Adressbuch wählen + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Adresse aus der Zwischenablage einfügen + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Zu signierende Nachricht hier eingeben + + + + Signature + Signatur + + + + Copy the current signature to the system clipboard + Aktuelle Signatur in die Zwischenablage kopieren + + + + Sign the message to prove you own this curecoin address + Die Nachricht signieren, um den Besitz dieser curecoin-Adresse zu beweisen + + + + Sign &Message + &Nachricht signieren + + + + Reset all sign message fields + Alle "Nachricht signieren"-Felder zurücksetzen + + + + + Clear &All + &Zurücksetzen + + + + &Verify Message + Nachricht &verifizieren + + + + 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. + Geben Sie die signierende Adresse, Nachricht (achten Sie darauf Zeilenumbrüche, Leerzeichen, Tabulatoren usw. exakt zu kopieren) und Signatur unten ein, um die Nachricht zu verifizieren. Vorsicht, interpretieren Sie nicht mehr in die Signatur, als in der signierten Nachricht selber enthalten ist, um nicht von einerm Man-in-the-middle-Angriff hinters Licht geführt zu werden. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Die Adresse mit der die Nachricht signiert wurde (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Die Nachricht verifizieren, um sicherzustellen, dass diese mit der angegebenen curecoin-Adresse signiert wurde + + + + Verify &Message + &Nachricht verifizieren + + + + Reset all verify message fields + Alle "Nachricht verifizieren"-Felder zurücksetzen + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + curecoin-Adresse eingeben (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Auf "Nachricht signieren" klicken, um die Signatur zu erzeugen + + + + Enter curecoin signature + curecoin-Signatur eingeben + + + + + The entered address is invalid. + Die eingegebene Adresse ist ungültig. + + + + + + + Please check the address and try again. + Bitte überprüfen Sie die Adresse und versuchen Sie es erneut. + + + + + The entered address does not refer to a key. + Die eingegebene Adresse verweist nicht auf einen Schlüssel. + + + + Wallet unlock was cancelled. + Entsperrung der Brieftasche wurde abgebrochen. + + + + Private key for the entered address is not available. + Privater Schlüssel zur eingegebenen Adresse ist nicht verfügbar. + + + + Message signing failed. + Signierung der Nachricht fehlgeschlagen. + + + + Message signed. + Nachricht signiert. + + + + The signature could not be decoded. + Die Signatur konnte nicht dekodiert werden. + + + + + Please check the signature and try again. + Bitte überprüfen Sie die Signatur und versuchen Sie es erneut. + + + + The signature did not match the message digest. + Die Signatur entspricht nicht dem Message Digest. + + + + Message verification failed. + Verifikation der Nachricht fehlgeschlagen. + + + + Message verified. + Nachricht verifiziert. + + + + SplashScreen + + + Dr. Kimoto Chan + Die curecoinentwickler + + + + [testnet] + [Testnetz] + + + + TransactionDesc + + + Open until %1 + Offen bis %1 + + + + %1/offline + %1/offline + + + + %1/unconfirmed + %1/unbestätigt + + + + %1 confirmations + %1 Bestätigungen + + + + Status + Status + + + + , broadcast through %n node(s) + , über %n Knoten übertragen, über %n Knoten übertragen + + + + Date + Datum + + + + Source + Quelle + + + + Generated + Generiert + + + + + From + Von + + + + + + To + An + + + + + own address + eigene Adresse + + + + label + Bezeichnung + + + + + + + + Credit + Gutschrift + + + + matures in %n more block(s) + reift noch %n weiteren Blockreift noch %n weitere Blöcke + + + + not accepted + nicht angenommen + + + + + + + Debit + Belastung + + + + Transaction fee + Transaktionsgebühr + + + + Net amount + Nettobetrag + + + + Message + Nachricht signieren + + + + Comment + Kommentar + + + + Transaction ID + Transaktions-ID + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Generierte curecoins müssen 120 Blöcke lang reifen, bevor sie ausgegeben werden können. Als Sie diesen Block generierten, wurde er an das Netzwerk übertragen, um ihn der Blockkette hinzuzufügen. Falls dies fehlschlägt wird der Status in "nicht angenommen" geändert und der Betrag wird nicht verfügbar werden. Das kann gelegentlich passieren, wenn ein anderer Knoten einen Block fast zeitgleich generiert. + + + + Debug information + Debuginformationen + + + + Transaction + Transaktion + + + + Inputs + Eingaben + + + + Amount + Betrag + + + + true + wahr + + + + false + falsch + + + + , has not been successfully broadcast yet + , wurde noch nicht erfolgreich übertragen + + + + Open for %n more block(s) + Offen für %n weiteren BlockOffen für %n weitere Blöcke + + + + unknown + unbekannt + + + + TransactionDescDialog + + + Transaction details + Transaktionsdetails + + + + This pane shows a detailed description of the transaction + Dieser Bereich zeigt eine detaillierte Beschreibung der Transaktion an + + + + TransactionTableModel + + + Date + Datum + + + + Type + Typ + + + + Address + Adresse + + + + Amount + Betrag + + + + Open for %n more block(s) + Offen für %n weiteren BlockOffen für %n weitere Blöcke + + + + Open until %1 + Offen bis %1 + + + + Offline (%1 confirmations) + Offline (%1 Bestätigungen) + + + + Unconfirmed (%1 of %2 confirmations) + Unbestätigt (%1 von %2 Bestätigungen) + + + + Confirmed (%1 confirmations) + Bestätigt (%1 Bestätigungen) + + + + Mined balance will be available when it matures in %n more block(s) + Erarbeiteter Betrag wird verfügbar sein, nachdem er noch %n weiteren Block reiftErarbeiteter Betrag wird verfügbar sein, nachdem er noch %n weitere Blöcke reift + + + + This block was not received by any other nodes and will probably not be accepted! + Dieser Block wurde von keinem anderen Knoten empfangen und wird wahrscheinlich nicht angenommen werden! + + + + Generated but not accepted + Generiert, jedoch nicht angenommen + + + + Received with + Empfangen über + + + + Received from + Empfangen von + + + + Sent to + Überwiesen an + + + + Payment to yourself + Eigenüberweisung + + + + Mined + Erarbeitet + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Datum und Uhrzeit als die Transaktion empfangen wurde. + + + + Type of transaction. + Art der Transaktion + + + + Destination address of transaction. + Zieladresse der Transaktion + + + + Amount removed from or added to balance. + Der Betrag, der dem Kontostand abgezogen oder hinzugefügt wurde. + + + + TransactionView + + + + All + Alle + + + + Today + Heute + + + + This week + Diese Woche + + + + This month + Diesen Monat + + + + Last month + Letzten Monat + + + + This year + Dieses Jahr + + + + Range... + Zeitraum... + + + + Received with + Empfangen über + + + + Sent to + Überwiesen an + + + + To yourself + Eigenüberweisung + + + + Mined + Erarbeitet + + + + Other + Andere + + + + Enter address or label to search + Zu suchende Adresse oder Bezeichnung eingeben + + + + Min amount + Minimaler Betrag + + + + Copy address + Adresse kopieren + + + + Copy label + Bezeichnung kopieren + + + + Copy amount + Betrag kopieren + + + + Copy transaction ID + Transaktions-ID kopieren + + + + Edit label + Bezeichnung bearbeiten + + + + Show transaction details + Transaktionsdetails anzeigen + + + + Export Transaction Data + Transaktionen exportieren + + + + Comma separated file (*.csv) + Kommagetrennte-Datei (*.csv) + + + + Confirmed + Bestätigt + + + + Date + Datum + + + + Type + Typ + + + + Label + Bezeichnung + + + + Address + Adresse + + + + Amount + Betrag + + + + ID + ID + + + + Error exporting + Fehler beim Exportieren + + + + Could not write to file %1. + Konnte nicht in Datei %1 schreiben. + + + + Range: + Zeitraum: + + + + to + bis + + + + WalletModel + + + Send Coins + curecoins überweisen + + + + WalletView + + + &Export + E&xportieren + + + + Export the data in the current tab to a file + Daten der aktuellen Ansicht in eine Datei exportieren + + + + Backup Wallet + Brieftasche sichern + + + + Wallet Data (*.dat) + Brieftaschendaten (*.dat) + + + + Backup Failed + Sicherung fehlgeschlagen + + + + There was an error trying to save the wallet data to the new location. + Beim Speichern der Brieftaschendaten an die neue Position ist ein Fehler aufgetreten. + + + + Backup Successful + Sicherung erfolgreich + + + + The wallet data was successfully saved to the new location. + Speichern der Brieftaschendaten an die neue Position war erfolgreich. + + + + curecoin-core + + + curecoin version + curecoin-Version + + + + Usage: + Benutzung: + + + + Send command to -server or curecoind + Befehl an -server oder curecoind senden + + + + List commands + Befehle auflisten + + + + Get help for a command + Hilfe zu einem Befehl erhalten + + + + Options: + Optionen: + + + + Specify configuration file (default: curecoin.conf) + Konfigurationsdatei festlegen (Standard: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + PID-Datei festlegen (Standard: curecoind.pid) + + + + Specify data directory + Datenverzeichnis festlegen + + + + Set database cache size in megabytes (default: 25) + Größe des Datenbankcaches in MB festlegen (Standard: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + <port> nach Verbindungen abhören (Standard: 7951 oder Testnetz: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Maximal <n> Verbindungen zu Gegenstellen aufrechterhalten (Standard: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Mit dem Knoten verbinden um Adressen von Gegenstellen abzufragen, danach trennen + + + + Specify your own public address + Die eigene öffentliche Adresse angeben + + + + Threshold for disconnecting misbehaving peers (default: 100) + Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Anzahl Sekunden, während denen sich nicht konform verhaltenden Gegenstellen die Wiederverbindung verweigert wird (Standard: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Beim Einrichten des abzuhörenden RPC-Ports %u für IPv4 ist ein Fehler aufgetreten: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + <port> nach JSON-RPC-Verbindungen abhören (Standard: 7950 oder Testnetz: 17950) + + + + Accept command line and JSON-RPC commands + Kommandozeilenbefehle und JSON-RPC-Befehle annehmen + + + + Run in the background as a daemon and accept commands + Als Hintergrunddienst starten und Befehle annehmen + + + + Use the test network + Das Testnetz verwenden + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Eingehende Verbindungen annehmen (Standard: 1, wenn nicht -proxy oder -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, Sie müssen den Wert rpcpasswort in dieser Konfigurationsdatei angeben: +%s +Es wird empfohlen das folgende Zufallspasswort zu verwenden: +rpcuser=curecoinrpc +rpcpassword=%s +(Sie müssen sich dieses Passwort nicht merken!) +Der Benutzername und das Passwort dürfen NICHT identisch sein. +Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer. +Es wird ebenfalls empfohlen alertnotify anzugeben, um im Problemfall benachrichtig zu werden; +zum Beispiel: alertnotify=echo %%s | mail -s \"curecoin Alert\" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Beim Einrichten des abzuhörenden RPC-Ports %u für IPv6 ist ein Fehler aufgetreten, es wird auf IPv4 zurückgegriffen: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + An die angegebene Adresse binden und immer abhören. Für IPv6 [Host]:Port-Schreibweise verwenden + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Datenverzeichnis %s kann nicht gesperrt werden. Evtl. wurde curecoin bereits gestartet. + + + + 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. + Fehler: Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige curecoins aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die curecoins dort ausgegeben haben und dies daher in der derzeit aktiven Brieftasche nicht vermerkt ist. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Fehler: Diese Transaktion benötigt aufgrund ihres Betrags, ihrer Komplexität oder der Nutzung kürzlich erhaltener Zahlungen eine Transaktionsgebühr in Höhe von mindestens %s! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Kommando ausführen wenn ein relevanter Alarm empfangen wird (%s im Kommando wird durch die Nachricht ersetzt) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Kommando ausführen wenn sich eine Transaktion der Briefrasche verändert (%s im Kommando wird durch die TxID ersetzt) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Maximale Größe von "high-priority/low-fee"-Transaktionen in Byte festlegen (Standard: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Dies ist eine Vorab-Testversion - Verwendung auf eigene Gefahr - nicht für Mining- oder Handelsanwendungen nutzen! + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Warnung: -paytxfee ist auf einen sehr hohen Wert festgelegt! Dies ist die Gebühr die beim Senden einer Transaktion fällig wird. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Warnung: Angezeigte Transaktionen sind evtl. nicht korrekt! Sie oder die anderen Knoten müssen unter Umständen (den Client) aktualisieren. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Warnung: Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen Ihres Computers, da curecoin ansonsten nicht ordnungsgemäß funktionieren wird! + + + + 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. + + + + 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. + Warnung: wallet.dat beschädigt, Rettung erfolgreich! Original wallet.dat wurde als wallet.{Zeitstempel}.dat in %s gespeichert. Falls Ihr Kontostand oder Transaktionen nicht korrekt sind, sollten Sie von einer Datensicherung wiederherstellen. + + + + Attempt to recover private keys from a corrupt wallet.dat + Versucht private Schlüssel aus einer beschädigten wallet.dat wiederherzustellen + + + + Block creation options: + Blockerzeugungsoptionen: + + + + Connect only to the specified node(s) + Nur mit dem/den angegebenen Knoten verbinden + + + + Corrupted block database detected + Beschädigte Blockdatenbank erkannt + + + + Discover own IP address (default: 1 when listening and no -externalip) + Eigene IP-Adresse erkennen (Standard: 1, wenn abgehört wird und nicht -externalip) + + + + Do you want to rebuild the block database now? + Möchten Sie die Blockdatenbank nun neu aufbauen? + + + + Error initializing block database + Fehler beim Initialisieren der Blockdatenbank + + + + Error initializing wallet database environment %s! + Fehler beim Initialisieren der Brieftaschen-Datenbankumgebung %s! + + + + Error loading block database + Fehler beim Laden der Blockdatenbank + + + + Error opening block database + Fehler beim Öffnen der Blockdatenbank + + + + Error: Disk space is low! + Fehler: Zu wenig freier Laufwerksspeicherplatz! + + + + Error: Wallet locked, unable to create transaction! + Fehler: Brieftasche gesperrt, Transaktion kann nicht erstellt werden! + + + + Error: system error: + Fehler: Systemfehler: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Fehler, es konnte kein Port abgehört werden. Wenn dies so gewünscht wird -listen=0 verwenden. + + + + Failed to read block info + Lesen der Blockinformationen fehlgeschlagen + + + + Failed to read block + Lesen des Blocks fehlgeschlagen + + + + Failed to sync block index + Synchronisation des Blockindex fehlgeschlagen + + + + Failed to write block index + Schreiben des Blockindex fehlgeschlagen + + + + Failed to write block info + Schreiben der Blockinformationen fehlgeschlagen + + + + Failed to write block + Schreiben des Blocks fehlgeschlagen + + + + Failed to write file info + Schreiben der Dateiinformationen fehlgeschlagen + + + + Failed to write to coin database + Schreiben in die Münzendatenbank fehlgeschlagen + + + + Failed to write transaction index + Schreiben des Transaktionsindex fehlgeschlagen + + + + Failed to write undo data + Schreiben der Rücksetzdaten fehlgeschlagen + + + + Find peers using DNS lookup (default: 1 unless -connect) + Gegenstellen via DNS-Namensauflösung finden (Standard: 1, außer bei -connect) + + + + Generate coins (default: 0) + curecoins generieren (Standard: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Wieviele Blöcke sollen beim Starten geprüft werden (Standard: 288, 0 = alle) + + + + How thorough the block verification is (0-4, default: 3) + Wie gründlich soll die Blockprüfung sein (0-4, Standard: 3) + + + + Not enough file descriptors available. + Nicht genügend File-Deskriptoren verfügbar. + + + + Rebuild block chain index from current blk000??.dat files + Blockkettenindex aus aktuellen Dateien blk000??.dat wiederaufbauen + + + + Set the number of threads to service RPC calls (default: 4) + Maximale Anzahl an Threads zur Verarbeitung von RPC-Anfragen festlegen (Standard: 4) + + + + Verifying blocks... + Verifiziere Blöcke... + + + + Verifying wallet... + Verifiziere Brieftasche... + + + + Imports blocks from external blk000??.dat file + Blöcke aus externer Datei blk000??.dat importieren + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Maximale Anzahl an Skript-Verifizierungs-Threads festlegen (bis zu 16, 0 = automatisch, <0 = soviele Kerne frei lassen, Standard: 0) + + + + Information + Hinweis + + + + Invalid -tor address: '%s' + Ungültige Adresse in -tor: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + Ungültiger Betrag für -minrelaytxfee=<amount>: '%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + Ungültiger Betrag für -mintxfee=<amount>: '%s' + + + + Maintain a full transaction index (default: 0) + Einen vollständigen Transaktionsindex pflegen (Standard: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maximale Größe, <n> * 1000 Byte, des Empfangspuffers pro Verbindung (Standard: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maximale Größe, <n> * 1000 Byte, des Sendepuffers pro Verbindung (Standard: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Blockkette nur akzeptieren, wenn sie mit den integrierten Prüfpunkten übereinstimmt (Standard: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Verbinde nur zu Knoten des Netztyps <net> (IPv4, IPv6 oder Tor) + + + + Output extra debugging information. Implies all other -debug* options + Ausgabe zusätzlicher Debugginginformationen. Beinhaltet alle anderen "-debug*"-Parameter + + + + Output extra network debugging information + Ausgabe zusätzlicher Netzwerk-Debugginginformationen + + + + Prepend debug output with timestamp + Der Debugausgabe einen Zeitstempel voranstellen + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL-Optionen: (siehe curecoin-Wiki für SSL-Installationsanweisungen) + + + + Select the version of socks proxy to use (4-5, default: 5) + SOCKS-Version des Proxies festlegen (4-5, Standard: 5) + + + + Send trace/debug info to console instead of debug.log file + Rückverfolgungs- und Debuginformationen an die Konsole senden anstatt sie in die Datei debug.log zu schreiben + + + + Send trace/debug info to debugger + Rückverfolgungs- und Debuginformationen an den Debugger senden + + + + Set maximum block size in bytes (default: 250000) + Maximale Blockgröße in Byte festlegen (Standard: 250000) + + + + Set minimum block size in bytes (default: 0) + Minimale Blockgröße in Byte festlegen (Standard: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Verkleinere Datei debug.log beim Start des Clients (Standard: 1, wenn kein -debug) + + + + Signing transaction failed + Signierung der Transaktion fehlgeschlagen + + + + Specify connection timeout in milliseconds (default: 5000) + Verbindungstimeout in Millisekunden festlegen (Standard: 5000) + + + + System error: + Systemfehler: + + + + Transaction amount too small + Transaktionsbetrag zu gering + + + + Transaction amounts must be positive + Transaktionsbeträge müssen positiv sein + + + + Transaction too large + Transaktion zu groß + + + + Use UPnP to map the listening port (default: 0) + UPnP verwenden, um die Portweiterleitung einzurichten (Standard: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + UPnP verwenden, um die Portweiterleitung einzurichten (Standard: 1, wenn abgehört wird) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Proxy verwenden, um versteckte Tor-Dienste zu erreichen (Standard: identisch mit -proxy) + + + + Username for JSON-RPC connections + Benutzername für JSON-RPC-Verbindungen + + + + Warning + Warnung + + + + Warning: This version is obsolete, upgrade required! + Warnung: Diese Version is veraltet, Aktualisierung erforderlich! + + + + You need to rebuild the databases using -reindex to change -txindex + Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um -txindex zu verändern. + + + + wallet.dat corrupt, salvage failed + wallet.dat beschädigt, Rettung fehlgeschlagen + + + + Password for JSON-RPC connections + Passwort für JSON-RPC-Verbindungen + + + + Allow JSON-RPC connections from specified IP address + JSON-RPC-Verbindungen von der angegebenen IP-Adresse erlauben + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Sende Befehle an Knoten <ip> (Standard: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Kommando ausführen wenn der beste Block wechselt (%s im Kommando wird durch den Hash des Blocks ersetzt) + + + + Upgrade wallet to latest format + Brieftasche auf das neueste Format aktualisieren + + + + Set key pool size to <n> (default: 100) + Größe des Schlüsselpools festlegen auf <n> (Standard: 100) + + + + Rescan the block chain for missing wallet transactions + Blockkette erneut nach fehlenden Transaktionen der Brieftasche durchsuchen + + + + Use OpenSSL (https) for JSON-RPC connections + OpenSSL (https) für JSON-RPC-Verbindungen verwenden + + + + Server certificate file (default: server.cert) + Serverzertifikat (Standard: server.cert) + + + + Server private key (default: server.pem) + Privater Serverschlüssel (Standard: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Akzeptierte Chiffren (Standard: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Dieser Hilfetext + + + + 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) + + + + Connect through socks proxy + Verbindung über SOCKS-Proxy herstellen + + + + Allow DNS lookups for -addnode, -seednode and -connect + Erlaube DNS-Namensauflösung für -addnode, -seednode und -connect + + + + Loading addresses... + Lade Adressen... + + + + Error loading wallet.dat: Wallet corrupted + Fehler beim Laden von wallet.dat: Brieftasche beschädigt + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Fehler beim Laden von wallet.dat: Brieftasche benötigt neuere Version von curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Brieftasche musste neu geschrieben werden: Starten Sie curecoin zur Fertigstellung neu + + + + Error loading wallet.dat + Fehler beim Laden von wallet.dat (Brieftasche) + + + + Invalid -proxy address: '%s' + Ungültige Adresse in -proxy: '%s' + + + + Unknown network specified in -onlynet: '%s' + Unbekannter Netztyp in -onlynet angegeben: '%s' + + + + Unknown -socks proxy version requested: %i + Unbekannte Proxyversion in -socks angefordert: %i + + + + Cannot resolve -bind address: '%s' + Kann Adresse in -bind nicht auflösen: '%s' + + + + Cannot resolve -externalip address: '%s' + Kann Adresse in -externalip nicht auflösen: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Ungültiger Betrag für -paytxfee=<amount>: '%s' + + + + Invalid amount + Ungültiger Betrag + + + + Insufficient funds + Unzureichender Kontostand + + + + Loading block index... + Lade Blockindex... + + + + Add a node to connect to and attempt to keep the connection open + Mit dem Knoten verbinden und versuchen die Verbindung aufrecht zu halten + + + + Unable to bind to %s on this computer. curecoin is probably already running. + Kann auf diesem Computer nicht an %s binden. Evtl. wurde curecoin bereits gestartet. + + + + Fee per KB to add to transactions you send + Gebühr pro KB, die gesendeten Transaktionen hinzugefügt wird + + + + Loading wallet... + Lade Brieftasche... + + + + Cannot downgrade wallet + Brieftasche kann nicht auf eine ältere Version herabgestuft werden + + + + Cannot write default address + Standardadresse kann nicht geschrieben werden + + + + Rescanning... + Durchsuche erneut... + + + + Done loading + Laden abgeschlossen + + + + To use the %s option + Zur Nutzung der %s Option + + + + Error + Fehler + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Sie müssen den Wert rpcpassword=<passwort> in der Konfigurationsdatei angeben: +%s +Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_el_GR.qm b/src/qt/locale/curecoin_el_GR.qm new file mode 100644 index 0000000..28ecb79 Binary files /dev/null and b/src/qt/locale/curecoin_el_GR.qm differ diff --git a/src/qt/locale/curecoin_el_GR.ts b/src/qt/locale/curecoin_el_GR.ts new file mode 100644 index 0000000..156785e --- /dev/null +++ b/src/qt/locale/curecoin_el_GR.ts @@ -0,0 +1,2941 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Σχετικά με το curecoin + + + + <b>curecoin</b> version + Έκδοση curecoin + + + + +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. + +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. + + + + Copyright + Πνευματική ιδιοκτησία + + + + Dr. Kimoto Chan + Dr. Kimoto Chan + + + + 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 curecoin 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. + Αυτές είναι οι curecoin διευθύνσεις σας για να λαμβάνετε πληρωμές. Δίνοντας μία ξεχωριστή διεύθυνση σε κάθε αποστολέα, θα μπορείτε να ελέγχετε ποιος σας πληρώνει. + + + + &Copy Address + &Αντιγραφή διεύθυνσης + + + + Show &QR Code + Δείξε &QR κωδικα + + + + Sign a message to prove you own a curecoin address + Υπογράψτε ένα μήνυμα για ν' αποδείξετε πως σας ανήκει μια συγκεκριμένη διεύθυνση curecoin + + + + Sign &Message + &Υπέγραψε το μήνυμα + + + + Delete the currently selected address from the list + Αντιγραφη της επιλεγμενης διεύθυνσης στο πρόχειρο του συστηματος + + + + Export the data in the current tab to a file + Εξαγωγή δεδομένων καρτέλας σε αρχείο + + + + &Export + &Εξαγωγή + + + + Verify a message to ensure it was signed with a specified curecoin address + Υπογράψτε ένα μήνυμα για ν' αποδείξετε πως ανήκει μια συγκεκριμένη διεύθυνση curecoin + + + + &Verify Message + &Επιβεβαίωση μηνύματος + + + + &Delete + &Διαγραφή + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Αυτές είναι οι curecoin διευθύνσεις σας για να λαμβάνετε πληρωμές. Δίνοντας μία ξεχωριστή διεύθυνση σε κάθε αποστολέα, θα μπορείτε να ελέγχετε ποιος σας πληρώνει. + + + + Copy &Label + Αντιγραφή &επιγραφής + + + + &Edit + &Επεξεργασία + + + + Send &Coins + Αποστολή νομισμάτων + + + + Export Address Book Data + Εξαγωγή Δεδομενων Βιβλίου Διευθύνσεων + + + + Comma separated file (*.csv) + Αρχείο οριοθετημένο με κόμματα (*.csv) + + + + Error exporting + Εξαγωγή λαθών + + + + Could not write to file %1. + Αδυναμία εγγραφής στο αρχείο %1. + + + + AddressTableModel + + + Label + Ετικέτα + + + + Address + Διεύθυνση + + + + (no label) + (χωρίς ετικέτα) + + + + AskPassphraseDialog + + + Passphrase Dialog + Φράση πρόσβασης + + + + Enter passphrase + Βάλτε κωδικό πρόσβασης + + + + New passphrase + Νέος κωδικός πρόσβασης + + + + Repeat new passphrase + Επανέλαβε τον νέο κωδικό πρόσβασης + + + + 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>. + Εισάγετε τον νέο κωδικό πρόσβασης στον πορτοφόλι <br/> Παρακαλώ χρησιμοποιείστε ένα κωδικό με <b> 10 ή περισσότερους τυχαίους χαρακτήρες</b> ή <b> οχτώ ή παραπάνω λέξεις</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 curecoinS</b>! + Προσοχη: Εαν κρυπτογραφησεις το πορτοφολι σου και χάσεις τον κωδικο σου θα χάσεις <b> ΟΛΑ ΣΟΥ ΤΑ curecoinS</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! + Προσοχη: το πλήκτρο Caps Lock είναι ενεργο. + + + + + Wallet encrypted + Κρυπτογραφημενο πορτοφολι + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + Το curecoin θα κλεισει τώρα για να τελειώσει την διαδικασία κρυπτογραφησης. Θυμησου ότι κρυπτογραφώντας το πορτοφολι σου δεν μπορείς να προστατέψεις πλήρως τα curecoins σου από κλοπή στην περίπτωση όπου μολυνθεί ο υπολογιστής σου με κακόβουλο λογισμικο. + + + + + + + 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. + Ο κωδικος του πορτοφολιού άλλαξε με επιτυχία. + + + + curecoinGUI + + + Sign &message... + Υπογραφή &Μηνύματος... + + + + Synchronizing with network... + Συγχρονισμός με το δίκτυο... + + + + &Overview + &Επισκόπηση + + + + Show general overview of wallet + Εμφάνισε γενική εικονα του πορτοφολιού + + + + &Transactions + &Συναλλαγές + + + + Browse transaction history + Περιήγηση στο ιστορικο συνναλαγων + + + + Edit the list of stored addresses and labels + Εξεργασια της λιστας των αποθηκευμενων διευθύνσεων και ετικετων + + + + Show the list of addresses for receiving payments + Εμφάνισε την λίστα των διευθύνσεων για την παραλαβή πληρωμων + + + + E&xit + Έ&ξοδος + + + + Quit application + Εξοδος από την εφαρμογή + + + + Show information about curecoin + Εμφάνισε πληροφορίες σχετικά με το curecoin + + + + About &Qt + Σχετικά με &Qt + + + + Show information about Qt + Εμφάνισε πληροφορίες σχετικά με Qt + + + + &Options... + &Επιλογές... + + + + &Encrypt Wallet... + &Κρυπτογράφησε το πορτοφόλι + + + + &Backup Wallet... + &Αντίγραφο ασφαλείας του πορτοφολιού + + + + &Change Passphrase... + &Άλλαξε κωδικο πρόσβασης + + + + Importing blocks from disk... + Εισαγωγή μπλοκ από τον σκληρο δίσκο ... + + + + Reindexing blocks on disk... + Φόρτωση ευρετηρίου μπλοκ στον σκληρο δισκο... + + + + Send coins to a curecoin address + Στείλε νομισματα σε μια διεύθυνση curecoin + + + + Modify configuration options for curecoin + Επεργασία ρυθμισεων επιλογών για το curecoin + + + + Backup wallet to another location + Δημιουργία αντιγράφου ασφαλείας πορτοφολιού σε άλλη τοποθεσία + + + + Change the passphrase used for wallet encryption + Αλλαγή του κωδικού κρυπτογράφησης του πορτοφολιού + + + + &Debug window + &Παράθυρο αποσφαλμάτωσης + + + + Open debugging and diagnostic console + Άνοιγμα κονσόλας αποσφαλμάτωσης και διαγνωστικών + + + + &Verify message... + &Επιβεβαίωση μηνύματος + + + + + curecoin + curecoin + + + + Wallet + Πορτοφόλι + + + + &Send + &Αποστολή + + + + &Receive + &Παραλαβή + + + + &Addresses + &Διεύθυνσεις + + + + &About curecoin + &Σχετικα:curecoin + + + + &Show / Hide + &Εμφάνισε/Κρύψε + + + + Show or hide the main Window + Εμφάνιση ή αποκρύψη του κεντρικου παράθυρου + + + + Encrypt the private keys that belong to your wallet + Κρυπτογραφήστε τα ιδιωτικά κλειδιά που ανήκουν στο πορτοφόλι σας + + + + Sign messages with your curecoin addresses to prove you own them + Υπογράψτε ένα μήνυμα για να βεβαιώσετε πως είστε ο κάτοχος αυτής της διεύθυνσης + + + + Verify messages to ensure they were signed with specified curecoin addresses + Υπογράψτε ένα μήνυμα για ν' αποδείξετε πως ανήκει μια συγκεκριμένη διεύθυνση curecoin + + + + &File + &Αρχείο + + + + &Settings + &Ρυθμίσεις + + + + &Help + &Βοήθεια + + + + Tabs toolbar + Εργαλειοθήκη καρτελών + + + + + [testnet] + [testnet] + + + + curecoin client + Πελάτης curecoin + + + + %n active connection(s) to curecoin network + %n ενεργή σύνδεση στο δίκτυο curecoin%n ενεργές συνδέσεις στο δίκτυο Βitcoin + + + + No block source available... + Η πηγή του μπλοκ δεν ειναι διαθέσιμη... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Μεταποιημένα %1 απο % 2 (κατ 'εκτίμηση) μπλοκ της ιστορίας της συναλλαγής. + + + + Processed %1 blocks of transaction history. + Έγινε λήψη %1 μπλοκ ιστορικού συναλλαγών + + + + %n hour(s) + %n ώρες %n ώρες + + + + %n day(s) + %n ημέρες %n ημέρες + + + + %n week(s) + %n εβδομαδες%n εβδομαδες + + + + %1 behind + %1 πίσω + + + + Last received block was generated %1 ago. + Το τελευταίο μπλοκ που ελήφθη δημιουργήθηκε %1 πριν. + + + + Transactions after this will not yet be visible. + Οι συναλλαγές μετά από αυτό δεν θα είναι ακόμη ορατες. + + + + Error + Σφάλμα + + + + Warning + Προειδοποίηση + + + + Information + Πληροφορία + + + + 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, η οποία αποδίδεται στους κόμβους που επεξεργάζονται τις συναλλαγές και βοηθούν στην υποστήριξη του δικτύου. +Θέλετε να συνεχίσετε; + + + + Up to date + Ενημερωμένο + + + + Catching up... + Ενημέρωση... + + + + 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 curecoin address or malformed URI parameters. + Το URI δεν μπορεί να αναλυθεί! Αυτό μπορεί να προκληθεί από μια μη έγκυρη διεύθυνση curecoin ή ακατάλληλη παραμέτρο 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Παρουσιάστηκε ανεπανόρθωτο σφάλμα. Το curecoin δεν μπορεί πλέον να συνεχίσει με ασφάλεια και θα τερματισθει. + + + + ClientModel + + + Network Alert + Ειδοποίηση Δικτύου + + + + 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. + Η διεύθυνση "%1" βρίσκεται ήδη στο βιβλίο διευθύνσεων. + + + + The entered address "%1" is not a valid curecoin address. + Η διεύθυνση "%1" δεν είναι έγκυρη curecoin διεύθυνση. + + + + Could not unlock wallet. + Δεν είναι δυνατό το ξεκλείδωμα του πορτοφολιού. + + + + New key generation failed. + Η δημιουργία νέου κλειδιού απέτυχε. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-qt + + + + version + έκδοση + + + + Usage: + Χρήση: + + + + command-line options + επιλογής γραμμής εντολών + + + + UI options + επιλογές UI + + + + Set language, for example "de_DE" (default: system locale) + Όρισε γλώσσα, για παράδειγμα "de_DE"(προεπιλογή:τοπικές ρυθμίσεις) + + + + Start minimized + Έναρξη ελαχιστοποιημένο + + + + Show splash screen on startup (default: 1) + Εμφάνισε την οθόνη εκκίνησης κατά την εκκίνηση(προεπιλογή:1) + + + + OptionsDialog + + + Options + Ρυθμίσεις + + + + &Main + &Κύριο + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Η προαιρετική αμοιβή για κάθε kB επισπεύδει την επεξεργασία των συναλλαγών σας. Οι περισσότερες συναλλαγές είναι 1 kB. + + + + Pay transaction &fee + Αμοιβή &συναλλαγής + + + + Automatically start curecoin after logging in to the system. + Αυτόματη εκκίνηση του curecoin μετά την εισαγωγή στο σύστημα + + + + &Start curecoin on system login + &Έναρξη του Βιtcoin κατά την εκκίνηση του συστήματος + + + + Reset all client options to default. + Επαναφορα όλων των επιλογων του πελάτη σε default. + + + + &Reset Options + Επαναφορα ρυθμίσεων + + + + &Network + &Δίκτυο + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Αυτόματο άνοιγμα των θυρών curecoin στον δρομολογητή. Λειτουργεί μόνο αν ο δρομολογητής σας υποστηρίζει τη λειτουργία UPnP. + + + + Map port using &UPnP + Απόδοση θυρών με χρήστη &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Σύνδεση στο curecoin δίκτυο μέσω διαμεσολαβητή SOCKS4 (π.χ. για σύνδεση μέσω Tor) + + + + &Connect through SOCKS proxy: + &Σύνδεση μέσω διαμεσολαβητή SOCKS + + + + Proxy &IP: + &IP διαμεσολαβητή: + + + + IP address of the proxy (e.g. 127.0.0.1) + Διεύθυνση IP του διαμεσολαβητή (π.χ. 127.0.0.1) + + + + &Port: + &Θύρα: + + + + Port of the proxy (e.g. 9050) + Θύρα διαμεσολαβητή + + + + SOCKS &Version: + SOCKS &Έκδοση: + + + + SOCKS version of the proxy (e.g. 5) + SOCKS εκδοση του διαμεσολαβητη (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 curecoin. + Εδώ μπορεί να ρυθμιστεί η γλώσσα διεπαφής χρήστη. Αυτή η ρύθμιση θα ισχύσει μετά την επανεκκίνηση του curecoin. + + + + &Unit to show amounts in: + &Μονάδα μέτρησης: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Διαλέξτε την προεπιλεγμένη υποδιαίρεση που θα εμφανίζεται όταν στέλνετε νομίσματα. + + + + Whether to show curecoin addresses in the transaction list or not. + Επιλέξτε αν θέλετε να εμφανίζονται οι διευθύνσεις curecoin στη λίστα συναλλαγών. + + + + &Display addresses in transaction list + Εμφάνιση διευθύνσεων στη λίστα συναλλαγών + + + + &OK + &ΟΚ + + + + &Cancel + &Ακύρωση + + + + &Apply + &Εφαρμογή + + + + default + προεπιλογή + + + + Confirm options reset + Επιβεβαιώση των επιλογων επαναφοράς + + + + Some settings may require a client restart to take effect. + Για ορισμένες ρυθμίσεις πρεπει η επανεκκίνηση να τεθεί σε ισχύ. + + + + Do you want to proceed? + Θέλετε να προχωρήσετε; + + + + + Warning + Προειδοποίηση + + + + + This setting will take effect after restarting curecoin. + Αυτή η ρύθμιση θα ισχύσει μετά την επανεκκίνηση του curecoin. + + + + The supplied proxy address is invalid. + Δεν είναι έγκυρη η διεύθυνση διαμεσολαβητή + + + + OverviewPage + + + Form + Φόρμα + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Οι πληροφορίες που εμφανίζονται μπορεί να είναι ξεπερασμένες. Το πορτοφόλι σας συγχρονίζεται αυτόματα με το δίκτυο curecoin μετά από μια σύνδεση, αλλά αυτή η διαδικασία δεν έχει ακόμη ολοκληρωθεί. + + + + Balance: + Υπόλοιπο + + + + Unconfirmed: + Ανεπιβεβαίωτες + + + + Wallet + Πορτοφόλι + + + + Immature: + Ανώριμος + + + + Mined balance that has not yet matured + Εξορυγμενο υπόλοιπο που δεν έχει ακόμα ωριμάσει + + + + <b>Recent transactions</b> + <b>Πρόσφατες συναλλαγές</b> + + + + Your current balance + Το τρέχον υπόλοιπο + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Το άθροισμα των συναλλαγών που δεν έχουν ακόμα επιβεβαιωθεί και δεν προσμετρώνται στο τρέχον υπόλοιπό σας + + + + + out of sync + εκτός συγχρονισμού + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + Δεν είναι δυνατή η εκκίνηση του curecoin: click-to-pay handler + + + + QRCodeDialog + + + QR Code Dialog + Κώδικας QR + + + + Request Payment + Αίτηση πληρωμής + + + + Amount: + Ποσό: + + + + Label: + Επιγραφή: + + + + Message: + Μήνυμα: + + + + &Save As... + &Αποθήκευση ως... + + + + Error encoding URI into QR Code. + Σφάλμα κατά την κωδικοποίηση του URI σε κώδικα QR + + + + The entered amount is invalid, please check. + Το αναγραφόμενο ποσό δεν είναι έγκυρο, παρακαλούμε να το ελέγξετε. + + + + Resulting URI too long, try to reduce the text for label / message. + Το αποτέλεσμα της διεύθυνσης είναι πολύ μεγάλο. Μειώστε το μέγεθος για το κείμενο της ετικέτας/ μηνύματος. + + + + Save QR Code + Αποθήκευση κώδικα QR + + + + PNG Images (*.png) + Εικόνες PNG (*.png) + + + + RPCConsole + + + Client name + Όνομα Πελάτη + + + + + + + + + + + + + N/A + Μη διαθέσιμο + + + + Client version + Έκδοση Πελάτη + + + + &Information + &Πληροφορία + + + + Using OpenSSL version + Χρησιμοποιηση της OpenSSL εκδοσης + + + + Startup time + Χρόνος εκκίνησης + + + + Network + Δίκτυο + + + + Number of connections + Αριθμός συνδέσεων + + + + On testnet + Στο testnet + + + + Block chain + αλυσίδα εμποδισμού + + + + Current number of blocks + Τρέχον αριθμός μπλοκ + + + + Estimated total blocks + Κατ' εκτίμηση συνολικά μπλοκς + + + + Last block time + Χρόνος τελευταίου μπλοκ + + + + &Open + &Άνοιγμα + + + + Command-line options + επιλογής γραμμής εντολών + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Εμφανιση του curecoin-Qt μήνυματος βοήθειας για να πάρετε μια λίστα με τις πιθανές επιλογές curecoin γραμμής εντολών. + + + + &Show + &Εμφάνιση + + + + &Console + &Κονσόλα + + + + Build date + Ημερομηνία κατασκευής + + + + curecoin - Debug window + curecoin - Παράθυρο αποσφαλμάτωσης + + + + curecoin Core + curecoin Core + + + + Debug log file + Αρχείο καταγραφής εντοπισμού σφαλμάτων + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Ανοίξτε το αρχείο καταγραφής εντοπισμού σφαλμάτων από τον τρέχοντα κατάλογο δεδομένων. Αυτό μπορεί να πάρει μερικά δευτερόλεπτα για τα μεγάλα αρχεία καταγραφής. + + + + Clear console + Καθαρισμός κονσόλας + + + + Welcome to the curecoin RPC console. + Καλώς ήρθατε στην curecoin RPC κονσόλα. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Χρησιμοποιήστε το πάνω και κάτω βέλος για να περιηγηθείτε στο ιστορικο, και <b>Ctrl-L</b> για εκκαθαριση οθονης. + + + + Type <b>help</b> for an overview of available commands. + Γράψτε <b>βοήθεια</b> για μια επισκόπηση των διαθέσιμων εντολών + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Αποστολή νομισμάτων + + + + Send to multiple recipients at once + Αποστολή σε πολλούς αποδέκτες ταυτόχρονα + + + + Add &Recipient + &Προσθήκη αποδέκτη + + + + Remove all transaction fields + Διαγραφή όλων των πεδίων συναλλαγής + + + + Clear &All + Καθαρισμός &Όλων + + + + Balance: + Υπόλοιπο: + + + + 123.456 BTC + 123,456 BTC + + + + Confirm the send action + Επιβεβαίωση αποστολής + + + + S&end + Αποστολη + + + + <b>%1</b> to %2 (%3) + <b>%1</b> σε %2 (%3) + + + + Confirm send coins + Επιβεβαίωση αποστολής νομισμάτων + + + + Are you sure you want to send %1? + Είστε βέβαιοι για την αποστολή %1; + + + + and + και + + + + The recipient address is not valid, please recheck. + Η διεύθυνση του αποδέκτη δεν είναι σωστή. Παρακαλώ ελέγξτε ξανά. + + + + The amount to pay must be larger than 0. + Το ποσό πληρωμής πρέπει να είναι μεγαλύτερο από 0. + + + + The amount exceeds your balance. + Το ποσό ξεπερνάει το διαθέσιμο υπόλοιπο + + + + The total exceeds your balance when the %1 transaction fee is included. + Το σύνολο υπερβαίνει το υπόλοιπό σας όταν συμπεριληφθεί και η αμοιβή %1 + + + + 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. + Σφάλμα: Η συναλλαγή απερρίφθη. Αυτό ενδέχεται να συμβαίνει αν κάποια από τα νομίσματα έχουν ήδη ξοδευθεί, όπως αν χρησιμοποιήσατε αντίγραφο του wallet.dat και τα νομίσματα ξοδεύθηκαν εκεί. + + + + SendCoinsEntry + + + Form + Φόρμα + + + + A&mount: + &Ποσό: + + + + Pay &To: + Πληρωμή &σε: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Διεύθυνση αποστολής της πληρωμής (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Enter a label for this address to add it to your address book + Εισάγετε μια επιγραφή για αυτή τη διεύθυνση ώστε να καταχωρηθεί στο βιβλίο διευθύνσεων + + + + &Label: + &Επιγραφή + + + + Choose address from address book + Επιλογή διεύθυνσης από το βιβλίο διευθύνσεων + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Επικόλληση διεύθυνσης από το πρόχειρο + + + + Alt+P + Alt+P + + + + Remove this recipient + Αφαίρεση αποδέκτη + + + + Enter a curecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Εισάγετε μια διεύθυνση curecoin (π.χ. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Εισάγετε μια διεύθυνση curecoin (π.χ. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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 + Εισάγετε εδώ το μήνυμα που θέλετε να υπογράψετε + + + + Signature + Υπογραφή + + + + Copy the current signature to the system clipboard + Αντέγραφη της επιλεγμενης διεύθυνσης στο πρόχειρο του συστηματος + + + + Sign the message to prove you own this curecoin address + Υπογράψτε ένα μήνυμα για ν' αποδείξετε πως σας ανήκει μια συγκεκριμένη διεύθυνση curecoin + + + + Sign &Message + Υπογραφη μήνυματος + + + + 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. + Πληκτρολογήστε την υπογραφή διεύθυνσης, μήνυμα (βεβαιωθείτε ότι έχετε αντιγράψει τις αλλαγές γραμμής, κενά, tabs, κ.λπ. ακριβώς) και την υπογραφή παρακάτω, για να ελέγξει το μήνυμα. Να είστε προσεκτικοί για να μην διαβάσετε περισσότερα στην υπογραφή ό, τι είναι στην υπογραφή ίδιο το μήνυμα , για να μην εξαπατηθούν από έναν άνθρωπο -in - the-middle επίθεση. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Εισάγετε μια διεύθυνση curecoin (π.χ. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Υπογράψτε ένα μήνυμα για ν' αποδείξετε πως υπογραφθηκε απο μια συγκεκριμένη διεύθυνση curecoin + + + + Verify &Message + Επιβεβαίωση μηνύματος + + + + Reset all verify message fields + Επαναφορά όλων επαλήθευμενων πεδίων μήνυματος + + + + + Enter a curecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Εισάγετε μια διεύθυνση curecoin (π.χ. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Κάντε κλικ στο "Υπογραφή Μηνύματος" για να λάβετε την υπογραφή + + + + Enter curecoin signature + Εισαγωγή υπογραφής curecoin + + + + + 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. + Μήνυμα επιβεβαιώθηκε. + + + + SplashScreen + + + Dr. Kimoto Chan + Dr. Kimoto Chan + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Ανοιχτό μέχρι %1 + + + + %1/offline + %1/χωρίς σύνδεση; + + + + %1/unconfirmed + %1/χωρίς επιβεβαίωση + + + + %1 confirmations + %1 επιβεβαιώσεις + + + + Status + Κατάσταση + + + + , broadcast through %n node(s) + , έχει μεταδοθεί μέσω %n κόμβων, έχει μεταδοθεί μέσω %n κόμβων + + + + Date + Ημερομηνία + + + + Source + Πηγή + + + + Generated + Δημιουργία + + + + + From + Από + + + + + + To + Προς + + + + + own address + δική σας διεύθυνση + + + + label + eπιγραφή + + + + + + + + Credit + Πίστωση + + + + matures in %n more block(s) + ωρίμανση σε %n επιπλέον μπλοκωρίμανση σε %n επιπλέον μπλοκ + + + + not accepted + μη αποδεκτό + + + + + + + Debit + Debit + + + + Transaction fee + Τέλος συναλλαγής + + + + Net amount + Καθαρό ποσό + + + + Message + Μήνυμα + + + + Comment + Σχόλιο: + + + + Transaction ID + ID Συναλλαγής: + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Πρέπει να περιμένετε 120 μπλοκ πριν μπορέσετε να χρησιμοποιήσετε τα νομίσματα που έχετε δημιουργήσει. Το μπλοκ που δημιουργήσατε μεταδόθηκε στο δίκτυο για να συμπεριληφθεί στην αλυσίδα των μπλοκ. Αν δεν μπει σε αυτή θα μετατραπεί σε "μη αποδεκτό" και δε θα μπορεί να καταναλωθεί. Αυτό συμβαίνει σπάνια όταν κάποιος άλλος κόμβος δημιουργήσει ένα μπλοκ λίγα δευτερόλεπτα πριν από εσάς. + + + + Debug information + Πληροφορίες αποσφαλμάτωσης + + + + Transaction + Συναλλαγή + + + + Inputs + εισροές + + + + Amount + Ποσό + + + + true + αληθής + + + + false + αναληθής + + + + , has not been successfully broadcast yet + , δεν έχει ακόμα μεταδοθεί μ' επιτυχία + + + + Open for %n more block(s) + Ανοιχτό για %n μπλοκΑνοιχτό για %n μπλοκ + + + + unknown + άγνωστο + + + + TransactionDescDialog + + + Transaction details + Λεπτομέρειες συναλλαγής + + + + This pane shows a detailed description of the transaction + Αυτό το παράθυρο δείχνει μια λεπτομερή περιγραφή της συναλλαγής + + + + TransactionTableModel + + + Date + Ημερομηνία + + + + Type + Τύπος + + + + Address + Διεύθυνση + + + + Amount + Ποσό + + + + Open for %n more block(s) + Ανοιχτό για %n μπλοκΑνοιχτό για %n μπλοκ + + + + Open until %1 + Ανοιχτό μέχρι %1 + + + + Offline (%1 confirmations) + Χωρίς σύνδεση (%1 επικυρώσεις) + + + + Unconfirmed (%1 of %2 confirmations) + Χωρίς επιβεβαίωση (%1 από %2 επικυρώσεις) + + + + Confirmed (%1 confirmations) + Επικυρωμένη (%1 επικυρώσεις) + + + + Mined balance will be available when it matures in %n more block(s) + Το υπόλοιπο από την εξόρυξη θα είναι διαθέσιμο μετά από %n μπλοκΤο υπόλοιπο από την εξόρυξη θα είναι διαθέσιμο μετά από %n μπλοκ + + + + 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 + Αντιγραφη του ID Συναλλαγής + + + + Edit label + Επεξεργασία επιγραφής + + + + Show transaction details + Εμφάνιση λεπτομερειών συναλλαγής + + + + Export Transaction Data + Εξαγωγή Στοιχείων Συναλλαγών + + + + Comma separated file (*.csv) + Αρχείο οριοθετημένο με κόμματα (*.csv) + + + + Confirmed + Επικυρωμένες + + + + Date + Ημερομηνία + + + + Type + Τύπος + + + + Label + Επιγραφή + + + + Address + Διεύθυνση + + + + Amount + Ποσό + + + + ID + ID + + + + Error exporting + Σφάλμα εξαγωγής + + + + Could not write to file %1. + Αδυναμία εγγραφής στο αρχείο %1. + + + + Range: + Έκταση: + + + + to + έως + + + + WalletModel + + + Send Coins + Αποστολή νομισμάτων + + + + WalletView + + + &Export + &Εξαγωγή + + + + Export the data in the current tab to a file + Εξαγωγή δεδομένων καρτέλας σε αρχείο + + + + Backup Wallet + Αντίγραφο ασφαλείας του πορτοφολιού + + + + Wallet Data (*.dat) + Αρχεία δεδομένων πορτοφολιού (*.dat) + + + + Backup Failed + Αποτυχία κατά τη δημιουργία αντιγράφου + + + + There was an error trying to save the wallet data to the new location. + Παρουσιάστηκε σφάλμα κατά την αποθήκευση των δεδομένων πορτοφολιού στη νέα τοποθεσία. + + + + Backup Successful + Η δημιουργια αντιγραφου ασφαλειας πετυχε + + + + The wallet data was successfully saved to the new location. + Τα δεδομένα πορτοφόλιου αποθηκεύτηκαν με επιτυχία στη νέα θέση. + + + + curecoin-core + + + curecoin version + Έκδοση curecoin + + + + Usage: + Χρήση: + + + + Send command to -server or curecoind + Αποστολή εντολής στον εξυπηρετητή ή στο curecoind + + + + List commands + Λίστα εντολών + + + + Get help for a command + Επεξήγηση εντολής + + + + Options: + Επιλογές: + + + + Specify configuration file (default: curecoin.conf) + Ορίστε αρχείο ρυθμίσεων (προεπιλογή: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Ορίστε αρχείο pid (προεπιλογή: curecoind.pid) + + + + Specify data directory + Ορισμός φακέλου δεδομένων + + + + Set database cache size in megabytes (default: 25) + Όρισε το μέγεθος της βάσης προσωρινής αποθήκευσης σε megabytes(προεπιλογή:25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Εισερχόμενες συνδέσεις στη θύρα <port> (προεπιλογή: 7951 ή στο testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Μέγιστες αριθμός συνδέσεων με τους peers <n> (προεπιλογή: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Σύνδεση σε έναν κόμβο για την ανάκτηση διευθύνσεων από ομοτίμους, και αποσυνδέσh + + + + Specify your own public address + Διευκρινίστε τη δικιά σας δημόσια διεύθυνση. + + + + Threshold for disconnecting misbehaving peers (default: 100) + Όριο αποσύνδεσης προβληματικών peers (προεπιλογή: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Δευτερόλεπτα πριν επιτραπεί ξανά η σύνδεση των προβληματικών peers (προεπιλογή: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Ένα σφάλμα συνέβη καθώς προετοιμαζόταν η πόρτα RPC %u για αναμονή IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Εισερχόμενες συνδέσεις JSON-RPC στη θύρα <port> (προεπιλογή: 7950 or testnet: 17950) + + + + Accept command line and JSON-RPC commands + Αποδοχή εντολών κονσόλας και JSON-RPC + + + + 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) + Να δέχεσαι συνδέσεις από έξω(προεπιλογή:1) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Ένα σφάλμα συνέβη καθώς προετοιμαζόταν η υποδοχη RPC %u για αναμονη του IPv6, επεσε πισω στο IPv4:%s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Αποθηκευση σε συγκεκριμένη διεύθυνση. Χρησιμοποιήστε τα πλήκτρα [Host] : συμβολισμός θύρα για IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Αδυναμία κλειδώματος του φακέλου δεδομένων %s. Πιθανώς το curecoin να είναι ήδη ενεργό. + + + + 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: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Σφάλμα: Αυτή η συναλλαγή απαιτεί αμοιβή συναλλαγής τουλάχιστον %s λόγω του μεγέθους, πολυπλοκότητας ή της χρήσης πρόσφατης παραλαβής κεφαλαίου + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Εκτέλεση της εντολής όταν το καλύτερο μπλοκ αλλάξει(%s στην εντολή αντικαθίσταται από το hash του μπλοκ) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Εκτέλεσε την εντολή όταν το καλύτερο μπλοκ αλλάξει(%s στην εντολή αντικαθίσταται από το hash του μπλοκ) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Ορίστε το μέγιστο μέγεθος των high-priority/low-fee συναλλαγων σε bytes (προεπιλογή: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Αυτό είναι ένα προ-τεστ κυκλοφορίας - χρησιμοποιήστε το με δική σας ευθύνη - δεν χρησιμοποιείτε για εξόρυξη ή για αλλες εφαρμογές + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Προειδοποίηση: Η παράμετρος -paytxfee είναι πολύ υψηλή. Πρόκειται για την αμοιβή που θα πληρώνετε για κάθε συναλλαγή που θα στέλνετε. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Προειδοποίηση: Εμφανίσεις συναλλαγων δεν μπορεί να είναι σωστες! Μπορεί να χρειαστεί να αναβαθμίσετε, ή άλλοι κόμβοι μπορεί να χρειαστεί να αναβαθμίστουν. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Προειδοποίηση: Παρακαλώ βεβαιωθείτε πως η ημερομηνία κι ώρα του συστήματός σας είναι σωστές. Αν το ρολόι του υπολογιστή σας πάει λάθος, ενδέχεται να μη λειτουργεί σωστά το curecoin. + + + + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + Προειδοποίηση : Σφάλμα wallet.dat κατα την ανάγνωση ! Όλα τα κλειδιά αναγνωρισθηκαν σωστά, αλλά τα δεδομένα των συναλλαγών ή καταχωρήσεις στο βιβλίο διευθύνσεων μπορεί να είναι ελλιπείς ή λανθασμένα. + + + + 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. + Προειδοποίηση : το αρχειο wallet.dat ειναι διεφθαρμένο, τα δεδομένα σώζονται ! Original wallet.dat αποθηκεύονται ως πορτοφόλι { timestamp } bak στο % s ? . . Αν το υπόλοιπο του ή τις συναλλαγές σας, είναι λάθος θα πρέπει να επαναφέρετε από ένα αντίγραφο ασφαλείας + + + + Attempt to recover private keys from a corrupt wallet.dat + Προσπάθεια για ανακτησει ιδιωτικων κλειδιων από ενα διεφθαρμένο αρχειο wallet.dat + + + + Block creation options: + Αποκλεισμός επιλογων δημιουργίας: + + + + Connect only to the specified node(s) + Σύνδεση μόνο με ορισμένους κόμβους + + + + Corrupted block database detected + Εντοπισθηκε διεφθαρμενη βαση δεδομενων των μπλοκ + + + + Discover own IP address (default: 1 when listening and no -externalip) + Ανακαλύψτε την δικη σας IP διεύθυνση (προεπιλογή: 1 όταν ακούει και δεν - externalip) + + + + Do you want to rebuild the block database now? + Θελετε να δημιουργηθει τωρα η βαση δεδομενων του μπλοκ? + + + + Error initializing block database + Σφάλμα κατά την ενεργοποίηση της βάσης δεδομένων μπλοκ + + + + Error initializing wallet database environment %s! + Σφάλμα κατά την ενεργοποίηση της βάσης δεδομένων πορτοφόλιου %s! + + + + Error loading block database + Σφάλμα φορτωσης της βασης δεδομενων των μπλοκ + + + + Error opening block database + Σφάλμα φορτωσης της βασης δεδομενων των μπλοκ + + + + Error: Disk space is low! + Προειδοποίηση: Χαμηλός χώρος στο δίσκο + + + + Error: Wallet locked, unable to create transaction! + Σφάλμα: το πορτοφόλι είναι κλειδωμένο, δεν μπορεί να δημιουργηθεί συναλλαγή + + + + Error: system error: + Λάθος: λάθος συστήματος: + + + + Failed to listen on any port. Use -listen=0 if you want this. + ταλαιπωρηθειτε για να ακούσετε σε οποιαδήποτε θύρα. Χρήση - ακούστε = 0 , αν θέλετε αυτό. + + + + Failed to read block info + Αποτυχία αναγνωσης των block πληροφοριων + + + + Failed to read block + Η αναγνωση του μπλοκ απετυχε + + + + Failed to sync block index + Ο συγχρονισμος του μπλοκ ευρετηριου απετυχε + + + + Failed to write block index + Η δημιουργια του μπλοκ ευρετηριου απετυχε + + + + Failed to write block info + Η δημιουργια των μπλοκ πληροφοριων απετυχε + + + + Failed to write block + Η δημιουργια του μπλοκ απετυχε + + + + Failed to write file info + Αδυναμία εγγραφής πληροφοριων αρχειου + + + + Failed to write to coin database + Αποτυχία εγγραφής στη βάση δεδομένων νομίσματος + + + + Failed to write transaction index + Αποτυχία εγγραφής δείκτη συναλλαγών + + + + Failed to write undo data + Αποτυχία εγγραφής αναίρεσης δεδομένων + + + + Find peers using DNS lookup (default: 1 unless -connect) + Βρες ομότιμους υπολογιστές χρησιμοποιώντας αναζήτηση DNS(προεπιλογή:1) + + + + Generate coins (default: 0) + Δημιουργία νομισμάτων (προκαθορισμος: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Πόσα μπλοκ να ελέγχθουν κατά την εκκίνηση (προεπιλογή:288,0=όλα) + + + + How thorough the block verification is (0-4, default: 3) + Πόσο εξονυχιστική να είναι η επιβεβαίωση του μπλοκ(0-4, προεπιλογή:3) + + + + Not enough file descriptors available. + Δεν ειναι αρκετες περιγραφες αρχείων διαθέσιμες. + + + + Rebuild block chain index from current blk000??.dat files + Εισαγωγή μπλοκ από εξωτερικό αρχείο blk000?.dat + + + + Set the number of threads to service RPC calls (default: 4) + Ορίσμος του αριθμόυ θεματων στην υπηρεσία κλήσεων RPC (προεπιλογή: 4) + + + + Verifying blocks... + Επαλήθευση των μπλοκ... + + + + Verifying wallet... + Επαλήθευση πορτοφολιου... + + + + Imports blocks from external blk000??.dat file + Εισαγωγή μπλοκ από εξωτερικό αρχείο blk000?.dat + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Ορίσμος του αριθμό των νημάτων ελέγχου σεναρίου (μέχρι 16, 0 = auto, <0 = αφήνουν τους πολλους πυρήνες δωρεάν, default: 0) + + + + Information + Πληροφορία + + + + Invalid -tor address: '%s' + Δεν είναι έγκυρη η διεύθυνση διαμεσολαβητή: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + Μη έγκυρο ποσό για την παράμετρο -paytxfee=<amount>: '%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + Μη έγκυρο ποσό για την παράμετρο -paytxfee=<amount>: '%s' + + + + Maintain a full transaction index (default: 0) + Διατηρήση ένος πλήρες ευρετήριου συναλλαγών (προεπιλογή: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Μέγιστος buffer λήψης ανά σύνδεση, <n>*1000 bytes (προεπιλογή: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Μέγιστος buffer αποστολής ανά σύνδεση, <n>*1000 bytes (προεπιλογή: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Μονο αποδοχη αλυσίδας μπλοκ που ταιριάζει με τα ενσωματωμένα σημεία ελέγχου (προεπιλογή: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Συνδέση μόνο σε κόμβους του δικτύου <net> (IPv4, IPv6 ή Tor) + + + + Output extra debugging information. Implies all other -debug* options + Έξοδος επιπλέον πληροφοριών εντοπισμού σφαλμάτων + + + + Output extra network debugging information + Έξοδος επιπλέον πληροφοριών εντοπισμού σφαλμάτων + + + + Prepend debug output with timestamp + Χρονοσφραγίδα πληροφοριών εντοπισμού σφαλμάτων + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Ρυθμίσεις SSL: (ανατρέξτε στο curecoin Wiki για οδηγίες ρυθμίσεων SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + Επιλέξτε την έκδοση του διαμεσολαβητη για να χρησιμοποιήσετε (4-5 , προεπιλογή: 5) + + + + Send trace/debug info to console instead of debug.log file + Αποστολή πληροφοριών εντοπισμού σφαλμάτων στην κονσόλα αντί του αρχείου debug.log + + + + Send trace/debug info to debugger + Αποστολή πληροφοριών εντοπισμού σφαλμάτων στον debugger + + + + Set maximum block size in bytes (default: 250000) + Ορίσμος του μέγιστου μέγεθος block σε bytes (προεπιλογή: 250000) + + + + Set minimum block size in bytes (default: 0) + Ορίστε το μέγιστο μέγεθος block σε bytes (προεπιλογή: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Συρρίκνωση του αρχείο debug.log κατα την εκκίνηση του πελάτη (προεπιλογή: 1 όταν δεν-debug) + + + + Signing transaction failed + Η υπογραφή συναλλαγής απέτυχε + + + + Specify connection timeout in milliseconds (default: 5000) + Ορισμός λήξης χρονικού ορίου σε χιλιοστά του δευτερολέπτου(προεπιλογή:5000) + + + + System error: + Λάθος Συστήματος: + + + + Transaction amount too small + Το ποσό της συναλλαγής είναι πολύ μικρο + + + + Transaction amounts must be positive + Τα ποσά των συναλλαγών πρέπει να είναι θετικα + + + + Transaction too large + Η συναλλαγή ειναι πολύ μεγάλη + + + + Use UPnP to map the listening port (default: 0) + Χρησιμοποίηση του UPnP για την χρήση της πόρτας αναμονής (προεπιλογή:0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Χρησιμοποίηση του UPnP για την χρήση της πόρτας αναμονής (προεπιλογή:1) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Χρήση διακομιστή μεσολάβησης για την επίτευξη των Tor κρυμμένων υπηρεσιων (προεπιλογή: ίδιο με το-proxy) + + + + Username for JSON-RPC connections + Όνομα χρήστη για τις συνδέσεις JSON-RPC + + + + Warning + Προειδοποίηση + + + + Warning: This version is obsolete, upgrade required! + Προειδοποίηση: Αυτή η έκδοση είναι ξεπερασμένη, απαιτείται αναβάθμιση + + + + You need to rebuild the databases using -reindex to change -txindex + Θα πρέπει να ξαναχτίστουν οι βάσεις δεδομένων που χρησιμοποιούντε-Αναδημιουργία αλλάγων-txindex + + + + wallet.dat corrupt, salvage failed + Το αρχειο wallet.dat ειναι διεφθαρμένο, η διάσωση απέτυχε + + + + Password for JSON-RPC connections + Κωδικός για τις συνδέσεις JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + Αποδοχή συνδέσεων JSON-RPC από συγκεκριμένη διεύθυνση IP + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Αποστολή εντολών στον κόμβο <ip> (προεπιλογή: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Εκτέλεσε την εντολή όταν το καλύτερο μπλοκ αλλάξει(%s στην εντολή αντικαθίσταται από το hash του μπλοκ) + + + + Upgrade wallet to latest format + Αναβάθμισε το πορτοφόλι στην τελευταία έκδοση + + + + Set key pool size to <n> (default: 100) + Όριο πλήθους κλειδιών pool <n> (προεπιλογή: 100) + + + + Rescan the block chain for missing wallet transactions + Επανέλεγχος της αλυσίδας μπλοκ για απούσες συναλλαγές + + + + Use OpenSSL (https) for JSON-RPC connections + Χρήση του OpenSSL (https) για συνδέσεις JSON-RPC + + + + Server certificate file (default: server.cert) + Αρχείο πιστοποιητικού του διακομιστή (προεπιλογή: server.cert) + + + + Server private key (default: server.pem) + Προσωπικό κλειδί του διακομιστή (προεπιλογή: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Αποδεκτά κρυπτογραφήματα (προεπιλογή: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Αυτό το κείμενο βοήθειας + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + Αδύνατη η σύνδεση με τη θύρα %s αυτού του υπολογιστή (bind returned error %d, %s) + + + + Connect through socks proxy + Σύνδεση μέσω διαμεσολαβητή socks + + + + Allow DNS lookups for -addnode, -seednode and -connect + Να επιτρέπονται οι έλεγχοι DNS για προσθήκη και σύνδεση κόμβων + + + + Loading addresses... + Φόρτωση διευθύνσεων... + + + + Error loading wallet.dat: Wallet corrupted + Σφάλμα φόρτωσης wallet.dat: Κατεστραμμένο Πορτοφόλι + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Σφάλμα φόρτωσης wallet.dat: Το Πορτοφόλι απαιτεί μια νεότερη έκδοση του curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Απαιτείται η επανεγγραφή του Πορτοφολιού, η οποία θα ολοκληρωθεί στην επανεκκίνηση του curecoin + + + + Error loading wallet.dat + Σφάλμα φόρτωσης αρχείου wallet.dat + + + + Invalid -proxy address: '%s' + Δεν είναι έγκυρη η διεύθυνση διαμεσολαβητή: '%s' + + + + Unknown network specified in -onlynet: '%s' + Άγνωστo δίκτυο ορίζεται σε onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Άγνωστo δίκτυο ορίζεται: %i + + + + Cannot resolve -bind address: '%s' + Δεν μπορώ να γράψω την προεπιλεγμένη διεύθυνση: '%s' + + + + Cannot resolve -externalip address: '%s' + Δεν μπορώ να γράψω την προεπιλεγμένη διεύθυνση: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Μη έγκυρο ποσό για την παράμετρο -paytxfee=<amount>: '%s' + + + + 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. curecoin is probably already running. + Αδύνατη η σύνδεση με τη θύρα %s αυτού του υπολογιστή. Το curecoin είναι πιθανώς ήδη ενεργό. + + + + Fee per KB to add to transactions you send + Αμοιβή ανά KB που θα προστίθεται στις συναλλαγές που στέλνεις + + + + Loading wallet... + Φόρτωση πορτοφολιού... + + + + Cannot downgrade wallet + Δεν μπορώ να υποβαθμίσω το πορτοφόλι + + + + Cannot write default address + Δεν μπορώ να γράψω την προεπιλεγμένη διεύθυνση + + + + Rescanning... + Ανίχνευση... + + + + Done loading + Η φόρτωση ολοκληρώθηκε + + + + To use the %s option + Χρήση της %s επιλογής + + + + 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. + Πρέπει να βάλεις ένα κωδικό στο αρχείο παραμέτρων: %s +Εάν το αρχείο δεν υπάρχει, δημιούργησε το με δικαιώματα μόνο για ανάγνωση από τον δημιουργό + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_en.qm b/src/qt/locale/curecoin_en.qm new file mode 100644 index 0000000..3e96788 Binary files /dev/null and b/src/qt/locale/curecoin_en.qm differ diff --git a/src/qt/locale/curecoin_en.ts b/src/qt/locale/curecoin_en.ts new file mode 100644 index 0000000..095e5f5 --- /dev/null +++ b/src/qt/locale/curecoin_en.ts @@ -0,0 +1,2740 @@ + + + +UTF-8 + + AboutDialog + + + About curecoin + About curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> version + + + + Copyright © 2013 The curecoin developers + Copyright © 2013 The curecoin 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. + +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 + Address Book + + + + Double-click to edit address or label + Double-click to edit address or label + + + + Create a new address + Create a new address + + + + Copy the currently selected address to the system clipboard + Copy the currently selected address to the system clipboard + + + + &New Address + &New Address + + + + These are your curecoin 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 curecoin 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 + + + + Show &QR Code + Show &QR Code + + + + Sign a message to prove you own a curecoin address + Sign a message to prove you own a curecoin address + + + + Sign &Message + Sign &Message + + + + Delete the currently selected address from the list + + + + + Verify a message to ensure it was signed with a specified curecoin address + Verify a message to ensure it was signed with a specified curecoin address + + + + &Verify Message + &Verify Message + + + + &Delete + &Delete + + + + Copy &Label + Copy &Label + + + + &Edit + &Edit + + + + Export Address Book Data + Export Address Book Data + + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + + Error exporting + Error exporting + + + + Could not write to file %1. + Could not write to file %1. + + + + AddressTableModel + + + Label + Label + + + + Address + Address + + + + (no label) + (no label) + + + + AskPassphraseDialog + + + Passphrase Dialog + Passphrase Dialog + + + + Enter passphrase + Enter passphrase + + + + New passphrase + New passphrase + + + + Repeat new passphrase + Repeat new passphrase + + + + 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>. + 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 + Encrypt wallet + + + + This operation needs your wallet passphrase to unlock the wallet. + This operation needs your wallet passphrase to unlock the wallet. + + + + Unlock wallet + Unlock wallet + + + + This operation needs your wallet passphrase to decrypt the wallet. + This operation needs your wallet passphrase to decrypt the wallet. + + + + Decrypt wallet + Decrypt wallet + + + + Change passphrase + Change passphrase + + + + Enter the old and new passphrase to the wallet. + Enter the old and new passphrase to the wallet. + + + + Confirm wallet encryption + Confirm wallet encryption + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>! + 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? + 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! + Warning: The Caps Lock key is on! + + + + + Wallet encrypted + Wallet encrypted + + + + curecoin 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. + curecoin 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 + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + + + + + The supplied passphrases do not match. + The supplied passphrases do not match. + + + + Wallet unlock failed + Wallet unlock failed + + + + + + The passphrase entered for the wallet decryption was incorrect. + The passphrase entered for the wallet decryption was incorrect. + + + + Wallet decryption failed + Wallet decryption failed + + + + Wallet passphrase was successfully changed. + Wallet passphrase was successfully changed. + + + + curecoinGUI + + + 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 curecoin + Show information about curecoin + + + + 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 curecoin address + Send coins to a curecoin address + + + + Modify configuration options for curecoin + Modify configuration options for curecoin + + + + 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... + + + + curecoin + curecoin + + + + Wallet + Wallet + + + + &About curecoin + &About curecoin + + + + &Show / Hide + &Show / Hide + + + + &File + &File + + + + &Settings + &Settings + + + + &Help + &Help + + + + Tabs toolbar + Tabs toolbar + + + + Actions toolbar + Actions toolbar + + + + + [testnet] + [testnet] + + + + + curecoin client + curecoin client + + + + %n active connection(s) to curecoin network + + %n active connection to curecoin network + %n active connections to curecoin network + + + + + Downloaded %1 blocks of transaction history. + Downloaded %1 blocks of transaction history. + + + + %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 + + + + + + URI handling + URI handling + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + URI can not be parsed! This can be caused by an invalid curecoin 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. + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + ClientModel + + + Network Alert + Network Alert + + + + EditAddressDialog + + + Edit Address + Edit Address + + + + &Label + &Label + + + + The label associated with this address book entry + The label associated with this address book entry + + + + &Address + &Address + + + + The address associated with this address book entry. This can only be modified for sending addresses. + The address associated with this address book entry. This can only be modified for sending addresses. + + + + 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 already in the address book. + The entered address "%1" is already in the address book. + + + + The entered address "%1" is not a valid curecoin address. + The entered address "%1" is not a valid curecoin address. + + + + Could not unlock wallet. + Could not unlock wallet. + + + + New key generation failed. + New key generation failed. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + version + + + + Usage: + Usage: + + + + command-line options + command-line options + + + + UI options + UI options + + + + Set language, for example "de_DE" (default: system locale) + Set language, for example "de_DE" (default: system locale) + + + + Start minimized + Start minimized + + + + Show splash screen on startup (default: 1) + Show splash screen on startup (default: 1) + + + + OptionsDialog + + + Options + Options + + + + &Main + &Main + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.00001 recommended. + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.00001 recommended. + + + + Pay transaction &fee + Pay transaction &fee + + + + Automatically start curecoin after logging in to the system. + Automatically start curecoin after logging in to the system. + + + + &Start curecoin on system login + &Start curecoin 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. + + + + &Detach databases at shutdown + &Detach databases at shutdown + + + + &Network + &Network + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Automatically open the curecoin 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 curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + + + + &Connect through SOCKS proxy: + &Connect through SOCKS proxy: + + + + Proxy &IP: + Proxy &IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + IP address of the proxy (e.g. 127.0.0.1) + + + + &Port: + &Port: + + + + Port of the proxy (e.g. 9050) + Port of the proxy (e.g. 9050) + + + + SOCKS &Version: + SOCKS &Version: + + + + SOCKS version of the proxy (e.g. 5) + SOCKS version of the proxy (e.g. 5) + + + + &Window + &Window + + + + Show only a tray icon after minimizing the window. + Show only a tray icon after minimizing the window. + + + + &Minimize to the tray instead of the taskbar + &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. + 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 + M&inimize on close + + + + &Display + &Display + + + + User Interface &language: + User Interface &language: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + The user interface language can be set here. This setting will take effect after restarting curecoin. + + + + &Unit to show amounts in: + &Unit to show amounts in: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Choose the default subdivision unit to show in the interface and when sending coins. + + + + Whether to show curecoin addresses in the transaction list or not. + Whether to show curecoin addresses in the transaction list or not. + + + + &Display addresses in transaction list + &Display addresses in transaction list + + + + &OK + &OK + + + + &Cancel + &Cancel + + + + &Apply + &Apply + + + + default + default + + + + + Warning + Warning + + + + + This setting will take effect after restarting curecoin. + This setting will take effect after restarting curecoin. + + + + The supplied proxy address is invalid. + The supplied proxy address is invalid. + + + + OverviewPage + + + Form + Form + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin 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 curecoin network after a connection is established, but this process has not completed yet. + + + + Balance: + Balance: + + + + Stake: + Stake: + + + + Number of transactions: + Number of transactions: + + + + Unconfirmed: + Unconfirmed: + + + + Wallet + Wallet + + + + Immature: + Immature: + + + + Mined balance that has not yet matured + Mined balance that has not yet matured + + + + <b>Recent transactions</b> + <b>Recent transactions</b> + + + + Your current balance + Your current balance + + + + 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 + + + + 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 + + + + Total number of transactions in wallet + Total number of transactions in wallet + + + + + out of sync + out of sync + + + + QRCodeDialog + + + QR Code Dialog + QR Code Dialog + + + + Request Payment + Request Payment + + + + Amount: + Amount: + + + + Label: + Label: + + + + Message: + Message: + + + + &Save As... + &Save As... + + + + Error encoding URI into QR Code. + Error encoding URI into QR Code. + + + + The entered amount is invalid, please check. + The entered amount is invalid, please check. + + + + Resulting URI too long, try to reduce the text for label / message. + Resulting URI too long, try to reduce the text for label / message. + + + + Save QR Code + Save QR Code + + + + PNG Images (*.png) + PNG Images (*.png) + + + + RPCConsole + + + Client name + Client name + + + + + + + + + + + + + N/A + N/A + + + + Client version + Client version + + + + &Information + &Information + + + + Using OpenSSL version + Using OpenSSL version + + + + Startup time + Startup time + + + + Network + Network + + + + Number of connections + Number of connections + + + + On testnet + On testnet + + + + Block chain + Block chain + + + + Current number of blocks + Current number of blocks + + + + Estimated total blocks + Estimated total blocks + + + + Last block time + Last block time + + + + &Open + &Open + + + + Command-line options + Command-line options + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + &Show + &Show + + + + &Console + &Console + + + + Build date + Build date + + + + curecoin - Debug window + curecoin - Debug window + + + + curecoin Core + curecoin Core + + + + Debug log file + Debug log file + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Open the curecoin 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 curecoin RPC console. + Welcome to the curecoin RPC console. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + 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. + Type <b>help</b> for an overview of available commands. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Send Coins + + + + 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 + + + + Balance: + Balance: + + + + 123.456 BTC + 123.456 BTC + + + + Confirm the send action + Confirm the send action + + + + S&end + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send coins + Confirm send coins + + + + Are you sure you want to send %1? + Are you sure you want to send %1? + + + + and + and + + + + The recipient address is not valid, please recheck. + The recipient address is not valid, please recheck. + + + + The amount to pay must be larger than 0. + The amount to pay must be larger than 0. + + + + The amount exceeds your balance. + The amount exceeds your balance. + + + + The total exceeds your balance when the %1 transaction fee is included. + 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. + Duplicate address found, can only send to each address once per send operation. + + + + Error: Transaction creation failed. + 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: 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. + + + + SendCoinsEntry + + + Form + Form + + + + A&mount: + A&mount: + + + + Pay &To: + Pay &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: + + + + 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 + + + + Enter a valid curecoin address + Enter a valid curecoin address + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Signatures - Sign / Verify a Message + + + + + &Sign 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. + 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 + The address to sign the message with + + + + + Choose an address from the address book + Choose an address from the address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Paste address from clipboard + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Enter the message you want to sign here + + + + Copy the current signature to the system clipboard + Copy the current signature to the system clipboard + + + + Sign the message to prove you own this curecoin address + Sign the message to prove you own this curecoin address + + + + Reset all sign message fields + Reset all sign message fields + + + + + Clear &All + Clear &All + + + + + &Verify Message + &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. + 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 + The address the message was signed with + + + + Verify the message to ensure it was signed with the specified curecoin address + Verify the message to ensure it was signed with the specified curecoin address + + + + Reset all verify message fields + Reset all verify message fields + + + + + Enter a valid curecoin address + Enter a valid curecoin address + + + + Click "Sign Message" to generate signature + Click "Sign Message" to generate signature + + + + Enter curecoin signature + Enter curecoin signature + + + + + The entered address is invalid. + The entered address is invalid. + + + + + + + Please check the address and try again. + Please check the address and try again. + + + + + The entered address does not refer to a key. + The entered address does not refer to a key. + + + + Wallet unlock was cancelled. + Wallet unlock was cancelled. + + + + Private key for the entered address is not available. + Private key for the entered address is not available. + + + + Message signing failed. + Message signing failed. + + + + Message signed. + Message signed. + + + + The signature could not be decoded. + The signature could not be decoded. + + + + + Please check the signature and try again. + Please check the signature and try again. + + + + The signature did not match the message digest. + The signature did not match the message digest. + + + + Message verification failed. + Message verification failed. + + + + Message verified. + Message verified. + + + + TransactionDesc + + + Open until %1 + Open until %1 + + + + Open for %n block(s) + + Open for %n block + Open for %n blocks + + + + + %1/offline + %1/offline + + + + %1/unconfirmed + %1/unconfirmed + + + + %1 confirmations + %1 confirmations + + + + Status + Status + + + + , broadcast through %n node(s) + + , broadcast through %n node + , broadcast through %n nodes + + + + + Date + Date + + + + Source + Source + + + + Generated + Generated + + + + + From + From + + + + + + To + To + + + + + own address + own address + + + + label + label + + + + + + + + Credit + Credit + + + + matures in %n more block(s) + + matures in %n more block + matures in %n more blocks + + + + + not accepted + not accepted + + + + + + + Debit + Debit + + + + Transaction fee + Transaction fee + + + + Net amount + Net amount + + + + Message + Message + + + + Comment + Comment + + + + Transaction ID + Transaction ID + + + + Generated coins must mature 30 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 30 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. + + + + Staked coins must wait 30 blocks before they can return to balance and be spent. When you generated this proof-of-stake block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be a valid stake. This may occasionally happen if another node generates a proof-of-stake block within a few seconds of yours. + Staked coins must wait 30 blocks before they can return to balance and be spent. When you generated this proof-of-stake block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be a valid stake. This may occasionally happen if another node generates a proof-of-stake block within a few seconds of yours. + + + + Debug information + Debug information + + + + Transaction + Transaction + + + + Inputs + Inputs + + + + Amount + Amount + + + + true + true + + + + false + false + + + + , has not been successfully broadcast yet + , has not been successfully broadcast yet + + + + unknown + unknown + + + + TransactionDescDialog + + + Transaction details + Transaction details + + + + This pane shows a detailed description of the transaction + This pane shows a detailed description of the transaction + + + + TransactionTableModel + + + Date + Date + + + + Type + Type + + + + Address + Address + + + + Amount + Amount + + + + Open for %n block(s) + + Open for %n block + Open for %n blocks + + + + + Open until %1 + Open until %1 + + + + Offline (%1 confirmations) + Offline (%1 confirmations) + + + + Unconfirmed (%1 of %2 confirmations) + Unconfirmed (%1 of %2 confirmations) + + + + Confirmed (%1 confirmations) + Confirmed (%1 confirmations) + + + + Mined balance will be available when it matures in %n more block(s) + + Mined balance will be available when it matures in %n more block + Mined balance will be available when it matures in %n more blocks + + + + + This block was not received by any other nodes and will probably not be accepted! + This block was not received by any other nodes and will probably not be accepted! + + + + Generated but not accepted + Generated but not accepted + + + + Received with + Received with + + + + Received from + Received from + + + + Sent to + Sent to + + + + Payment to yourself + Payment to yourself + + + + Mined + Mined + + + + (n/a) + (n/a) + + + + Transaction status. Hover over this field to show number of confirmations. + Transaction status. Hover over this field to show number of confirmations. + + + + Date and time that the transaction was received. + Date and time that the transaction was received. + + + + Type of transaction. + Type of transaction. + + + + Destination address of transaction. + Destination address of transaction. + + + + Amount removed from or added to balance. + Amount removed from or added to balance. + + + + TransactionView + + + + All + All + + + + Today + Today + + + + This week + This week + + + + This month + This month + + + + Last month + Last month + + + + This year + This year + + + + Range... + Range... + + + + Received with + Received with + + + + Sent to + Sent to + + + + To yourself + To yourself + + + + Mined + Mined + + + + Other + Other + + + + Enter address or label to search + Enter address or label to search + + + + Min amount + Min amount + + + + Copy address + Copy address + + + + Copy label + Copy label + + + + Copy amount + Copy amount + + + + Edit label + Edit label + + + + Show transaction details + Show transaction details + + + + Export Transaction Data + Export Transaction Data + + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + + Confirmed + Confirmed + + + + Date + Date + + + + Type + Type + + + + Label + Label + + + + Address + Address + + + + Amount + Amount + + + + ID + ID + + + + Error exporting + Error exporting + + + + Could not write to file %1. + Could not write to file %1. + + + + Range: + Range: + + + + to + to + + + + WalletModel + + + Sending... + Sending... + + + + curecoin-core + + + curecoin version + curecoin version + + + + Usage: + Usage: + + + + Send command to -server or curecoind + Send command to -server or curecoind + + + + List commands + List commands + + + + Get help for a command + Get help for a command + + + + Options: + Options: + + + + Specify configuration file (default: curecoin.conf) + Specify configuration file (default: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Specify pid file (default: curecoind.pid) + + + + Generate coins + Generate coins + + + + Don't generate coins + Don't generate coins + + + + Specify data directory + Specify data directory + + + + Set database cache size in megabytes (default: 25) + Set database cache size in megabytes (default: 25) + + + + Set database disk log size in megabytes (default: 100) + Set database disk log size in megabytes (default: 100) + + + + Listen for connections on <port> (default: 7777 or testnet: 17777) + Listen for connections on <port> (default: 8333 or testnet: 18333) + + + + Maintain at most <n> connections to peers (default: 125) + Maintain at most <n> connections to peers (default: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Connect to a node to retrieve peer addresses, and disconnect + + + + Specify your own public address + Specify your own public address + + + + Bind to given address. Use [host]:port notation for IPv6 + Bind to given address. Use [host]:port notation for IPv6 + + + + Threshold for disconnecting misbehaving peers (default: 100) + Threshold for disconnecting misbehaving peers (default: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + 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) + 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: 8344 or testnet: 18344) + + + + + Accept command line and JSON-RPC commands + 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 + Run in the background as a daemon and accept commands + + + + Use the test network + Use the test network + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + 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) + 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: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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. + + + + 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. + 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 + Attempt to recover private keys from a corrupt wallet.dat + + + + Block creation options: + Block creation options: + + + + Connect only to the specified node(s) + Connect only to the specified node(s) + + + + Discover own IP address (default: 1 when listening and no -externalip) + Discover own IP address (default: 1 when listening and no -externalip) + + + + Failed to listen on any port. Use -listen=0 if you want this. + Failed to listen on any port. Use -listen=0 if you want this. + + + + Find peers using DNS lookup (default: 0) + Find peers using DNS lookup (default: 0) + + + + Invalid -tor address: '%s' + Invalid -tor address: '%s' + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + + + + Output extra debugging information. Implies all other -debug* options + Output extra debugging information. Implies all other -debug* options + + + + Output extra network debugging information + Output extra network debugging information + + + + Prepend debug output with timestamp + Prepend debug output with timestamp + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL options: (see the curecoin Wiki for SSL setup instructions) + + + + Select the version of socks proxy to use (4-5, default: 5) + 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 console instead of debug.log file + + + + Send trace/debug info to debugger + Send trace/debug info to debugger + + + + Set maximum block size in bytes (default: 250000) + Set maximum block size in bytes (default: 250000) + + + + Set minimum block size in bytes (default: 0) + Set minimum block size in bytes (default: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Shrink debug.log file on client startup (default: 1 when no -debug) + + + + Specify connection timeout in milliseconds (default: 5000) + Specify connection timeout in milliseconds (default: 5000) + + + + Use UPnP to map the listening port (default: 0) + Use UPnP to map the listening port (default: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Use UPnP to map the listening port (default: 1 when listening) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Use proxy to reach tor hidden services (default: same as -proxy) + + + + Username for JSON-RPC connections + Username for JSON-RPC connections + + + + Verifying database integrity... + + + + + Warning: Disk space is low! + Warning: Disk space is low! + + + + Warning: This version is obsolete, upgrade required! + Warning: This version is obsolete, upgrade required! + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Password for JSON-RPC connections + + + + Allow JSON-RPC connections from specified IP address + Allow JSON-RPC connections from specified IP address + + + + Send commands to node running on <ip> (default: 127.0.0.1) + 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 the best block changes (%s in cmd is replaced by block hash) + + + + Upgrade wallet to latest format + Upgrade wallet to latest format + + + + Set key pool size to <n> (default: 100) + Set key pool size to <n> (default: 100) + + + + Rescan the block chain for missing wallet transactions + Rescan the block chain for missing wallet transactions + + + + How many blocks to check at startup (default: 2500, 0 = all) + How many blocks to check at startup (default: 2500, 0 = all) + + + + How thorough the block verification is (0-6, default: 1) + How thorough the block verification is (0-6, default: 1) + + + + Imports blocks from external blk000?.dat file + Imports blocks from external blk000?.dat file + + + + Use OpenSSL (https) for JSON-RPC connections + Use OpenSSL (https) for JSON-RPC connections + + + + Server certificate file (default: server.cert) + Server certificate file (default: server.cert) + + + + Server private key (default: server.pem) + Server private key (default: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + This help message + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + curecoin + curecoin + + + + 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) + + + + Connect through socks proxy + Connect through socks proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Allow DNS lookups for -addnode, -seednode and -connect + + + + Loading addresses... + Loading addresses... + + + + Error loading blkindex.dat + Error loading blkindex.dat + + + + Error loading wallet.dat: Wallet corrupted + Error loading wallet.dat: Wallet corrupted + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Wallet needed to be rewritten: restart curecoin to complete + + + + Error loading wallet.dat + Error loading wallet.dat + + + + Invalid -proxy address: '%s' + Invalid -proxy address: '%s' + + + + Unknown network specified in -onlynet: '%s' + Unknown network specified in -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Unknown -socks proxy version requested: %i + + + + Cannot resolve -bind address: '%s' + Cannot resolve -bind address: '%s' + + + + Cannot resolve -externalip address: '%s' + Cannot resolve -externalip address: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Invalid amount for -paytxfee=<amount>: '%s' + + + + Error: could not start node + Error: could not start node + + + + Sending... + Sending... + + + + Invalid amount + Invalid amount + + + + Insufficient funds + Insufficient funds + + + + Loading block index... + Loading block index... + + + + Add a node to connect to and attempt to keep the connection open + Add a node to connect to and attempt to keep the connection open + + + + Unable to bind to %s on this computer. curecoin is probably already running. + Unable to bind to %s on this computer. curecoin is probably already running. + + + + Find peers using internet relay chat (default: 1) + Find peers using internet relay chat (default: 1) + + + + Fee per KB to add to transactions you send + Fee per KB to add to transactions you send + + + + Loading wallet... + Loading wallet... + + + + Cannot downgrade wallet + Cannot downgrade wallet + + + + Cannot initialize keypool + Cannot initialize keypool + + + + Cannot write default address + Cannot write default address + + + + Rescanning... + Rescanning... + + + + Done loading + Done loading + + + + To use the %s option + To use the %s option + + + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=curecoinrpc +rpcpassword=%s +(you do not need to remember this password) +If the file does not exist, create it with owner-readable-only file permissions. + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=curecoinrpc +rpcpassword=%s +(you do not need to remember this password) +If the file does not exist, create it with owner-readable-only file permissions. + + + + + Error + 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. + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + + + diff --git a/src/qt/locale/curecoin_eo.qm b/src/qt/locale/curecoin_eo.qm new file mode 100644 index 0000000..4443e01 Binary files /dev/null and b/src/qt/locale/curecoin_eo.qm differ diff --git a/src/qt/locale/curecoin_eo.ts b/src/qt/locale/curecoin_eo.ts new file mode 100644 index 0000000..3819add --- /dev/null +++ b/src/qt/locale/curecoin_eo.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Pri curecoin + + + + <b>curecoin</b> version + <b>curecoin</b>-a versio + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Adresaro + + + + Double-click to edit address or label + Duoble-klaku por redakti adreson aŭ etikedon + + + + Create a new address + Kreu novan adreson + + + + Copy the currently selected address to the system clipboard + Kopiu elektitan adreson al la tondejo + + + + &New Address + &Nova Adreso + + + + These are your curecoin 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 + &Kopiu Adreson + + + + Show &QR Code + + + + + Sign a message to prove you own a curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &Forviŝu + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Kopiu &Etikedon + + + + &Edit + &Redaktu + + + + Send &Coins + + + + + Export Address Book Data + Eksportu Adresarajn Datumojn + + + + Comma separated file (*.csv) + Diskoma dosiero (*.csv) + + + + Error exporting + Eraro dum eksportado + + + + Could not write to file %1. + Ne eblis skribi al dosiero %1. + + + + AddressTableModel + + + Label + Etikedo + + + + Address + Adreso + + + + (no label) + (ne etikedo) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + Enigu pasfrazon + + + + New passphrase + Nova pasfrazo + + + + Repeat new passphrase + Ripetu novan pasfrazon + + + + 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>. + Enigu novan pasfrazon por la monujo.<br/>Bonvolu, uzu pasfrazon kun <b>10 aŭ pli hazardaj signoj</b>, aŭ <b>ok aŭ pli vortoj</b>. + + + + Encrypt wallet + Ĉifru monujon + + + + This operation needs your wallet passphrase to unlock the wallet. + Ĉi tiu operacio devas vian monujan pasfrazon, por malŝlosi la monujon. + + + + Unlock wallet + Malŝlosu monujon + + + + This operation needs your wallet passphrase to decrypt the wallet. + Ĉi tiu operacio devas vian monujan pasfrazon, por malĉifri la monujon. + + + + Decrypt wallet + Malĉifru monujon + + + + Change passphrase + Anstataŭigu pasfrazon + + + + Enter the old and new passphrase to the wallet. + Enigu la malnovan kaj novan monujan pasfrazon. + + + + Confirm wallet encryption + Konfirmu ĉifrado de monujo + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</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 + Monujo ĉifrita + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + + + + + + + + Wallet encryption failed + Monujo ĉifrado fiaskis + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Ĉifrado de monujo fiaskis, kaŭze de interna eraro. Via monujo ne ĉifritas. + + + + + The supplied passphrases do not match. + La pasfrazoj enigitaj ne samas. + + + + Wallet unlock failed + Monujo malŝlosado fiaskis + + + + + + The passphrase entered for the wallet decryption was incorrect. + La pasfrazo enigita por ĉifrado de monujo ne konformas. + + + + Wallet decryption failed + Monujo malĉifrado fiaskis + + + + Wallet passphrase was successfully changed. + + + + + curecoinGUI + + + Sign &message... + Subskribu &mesaĝon... + + + + Synchronizing with network... + Sinkronigante kun reto... + + + + &Overview + &Superrigardo + + + + Show general overview of wallet + + + + + &Transactions + &Transakcioj + + + + Browse transaction history + Esploru historion de transakcioj + + + + Edit the list of stored addresses and labels + + + + + Show the list of addresses for receiving payments + + + + + E&xit + &Eliru + + + + Quit application + Eliru de aplikaĵo + + + + Show information about curecoin + Vidigu informaĵon pri Bitmono + + + + About &Qt + Pri &QT + + + + Show information about Qt + Vidigu informaĵon pri Qt + + + + &Options... + &Opcioj... + + + + &Encrypt Wallet... + &Ĉifru Monujon... + + + + &Backup Wallet... + + + + + &Change Passphrase... + &Anstataŭigu pasfrazon... + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + &Kontrolu mesaĝon... + + + + + curecoin + + + + + Wallet + Monujo + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Dosiero + + + + &Settings + &Agordoj + + + + &Help + &Helpo + + + + Tabs toolbar + + + + + + [testnet] + + + + + curecoin client + + + + + %n active connection(s) to curecoin network + + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + %n horo%n horoj + + + + %n day(s) + %n tago%n tagoj + + + + %n week(s) + %n semajno%n semajnoj + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + Eraro + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Ĝisdata + + + + Catching up... + Ĝisdatigante... + + + + Confirm transaction fee + + + + + Sent transaction + Sendita transakcio + + + + Incoming transaction + Envenanta transakcio + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Monujo estas <b>ĉifrita</b> kaj nun <b>malŝlosita</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Monujo estas <b>ĉifrita</b> kaj nun <b>ŝlosita</b> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + Reta Averto + + + + EditAddressDialog + + + Edit Address + Redaktu Adreson + + + + &Label + &Etikedo + + + + The label associated with this address book entry + La etikedo interrilatita kun ĉi tiun adreso + + + + &Address + &Adreso + + + + 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. + La adreso enigita "%1" jam ekzistas en la adresaro. + + + + The entered address "%1" is not a valid curecoin address. + + + + + Could not unlock wallet. + Ne eblis malŝlosi monujon + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versio + + + + 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 + Opcioj + + + + &Main + + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + &OK + + + + &Cancel + &Nuligu + + + + &Apply + &Apliku + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + + + + + Unconfirmed: + Nekonfirmita: + + + + Wallet + Monujo + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Lastaj transakcioj</b> + + + + Your current balance + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + + + + + Request Payment + + + + + Amount: + + + + + Label: + Etikedo: + + + + 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 + Reto + + + + Number of connections + + + + + On testnet + + + + + Block chain + + + + + Current number of blocks + + + + + Estimated total blocks + + + + + Last block time + + + + + &Open + &Malfermu + + + + Command-line options + + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + Sendu Monojn + + + + Send to multiple recipients at once + Sendu samtempe al multaj ricevantoj + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 MEC + 123,456 MEC + + + + Confirm the send action + + + + + S&end + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> al %2 (%3) + + + + Confirm send coins + + + + + Are you sure you want to send %1? + Ĉu vi vere volas sendi %1? + + + + and + kaj + + + + 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. + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + &Etikedo: + + + + Choose address from address book + Elektu adreson el adresaro + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Algluu adreson de tondejo + + + + Alt+P + Alt+P + + + + Remove this recipient + Forigu ĉi tiun ricevanton + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Algluu adreson de tondejo + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + + + + + %1/offline + + + + + %1/unconfirmed + %1/nekonfirmita + + + + %1 confirmations + %1 konfirmoj + + + + Status + + + + + , broadcast through %n node(s) + + + + + Date + Dato + + + + 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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + Sumo + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + , ankoraŭ ne elsendita sukcese + + + + Open for %n more block(s) + + + + + unknown + nekonata + + + + TransactionDescDialog + + + Transaction details + Transakciaj detaloj + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + Dato + + + + Type + Tipo + + + + Address + Adreso + + + + Amount + Sumo + + + + Open for %n more block(s) + + + + + Open until %1 + + + + + Offline (%1 confirmations) + + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + + + + + Generated but not accepted + + + + + Received with + Ricevita kun + + + + Received from + Ricevita de + + + + Sent to + Sendita al + + + + Payment to yourself + Pago al vi mem + + + + Mined + Minita + + + + (n/a) + + + + + Transaction status. Hover over this field to show number of confirmations. + + + + + Date and time that the transaction was received. + + + + + Type of transaction. + Transakcia tipo. + + + + Destination address of transaction. + + + + + Amount removed from or added to balance. + + + + + TransactionView + + + + All + Ĉiuj + + + + Today + Hodiaŭ + + + + This week + + + + + This month + + + + + Last month + + + + + This year + + + + + Range... + + + + + Received with + Ricevita kun + + + + Sent to + Sendita al + + + + To yourself + Al vi mem + + + + Mined + Minita + + + + Other + + + + + Enter address or label to search + + + + + Min amount + + + + + Copy address + Kopiu adreson + + + + Copy label + + + + + Copy amount + + + + + Copy transaction ID + + + + + Edit label + Redaktu etikedon + + + + Show transaction details + + + + + Export Transaction Data + + + + + Comma separated file (*.csv) + Diskoma dosiero (*.csv) + + + + Confirmed + Konfirmita + + + + Date + Dato + + + + Type + Tipo + + + + Label + Etikedo + + + + Address + Adreso + + + + Amount + Sumo + + + + ID + + + + + Error exporting + Eraro dum eksportado + + + + Could not write to file %1. + Ne eblis skribi al dosiero %1. + + + + Range: + + + + + to + + + + + WalletModel + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + curecoin-a versio + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + Listigu instrukciojn + + + + Get help for a command + + + + + Options: + Opcioj: + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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... + Ŝarĝante adresojn... + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + Ŝarĝante blok-indekson... + + + + Add a node to connect to and attempt to keep the connection open + + + + + Unable to bind to %s on this computer. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + Ŝarĝante monujon... + + + + Cannot downgrade wallet + + + + + Cannot write default address + + + + + Rescanning... + + + + + Done loading + Ŝarĝado finitas + + + + To use the %s option + Por uzi la opcion %s + + + + Error + Eraro + + + + 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/curecoin_es.qm b/src/qt/locale/curecoin_es.qm new file mode 100644 index 0000000..12afa66 Binary files /dev/null and b/src/qt/locale/curecoin_es.qm differ diff --git a/src/qt/locale/curecoin_es.ts b/src/qt/locale/curecoin_es.ts new file mode 100644 index 0000000..cdac2c8 --- /dev/null +++ b/src/qt/locale/curecoin_es.ts @@ -0,0 +1,2959 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Acerca de curecoin + + + + <b>curecoin</b> version + Versión de <b>curecoin</b> + + + + +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. + +Este es un software experimental. + +Distribuido bajo la licencia MIT/X11, vea el archivo adjunto +COPYING o http://www.opensource.org/licenses/mit-license.php. + +Este producto incluye software desarrollado por OpenSSL Project para su uso en +el OpenSSL Toolkit (http://www.openssl.org/) y software criptográfico escrito por +Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard. + + + + Copyright + Copyright + + + + Dr. Kimoto Chan + Dr. Kimoto Chan + + + + AddressBookPage + + + Address Book + Libreta de direcciones + + + + 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 + + + + Copy the currently selected address to the system clipboard + Copiar la dirección seleccionada al portapapeles del sistema + + + + &New Address + &Añadir dirección + + + + These are your curecoin 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 sus direcciones curecoin para recibir pagos. Puede utilizar una diferente por cada persona emisora para saber quién le está pagando. + + + + &Copy Address + &Copiar dirección + + + + Show &QR Code + Mostrar código &QR + + + + Sign a message to prove you own a curecoin address + Firmar un mensaje para demostrar que se posee una dirección curecoin + + + + Sign &Message + &Firmar mensaje + + + + Delete the currently selected address from the list + Borrar de la lista la dirección seleccionada + + + + Export the data in the current tab to a file + Exportar a un archivo los datos de esta pestaña + + + + &Export + &Exportar + + + + Verify a message to ensure it was signed with a specified curecoin address + Verificar un mensaje para comprobar que fue firmado con la dirección curecoin indicada + + + + &Verify Message + &Verificar mensaje + + + + &Delete + &Eliminar + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Estas son sus direcciones curecoin para enviar pagos. Compruebe siempre la cantidad y la dirección receptora antes de transferir monedas. + + + + Copy &Label + Copiar &etiqueta + + + + &Edit + &Editar + + + + Send &Coins + Enviar &monedas + + + + Export Address Book Data + Exportar datos de la libreta de direcciones + + + + Comma separated file (*.csv) + Archivos de columnas separadas por coma (*.csv) + + + + Error exporting + Error al exportar + + + + Could not write to file %1. + No se pudo escribir en el archivo %1. + + + + AddressTableModel + + + Label + Etiqueta + + + + Address + Dirección + + + + (no label) + (sin etiqueta) + + + + AskPassphraseDialog + + + Passphrase Dialog + Diálogo de contraseña + + + + Enter passphrase + Introducir contraseña + + + + New passphrase + Nueva contraseña + + + + Repeat new passphrase + Repita la nueva contraseña + + + + 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>. + Introduzca la nueva contraseña del monedero.<br/>Por favor elija una con <b>10 o más caracteres aleatorios</b> u <b>ocho o más palabras</b>. + + + + Encrypt wallet + Cifrar el monedero + + + + This operation needs your wallet passphrase to unlock the wallet. + Esta operación requiere su contraseña para desbloquear el monedero. + + + + Unlock wallet + Desbloquear monedero + + + + This operation needs your wallet passphrase to decrypt the wallet. + Esta operación requiere su contraseña para descifrar el monedero. + + + + Decrypt wallet + Descifrar el monedero + + + + Change passphrase + Cambiar contraseña + + + + Enter the old and new passphrase to the wallet. + Introduzca la contraseña anterior del monedero y la nueva. + + + + Confirm wallet encryption + Confirmar cifrado del monedero + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Atencion: ¡Si cifra su monedero y pierde la contraseña perderá <b>TODOS SUS curecoinS</b>!" + + + + Are you sure you wish to encrypt your wallet? + ¿Seguro que desea cifrar su monedero? + + + + 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. + + + + + Warning: The Caps Lock key is on! + Aviso: ¡La tecla de bloqueo de mayúsculas está activada! + + + + + Wallet encrypted + Monedero cifrado + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin se cerrará para finalizar el proceso de cifrado. Recuerde que el cifrado de su monedero no puede proteger totalmente sus curecoins de robo por malware que infecte su sistema. + + + + + + + Wallet encryption failed + Ha fallado el cifrado del monedero + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Ha fallado el cifrado del monedero debido a un error interno. El monedero no ha sido cifrado. + + + + + The supplied passphrases do not match. + Las contraseñas no coinciden. + + + + Wallet unlock failed + Ha fallado el desbloqueo del monedero + + + + + + The passphrase entered for the wallet decryption was incorrect. + La contraseña introducida para descifrar el monedero es incorrecta. + + + + Wallet decryption failed + Ha fallado el descifrado del monedero + + + + Wallet passphrase was successfully changed. + Se ha cambiado correctamente la contraseña del monedero. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Editar la lista de las direcciones y etiquetas almacenadas + + + + Show the list of addresses for receiving payments + Mostrar la lista de direcciones utilizadas para recibir pagos + + + + E&xit + &Salir + + + + Quit application + Salir de la aplicación + + + + Show information about curecoin + Mostrar información acerca de curecoin + + + + 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… + + + + Importing blocks from disk... + Importando bloques de disco... + + + + Reindexing blocks on disk... + Reindexando bloques en disco... + + + + Send coins to a curecoin address + Enviar monedas a una dirección curecoin + + + + Modify configuration options for curecoin + Modificar las opciones de configuración de curecoin + + + + 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... + + + + + curecoin + curecoin + + + + Wallet + Monedero + + + + &Send + &Enviar + + + + &Receive + &Recibir + + + + &Addresses + &Direcciones + + + + &About curecoin + &Acerca de curecoin + + + + &Show / Hide + Mo&strar/ocultar + + + + Show or hide the main Window + Mostrar u ocultar la ventana principal + + + + Encrypt the private keys that belong to your wallet + Cifrar las claves privadas de su monedero + + + + Sign messages with your curecoin addresses to prove you own them + Firmar mensajes con sus direcciones curecoin para demostrar la propiedad + + + + Verify messages to ensure they were signed with specified curecoin addresses + Verificar mensajes comprobando que están firmados con direcciones curecoin concretas + + + + &File + &Archivo + + + + &Settings + &Configuración + + + + &Help + A&yuda + + + + Tabs toolbar + Barra de pestañas + + + + + [testnet] + [testnet] + + + + curecoin client + Cliente curecoin + + + + %n active connection(s) to curecoin network + %n conexión activa hacia la red curecoin%n conexiones activas hacia la red curecoin + + + + No block source available... + Ninguna fuente de bloques disponible ... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Se han procesado %1 de %2 bloques (estimados) del historial de transacciones. + + + + Processed %1 blocks of transaction history. + Procesados %1 bloques del historial de transacciones. + + + + %n hour(s) + %n hora%n horas + + + + %n day(s) + %n día%n días + + + + %n week(s) + %n semana%n semanas + + + + %1 behind + %1 atrás + + + + Last received block was generated %1 ago. + El último bloque recibido fue generado hace %1. + + + + Transactions after this will not yet be visible. + Las transacciones posteriores a esta aún no están visibles. + + + + Error + Error + + + + Warning + Aviso + + + + Information + Información + + + + 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 supera el límite de tamaño. Puede enviarla con una comisión de %1, destinada a los nodos que procesen su transacción para contribuir al mantenimiento de la red. ¿Desea pagar esta comisión? + + + + Up to date + Actualizado + + + + Catching up... + Actualizando... + + + + Confirm transaction fee + Confirme la tarifa de la 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 + Gestión de URI + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + ¡No se puede interpretar la URI! Esto puede deberse a una dirección curecoin inválida o a parámetros de URI mal formados. + + + + 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Ha ocurrido un error crítico. curecoin ya no puede continuar con seguridad y se cerrará. + + + + ClientModel + + + Network Alert + Alerta de red + + + + EditAddressDialog + + + Edit Address + Editar Dirección + + + + &Label + &Etiqueta + + + + The label associated with this address book entry + La etiqueta asociada con esta entrada en la libreta + + + + &Address + &Dirección + + + + The address associated with this address book entry. This can only be modified for sending addresses. + La dirección asociada con esta entrada en la guía. Solo puede ser modificada para direcciones de envío. + + + + 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 envío + + + + 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 curecoin address. + La dirección introducida "%1" no es una dirección curecoin válida. + + + + Could not unlock wallet. + No se pudo desbloquear el monedero. + + + + New key generation failed. + Ha fallado la generación de la nueva clave. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versión + + + + Usage: + Uso: + + + + command-line options + opciones de la línea de órdenes + + + + UI options + Opciones GUI + + + + Set language, for example "de_DE" (default: system locale) + Establecer el idioma, por ejemplo, "es_ES" (predeterminado: configuración regional del sistema) + + + + Start minimized + Arrancar minimizado + + + + Show splash screen on startup (default: 1) + Mostrar pantalla de bienvenida en el inicio (predeterminado: 1) + + + + OptionsDialog + + + Options + Opciones + + + + &Main + &Principal + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Tarifa de transacción opcional por kB que ayuda a asegurar que sus transacciones sean procesadas rápidamente. La mayoría de transacciones son de 1kB. + + + + Pay transaction &fee + Comisión de &transacciones + + + + Automatically start curecoin after logging in to the system. + Iniciar curecoin automáticamente al encender el sistema. + + + + &Start curecoin on system login + &Iniciar curecoin al iniciar el sistema + + + + Reset all client options to default. + Restablecer todas las opciones del cliente a las predeterminadas. + + + + &Reset Options + &Restablecer opciones + + + + &Network + &Red + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Abrir automáticamente el puerto del cliente curecoin en el router. Esta opción solo funciona si el router admite UPnP y está activado. + + + + Map port using &UPnP + Mapear el puerto usando &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Conectar a la red curecoin a través de un proxy SOCKS (ej. para conectar con la red Tor) + + + + &Connect through SOCKS proxy: + &Conectar a través de un proxy SOCKS: + + + + Proxy &IP: + Dirección &IP del proxy: + + + + IP address of the proxy (e.g. 127.0.0.1) + Dirección IP del proxy (ej. 127.0.0.1) + + + + &Port: + &Puerto: + + + + Port of the proxy (e.g. 9050) + Puerto del servidor proxy (ej. 9050) + + + + SOCKS &Version: + &Versión SOCKS: + + + + SOCKS version of the proxy (e.g. 5) + Versión del proxy SOCKS (ej. 5) + + + + &Window + &Ventana + + + + Show only a tray icon after minimizing the window. + Minimizar la ventana a la bandeja de iconos del sistema. + + + + &Minimize to the tray instead of the taskbar + &Minimizar a la bandeja en vez de a la barra de tareas + + + + 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. + Minimizar en lugar de salir de la aplicación al cerrar la ventana.Cuando esta opción está activa, la aplicación solo se puede cerrar seleccionando Salir desde el menú. + + + + M&inimize on close + M&inimizar al cerrar + + + + &Display + &Interfaz + + + + User Interface &language: + I&dioma de la interfaz de usuario + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + El idioma de la interfaz de usuario puede establecerse aquí. Este ajuste se aplicará cuando se reinicie curecoin. + + + + &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 monedas. + + + + Whether to show curecoin addresses in the transaction list or not. + Mostrar o no las direcciones curecoin en la lista de transacciones. + + + + &Display addresses in transaction list + &Mostrar las direcciones en la lista de transacciones + + + + &OK + &Aceptar + + + + &Cancel + &Cancelar + + + + &Apply + &Aplicar + + + + default + predeterminado + + + + Confirm options reset + Confirme el restablecimiento de las opciones + + + + Some settings may require a client restart to take effect. + Algunas configuraciones pueden requerir un reinicio del cliente para que sean efectivas. + + + + Do you want to proceed? + ¿Quiere proceder? + + + + + Warning + Aviso + + + + + This setting will take effect after restarting curecoin. + Esta configuración tendrá efecto tras reiniciar curecoin. + + + + The supplied proxy address is invalid. + La dirección proxy indicada es inválida. + + + + OverviewPage + + + Form + Desde + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + La información mostrada puede estar desactualizada. Su monedero se sincroniza automáticamente con la red curecoin después de que se haya establecido una conexión , pero este proceso aún no se ha completado. + + + + Balance: + Saldo: + + + + Unconfirmed: + No confirmado(s): + + + + Wallet + Monedero + + + + Immature: + No disponible: + + + + Mined balance that has not yet matured + Saldo recién minado que aún no está disponible. + + + + <b>Recent transactions</b> + <b>Movimientos recientes</b> + + + + Your current balance + Su saldo actual + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Total de las transacciones que faltan por confirmar y que no contribuyen al saldo actual + + + + + out of sync + desincronizado + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + No se pudo iniciar curecoin: manejador de pago-al-clic + + + + QRCodeDialog + + + QR Code Dialog + Diálogo de códigos QR + + + + Request Payment + Solicitud de pago + + + + Amount: + Cuantía: + + + + Label: + Etiqueta: + + + + Message: + Mensaje: + + + + &Save As... + &Guardar como... + + + + Error encoding URI into QR Code. + Error al codificar la URI en el código QR. + + + + The entered amount is invalid, please check. + La cantidad introducida es inválida. Compruébela, por favor. + + + + Resulting URI too long, try to reduce the text for label / message. + URI esultante demasiado larga. Intente reducir el texto de la etiqueta / mensaje. + + + + Save QR Code + Guardar código QR + + + + PNG Images (*.png) + Imágenes PNG (*.png) + + + + RPCConsole + + + Client name + Nombre del cliente + + + + + + + + + + + + + N/A + N/D + + + + Client version + Versión del cliente + + + + &Information + &Información + + + + Using OpenSSL version + Utilizando la versión OpenSSL + + + + Startup time + Hora de inicio + + + + Network + Red + + + + Number of connections + Número de conexiones + + + + On testnet + En la red de pruebas + + + + Block chain + Cadena de bloques + + + + Current number of blocks + Número actual de bloques + + + + Estimated total blocks + Bloques totales estimados + + + + Last block time + Hora del último bloque + + + + &Open + &Abrir + + + + Command-line options + Opciones de la línea de órdenes + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Mostrar el mensaje de ayuda de curecoin-Qt que enumera las opciones disponibles de línea de órdenes para curecoin. + + + + &Show + &Mostrar + + + + &Console + &Consola + + + + Build date + Fecha de compilación + + + + curecoin - Debug window + curecoin - Ventana de depuración + + + + curecoin Core + Núcleo de curecoin + + + + Debug log file + Archivo de registro de depuración + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Abrir el archivo de registro de depuración en el directorio actual de datos. Esto puede llevar varios segundos para archivos de registro grandes. + + + + Clear console + Borrar consola + + + + Welcome to the curecoin RPC console. + Bienvenido a la consola RPC de curecoin + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Use las flechas arriba y abajo para navegar por el historial y <b>Control+L</b> para limpiar la pantalla. + + + + Type <b>help</b> for an overview of available commands. + Escriba <b>help</b> para ver un resumen de los comandos disponibles. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Enviar monedas + + + + Send to multiple recipients at once + Enviar a multiples destinatarios de una vez + + + + Add &Recipient + Añadir &destinatario + + + + Remove all transaction fields + Eliminar todos los campos de las transacciones + + + + Clear &All + Limpiar &todo + + + + Balance: + Saldo: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Confirmar el envío + + + + S&end + &Enviar + + + + <b>%1</b> to %2 (%3) + <b>%1</b> a %2 (%3) + + + + Confirm send coins + Confirmar el envío de monedas + + + + Are you sure you want to send %1? + ¿Está seguro de que desea enviar %1? + + + + and + y + + + + The recipient address is not valid, please recheck. + La dirección de recepción no es válida, compruébela de nuevo. + + + + The amount to pay must be larger than 0. + La cantidad por pagar tiene que ser mayor de 0. + + + + The amount exceeds your balance. + La cantidad sobrepasa su saldo. + + + + The total exceeds your balance when the %1 transaction fee is included. + El total sobrepasa su saldo cuando se incluye la tasa de envío de %1 + + + + 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: Transaction creation failed! + Error: ¡Ha fallado la creación de la transacción! + + + + 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: transacción rechazada. Puede haber ocurrido si alguna de las monedas ya estaba gastada o si ha usado una copia de wallet.dat y las monedas se gastaron en la copia pero no se han marcado así aquí. + + + + SendCoinsEntry + + + Form + Envío + + + + A&mount: + Ca&ntidad: + + + + Pay &To: + &Pagar a: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + La dirección a la que enviar el pago (p. ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Elija una 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 + Eliminar destinatario + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduzca una dirección curecoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Firmas - Firmar / verificar un mensaje + + + + &Sign Message + &Firmar mensaje + + + + 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. + Puede firmar mensajes con sus direcciones para demostrar que las posee. Tenga cuidado de no firmar cualquier cosa vaga, ya que los ataques de phishing pueden tratar de engañarle para suplantar su identidad. Firme solo declaraciones totalmente detalladas con las que usted esté de acuerdo. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + La dirección con la que firmar el mensaje (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Elija una dirección de la libreta de direcciones + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pegar dirección desde portapapeles + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Introduzca el mensaje que desea firmar aquí + + + + Signature + Firma + + + + Copy the current signature to the system clipboard + Copiar la firma actual al portapapeles del sistema + + + + Sign the message to prove you own this curecoin address + Firmar el mensaje para demostrar que se posee esta dirección curecoin + + + + Sign &Message + Firmar &mensaje + + + + Reset all sign message fields + Limpiar todos los campos de la firma de mensaje + + + + + Clear &All + Limpiar &todo + + + + &Verify Message + &Verificar mensaje + + + + 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. + Introduzca la dirección para la firma, el mensaje (asegurándose de copiar tal cual los saltos de línea, espacios, tabulaciones, etc.) y la firma a continuación para verificar el mensaje. Tenga cuidado de no asumir más información de lo que dice el propio mensaje firmado para evitar fraudes basados en ataques de tipo man-in-the-middle. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + La dirección con la que se firmó el mensaje (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Verificar el mensaje para comprobar que fue firmado con la dirección curecoin indicada + + + + Verify &Message + Verificar &mensaje + + + + Reset all verify message fields + Limpiar todos los campos de la verificación de mensaje + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduzca una dirección curecoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Haga clic en "Firmar mensaje" para generar la firma + + + + Enter curecoin signature + Introduzca una firma curecoin + + + + + The entered address is invalid. + La dirección introducida es inválida. + + + + + + + Please check the address and try again. + Verifique la dirección e inténtelo de nuevo. + + + + + The entered address does not refer to a key. + La dirección introducida no corresponde a una clave. + + + + Wallet unlock was cancelled. + Se ha cancelado el desbloqueo del monedero. + + + + Private key for the entered address is not available. + No se dispone de la clave privada para la dirección introducida. + + + + Message signing failed. + Ha fallado la firma del mensaje. + + + + Message signed. + Mensaje firmado. + + + + The signature could not be decoded. + No se puede decodificar la firma. + + + + + Please check the signature and try again. + Compruebe la firma e inténtelo de nuevo. + + + + The signature did not match the message digest. + La firma no coincide con el resumen del mensaje. + + + + Message verification failed. + La verificación del mensaje ha fallado. + + + + Message verified. + Mensaje verificado. + + + + SplashScreen + + + Dr. Kimoto Chan + Dr. Kimoto Chan + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Abierto hasta %1 + + + + %1/offline + %1/fuera de línea + + + + %1/unconfirmed + %1/no confirmado + + + + %1 confirmations + %1 confirmaciones + + + + Status + Estado + + + + , broadcast through %n node(s) + , transmitir a través de %n nodo, transmitir a través de %n nodos + + + + Date + Fecha + + + + Source + Fuente + + + + Generated + Generado + + + + + From + De + + + + + + To + Para + + + + + own address + dirección propia + + + + label + etiqueta + + + + + + + + Credit + Crédito + + + + matures in %n more block(s) + disponible en %n bloque másdisponible en %n bloques más + + + + not accepted + no aceptada + + + + + + + Debit + Débito + + + + Transaction fee + Comisión de transacción + + + + Net amount + Cantidad neta + + + + Message + Mensaje + + + + Comment + Comentario + + + + Transaction ID + Identificador de transacción + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Las monedas generadas deben esperar 120 bloques antes de que se puedan gastar. Cuando se generó este bloque, se emitió a la red para ser agregado a la cadena de bloques. Si no consigue incorporarse a la cadena, su estado cambiará a "no aceptado" y las monedas no se podrán gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque casi al mismo tiempo que el suyo. + + + + Debug information + Información de depuración + + + + Transaction + Transacción + + + + Inputs + entradas + + + + Amount + Cantidad + + + + true + verdadero + + + + false + falso + + + + , has not been successfully broadcast yet + , todavía no se ha sido difundido satisfactoriamente + + + + Open for %n more block(s) + Abrir para %n bloque másAbrir para %n bloques más + + + + unknown + desconocido + + + + TransactionDescDialog + + + Transaction details + Detalles de transacción + + + + This pane shows a detailed description of the transaction + Esta ventana muestra información detallada sobre la transacción + + + + TransactionTableModel + + + Date + Fecha + + + + Type + Tipo + + + + Address + Dirección + + + + Amount + Cantidad + + + + Open for %n more block(s) + Abrir para %n bloque másAbrir para %n bloques más + + + + Open until %1 + Abierto hasta %1 + + + + Offline (%1 confirmations) + Fuera de línea (%1 confirmaciones) + + + + Unconfirmed (%1 of %2 confirmations) + No confirmado (%1 de %2 confirmaciones) + + + + Confirmed (%1 confirmations) + Confirmado (%1 confirmaciones) + + + + Mined balance will be available when it matures in %n more block(s) + El saldo recién minado estará disponible cuando venza el plazo en %n bloque másEl saldo recién minado estará disponible cuando venza el plazo en %n bloques más + + + + This block was not received by any other nodes and will probably not be accepted! + Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado! + + + + Generated but not accepted + Generado pero no aceptado + + + + Received with + Recibido con + + + + Received from + Recibidos de + + + + Sent to + Enviado a + + + + Payment to yourself + Pago propio + + + + Mined + Minado + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Fecha y hora en que se recibió la transacción. + + + + Type of transaction. + Tipo de transacción. + + + + Destination address of transaction. + Dirección de destino de la transacción. + + + + Amount removed from or added to balance. + Cantidad retirada o añadida al saldo. + + + + TransactionView + + + + All + Todo + + + + Today + Hoy + + + + This week + Esta semana + + + + This month + Este mes + + + + Last month + Mes pasado + + + + This year + Este año + + + + Range... + Rango... + + + + Received with + Recibido con + + + + Sent to + Enviado a + + + + To yourself + A usted mismo + + + + Mined + Minado + + + + Other + Otra + + + + Enter address or label to search + Introduzca una dirección o etiqueta que buscar + + + + Min amount + Cantidad mínima + + + + Copy address + Copiar dirección + + + + Copy label + Copiar etiqueta + + + + Copy amount + Copiar cuantía + + + + Copy transaction ID + Copiar identificador de transacción + + + + Edit label + Editar etiqueta + + + + Show transaction details + Mostrar detalles de la transacción + + + + Export Transaction Data + Exportar datos de la transacción + + + + Comma separated file (*.csv) + Archivos de columnas separadas por coma (*.csv) + + + + Confirmed + Confirmado + + + + Date + Fecha + + + + Type + Tipo + + + + Label + Etiqueta + + + + Address + Dirección + + + + Amount + Cantidad + + + + ID + ID + + + + Error exporting + Error exportando + + + + Could not write to file %1. + No se pudo escribir en el archivo %1. + + + + Range: + Rango: + + + + to + para + + + + WalletModel + + + Send Coins + Enviar monedas + + + + WalletView + + + &Export + &Exportar + + + + Export the data in the current tab to a file + Exportar a un archivo los datos de esta pestaña + + + + Backup Wallet + Respaldo de monedero + + + + Wallet Data (*.dat) + Datos de monedero (*.dat) + + + + Backup Failed + Ha fallado el respaldo + + + + There was an error trying to save the wallet data to the new location. + Se ha producido un error al intentar guardar los datos del monedero en la nueva ubicación. + + + + Backup Successful + Se ha completado con éxito la copia de respaldo + + + + The wallet data was successfully saved to the new location. + Los datos del monedero se han guardado con éxito en la nueva ubicación. + + + + curecoin-core + + + curecoin version + Versión de curecoin + + + + Usage: + Uso: + + + + Send command to -server or curecoind + Envíar comando a -server o curecoind + + + + List commands + Muestra comandos + + + + + Get help for a command + Recibir ayuda para un comando + + + + + Options: + Opciones: + + + + + Specify configuration file (default: curecoin.conf) + Especificar archivo de configuración (predeterminado: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + Especificar archivo pid (predeterminado: curecoin.pid) + + + + + Specify data directory + Especificar directorio para los datos + + + + Set database cache size in megabytes (default: 25) + Establecer el tamaño de caché de la base de datos en megabytes (predeterminado: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Escuchar conexiones en <puerto> (predeterminado: 7951 o testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Mantener como máximo <n> conexiones a pares (predeterminado: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Conectar a un nodo para obtener direcciones de pares y desconectar + + + + Specify your own public address + Especifique su propia dirección pública + + + + Threshold for disconnecting misbehaving peers (default: 100) + Umbral para la desconexión de pares con mal comportamiento (predeterminado: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Ha ocurrido un error al configurar el puerto RPC %u para escucha en IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Escuchar conexiones JSON-RPC en <puerto> (predeterminado: 7950 o testnet:17950) + + + + Accept command line and JSON-RPC commands + Aceptar comandos consola y JSON-RPC + + + + + Run in the background as a daemon and accept commands + Correr como demonio y aceptar comandos + + + + + Use the test network + Usar la red de pruebas + + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Aceptar conexiones desde el exterior (predeterminado: 1 si no -proxy o -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, debe establecer un valor rpcpassword en el archivo de configuración: +%s +Se recomienda utilizar la siguiente contraseña aleatoria: +rpcuser=curecoinrpc +rpcpassword=%s +(no es necesario recordar esta contraseña) +El nombre de usuario y la contraseña DEBEN NO ser iguales. +Si el archivo no existe, créelo con permisos de archivo de solo lectura. +Se recomienda también establecer alertnotify para recibir notificaciones de problemas. +Por ejemplo: alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Ha ocurrido un error al configurar el puerto RPC %u para escuchar mediante IPv6. Recurriendo a IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + No se puede bloquear el directorio de datos %s. Probablemente curecoin ya se está ejecutando. + + + + 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: se ha rechazado la transacción! Esto puede ocurrir si ya se han gastado algunas de las monedas del monedero, como ocurriría si hubiera hecho una copia de wallet.dat y se hubieran gastado monedas a partir de la copia, con lo que no se habrían marcado aquí como gastadas. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + ¡Error: Esta transacción requiere una comisión de al menos %s debido a su monto, complejidad, o al uso de fondos recién recibidos! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Ejecutar orden cuando se reciba un aviso relevante (%s en cmd se reemplazará por el mensaje) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Establecer el tamaño máximo de las transacciones de alta prioridad/comisión baja en bytes (predeterminado:27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería. + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Aviso: ¡Las transacciones mostradas pueden no ser correctas! Puede necesitar una actualización o bien otros nodos necesitan actualizarse. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Precaución: Por favor, ¡revise que la fecha y hora de su ordenador son correctas! Si su reloj está mal, curecoin 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. + + + + 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. + Aviso: ¡Recuperados datos de wallet.dat corrupto! El wallet.dat original se ha guardado como wallet.{timestamp}.bak en %s; si hubiera errores en su saldo o transacciones, deberá restaurar una copia de seguridad. + + + + Attempt to recover private keys from a corrupt wallet.dat + Intento de recuperar claves privadas de un wallet.dat corrupto + + + + Block creation options: + Opciones de creación de bloques: + + + + Connect only to the specified node(s) + Conectar sólo a los nodos (o nodo) especificados + + + + Corrupted block database detected + Corrupción de base de datos de bloques detectada. + + + + Discover own IP address (default: 1 when listening and no -externalip) + Descubrir dirección IP propia (predeterminado: 1 al escuchar sin -externalip) + + + + Do you want to rebuild the block database now? + ¿Quieres reconstruir la base de datos de bloques ahora? + + + + Error initializing block database + Error al inicializar la base de datos de bloques + + + + Error initializing wallet database environment %s! + Error al inicializar el entorno de la base de datos del monedero %s + + + + Error loading block database + Error cargando base de datos de bloques + + + + Error opening block database + Error al abrir base de datos de bloques. + + + + Error: Disk space is low! + Error: ¡Espacio en disco bajo! + + + + Error: Wallet locked, unable to create transaction! + Error: ¡El monedero está bloqueado; no se puede crear la transacción! + + + + Error: system error: + Error: error de sistema: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto. + + + + Failed to read block info + No se ha podido leer la información de bloque + + + + Failed to read block + No se ha podido leer el bloque + + + + Failed to sync block index + No se ha podido sincronizar el índice de bloques + + + + Failed to write block index + No se ha podido escribir en el índice de bloques + + + + Failed to write block info + No se ha podido escribir la información de bloques + + + + Failed to write block + No se ha podido escribir el bloque + + + + Failed to write file info + No se ha podido escribir la información de archivo + + + + Failed to write to coin database + No se ha podido escribir en la base de datos de monedas + + + + Failed to write transaction index + No se ha podido escribir en el índice de transacciones + + + + Failed to write undo data + No se han podido escribir los datos de deshacer + + + + Find peers using DNS lookup (default: 1 unless -connect) + Encontrar pares mediante búsqueda de DNS (predeterminado: 1 salvo con -connect) + + + + Generate coins (default: 0) + Generar monedas (por defecto: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Cuántos bloques comprobar al iniciar (predeterminado: 288, 0 = todos) + + + + How thorough the block verification is (0-4, default: 3) + Como es de exhaustiva la verificación de bloques (0-4, por defecto 3) + + + + Not enough file descriptors available. + No hay suficientes descriptores de archivo disponibles. + + + + Rebuild block chain index from current blk000??.dat files + Reconstruir el índice de la cadena de bloques a partir de los archivos blk000??.dat actuales + + + + Set the number of threads to service RPC calls (default: 4) + Establecer el número de hilos para atender las llamadas RPC (predeterminado: 4) + + + + Verifying blocks... + Verificando bloques... + + + + Verifying wallet... + Verificando monedero... + + + + Imports blocks from external blk000??.dat file + Importa los bloques desde un archivo blk000??.dat externo + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Configura el número de hilos para el script de verificación (hasta 16, 0 = auto, <0 = leave that many cores free, por fecto: 0) + + + + Information + Información + + + + Invalid -tor address: '%s' + Dirección -tor inválida: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + Inválido por el monto -minrelaytxfee=<amount>: '%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + Inválido por el monto -mintxfee=<amount>: '%s' + + + + Maintain a full transaction index (default: 0) + Mantener índice de transacciones completo (predeterminado: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Búfer de recepción máximo por conexión, <n>*1000 bytes (predeterminado: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Búfer de recepción máximo por conexión, , <n>*1000 bytes (predeterminado: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Aceptar solamente cadena de bloques que concuerde con los puntos de control internos (predeterminado: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Conectarse solo a nodos de la red <net> (IPv4, IPv6 o Tor) + + + + Output extra debugging information. Implies all other -debug* options + Mostrar información de depuración adicional. Implica todos los demás opciones -debug* + + + + Output extra network debugging information + Mostrar información de depuración adicional + + + + Prepend debug output with timestamp + Anteponer marca temporal a la información de depuración + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Opciones SSL: (ver la curecoin Wiki para instrucciones de configuración SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + Elija la versión del proxy socks a usar (4-5, predeterminado: 5) + + + + Send trace/debug info to console instead of debug.log file + Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log + + + + Send trace/debug info to debugger + Enviar información de trazas/depuración al depurador + + + + Set maximum block size in bytes (default: 250000) + Establecer tamaño máximo de bloque en bytes (predeterminado: 250000) + + + + Set minimum block size in bytes (default: 0) + Establecer tamaño mínimo de bloque en bytes (predeterminado: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug) + + + + Signing transaction failed + Transacción falló + + + + Specify connection timeout in milliseconds (default: 5000) + Especificar el tiempo máximo de conexión en milisegundos (predeterminado: 5000) + + + + System error: + Error de sistema: + + + + Transaction amount too small + Monto de la transacción muy pequeño + + + + Transaction amounts must be positive + Montos de transacciones deben ser positivos + + + + Transaction too large + Transacción demasiado grande + + + + Use UPnP to map the listening port (default: 0) + Usar UPnP para asignar el puerto de escucha (predeterminado: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Usar UPnP para asignar el puerto de escucha (predeterminado: 1 al escuchar) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Utilizar proxy para conectar a Tor servicios ocultos (predeterminado: igual que -proxy) + + + + Username for JSON-RPC connections + Nombre de usuario para las conexiones JSON-RPC + + + + + Warning + Aviso + + + + Warning: This version is obsolete, upgrade required! + Aviso: Esta versión es obsoleta, actualización necesaria! + + + + You need to rebuild the databases using -reindex to change -txindex + Necesita reconstruir las bases de datos con la opción -reindex para modificar -txindex + + + + wallet.dat corrupt, salvage failed + wallet.dat corrupto. Ha fallado la recuperación. + + + + Password for JSON-RPC connections + Contraseña para las conexiones JSON-RPC + + + + + Allow JSON-RPC connections from specified IP address + Permitir conexiones JSON-RPC desde la dirección IP especificada + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Enviar comando al nodo situado en <ip> (predeterminado: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Ejecutar un comando cuando cambia el mejor bloque (%s en cmd se sustituye por el hash de bloque) + + + + Upgrade wallet to latest format + Actualizar el monedero al último formato + + + + Set key pool size to <n> (default: 100) + Ajustar el número de claves en reserva <n> (predeterminado: 100) + + + + + Rescan the block chain for missing wallet transactions + Volver a examinar la cadena de bloques en busca de transacciones del monedero perdidas + + + + Use OpenSSL (https) for JSON-RPC connections + Usar OpenSSL (https) para las conexiones JSON-RPC + + + + + Server certificate file (default: server.cert) + Certificado del servidor (predeterminado: server.cert) + + + + + Server private key (default: server.pem) + Clave privada del servidor (predeterminado: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Cifrados aceptados (predeterminado: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + This help message + Este mensaje de ayuda + + + + + 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 + Conectar mediante proxy socks + + + + Allow DNS lookups for -addnode, -seednode and -connect + Permitir búsquedas DNS para -addnode, -seednode y -connect + + + + Loading addresses... + Cargando direcciones... + + + + Error loading wallet.dat: Wallet corrupted + Error al cargar wallet.dat: el monedero está dañado + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Error al cargar wallet.dat: El monedero requiere una versión más reciente de curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + El monedero ha necesitado ser reescrito. Reinicie curecoin para completar el proceso + + + + Error loading wallet.dat + Error al cargar wallet.dat + + + + Invalid -proxy address: '%s' + Dirección -proxy inválida: '%s' + + + + Unknown network specified in -onlynet: '%s' + La red especificada en -onlynet '%s' es desconocida + + + + Unknown -socks proxy version requested: %i + Solicitada versión de proxy -socks desconocida: %i + + + + Cannot resolve -bind address: '%s' + No se puede resolver la dirección de -bind: '%s' + + + + Cannot resolve -externalip address: '%s' + No se puede resolver la dirección de -externalip: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Cantidad inválida para -paytxfee=<amount>: '%s' + + + + Invalid amount + Cuantía no válida + + + + Insufficient funds + Fondos insuficientes + + + + Loading block index... + Cargando el índice de bloques... + + + + 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. curecoin is probably already running. + No es posible conectar con %s en este sistema. Probablemente curecoin ya está ejecutándose. + + + + Fee per KB to add to transactions you send + Tarifa por KB que añadir a las transacciones que envíe + + + + Loading wallet... + Cargando monedero... + + + + Cannot downgrade wallet + No se puede rebajar el monedero + + + + Cannot write default address + No se puede escribir la dirección predeterminada + + + + Rescanning... + Reexplorando... + + + + Done loading + Generado pero no aceptado + + + + To use the %s option + Para utilizar la opción %s + + + + Error + 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. + Tiene que establecer rpcpassword=<contraseña> en el fichero de configuración: ⏎ +%s ⏎ +Si el archivo no existe, créelo con permiso de lectura solamente del propietario. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_es_CL.qm b/src/qt/locale/curecoin_es_CL.qm new file mode 100644 index 0000000..fdd3992 Binary files /dev/null and b/src/qt/locale/curecoin_es_CL.qm differ diff --git a/src/qt/locale/curecoin_es_CL.ts b/src/qt/locale/curecoin_es_CL.ts new file mode 100644 index 0000000..e64b658 --- /dev/null +++ b/src/qt/locale/curecoin_es_CL.ts @@ -0,0 +1,2952 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Sobre curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> - versión + + + + +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. + +Este es un software experimental. + +Distribuido bajo la licencia MIT/X11, vea el archivo adjunto +COPYING o http://www.opensource.org/licenses/mit-license.php. + +Este producto incluye software desarrollado por OpenSSL Project para su uso en +el OpenSSL Toolkit (http://www.openssl.org/), software criptográfico escrito por +Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard. + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Guia de direcciones + + + + 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 + + + + Copy the currently selected address to the system clipboard + Copia la dirección seleccionada al portapapeles + + + + &New Address + &Nueva dirección + + + + These are your curecoin 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 tus direcciones curecoin para recibir pagos. Puedes utilizar una diferente por cada persona emisora para saber quien te está pagando. + + + + &Copy Address + &Copia dirección + + + + Show &QR Code + Mostrar Código &QR + + + + Sign a message to prove you own a curecoin address + Firmar un mensaje para provar que usted es dueño de esta dirección + + + + Sign &Message + Firmar Mensaje + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + Exportar los datos de la pestaña actual a un archivo + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &Borrar + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Copia &etiqueta + + + + &Edit + &Editar + + + + Send &Coins + + + + + Export Address Book Data + Exporta datos de la guia de direcciones + + + + Comma separated file (*.csv) + Archivos separados por coma (*.csv) + + + + Error exporting + Exportar errores + + + + Could not write to file %1. + No se pudo escribir al archivo %1. + + + + AddressTableModel + + + Label + Etiqueta + + + + Address + Dirección + + + + (no label) + (sin etiqueta) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + Introduce contraseña actual + + + + New passphrase + Nueva contraseña + + + + Repeat new passphrase + Repite nueva contraseña: + + + + 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>. + Introduce la nueva contraseña para la billetera.<br/>Por favor utiliza un contraseña <b>de 10 o mas caracteres aleatorios</b>, u <b>ocho o mas palabras</b>. + + + + Encrypt wallet + Codificar billetera + + + + This operation needs your wallet passphrase to unlock the wallet. + Esta operación necesita la contraseña para desbloquear la billetera. + + + + Unlock wallet + Desbloquea billetera + + + + This operation needs your wallet passphrase to decrypt the wallet. + Esta operación necesita la contraseña para decodificar la billetara. + + + + Decrypt wallet + Decodificar cartera + + + + Change passphrase + Cambia contraseña + + + + Enter the old and new passphrase to the wallet. + Introduce la contraseña anterior y la nueva de cartera + + + + Confirm wallet encryption + Confirma la codificación de cartera + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Atención: ¡Si codificas tu billetera y pierdes la contraseña perderás <b>TODOS TUS curecoinS</b>! + + + + Are you sure you wish to encrypt your wallet? + ¿Seguro que quieres seguir codificando la billetera? + + + + 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! + Precaucion: Mayúsculas Activadas + + + + + Wallet encrypted + Billetera codificada + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin se cerrará para finalizar el proceso de encriptación. Recuerde que encriptar su billetera no protegera completatamente sus curecoins de ser robados por malware que infecte su computador + + + + + + + Wallet encryption failed + Falló la codificación de la billetera + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + La codificación de la billetera falló debido a un error interno. Tu billetera no ha sido codificada. + + + + + The supplied passphrases do not match. + Las contraseñas no coinciden. + + + + Wallet unlock failed + Ha fallado el desbloqueo de la billetera + + + + + + The passphrase entered for the wallet decryption was incorrect. + La contraseña introducida para decodificar la billetera es incorrecta. + + + + Wallet decryption failed + Ha fallado la decodificación de la billetera + + + + Wallet passphrase was successfully changed. + La contraseña de billetera ha sido cambiada con éxito. + + + + curecoinGUI + + + 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 + &Transacciónes + + + + Browse transaction history + Explora el historial de transacciónes + + + + Edit the list of stored addresses and labels + Edita la lista de direcciones y etiquetas almacenadas + + + + Show the list of addresses for receiving payments + Muestra la lista de direcciónes utilizadas para recibir pagos + + + + E&xit + &Salir + + + + Quit application + Salir del programa + + + + Show information about curecoin + Muestra información acerca de curecoin + + + + 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... + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + Enviar monedas a una dirección curecoin + + + + Modify configuration options for curecoin + Modifica las opciones de configuración de curecoin + + + + 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 + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + curecoin + + + + Wallet + Cartera + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &Sobre curecoin + + + + &Show / Hide + &Mostrar/Ocultar + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Archivo + + + + &Settings + &Configuración + + + + &Help + &Ayuda + + + + Tabs toolbar + Barra de pestañas + + + + + [testnet] + [red-de-pruebas] + + + + curecoin client + Cliente curecoin + + + + %n active connection(s) to curecoin network + %n conexión activa hacia la red curecoin%n conexiones activas hacia la red curecoin + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Actualizado + + + + Catching up... + Recuperando... + + + + 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 curecoin 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + EditAddressDialog + + + Edit Address + Editar dirección + + + + &Label + &Etiqueta + + + + The label associated with this address book entry + La etiqueta asociada con esta entrada de la libreta de direcciones + + + + &Address + &Dirección + + + + The address associated with this address book entry. This can only be modified for sending addresses. + La dirección asociada con esta entrada en la libreta de direcciones. Solo puede ser modificada para direcciónes de envío. + + + + 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 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 curecoin address. + La dirección introducida "%1" no es una dirección curecoin valida. + + + + Could not unlock wallet. + No se pudo desbloquear la billetera. + + + + New key generation failed. + La generación de nueva clave falló. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + + + + + version + versión + + + + Usage: + Uso: + + + + command-line options + + + + + UI options + UI opciones + + + + Set language, for example "de_DE" (default: system locale) + + + + + Start minimized + Arranca minimizado + + + + + Show splash screen on startup (default: 1) + + + + + OptionsDialog + + + Options + Opciones + + + + &Main + &Principal + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Comisión de &transacciónes + + + + Automatically start curecoin after logging in to the system. + Inicia curecoin automáticamente despues de encender el computador + + + + &Start curecoin on system login + &Inicia curecoin al iniciar el sistema + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Abre automáticamente el puerto del cliente curecoin en el router. Esto funciona solo cuando tu router es compatible con UPnP y está habilitado. + + + + Map port using &UPnP + Direcciona el puerto usando &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Conecta a la red curecoin a través de un proxy SOCKS (ej. cuando te conectas por la red Tor) + + + + &Connect through SOCKS proxy: + &Conecta a traves de un proxy SOCKS: + + + + Proxy &IP: + &IP Proxy: + + + + IP address of the proxy (e.g. 127.0.0.1) + Dirección IP del servidor proxy (ej. 127.0.0.1) + + + + &Port: + &Puerto: + + + + Port of the proxy (e.g. 9050) + Puerto del servidor proxy (ej. 9050) + + + + SOCKS &Version: + + + + + SOCKS version of the proxy (e.g. 5) + + + + + &Window + + + + + Show only a tray icon after minimizing the window. + Muestra solo un ícono en la bandeja después de minimizar la ventana + + + + &Minimize to the tray instead of the taskbar + &Minimiza a la bandeja en vez de la barra de tareas + + + + 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. + Minimiza la ventana en lugar de salir del programa cuando la ventana se cierra. Cuando esta opción esta activa el programa solo se puede cerrar seleccionando Salir desde el menu. + + + + M&inimize on close + M&inimiza a la bandeja al cerrar + + + + &Display + &Mostrado + + + + User Interface &language: + + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + + + + + &Unit to show amounts in: + &Unidad en la que mostrar cantitades: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Elige la subdivisión por defecto para mostrar cantidaded en la interfaz cuando se envien monedas + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + &Muestra direcciones en el listado de transaccioines + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + Atención + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + Formulario + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + Saldo: + + + + Unconfirmed: + No confirmados: + + + + Wallet + Cartera + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Transacciones recientes</b> + + + + Your current balance + Tu saldo actual + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Total de transacciones que no han sido confirmadas aun, y que no cuentan para el saldo actual. + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + + + + + Request Payment + Solicitar Pago + + + + Amount: + Cantidad: + + + + Label: + Etiqueta + + + + Message: + Mensaje: + + + + &Save As... + &Guardar Como... + + + + 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) + Imágenes PNG (*.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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + Enviar monedas + + + + Send to multiple recipients at once + Enviar a múltiples destinatarios + + + + Add &Recipient + &Agrega destinatario + + + + Remove all transaction fields + Remover todos los campos de la transacción + + + + Clear &All + &Borra todos + + + + Balance: + Balance: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Confirma el envio + + + + S&end + &Envía + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send coins + Confirmar el envio de monedas + + + + Are you sure you want to send %1? + Estas seguro que quieres enviar %1? + + + + and + y + + + + The recipient address is not valid, please recheck. + La dirección de destinatarion no es valida, comprueba otra vez. + + + + The amount to pay must be larger than 0. + La cantidad por pagar tiene que ser mayor 0. + + + + The amount exceeds your balance. + La cantidad sobrepasa tu saldo. + + + + The total exceeds your balance when the %1 transaction fee is included. + El total sobrepasa tu saldo cuando se incluyen %1 como tasa de envio. + + + + 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: 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: La transacción fue rechazada. Esto puede haber ocurrido si alguna de las monedas ya estaba gastada o si ha usado una copia de wallet.dat y las monedas se gastaron en la copia pero no se han marcado como gastadas aqui. + + + + SendCoinsEntry + + + Form + Envio + + + + A&mount: + Cantidad: + + + + Pay &To: + &Pagar a: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + 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: + + + + Choose address from address book + Elije dirección de la guia + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pega dirección desde portapapeles + + + + Alt+P + Alt+P + + + + Remove this recipient + Elimina destinatario + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduce una dirección curecoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + + + + + &Sign Message + &Firmar Mensaje + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduce una dirección curecoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Elije dirección de la guia + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Pega dirección desde portapapeles + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Escriba el mensaje que desea firmar + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + Firmar un mensjage para probar que usted es dueño de esta dirección + + + + Sign &Message + + + + + Reset all sign message fields + + + + + + Clear &All + &Borra todos + + + + &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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduce una dirección curecoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduce una dirección curecoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Click en "Firmar Mensage" para conseguir firma + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [red-de-pruebas] + + + + TransactionDesc + + + Open until %1 + Abierto hasta %1 + + + + %1/offline + %1/fuera de linea + + + + %1/unconfirmed + %1/no confirmado + + + + %1 confirmations + %1 confirmaciónes + + + + Status + Estado + + + + , broadcast through %n node(s) + + + + + Date + Fecha + + + + Source + + + + + Generated + Generado + + + + + From + De + + + + + + To + + + + + + own address + + + + + label + etiqueta + + + + + + + + Credit + Credito + + + + matures in %n more block(s) + + + + + not accepted + no aceptada + + + + + + + Debit + Debito + + + + Transaction fee + Comisión transacción + + + + Net amount + Cantidad total + + + + Message + Mensaje + + + + Comment + Comentario + + + + Transaction ID + ID de Transacción + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Las monedas generadas deben esperar 120 bloques antes de ser gastadas. Cuando has generado este bloque se emitió a la red para ser agregado en la cadena de bloques. Si falla al incluirse en la cadena, cambiará a "no aceptado" y las monedas no se podrán gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque casi al mismo tiempo que el tuyo. + + + + Debug information + + + + + Transaction + Transacción + + + + Inputs + + + + + Amount + Cantidad + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + , no ha sido emitido satisfactoriamente todavía + + + + Open for %n more block(s) + + + + + unknown + desconocido + + + + TransactionDescDialog + + + Transaction details + Detalles de transacción + + + + This pane shows a detailed description of the transaction + Esta ventana muestra información detallada sobre la transacción + + + + TransactionTableModel + + + Date + Fecha + + + + Type + Tipo + + + + Address + Dirección + + + + Amount + Cantidad + + + + Open for %n more block(s) + + + + + Open until %1 + Abierto hasta %1 + + + + Offline (%1 confirmations) + Fuera de linea (%1 confirmaciónes) + + + + Unconfirmed (%1 of %2 confirmations) + No confirmado (%1 de %2 confirmaciónes) + + + + Confirmed (%1 confirmations) + Confirmado (%1 confirmaciones) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado ! + + + + Generated but not accepted + Generado pero no acceptado + + + + Received with + Recibido con + + + + Received from + Recibido de + + + + Sent to + Enviado a + + + + Payment to yourself + Pagar a usted mismo + + + + Mined + Minado + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Fecha y hora cuando se recibió la transaccion + + + + Type of transaction. + Tipo de transacción. + + + + Destination address of transaction. + Dirección de destino para la transacción + + + + Amount removed from or added to balance. + Cantidad restada o añadida al balance + + + + TransactionView + + + + All + Todo + + + + Today + Hoy + + + + This week + Esta semana + + + + This month + Esta mes + + + + Last month + Mes pasado + + + + This year + Este año + + + + Range... + Rango... + + + + Received with + Recibido con + + + + Sent to + Enviado a + + + + To yourself + A ti mismo + + + + Mined + Minado + + + + Other + Otra + + + + Enter address or label to search + Introduce una dirección o etiqueta para buscar + + + + Min amount + Cantidad minima + + + + Copy address + Copia dirección + + + + Copy label + Copia etiqueta + + + + Copy amount + Copiar Cantidad + + + + Copy transaction ID + + + + + Edit label + Edita etiqueta + + + + Show transaction details + + + + + Export Transaction Data + Exportar datos de transacción + + + + Comma separated file (*.csv) + Archivos separados por coma (*.csv) + + + + Confirmed + Confirmado + + + + Date + Fecha + + + + Type + Tipo + + + + Label + Etiqueta + + + + Address + Dirección + + + + Amount + Cantidad + + + + ID + ID + + + + Error exporting + Error exportando + + + + Could not write to file %1. + No se pudo escribir en el archivo %1. + + + + Range: + Rango: + + + + to + para + + + + WalletModel + + + Send Coins + Enviar monedas + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + Exportar los datos de la pestaña actual a un archivo + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + Versión curecoin + + + + Usage: + Uso: + + + + Send command to -server or curecoind + Envia comando a curecoin lanzado con -server u curecoind + + + + + List commands + Muestra comandos + + + + + Get help for a command + Recibir ayuda para un comando + + + + + Options: + Opciones: + + + + + Specify configuration file (default: curecoin.conf) + Especifica archivo de configuración (predeterminado: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + Especifica archivo pid (predeterminado: curecoin.pid) + + + + + Specify data directory + Especifica directorio para los datos + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Escuchar por conecciones en <puerto> (Por defecto: 7951 o red de prueba: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Mantener al menos <n> conecciones por cliente (por defecto: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + Threshold for disconnecting misbehaving peers (default: 100) + Umbral de desconección de clientes con mal comportamiento (por defecto: 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Escucha conexiones JSON-RPC en el puerto <port> (predeterminado: 7950 or testnet: 17950) + + + + Accept command line and JSON-RPC commands + Aceptar comandos consola y JSON-RPC + + + + + Run in the background as a daemon and accept commands + Correr como demonio y acepta comandos + + + + + Use the test network + Usa la red de pruebas + + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Precaución: -paytxfee es muy alta. Esta es la comisión que pagarás si envias una transacción. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Precaución: Por favor revise que la fecha y hora de tu ordenador son correctas. Si tu reloj está mal configurado curecoin no funcionará correctamente. + + + + 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) + Conecta solo al nodo especificado + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + Dirección -tor invalida: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + + + + + Output extra debugging information. Implies all other -debug* options + Adjuntar informacion extra de depuracion. Implies all other -debug* options + + + + Output extra network debugging information + + + + + Prepend debug output with timestamp + Anteponer salida de depuracion con marca de tiempo + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Opciones SSL: (ver la curecoin Wiki para instrucciones de configuración SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + + + + + Send trace/debug info to console instead of debug.log file + Enviar informacion de seguimiento a la consola en vez del archivo debug.log + + + + Send trace/debug info to debugger + Enviar informacion de seguimiento al depurador + + + + 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Especifica tiempo de espera para conexion en milisegundos (predeterminado: 5000) + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Intenta usar UPnP para mapear el puerto de escucha (default: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Intenta usar UPnP para mapear el puerto de escucha (default: 1 when listening) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + Usuario para las conexiones JSON-RPC + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Contraseña para las conexiones JSON-RPC + + + + + Allow JSON-RPC connections from specified IP address + Permite conexiones JSON-RPC desde la dirección IP especificada + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Envia comando al nodo situado en <ip> (predeterminado: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Upgrade wallet to latest format + Actualizar billetera al formato actual + + + + Set key pool size to <n> (default: 100) + Ajusta el numero de claves en reserva <n> (predeterminado: 100) + + + + + Rescan the block chain for missing wallet transactions + Rescanea la cadena de bloques para transacciones perdidas de la cartera + + + + + Use OpenSSL (https) for JSON-RPC connections + Usa OpenSSL (https) para las conexiones JSON-RPC + + + + + Server certificate file (default: server.cert) + Certificado del servidor (Predeterminado: server.cert) + + + + + Server private key (default: server.pem) + Clave privada del servidor (Predeterminado: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Cifrados aceptados (Predeterminado: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + This help message + Este mensaje de ayuda + + + + + 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 + Conecta mediante proxy socks + + + + Allow DNS lookups for -addnode, -seednode and -connect + Permite búsqueda DNS para addnode y connect + + + + + Loading addresses... + Cargando direcciónes... + + + + Error loading wallet.dat: Wallet corrupted + Error cargando wallet.dat: Billetera corrupta + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Error cargando wallet.dat: Billetera necesita una vercion reciente de curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + La billetera necesita ser reescrita: reinicie curecoin para completar + + + + Error loading wallet.dat + Error cargando wallet.dat + + + + Invalid -proxy address: '%s' + Dirección -proxy invalida: '%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' + Cantidad inválida para -paytxfee=<amount>: '%s' + + + + Invalid amount + Cantidad inválida + + + + Insufficient funds + Fondos insuficientes + + + + Loading block index... + Cargando el index de bloques... + + + + 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. curecoin is probably already running. + No es posible escuchar en el %s en este ordenador. Probablemente curecoin ya se está ejecutando. + + + + Fee per KB to add to transactions you send + Comisión por kB para adicionarla a las transacciones enviadas + + + + Loading wallet... + Cargando cartera... + + + + Cannot downgrade wallet + + + + + Cannot write default address + + + + + Rescanning... + Rescaneando... + + + + Done loading + Carga completa + + + + To use the %s option + + + + + Error + 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/curecoin_et.qm b/src/qt/locale/curecoin_et.qm new file mode 100644 index 0000000..577e475 Binary files /dev/null and b/src/qt/locale/curecoin_et.qm differ diff --git a/src/qt/locale/curecoin_et.ts b/src/qt/locale/curecoin_et.ts new file mode 100644 index 0000000..97b948b --- /dev/null +++ b/src/qt/locale/curecoin_et.ts @@ -0,0 +1,2937 @@ + +UTF-8 + + AboutDialog + + + About curecoin + curecoinist + + + + <b>curecoin</b> version + <b>curecoini</b> versioon + + + + +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. + ⏎ +See on eksperimentaalne tarkvara.⏎ +⏎ +Levitatud MIT/X11 tarkvara litsentsi all, vaata kaasasolevat faili COPYING või http://www.opensource.org/licenses/mit-license.php⏎ +⏎ +Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenSSL Toolkitis (http://www.openssl.org/) ja Eric Young'i poolt loodud krüptograafilist tarkvara (eay@cryptsoft.com) ning Thomas Bernard'i loodud UPnP tarkvara. + + + + Copyright + Autoriõigus + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Aadressiraamat + + + + Double-click to edit address or label + Topeltklõps aadressi või märgise muutmiseks + + + + Create a new address + Loo uus aadress + + + + Copy the currently selected address to the system clipboard + Kopeeri märgistatud aadress vahemällu + + + + &New Address + &Uus aadress + + + + These are your curecoin 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. + Maksete saamiseks kasutatavad curecoini aadressid. Maksjate paremaks jälgimiseks võib igaühele anda erineva. + + + + &Copy Address + &Aadressi kopeerimine + + + + Show &QR Code + Kuva %QR kood + + + + Sign a message to prove you own a curecoin address + Allkirjasta sõnum, et tõestada Megaconi aadressi olemasolu. + + + + Sign &Message + Allkirjasta &Sõnum + + + + Delete the currently selected address from the list + Kustuta märgistatud aadress loetelust + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + Kinnita sõnum tõestamaks selle allkirjastatust määratud curecoini aadressiga. + + + + &Verify Message + &Kinnita Sõnum + + + + &Delete + &Kustuta + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Need on sinu curecoini aadressid maksete saatmiseks. Müntide saatmisel kontrolli alati summat ning saaja aadressi. + + + + Copy &Label + &Märgise kopeerimine + + + + &Edit + &Muuda + + + + Send &Coins + Saada &Münte + + + + Export Address Book Data + Ekspordi Aadressiraamat + + + + Comma separated file (*.csv) + Komaeraldatud fail (*.csv) + + + + Error exporting + Viga eksportimisel + + + + Could not write to file %1. + Tõrge faili kirjutamisel %1. + + + + AddressTableModel + + + Label + Silt + + + + Address + Aadress + + + + (no label) + (silti pole) + + + + AskPassphraseDialog + + + Passphrase Dialog + Salafraasi dialoog + + + + Enter passphrase + Sisesta salafraas + + + + New passphrase + Uus salafraas + + + + Repeat new passphrase + Korda salafraasi + + + + 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>. + Sisesta rahakotile uus salafraas.<br/>Palun kasuta salafraasina <b>vähemalt 10 tähte/numbrit/sümbolit</b>, või <b>vähemalt 8 sõna</b>. + + + + Encrypt wallet + Krüpteeri rahakott + + + + This operation needs your wallet passphrase to unlock the wallet. + See toiming nõuab sinu rahakoti salafraasi. + + + + Unlock wallet + Tee rahakott lukust lahti. + + + + This operation needs your wallet passphrase to decrypt the wallet. + See toiming nõuab sinu rahakoti salafraasi. + + + + Decrypt wallet + Dekrüpteeri rahakott. + + + + Change passphrase + Muuda salafraasi + + + + Enter the old and new passphrase to the wallet. + Sisesta rahakoti vana ning uus salafraas. + + + + Confirm wallet encryption + Kinnita rahakoti krüpteering + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Hoiatus: Kui sa kaotad oma, rahakoti krüpteerimisel kasutatud, salafraasi, siis <b>KAOTAD KA KÕIK OMA curecoinID</b>! + + + + Are you sure you wish to encrypt your wallet? + Kas soovid oma rahakoti krüpteerida? + + + + 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ÄHTIS: Kõik varasemad rahakoti varundfailid tuleks üle kirjutada äsja loodud krüpteeritud rahakoti failiga. Turvakaalutlustel tühistatakse krüpteerimata rahakoti failid alates uue, krüpteeritud rahakoti, kasutusele võtust. + + + + + Warning: The Caps Lock key is on! + Hoiatus: Caps Lock on sisse lülitatud! + + + + + Wallet encrypted + Rahakott krüpteeritud + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin sulgub krüpteeringu lõpetamiseks. Pea meeles, et rahakoti krüpteerimine ei välista curecoinide vargust, kui sinu arvuti on nakatunud pahavaraga. + + + + + + + Wallet encryption failed + Tõrge rahakoti krüpteerimisel + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Rahakoti krüpteering ebaõnnestus tõrke tõttu. Sinu rahakotti ei krüpteeritud. + + + + + The supplied passphrases do not match. + Salafraasid ei kattu. + + + + Wallet unlock failed + Rahakoti avamine ebaõnnestus + + + + + + The passphrase entered for the wallet decryption was incorrect. + Rahakoti salafraas ei ole õige. + + + + Wallet decryption failed + Rahakoti dekrüpteerimine ei õnnestunud + + + + Wallet passphrase was successfully changed. + Rahakoti salafraasi muutmine õnnestus. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Salvestatud aadresside ja märgiste loetelu muutmine + + + + Show the list of addresses for receiving payments + Kuva saadud maksete aadresside loetelu + + + + E&xit + V&älju + + + + Quit application + Väljumine + + + + Show information about curecoin + Kuva info curecoini kohta + + + + 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 + + + + Importing blocks from disk... + Impordi blokid kettalt... + + + + Reindexing blocks on disk... + Kettal olevate blokkide re-indekseerimine... + + + + Send coins to a curecoin address + Saada münte curecoini aadressile + + + + Modify configuration options for curecoin + Muuda curecoini seadeid + + + + 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... + + + + + curecoin + curecoin + + + + Wallet + Rahakott + + + + &Send + &Saada + + + + &Receive + &Saama + + + + &Addresses + &Aadressid + + + + &About curecoin + %curecoinist + + + + &Show / Hide + &Näita / Peida + + + + Show or hide the main Window + Näita või peida peaaken + + + + Encrypt the private keys that belong to your wallet + Krüpteeri oma rahakoti privaatvõtmed + + + + Sign messages with your curecoin addresses to prove you own them + Omandi tõestamiseks allkirjasta sõnumid oma curecoini aadressiga + + + + Verify messages to ensure they were signed with specified curecoin addresses + Kinnita sõnumid kindlustamaks et need allkirjastati määratud curecoini aadressiga + + + + &File + &Fail + + + + &Settings + &Seaded + + + + &Help + &Abi + + + + Tabs toolbar + Vahelehe tööriistariba + + + + + [testnet] + [testnet] + + + + curecoin client + curecoini klient + + + + %n active connection(s) to curecoin network + %n aktiivne ühendus curecoini võrku%n aktiivset ühendust curecoini võrku + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Protsessitud %1 (arvutuslikult) tehingu ajaloo blokki %2-st. + + + + Processed %1 blocks of transaction history. + Protsessitud %1 tehingute ajaloo blokki. + + + + %n hour(s) + %n tund%n tundi + + + + %n day(s) + %n päev%n päeva + + + + %n week(s) + %n nädal%n nädalat + + + + %1 behind + %1 maas + + + + Last received block was generated %1 ago. + Viimane saabunud blokk loodi %1 tagasi. + + + + Transactions after this will not yet be visible. + Peale seda ei ole tehingud veel nähtavad. + + + + Error + Tõrge + + + + Warning + Hoiatus + + + + Information + Informatsioon + + + + 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? + See tehing ületab mahupiirangu. Saatmine on võimalik %1, node'idele ning võrgustiku toetuseks, makstava lisatasu eest. Kas nõustud lisatasuga? + + + + Up to date + Ajakohane + + + + Catching up... + Jõuan... + + + + Confirm transaction fee + Kinnita tehingu tasu + + + + 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 käsitsemine + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + URI ei suudeta parsida. Põhjuseks võib olla kehtetu curecoini aadress või vigased URI parameetrid. + + + + 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Ilmnes kriitiline tõrge. curecoin suletakse turvakaalutluste tõttu. + + + + ClientModel + + + Network Alert + Võrgu Häire + + + + EditAddressDialog + + + Edit Address + Muuda aadressi + + + + &Label + &Märgis + + + + The label associated with this address book entry + Selle aadressiraamatu kirjega seotud märgis + + + + &Address + &Aadress + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Selle aadressiraamatu kirjega seotud aadress. Võimalik muuta ainult aadresside saatmiseks. + + + + 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 already in the address book. + Selline aadress on juba olemas: "%1" + + + + The entered address "%1" is not a valid curecoin address. + Sisestatud aadress "%1" ei ole curecoinis kehtiv. + + + + Could not unlock wallet. + Rahakotti ei avatud + + + + New key generation failed. + Tõrge uue võtme loomisel. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoini-Qt + + + + version + versioon + + + + Usage: + Kasutus: + + + + command-line options + käsurea valikud + + + + UI options + UI valikud + + + + Set language, for example "de_DE" (default: system locale) + Keele valik, nt "ee_ET" (vaikeväärtus: system locale) + + + + Start minimized + Käivitu tegumiribale + + + + Show splash screen on startup (default: 1) + Käivitamisel teabeakna kuvamine (vaikeväärtus: 1) + + + + OptionsDialog + + + Options + Valikud + + + + &Main + %Peamine + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Tasu tehingu &fee + + + + Automatically start curecoin after logging in to the system. + Käivita curecoin süsteemi logimisel. + + + + &Start curecoin on system login + &Start curecoin sisselogimisel + + + + Reset all client options to default. + Taasta kõik klientprogrammi seadete vaikeväärtused. + + + + &Reset Options + &Lähtesta valikud + + + + &Network + &Võrk + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + curecoini kliendi pordi automaatne avamine ruuteris. Toimib, kui sinu ruuter aktsepteerib UPnP ühendust. + + + + Map port using &UPnP + Suuna port &UPnP kaudu + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Kasuta curecoini võrgustikku ühendumiseks SOCKS turva proxy't (nt Tor'i kasutamisel). + + + + &Connect through SOCKS proxy: + %Connect läbi turva proxi: + + + + Proxy &IP: + Proxi &IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + Proxi IP (nt 127.0.0.1) + + + + &Port: + &Port: + + + + Port of the proxy (e.g. 9050) + Proxi port (nt 9050) + + + + SOCKS &Version: + Turva proxi SOCKS &Version: + + + + SOCKS version of the proxy (e.g. 5) + Turva proxi SOCKS versioon (nt 5) + + + + &Window + &Aken + + + + Show only a tray icon after minimizing the window. + Minimeeri systray alale. + + + + &Minimize to the tray instead of the taskbar + &Minimeeri systray alale + + + + 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. + Sulgemise asemel minimeeri aken. Selle valiku tegemisel suletakse programm Menüüst "Välju" käsuga. + + + + M&inimize on close + M&inimeeri sulgemisel + + + + &Display + &Kuva + + + + User Interface &language: + Kasutajaliidese &keel: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Kasutajaliidese keele valimise koht. Valik rakendub curecoini käivitamisel. + + + + &Unit to show amounts in: + Summade kuvamise &Unit: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Vali liideses ning müntide saatmisel kuvatav vaikimisi alajaotus. + + + + Whether to show curecoin addresses in the transaction list or not. + Kuvada curecoini aadress tehingute loetelus või mitte. + + + + &Display addresses in transaction list + Tehingute loetelu &Display aadress + + + + &OK + &OK + + + + &Cancel + &Katkesta + + + + &Apply + &Rakenda + + + + default + vaikeväärtus + + + + Confirm options reset + Kinnita valikute algseadistamine + + + + Some settings may require a client restart to take effect. + Mõned seadete muudatused rakenduvad programmi käivitumisel. + + + + Do you want to proceed? + Kas soovid jätkata? + + + + + Warning + Hoiatus + + + + + This setting will take effect after restarting curecoin. + Tehtud valik rakendub curecoini käivitamisel. + + + + The supplied proxy address is invalid. + Sisestatud kehtetu proxy aadress. + + + + OverviewPage + + + Form + Vorm + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Kuvatav info ei pruugi olla ajakohane. Ühenduse loomisel süngitakse sinu rahakott automaatselt Megaconi võrgustikuga, kuid see toiming on hetkel lõpetamata. + + + + Balance: + Jääk: + + + + Unconfirmed: + Kinnitamata: + + + + Wallet + Rahakott + + + + Immature: + Ebaküps: + + + + Mined balance that has not yet matured + Mitte aegunud mine'itud jääk + + + + <b>Recent transactions</b> + <b>Uuesti saadetud tehingud</b> + + + + Your current balance + Sinu jääk hetkel + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Kinnitamata tehingud kokku. Ei kajastu hetke jäägis + + + + + out of sync + sünkimata + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + curecoin ei käivitu: vajuta-maksa toiming + + + + QRCodeDialog + + + QR Code Dialog + QR koodi dialoog + + + + Request Payment + Makse taotlus + + + + Amount: + Summa: + + + + Label: + Märgis: + + + + Message: + Sõnum: + + + + &Save As... + &Salvesta nimega... + + + + Error encoding URI into QR Code. + Tõrge URI'st QR koodi loomisel + + + + The entered amount is invalid, please check. + Sisestatud summa on vale, palun kontrolli. + + + + Resulting URI too long, try to reduce the text for label / message. + Tulemuseks on liiga pikk URL, püüa lühendada märgise/teate teksti. + + + + Save QR Code + Salvesta QR kood + + + + PNG Images (*.png) + PNG pildifail (*.png) + + + + RPCConsole + + + Client name + Kliendi nimi + + + + + + + + + + + + + N/A + N/A + + + + Client version + Kliendi versioon + + + + &Information + &Informatsioon + + + + Using OpenSSL version + Kasutan OpenSSL versiooni + + + + Startup time + Käivitamise hetk + + + + Network + Võrgustik + + + + Number of connections + Ühenduste arv + + + + On testnet + Testnetis + + + + Block chain + Ploki jada + + + + Current number of blocks + Plokkide hetkearv + + + + Estimated total blocks + Ligikaudne plokkide kogus + + + + Last block time + Viimane ploki aeg + + + + &Open + &Ava + + + + Command-line options + Käsurea valikud + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Näita kehtivate käsurea valikute kuvamiseks curecoini-Qt abiteksti + + + + &Show + &Kuva + + + + &Console + &Konsool + + + + Build date + Valmistusaeg + + + + curecoin - Debug window + curecoin - debugimise aken + + + + curecoin Core + curecoini tuumik + + + + Debug log file + Debugimise logifail + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Ava curecoini logifail praegusest andmekaustast. Toiminguks võib kuluda kuni mõni sekund. + + + + Clear console + Puhasta konsool + + + + Welcome to the curecoin RPC console. + Teretulemast curecoini RPC konsooli. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Ajaloo sirvimiseks kasuta üles ja alla nooli, ekraani puhastamiseks <b>Ctrl-L</b>. + + + + Type <b>help</b> for an overview of available commands. + Ülevaateks võimalikest käsklustest trüki <b>help</b>. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Müntide saatmine + + + + Send to multiple recipients at once + Saatmine mitmele korraga + + + + Add &Recipient + Lisa &Saaja + + + + Remove all transaction fields + Eemalda kõik tehingu väljad + + + + Clear &All + Puhasta &Kõik + + + + Balance: + Jääk: + + + + 123.456 MEC + 123,456 MEC + + + + Confirm the send action + Saatmise kinnitamine + + + + S&end + S&aada + + + + <b>%1</b> to %2 (%3) + <b>%1</b> kuni %2 (%3) + + + + Confirm send coins + Müntide saatmise kinnitamine + + + + Are you sure you want to send %1? + Soovid kindlasti saata %1? + + + + and + ja + + + + The recipient address is not valid, please recheck. + Saaja aadress ei ole kehtiv, palun kontrolli. + + + + The amount to pay must be larger than 0. + Makstav summa peab olema suurem kui 0. + + + + The amount exceeds your balance. + Summa ületab jäägi. + + + + The total exceeds your balance when the %1 transaction fee is included. + Summa koos tehingu tasuga %1 ületab sinu jääki. + + + + Duplicate address found, can only send to each address once per send operation. + Ühe saatmisega topelt-adressaati olla ei tohi. + + + + Error: Transaction creation failed! + Tõrge: Tehingu loomine ebaõnnestus! + + + + 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. + Viga: Tehingust keelduti. Nt rahakoti koopia kasutamisel võivad selle põhjustada juba kulutatud mündid. + + + + SendCoinsEntry + + + Form + Vorm + + + + A&mount: + S&umma: + + + + Pay &To: + Maksa &: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Tehingu saaja aadress (nt: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Enter a label for this address to add it to your address book + Aadressiraamatusse sisestamiseks märgista aadress + + + + &Label: + &Märgis + + + + Choose address from address book + Vali saaja aadressiraamatust + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Kleebi aadress vahemälust + + + + Alt+P + Alt+P + + + + Remove this recipient + Saaja eemaldamine + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Sisesta curecoini aadress (nt: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Signatuurid - Allkirjasta / Kinnita Sõnum + + + + &Sign Message + &Allkirjastamise teade + + + + 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. + Omandiõigsuse tõestamiseks saad sõnumeid allkirjastada oma aadressiga. Ettevaatust petturitega, kes üritavad saada sinu allkirja endale saada. Allkirjasta ainult korralikult täidetud avaldusi, millega nõustud. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Sõnumi signeerimise aadress (nt: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Vali aadress aadressiraamatust + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Kleebi aadress vahemälust + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Sisesta siia allkirjastamise sõnum + + + + Signature + Signatuur + + + + Copy the current signature to the system clipboard + Kopeeri praegune signatuur vahemällu + + + + Sign the message to prove you own this curecoin address + Allkirjasta sõnum curecoini aadressi sulle kuulumise tõestamiseks + + + + Sign &Message + Allkirjasta &Sõnum + + + + Reset all sign message fields + Tühjenda kõik sõnumi allkirjastamise väljad + + + + + Clear &All + Puhasta &Kõik + + + + &Verify Message + &Kinnita Sõnum + + + + 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. + Kinnitamiseks sisesta allkirjastamise aadress, sõnum (kindlasti kopeeri täpselt ka reavahetused, tühikud, tabulaatorid jms) ning allolev signatuur. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Aadress, millega sõnum allkirjastati (nt: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Kinnita sõnum tõestamaks selle allkirjastatust määratud curecoini aadressiga. + + + + Verify &Message + Kinnita &Sõnum + + + + Reset all verify message fields + Tühjenda kõik sõnumi kinnitamise väljad + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Sisesta curecoini aadress (nt: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Signatuuri genereerimiseks vajuta "Allkirjasta Sõnum" + + + + Enter curecoin signature + Sisesta curecoini allkiri + + + + + The entered address is invalid. + Sisestatud aadress ei kehti. + + + + + + + Please check the address and try again. + Palun kontrolli aadressi ning proovi uuesti. + + + + + The entered address does not refer to a key. + Sisestatud aadress ei viita võtmele. + + + + Wallet unlock was cancelled. + Rahakoti avamine katkestati. + + + + Private key for the entered address is not available. + Sisestatud aadressi privaatvõti ei ole saadaval. + + + + Message signing failed. + Sõnumi signeerimine ebaõnnestus. + + + + Message signed. + Sõnum signeeritud. + + + + The signature could not be decoded. + Signatuuri ei õnnestunud dekodeerida. + + + + + Please check the signature and try again. + Palun kontrolli signatuuri ning proovi uuesti. + + + + The signature did not match the message digest. + Signatuur ei kattunud sõnumi kokkuvõttega. + + + + Message verification failed. + Sõnumi kontroll ebaõnnestus. + + + + Message verified. + Sõnum kontrollitud. + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + Avatud kuni %1 + + + + %1/offline + %/1offline'is + + + + %1/unconfirmed + %1/kinnitamata + + + + %1 confirmations + %1 kinnitust + + + + Status + Staatus + + + + , broadcast through %n node(s) + , levita läbi %n node'i, levita läbi %n node'i + + + + Date + Kuupäev + + + + Source + Allikas + + + + Generated + Genereeritud + + + + + From + Saatja + + + + + + To + Saaja + + + + + own address + oma aadress + + + + label + märgis + + + + + + + + Credit + Krediit + + + + matures in %n more block(s) + aegub %n bloki pärastaegub %n bloki pärast + + + + not accepted + mitte aktsepteeritud + + + + + + + Debit + Deebet + + + + Transaction fee + Tehingu tasu + + + + Net amount + Neto summa + + + + Message + Sõnum + + + + Comment + Kommentaar + + + + Transaction ID + Tehingu ID + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Enne, kui loodud münte saab kulutama asuda, peavad need läbima 120 blokki. Kui sina selle bloki lõid, levitati see, bloki jadasse ühendamiseks, võrgustikku. Kui jadasse ühendamine ei õnnestu, muudetakse tema staatus "keeldutud" olekusse ning seda ei saa kulutada. Selline olukord võib juhtuda, kui mõni teine node loob bloki sinuga samal ajal. + + + + Debug information + Debug'imise info + + + + Transaction + Tehing + + + + Inputs + Sisendid + + + + Amount + Kogus + + + + true + õige + + + + false + vale + + + + , has not been successfully broadcast yet + , veel esitlemata + + + + Open for %n more block(s) + Avaneb %n bloki pärastAvaneb %n bloki pärast + + + + unknown + tundmatu + + + + TransactionDescDialog + + + Transaction details + Tehingu üksikasjad + + + + This pane shows a detailed description of the transaction + Paan kuvab tehingu detailid + + + + TransactionTableModel + + + Date + Kuupäev + + + + Type + Tüüp + + + + Address + Aadress + + + + Amount + Kogus + + + + Open for %n more block(s) + Avaneb %n bloki pärastAvaneb %n bloki pärast + + + + Open until %1 + Avatud kuni %1 + + + + Offline (%1 confirmations) + Ühenduseta (%1 kinnitust) + + + + Unconfirmed (%1 of %2 confirmations) + Kinnitamata (%1/%2 kinnitust) + + + + Confirmed (%1 confirmations) + Kinnitatud (%1 kinnitust) + + + + Mined balance will be available when it matures in %n more block(s) + Mine'itud jääk muutub kättesaadavaks %n bloki läbimiselMine'itud jääk muutub kättesaadavaks %n bloki läbimisel + + + + This block was not received by any other nodes and will probably not be accepted! + Antud klotsi pole saanud ükski osapool ning tõenäoliselt seda ei aktsepteerita! + + + + Generated but not accepted + Loodud, kuid aktsepteerimata + + + + Received with + Saadud koos + + + + Received from + Kellelt saadud + + + + Sent to + Saadetud + + + + Payment to yourself + Makse iseendale + + + + Mined + Mine'itud + + + + (n/a) + (n/a) + + + + Transaction status. Hover over this field to show number of confirmations. + Tehingu staatus. Kinnituste arvu kuvamiseks liigu hiire noolega selle peale. + + + + Date and time that the transaction was received. + Tehingu saamise kuupäev ning kellaaeg. + + + + Type of transaction. + Tehingu tüüp. + + + + Destination address of transaction. + Tehingu saaja aadress. + + + + Amount removed from or added to balance. + Jäägile lisatud või eemaldatud summa. + + + + TransactionView + + + + All + Kõik + + + + Today + Täna + + + + This week + Jooksev nädal + + + + This month + Jooksev kuu + + + + Last month + Eelmine kuu + + + + This year + Jooksev aasta + + + + Range... + Ulatus... + + + + Received with + Saadud koos + + + + Sent to + Saadetud + + + + To yourself + Iseendale + + + + Mined + Mine'itud + + + + Other + Muu + + + + Enter address or label to search + Otsimiseks sisesta märgis või aadress + + + + Min amount + Vähim summa + + + + Copy address + Aadressi kopeerimine + + + + Copy label + Märgise kopeerimine + + + + Copy amount + Kopeeri summa + + + + Copy transaction ID + Kopeeri tehingu ID + + + + Edit label + Märgise muutmine + + + + Show transaction details + Kuva tehingu detailid + + + + Export Transaction Data + Tehinguandmete eksport + + + + Comma separated file (*.csv) + Komaeraldatud fail (*.csv) + + + + Confirmed + Kinnitatud + + + + Date + Kuupäev + + + + Type + Tüüp + + + + Label + Silt + + + + Address + Aadress + + + + Amount + Kogus + + + + ID + ID + + + + Error exporting + Viga eksportimisel + + + + Could not write to file %1. + Tõrge faili kirjutamisel %1. + + + + Range: + Ulatus: + + + + to + saaja + + + + WalletModel + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + Varundatud Rahakott + + + + Wallet Data (*.dat) + Rahakoti andmed (*.dat) + + + + Backup Failed + Varundamine nurjus + + + + There was an error trying to save the wallet data to the new location. + Rahakoti andmete uude kohta salvestamine nurjus. + + + + Backup Successful + Varundamine õnnestus + + + + The wallet data was successfully saved to the new location. + Rahakoti andmete uude kohta salvestamine õnnestus. + + + + curecoin-core + + + curecoin version + curecoini versioon + + + + Usage: + Kasutus: + + + + Send command to -server or curecoind + Saada käsklus -serverile või curecoindile + + + + List commands + Käskluste loetelu + + + + Get help for a command + Käskluste abiinfo + + + + Options: + Valikud: + + + + Specify configuration file (default: curecoin.conf) + Täpsusta sätete fail (vaikimisi: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Täpsusta PID fail (vaikimisi: curecoin.pid) + + + + Specify data directory + Täpsusta andmekataloog + + + + Set database cache size in megabytes (default: 25) + Sea andmebaasi vahemälu suurus MB (vaikeväärtus: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Kuula ühendusi pordil <port> (vaikeväärtus: 7951 või testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Säilita vähemalt <n> ühendust peeridega (vaikeväärtus: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Peeri aadressi saamiseks ühendu korraks node'iga + + + + Specify your own public address + Täpsusta enda avalik aadress + + + + Threshold for disconnecting misbehaving peers (default: 100) + Ulakate peeride valulävi (vaikeväärtus: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Mitme sekundi pärast ulakad peerid tagasi võivad tulla (vaikeväärtus: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + RPC pordi %u kuulamiseks seadistamisel ilmnes viga IPv4'l: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Kuula JSON-RPC ühendusel seda porti <port> (vaikeväärtus: 7950 või testnet: 17950) + + + + Accept command line and JSON-RPC commands + Luba käsurea ning JSON-RPC käsklusi + + + + Run in the background as a daemon and accept commands + Tööta taustal ning aktsepteeri käsklusi + + + + Use the test network + Testvõrgu kasutamine + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Luba välisühendusi (vaikeväärtus: 1 kui puudub -proxy või -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, sul tuleb rpcpassword määrata seadete failis: +%s +Soovitatav on kasutada järgmist juhuslikku parooli: +rpcuser=curecoinrpc +rpcpassword=%s +(seda parooli ei pea meeles pidama) +Kasutajanimi ning parool EI TOHI kattuda. +Kui faili ei leita, loo see ainult-omaniku-loetavas failiõigustes . +Soovitatav on seadistada tõrgete puhul teavitus; +nt: alertnotify=echo %%s | email -s "curecoin Alert" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + RPC pordi %u kuulamiseks seadistamisel ilmnes viga IPv6'l, lülitumine tagasi IPv4'le : %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Määratud aadressiga sidumine ning sellelt kuulamine. IPv6 jaoks kasuta vormingut [host]:port + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Ei suuda määrata ainuõigust andmekaustale %s. Tõenäolisel on curecoin juba avatud. + + + + 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. + Tõrge: Tehingust keelduti! Põhjuseks võib olla juba kulutatud mündid, nt kui wallet.dat fail koopias kulutatid mündid, kuid ei märgitud neid siin vastavalt. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Tõrge: Selle tehingu jaoks on nõutav lisatasu vähemalt %s. Põhjuseks võib olla summa suurus, keerukus või hiljuti saadud summade kasutamine! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Käivita käsklus, kui saabub tähtis hoiatus (%s cmd's asendatakse sõnumiga) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Käivita käsklus, kui rahakoti tehing muutub (%s cmd's muudetakse TxID'ks) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Sea "kõrge tähtsusega"/"madala tehingu lisatasuga" tehingute maksimumsuurus baitides (vaikeväärtus: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + See on test-versioon - kasutamine omal riisikol - ära kasuta mining'uks ega kaupmeeste programmides + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Hoiatus: -paytxfee on seatud väga kõrgeks! See on sinu poolt makstav tehingu lisatasu. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Hoiatus: Kuvatavad tehingud ei pruugi olla korrektsed! Sina või node'id peate tegema uuenduse. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Hoiatus: Palun kontrolli oma arvuti kuupäeva/kellaaega! Kui arvuti kell on vale, siis curecoin ei tööta korralikult + + + + 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. + + + + 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. + Hoiatus: toimus wallet.dat faili andmete päästmine! Originaal wallet.dat nimetati kaustas %s ümber wallet.{ajatempel}.bak'iks, jäägi või tehingute ebakõlade puhul tuleks teha backup'ist taastamine. + + + + Attempt to recover private keys from a corrupt wallet.dat + Püüa vigasest wallet.dat failist taastada turvavõtmed + + + + Block creation options: + Blokeeri loomise valikud: + + + + Connect only to the specified node(s) + Ühendu ainult määratud node'i(de)ga + + + + Corrupted block database detected + Tuvastati vigane bloki andmebaas + + + + Discover own IP address (default: 1 when listening and no -externalip) + Leia oma IP aadress (vaikeväärtus: 1, kui kuulatakse ning puudub -externalip) + + + + Do you want to rebuild the block database now? + Kas soovid bloki andmebaasi taastada? + + + + Error initializing block database + Tõrge bloki andmebaasi käivitamisel + + + + Error initializing wallet database environment %s! + Tõrge rahakoti keskkonna %s käivitamisel! + + + + Error loading block database + Tõrge bloki baasi lugemisel + + + + Error opening block database + Tõrge bloki andmebaasi avamisel + + + + Error: Disk space is low! + Tõrge: liiga vähe kettaruumi! + + + + Error: Wallet locked, unable to create transaction! + Tõrge: Rahakott on lukus, tehingu loomine ei ole võimalik! + + + + Error: system error: + Tõrge: süsteemi tõrge: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Pordi kuulamine nurjus. Soovikorral kasuta -listen=0. + + + + Failed to read block info + Tõrge bloki sisu lugemisel + + + + Failed to read block + Bloki lugemine ebaõnnestus + + + + Failed to sync block index + Bloki indeksi sünkimine ebaõnnestus + + + + Failed to write block index + Bloki indeksi kirjutamine ebaõnnestus + + + + Failed to write block info + Bloki sisu kirjutamine ebaõnnestus + + + + Failed to write block + Tõrge bloki sisu kirjutamisel + + + + Failed to write file info + Tõrge faili info kirjutamisel + + + + Failed to write to coin database + Tõrge mündi andmebaasi kirjutamisel + + + + Failed to write transaction index + Tehingu indeksi kirjutamine ebaõnnestus + + + + Failed to write undo data + Tagasivõtmise andmete kirjutamine ebaõnnestus + + + + Find peers using DNS lookup (default: 1 unless -connect) + Otsi DNS'i lookup'i kastavaid peere (vaikeväärtus: 1, kui mitte -connect) + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + Käivitamisel kontrollitavate blokkide arv (vaikeväärtus: 288, 0=kõik) + + + + How thorough the block verification is (0-4, default: 3) + Blokkide kontrollimise põhjalikkus (0-4, vaikeväärtus: 3) + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + Taasta bloki jada indeks blk000??.dat failist + + + + Set the number of threads to service RPC calls (default: 4) + Määra RPC kõnede haldurite arv (vaikeväärtus: 4) + + + + Verifying blocks... + Kontrollin blokke... + + + + Verifying wallet... + Kontrollin rahakotti... + + + + Imports blocks from external blk000??.dat file + Impordi blokid välisest blk000??.dat failist + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + Informatsioon + + + + Invalid -tor address: '%s' + Vigane -tor aadress: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + Säilita kogu tehingu indeks (vaikeväärtus: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maksimaalne saamise puhver -connection kohta , <n>*1000 baiti (vaikeväärtus: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maksimaalne saatmise puhver -connection kohta , <n>*1000 baiti (vaikeväärtus: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Tunnusta ainult sisseehitatud turvapunktidele vastavaid bloki jadu (vaikeväärtus: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Ühenda ainult node'idega <net> võrgus (IPv4, IPv6 või Tor) + + + + Output extra debugging information. Implies all other -debug* options + Väljund lisa debug'imise infoks. Tuleneb kõikidest teistest -debug* valikutest + + + + Output extra network debugging information + Lisa võrgu debug'imise info väljund + + + + Prepend debug output with timestamp + Varusta debugi väljund ajatempliga + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL valikud: (vaata curecoini Wikist või SSL sätete juhendist) + + + + Select the version of socks proxy to use (4-5, default: 5) + Vali turva proxi SOCKS versioon (4-5, vaikeväärtus: 5) + + + + Send trace/debug info to console instead of debug.log file + Saada jälitus/debug, debug.log faili asemel, konsooli + + + + Send trace/debug info to debugger + Saada jälitus/debug info debuggerile + + + + Set maximum block size in bytes (default: 250000) + Sea maksimaalne bloki suurus baitides (vaikeväärtus: 250000) + + + + Set minimum block size in bytes (default: 0) + Sea minimaalne bloki suurus baitides (vaikeväärtus: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Kahanda programmi käivitamisel debug.log faili (vaikeväärtus: 1, kui ei ole -debug) + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Sea ühenduse timeout millisekundites (vaikeväärtus: 5000) + + + + System error: + Süsteemi tõrge: + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Kasuta kuulatava pordi määramiseks UPnP ühendust (vaikeväärtus: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Kasuta kuulatava pordi määramiseks UPnP ühendust (vaikeväärtus: 1, kui kuulatakse) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Kasuta varjatud teenustele ligipääsuks proxy't (vaikeväärtus: sama, mis -proxy) + + + + Username for JSON-RPC connections + JSON-RPC ühenduste kasutajatunnus + + + + Warning + Hoiatus + + + + Warning: This version is obsolete, upgrade required! + Hoiatus: versioon on aegunud, uuendus on nõutav! + + + + You need to rebuild the databases using -reindex to change -txindex + Andmebaas tuleb taastada kasutades -reindex, et muuta -txindex + + + + wallet.dat corrupt, salvage failed + wallet.dat fail on katki, päästmine ebaõnnestus + + + + Password for JSON-RPC connections + JSON-RPC ühenduste salasõna + + + + Allow JSON-RPC connections from specified IP address + JSON-RPC ühenduste lubamine kindla IP pealt + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Saada käsklusi node'ile IP'ga <ip> (vaikeväärtus: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Käivita käsklus, kui parim plokk muutub (käskluse %s asendatakse ploki hash'iga) + + + + Upgrade wallet to latest format + Uuenda rahakott uusimasse vormingusse + + + + Set key pool size to <n> (default: 100) + Sea võtmete hulgaks <n> (vaikeväärtus: 100) + + + + Rescan the block chain for missing wallet transactions + Otsi ploki jadast rahakoti kadunud tehinguid + + + + Use OpenSSL (https) for JSON-RPC connections + Kasuta JSON-RPC ühenduste jaoks OpenSSL'i (https) + + + + Server certificate file (default: server.cert) + Serveri sertifikaadifail (vaikeväärtus: server.cert) + + + + Server private key (default: server.pem) + Serveri privaatvõti (vaikeväärtus: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Lubatud šiffrid (vaikeväärtus: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Käesolev abitekst + + + + 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 + Ühendu läbi turva proxi + + + + Allow DNS lookups for -addnode, -seednode and -connect + -addnode, -seednode ja -connect tohivad kasutada DNS lookup'i + + + + Loading addresses... + Aadresside laadimine... + + + + Error loading wallet.dat: Wallet corrupted + Viga wallet.dat käivitamisel. Vigane rahakkott + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Viga wallet.dat käivitamisel: Rahakott nõuab curecoini uusimat versiooni + + + + Wallet needed to be rewritten: restart curecoin to complete + Rahakott tuli ümberkirjutada: toimingu lõpetamiseks taaskäivita curecoin + + + + Error loading wallet.dat + Viga wallet.dat käivitamisel + + + + Invalid -proxy address: '%s' + Vigane -proxi aadress: '%s' + + + + Unknown network specified in -onlynet: '%s' + Kirjeldatud tundmatu võrgustik -onlynet'is: '%s' + + + + Unknown -socks proxy version requested: %i + Küsitud tundmatu -socks proxi versioon: %i + + + + Cannot resolve -bind address: '%s' + Tundmatu -bind aadress: '%s' + + + + Cannot resolve -externalip address: '%s' + Tundmatu -externalip aadress: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + -paytxfee=<amount> jaoks vigane kogus: '%s' + + + + Invalid amount + Kehtetu summa + + + + Insufficient funds + Liiga suur summa + + + + Loading block index... + Klotside indeksi laadimine... + + + + 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. curecoin is probably already running. + %s'ga ei ole võimalik sellest arvutist siduda. curecoin juba töötab. + + + + Fee per KB to add to transactions you send + Minu saadetavate tehingute lisatasu KB kohta + + + + Loading wallet... + Rahakoti laadimine... + + + + Cannot downgrade wallet + Rahakoti vanandamine ebaõnnestus + + + + Cannot write default address + Tõrge vaikimisi aadressi kirjutamisel + + + + Rescanning... + Üleskaneerimine... + + + + Done loading + Laetud + + + + To use the %s option + %s valiku kasutamine + + + + Error + Tõrge + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + rpcpassword=<password> peab sätete failis olema seadistatud:⏎ +%s⏎ +Kui seda faili ei ole, loo see ainult-omanikule-lugemiseks faili õigustes. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_eu_ES.qm b/src/qt/locale/curecoin_eu_ES.qm new file mode 100644 index 0000000..71b0d14 Binary files /dev/null and b/src/qt/locale/curecoin_eu_ES.qm differ diff --git a/src/qt/locale/curecoin_eu_ES.ts b/src/qt/locale/curecoin_eu_ES.ts new file mode 100644 index 0000000..4ae8b02 --- /dev/null +++ b/src/qt/locale/curecoin_eu_ES.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + curecoin-i buruz + + + + <b>curecoin</b> version + <b>curecoin</b> bertsioa + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Helbide-liburua + + + + Double-click to edit address or label + Klik bikoitza helbidea edo etiketa editatzeko + + + + Create a new address + Sortu helbide berria + + + + Copy the currently selected address to the system clipboard + Kopiatu hautatutako helbidea sistemaren arbelera + + + + &New Address + + + + + These are your curecoin 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 + Erakutsi &QR kodea + + + + Sign a message to prove you own a curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &Ezabatu + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + + + + + Export Address Book Data + Esportatu Helbide-liburuaren datuak + + + + Comma separated file (*.csv) + Komaz bereizitako artxiboa (*.csv) + + + + Error exporting + Errorea esportatzean + + + + Could not write to file %1. + Ezin idatzi %1 artxiboan. + + + + AddressTableModel + + + Label + Etiketa + + + + Address + Helbidea + + + + (no label) + (etiketarik ez) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + Sartu pasahitza + + + + New passphrase + Pasahitz berria + + + + Repeat new passphrase + Errepikatu pasahitz berria + + + + 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>. + Sartu zorrorako pasahitz berria.<br/> Mesedez erabili <b>gutxienez ausazko 10 karaktere</b>, edo <b>gutxienez zortzi hitz</b> pasahitza osatzeko. + + + + Encrypt wallet + Enkriptatu zorroa + + + + This operation needs your wallet passphrase to unlock the wallet. + Eragiketa honek zorroaren pasahitza behar du zorroa desblokeatzeko. + + + + Unlock wallet + Desblokeatu zorroa + + + + This operation needs your wallet passphrase to decrypt the wallet. + Eragiketa honek zure zorroaren pasahitza behar du, zorroa desenkriptatzeko. + + + + Decrypt wallet + Desenkriptatu zorroa + + + + Change passphrase + Aldatu pasahitza + + + + Enter the old and new passphrase to the wallet. + Sartu zorroaren pasahitz zaharra eta berria. + + + + Confirm wallet encryption + Berretsi zorroaren enkriptazioa + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</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 + Zorroa enkriptatuta + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + + + + + + + + Wallet encryption failed + Zorroaren enkriptazioak huts egin du + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Zorroaren enkriptazioak huts egin du barne-errore baten ondorioz. Zure zorroa ez da enkriptatu. + + + + + The supplied passphrases do not match. + Eman dituzun pasahitzak ez datoz bat. + + + + Wallet unlock failed + Zorroaren desblokeoak huts egin du + + + + + + The passphrase entered for the wallet decryption was incorrect. + Zorroa desenkriptatzeko sartutako pasahitza okerra da. + + + + Wallet decryption failed + Zorroaren desenkriptazioak huts egin du + + + + Wallet passphrase was successfully changed. + + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Editatu gordetako helbide eta etiketen zerrenda + + + + Show the list of addresses for receiving payments + Erakutsi ordainketak jasotzeko helbideen zerrenda + + + + E&xit + Irten + + + + Quit application + Irten aplikaziotik + + + + Show information about curecoin + Erakutsi curecoin-i buruzko informazioa + + + + About &Qt + &Qt-ari buruz + + + + Show information about Qt + Erakutsi curecoin-i buruzko informazioa + + + + &Options... + &Aukerak... + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + 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... + + + + + + curecoin + + + + + Wallet + + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Artxiboa + + + + &Settings + &Ezarpenak + + + + &Help + &Laguntza + + + + Tabs toolbar + Fitxen tresna-barra + + + + + [testnet] + [testnet] + + + + curecoin client + + + + + %n active connection(s) to curecoin network + Konexio aktibo %n curecoin-en sarera%n konexio aktibo curecoin-en sarera + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Egunean + + + + Catching up... + Eguneratzen... + + + + 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 curecoin 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 + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + EditAddressDialog + + + Edit Address + Editatu helbidea + + + + &Label + &Etiketa + + + + The label associated with this address book entry + Helbide-liburuko sarrera honekin lotutako etiketa + + + + &Address + &Helbidea + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Helbide-liburuko sarrera honekin lotutako helbidea. Bidaltzeko helbideeta soilik alda daiteke. + + + + 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 already in the address book. + Sartu berri den helbidea, "%1", helbide-liburuan dago jadanik. + + + + The entered address "%1" is not a valid curecoin address. + + + + + Could not unlock wallet. + Ezin desblokeatu zorroa. + + + + New key generation failed. + Gako berriaren sorrerak huts egin du. + + + + GUIUtil::HelpMessageBox + + + + curecoin-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 + Aukerak + + + + &Main + + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + Inprimakia + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + Saldoa: + + + + Unconfirmed: + Konfirmatu gabe: + + + + Wallet + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Azken transakzioak</b> + + + + Your current balance + Zure uneko saldoa + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Oraindik konfirmatu gabe daudenez, uneko saldoab kontatu gabe dagoen transakzio kopurua + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + + + + + Request Payment + + + + + Amount: + Kopurua + + + + Label: + &Etiketa: + + + + Message: + Mezua + + + + &Save As... + Gorde honela... + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + Bidali txanponak + + + + Send to multiple recipients at once + Bidali hainbat jasotzaileri batera + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + Saldoa: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Berretsi bidaltzeko ekintza + + + + S&end + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> honi: %2 (%3) + + + + Confirm send coins + Berretsi txanponak bidaltzea + + + + Are you sure you want to send %1? + Ziur zaude %1 bidali nahi duzula? + + + + and + eta + + + + The recipient address is not valid, please recheck. + + + + + The amount to pay must be larger than 0. + Ordaintzeko kopurua 0 baino handiagoa izan behar du. + + + + 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. + + + + + SendCoinsEntry + + + Form + Inprimakia + + + + A&mount: + K&opurua: + + + + Pay &To: + Ordaindu &honi: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + 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: + + + + Choose address from address book + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Itsatsi helbidea arbeletik + + + + Alt+P + Alt+P + + + + Remove this recipient + Ezabatu jasotzaile hau + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Sartu Megacin helbide bat (adb.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Itsatsi helbidea arbeletik + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Sartu Megacin helbide bat (adb.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + Zabalik %1 arte + + + + %1/offline + + + + + %1/unconfirmed + %1/konfirmatu gabe + + + + %1 confirmations + %1 konfirmazioak + + + + Status + + + + + , broadcast through %n node(s) + + + + + Date + Data + + + + 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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + Kopurua + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + , ez da arrakastaz emititu oraindik + + + + Open for %n more block(s) + + + + + unknown + ezezaguna + + + + TransactionDescDialog + + + Transaction details + Transakzioaren xehetasunak + + + + This pane shows a detailed description of the transaction + Panel honek transakzioaren deskribapen xehea erakusten du + + + + TransactionTableModel + + + Date + Data + + + + Type + Mota + + + + Address + Helbidea + + + + Amount + Kopurua + + + + Open for %n more block(s) + + + + + Open until %1 + Zabalik %1 arte + + + + Offline (%1 confirmations) + Offline (%1 konfirmazio) + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + Konfirmatuta (%1 konfirmazio) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + Bloke hau ez du beste inongo nodorik jaso, eta seguruenik ez da onartuko! + + + + Generated but not accepted + Sortua, baina ez onartua + + + + Received with + Jasoa honekin: + + + + Received from + + + + + Sent to + Honi bidalia: + + + + Payment to yourself + Ordainketa zeure buruari + + + + Mined + Bildua + + + + (n/a) + (n/a) + + + + Transaction status. Hover over this field to show number of confirmations. + Transakzioaren egoera. Pasatu sagua gainetik konfirmazio kopurua ikusteko. + + + + Date and time that the transaction was received. + Transakzioa jasotako data eta ordua. + + + + Type of transaction. + Transakzio mota. + + + + Destination address of transaction. + Transakzioaren xede-helbidea. + + + + Amount removed from or added to balance. + Saldoan kendu edo gehitutako kopurua. + + + + TransactionView + + + + All + Denak + + + + Today + Gaur + + + + This week + Aste honetan + + + + This month + Hil honetan + + + + Last month + Azken hilean + + + + This year + Aurten + + + + Range... + Muga... + + + + Received with + Jasota honekin: + + + + Sent to + Hona bidalia: + + + + To yourself + Zeure buruari + + + + Mined + Bildua + + + + Other + Beste + + + + Enter address or label to search + Sartu bilatzeko helbide edo etiketa + + + + Min amount + Kopuru minimoa + + + + Copy address + Kopiatu helbidea + + + + Copy label + Kopiatu etiketa + + + + Copy amount + + + + + Copy transaction ID + + + + + Edit label + + + + + Show transaction details + + + + + Export Transaction Data + Transakzioaren xehetasunak + + + + Comma separated file (*.csv) + Komaz bereizitako artxiboa (*.csv) + + + + Confirmed + + + + + Date + Data + + + + Type + Mota + + + + Label + Etiketa + + + + Address + Helbidea + + + + Amount + Kopurua + + + + ID + + + + + Error exporting + Errorea esportatzean + + + + Could not write to file %1. + Ezin idatzi %1 artxiboan. + + + + Range: + + + + + to + + + + + WalletModel + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + Botcoin bertsioa + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + Komandoen lista + + + + Get help for a command + Laguntza komando batean + + + + Options: + Aukerak + + + + Specify configuration file (default: curecoin.conf) + Ezarpen fitxategia aukeratu (berezkoa: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + pid fitxategia aukeratu (berezkoa: curecoind.pid) + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + Laguntza mezu hau + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + + + + + Cannot downgrade wallet + + + + + Cannot write default address + + + + + Rescanning... + Birbilatzen... + + + + Done loading + Zamaketa amaitua + + + + 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/curecoin_fa.qm b/src/qt/locale/curecoin_fa.qm new file mode 100644 index 0000000..2b82cc2 Binary files /dev/null and b/src/qt/locale/curecoin_fa.qm differ diff --git a/src/qt/locale/curecoin_fa.ts b/src/qt/locale/curecoin_fa.ts new file mode 100644 index 0000000..ce6a98a --- /dev/null +++ b/src/qt/locale/curecoin_fa.ts @@ -0,0 +1,2925 @@ + +UTF-8 + + AboutDialog + + + About curecoin + در مورد curecoin + + + + <b>curecoin</b> version + نسخه curecoin + + + + +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. + ⏎ ⏎ این نسخه نرم افزار آزمایشی است⏎ ⏎ نرم افزار تحت لیسانس MIT/X11 منتشر شده است. به فایل coping یا آدرس http://www.opensource.org/licenses/mit-license.php. مراجعه شود⏎ ⏎ این محصول شامل نرم افزاری است که با OpenSSL برای استفاده از OpenSSL Toolkit (http://www.openssl.org/) و نرم افزار نوشته شده توسط اریک یانگ (eay@cryptsoft.com ) و UPnP توسط توماس برنارد طراحی شده است. + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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. + این آدرسها، آدرسهای curecoin شما برای دریافت وجوه هستند. شما ممکن است آدرسهای متفاوت را به هر گیرنده اختصاص دهید که بتوانید مواردی که پرداخت می کنید را پیگیری نمایید + + + + &Copy Address + کپی آدرس + + + + Show &QR Code + نمایش &کد QR + + + + Sign a message to prove you own a curecoin address + پیام را برای اثبات آدرس curecoin خود امضا کنید + + + + Sign &Message + امضا و پیام + + + + Delete the currently selected address from the list + آدرس انتخاب شده در سیستم تخته رسم گیره دا حذف + + + + Export the data in the current tab to a file + داده ها نوارِ جاری را به فایل انتقال دهید + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + یک پیام را برای حصول اطمینان از ورود به سیستم با آدرس curecoin مشخص، شناسایی کنید + + + + &Verify Message + شناسایی پیام + + + + &Delete + حذف + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + کپی و برچسب گذاری + + + + &Edit + ویرایش + + + + Send &Coins + + + + + Export Address Book Data + آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید + + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + + Error exporting + خطای صدور + + + + Could not write to file %1. + تا فایل %1 نمی شود نوشت + + + + AddressTableModel + + + Label + بر چسب + + + + Address + آدرس + + + + (no label) + بدون برچسب + + + + AskPassphraseDialog + + + Passphrase Dialog + دیالوگ Passphrase + + + + Enter passphrase + وارد عبارت عبور + + + + New passphrase + عبارت عبور نو + + + + Repeat new passphrase + تکرار عبارت عبور نو + + + + 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>. + وارد کنید..&lt;br/&gt عبارت عبور نو در پنجره + 10 یا بیشتر کاراکتورهای تصادفی استفاده کنید &lt;b&gt لطفا عبارت عبور + + + + 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 curecoinS</b>! + هشدار: اگر wallet رمزگذاری شود و شما passphrase را گم کنید شما همه اطلاعات curecoinS را از دست خواهید داد. + + + + Are you sure you wish to encrypt your wallet? + آیا اطمینان دارید که می خواهید 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! + هشدار: Caps lock key روشن است + + + + + Wallet encrypted + تغییر عبارت عبور + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin هم اکنون بسته می‌شود تا فرایند رمزگذاری را تمام کند. به خاطر داشته باشید که رمزگذاری کیف پولتان نمی‌تواند به طور کامل بیتیکون‌های شما را در برابر دزدیده شدن توسط بدافزارهایی که رایانه شما را آلوده می‌کنند، محافظت نماید. + + + + + + + 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. + wallet passphrase با موفقیت تغییر یافت + + + + curecoinGUI + + + Sign &message... + امضا و پیام + + + + Synchronizing with network... + همگام سازی با شبکه ... + + + + &Overview + بررسی اجمالی + + + + Show general overview of wallet + نمای کلی پنجره نشان بده + + + + &Transactions + &معاملات + + + + Browse transaction history + نمایش تاریخ معاملات + + + + Edit the list of stored addresses and labels + ویرایش لیست آدرسها و بر چسب های ذخیره ای + + + + Show the list of addresses for receiving payments + نمایش لیست آدرس ها برای در یافت پر داخت ها + + + + E&xit + خروج + + + + Quit application + خروج از برنامه + + + + Show information about curecoin + نمایش اطلاعات در مورد بیتکویین + + + + About &Qt + درباره &Qt + + + + Show information about Qt + نمایش اطلاعات درباره Qt + + + + &Options... + تنظیمات... + + + + &Encrypt Wallet... + رمزگذاری wallet + + + + &Backup Wallet... + پشتیبان گیری از wallet + + + + &Change Passphrase... + تغییر Passphrase + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + سکه ها را به آدرس curecoin ارسال کن + + + + Modify configuration options for curecoin + انتخابهای پیکربندی را برای curecoin اصلاح کن + + + + Backup wallet to another location + نسخه پیشتیبان wallet را به محل دیگر انتقال دهید + + + + Change the passphrase used for wallet encryption + عبارت عبور رمز گشایی پنجره تغییر کنید + + + + &Debug window + اشکال زدایی از صفحه + + + + Open debugging and diagnostic console + کنسول اشکال زدایی و تشخیص را باز کنید + + + + &Verify message... + بازبینی پیام + + + + + curecoin + یت کویین + + + + Wallet + wallet + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + در مورد curecoin + + + + &Show / Hide + &نمایش/ عدم نمایش + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + فایل + + + + &Settings + تنظیمات + + + + &Help + کمک + + + + Tabs toolbar + نوار ابزار زبانه ها + + + + + [testnet] + آزمایش شبکه + + + + curecoin client + مشتری curecoin + + + + %n active connection(s) to curecoin network + در صد ارتباطات فعال بیتکویین با شبکه %n + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + تا تاریخ + + + + Catching up... + ابتلا به بالا + + + + 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 curecoin address or malformed URI parameters. + URI قابل تحلیل نیست. این خطا ممکن است به دلیل ادرس curecoin اشتباه یا پارامترهای اشتباه URI رخ داده باشد + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + زمایش شبکهه + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + زمایش شبکه + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + خطا روی داده است. curecoin نمی تواند بدون مشکل ادامه دهد و باید بسته شود + + + + ClientModel + + + Network Alert + پیام شبکه + + + + 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. + %1آدرس وارد شده دیگر در دفتر آدرس است + + + + The entered address "%1" is not a valid curecoin address. + آدرس وارد شده %1 یک ادرس صحیح curecoin نیست + + + + Could not unlock wallet. + رمز گشایی پنجره امکان پذیر نیست + + + + New key generation failed. + کلید نسل جدید ناموفق است + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + نسخه + + + + Usage: + ستفاده : + + + + command-line options + انتخابها برای خطوط دستور command line + + + + UI options + انتخابهای UI + + + + Set language, for example "de_DE" (default: system locale) + زبان را تنظیم کنید برای مثال "de_DE" (پیش فرض: system locale) + + + + Start minimized + شروع حد اقل + + + + Show splash screen on startup (default: 1) + نمایش صفحه splash در STARTUP (پیش فرض:1) + + + + OptionsDialog + + + Options + اصلی + + + + &Main + اصلی + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + دستمزد&پر داخت معامله + + + + Automatically start curecoin after logging in to the system. + در زمان ورود به سیستم به صورت خودکار curecoin را اجرا کن + + + + &Start curecoin on system login + اجرای curecoin در زمان ورود به سیستم + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + شبکه + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + اتوماتیک باز کردن بندر بیتکویین در روتر . این فقط در مواردی می باشد که روتر با کمک یو پ ن پ کار می کند + + + + Map port using &UPnP + درگاه با استفاده از + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + اتصال به شبکه curecoin از طریق پراکسی ساکس (برای مثال وقتی از طریق نرم افزار TOR متصل می شوید) + + + + &Connect through SOCKS proxy: + اتصال با پراکسی SOCKS + + + + Proxy &IP: + پراکسی و آی.پی. + + + + IP address of the proxy (e.g. 127.0.0.1) + درس پروکسی + + + + &Port: + درگاه + + + + Port of the proxy (e.g. 9050) + درگاه پراکسی (مثال 9050) + + + + SOCKS &Version: + SOCKS و نسخه + + + + SOCKS version of the proxy (e.g. 5) + نسخه SOCKS از پراکسی (مثال 5) + + + + &Window + صفحه + + + + Show only a tray icon after minimizing the window. + tray icon را تنها بعد از کوچک کردن صفحه نمایش بده + + + + &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 curecoin. + زبان میانجی کاربر می تواند در اینجا تنظیم شود. این تنظیمات بعد از شروع دوباره RESTART در curecoin اجرایی خواهند بود. + + + + &Unit to show amounts in: + واحد برای نمایش میزان وجوه در: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + بخش فرعی پیش فرض را برای نمایش میانجی و زمان ارسال سکه ها مشخص و انتخاب نمایید + + + + Whether to show curecoin addresses in the transaction list or not. + تا آدرسهای curecoin در فهرست تراکنش نمایش داده شوند یا نشوند. + + + + &Display addresses in transaction list + نمایش آدرسها در فهرست تراکنش + + + + &OK + تایید + + + + &Cancel + رد + + + + &Apply + انجام + + + + default + پیش فرض + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + هشدار + + + + + This setting will take effect after restarting curecoin. + این تنظیمات پس از اجرای دوباره curecoin اعمال می شوند + + + + The supplied proxy address is invalid. + آدرس پراکسی داده شده صحیح نیست + + + + OverviewPage + + + Form + تراز + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + اطلاعات نمایش داده شده روزآمد نیستند.wallet شما به صورت خودکار با شبکه curecoin بعد از برقراری اتصال روزآمد می شود اما این فرایند هنوز کامل نشده است. + + + + Balance: + راز: + + + + Unconfirmed: + تایید نشده + + + + Wallet + wallet + + + + Immature: + نابالغ + + + + Mined balance that has not yet matured + بالانس/تتمه حساب استخراج شده، نابالغ است /تکمیل نشده است + + + + <b>Recent transactions</b> + اخرین معاملات&lt + + + + Your current balance + تزار جاری شما + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + تعداد معاملات که تایید شده ولی هنوز در تزار جاری شما بر شمار نرفته است + + + + + out of sync + روزآمد نشده + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + دیالوگ QR CODE + + + + Request Payment + درخواست پرداخت + + + + Amount: + مقدار: + + + + Label: + برچسب: + + + + Message: + پیام + + + + &Save As... + &ذخیره به عنوان... + + + + Error encoding URI into QR Code. + خطا در زمان رمزدار کردن URI در کد QR + + + + The entered amount is invalid, please check. + میزان وجه وارد شده صحیح نیست، لطفا بررسی نمایید + + + + Resulting URI too long, try to reduce the text for label / message. + URI ذکر شده بسیار طولانی است، متن برچسب/پیام را کوتاه کنید + + + + Save QR Code + ذخیره کد QR + + + + PNG Images (*.png) + تصاویر با فرمت PNG (*.png) + + + + RPCConsole + + + Client name + نام مشتری + + + + + + + + + + + + + N/A + - + + + + Client version + نسخه مشتری + + + + &Information + اطلاعات + + + + Using OpenSSL version + استفاده از نسخه OPENSSL + + + + Startup time + زمان آغاز STARTUP + + + + Network + شبکه + + + + Number of connections + تعداد اتصالات + + + + On testnet + در testnetکها + + + + Block chain + زنجیره بلاک + + + + Current number of blocks + تعداد کنونی بلاکها + + + + Estimated total blocks + تعداد تخمینی بلاکها + + + + Last block time + زمان آخرین بلاک + + + + &Open + باز کردن + + + + Command-line options + گزینه های command-line + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + پیام راهنمای curecoin-Qt را برای گرفتن فهرست گزینه های command-line نشان بده + + + + &Show + نمایش + + + + &Console + کنسول + + + + Build date + ساخت تاریخ + + + + curecoin - Debug window + صفحه اشکال زدایی curecoin + + + + curecoin Core + هسته curecoin + + + + Debug log file + فایلِ لاگِ اشکال زدایی + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + فایلِ لاگِ اشکال زدایی curecoin را از دایرکتوری جاری داده ها باز کنید. این عملیات ممکن است برای فایلهای لاگِ حجیم طولانی شود. + + + + Clear console + پاکسازی کنسول + + + + Welcome to the curecoin RPC console. + به کنسول curecoin RPC خوش آمدید + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + دکمه های بالا و پایین برای مرور تاریخچه و Ctrl-L برای پاکسازی صفحه + + + + Type <b>help</b> for an overview of available commands. + با تایپ عبارت HELP دستورهای در دسترس را مرور خواهید کرد + + + + SendCoinsDialog + + + + + + + + + + Send Coins + ارسال سکه ها + + + + Send to multiple recipients at once + ارسال چندین در یافت ها فورا + + + + Add &Recipient + اضافه کردن دریافت کننده + + + + Remove all transaction fields + پاک کردن تمام ستون‌های تراکنش + + + + Clear &All + پاکسازی همه + + + + Balance: + تزار : + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + عملیت دوم تایید کنید + + + + S&end + &;ارسال + + + + <b>%1</b> to %2 (%3) + (%3) تا <b>%1</b> درصد%2 + + + + Confirm send coins + ارسال سکه ها تایید کنید + + + + Are you sure you want to send %1? + %1شما متماینید که می خواهید 1% ارسال کنید ؟ + + + + and + و + + + + The recipient address is not valid, please recheck. + آدرس گیرنده نادرست است، لطفا دوباره بررسی کنید. + + + + The amount to pay must be larger than 0. + مبلغ پر داخت باید از 0 بیشتر باشد + + + + The amount exceeds your balance. + میزان وجه از بالانس/تتمه حساب شما بیشتر است + + + + The total exceeds your balance when the %1 transaction fee is included. + کل میزان وجه از بالانس/تتمه حساب شما بیشتر می شود وقتی %1 هزینه تراکنش نیز به ین میزان افزوده می شود + + + + 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. + خطا: تراکنش تایید نشد. این پیام زمانی روی می دهد که مقداری از سکه های WALLET شما استفاده شده اند برای مثال اگر شما از WALLET.DAT استفاده کرده اید، ممکن است سکه ها استفاده شده باشند اما در اینجا نمایش داده نشوند + + + + SendCoinsEntry + + + Form + تراز + + + + A&mount: + A&مبلغ : + + + + Pay &To: + به&پر داخت : + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + برای آدرس بر پسب وارد کنید که در دفتر آدرس اضافه شود + + + + &Label: + &بر چسب + + + + Choose address from address book + اآدرسن ازدفتر آدرس انتخاب کنید + + + + Alt+A + Alt+A + + + + Paste address from clipboard + آدرس از تخته رسم گیره دار پست کنید + + + + Alt+P + Alt+P + + + + Remove this recipient + بر داشتن این در یافت کننده + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + آدرس بیتکویین وارد کنید (bijvoorbeeld: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + آدرس برای امضا کردن پیام با (برای مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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 + پیامی را که می‌خواهید امضا کنید در اینجا وارد کنید + + + + Signature + + + + + Copy the current signature to the system clipboard + این امضا را در system clipboard کپی کن + + + + Sign the message to prove you own this curecoin address + پیام را برای اثبات آدرس curecoin خود امضا کنید + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + آدرس برای امضا کردن پیام با (برای مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + پیام را برای اطمنان از ورود به سیستم با آدرس curecoin مشخص خود،تایید کنید + + + + Verify &Message + + + + + Reset all verify message fields + تنظیم دوباره تمامی فیلدهای پیام تایید شده + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + آدرس بیتکویین وارد کنید (bijvoorbeeld: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + با کلیک بر "امضای پیام" شما یک امضای جدید درست می کنید + + + + Enter curecoin signature + امضای curecoin خود را وارد کنید + + + + + 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. + قفل کردن wallet انجام نشد + + + + 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. + پیام شناسایی شد + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + آزمایش شبکه + + + + TransactionDesc + + + Open until %1 + باز کردن تا%1 + + + + %1/offline + %1 آفلاین + + + + %1/unconfirmed + %1 تایید نشده + + + + %1 confirmations + ایید %1 + + + + Status + وضعیت + + + + , broadcast through %n node(s) + انتشار از طریق n% گره +انتشار از طریق %n گره + + + + Date + تاریخ + + + + Source + منبع + + + + Generated + تولید شده + + + + + From + فرستنده + + + + + + To + گیرنده + + + + + own address + آدرس شما + + + + label + برچسب + + + + + + + + Credit + بدهی + + + + matures in %n more block(s) + بلوغ در n% از بیشتر بلاکها +بلوغ در %n از بیشتر بلاکها + + + + not accepted + غیرقابل قبول + + + + + + + Debit + اعتبار + + + + Transaction fee + هزینه تراکنش + + + + Net amount + هزینه خالص + + + + Message + پیام + + + + Comment + نظر + + + + Transaction ID + شناسه کاربری برای تراکنش + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + سکه های ایجاد شده باید 120 بلاک را قبل از استفاده بالغ کنند. در هنگام ایجاد بلاک، آن بلاک در شبکه منتشر می شود تا به زنجیره بلاکها بپیوندد. اگر در زنجیره قرار نگیرد، پیام وضعیت به غیرقابل قبول تغییر می بپیابد و قابل استفاده نیست. این مورد معمولا زمانی پیش می آید که گره دیگری به طور همزمان بلاکی را با فاصل چند ثانیه ای از شما ایجاد کند. + + + + Debug information + اشکال زدایی طلاعات + + + + Transaction + تراکنش + + + + Inputs + درونداد + + + + Amount + مبلغ + + + + true + صحیح + + + + false + نادرست + + + + , has not been successfully broadcast yet + هنوز با مو فقیت ارسال نشده + + + + Open for %n more block(s) + + + + + unknown + مشخص نیست + + + + TransactionDescDialog + + + Transaction details + جزییات معاملات + + + + This pane shows a detailed description of the transaction + در این قاب شیشه توصیف دقیق معامله نشان می شود + + + + TransactionTableModel + + + Date + تاریخ + + + + Type + نوع + + + + Address + ایل جدا + + + + Amount + مبلغ + + + + Open for %n more block(s) + + + + + Open until %1 + از شده تا 1%1 + + + + Offline (%1 confirmations) + افلایین (%1) + + + + Unconfirmed (%1 of %2 confirmations) + تایید نشده (%1/%2) + + + + Confirmed (%1 confirmations) + تایید شده (%1) + + + + Mined balance will be available when it matures in %n more block(s) + بالانس/تتمه حساب استخراج شده زمانی که %n از بیشتر بلاکها بالغ شدند در دسترس خواهد بود +بالانس/تتمه حساب استخراج شده زمانی که n% از بیشتر بلاکها بالغ شدند در دسترس خواهد بود + + + + 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) + Comma فایل جدا + + + + Confirmed + تایید شده + + + + Date + تاریخ + + + + Type + نوع + + + + Label + ر چسب + + + + Address + ایل جدا + + + + Amount + مبلغ + + + + ID + آی دی + + + + Error exporting + خطای صادرت + + + + Could not write to file %1. + تا فایل %1 نمی شود نوشت + + + + Range: + >محدوده + + + + to + به + + + + WalletModel + + + Send Coins + ارسال سکه ها + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + داده ها نوارِ جاری را به فایل انتقال دهید + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + سخه بیتکویین + + + + Usage: + ستفاده : + + + + Send command to -server or curecoind + ارسال فرمان به سرور یا باتکویین + + + + List commands + لیست فومان ها + + + + Get help for a command + کمک برای فرمان + + + + Options: + تنظیمات + + + + Specify configuration file (default: curecoin.conf) + (: curecoin.confپیش فرض: )فایل تنظیمی خاص + + + + Specify pid file (default: curecoind.pid) + (curecoind.pidپیش فرض : ) فایل پید خاص + + + + Specify data directory + دایرکتور اطلاعاتی خاص + + + + Set database cache size in megabytes (default: 25) + سایز کَش بانک داده را بر حسب مگابایت تنظیم کنید (پیش فرض:25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + برای اتصالات به <port> (پیش‌فرض: 7951 یا تست‌نت: 17951) گوش کنید + + + + Maintain at most <n> connections to peers (default: 125) + حداکثر <n> اتصال با همکاران برقرار داشته باشید (پیش‌فرض: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + اتصال به گره برای دریافت آدرسهای قرینه و قطع اتصال + + + + Specify your own public address + آدرس عمومی خود را ذکر کنید + + + + Threshold for disconnecting misbehaving peers (default: 100) + آستانه برای قطع ارتباط با همکاران بدرفتار (پیش‌فرض: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + مدت زمان به ثانیه برای جلوگیری از همکاران بدرفتار برای اتصال دوباره (پیش‌فرض: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + در زمان تنظیم درگاه RPX %u در فهرست کردن %s اشکالی رخ داده است + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + ( 7950پیش7950 :) &lt;poort&gt; JSON-RPC شنوایی برای ارتباطات + + + + Accept command line and JSON-RPC commands + JSON-RPC قابل فرمانها و + + + + 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) + پذیرش اتصالات از بیرون (پیش فرض:1 بدون پراکسی یا اتصال) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + حجم حداکثر تراکنشهای با/کم اهمیت را به بایت تنظیم کنید (پیش فرض:27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + هشدار:paytxfee بسیار بالا تعریف شده است! این هزینه تراکنش است که باید در زمان ارسال تراکنش بپردازید + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + هشدار: تراکنش نمایش داده شده ممکن است صحیح نباشد! شما/یا یکی از گره ها به روزآمد سازی نیاز دارید + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + هشدار: لطفا زمان و تاریخ رایانه خود را تصحیح نمایید! اگر ساعت رایانه شما اشتباه باشد curecoin ممکن است صحیح کار نکند + + + + 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) + تنها در گره (های) مشخص شده متصل شوید + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + آدرس آی.پی. خود را شناسایی کنید (پیش فرض:1 در زمان when listening وno -externalip) + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + شنیدن هر گونه درگاه انجام پذیر نیست. ازlisten=0 برای اینکار استفاده کیند. + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + قرینه ها را برای جستجوی DNS بیاب (پیش فرض: 1 مگر در زمان اتصال) + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + آدرس نرم افزار تور غلط است %s + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + حداکثر بافر دریافت شده بر اساس اتصال <n>* 1000 بایت (پیش فرض:5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + حداکثر بافر دریافت شده بر اساس اتصال <n>* 1000 بایت (پیش فرض:1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + تنها =به گره ها در شبکه متصا شوید <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 curecoin Wiki for SSL setup instructions) + گزینه ssl (به ویکیcurecoin برای راهنمای راه اندازی ssl مراجعه شود) + + + + Select the version of socks proxy to use (4-5, default: 5) + نسخه ای از پراکسی ساکس را برای استفاده انتخاب کنید (4-5 پیش فرض: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) + حداکثر سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 250000) + + + + Set minimum block size in bytes (default: 0) + حداقل سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + فایل debug.log را در startup مشتری کوچک کن (پیش فرض:1 اگر اشکال زدایی روی نداد) + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + (میلی ثانیه )فاصله ارتباط خاص + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:0) + + + + Use UPnP to map the listening port (default: 1 when listening) + از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:1 در زمان شنیدن) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + برای دستیابی به سرویس مخفیانه نرم افزار تور از پراکسی استفاده کنید (پیش فرض:same as -proxy) + + + + Username for JSON-RPC connections + JSON-RPC شناسه برای ارتباطات + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + هشدار: این نسخه قدیمی است، روزآمدسازی مورد نیاز است + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + JSON-RPC عبارت عبور برای ارتباطات + + + + Allow JSON-RPC connections from specified IP address + از آدرس آی پی خاص JSON-RPC قبول ارتباطات + + + + Send commands to node running on <ip> (default: 127.0.0.1) + (127.0.0.1پیش فرض: ) &lt;ip&gt; دادن فرمانها برای استفاده گره ها روی + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + زمانی که بهترین بلاک تغییر کرد، دستور را اجرا کن (%s در cmd با block hash جایگزین شده است) + + + + Upgrade wallet to latest format + wallet را به جدیدترین فرمت روزآمد کنید + + + + Set key pool size to <n> (default: 100) + (100پیش فرض:)&lt;n&gt; گذاشتن اندازه کلید روی + + + + Rescan the block chain for missing wallet transactions + اسکان مجدد زنجیر بلوکها برای گم والت معامله + + + + Use OpenSSL (https) for JSON-RPC connections + JSON-RPCبرای ارتباطات استفاده کنید OpenSSL (https) + + + + Server certificate file (default: server.cert) + (server.certپیش فرض: )گواهی نامه سرور + + + + Server private key (default: server.pem) + (server.pemپیش فرض: ) کلید خصوصی سرور + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + رمز های قابل قبول( TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + پیام کمکی + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + امکان اتصال به %s از این رایانه وجود ندارد ( bind returned error %d, %s) + + + + Connect through socks proxy + اتصال از طریق پراکسی ساکس + + + + Allow DNS lookups for -addnode, -seednode and -connect + به DNS اجازه بده تا برای addnode ، seednode و اتصال جستجو کند + + + + Loading addresses... + بار گیری آدرس ها + + + + Error loading wallet.dat: Wallet corrupted + خطا در بارگیری wallet.dat: کیف پول خراب شده است + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + خطا در بارگیری wallet.dat: کیف پول به ویرایش جدیدتری از curecoin نیاز دارد + + + + Wallet needed to be rewritten: restart curecoin to complete + سلام + + + + Error loading wallet.dat + خطا در بارگیری wallet.dat + + + + Invalid -proxy address: '%s' + آدرس پراکسی اشتباه %s + + + + Unknown network specified in -onlynet: '%s' + شبکه مشخص شده غیرقابل شناسایی در onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + نسخه پراکسی ساکس غیرقابل شناسایی درخواست شده است: %i + + + + Cannot resolve -bind address: '%s' + آدرس قابل اتصال- شناسایی نیست %s + + + + Cannot resolve -externalip address: '%s' + آدرس خارجی قابل اتصال- شناسایی نیست %s + + + + Invalid amount for -paytxfee=<amount>: '%s' + میزان وجه اشتباه برای paytxfee=<میزان وجه>: %s + + + + 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. curecoin is probably already running. + اتصال به %s از این رایانه امکان پذیر نیست. curecoin احتمالا در حال اجراست. + + + + Fee per KB to add to transactions you send + پر داجت برای هر کیلو بیت برای اضافه به معامله ارسال + + + + Loading wallet... + بار گیری والت + + + + Cannot downgrade wallet + امکان تنزل نسخه در wallet وجود ندارد + + + + Cannot write default address + آدرس پیش فرض قابل ذخیره نیست + + + + Rescanning... + اسکان مجدد + + + + Done loading + بار گیری انجام شده است + + + + To use the %s option + برای استفاده از %s از انتخابات + + + + 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. + %s، شما باید یک rpcpassword را در فایل پیکربندی تنظیم کنید :⏎%s⏎ اگر فایل ایجاد نشد، یک فایل فقط متنی ایجاد کنید. + + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_fa_IR.qm b/src/qt/locale/curecoin_fa_IR.qm new file mode 100644 index 0000000..f8fa184 Binary files /dev/null and b/src/qt/locale/curecoin_fa_IR.qm differ diff --git a/src/qt/locale/curecoin_fa_IR.ts b/src/qt/locale/curecoin_fa_IR.ts new file mode 100644 index 0000000..709f017 --- /dev/null +++ b/src/qt/locale/curecoin_fa_IR.ts @@ -0,0 +1,2921 @@ + +UTF-8 + + AboutDialog + + + About curecoin + در مورد بیتکویین + + + + <b>curecoin</b> version + <b>curecoin</b> version + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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 + نشان و کد QR + + + + Sign a message to prove you own a curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + صدور داده نوار جاری به یک فایل + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + و حذف + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + کپی و برچسب + + + + &Edit + و ویرایش + + + + Send &Coins + + + + + Export Address Book Data + انتقال اطلاعات دفترچه آدرس + + + + Comma separated file (*.csv) + سی.اس.وی. (فایل جداگانه دستوری) + + + + Error exporting + صدور پیام خطا + + + + Could not write to file %1. + قابل کپی در فایل نیست %1 + + + + AddressTableModel + + + Label + برچسب + + + + Address + آدرس + + + + (no label) + (برچسب ندارد) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + رمز/پَس فرِیز را وارد کنید + + + + New passphrase + رمز/پَس فرِیز جدید را وارد کنید + + + + Repeat new passphrase + رمز/پَس فرِیز را دوباره وارد کنید + + + + 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>. + رمز/پَس فرِیز جدید را در wallet وارد کنید. برای انتخاب رمز/پَس فرِیز از 10 کاراکتر تصادفی یا بیشتر و یا هشت کلمه یا بیشتر استفاده کنید. + + + + Encrypt wallet + wallet را رمزگذاری کنید + + + + This operation needs your wallet passphrase to unlock the wallet. + برای انجام این عملکرد به رمز/پَس فرِیزِwallet نیاز است تا آن را از حالت قفل درآورد. + + + + Unlock wallet + باز کردن قفل wallet + + + + This operation needs your wallet passphrase to decrypt the wallet. + برای کشف رمز wallet، به رمز/پَس فرِیزِwallet نیاز است. + + + + Decrypt wallet + کشف رمز wallet + + + + Change passphrase + تغییر رمز/پَس فرِیز + + + + Enter the old and new passphrase to the wallet. + رمز/پَس فرِیزِ قدیم و جدید را در wallet وارد کنید + + + + Confirm wallet encryption + رمزگذاری wallet را تایید کنید + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</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 + تایید رمزگذاری + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin برای اتمام فرایند رمزگذاری بسته خواهد شد. به خاطر داشته باشید که رمزگذاری WALLET شما، کامپیوتر شما را از آلودگی به بدافزارها مصون نمی دارد. + + + + + + + Wallet encryption failed + رمزگذاری تایید نشد + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + رمزگذاری به علت خطای داخلی تایید نشد. wallet شما رمزگذاری نشد + + + + + The supplied passphrases do not match. + رمزهای/پَس فرِیزهایِ وارد شده با هم تطابق ندارند + + + + Wallet unlock failed + قفل wallet باز نشد + + + + + + The passphrase entered for the wallet decryption was incorrect. + رمزهای/پَس فرِیزهایِ وارد شده wallet برای کشف رمز اشتباه است. + + + + Wallet decryption failed + کشف رمز wallet انجام نشد + + + + Wallet passphrase was successfully changed. + + + + + curecoinGUI + + + Sign &message... + امضا و پیام + + + + Synchronizing with network... + به روز رسانی با شبکه... + + + + &Overview + و بازبینی + + + + Show general overview of wallet + نمای کلی از wallet را نشان بده + + + + &Transactions + و تراکنش + + + + Browse transaction history + تاریخچه تراکنش را باز کن + + + + Edit the list of stored addresses and labels + فهرست آدرسها و برچسبهای ذخیره شده را ویرایش کن + + + + Show the list of addresses for receiving payments + فهرست آدرسها را برای دریافت وجه نشان بده + + + + E&xit + خروج + + + + Quit application + از "درخواست نامه"/ application خارج شو + + + + Show information about curecoin + اطلاعات در مورد curecoin را نشان بده + + + + About &Qt + درباره و QT + + + + Show information about Qt + نمایش اطلاعات درباره QT + + + + &Options... + و انتخابها + + + + &Encrypt Wallet... + و رمزگذاری wallet + + + + &Backup Wallet... + و گرفتن نسخه پیشتیبان از wallet + + + + &Change Passphrase... + تغییر رمز/پَس فرِیز + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + اصلاح انتخابها برای پیکربندی curecoin + + + + Backup wallet to another location + گرفتن نسخه پیشتیبان در آدرسی دیگر + + + + Change the passphrase used for wallet encryption + رمز مربوط به رمزگذاریِ wallet را تغییر دهید + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + curecoin + + + + Wallet + کیف پول + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &در مورد بیتکویین + + + + &Show / Hide + &نمایش/ عدم نمایش و + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + و فایل + + + + &Settings + و تنظیمات + + + + &Help + و راهنما + + + + Tabs toolbar + نوار ابزار + + + + + [testnet] + [testnet] + + + + curecoin client + مشتری curecoin + + + + %n active connection(s) to curecoin network + %n ارتباط فعال به شبکه curecoin +%n ارتباط فعال به شبکه curecoin + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + روزآمد + + + + Catching up... + در حال روزآمد سازی.. + + + + 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 curecoin 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 رمزگذاری شد و در حال حاضر قفل است + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + هشدار شبکه + + + + 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. + آدرس وارد شده %1 قبلا به فهرست آدرسها اضافه شده بوده است. + + + + The entered address "%1" is not a valid curecoin address. + آدرس وارد شده "%1" یک آدرس صحیح برای curecoin نسشت + + + + Could not unlock wallet. + عدم توانیی برای قفل گشایی wallet + + + + New key generation failed. + عدم توانیی در ایجاد کلید جدید + + + + GUIUtil::HelpMessageBox + + + + curecoin-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. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + و نمایش آدرسها در فهرست تراکنش + + + + &OK + و تایید + + + + &Cancel + و رد + + + + &Apply + و به کار گرفتن + + + + default + پیش فرض + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + فرم + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + اطلاعات نمایش داده شده ممکن است روزآمد نباشد. wallet شما به صورت خودکار بعد از برقراری اتصال با شبکه curecoin به روز می شود اما این فرایند هنوز تکمیل نشده است. + + + + Balance: + مانده حساب: + + + + Unconfirmed: + تایید نشده + + + + Wallet + کیف پول + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + تراکنشهای اخیر + + + + Your current balance + مانده حساب جاری + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + تعداد تراکنشهایی که نیاز به تایید دارند و هنوز در مانده حساب جاری شما به حساب نیامده اند + + + + + out of sync + خارج از روزآمد سازی + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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) + تصاویر با فرمت PNG +(*.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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin RPC console. + به کنسول آر.پی.سی. curecoin خوش آمدید + + + + 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 + سکه های ارسالی + + + + Send to multiple recipients at once + ارسال همزمان به گیرنده های متعدد + + + + Add &Recipient + + + + + Remove all transaction fields + تمامی فیلدهای تراکنش حذف شوند + + + + Clear &All + + + + + Balance: + مانده حساب: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + تایید عملیات ارسال + + + + S&end + و ارسال + + + + <b>%1</b> to %2 (%3) + %1 به %2 (%3) + + + + Confirm send coins + تایید ارسال سکه ها + + + + Are you sure you want to send %1? + شما مطمئن هستید که می خواهید %1 را ارسال کنید؟ + + + + and + و + + + + The recipient address is not valid, please recheck. + + + + + The amount to pay must be larger than 0. + میزان پرداخت باید بیشتر از 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. + خطا: تراکنش تایید نشد. این خطا ممکن است به این دلیل اتفاق بیافتد که سکه های wallet شما خرج شده باشند مثلا اگر wallet.dat را مپی کرده باشید و سکه های شما در آن کپی استفاده شده باشند اما در اینجا نمایش داده نشده اند. + + + + SendCoinsEntry + + + Form + فرم + + + + A&mount: + و میزان وجه + + + + Pay &To: + پرداخت و به چه کسی + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + یک برچسب برای این آدرس بنویسید تا به دفترچه آدرسهای شما اضافه شود + + + + &Label: + و برچسب + + + + Choose address from address book + آدرس از فهرست آدرس انتخاب کنید + + + + Alt+A + Alt و A + + + + Paste address from clipboard + آدرس را بر کلیپ بورد کپی کنید + + + + Alt+P + Alt و P + + + + Remove this recipient + این گیرنده را حذف کن + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + یک آدرس curecoin وارد کنید (مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + یک آدرس curecoin وارد کنید (مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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 + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + یک آدرس curecoin وارد کنید (مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + یک آدرس curecoin وارد کنید (مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + باز کن تا %1 + + + + %1/offline + + + + + %1/unconfirmed + %1 غیرقابل تایید + + + + %1 confirmations + %1 تاییدها + + + + 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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + میزان + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + تا به حال با موفقیت انتشار نیافته است + + + + Open for %n more block(s) + + + + + unknown + ناشناس + + + + TransactionDescDialog + + + Transaction details + جزئیات تراکنش + + + + This pane shows a detailed description of the transaction + این بخش جزئیات تراکنش را نشان می دهد + + + + TransactionTableModel + + + Date + تاریخ + + + + Type + نوع + + + + Address + آدرس + + + + Amount + میزان وجه + + + + Open for %n more block(s) + + + + + Open until %1 + باز کن تا %1 + + + + Offline (%1 confirmations) + برون خطی (%1 تاییدها) + + + + Unconfirmed (%1 of %2 confirmations) + تایید نشده (%1 از %2 تاییدها) + + + + Confirmed (%1 confirmations) + تایید شده (%1 تاییدها) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + این block توسط گره های دیگری دریافت نشده است و ممکن است قبول نشود + + + + 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) + Comma separated file (*.csv) فایل جداگانه دستوری + + + + Confirmed + تایید شده + + + + Date + تاریخ + + + + Type + نوع + + + + Label + برچسب + + + + Address + آدرس + + + + Amount + میزان + + + + ID + شناسه کاربری + + + + Error exporting + خطا در ارسال + + + + Could not write to file %1. + قابل کپی به فایل نیست %1. + + + + Range: + دامنه: + + + + to + به + + + + WalletModel + + + Send Coins + سکه های ارسالی + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + صدور داده نوار جاری به یک فایل + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + نسخه curecoin + + + + Usage: + میزان استفاده: + + + + Send command to -server or curecoind + ارسال دستور به سرور یا curecoined + + + + List commands + فهرست دستورها + + + + Get help for a command + درخواست کمک برای یک دستور + + + + Options: + انتخابها: + + + + Specify configuration file (default: curecoin.conf) + فایل پیکربندیِ را مشخص کنید (پیش فرض: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + فایل pid را مشخص کنید (پیش فرض: curecoind.pid) + + + + Specify data directory + دایرکتوری داده را مشخص کن + + + + Set database cache size in megabytes (default: 25) + حافظه بانک داده را به مگابایت تنظیم کنید (پیش فرض: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + ارتباطات را در <PORT> بشنوید (پیش فرض: 7951 or testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + نگهداری <N> ارتباطات برای قرینه سازی (پیش فرض:125) + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + Threshold for disconnecting misbehaving peers (default: 100) + آستانه قطع برای قرینه سازی اشتباه (پیش فرض:100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + تعداد ثانیه ها برای اتصال دوباره قرینه های اشتباه (پیش فرض:86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + ارتباطاتِ JSON-RPC را در <port> گوش کنید (پیش فرض:7950) + + + + Accept command line and JSON-RPC commands + command line و JSON-RPC commands را قبول کنید + + + + Run in the background as a daemon and accept commands + به عنوان daemon بک گراند را اجرا کنید و دستورات را قبول نمایید + + + + Use the test network + از تستِ شبکه استفاده نمایید + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 + برونداد اشکال زدایی با timestamp + + + + SSL options: (see the curecoin 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 + ارسال اطلاعات پیگیری/خطایابی به کنسول به جای ارسال به فایل debug.log + + + + 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + تعیین مدت زمان وقفه (time out) به هزارم ثانیه + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + شناسه کاربری برای ارتباطاتِ JSON-RPC + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + رمز برای ارتباطاتِ JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + ارتباطاتِ JSON-RPC را از آدرس آی.پی. مشخصی برقرار کنید. + + + + Send commands to node running on <ip> (default: 127.0.0.1) + دستورات را به گره اجرا شده در<ip> ارسال کنید (پیش فرض:127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + دستور را وقتی بهترین بلاک تغییر کرد اجرا کن (%s در دستور توسط block hash جایگزین شده است) + + + + Upgrade wallet to latest format + wallet را به جدیدترین نسخه روزآمد کنید + + + + Set key pool size to <n> (default: 100) + حجم key pool را به اندازه <n> تنظیم کنید (پیش فرض:100) + + + + Rescan the block chain for missing wallet transactions + زنجیره بلاک را برای تراکنش جا افتاده در WALLET دوباره اسکن کنید + + + + Use OpenSSL (https) for JSON-RPC connections + برای ارتباطاتِ JSON-RPC از OpenSSL (https) استفاده کنید + + + + Server certificate file (default: server.cert) + فایل certificate سرور (پیش فرض server.cert) + + + + Server private key (default: server.pem) + رمز اختصاصی سرور (پیش فرض: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + ciphers قابل قبول (پیش فرض: default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + این پیام راهنما + + + + 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 wallet.dat: Wallet corrupted + خطا در هنگام لود شدن wallet.dat: Wallet corrupted + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + خطا در هنگام لود شدن wallet.dat. به نسخه جدید curecoin برای wallet نیاز است. + + + + Wallet needed to be rewritten: restart curecoin to complete + wallet نیاز به بازنویسی دارد. curecoin را برای تکمیل عملیات دوباره اجرا کنید. + + + + 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' + میزان اشتباه است for -paytxfee=<amount>: '%s' + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + هزینه بر اساس کیلو بایت برای اضافه شدن به تراکنشی که ارسال کرده اید + + + + Loading wallet... + wallet در حال لود شدن است... + + + + Cannot downgrade wallet + قابلیت برگشت به نسخه قبلی برای wallet امکان پذیر نیست + + + + Cannot write default address + آدرس پیش فرض قابل ذخیره نیست + + + + Rescanning... + اسکنِ دوباره... + + + + Done loading + اتمام لود شدن + + + + To use the %s option + برای استفاده از %s از اختیارات + + + + 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. + شما باید یک رمز rpcpassword=<password> را در فایل تنظیمات ایجاد کنید⏎ %s ⏎ اگر فایل ایجاد نشده است، آن را با یک فایل "فقط متنی" ایجاد کنید. + + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_fi.qm b/src/qt/locale/curecoin_fi.qm new file mode 100644 index 0000000..b5fb8a2 Binary files /dev/null and b/src/qt/locale/curecoin_fi.qm differ diff --git a/src/qt/locale/curecoin_fi.ts b/src/qt/locale/curecoin_fi.ts new file mode 100644 index 0000000..afb2308 --- /dev/null +++ b/src/qt/locale/curecoin_fi.ts @@ -0,0 +1,2929 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Tietoa curecoinista + + + + <b>curecoin</b> version + <b>curecoin</b> versio + + + + +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. + +Tämä on kokeellinen ohjelmisto. + +Levitetään MIT/X11 ohjelmistolisenssin alaisuudessa. Tarkemmat tiedot löytyvät tiedostosta COPYING tai osoitteesta http://www.opensource.org/licenses/mit-license.php. + +Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.openssl.org/), Eric Youngin (eay@cryptsoft.com) kehittämän salausohjelmiston sekä Thomas Bernardin UPnP ohjelmiston. + + + + + Copyright + Tekijänoikeus + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Osoitekirja + + + + Double-click to edit address or label + Kaksoisnapauta muokataksesi osoitetta tai nimeä + + + + Create a new address + Luo uusi osoite + + + + Copy the currently selected address to the system clipboard + Kopioi valittu osoite leikepöydälle + + + + &New Address + &Uusi Osoite + + + + These are your curecoin 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 curecoin-osoitteesi joihin voit vastaanottaa maksuja. Voit haluta antaa jokaiselle maksajalle omansa, että pystyt seuraamaan keneltä maksut tulevat. + + + + &Copy Address + &Kopioi Osoite + + + + Show &QR Code + Näytä &QR-koodi + + + + Sign a message to prove you own a curecoin address + Allekirjoita viesti todistaaksesi, että omistat curecoin-osoitteen + + + + Sign &Message + Allekirjoita &viesti + + + + Delete the currently selected address from the list + Poista valittu osoite listalta + + + + Export the data in the current tab to a file + Vie auki olevan välilehden tiedot tiedostoon + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + Tarkista viestin allekirjoitus varmistaaksesi, että se allekirjoitettiin tietyllä curecoin-osoitteella + + + + &Verify Message + &Varmista viesti... + + + + &Delete + &Poista + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Kopioi &Nimi + + + + &Edit + &Muokkaa + + + + Send &Coins + Lähetä &Rahaa + + + + Export Address Book Data + Vie osoitekirja + + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + + Error exporting + Virhe viedessä osoitekirjaa + + + + Could not write to file %1. + Ei voida kirjoittaa tiedostoon %1. + + + + AddressTableModel + + + Label + Nimi + + + + Address + Osoite + + + + (no label) + (ei nimeä) + + + + AskPassphraseDialog + + + Passphrase Dialog + Tunnuslauseen Dialogi + + + + Enter passphrase + Kirjoita tunnuslause + + + + New passphrase + Uusi tunnuslause + + + + Repeat new passphrase + Kiroita uusi tunnuslause uudelleen + + + + 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>. + Anna lompakolle uusi tunnuslause.<br/>Käytä tunnuslausetta, jossa on ainakin <b>10 satunnaista mekkiä</b> tai <b>kahdeksan sanaa</b>. + + + + Encrypt wallet + Salaa lompakko + + + + This operation needs your wallet passphrase to unlock the wallet. + Tätä toimintoa varten sinun täytyy antaa lompakon tunnuslause sen avaamiseksi. + + + + Unlock wallet + Avaa lompakko + + + + This operation needs your wallet passphrase to decrypt the wallet. + Tätä toimintoa varten sinun täytyy antaa lompakon tunnuslause salauksen purkuun. + + + + Decrypt wallet + Pura lompakon salaus + + + + Change passphrase + Vaihda tunnuslause + + + + Enter the old and new passphrase to the wallet. + Anna vanha ja uusi tunnuslause. + + + + Confirm wallet encryption + Vahvista lompakon salaus + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Varoitus: Jos salaat lompakkosi ja menetät tunnuslauseesi, <b>MENETÄT KAIKKI curecoinISI</b>! + + + + Are you sure you wish to encrypt your wallet? + Haluatko varmasti salata lompakkosi? + + + + 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 pitäisi korvata uusilla suojatuilla varmuuskopioilla. Turvallisuussyistä edelliset varmuuskopiot muuttuvat turhiksi, kun aloitat suojatun lompakon käytön. + + + + + Warning: The Caps Lock key is on! + Varoitus: Caps Lock on käytössä! + + + + + Wallet encrypted + Lompakko salattu + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin sulkeutuu lopettaakseen salausprosessin. Muista, että salattukaan lompakko ei täysin suojaa sitä haittaohjelmien aiheuttamilta varkauksilta. + + + + + + + Wallet encryption failed + Lompakon salaus epäonnistui + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Lompakon salaaminen epäonnistui sisäisen virheen vuoksi. Lompakkoasi ei salattu. + + + + + The supplied passphrases do not match. + Annetut tunnuslauseet eivät täsmää. + + + + Wallet unlock failed + Lompakon avaaminen epäonnistui. + + + + + + The passphrase entered for the wallet decryption was incorrect. + Annettu tunnuslause oli väärä. + + + + Wallet decryption failed + Lompakon salauksen purku epäonnistui. + + + + Wallet passphrase was successfully changed. + Lompakon tunnuslause vaihdettiin onnistuneesti. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Muokkaa tallennettujen nimien ja osoitteiden listaa + + + + Show the list of addresses for receiving payments + Näytä curecoinien vastaanottamiseen käytetyt osoitteet + + + + E&xit + L&opeta + + + + Quit application + Sulje ohjelma + + + + Show information about curecoin + Näytä tietoa curecoin-projektista + + + + About &Qt + Tietoja &Qt + + + + Show information about Qt + Näytä tietoja QT:ta + + + + &Options... + &Asetukset... + + + + &Encrypt Wallet... + &Salaa lompakko... + + + + &Backup Wallet... + &Varmuuskopioi Lompakko... + + + + &Change Passphrase... + &Vaihda Tunnuslause... + + + + Importing blocks from disk... + Tuodaan lohkoja levyltä + + + + Reindexing blocks on disk... + Ladataan lohkoindeksiä... + + + + Send coins to a curecoin address + Lähetä kolikoita curecoin-osoitteeseen + + + + Modify configuration options for curecoin + Muuta curecoinin konfiguraatioasetuksia + + + + 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... + Varmista &viesti... + + + + + curecoin + curecoin + + + + Wallet + Lompakko + + + + &Send + &Lähetä + + + + &Receive + &Vastaanota + + + + &Addresses + &Osoitteet + + + + &About curecoin + &Tietoa curecoinista + + + + &Show / Hide + &Näytä / Piilota + + + + Show or hide the main Window + Näytä tai piilota curecoin-ikkuna + + + + Encrypt the private keys that belong to your wallet + Suojaa yksityiset avaimet, jotka kuuluvat lompakkoosi + + + + Sign messages with your curecoin addresses to prove you own them + Allekirjoita viestisi omalla curecoin -osoitteellasi todistaaksesi, että omistat ne + + + + Verify messages to ensure they were signed with specified curecoin addresses + Varmista, että viestisi on allekirjoitettu määritetyllä curecoin -osoitteella + + + + &File + &Tiedosto + + + + &Settings + &Asetukset + + + + &Help + &Apua + + + + Tabs toolbar + Välilehtipalkki + + + + + [testnet] + [testnet] + + + + curecoin client + curecoin-asiakas + + + + %n active connection(s) to curecoin network + %n aktiivinen yhteys curecoin-verkkoon%n aktiivista yhteyttä curecoin-verkkoon + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + Käsitelty %1 lohkoa rahansiirtohistoriasta + + + + %n hour(s) + %n tunti%n tuntia + + + + %n day(s) + + + + + %n week(s) + %n viikko%n viikkoa + + + + %1 behind + + + + + Last received block was generated %1 ago. + Viimeisin vastaanotettu lohko tuotettu %1. + + + + Transactions after this will not yet be visible. + + + + + Error + Virhe + + + + Warning + Varoitus + + + + Information + Tietoa + + + + 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? + + + + + Up to date + Rahansiirtohistoria on ajan tasalla + + + + Catching up... + Saavutetaan verkkoa... + + + + Confirm transaction fee + Vahvista maksukulu + + + + 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 käsittely + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + URIa ei voitu jäsentää! Tämä voi johtua kelvottomasta curecoin-osoitteesta tai virheellisistä URI parametreista. + + + + 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Peruuttamaton virhe on tapahtunut. curecoin ei voi enää jatkaa turvallisesti ja sammutetaan. + + + + ClientModel + + + Network Alert + Verkkohälytys + + + + EditAddressDialog + + + Edit Address + Muokkaa osoitetta + + + + &Label + &Nimi + + + + The label associated with this address book entry + Tähän osoitteeseen liitetty nimi + + + + &Address + &Osoite + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Osoite, joka liittyy tämän osoitekirjan merkintään. Tätä voidaan muuttaa vain lähtevissä osoitteissa. + + + + 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 already in the address book. + Osoite "%1" on jo osoitekirjassa. + + + + The entered address "%1" is not a valid curecoin address. + Antamasi osoite "%1" ei ole validi curecoin-osoite. + + + + Could not unlock wallet. + Lompakkoa ei voitu avata. + + + + New key generation failed. + Uuden avaimen luonti epäonnistui. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versio + + + + Usage: + Käyttö: + + + + command-line options + komentorivi parametrit + + + + UI options + Käyttöliittymäasetukset + + + + Set language, for example "de_DE" (default: system locale) + Set language, for example "de_DE" (default: system locale) + + + + Start minimized + Käynnistä pienennettynä + + + + Show splash screen on startup (default: 1) + Näytä aloitusruutu käynnistettäessä (oletus: 1) + + + + OptionsDialog + + + Options + Asetukset + + + + &Main + &Yleiset + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Maksa rahansiirtopalkkio + + + + Automatically start curecoin after logging in to the system. + Käynnistä curecoin kirjautumisen yhteydessä. + + + + &Start curecoin on system login + &Käynnistä curecoin kirjautumisen yhteydessä + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + &Verkko + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Avaa curecoin-asiakasohjelman portti reitittimellä automaattisesti. Tämä toimii vain, jos reitittimesi tukee UPnP:tä ja se on käytössä. + + + + Map port using &UPnP + Portin uudelleenohjaus &UPnP:llä + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Ota yhteys curecoin-verkkoon SOCKS-proxyn läpi (esimerkiksi kun haluat käyttää Tor-verkkoa). + + + + &Connect through SOCKS proxy: + &Ota yhteys SOCKS-proxyn kautta: + + + + Proxy &IP: + Proxyn &IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + Välityspalvelimen IP-osoite (esim. 127.0.0.1) + + + + &Port: + &Portti + + + + Port of the proxy (e.g. 9050) + Proxyn Portti (esim. 9050) + + + + SOCKS &Version: + SOCKS &Versio: + + + + SOCKS version of the proxy (e.g. 5) + Proxyn SOCKS-versio (esim. 5) + + + + &Window + &Ikkuna + + + + Show only a tray icon after minimizing the window. + Näytä ainoastaan ilmaisinalueella ikkunan pienentämisen jälkeen. + + + + &Minimize to the tray instead of the taskbar + &Pienennä ilmaisinalueelle työkalurivin sijasta + + + + 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ää curecoin-ohjelman ikkunan lopettamatta itse ohjelmaa. Kun tämä asetus on valittuna, ohjelman voi sulkea vain valitsemalla Lopeta ohjelman valikosta. + + + + M&inimize on close + P&ienennä suljettaessa + + + + &Display + &Käyttöliittymä + + + + User Interface &language: + &Käyttöliittymän kieli + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Tässä voit määritellä käyttöliittymän kielen. Muutokset astuvat voimaan seuraavan kerran, kun curecoin käynnistetään. + + + + &Unit to show amounts in: + Yksikkö jona curecoin-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 curecoin-määrien näyttämiseen. + + + + Whether to show curecoin addresses in the transaction list or not. + Näytetäänkö curecoin-osoitteet rahansiirrot listassa vai ei. + + + + &Display addresses in transaction list + &Näytä osoitteet rahansiirrot listassa + + + + &OK + &OK + + + + &Cancel + &Peruuta + + + + &Apply + &Hyväksy + + + + default + oletus + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + Varoitus + + + + + This setting will take effect after restarting curecoin. + Tämä asetus astuu voimaan seuraavalla kerralla, kun curecoin käynnistetään. + + + + The supplied proxy address is invalid. + Antamasi proxy-osoite on virheellinen. + + + + OverviewPage + + + Form + Lomake + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Näytetyt tiedot eivät välttämättä ole ajantasalla. Lompakkosi synkronoituu curecoin-verkon kanssa automaattisesti yhteyden muodostamisen jälkeen, mutta synkronointi on vielä meneillään. + + + + Balance: + Saldo: + + + + Unconfirmed: + Vahvistamatta: + + + + Wallet + Lompakko + + + + Immature: + Epäkypsää: + + + + Mined balance that has not yet matured + Louhittu saldo, joka ei ole vielä kypsynyt + + + + <b>Recent transactions</b> + <b>Viimeisimmät rahansiirrot</b> + + + + Your current balance + Tililläsi tällä hetkellä olevien curecoinien määrä + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Niiden saapuvien rahansiirtojen määrä, joita curecoin-verkko ei vielä ole ehtinyt vahvistaa ja siten eivät vielä näy saldossa. + + + + + out of sync + Ei ajan tasalla + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + QR-koodi Dialogi + + + + Request Payment + Vastaanota maksu + + + + Amount: + Määrä: + + + + Label: + Tunniste: + + + + Message: + Viesti: + + + + &Save As... + &Tallenna nimellä... + + + + Error encoding URI into QR Code. + Virhe käännettäessä URI:a QR-koodiksi. + + + + The entered amount is invalid, please check. + Syötetty määrä on virheellinen. Tarkista kirjoitusasu. + + + + Resulting URI too long, try to reduce the text for label / message. + Tuloksen URI liian pitkä, yritä lyhentää otsikon tekstiä / viestiä. + + + + Save QR Code + Tallenna QR-koodi + + + + PNG Images (*.png) + PNG kuvat (*png) + + + + RPCConsole + + + Client name + Pääteohjelman nimi + + + + + + + + + + + + + N/A + Ei saatavilla + + + + Client version + Pääteohjelman versio + + + + &Information + T&ietoa + + + + Using OpenSSL version + Käytössä oleva OpenSSL-versio + + + + Startup time + Käynnistysaika + + + + Network + Verkko + + + + Number of connections + Yhteyksien lukumäärä + + + + On testnet + Käyttää testiverkkoa + + + + Block chain + Lohkoketju + + + + Current number of blocks + Nykyinen Lohkojen määrä + + + + Estimated total blocks + Arvioitu lohkojen kokonaismäärä + + + + Last block time + Viimeisimmän lohkon aika + + + + &Open + &Avaa + + + + Command-line options + Komentorivi parametrit + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Näytä curecoin-Qt komentoriviparametrien ohjesivu, jossa on listattuna mahdolliset komentoriviparametrit. + + + + &Show + &Näytä + + + + &Console + &Konsoli + + + + Build date + Kääntöpäiväys + + + + curecoin - Debug window + curecoin - Debug ikkuna + + + + curecoin Core + curecoin-ydin + + + + Debug log file + Debug lokitiedosto + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Avaa lokitiedosto nykyisestä data-kansiosta. Tämä voi viedä useamman sekunnin, jos lokitiedosto on iso. + + + + Clear console + Tyhjennä konsoli + + + + Welcome to the curecoin RPC console. + Tervetuloa curecoin RPC konsoliin. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Ylös- ja alas-nuolet selaavat historiaa ja <b>Ctrl-L</b> tyhjentää ruudun. + + + + Type <b>help</b> for an overview of available commands. + Kirjoita <b>help</b> nähdäksesi yleiskatsauksen käytettävissä olevista komennoista. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Lähetä curecoineja + + + + Send to multiple recipients at once + Lähetä monelle vastaanottajalle + + + + Add &Recipient + Lisää &Vastaanottaja + + + + Remove all transaction fields + Poista kaikki rahansiirtokentät + + + + Clear &All + &Tyhjennnä Kaikki + + + + Balance: + Saldo: + + + + 123.456 MEC + 123,456 MEC + + + + Confirm the send action + Vahvista lähetys + + + + S&end + &Lähetä + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send coins + Hyväksy curecoinien lähettäminen + + + + Are you sure you want to send %1? + Haluatko varmasti lähettää %1? + + + + and + ja + + + + The recipient address is not valid, please recheck. + Vastaanottajan osoite on virheellinen. Tarkista osoite. + + + + The amount to pay must be larger than 0. + Maksettavan summan tulee olla suurempi kuin 0 curecoinia. + + + + The amount exceeds your balance. + Määrä ylittää käytettävissä olevan saldon. + + + + The total exceeds your balance when the %1 transaction fee is included. + Kokonaismäärä ylittää saldosi kun %1 maksukulu lisätään summaan. + + + + 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: 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. + Virhe: Rahansiirto hylättiin. Tämä voi tapahtua jos jotkin curecoineistasi on jo käytetty, esimerkiksi jos olet käyttänyt kopiota wallet.dat-lompakkotiedostosta ja curecoinit on merkitty käytetyksi vain kopiossa. + + + + SendCoinsEntry + + + Form + Lomake + + + + A&mount: + M&äärä: + + + + Pay &To: + Maksun saaja: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + 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: + + + + 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 + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Anna curecoin-osoite (esim. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Allekirjoitukset - Allekirjoita / Varmista viesti + + + + &Sign Message + &Allekirjoita viesti + + + + 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. + Voit allekirjoittaa viestit omalla osoitteellasi todistaaksesi että omistat ne. Ole huolellinen, että et allekirjoita mitään epämääräistä, phishing-hyökkääjät voivat huijata sinua allekirjoittamaan luovuttamalla henkilöllisyytesi. Allekirjoita selvitys täysin yksityiskohtaisesti mihin olet sitoutunut. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Osoite, jolla viesti allekirjoitetaan (esimerkiksi 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Valitse osoite osoitekirjasta + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Liitä osoite leikepöydältä + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Kirjoita tähän viesti minkä haluat allekirjoittaa + + + + Signature + Allekirjoitus + + + + Copy the current signature to the system clipboard + Kopioi tämänhetkinen allekirjoitus leikepöydälle + + + + Sign the message to prove you own this curecoin address + Allekirjoita viesti todistaaksesi, että omistat tämän curecoin-osoitteen + + + + Sign &Message + Allekirjoita &viesti + + + + Reset all sign message fields + Tyhjennä kaikki allekirjoita-viesti-kentät + + + + + Clear &All + &Tyhjennä Kaikki + + + + &Verify Message + &Varmista viesti + + + + 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. + Syötä allekirjoittava osoite, viesti ja allekirjoitus alla oleviin kenttiin varmistaaksesi allekirjoituksen aitouden. Varmista että kopioit kaikki kentät täsmälleen oikein, myös rivinvaihdot, välilyönnit, tabulaattorit, jne. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Osoite, jolla viesti allekirjoitettiin (esimerkiksi 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Tarkista viestin allekirjoitus varmistaaksesi, että se allekirjoitettiin tietyllä curecoin-osoitteella + + + + Verify &Message + + + + + Reset all verify message fields + Tyhjennä kaikki varmista-viesti-kentät + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Anna curecoin-osoite (esim. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Klikkaa "Allekirjoita Viesti luodaksesi allekirjoituksen + + + + Enter curecoin signature + Syötä curecoin-allekirjoitus + + + + + The entered address is invalid. + Syötetty osoite on virheellinen. + + + + + + + Please check the address and try again. + Tarkista osoite ja yritä uudelleen. + + + + + The entered address does not refer to a key. + Syötetyn osoitteen avainta ei löydy. + + + + Wallet unlock was cancelled. + Lompakon avaaminen peruttiin. + + + + Private key for the entered address is not available. + Yksityistä avainta syötetylle osoitteelle ei ole saatavilla. + + + + Message signing failed. + Viestin allekirjoitus epäonnistui. + + + + Message signed. + Viesti allekirjoitettu. + + + + The signature could not be decoded. + Allekirjoitusta ei pystytty tulkitsemaan. + + + + + Please check the signature and try again. + Tarkista allekirjoitus ja yritä uudelleen. + + + + The signature did not match the message digest. + Allekirjoitus ei täsmää viestin tiivisteeseen. + + + + Message verification failed. + Viestin varmistus epäonnistui. + + + + Message verified. + Viesti varmistettu. + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Avoinna %1 asti + + + + %1/offline + %1/offline + + + + %1/unconfirmed + %1/vahvistamaton + + + + %1 confirmations + %1 vahvistusta + + + + Status + Tila + + + + , broadcast through %n node(s) + lähetetty %n noodin läpilähetetty %n noodin läpi + + + + Date + Päivämäärä + + + + Source + Lähde + + + + Generated + Generoitu + + + + + From + Lähettäjä + + + + + + To + Saaja + + + + + own address + oma osoite + + + + label + nimi + + + + + + + + Credit + Credit + + + + matures in %n more block(s) + kypsyy %n lohkon kuluttuakypsyy %n lohkon kuluttua + + + + not accepted + ei hyväksytty + + + + + + + Debit + Debit + + + + Transaction fee + Maksukulu + + + + Net amount + Netto määrä + + + + Message + Viesti + + + + Comment + Viesti + + + + Transaction ID + Siirtotunnus + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Generoitujen kolikoiden täytyy kypsyä 120 lohkon ajan ennen kuin ne voidaan lähettää. Kun loit tämän lohkon, se lähetettiin verkkoon lisättäväksi lohkoketjuun. Jos se ei päädy osaksi lohkoketjua, sen tila vaihtuu "ei hyväksytty" ja sitä ei voida lähettää. Näin voi joskus käydä, jos toinen noodi löytää lohkon muutamaa sekuntia ennen tai jälkeen sinun lohkosi löytymisen. + + + + Debug information + Debug tiedot + + + + Transaction + Rahansiirto + + + + Inputs + Sisääntulot + + + + Amount + Määrä + + + + true + tosi + + + + false + epätosi + + + + , has not been successfully broadcast yet + , ei ole vielä onnistuneesti lähetetty + + + + Open for %n more block(s) + + + + + unknown + tuntematon + + + + TransactionDescDialog + + + Transaction details + Rahansiirron yksityiskohdat + + + + This pane shows a detailed description of the transaction + Tämä ruutu näyttää yksityiskohtaisen tiedon rahansiirrosta + + + + TransactionTableModel + + + Date + Päivämäärä + + + + Type + Laatu + + + + Address + Osoite + + + + Amount + Määrä + + + + Open for %n more block(s) + + + + + Open until %1 + Avoinna %1 asti + + + + Offline (%1 confirmations) + Ei yhteyttä verkkoon (%1 vahvistusta) + + + + Unconfirmed (%1 of %2 confirmations) + Vahvistamatta (%1/%2 vahvistusta) + + + + Confirmed (%1 confirmations) + Vahvistettu (%1 vahvistusta) + + + + Mined balance will be available when it matures in %n more block(s) + Louhittu saldo on käytettävissä kun se kypsyy %n lohkon päästäLouhittu saldo on käytettävissä kun se kypsyy %n lohkon päästä + + + + This block was not received by any other nodes and will probably not be accepted! + Tätä lohkoa ei vastaanotettu mistään muusta solmusta ja sitä ei mahdollisesti hyväksytä! + + + + Generated but not accepted + Generoitu mutta ei hyväksytty + + + + Received with + Vastaanotettu osoitteella + + + + Received from + Vastaanotettu + + + + Sent to + Saaja + + + + Payment to yourself + Maksu itsellesi + + + + Mined + Louhittu + + + + (n/a) + (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ä. + + + + Date and time that the transaction was received. + Rahansiirron vastaanottamisen päivämäärä ja aika. + + + + Type of transaction. + Rahansiirron laatu. + + + + Destination address of transaction. + Rahansiirron kohteen curecoin-osoite + + + + Amount removed from or added to balance. + Saldoon lisätty tai siitä vähennetty määrä. + + + + TransactionView + + + + All + Kaikki + + + + Today + Tänään + + + + This week + Tällä viikolla + + + + This month + Tässä kuussa + + + + Last month + Viime kuussa + + + + This year + Tänä vuonna + + + + Range... + Alue... + + + + Received with + Vastaanotettu osoitteella + + + + Sent to + Saaja + + + + To yourself + Itsellesi + + + + Mined + Louhittu + + + + Other + Muu + + + + Enter address or label to search + Anna etsittävä osoite tai tunniste + + + + Min amount + Minimimäärä + + + + Copy address + Kopioi osoite + + + + Copy label + Kopioi nimi + + + + Copy amount + Kopioi määrä + + + + Copy transaction ID + + + + + Edit label + Muokkaa nimeä + + + + Show transaction details + Näytä rahansiirron yksityiskohdat + + + + Export Transaction Data + Vie rahansiirron tiedot + + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + + Confirmed + Vahvistettu + + + + Date + Aika + + + + Type + Laatu + + + + Label + Nimi + + + + Address + Osoite + + + + Amount + Määrä + + + + ID + ID + + + + Error exporting + Virhe tietojen viennissä + + + + Could not write to file %1. + Ei voida kirjoittaa tiedostoon %1. + + + + Range: + Alue: + + + + to + kenelle + + + + WalletModel + + + Send Coins + Lähetä curecoineja + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + Vie auki olevan välilehden tiedot tiedostoon + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + Varmuuskopio Onnistui + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + curecoinin versio + + + + Usage: + Käyttö: + + + + Send command to -server or curecoind + Lähetä käsky palvelimelle tai curecoind:lle + + + + List commands + Lista komennoista + + + + Get help for a command + Hanki apua käskyyn + + + + Options: + Asetukset: + + + + Specify configuration file (default: curecoin.conf) + Määritä asetustiedosto (oletus: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Määritä pid-tiedosto (oletus: curecoin.pid) + + + + Specify data directory + Määritä data-hakemisto + + + + Set database cache size in megabytes (default: 25) + Aseta tietokannan välimuistin koko megatavuina (oletus: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Kuuntele yhteyksiä portista <port> (oletus: 7951 tai testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Pidä enintään <n> yhteyttä verkkoihin (oletus: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Yhdistä noodiin hakeaksesi naapurien osoitteet ja katkaise yhteys + + + + Specify your own public address + Määritä julkinen osoitteesi + + + + Threshold for disconnecting misbehaving peers (default: 100) + Kynnysarvo aikakatkaisulle heikosti toimiville verkoille (oletus: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Sekuntien määrä, kuinka kauan uudelleenkytkeydytään verkkoihin (oletus: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Virhe valmisteltaessa RPC-portin %u avaamista kuunneltavaksi: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Kuuntele JSON-RPC -yhteyksiä portista <port> (oletus: 7950 or testnet: 17950) + + + + Accept command line and JSON-RPC commands + Hyväksy merkkipohjaiset- ja JSON-RPC-käskyt + + + + Run in the background as a daemon and accept commands + Aja taustalla daemonina ja hyväksy komennot + + + + Use the test network + Käytä test -verkkoa + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Hyväksy yhteyksiä ulkopuolelta (vakioasetus: 1 jos -proxy tai -connect ei määritelty) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Virhe ilmennyt asetettaessa RPC-porttia %u IPv6:n kuuntelemiseksi, palataan takaisin IPv4:ään %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Aseta suurin korkean prioriteetin / matalan palkkion siirron koko tavuissa (vakioasetus: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Varoitus: -paytxfee on asetettu erittäin korkeaksi! Tämä on maksukulu jonka tulet maksamaan kun lähetät siirron. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Varoitus: Näytetyt siirrot eivät välttämättä pidä paikkaansa! Sinun tai toisten noodien voi olla tarpeen asentaa päivitys. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Varoitus: Tarkista että tietokoneesi kellonaika ja päivämäärä ovat paikkansapitäviä! curecoin ei toimi oikein väärällä päivämäärällä ja/tai kellonajalla. + + + + 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: + Lohkon luonnin asetukset: + + + + Connect only to the specified node(s) + Yhidstä ainoastaan määrättyihin noodeihin + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + Hae oma IP osoite (vakioasetus: 1 kun kuuntelemassa ja ei -externalip) + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + Virhe avattaessa lohkoindeksiä + + + + Error: Disk space is low! + Varoitus: Levytila on vähissä! + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + Virhe: Järjestelmävirhe + + + + Failed to listen on any port. Use -listen=0 if you want this. + Ei onnistuttu kuuntelemaan missään portissa. Käytä -listen=0 jos haluat tätä. + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + Lohkon kirjoitus epäonnistui + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + Hae naapureita DNS hauilla (vakioasetus: 1 paitsi jos -connect) + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + Tuodaan lohkoja ulkoisesta blk000??.dat tiedostosta + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + Tietoa + + + + Invalid -tor address: '%s' + Virheellinen -tor osoite '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Suurin vastaanottopuskuri yksittäiselle yhteydelle, <n>*1000 tavua (vakioasetus: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Suurin lähetyspuskuri yksittäiselle yhteydelle, <n>*1000 tavua (vakioasetus: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Yhdistä vain noodeihin verkossa <net> (IPv4, IPv6 tai Tor) + + + + Output extra debugging information. Implies all other -debug* options + Tulosta enemmän debug tietoa. Aktivoi kaikki -debug* asetukset + + + + Output extra network debugging information + Tulosta lisää verkkoyhteys debug tietoa + + + + Prepend debug output with timestamp + Lisää debuggaustiedon tulostukseen aikaleima + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL asetukset (katso curecoin Wikistä tarkemmat SSL ohjeet) + + + + Select the version of socks proxy to use (4-5, default: 5) + Valitse käytettävän SOCKS-proxyn versio (4-5, vakioasetus: 5) + + + + Send trace/debug info to console instead of debug.log file + Lähetä jäljitys/debug-tieto konsoliin, debug.log-tiedoston sijaan + + + + Send trace/debug info to debugger + Lähetä jäljitys/debug-tieto debuggeriin + + + + Set maximum block size in bytes (default: 250000) + Aseta suurin lohkon koko tavuissa (vakioasetus: 250000) + + + + Set minimum block size in bytes (default: 0) + Asetan pienin lohkon koko tavuissa (vakioasetus: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Pienennä debug.log tiedosto käynnistyksen yhteydessä (vakioasetus: 1 kun ei -debug) + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Määritä yhteyden aikakataisu millisekunneissa (vakioasetus: 5000) + + + + System error: + Järjestelmävirhe: + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Käytä UPnP:tä kuunneltavan portin avaamiseen (vakioasetus: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Käytä UPnP:tä kuunneltavan portin avaamiseen (vakioasetus: 1 kun kuuntelemassa) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Käytä proxyä tor yhteyksien avaamiseen (vakioasetus: sama kuin -proxy) + + + + Username for JSON-RPC connections + Käyttäjätunnus JSON-RPC-yhteyksille + + + + Warning + Varoitus + + + + Warning: This version is obsolete, upgrade required! + Varoitus: Tämä versio on vanhentunut, päivitys tarpeen! + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Salasana JSON-RPC-yhteyksille + + + + Allow JSON-RPC connections from specified IP address + Salli JSON-RPC yhteydet tietystä ip-osoitteesta + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Lähetä käskyjä solmuun osoitteessa <ip> (oletus: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Suorita käsky kun paras lohko muuttuu (%s cmd on vaihdettu block hashin kanssa) + + + + Upgrade wallet to latest format + Päivitä lompakko uusimpaan formaattiin + + + + Set key pool size to <n> (default: 100) + Aseta avainpoolin koko arvoon <n> (oletus: 100) + + + + Rescan the block chain for missing wallet transactions + Skannaa uudelleen lohkoketju lompakon puuttuvien rahasiirtojen vuoksi + + + + Use OpenSSL (https) for JSON-RPC connections + Käytä OpenSSL:ää (https) JSON-RPC-yhteyksille + + + + Server certificate file (default: server.cert) + Palvelimen sertifikaatti-tiedosto (oletus: server.cert) + + + + Server private key (default: server.pem) + Palvelimen yksityisavain (oletus: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Hyväksyttävä salaus (oletus: +TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Tämä ohjeviesti + + + + 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) + + + + Connect through socks proxy + Yhdistä socks proxyn läpi + + + + Allow DNS lookups for -addnode, -seednode and -connect + Salli DNS kyselyt -addnode, -seednode ja -connect yhteydessä + + + + Loading addresses... + Ladataan osoitteita... + + + + Error loading wallet.dat: Wallet corrupted + Virhe ladattaessa wallet.dat-tiedostoa: Lompakko vioittunut + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Virhe ladattaessa wallet.dat-tiedostoa: Tarvitset uudemman version curecoinista + + + + Wallet needed to be rewritten: restart curecoin to complete + Lompakko tarvitsee uudelleenkirjoittaa: käynnistä curecoin uudelleen + + + + Error loading wallet.dat + Virhe ladattaessa wallet.dat-tiedostoa + + + + Invalid -proxy address: '%s' + Virheellinen proxy-osoite '%s' + + + + Unknown network specified in -onlynet: '%s' + Tuntematon verkko -onlynet parametrina: '%s' + + + + Unknown -socks proxy version requested: %i + Tuntematon -socks proxy versio pyydetty: %i + + + + Cannot resolve -bind address: '%s' + -bind osoitteen '%s' selvittäminen epäonnistui + + + + Cannot resolve -externalip address: '%s' + -externalip osoitteen '%s' selvittäminen epäonnistui + + + + Invalid amount for -paytxfee=<amount>: '%s' + -paytxfee=<amount>: '%s' on virheellinen + + + + Invalid amount + Virheellinen määrä + + + + Insufficient funds + Lompakon saldo ei riitä + + + + Loading block index... + Ladataan lohkoindeksiä... + + + + Add a node to connect to and attempt to keep the connection open + Linää solmu mihin liittyä pitääksesi yhteyden auki + + + + Unable to bind to %s on this computer. curecoin is probably already running. + Kytkeytyminen %s ei onnistu tällä tietokoneella. curecoin on todennäköisesti jo ajamassa. + + + + Fee per KB to add to transactions you send + Rahansiirtopalkkio per KB lisätään lähettämääsi rahansiirtoon + + + + Loading wallet... + Ladataan lompakkoa... + + + + Cannot downgrade wallet + Et voi päivittää lompakkoasi vanhempaan versioon + + + + Cannot write default address + Oletusosoitetta ei voi kirjoittaa + + + + Rescanning... + Skannataan uudelleen... + + + + Done loading + Lataus on valmis + + + + To use the %s option + Käytä %s optiota + + + + Error + Virhe + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Sinun täytyy asettaa rpcpassword=<password> asetustiedostoon: +%s +Jos tiedostoa ei ole, niin luo se ainoastaan omistajan kirjoitusoikeuksin. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_fr.qm b/src/qt/locale/curecoin_fr.qm new file mode 100644 index 0000000..80d5744 Binary files /dev/null and b/src/qt/locale/curecoin_fr.qm differ diff --git a/src/qt/locale/curecoin_fr.ts b/src/qt/locale/curecoin_fr.ts new file mode 100644 index 0000000..7d79de6 --- /dev/null +++ b/src/qt/locale/curecoin_fr.ts @@ -0,0 +1,2938 @@ + +UTF-8 + + AboutDialog + + + About curecoin + À propos de curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> version + + + + +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. + + Ce logiciel est en phase expérimentale. + + Distribué sous licence MIT/X11, voir le fichier COPYING ou http://www.opensource.org/licenses/mit-license.php. + + Ce produit comprend des fonctionnalités développées par le projet OpenSSL pour être utilisés dans la boîte à outils OpenSSL (http://www.openssl.org/), un logiciel cryptographique écrit par Eric Young (eay@cryptsoft.com), et des fonctionnalités développées pour le logiciel UPnP écrit par Thomas Bernard. + + + + Copyright + Droit d'auteur + + + + Dr. Kimoto Chan + Les développeurs curecoin + + + + AddressBookPage + + + Address Book + Carnet d'adresses + + + + Double-click to edit address or label + Double cliquez afin de modifier l'adresse ou l'étiquette + + + + Create a new address + Créer une nouvelle adresse + + + + Copy the currently selected address to the system clipboard + Copier l'adresse sélectionnée dans le presse-papiers + + + + &New Address + &Nouvelle adresse + + + + These are your curecoin 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. + Voici vos adresses curecoin qui vous permettent de recevoir des paiements. Vous pouvez donner une adresse différente à chaque expéditeur afin de savoir qui vous paye. + + + + &Copy Address + &Copier l'adresse + + + + Show &QR Code + Afficher le &QR Code + + + + Sign a message to prove you own a curecoin address + Signer un message pour prouver que vous détenez une adresse curecoin + + + + Sign &Message + Signer un &message + + + + Delete the currently selected address from the list + Effacer l'adresse actuellement sélectionnée de la liste + + + + Export the data in the current tab to a file + Exporter les données de l'onglet courant vers un fichier + + + + &Export + &Exporter + + + + Verify a message to ensure it was signed with a specified curecoin address + Vérifier un message pour vous assurer qu'il a bien été signé avec l'adresse curecoin spécifiée + + + + &Verify Message + &Vérifier un message + + + + &Delete + &Supprimer + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Ce sont vos adresses curecoin pour émettre des paiements. Vérifiez toujours le montant et l'adresse du destinataire avant d'envoyer des pièces. + + + + Copy &Label + Copier l'é&tiquette + + + + &Edit + &Éditer + + + + Send &Coins + Envoyer des Bit&coins + + + + Export Address Book Data + Exporter les données du carnet d'adresses + + + + Comma separated file (*.csv) + Valeurs séparées par des virgules (*.csv) + + + + Error exporting + Erreur lors de l'exportation + + + + Could not write to file %1. + Impossible d'écrire dans le fichier %1. + + + + AddressTableModel + + + Label + Étiquette + + + + Address + Adresse + + + + (no label) + (aucune étiquette) + + + + AskPassphraseDialog + + + Passphrase Dialog + Dialogue de phrase de passe + + + + Enter passphrase + Entrez la phrase de passe + + + + New passphrase + Nouvelle phrase de passe + + + + Repeat new passphrase + Répétez la phrase de passe + + + + 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>. + Entrez une nouvelle phrase de passe pour le porte-monnaie.<br/>Veuillez utiliser une phrase composée de <b>10 caractères aléatoires ou plus</b>, ou bien de <b>huit mots ou plus</b>. + + + + Encrypt wallet + Chiffrer le porte-monnaie + + + + This operation needs your wallet passphrase to unlock the wallet. + Cette opération nécessite votre phrase de passe pour déverrouiller le porte-monnaie. + + + + Unlock wallet + Déverrouiller le porte-monnaie + + + + This operation needs your wallet passphrase to decrypt the wallet. + Cette opération nécessite votre phrase de passe pour décrypter le porte-monnaie. + + + + Decrypt wallet + Déchiffrer le porte-monnaie + + + + Change passphrase + Changer la phrase de passe + + + + Enter the old and new passphrase to the wallet. + Entrez l’ancienne phrase de passe pour le porte-monnaie ainsi que la nouvelle. + + + + Confirm wallet encryption + Confirmer le chiffrement du porte-monnaie + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Attention : Si vous chiffrez votre porte-monnaie et perdez votre phrase de passe, vous <b>PERDREZ ACCÈS À TOUS VOS curecoinS</b> ! + + + + Are you sure you wish to encrypt your wallet? + Êtes-vous sûr de vouloir chiffrer votre porte-monnaie ? + + + + 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 : Les sauvegardes précédentes de votre fichier de porte-monnaie devraient être remplacées par le nouveau fichier crypté de porte-monnaie. Pour des raisons de sécurité, les précédentes sauvegardes de votre fichier de porte-monnaie non chiffré deviendront inutilisables dès que vous commencerez à utiliser le nouveau porte-monnaie chiffré. + + + + + Warning: The Caps Lock key is on! + Attention : la touche Verr. Maj. est activée ! + + + + + Wallet encrypted + Porte-monnaie chiffré + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin va à présent se fermer pour terminer la procédure de cryptage. N'oubliez pas que le chiffrement de votre porte-monnaie ne peut pas fournir une protection totale contre le vol par des logiciels malveillants qui infecteraient votre ordinateur. + + + + + + + Wallet encryption failed + Le chiffrement du porte-monnaie a échoué + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Le chiffrement du porte-monnaie a échoué en raison d'une erreur interne. Votre porte-monnaie n'a pas été chiffré. + + + + + The supplied passphrases do not match. + Les phrases de passe entrées ne correspondent pas. + + + + Wallet unlock failed + Le déverrouillage du porte-monnaie a échoué + + + + + + The passphrase entered for the wallet decryption was incorrect. + La phrase de passe entrée pour décrypter le porte-monnaie était incorrecte. + + + + Wallet decryption failed + Le déchiffrage du porte-monnaie a échoué + + + + Wallet passphrase was successfully changed. + La phrase de passe du porte-monnaie a été modifiée avec succès. + + + + curecoinGUI + + + Sign &message... + Signer un &message... + + + + Synchronizing with network... + Synchronisation avec le réseau… + + + + &Overview + &Vue d'ensemble + + + + Show general overview of wallet + Afficher une vue d’ensemble du porte-monnaie + + + + &Transactions + &Transactions + + + + Browse transaction history + Parcourir l'historique des transactions + + + + Edit the list of stored addresses and labels + Éditer la liste des adresses et des étiquettes stockées + + + + Show the list of addresses for receiving payments + Afficher la liste des adresses pour recevoir des paiements + + + + E&xit + Q&uitter + + + + Quit application + Quitter l’application + + + + Show information about curecoin + Afficher des informations à propos de curecoin + + + + About &Qt + À propos de &Qt + + + + Show information about Qt + Afficher des informations sur Qt + + + + &Options... + &Options… + + + + &Encrypt Wallet... + &Chiffrer le porte-monnaie... + + + + &Backup Wallet... + &Sauvegarder le porte-monnaie... + + + + &Change Passphrase... + &Modifier la phrase de passe... + + + + Importing blocks from disk... + Importation des blocs depuis le disque... + + + + Reindexing blocks on disk... + Réindexation des blocs sur le disque... + + + + Send coins to a curecoin address + Envoyer des pièces à une adresse curecoin + + + + Modify configuration options for curecoin + Modifier les options de configuration de curecoin + + + + Backup wallet to another location + Sauvegarder le porte-monnaie à un autre emplacement + + + + Change the passphrase used for wallet encryption + Modifier la phrase de passe utilisée pour le chiffrement du porte-monnaie + + + + &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... + + + + + curecoin + curecoin + + + + Wallet + Porte-monnaie + + + + &Send + &Envoyer + + + + &Receive + &Recevoir + + + + &Addresses + &Adresses + + + + &About curecoin + À &propos de curecoin + + + + &Show / Hide + &Afficher / Cacher + + + + Show or hide the main Window + Afficher ou masquer la fenêtre principale + + + + Encrypt the private keys that belong to your wallet + Crypter les clefs privées de votre porte-monnaie + + + + Sign messages with your curecoin addresses to prove you own them + Signer les messages avec vos adresses curecoin pour prouver que vous les détenez + + + + Verify messages to ensure they were signed with specified curecoin addresses + Vérifier les messages pour vous assurer qu'ils ont bien été signés avec les adresses curecoin spécifiées + + + + &File + &Fichier + + + + &Settings + &Réglages + + + + &Help + &Aide + + + + Tabs toolbar + Barre d'outils des onglets + + + + + [testnet] + [testnet] + + + + curecoin client + Client curecoin + + + + %n active connection(s) to curecoin network + %n connexion active avec le réseau curecoin%n connexions actives avec le réseau curecoin + + + + No block source available... + Aucune source de bloc disponible... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + %1 blocs sur %2 (estimés) de l'historique des transactions traités. + + + + Processed %1 blocks of transaction history. + %1 blocs de l'historique des transactions traités. + + + + %n hour(s) + %n heure%n heures + + + + %n day(s) + %n jour%n jours + + + + %n week(s) + %n semaine%n semaines + + + + %1 behind + %1 en arrière + + + + Last received block was generated %1 ago. + Le dernier bloc reçu avait été généré il y a %1. + + + + Transactions after this will not yet be visible. + Les transactions après cela ne seront pas encore visibles. + + + + Error + Erreur + + + + Warning + Avertissement + + + + Information + Information + + + + 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 de taille. Vous pouvez quand même l'envoyer en vous acquittant de frais d'un montant de %1 qui iront aux nœuds qui traiteront la transaction et aideront à soutenir le réseau. Voulez-vous payer les frais ? + + + + Up to date + À jour + + + + Catching up... + Rattrapage… + + + + Confirm transaction fee + Confirmer les 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 + Gestion des URI + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + L'URI ne peut être analysé ! Cela peut être causé par une adresse curecoin invalide ou par des paramètres d'URI malformés. + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Le porte-monnaie est <b>chiffré</b> et est actuellement <b>déverrouillé</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Le porte-monnaie est <b>chiffré</b> et est actuellement <b>verrouillé</b> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Une erreur fatale est survenue. curecoin ne peut plus continuer à fonctionner de façon sûre et va s'arrêter. + + + + ClientModel + + + Network Alert + Alerte réseau + + + + EditAddressDialog + + + Edit Address + Éditer l'adresse + + + + &Label + &Étiquette + + + + The label associated with this address book entry + L’étiquette associée à cette entrée du carnet d'adresses + + + + &Address + &Adresse + + + + The address associated with this address book entry. This can only be modified for sending addresses. + L’adresse associée avec cette entrée du carnet d'adresses. Ne peut être modifiées que les adresses d’envoi. + + + + New receiving address + Nouvelle adresse de réception + + + + New sending address + Nouvelle adresse d’envoi + + + + Edit receiving address + Éditer l’adresse de réception + + + + Edit sending address + Éditer l’adresse d'envoi + + + + 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 curecoin address. + L'adresse fournie « %1 » n'est pas une adresse curecoin valide. + + + + Could not unlock wallet. + Impossible de déverrouiller le porte-monnaie. + + + + New key generation failed. + Échec de la génération de la nouvelle clef. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + version + + + + Usage: + Utilisation : + + + + command-line options + options de ligne de commande + + + + UI options + Options Interface Utilisateur + + + + Set language, for example "de_DE" (default: system locale) + Définir la langue, par exemple « de_DE » (par défaut : la langue du système) + + + + Start minimized + Démarrer sous forme minimisée + + + + Show splash screen on startup (default: 1) + Afficher l'écran d'accueil au démarrage (par défaut : 1) + + + + OptionsDialog + + + Options + Options + + + + &Main + Réglages &principaux + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Frais de transaction optionnel par ko qui aident à garantir un traitement rapide des transactions. La plupart des transactions utilisent 1 ko. + + + + Pay transaction &fee + Payer des &frais de transaction + + + + Automatically start curecoin after logging in to the system. + Démarrer curecoin automatiquement lors de l'ouverture une session sur l'ordinateur. + + + + &Start curecoin on system login + &Démarrer curecoin lors de l'ouverture d'une session + + + + Reset all client options to default. + Remettre toutes les options du client aux valeurs par défaut. + + + + &Reset Options + &Remise à zéro des options + + + + &Network + &Réseau + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Ouvrir le port du client curecoin automatiquement sur le routeur. Cela ne fonctionne que si votre routeur supporte l'UPnP et si la fonctionnalité est activée. + + + + Map port using &UPnP + Ouvrir le port avec l'&UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Connexion au réseau curecoin à travers un proxy SOCKS (par ex. lors d'une connexion via Tor). + + + + &Connect through SOCKS proxy: + &Connexion à travers un proxy SOCKS : + + + + Proxy &IP: + &IP du proxy : + + + + IP address of the proxy (e.g. 127.0.0.1) + Adresse IP du proxy (par ex. 127.0.0.1) + + + + &Port: + &Port : + + + + Port of the proxy (e.g. 9050) + Port du proxy (par ex. 9050) + + + + SOCKS &Version: + &Version SOCKS : + + + + SOCKS version of the proxy (e.g. 5) + Version SOCKS du serveur mandataire (par ex. 5) + + + + &Window + &Fenêtre + + + + Show only a tray icon after minimizing the window. + Afficher uniquement une icône système après minimisation. + + + + &Minimize to the tray instead of the taskbar + &Minimiser dans la barre système au lieu de la barre des tâches + + + + 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. + Minimiser au lieu quitter l'application lorsque la fenêtre est fermée. Lorsque cette option est activée, l'application ne pourra être fermée qu'en sélectionnant Quitter dans le menu déroulant. + + + + M&inimize on close + M&inimiser lors de la fermeture + + + + &Display + &Affichage + + + + User Interface &language: + &Langue de l'interface utilisateur : + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + La langue de l'interface utilisateur peut être définie ici. Ce réglage sera pris en compte après redémarrage de curecoin. + + + + &Unit to show amounts in: + &Unité d'affichage des montants : + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Choisissez la sous-unité par défaut pour l'affichage dans l'interface et lors de l'envoi de pièces. + + + + Whether to show curecoin addresses in the transaction list or not. + Détermine si les adresses curecoin seront affichées sur la liste des transactions. + + + + &Display addresses in transaction list + &Afficher les adresses sur la liste des transactions + + + + &OK + &Valider + + + + &Cancel + A&nnuler + + + + &Apply + &Appliquer + + + + default + par défaut + + + + Confirm options reset + Confirmer la remise à zéro des options + + + + Some settings may require a client restart to take effect. + La prise en compte de certains réglages peut nécessiter un redémarrage du client. + + + + Do you want to proceed? + Voulez-vous continuer ? + + + + + Warning + Avertissement + + + + + This setting will take effect after restarting curecoin. + Ce réglage sera pris en compte après un redémarrage de curecoin. + + + + The supplied proxy address is invalid. + L'adresse de proxy fournie est invalide. + + + + OverviewPage + + + Form + Formulaire + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Les informations affichées peuvent être obsolètes. Votre porte-monnaie est automatiquement synchronisé avec le réseau curecoin lorsque la connexion s'établit, or ce processus n'est pas encore terminé. + + + + Balance: + Solde : + + + + Unconfirmed: + Non confirmé : + + + + Wallet + Porte-monnaie + + + + Immature: + Immature : + + + + Mined balance that has not yet matured + Le solde généré n'est pas encore mûr + + + + <b>Recent transactions</b> + <b>Transactions récentes</b> + + + + Your current balance + Votre solde actuel + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Total des transactions qui doivent encore être confirmées et qui ne sont pas prises en compte dans le solde actuel + + + + + out of sync + désynchronisé + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + Impossible de démarrer curecoin : gestionnaire de cliquer-pour-payer + + + + QRCodeDialog + + + QR Code Dialog + Dialogue de QR Code + + + + Request Payment + Demande de paiement + + + + Amount: + Montant : + + + + Label: + Étiquette : + + + + Message: + Message : + + + + &Save As... + &Enregistrer sous... + + + + Error encoding URI into QR Code. + Erreur de l'encodage de l'URI dans le QR Code. + + + + The entered amount is invalid, please check. + Le montant entré est invalide, veuillez le vérifier. + + + + Resulting URI too long, try to reduce the text for label / message. + L'URI résultant est trop long, essayez avec un texte d'étiquette ou de message plus court. + + + + Save QR Code + Sauvegarder le QR Code + + + + PNG Images (*.png) + Images PNG (*.png) + + + + RPCConsole + + + Client name + Nom du client + + + + + + + + + + + + + N/A + Indisponible + + + + Client version + Version du client + + + + &Information + &Informations + + + + Using OpenSSL version + Version d'OpenSSL utilisée + + + + Startup time + Date de démarrage + + + + Network + Réseau + + + + Number of connections + Nombre de connexions + + + + On testnet + Sur testnet + + + + Block chain + Chaîne de blocs + + + + Current number of blocks + Nombre actuel de blocs + + + + Estimated total blocks + Nombre total estimé de blocs + + + + Last block time + Horodatage du dernier bloc + + + + &Open + &Ouvrir + + + + Command-line options + Options de ligne de commande + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Afficher le message d'aide de curecoin-Qt pour obtenir la liste des options de ligne de commande disponibles pour curecoin. + + + + &Show + &Afficher + + + + &Console + &Console + + + + Build date + Date de compilation + + + + curecoin - Debug window + curecoin - Fenêtre de débogage + + + + curecoin Core + Noyau curecoin + + + + Debug log file + Journal de débogage + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Ouvrir le journal de débogage de curecoin depuis le répertoire de données actuel. Cela peut prendre quelques secondes pour les journaux de grande taille. + + + + Clear console + Nettoyer la console + + + + Welcome to the curecoin RPC console. + Bienvenue sur la console RPC de curecoin. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Utilisez les touches de curseur pour naviguer dans l'historique et <b>Ctrl-L</b> pour effacer l'écran. + + + + Type <b>help</b> for an overview of available commands. + Tapez <b>help</b> pour afficher une vue générale des commandes disponibles. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Envoyer des pièces + + + + Send to multiple recipients at once + Envoyer des pièces à plusieurs destinataires à la fois + + + + Add &Recipient + Ajouter un &destinataire + + + + Remove all transaction fields + Enlever tous les champs de transaction + + + + Clear &All + &Tout nettoyer + + + + Balance: + Solde : + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Confirmer l’action d'envoi + + + + S&end + E&nvoyer + + + + <b>%1</b> to %2 (%3) + <b>%1</b> à %2 (%3) + + + + Confirm send coins + Confirmer l’envoi des pièces + + + + Are you sure you want to send %1? + Êtes-vous sûr de vouloir envoyer %1 ? + + + + and + et + + + + The recipient address is not valid, please recheck. + Cette adresse de destinataire n’est pas valide, veuillez la vérifier. + + + + The amount to pay must be larger than 0. + Le montant à payer doit être supérieur à 0. + + + + The amount exceeds your balance. + Le montant dépasse votre solde. + + + + The total exceeds your balance when the %1 transaction fee is included. + Le montant dépasse votre solde lorsque les frais de transaction de %1 sont inclus. + + + + Duplicate address found, can only send to each address once per send operation. + Adresse dupliquée trouvée, il n'est possible d'envoyer qu'une fois à chaque adresse par opération d'envoi. + + + + Error: Transaction creation failed! + Erreur : Échec de la création de la transaction ! + + + + 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 arriver si certaines pièces de votre porte-monnaie ont déjà été dépensées, par exemple si vous avez utilisé une copie de wallet.dat avec laquelle les pièces ont été dépensées mais pas marquées comme telles ici. + + + + SendCoinsEntry + + + Form + Formulaire + + + + A&mount: + &Montant : + + + + Pay &To: + Payer &à : + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + L'adresse à laquelle le paiement sera envoyé (par ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Enter a label for this address to add it to your address book + Entrez une étiquette pour cette adresse afin de l’ajouter à votre carnet d’adresses + + + + &Label: + &Étiquette : + + + + Choose address from address book + Choisir une adresse dans le carnet d'adresses + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Coller une adresse depuis le presse-papiers + + + + Alt+P + Alt+P + + + + Remove this recipient + Enlever ce destinataire + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Entrez une adresse curecoin (par ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Signatures - Signer / Vérifier un message + + + + &Sign Message + &Signer un 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. + Vous pouvez signer des messages avec vos adresses pour prouver que les détenez. Faites attention à ne pas signer quoi que ce soit de vague car des attaques d'hameçonnage peuvent essayer d'usurper votre identité par votre signature. Ne signez que des déclarations entièrement détaillées et avec lesquelles vous serez d'accord. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + L'adresse avec laquelle le message sera signé (par ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Choisir une adresse depuis le carnet d'adresses + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Coller une adresse depuis le presse-papiers + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Entrez ici le message que vous désirez signer + + + + Signature + Signature + + + + Copy the current signature to the system clipboard + Copier la signature actuelle dans le presse-papiers + + + + Sign the message to prove you own this curecoin address + Signer le message pour prouver que vous détenez cette adresse curecoin + + + + Sign &Message + Signer le &message + + + + Reset all sign message fields + Remettre à zéro tous les champs de signature de message + + + + + Clear &All + &Tout nettoyer + + + + &Verify Message + &Vérifier un 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. + Entrez ci-dessous l'adresse ayant servi à signer, le message (assurez-vous d'avoir copié exactement les retours à la ligne, les espacements, tabulations etc.) et la signature pour vérifier le message. Faites attention à ne pas déduire davantage de la signature que ce qui est contenu dans le message signé lui-même pour éviter d'être trompé par une attaque d'homme du milieu. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + L'adresse avec laquelle le message a été signé (par ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Vérifier le message pour vous assurer qu'il a bien été signé par l'adresse curecoin spécifiée + + + + Verify &Message + Vérifier un &message + + + + Reset all verify message fields + Remettre à zéro tous les champs de vérification de message + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Entrez une adresse curecoin (par ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Cliquez sur « Signer le message » pour générer la signature + + + + Enter curecoin signature + Entrer une signature curecoin + + + + + The entered address is invalid. + L'adresse entrée est invalide. + + + + + + + Please check the address and try again. + Veuillez vérifier l'adresse et réessayez. + + + + + The entered address does not refer to a key. + L'adresse entrée ne fait pas référence à une clef. + + + + Wallet unlock was cancelled. + Le déverrouillage du porte-monnaie a été annulé. + + + + Private key for the entered address is not available. + La clef privée pour l'adresse indiquée n'est pas disponible. + + + + Message signing failed. + La signature du message a échoué. + + + + Message signed. + Le message a été signé. + + + + The signature could not be decoded. + La signature n'a pu être décodée. + + + + + Please check the signature and try again. + Veuillez vérifier la signature et réessayez. + + + + The signature did not match the message digest. + La signature ne correspond pas au hachage du message. + + + + Message verification failed. + Échec de la vérification du message. + + + + Message verified. + Message vérifié. + + + + SplashScreen + + + Dr. Kimoto Chan + Les développeurs curecoin + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Ouvert jusqu'à %1 + + + + %1/offline + %1/hors ligne + + + + %1/unconfirmed + %1/non confirmée + + + + %1 confirmations + %1 confirmations + + + + Status + État + + + + , broadcast through %n node(s) + , diffusée à travers %n nœud, diffusée à travers %n nœuds + + + + Date + Date + + + + Source + Source + + + + Generated + Génération + + + + + From + De + + + + + + To + À + + + + + own address + votre propre adresse + + + + label + étiquette + + + + + + + + Credit + Crédit + + + + matures in %n more block(s) + arrive à maturité dans %n blocarrive à maturité dans %n blocs de plus + + + + not accepted + non accepté + + + + + + + Debit + Débit + + + + Transaction fee + Frais de transaction + + + + Net amount + Montant net + + + + Message + Message + + + + Comment + Commentaire + + + + Transaction ID + ID de la transaction + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Les pièces générées doivent mûrir pendant 120 blocs avant de pouvoir être dépensées. Lorsque vous avez généré ce bloc, il a été diffusé sur le réseau pour être ajouté à la chaîne de blocs. S’il échoue a intégrer la chaîne, son état sera modifié en « non accepté » et il ne sera pas possible de le dépenser. Cela peut arriver occasionnellement si un autre nœud génère un bloc quelques secondes avant ou après vous. + + + + Debug information + Informations de débogage + + + + Transaction + Transaction + + + + Inputs + Entrées + + + + Amount + Montant + + + + true + vrai + + + + false + faux + + + + , has not been successfully broadcast yet + , n’a pas encore été diffusée avec succès + + + + Open for %n more block(s) + Ouvert pour %n bloc de plusOuvert pour %n blocs de plus + + + + unknown + inconnu + + + + TransactionDescDialog + + + Transaction details + Détails de la transaction + + + + This pane shows a detailed description of the transaction + Ce panneau affiche une description détaillée de la transaction + + + + TransactionTableModel + + + Date + Date + + + + Type + Type + + + + Address + Adresse + + + + Amount + Montant + + + + Open for %n more block(s) + Ouvert pour %n bloc de plusOuvert pour %n blocs de plus + + + + Open until %1 + Ouvert jusqu'à %1 + + + + Offline (%1 confirmations) + Hors ligne (%1 confirmations) + + + + Unconfirmed (%1 of %2 confirmations) + Non confirmée (%1 confirmations sur un total de %2) + + + + Confirmed (%1 confirmations) + Confirmée (%1 confirmations) + + + + Mined balance will be available when it matures in %n more block(s) + Le solde généré (mined) sera disponible quand il aura mûri dans %n blocLe solde généré (mined) sera disponible quand il aura mûri dans %n blocs + + + + This block was not received by any other nodes and will probably not be accepted! + Ce bloc n’a été reçu par aucun autre nœud et ne sera probablement pas accepté ! + + + + Generated but not accepted + Généré mais pas accepté + + + + Received with + Reçue avec + + + + Received from + Reçue de + + + + Sent to + Envoyée à + + + + Payment to yourself + Paiement à vous-même + + + + Mined + Extraction + + + + (n/a) + (indisponible) + + + + 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. + + + + Date and time that the transaction was received. + Date et heure de réception de la transaction. + + + + Type of transaction. + Type de transaction. + + + + Destination address of transaction. + L’adresse de destination de la transaction. + + + + Amount removed from or added to balance. + Montant ajouté au, ou enlevé du, solde. + + + + TransactionView + + + + All + Toutes + + + + Today + Aujourd’hui + + + + This week + Cette semaine + + + + This month + Ce mois-ci + + + + Last month + Mois dernier + + + + This year + Cette année + + + + Range... + Intervalle… + + + + Received with + Reçues avec + + + + Sent to + Envoyées à + + + + To yourself + À vous-même + + + + Mined + Extraction + + + + Other + Autres + + + + Enter address or label to search + Entrez une adresse ou une étiquette à rechercher + + + + Min amount + Montant min + + + + Copy address + Copier l’adresse + + + + Copy label + Copier l’étiquette + + + + Copy amount + Copier le montant + + + + Copy transaction ID + Copier l'ID de la transaction + + + + Edit label + Éditer l’étiquette + + + + Show transaction details + Afficher les détails de la transaction + + + + Export Transaction Data + Exporter les données des transactions + + + + Comma separated file (*.csv) + Valeurs séparées par des virgules (*.csv) + + + + Confirmed + Confirmée + + + + Date + Date + + + + Type + Type + + + + Label + Étiquette + + + + Address + Adresse + + + + Amount + Montant + + + + ID + ID + + + + Error exporting + Erreur lors de l’exportation + + + + Could not write to file %1. + Impossible d'écrire dans le fichier %1. + + + + Range: + Intervalle : + + + + to + à + + + + WalletModel + + + Send Coins + Envoyer des pièces + + + + WalletView + + + &Export + &Exporter + + + + Export the data in the current tab to a file + Exporter les données de l'onglet courant vers un fichier + + + + Backup Wallet + Sauvegarder le porte-monnaie + + + + Wallet Data (*.dat) + Données de porte-monnaie (*.dat) + + + + Backup Failed + Échec de la sauvegarde + + + + There was an error trying to save the wallet data to the new location. + Une erreur est survenue lors de l'enregistrement des données de porte-monnaie à un nouvel endroit + + + + Backup Successful + Sauvegarde réussie + + + + The wallet data was successfully saved to the new location. + Les données de porte-monnaie ont été enregistrées avec succès sur le nouvel emplacement. + + + + curecoin-core + + + curecoin version + Version de curecoin + + + + Usage: + Utilisation : + + + + Send command to -server or curecoind + Envoyer une commande à -server ou à curecoind + + + + List commands + Lister les commandes + + + + Get help for a command + Obtenir de l’aide pour une commande + + + + Options: + Options : + + + + Specify configuration file (default: curecoin.conf) + Spécifier le fichier de configuration (par défaut : curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Spécifier le fichier PID (par défaut : curecoind.pid) + + + + Specify data directory + Spécifier le répertoire de données + + + + Set database cache size in megabytes (default: 25) + Définir la taille du tampon en mégaoctets (par défaut : 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Écouter les connexions sur le <port> (par défaut : 7951 ou testnet : 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Garder au plus <n> connexions avec les pairs (par défaut : 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Se connecter à un nœud pour obtenir des adresses de pairs puis se déconnecter + + + + Specify your own public address + Spécifier votre propre adresse publique + + + + Threshold for disconnecting misbehaving peers (default: 100) + Seuil de déconnexion des pairs de mauvaise qualité (par défaut : 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Délai en secondes de refus de reconnexion aux pairs de mauvaise qualité (par défaut : 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Une erreur est survenue lors de la mise en place du port RPC %u pour écouter sur IPv4 : %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Écouter les connexions JSON-RPC sur le <port> (par défaut : 7950 ou tesnet : 17950) + + + + Accept command line and JSON-RPC commands + Accepter les commandes de JSON-RPC et de la ligne de commande + + + + Run in the background as a daemon and accept commands + Fonctionner en arrière-plan en tant que démon et accepter les commandes + + + + Use the test network + Utiliser le réseau de test + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Accepter les connexions entrantes (par défaut : 1 si -proxy ou -connect ne sont pas présents) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, vous devez définir un mot de passe rpc dans le fichier de configuration : +%s +Il vous est conseillé d'utiliser le mot de passe aléatoire suivant : +rpcuser=curecoinrpc +rpcpassword=%s +(vous n'avez pas besoin de retenir ce mot de passe) +Le nom d'utilisateur et le mot de passe NE DOIVENT PAS être identiques. +Si le fichier n'existe pas, créez-le avec les droits de lecture accordés au propriétaire. +Il est aussi conseillé de régler alertnotify pour être prévenu des problèmes ; +par exemple : alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Une erreur est survenue lors de la mise en place du port RPC %u pour écouter sur IPv6, retour à IPv4 : %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Se lier à l'adresse donnée et toujours l'écouter. Utilisez la notation [host]:port pour l'IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Impossible d’obtenir un verrou sur le répertoire de données %s. curecoin fonctionne probablement déjà. + + + + 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 arriver si certaines pièces de votre porte-monnaie étaient déjà dépensées, par exemple si vous avez utilisé une copie de wallet.dat et les pièces ont été dépensées avec cette copie sans être marquées comme telles ici. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Erreur : cette transaction nécessite des frais de transaction d'au moins %s en raison de son montant, de sa complexité ou parce que des fonds reçus récemment sont utilisés ! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Exécuter une commande lorsqu'une alerte correspondante est reçue (%s dans la commande sera remplacé par le message) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Exécuter la commande lorsqu'une transaction de porte-monnaie change (%s dans la commande est remplacée par TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Définir la taille maximale en octets des transactions prioritaires/à frais modiques (par défaut : 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Ceci est une pré-version de test - utilisez à vos risques et périls - ne l'utilisez pas pour miner ou pour des applications marchandes + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Attention : -paytxfee est réglée sur un montant très élevé ! Il s'agit des frais de transaction que vous payerez si vous émettez une transaction. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Avertissement : les transactions affichées pourraient être incorrectes ! Vous ou d'autres nœuds du réseau pourriez avoir besoin d'effectuer une mise à jour. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Attention : veuillez vérifier que l'heure et la date de votre ordinateur sont correctes ! Si votre horloge n'est pas à l'heure, curecoin ne fonctionnera pas correctement. + + + + 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 pourraient être incorrectes ou manquantes. + + + + 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. + Avertissement : wallet.dat corrompu, données récupérées ! Le fichier wallet.dat original a été enregistré en tant que wallet.{horodatage}.bak dans %s ; si votre solde ou transactions sont incorrects vous devriez effectuer une restauration depuis une sauvegarde. + + + + Attempt to recover private keys from a corrupt wallet.dat + Tenter de récupérer les clefs privées d'un wallet.dat corrompu + + + + Block creation options: + Options de création des blocs : + + + + Connect only to the specified node(s) + Ne se connecter qu'au(x) nœud(s) spécifié(s) + + + + Corrupted block database detected + Base de données des blocs corrompue détectée + + + + Discover own IP address (default: 1 when listening and no -externalip) + Découvrir sa propre adresse IP (par défaut : 1 lors de l'écoute et si -externalip n'est pas présent) + + + + Do you want to rebuild the block database now? + Voulez-vous reconstruire la base de données des blocs maintenant ? + + + + Error initializing block database + Erreur lors de l'initialisation de la base de données des blocs + + + + Error initializing wallet database environment %s! + Erreur lors de l'initialisation de l'environnement de la base de données du porte-monnaie %s ! + + + + Error loading block database + Erreur du chargement de la base de données des blocs + + + + Error opening block database + Erreur lors de l'ouverture de la base de données + + + + Error: Disk space is low! + Erreur : l'espace disque est faible ! + + + + Error: Wallet locked, unable to create transaction! + Erreur : Porte-monnaie verrouillé, impossible de créer la transaction ! + + + + Error: system error: + Erreur : erreur système : + + + + Failed to listen on any port. Use -listen=0 if you want this. + Échec de l'écoute sur un port quelconque. Utilisez -listen=0 si vous voulez cela. + + + + Failed to read block info + La lecture des informations de bloc a échoué + + + + Failed to read block + La lecture du bloc a échoué + + + + Failed to sync block index + La synchronisation de l'index des blocs a échoué + + + + Failed to write block index + L''écriture de l'index des blocs a échoué + + + + Failed to write block info + L'écriture des informations du bloc a échoué + + + + Failed to write block + L'écriture du bloc a échoué + + + + Failed to write file info + L'écriture des informations de fichier a échoué + + + + Failed to write to coin database + L'écriture dans la base de données des pièces a échoué + + + + Failed to write transaction index + L'écriture de l'index des transactions a échoué + + + + Failed to write undo data + L'écriture des données d'annulation a échoué + + + + Find peers using DNS lookup (default: 1 unless -connect) + Trouver des pairs en utilisant la recherche DNS (par défaut : 1 sauf si -connect est utilisé) + + + + Generate coins (default: 0) + Générer des pièces (défaut: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Nombre de blocs à vérifier au démarrage (par défaut : 288, 0 = tout) + + + + How thorough the block verification is (0-4, default: 3) + Niveau d'approfondissement de la vérification des blocs (0-4, par défaut : 3) + + + + Not enough file descriptors available. + Pas assez de descripteurs de fichiers disponibles. + + + + Rebuild block chain index from current blk000??.dat files + Reconstruire l'index de la chaîne des blocs à partir des fichiers blk000??.dat actuels + + + + Set the number of threads to service RPC calls (default: 4) + Définir le nombre d'exétrons pour desservir les appels RPC (par défaut : 4) + + + + Verifying blocks... + Vérification des blocs... + + + + Verifying wallet... + Vérification du porte-monnaie... + + + + Imports blocks from external blk000??.dat file + Importe des blocs depuis un fichier blk000??.dat externe + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Définir le nombre de fils d’exécution pour la vérification des scripts (maximum 16, 0 = auto, < 0 = laisser ce nombre de cœurs libres, par défaut : 0) + + + + Information + Informations + + + + Invalid -tor address: '%s' + Adresse -tor invalide : « %s » + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + Montant invalide pour -minrelayfee=<montant> : « %s » + + + + Invalid amount for -mintxfee=<amount>: '%s' + Montant invalide pour -mintxfee=<montant> : « %s » + + + + Maintain a full transaction index (default: 0) + Maintenir un index complet des transactions (par défaut : 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Tampon maximal de réception par -connection, <n>*1000 octets (par défaut : 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Tampon maximal d'envoi par connexion, <n>*1000 octets (par défaut : 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + N'accepter que la chaîne de blocs correspondant aux points de vérification internes (par défaut : 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Se connecter uniquement aux nœuds du réseau <net> (IPv4, IPv6 ou Tor) + + + + Output extra debugging information. Implies all other -debug* options + Afficher des information de débogage supplémentaires. Cela signifie toutes les autres options -debug* + + + + Output extra network debugging information + Afficher des informations de débogage réseau supplémentaires + + + + Prepend debug output with timestamp + Faire précéder les données de débogage par un horodatage + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Options SSL : (cf. le wiki de curecoin pour les instructions de configuration du SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + Sélectionner la version du proxy socks à utiliser (4-5, 5 étant la valeur par défaut) + + + + Send trace/debug info to console instead of debug.log file + Envoyer les informations de débogage/trace à la console au lieu du fichier debug.log + + + + Send trace/debug info to debugger + Envoyer les informations de débogage/trace au débogueur + + + + Set maximum block size in bytes (default: 250000) + Définir la taille maximale des blocs en octets (par défaut : 250000) + + + + Set minimum block size in bytes (default: 0) + Définir la taille minimale des blocs en octets (par défaut : 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Réduire le fichier debug.log lors du démarrage du client (par défaut : 1 lorsque -debug n'est pas présent) + + + + Signing transaction failed + La signature de la transaction a échoué + + + + Specify connection timeout in milliseconds (default: 5000) + Spécifier le délai d'expiration de la connexion en millisecondes (par défaut : 5000) + + + + System error: + Erreur système : + + + + Transaction amount too small + Montant de la transaction trop bas + + + + Transaction amounts must be positive + Les montants de la transaction doivent être positifs + + + + Transaction too large + Transaction trop volumineuse + + + + Use UPnP to map the listening port (default: 0) + Utiliser l'UPnP pour rediriger le port d'écoute (par défaut : 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Utiliser l'UPnP pour rediriger le port d'écoute (par défaut : 1 lors de l'écoute) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Utiliser un proxy pour atteindre les services cachés de Tor (par défaut : même valeur que -proxy) + + + + Username for JSON-RPC connections + Nom d'utilisateur pour les connexions JSON-RPC + + + + Warning + Avertissement + + + + Warning: This version is obsolete, upgrade required! + Avertissement : cette version est obsolète, une mise à jour est nécessaire ! + + + + You need to rebuild the databases using -reindex to change -txindex + Vous devez reconstruire les bases de données avec -reindex pour modifier -txindex + + + + wallet.dat corrupt, salvage failed + wallet.dat corrompu, la récupération a échoué + + + + Password for JSON-RPC connections + Mot de passe pour les connexions JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + Autoriser les connexions JSON-RPC depuis l'adresse IP spécifiée + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Envoyer des commandes au nœud fonctionnant à <ip> (par défaut : 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Exécuter la commande lorsque le meilleur bloc change (%s est remplacé par le hachage du bloc dans cmd) + + + + Upgrade wallet to latest format + Mettre à jour le format du porte-monnaie + + + + Set key pool size to <n> (default: 100) + Régler la taille de la plage de clefs sur <n> (par défaut : 100) + + + + Rescan the block chain for missing wallet transactions + Réanalyser la chaîne de blocs pour les transactions de porte-monnaie manquantes + + + + Use OpenSSL (https) for JSON-RPC connections + Utiliser OpenSSL (https) pour les connexions JSON-RPC + + + + Server certificate file (default: server.cert) + Fichier de certificat serveur (par défaut : server.cert) + + + + Server private key (default: server.pem) + Clef privée du serveur (par défaut : server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Clefs de chiffrement acceptables (par défaut : TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Ce message d'aide + + + + 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) + + + + Connect through socks proxy + Connexion via un proxy socks + + + + Allow DNS lookups for -addnode, -seednode and -connect + Autoriser les recherches DNS pour -addnode, -seednode et -connect + + + + Loading addresses... + Chargement des adresses… + + + + Error loading wallet.dat: Wallet corrupted + Erreur lors du chargement de wallet.dat : porte-monnaie corrompu + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Erreur lors du chargement de wallet.dat : le porte-monnaie nécessite une version plus récente de curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Le porte-monnaie nécessitait une réécriture : veuillez redémarrer curecoin pour terminer l'opération + + + + Error loading wallet.dat + Erreur lors du chargement de wallet.dat + + + + Invalid -proxy address: '%s' + Adresse -proxy invalide : « %s » + + + + Unknown network specified in -onlynet: '%s' + Réseau inconnu spécifié sur -onlynet : « %s » + + + + Unknown -socks proxy version requested: %i + Version inconnue de proxy -socks demandée : %i + + + + Cannot resolve -bind address: '%s' + Impossible de résoudre l'adresse -bind : « %s » + + + + Cannot resolve -externalip address: '%s' + Impossible de résoudre l'adresse -externalip : « %s » + + + + Invalid amount for -paytxfee=<amount>: '%s' + Montant invalide pour -paytxfee=<montant> : « %s » + + + + Invalid amount + Montant invalide + + + + Insufficient funds + Fonds insuffisants + + + + Loading block index... + Chargement de l’index des blocs… + + + + Add a node to connect to and attempt to keep the connection open + Ajouter un nœud auquel se connecter et tenter de garder la connexion ouverte + + + + Unable to bind to %s on this computer. curecoin is probably already running. + Impossible de se lier à %s sur cet ordinateur. curecoin fonctionne probablement déjà. + + + + Fee per KB to add to transactions you send + Frais par Ko à ajouter aux transactions que vous enverrez + + + + Loading wallet... + Chargement du porte-monnaie… + + + + Cannot downgrade wallet + Impossible de revenir à une version antérieure du porte-monnaie + + + + Cannot write default address + Impossible d'écrire l'adresse par défaut + + + + Rescanning... + Nouvelle analyse… + + + + Done loading + Chargement terminé + + + + To use the %s option + Pour utiliser l'option %s + + + + Error + Erreur + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Vous devez ajouter la ligne rpcpassword=<mot-de-passe> au fichier de configuration : +%s +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 diff --git a/src/qt/locale/curecoin_fr_CA.qm b/src/qt/locale/curecoin_fr_CA.qm new file mode 100644 index 0000000..3ac0bc0 Binary files /dev/null and b/src/qt/locale/curecoin_fr_CA.qm differ diff --git a/src/qt/locale/curecoin_fr_CA.ts b/src/qt/locale/curecoin_fr_CA.ts new file mode 100644 index 0000000..9cee34a --- /dev/null +++ b/src/qt/locale/curecoin_fr_CA.ts @@ -0,0 +1,2922 @@ + +UTF-8 + + AboutDialog + + + About curecoin + A propos de curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> version + + + + +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. + +Ce logiciel est en phase expérimentale. + +Distribué sous licence MIT/X11, voir le fichier COPYING ou http://www.opensource.org/licenses/mit-license.php. + +Ce produit comprend des logiciels développés par le projet OpenSSL pour être utilisés dans la boîte à outils OpenSSL (http://www.openssl.org/), un logiciel cryptographique écrit par Eric Young (eay@cryptsoft.com) et un logiciel UPnP écrit par Thomas Bernard. + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Carnet d'adresses + + + + Double-click to edit address or label + Double-cliquez afin de modifier l'adress ou l'étiquette + + + + Create a new address + Créer une nouvelle adresse + + + + Copy the currently selected address to the system clipboard + Copier l'adresse surligné a votre presse-papier + + + + &New Address + + + + + These are your curecoin 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. + Ceux-ci sont vos adresses curecoin qui vous permettent de recevoir des paiements. Vous pouvez en donner une différente à chaque expédieur afin de savoir qui vous payent. + + + + &Copy Address + + + + + Show &QR Code + + + + + Sign a message to prove you own a curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &Supprimer + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + + + + + Export Address Book Data + Exporter les données du carnet d'adresses + + + + 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 + + + + + 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 curecoinS</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 + + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + + + + + curecoinGUI + + + Sign &message... + + + + + Synchronizing with network... + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Transactions + + + + + Browse transaction history + + + + + Edit the list of stored addresses and labels + + + + + Show the list of addresses for receiving payments + + + + + E&xit + + + + + Quit application + + + + + Show information about curecoin + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + + + + + Wallet + + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &A propos de curecoin + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + + [testnet] + + + + + curecoin client + + + + + %n active connection(s) to curecoin network + + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + + + + + Catching up... + + + + + 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 curecoin 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> + + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + 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 curecoin address. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + + curecoin-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. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + + + + + Unconfirmed: + + + + + Wallet + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + + + + + Your current balance + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 MEC + + + + + Confirm the send action + + + + + S&end + + + + + <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. + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + + + + + %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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + Open for %n more block(s) + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + + + + + Amount + + + + + Open for %n more block(s) + + + + + Open until %1 + + + + + Offline (%1 confirmations) + + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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 + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + + + + + Cannot downgrade wallet + + + + + 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/curecoin_gu_IN.qm b/src/qt/locale/curecoin_gu_IN.qm new file mode 100644 index 0000000..e94292e Binary files /dev/null and b/src/qt/locale/curecoin_gu_IN.qm differ diff --git a/src/qt/locale/curecoin_gu_IN.ts b/src/qt/locale/curecoin_gu_IN.ts new file mode 100644 index 0000000..931a242 --- /dev/null +++ b/src/qt/locale/curecoin_gu_IN.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + બીટકોઈન વિષે + + + + <b>curecoin</b> version + + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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 curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + + + + + 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 + + + + + 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 curecoinS</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 + + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + + + + + curecoinGUI + + + Sign &message... + + + + + Synchronizing with network... + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Transactions + + + + + Browse transaction history + + + + + Edit the list of stored addresses and labels + + + + + Show the list of addresses for receiving payments + + + + + E&xit + + + + + Quit application + + + + + Show information about curecoin + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + + + + + Wallet + + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + + [testnet] + + + + + curecoin client + + + + + %n active connection(s) to curecoin network + + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + + + + + Catching up... + + + + + 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 curecoin 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> + + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + 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 curecoin address. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + + curecoin-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. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + + + + + Unconfirmed: + + + + + Wallet + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + + + + + Your current balance + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 MEC + + + + + Confirm the send action + + + + + S&end + + + + + <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. + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + + + + + %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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + Open for %n more block(s) + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + + + + + Amount + + + + + Open for %n more block(s) + + + + + Open until %1 + + + + + Offline (%1 confirmations) + + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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 + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + + + + + Cannot downgrade wallet + + + + + 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/curecoin_he.qm b/src/qt/locale/curecoin_he.qm new file mode 100644 index 0000000..9bbab2e Binary files /dev/null and b/src/qt/locale/curecoin_he.qm differ diff --git a/src/qt/locale/curecoin_he.ts b/src/qt/locale/curecoin_he.ts new file mode 100644 index 0000000..490bde6 --- /dev/null +++ b/src/qt/locale/curecoin_he.ts @@ -0,0 +1,2937 @@ + +UTF-8 + + AboutDialog + + + About curecoin + אודות ביטקוין + + + + <b>curecoin</b> version + גרסת <b>ביטקוין</b> + + + + +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. + +זוהי תוכנה ניסיונית. + +מופצת תחת רישיון התוכנה MIT/X11, ראה את הקובץ המצורף COPYING או http://www.opensource.org/licenses/mit-license.php. + +המוצר הזה כולל תוכנה שפותחה ע"י פרויקט OpenSSL לשימוש בתיבת הכלים OpenSSL (http://www.openssl.org/) ותוכנה קריפטוגרפית שנכתבה ע"י אריק יאנג (eay@cryptsoft.com) ותוכנת UPnP שנכתבה ע"י תומס ברנרד. + + + + Copyright + זכויות יוצרים + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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 + הצג &קוד QR + + + + Sign a message to prove you own a curecoin address + חתום על הודעה בכדי להוכיח כי אתה הבעלים של כתובת ביטקוין. + + + + Sign &Message + חתום על הודעה + + + + Delete the currently selected address from the list + מחק את הכתובת שנבחרה מהרשימה + + + + Export the data in the current tab to a file + יצוא הנתונים בטאב הנוכחי לקובץ + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + אמת הודעה בכדי להבטיח שהיא נחתמה עם כתובת ביטקוין מסוימת. + + + + &Verify Message + אמת הודעה + + + + &Delete + מחק + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + אלה כתובת הביטקוין שלך עבור שליחת תשלומים. תמיד בדוק את מספר ואת כתובות מקבלי התשלומים לפני שליחת מטבעות. + + + + Copy &Label + העתק תוית + + + + &Edit + עריכה + + + + Send &Coins + שלח מטבעות + + + + Export Address Book Data + יצוא נתוני פנקס כתובות + + + + Comma separated file (*.csv) + קובץ מופרד בפסיקים (*.csv) + + + + Error exporting + שגיאה ביצוא + + + + Could not write to file %1. + לא מסוגל לכתוב לקובץ %1. + + + + AddressTableModel + + + Label + תוית + + + + Address + כתובת + + + + (no label) + (ללא תוית) + + + + AskPassphraseDialog + + + Passphrase Dialog + שיח סיסמא + + + + Enter passphrase + הכנס סיסמא + + + + New passphrase + סיסמה חדשה + + + + Repeat new passphrase + חזור על הסיסמה החדשה + + + + 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>. + הכנס את הסיסמה החדשה לארנק. <br/>אנא השתמש בסיסמה המכילה <b>10 תוים אקראיים או יותר</b>, או <b>שמונה מילים או יותר</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 curecoinS</b>! + אזהרה: אם אתה מצפין את הארנק ומאבד את הסיסמא, אתה <b>תאבד את כל הביטקוינים שלך</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! + זהירות: מקש Caps Lock מופעל! + + + + + Wallet encrypted + הארנק הוצפן + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + סיסמת הארנק שונתה בהצלחה. + + + + curecoinGUI + + + Sign &message... + חתום על הודעה + + + + Synchronizing with network... + מסתנכרן עם הרשת... + + + + &Overview + &סקירה + + + + Show general overview of wallet + הצג סקירה כללית של הארנק + + + + &Transactions + &פעולות + + + + Browse transaction history + דפדף בהיסטוריית הפעולות + + + + Edit the list of stored addresses and labels + ערוך את רשימת הכתובות והתויות + + + + Show the list of addresses for receiving payments + הצג את רשימת הכתובות לקבלת תשלומים + + + + E&xit + י&ציאה + + + + Quit application + סגור תוכנה + + + + Show information about curecoin + הצג מידע על ביטקוין + + + + About &Qt + אודות Qt + + + + Show information about Qt + הצג מידע על Qt + + + + &Options... + &אפשרויות + + + + &Encrypt Wallet... + הצפן ארנק + + + + &Backup Wallet... + גיבוי ארנק + + + + &Change Passphrase... + שנה סיסמא + + + + Importing blocks from disk... + מייבא בלוקים מהדיסק... + + + + Reindexing blocks on disk... + מחדש את אינדקס הבלוקים בדיסק... + + + + Send coins to a curecoin address + שלח מטבעות לכתובת ביטקוין + + + + Modify configuration options for curecoin + שנה אפשרויות תצורה עבור ביטקוין + + + + Backup wallet to another location + גיבוי הארנק למקום אחר + + + + Change the passphrase used for wallet encryption + שנה את הסיסמה להצפנת הארנק + + + + &Debug window + חלון ניפוי + + + + Open debugging and diagnostic console + פתח את לוח הבקרה לאבחון וניפוי + + + + &Verify message... + אמת הודעה... + + + + + curecoin + ביטקוין + + + + Wallet + ארנק + + + + &Send + ושלח + + + + &Receive + וקבל + + + + &Addresses + וכתובות + + + + &About curecoin + אודות ביטקוין + + + + &Show / Hide + הצג / הסתר + + + + Show or hide the main Window + הצג או הסתר את החלון הראשי + + + + Encrypt the private keys that belong to your wallet + הצפן את המפתחות הפרטיים ששייכים לארנק שלך + + + + Sign messages with your curecoin addresses to prove you own them + חתום על הודעות עם כתובות הביטקוין שלך כדי להוכיח שהן בבעלותך + + + + Verify messages to ensure they were signed with specified curecoin addresses + אמת הודעות כדי להבטיח שהן נחתמו עם כתובת ביטקוין מסוימות + + + + &File + &קובץ + + + + &Settings + ה&גדרות + + + + &Help + &עזרה + + + + Tabs toolbar + סרגל כלים טאבים + + + + + [testnet] + [רשת-בדיקה] + + + + curecoin client + תוכנת ביטקוין + + + + %n active connection(s) to curecoin network + חיבור פעיל אחד לרשת הביטקוין%n חיבורים פעילים לרשת הביטקוין + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + 1% מתוך 2% (משוער) בלוקים של הסטוריית פעולת עובדו + + + + Processed %1 blocks of transaction history. + הושלם עיבוד של %1 בלוקים של היסטוריית פעולות. + + + + %n hour(s) + %n שעה%n שעות + + + + %n day(s) + %n יום%n ימים + + + + %n week(s) + %n שבוע%n שבועות + + + + %1 behind + 1% מאחור + + + + Last received block was generated %1 ago. + הבלוק האחרון שהתקבל נוצר לפני %1 + + + + Transactions after this will not yet be visible. + לאחר זאת פעולות נספות טרם יהיו גלויות + + + + Error + שגיאה + + + + Warning + אזהרה + + + + Information + מידע + + + + 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, המיועדת לצמתים שמעבדים את הפעולה שלך ועוזרת לתמוך ברשת. האם ברצונך לשלם את העמלה? + + + + Up to date + עדכני + + + + Catching up... + מתעדכן... + + + + 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 curecoin 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + שגיאה סופנית אירעה. ביטקוין אינו יכול להמשיך לפעול בבטחה ולכן ייסגר. + + + + ClientModel + + + Network Alert + אזעקת רשת + + + + 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. + הכתובת שהכנסת "%1" כבר נמצאת בפנקס הכתובות. + + + + The entered address "%1" is not a valid curecoin address. + הכתובת שהוכנסה "%1" אינה כתובת ביטקוין תקינה. + + + + Could not unlock wallet. + פתיחת הארנק נכשלה. + + + + New key generation failed. + יצירת מפתח חדש נכשלה. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + גרסה + + + + Usage: + שימוש: + + + + command-line options + אפשרויות שורת פקודה + + + + UI options + אפשרויות ממשק + + + + Set language, for example "de_DE" (default: system locale) + קבע שפה, למשל "he_il" (ברירת מחדל: שפת המערכת) + + + + Start minimized + התחל ממוזער + + + + Show splash screen on startup (default: 1) + הצג מסך פתיחה בעת הפעלה (ברירת מחדל: 1) + + + + OptionsDialog + + + Options + אפשרויות + + + + &Main + ראשי + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + שלם &עמלת פעולה + + + + Automatically start curecoin after logging in to the system. + הפעל את ביטקוין באופן עצמאי לאחר התחברות למערכת. + + + + &Start curecoin on system login + התחל את ביטקוין בעת התחברות למערכת + + + + Reset all client options to default. + אפס כל אפשרויות התוכנה לברירת המחדל. + + + + &Reset Options + איפוס אפשרויות + + + + &Network + רשת + + + + Automatically open the curecoin 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 curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + התחבר לרשת הביטקוין דרך פרוקסי SOCKS (למשל בעת התחברות דרך Tor). + + + + &Connect through SOCKS proxy: + התחבר דרך פרוקסי SOCKS + + + + Proxy &IP: + כתובת IP של פרוקסי: + + + + IP address of the proxy (e.g. 127.0.0.1) + כתובת האינטרנט של הפרוקסי (למשל 127.0.0.1) + + + + &Port: + פורט: + + + + Port of the proxy (e.g. 9050) + הפורט של הפרוקסי (למשל 9050) + + + + SOCKS &Version: + גרסת SOCKS: + + + + SOCKS version of the proxy (e.g. 5) + גרסת SOCKS של הפרוקסי (למשל 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 curecoin. + ניתן לקבוע כאן את שפת ממשק המשתמש. הגדרה זו תחול לאחר הפעלה מחדש של ביטקוין. + + + + &Unit to show amounts in: + יחידת מדידה להצגת כמויות: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + בחר את ברירת המחדל ליחידת החלוקה אשר תוצג בממשק ובעת שליחת מטבעות. + + + + Whether to show curecoin addresses in the transaction list or not. + האם להציג כתובות ביטקוין ברשימת הפעולות או לא. + + + + &Display addresses in transaction list + הצג כתובות ברשימת הפעולות + + + + &OK + אישור + + + + &Cancel + ביטול + + + + &Apply + יישום + + + + default + ברירת מחדל + + + + Confirm options reset + אשר את איפוס האפשרויות + + + + Some settings may require a client restart to take effect. + כמה מההגדרות עשויות לדרוש אתחול התוכנה כדי להיכנס לפועל. + + + + Do you want to proceed? + האם ברצונך להמשיך? + + + + + Warning + אזהרה + + + + + This setting will take effect after restarting curecoin. + הגדרה זו תחול לאחר הפעלה מחדש של ביטקוין. + + + + The supplied proxy address is invalid. + כתובת הפרוקסי שסופקה אינה תקינה. + + + + OverviewPage + + + Form + טופס + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + המידע המוצג עשוי להיות מיושן. הארנק שלך מסתנכרן באופן אוטומטי עם רשת הביטקוין לאחר כינון חיבור, אך התהליך טרם הסתיים. + + + + Balance: + יתרה: + + + + Unconfirmed: + ממתין לאישור: + + + + Wallet + ארנק + + + + Immature: + לא בשל: + + + + Mined balance that has not yet matured + מאזן שנכרה וטרם הבשיל + + + + <b>Recent transactions</b> + <b>פעולות אחרונות</b> + + + + Your current balance + היתרה הנוכחית שלך + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + הסכום הכולל של פעולות שטרם אושרו, ועוד אינן נספרות בחישוב היתרה הנוכחית + + + + + out of sync + לא מסונכרן + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + לא ניתן להתחיל את ביטקוין: מפעיל לחץ-לתשלום + + + + QRCodeDialog + + + QR Code Dialog + שיח קוד QR + + + + Request Payment + בקש תשלום + + + + Amount: + כמות: + + + + Label: + תוית: + + + + Message: + הודעה: + + + + &Save As... + &שמור בשם... + + + + Error encoding URI into QR Code. + שגיאה בקידוד URI לקוד QR + + + + The entered amount is invalid, please check. + הכמות שהוכנסה אינה תקינה, אנא ודא. + + + + Resulting URI too long, try to reduce the text for label / message. + המזהה המתקבל ארוך מדי, נסה להפחית את הטקסט בתוית / הודעה. + + + + Save QR Code + שמור קוד QR + + + + PNG Images (*.png) + תמונות PNG (*.png) + + + + RPCConsole + + + Client name + שם ממשק + + + + + + + + + + + + + N/A + N/A + + + + Client version + גרסת ממשק + + + + &Information + מידע + + + + Using OpenSSL version + משתמש ב-OpenSSL גרסה + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + הצג את הודעה העזרה של curecoin-qt כדי לקבל רשימה של אפשרויות שורת פקודה של ביטקוין. + + + + &Show + הצג + + + + &Console + לוח בקרה + + + + Build date + תאריך בניה + + + + curecoin - Debug window + ביטקוין - חלון ניפוי + + + + curecoin Core + ליבת ביטקוין + + + + Debug log file + קובץ יומן ניפוי + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + פתח את קובץ יומן הניפוי מתיקיית הנתונים הנוכחית. זה עשוי לקחת מספר שניות עבור קובצי יומן גדולים. + + + + Clear console + נקה לוח בקרה + + + + Welcome to the curecoin RPC console. + ברוכים הבאים ללוח בקרת RPC של ביטקוין + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + השתמש בחיצים למעלה ולמטה כדי לנווט בהיסטוריה, ו- <b>Ctrl-L</b> כדי לנקות את המסך. + + + + Type <b>help</b> for an overview of available commands. + הקלד <b>help</b> בשביל סקירה של הפקודות הזמינות. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + שלח מטבעות + + + + Send to multiple recipients at once + שלח למספר מקבלים בו-זמנית + + + + Add &Recipient + הוסף מקבל + + + + Remove all transaction fields + הסר את כל השדות בפעולה + + + + Clear &All + נקה הכל + + + + Balance: + יתרה: + + + + 123.456 MEC + 123.456 ביטקוין + + + + Confirm the send action + אשר את פעולת השליחה + + + + S&end + שלח + + + + <b>%1</b> to %2 (%3) + <b>%1</b> ל- %2 (%3) + + + + Confirm send coins + אשר שליחת מטבעות + + + + Are you sure you want to send %1? + האם אתה בטוח שברצונך לשלוח %1? + + + + and + ו- + + + + The recipient address is not valid, please recheck. + כתובת המקבל אינה תקינה, אנא בדוק שנית. + + + + The amount to pay must be larger than 0. + הכמות לשלם חייבת להיות גדולה מ-0. + + + + The amount exceeds your balance. + הכמות עולה על המאזן שלך. + + + + The total exceeds your balance when the %1 transaction fee is included. + הכמות הכוללת, ובכללה עמלת פעולה בסך %1, עולה על המאזן שלך. + + + + 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. + שגיאה: הפעולה נדחתה. זה עשוי לקרות עם חלק מהמטבעות בארנק שלך כבר נוצלו, למשל אם השתמשת בעותק של wallet.dat ומטבעות נוצלו בעותק אך לא סומנו כמנוצלות כאן. + + + + SendCoinsEntry + + + Form + טופס + + + + A&mount: + כ&מות: + + + + Pay &To: + שלם &ל: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + הכתובת שאליה ישלח התשלום (למשל 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Enter a label for this address to add it to your address book + הכנס תוית לכתובת הזאת כדי להכניס לפנקס הכתובות + + + + &Label: + ת&וית: + + + + Choose address from address book + בחר כתובת מפנקס הכתובות + + + + Alt+A + Alt+A + + + + Paste address from clipboard + הדבר כתובת מהלוח + + + + Alt+P + Alt+P + + + + Remove this recipient + הסר את המקבל הזה + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + הכנס כתובת ביטקוין (למשל 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + הכתובת איתה לחתום על ההודעה (למשל 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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 + הכנס כאן את ההודעה שעליך ברצונך לחתום + + + + Signature + חתימה + + + + Copy the current signature to the system clipboard + העתק את החתימה הנוכחית ללוח המערכת + + + + Sign the message to prove you own this curecoin address + חתום על ההודעה כדי להוכיח שכתובת הביטקוין הזו בבעלותך. + + + + Sign &Message + חתום על הודעה + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + הכתובת איתה ההודעה נחתמה (למשל 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + אמת את ההודעה כדי להבטיח שהיא נחתמה עם כתובת הביטקוין הנתונה + + + + Verify &Message + אימות הודעה + + + + Reset all verify message fields + אפס את כל שדות אימות הודעה + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + הכנס כתובת ביטקוין (למשל 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + לחץ "חתום על ההודעה" כדי לחולל חתימה + + + + Enter curecoin 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. + ההודעה אומתה. + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [רשת-בדיקה] + + + + TransactionDesc + + + Open until %1 + פתוח עד %1 + + + + %1/offline + %1/מנותק + + + + %1/unconfirmed + %1/ממתין לאישור + + + + %1 confirmations + %1 אישורים + + + + Status + מצב + + + + , broadcast through %n node(s) + , הופץ דרך צומת אחד, הופץ דרך %n צמתים + + + + Date + תאריך + + + + Source + מקור + + + + Generated + נוצר + + + + + From + מאת + + + + + + To + אל + + + + + own address + כתובת עצמית + + + + label + תוית + + + + + + + + Credit + זיכוי + + + + matures in %n more block(s) + מבשיל בעוד בלוק אחדמבשיל בעוד %n בלוקים + + + + not accepted + לא התקבל + + + + + + + Debit + חיוב + + + + Transaction fee + עמלת פעולה + + + + Net amount + כמות נקיה + + + + Message + הודעה + + + + Comment + הערה + + + + Transaction ID + זיהוי פעולה + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + מטבעות שנוצרים חייבים להבשיל למשך 120 בלוקים לפני שניתן לנצל אותם. כשיצרת את הבלוק הזה, הוא הופץ לרשת כדי להתווסף לשרשרת הבלוקים. אם הוא אינו מצליח לביע לשרשרת, המצב שלו ישתנה ל"לא התקבל" ולא ניתן יהיה לנצל אותו. זה עשוי לקרות מעת לעת אם צומת אחר יוצר בלוק בטווח של מספר שניות מהבלוק שלך. + + + + Debug information + מידע ניפוי + + + + Transaction + פעולה + + + + Inputs + קלטים + + + + Amount + כמות + + + + true + אמת + + + + false + שקר + + + + , has not been successfully broadcast yet + , טרם שודר בהצלחה + + + + Open for %n more block(s) + פתח למשך בלוק %n יותרפתח למשך %n בלוקים נוספים + + + + unknown + לא ידוע + + + + TransactionDescDialog + + + Transaction details + פרטי הפעולה + + + + This pane shows a detailed description of the transaction + חלונית זו מציגה תיאור מפורט של הפעולה + + + + TransactionTableModel + + + Date + תאריך + + + + Type + סוג + + + + Address + כתובת + + + + Amount + כמות + + + + Open for %n more block(s) + פתח למשך בלוק %n יותרפתח למשך %n בלוקים נוספים + + + + Open until %1 + פתוח עד %1 + + + + Offline (%1 confirmations) + לא מחובר (%1 אישורים) + + + + Unconfirmed (%1 of %2 confirmations) + ממתין לאישור (%1 מתוך %2 אישורים) + + + + Confirmed (%1 confirmations) + מאושר (%1 אישורים) + + + + Mined balance will be available when it matures in %n more block(s) + המאזן שנכרה יהיה זמין כשהוא מבשיל בעוד בלוק אחדהמאזן שנכרה יהיה זמין כשהוא מבשיל בעוד %n בלוקים + + + + 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) + (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) + קובץ מופרד בפסיקים (*.csv) + + + + Confirmed + מאושר + + + + Date + תאריך + + + + Type + סוג + + + + Label + תוית + + + + Address + כתובת + + + + Amount + כמות + + + + ID + מזהה + + + + Error exporting + שגיאה ביצוא + + + + Could not write to file %1. + לא מסוגל לכתוב לקובץ %1. + + + + Range: + טווח: + + + + to + אל + + + + WalletModel + + + Send Coins + שלח מטבעות + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + יצוא הנתונים בטאב הנוכחי לקובץ + + + + Backup Wallet + גבה ארנק + + + + Wallet Data (*.dat) + נתוני ארנק (*.dat) + + + + Backup Failed + גיבוי נכשל + + + + There was an error trying to save the wallet data to the new location. + הייתה שגיאה בנסיון לשמור את המידע הארנק למיקום החדש. + + + + Backup Successful + גיבוי הושלם בהצלחה + + + + The wallet data was successfully saved to the new location. + נתוני הארנק נשמרו בהצלחה במקום החדש. + + + + curecoin-core + + + curecoin version + גרסת ביטקוין + + + + Usage: + שימוש: + + + + Send command to -server or curecoind + שלח פקודה ל -server או curecoind + + + + List commands + רשימת פקודות + + + + Get help for a command + קבל עזרה עבור פקודה + + + + Options: + אפשרויות: + + + + Specify configuration file (default: curecoin.conf) + ציין קובץ הגדרות (ברירת מחדל: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + ציין קובץ pid (ברירת מחדל: curecoind.pid) + + + + Specify data directory + ציין תיקיית נתונים + + + + Set database cache size in megabytes (default: 25) + קבע את גודל המטמון של מסד הנתונים במגהבייט (ברירת מחדל: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + האזן לחיבורים ב<פורט> (ברירת מחדל: 7951 או ברשת הבדיקה: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + החזק לכל היותר <n> חיבורים לעמיתים (ברירת מחדל: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + התחבר לצומת כדי לדלות כתובות עמיתים, ואז התנתק + + + + Specify your own public address + ציין את הכתובת הפומבית שלך + + + + Threshold for disconnecting misbehaving peers (default: 100) + סף להתנתקות מעמיתים הנוהגים שלא כהלכה (ברירת מחדל: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + מספר שניות למנוע מעמיתים הנוהגים שלא כהלכה מלהתחבר מחדש (ברירת מחדל: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + אירעה שגיאה בעת הגדרת פורט RPC %u להאזנה ב-IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + האזן לחיבורי JSON-RPC ב- <port> (ברירת מחדל: 7950 או רשת בדיקה: 17950) + + + + Accept command line and JSON-RPC commands + קבל פקודות משורת הפקודה ו- JSON-RPC + + + + 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) + קבל חיבורים מבחוץ (ברירת מחדל: 1 ללא -proxy או -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, עליך לקבוע סיסמת RPC בקובץ הקונפיגורציה: + %s +מומלץ להשתמש בסיסמא האקראית הבאה: +rpcuser=curecoinrpc +rpcpassword=%s +(אין צורך לזכור את הסיסמה) +אסור ששם המשתמש והסיסמא יהיו זהים. +אם הקובץ אינו קיים, צור אותו עם הרשאות קריאה לבעלים בלבד. +זה מומלץ לסמן alertnotify כדי לקבל דיווח על תקלות; +למשל: alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + אירעה שגיאה בעת הגדרת פורט RPC %u להאזנה ב-IPv6, נסוג ל-IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + קשור עם כתובת נתונה והאזן לה תמיד. השתמש בסימון [host]:port עבוד IPv6. + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + לא מסוגל להשיג נעילה על תיקיית הנתונים %s. כנראה שביטקוין כבר רץ. + + + + 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: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + שגיאה: הפעולה הזאת דורשת עמלת פעולה של לפחות %s עקב הכמות, המורכבות, או השימוש בכספים שהתקבלו לאחרונה! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + בצע פעולה כאשר ההודעה הרלוונטית מתקבלת(%s בשורת הפקודה משתנה על-ידי ההודעה) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + בצע פקודה כאשר פעולת ארנק משתנה (%s ב cmd יוחלף ב TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + קבע גודל מקסימלי עבור פעולות עדיפות גבוהה/עמלה נמוכה בבתים (ברירת מחדל: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + זוהי בניית ניסיון טרום-שחרור - השימוש בה על אחריותך - אין להשתמש לצורך כריה או יישומי מסחר + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + אזהרה: -paytxfee נקבע לערך מאד גבוה! זוהי עמלת הפעולה שתשלם אם אתה שולח פעולה. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + אזהרה: הפעולות המוצגות עשויות לא להיות נכונות! ייתכן ואתה צריך לשדרג, או שצמתים אחרים צריכים לשדרג. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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! כל המתפחות נקראו באופן תקין, אך נתוני הפעולות או ספר הכתובות עלולים להיות חסרים או שגויים. + + + + 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. + אזהרה: קובץ wallet.dat מושחת, המידע חולץ! קובץ wallet.dat המקורח נשמר כ - wallet.{timestamp}.bak ב - %s; אם המאזן או הפעולות שגויים עליך לשחזר גיבוי. + + + + Attempt to recover private keys from a corrupt wallet.dat + נסה לשחזר מפתחות פרטיים מקובץ wallet.dat מושחת. + + + + Block creation options: + אפשרויות יצירת בלוק: + + + + Connect only to the specified node(s) + התחבר רק לצמתים המצוינים + + + + Corrupted block database detected + התגלה מסד נתוני בלוקים לא תקין + + + + Discover own IP address (default: 1 when listening and no -externalip) + גלה את כתובת ה-IP העצמית (ברירת מחדל: 1 כשמאזינים וללא -externalip) + + + + Do you want to rebuild the block database now? + האם תרצה כעט לבנות מחדש את מסד נתוני הבלוקים? + + + + Error initializing block database + שגיאה באתחול מסד נתוני הבלוקים + + + + Error initializing wallet database environment %s! + שגיאה באתחול סביבת מסד נתוני הארנקים %s! + + + + Error loading block database + שגיאה בטעינת מסד נתוני הבלוקים + + + + Error opening block database + שגיאה בטעינת מסד נתוני הבלוקים + + + + Error: Disk space is low! + שגיאה: מעט מקום פנוי בדיסק! + + + + Error: Wallet locked, unable to create transaction! + שגיאה: הארנק נעול, אין אפשרות ליצור פעולה! + + + + Error: system error: + שגיאה: שגיאת מערכת: + + + + Failed to listen on any port. Use -listen=0 if you want this. + האזנה נכשלה בכל פורט. השתמש ב- -listen=0 אם ברצונך בכך. + + + + Failed to read block info + קריאת מידע הבלוקים נכשלה + + + + Failed to read block + קריאת הבלוק נכשלה + + + + Failed to sync block index + סנכרון אינדקס הבלוקים נכשל + + + + Failed to write block index + כתיבת אינדקס הבלוקים נכשל + + + + Failed to write block info + כתיבת מידע הבלוקים נכשל + + + + Failed to write block + כתיבת הבלוק נכשלה + + + + Failed to write file info + כתיבת מידע הקבצים נכשלה + + + + Failed to write to coin database + כתיבת מסד נתוני המטבעות נכשלה + + + + Failed to write transaction index + כתיבת אינדקס הפעולות נכשלה + + + + Failed to write undo data + כתיבת נתוני ביטול נכשלה + + + + Find peers using DNS lookup (default: 1 unless -connect) + מצא עמיתים ע"י חיפוש DNS (ברירת מחדל: 1 ללא -connect) + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + מספר הבלוקים לבדוק בעת אתחול (ברירת מחדל: 288, 0 = כולם) + + + + How thorough the block verification is (0-4, default: 3) + מידת היסודיות של אימות הבלוקים (0-4, ברירת מחדל: 3) + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + בנה מחדש את אינדק שרשרת הבלוקים מקבצי ה-blk000??.dat הנוכחיים. + + + + Set the number of threads to service RPC calls (default: 4) + קבע את מספר תהליכוני לשירות קריאות RPC (ברירת מחדל: 4) + + + + Verifying blocks... + מאמת את שלמות מסד הנתונים... + + + + Verifying wallet... + מאמת את יושרת הארנק... + + + + Imports blocks from external blk000??.dat file + מייבא בלוקים מקובצי blk000??.dat חיצוניים + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + מידע + + + + Invalid -tor address: '%s' + כתובת לא תקינה ל -tor: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + תחזק אינדקס פעולות מלא (ברירת מחדל: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + חוצץ קבלה מירבי לכל חיבור, <n>*1000 בתים (ברירת מחדל: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + חוצץ שליחה מירבי לכל חיבור, <n>*1000 בתים (ברירת מחדל: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + קבל רק שרשרת בלוקים התואמת נקודות ביקורת מובנות (ברירת מחדל: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + התחבר רק לצמתים ברשת <net> (IPv4, IPv6 או Tor) + + + + Output extra debugging information. Implies all other -debug* options + פלוט מידע ניפוי נוסף. נובע מכך כל אפשרויות -debug* האחרות. + + + + Output extra network debugging information + פלוט מידע נוסף לניפוי שגיאות ברשת. + + + + Prepend debug output with timestamp + הוסף חותמת זמן לפני פלט דיבאג + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + אפשרויות SSL: (ראה את הויקי של ביטקוין עבור הוראות הגדרת SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + בחר את גרסת פרוקסי SOCKS להשתמש בה (4-5, ברירת מחדל: 5) + + + + Send trace/debug info to console instead of debug.log file + שלח מידע דיבאג ועקבה לקונסולה במקום לקובץ debug.log + + + + Send trace/debug info to debugger + שלח מידע דיבאג ועקבה לכלי דיבאג + + + + Set maximum block size in bytes (default: 250000) + קבע את גדול הבלוק המירבי בבתים (ברירת מחדל: 250000) + + + + Set minimum block size in bytes (default: 0) + קבע את גודל הבלוק המינימלי בבתים (ברירת מחדל: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + כווץ את קובץ debug.log בהפעלת הקליינט (ברירת מחדל: 1 ללא -debug) + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + ציין הגבלת זמן לחיבור במילישניות (ברירת מחדל: 5000) + + + + System error: + שגיאת מערכת: + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + השתמש ב-UPnP כדי למפות את הפורט להאזנה (ברירת מחדל: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + השתמש ב-UPnP כדי למפות את הפורט להאזנה (ברירת מחדל: 1 בעת האזנה) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + השתמש בפרוקסי כדי להגיע לשירותים חבויים ב-tor (ברירת מחדל: כמו ב- -proxy) + + + + Username for JSON-RPC connections + שם משתמש לחיבורי JSON-RPC + + + + Warning + אזהרה + + + + Warning: This version is obsolete, upgrade required! + אזהרה: הגרסה הזאת מיושנת, יש צורך בשדרוג! + + + + You need to rebuild the databases using -reindex to change -txindex + עליך לבנות מחדש את מסדי הנתונים תוך שימוש ב- -reindex על מנת לשנות את -txindex + + + + wallet.dat corrupt, salvage failed + קובץ wallet.dat מושחת, החילוץ נכשל + + + + Password for JSON-RPC connections + סיסמה לחיבורי JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + אפשר חיבורי JSON-RPC מכתובת האינטרנט המצוינת + + + + Send commands to node running on <ip> (default: 127.0.0.1) + שלח פקודות לצומת ב-<ip> (ברירת מחדל: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + בצע פקודה זו כשהבלוק הטוב ביותר משתנה (%s בפקודה יוחלף בגיבוב הבלוק) + + + + Upgrade wallet to latest format + שדרג את הארנק לפורמט העדכני + + + + Set key pool size to <n> (default: 100) + קבע את גודל המאגר ל -<n> (ברירת מחדל: 100) + + + + Rescan the block chain for missing wallet transactions + סרוק מחדש את שרשרת הבלוקים למציאת פעולות חסרות בארנק + + + + Use OpenSSL (https) for JSON-RPC connections + השתמש ב-OpenSSL (https( עבור חיבורי JSON-RPC + + + + Server certificate file (default: server.cert) + קובץ תעודת שרת (ברירת מחדל: server.cert) + + + + Server private key (default: server.pem) + מפתח פרטי של השרת (ברירת מחדל: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + צפנים קבילים (ברירת מחדל: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + הודעת העזרה הזו + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + לא מסוגל לקשור ל-%s במחשב זה (הקשירה החזירה שגיאה %d, %s) + + + + Connect through socks proxy + התחבר דרך פרוקסי SOCKS + + + + Allow DNS lookups for -addnode, -seednode and -connect + אפשר בדיקת DNS עבור -addnode, -seednode ו- -connect + + + + Loading addresses... + טוען כתובות... + + + + Error loading wallet.dat: Wallet corrupted + שגיאה בטעינת הקובץ wallet.dat: הארנק מושחת + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + שגיאה בטעינת הקובץ wallet.dat: הארנק דורש גרסה חדשה יותר של ביטקוין + + + + Wallet needed to be rewritten: restart curecoin to complete + יש לכתוב מחדש את הארנק: אתחל את ביטקוין לסיום + + + + Error loading wallet.dat + שגיאה בטעינת הקובץ wallet.dat + + + + Invalid -proxy address: '%s' + כתובת -proxy לא תקינה: '%s' + + + + Unknown network specified in -onlynet: '%s' + רשת לא ידועה צוינה ב- -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + התבקשה גרסת פרוקסי -socks לא ידועה: %i + + + + Cannot resolve -bind address: '%s' + לא מסוגל לפתור כתובת -bind: '%s' + + + + Cannot resolve -externalip address: '%s' + לא מסוגל לפתור כתובת -externalip: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + כמות לא תקינה עבור -paytxfee=<amount>: '%s' + + + + 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. curecoin is probably already running. + לא ניתן לקשור ל-%s במחשב זה. ביטקוין כנראה עדיין רץ. + + + + Fee per KB to add to transactions you send + עמלה להוסיף לפעולות שאתה שולח עבור כל KB + + + + Loading wallet... + טוען ארנק... + + + + Cannot downgrade wallet + לא יכול להוריד דרגת הארנק + + + + Cannot write default address + לא יכול לכתוב את כתובת ברירת המחדל + + + + Rescanning... + סורק מחדש... + + + + Done loading + טעינה הושלמה + + + + To use the %s option + להשתמש באפשרות %s + + + + 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. + עליך לקבוע rpcpassword=yourpassword בקובץ ההגדרות: +%s +אם הקובץ אינו קיים, צור אותו עם הרשאות קריאה לבעלים בלבד. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_hi_IN.qm b/src/qt/locale/curecoin_hi_IN.qm new file mode 100644 index 0000000..ff8b52f Binary files /dev/null and b/src/qt/locale/curecoin_hi_IN.qm differ diff --git a/src/qt/locale/curecoin_hi_IN.ts b/src/qt/locale/curecoin_hi_IN.ts new file mode 100644 index 0000000..774ae13 --- /dev/null +++ b/src/qt/locale/curecoin_hi_IN.ts @@ -0,0 +1,2922 @@ + +UTF-8 + + AboutDialog + + + About curecoin + बिटकोइन के संबंध में + + + + <b>curecoin</b> version + बिटकोइन वर्सन + + + + +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. + + + + + Copyright + कापीराइट + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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 curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &मिटाए !! + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + &लेबल कॉपी करे + + + + &Edit + &एडिट + + + + Send &Coins + + + + + Export Address Book Data + पता पुस्तक का डेटा एक्सपोर्ट (निर्यात) करे ! + + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + + Error exporting + ग़लतियाँ एक्सपोर्ट (निर्यात) करे! + + + + Could not write to file %1. + फाइल में लिख नही सके %1. + + + + AddressTableModel + + + Label + लेबल + + + + Address + पता + + + + (no label) + (कोई लेबल नही !) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + पहचान शब्द/अक्षर डालिए ! + + + + New passphrase + नया पहचान शब्द/अक्षर डालिए ! + + + + Repeat new passphrase + दोबारा नया पहचान शब्द/अक्षर डालिए ! + + + + 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>. + नया पहचान शब्द/अक्षर वॉलेट मे डालिए ! <br/> कृपा करके पहचान शब्द में <br> 10 से ज़्यादा अक्षॉरों का इस्तेमाल करे </b>,या <b>आठ या उससे से ज़्यादा शब्दो का इस्तेमाल करे</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 curecoinS</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 + वॉलेट एनक्रिप्ट हो गया ! + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + + + + + curecoinGUI + + + Sign &message... + + + + + Synchronizing with network... + नेटवर्क से समकालिक (मिल) रहा है ... + + + + &Overview + &विवरण + + + + Show general overview of wallet + वॉलेट का सामानया विवरण दिखाए ! + + + + &Transactions + & लेन-देन + + + + + Browse transaction history + देखिए पुराने लेन-देन के विवरण ! + + + + Edit the list of stored addresses and labels + स्टोर किए हुए पते और लेबलओ को बदलिए ! + + + + Show the list of addresses for receiving payments + पते की सूची दिखाए जिन्हे भुगतान करना है ! + + + + E&xit + बाहर जायें + + + + Quit application + अप्लिकेशन से बाहर निकलना ! + + + + Show information about curecoin + बीटकोइन के बारे में जानकारी ! + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + &विकल्प + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + &बैकप वॉलेट + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + पहचान शब्द/अक्षर जो वॉलेट एनक्रिपशन के लिए इस्तेमाल किया है उसे बदलिए! + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + बीटकोइन + + + + Wallet + वॉलेट + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &फाइल + + + + &Settings + &सेट्टिंग्स + + + + &Help + &मदद + + + + Tabs toolbar + टैबस टूलबार + + + + + [testnet] + [टेस्टनेट] + + + + curecoin client + + + + + %n active connection(s) to curecoin network + %n सक्रिया संपर्क बीटकोइन नेटवर्क से%n सक्रिया संपर्क बीटकोइन नेटवर्क से + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + %n घंटा%n घंटे + + + + %n day(s) + %n दिन%n दिनो + + + + %n week(s) + %n हफ़्ता%n हफ्ते + + + + %1 behind + %1 पीछे + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + भूल + + + + Warning + चेतावनी + + + + Information + जानकारी + + + + 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? + + + + + Up to date + नवीनतम + + + + Catching up... + + + + + 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 curecoin 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> + वॉलेट एन्क्रिप्टेड है तथा अभी लॉक्ड है + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + 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. + इस एड्रेस बुक से जुड़ी प्रविष्टि केवल भेजने वाले addresses के लिए बदली जा सकती है| + + + + New receiving address + नया स्वीकार्य पता + + + + New sending address + नया भेजने वाला पता + + + + Edit receiving address + एडिट स्वीकार्य पता + + + + Edit sending address + एडिट भेजने वाला पता + + + + The entered address "%1" is already in the address book. + डाला गया पता "%1" एड्रेस बुक में पहले से ही मोजूद है| + + + + The entered address "%1" is not a valid curecoin address. + + + + + Could not unlock wallet. + वॉलेट को unlock नहीं किया जा सकता| + + + + New key generation failed. + नयी कुंजी का निर्माण असफल रहा| + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + बीटकोइन-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. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + &ओके + + + + &Cancel + &कैन्सल + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + चेतावनी + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + फार्म + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + बाकी रकम : + + + + Unconfirmed: + अपुष्ट : + + + + Wallet + वॉलेट + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>हाल का लेन-देन</b> + + + + Your current balance + आपका चालू बॅलेन्स + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + लेन देन की पुष्टि अभी नहीं हुई है, इसलिए इन्हें अभी मोजुदा बैलेंस में गिना नहीं गया है| + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + सिक्के भेजें| + + + + Send to multiple recipients at once + एक साथ कई प्राप्तकर्ताओं को भेजें + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + बाकी रकम : + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + भेजने की पुष्टि करें + + + + S&end + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> से %2 (%3) + + + + Confirm send coins + सिक्के भेजने की पुष्टि करें + + + + Are you sure you want to send %1? + क्या आप %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. + + + + + SendCoinsEntry + + + Form + फार्म + + + + A&mount: + अमाउंट: + + + + Pay &To: + प्राप्तकर्ता: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + आपकी एड्रेस बुक में इस एड्रेस के लिए एक लेबल लिखें + + + + &Label: + लेबल: + + + + Choose address from address book + + + + + Alt+A + Alt-A + + + + Paste address from clipboard + Clipboard से एड्रेस paste करें + + + + Alt+P + Alt-P + + + + Remove this recipient + प्राप्तकर्ता हटायें + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + curecoin एड्रेस लिखें (उदाहरण: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + Alt-A + + + + Paste address from clipboard + Clipboard से एड्रेस paste करें + + + + Alt+P + Alt-P + + + + Enter the message you want to sign here + + + + + Signature + हस्ताक्षर + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + curecoin एड्रेस लिखें (उदाहरण: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + खुला है जबतक %1 + + + + %1/offline + + + + + %1/unconfirmed + %1/अपुष्ट + + + + %1 confirmations + %1 पुष्टियाँ + + + + Status + + + + + , broadcast through %n node(s) + + + + + Date + taareek + + + + 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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + राशि + + + + true + सही + + + + false + ग़लत + + + + , has not been successfully broadcast yet + , अभी तक सफलतापूर्वक प्रसारित नहीं किया गया है + + + + Open for %n more block(s) + + + + + unknown + अज्ञात + + + + TransactionDescDialog + + + Transaction details + लेन-देन का विवरण + + + + This pane shows a detailed description of the transaction + ये खिड़की आपको लेन-देन का विस्तृत विवरण देगी ! + + + + TransactionTableModel + + + Date + taareek + + + + Type + टाइप + + + + Address + पता + + + + Amount + राशि + + + + Open for %n more block(s) + + + + + Open until %1 + खुला है जबतक %1 + + + + Offline (%1 confirmations) + ऑफलाइन ( %1 पक्का करना) + + + + Unconfirmed (%1 of %2 confirmations) + अपुष्ट ( %1 मे %2 पक्के ) + + + + Confirmed (%1 confirmations) + पक्के ( %1 पक्का करना) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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) + Comma separated file (*.csv) + + + + Confirmed + पक्का + + + + Date + taareek + + + + Type + टाइप + + + + Label + लेबल + + + + Address + पता + + + + Amount + राशि + + + + ID + ID + + + + Error exporting + ग़लतियाँ एक्सपोर्ट (निर्यात) करे! + + + + Could not write to file %1. + फाइल में लिख नही सके %1. + + + + Range: + विस्तार: + + + + to + तक + + + + WalletModel + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + बैकप वॉलेट + + + + Wallet Data (*.dat) + वॉलेट डेटा (*.dat) + + + + Backup Failed + बैकप असफल + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + बैकप सफल + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + बीटकोइन संस्करण + + + + Usage: + खपत : + + + + Send command to -server or curecoind + -server या curecoind को कमांड भेजें + + + + List commands + commands की लिस्ट बनाएं + + + + Get help for a command + किसी command के लिए मदद लें + + + + Options: + विकल्प: + + + + Specify configuration file (default: curecoin.conf) + configuraion की फाइल का विवरण दें (default: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + pid फाइल का विवरण दें (default: curecoin.pid) + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + ब्लॉक्स जाँचे जा रहा है... + + + + Verifying wallet... + वॉलेट जाँचा जा रहा है... + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + जानकारी + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + चेतावनी + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + वॉलेट आ रहा है... + + + + Cannot downgrade wallet + + + + + 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/curecoin_hr.qm b/src/qt/locale/curecoin_hr.qm new file mode 100644 index 0000000..cbb383a Binary files /dev/null and b/src/qt/locale/curecoin_hr.qm differ diff --git a/src/qt/locale/curecoin_hr.ts b/src/qt/locale/curecoin_hr.ts new file mode 100644 index 0000000..f6348c5 --- /dev/null +++ b/src/qt/locale/curecoin_hr.ts @@ -0,0 +1,2921 @@ + +UTF-8 + + AboutDialog + + + About curecoin + O curecoin-u + + + + <b>curecoin</b> version + <b>curecoin</b> verzija + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Adresar + + + + Double-click to edit address or label + Dvostruki klik za uređivanje adrese ili oznake + + + + Create a new address + Dodajte novu adresu + + + + Copy the currently selected address to the system clipboard + Kopiraj trenutno odabranu adresu u međuspremnik + + + + &New Address + &Nova adresa + + + + These are your curecoin 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. + Ovo su vaše curecoin adrese za primanje isplate. Možda želite dati drukčiju adresu svakom primatelju tako da možete pratiti tko je platio. + + + + &Copy Address + &Kopirati adresu + + + + Show &QR Code + Prikaži &QR Kôd + + + + Sign a message to prove you own a curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + Izvoz podataka iz trenutnog taba u datoteku + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &Brisanje + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Kopirati &oznaku + + + + &Edit + &Izmjeniti + + + + Send &Coins + + + + + Export Address Book Data + Izvoz podataka adresara + + + + Comma separated file (*.csv) + Datoteka vrijednosti odvojenih zarezom (*. csv) + + + + Error exporting + Pogreška kod izvoza + + + + Could not write to file %1. + Ne mogu pisati u datoteku %1. + + + + AddressTableModel + + + Label + Oznaka + + + + Address + Adresa + + + + (no label) + (bez oznake) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + Unesite lozinku + + + + New passphrase + Nova lozinka + + + + Repeat new passphrase + Ponovite novu lozinku + + + + 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>. + Unesite novi lozinku za novčanik. <br/> Molimo Vas da koristite zaporku od <b>10 ili više slučajnih znakova,</b> ili <b>osam ili više riječi.</b> + + + + Encrypt wallet + Šifriranje novčanika + + + + This operation needs your wallet passphrase to unlock the wallet. + Ova operacija treba lozinku vašeg novčanika kako bi se novčanik otključao. + + + + Unlock wallet + Otključaj novčanik + + + + This operation needs your wallet passphrase to decrypt the wallet. + Ova operacija treba lozinku vašeg novčanika kako bi se novčanik dešifrirao. + + + + Decrypt wallet + Dešifriranje novčanika. + + + + Change passphrase + Promjena lozinke + + + + Enter the old and new passphrase to the wallet. + Unesite staru i novu lozinku za novčanik. + + + + Confirm wallet encryption + Potvrdi šifriranje novčanika + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Upozorenje: Ako šifrirate vaš novčanik i izgubite lozinku, <b>IZGUBIT ĆETE SVE SVOJE curecoinSE!</b> + + + + Are you sure you wish to encrypt your wallet? + Jeste li sigurni da želite šifrirati svoj novčanik? + + + + 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 + Novčanik šifriran + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin će se sada zatvoriti kako bi dovršio postupak šifriranja. Zapamtite da šifriranje vašeg novčanika ne može u potpunosti zaštititi vaše curecoine od krađe preko zloćudnog softvera koji bi bio na vašem računalu. + + + + + + + Wallet encryption failed + Šifriranje novčanika nije uspjelo + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Šifriranje novčanika nije uspjelo zbog interne pogreške. Vaš novčanik nije šifriran. + + + + + The supplied passphrases do not match. + Priložene lozinke se ne podudaraju. + + + + Wallet unlock failed + Otključavanje novčanika nije uspjelo + + + + + + The passphrase entered for the wallet decryption was incorrect. + Lozinka za dešifriranje novčanika nije točna. + + + + Wallet decryption failed + Dešifriranje novčanika nije uspjelo + + + + Wallet passphrase was successfully changed. + Lozinka novčanika je uspješno promijenjena. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Uređivanje popisa pohranjenih adresa i oznaka + + + + Show the list of addresses for receiving payments + Prikaži popis adresa za primanje isplate + + + + E&xit + &Izlaz + + + + Quit application + Izlazak iz programa + + + + Show information about curecoin + Prikaži informacije o curecoinu + + + + 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... + + + + Importing blocks from disk... + Importiranje blokova sa diska... + + + + Reindexing blocks on disk... + Re-indeksiranje blokova na disku... + + + + Send coins to a curecoin address + Slanje novca na curecoin adresu + + + + Modify configuration options for curecoin + Promijeni postavke konfiguracije za curecoin + + + + 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... + + + + + + curecoin + curecoin + + + + Wallet + Novčanik + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &O curecoinu + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Datoteka + + + + &Settings + &Konfiguracija + + + + &Help + &Pomoć + + + + Tabs toolbar + Traka kartica + + + + + [testnet] + [testnet] + + + + curecoin client + curecoin klijent + + + + %n active connection(s) to curecoin network + %n aktivna veza na curecoin mrežu%n aktivne veze na curecoin mrežu%n aktivnih veza na curecoin mrežu + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + Obrađeno %1 blokova povijesti transakcije. + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + Greška + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Ažurno + + + + Catching up... + Ažuriranje... + + + + 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 curecoin 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + EditAddressDialog + + + Edit Address + Izmjeni adresu + + + + &Label + &Oznaka + + + + The label associated with this address book entry + Oznaka ovog upisa u adresar + + + + &Address + &Adresa + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Adresa ovog upisa u adresar. Može se mjenjati samo kod adresa za slanje. + + + + 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 already in the address book. + Upisana adresa "%1" je već u adresaru. + + + + The entered address "%1" is not a valid curecoin address. + Upisana adresa "%1" nije valjana curecoin adresa. + + + + Could not unlock wallet. + Ne mogu otključati novčanik. + + + + New key generation failed. + Stvaranje novog ključa nije uspjelo. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + + + + + version + verzija + + + + Usage: + Upotreba: + + + + command-line options + + + + + UI options + UI postavke + + + + Set language, for example "de_DE" (default: system locale) + + + + + Start minimized + Pokreni minimiziran + + + + Show splash screen on startup (default: 1) + + + + + OptionsDialog + + + Options + Postavke + + + + &Main + &Glavno + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Plati &naknadu za transakciju + + + + Automatically start curecoin after logging in to the system. + Automatski pokreni curecoin kad se uključi računalo + + + + &Start curecoin on system login + &Pokreni curecoin kod pokretanja sustava + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Automatski otvori port curecoin klijenta na ruteru. To radi samo ako ruter podržava UPnP i ako je omogućen. + + + + Map port using &UPnP + Mapiraj port koristeći &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Spojite se na curecoin mrežu putem SOCKS proxy-a (npr. kod povezivanja kroz Tor) + + + + &Connect through SOCKS proxy: + &Povezivanje putem SOCKS proxy-a: + + + + Proxy &IP: + + + + + IP address of the proxy (e.g. 127.0.0.1) + IP adresa proxy-a (npr. 127.0.0.1) + + + + &Port: + + + + + Port of the proxy (e.g. 9050) + Port od proxy-a (npr. 9050) + + + + SOCKS &Version: + + + + + SOCKS version of the proxy (e.g. 5) + + + + + &Window + + + + + Show only a tray icon after minimizing the window. + Prikaži samo ikonu u sistemskoj traci nakon minimiziranja prozora + + + + &Minimize to the tray instead of the taskbar + &Minimiziraj u sistemsku traku umjesto u traku programa + + + + 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. + Minimizirati umjesto izaći iz aplikacije kada je prozor zatvoren. Kada je ova opcija omogućena, aplikacija će biti zatvorena tek nakon odabira Izlaz u izborniku. + + + + M&inimize on close + M&inimiziraj kod zatvaranja + + + + &Display + &Prikaz + + + + User Interface &language: + + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + + + + + &Unit to show amounts in: + &Jedinica za prikazivanje iznosa: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Izaberite željeni najmanji dio curecoina koji će biti prikazan u sučelju i koji će se koristiti za plaćanje. + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + &Prikaži adrese u popisu transakcija + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + Upozorenje + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + Oblik + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + Stanje: + + + + Unconfirmed: + Nepotvrđene: + + + + Wallet + Novčanik + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Nedavne transakcije</b> + + + + Your current balance + Vaše trenutno stanje računa + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Ukupni iznos transakcija koje tek trebaju biti potvrđene, i još uvijek nisu uračunate u trenutni saldo + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + QR Code Dijalog + + + + Request Payment + Zatraži plaćanje + + + + Amount: + Iznos: + + + + Label: + Oznaka + + + + Message: + Poruka: + + + + &Save As... + &Spremi kao... + + + + 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. + Rezultirajući URI je predug, probajte umanjiti tekst za naslov / poruku. + + + + Save QR Code + + + + + PNG Images (*.png) + PNG slike (*.png) + + + + RPCConsole + + + Client name + + + + + + + + + + + + + + N/A + + + + + Client version + + + + + &Information + + + + + Using OpenSSL version + + + + + Startup time + + + + + Network + + + + + Number of connections + + + + + On testnet + + + + + Block chain + Lanac blokova + + + + Current number of blocks + Trenutni broj blokova + + + + Estimated total blocks + Procjenjeni ukupni broj blokova + + + + Last block time + Posljednje vrijeme bloka + + + + &Open + + + + + Command-line options + + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + Slanje novca + + + + Send to multiple recipients at once + Pošalji k nekoliko primatelja odjednom + + + + Add &Recipient + &Dodaj primatelja + + + + Remove all transaction fields + Obriši sva polja transakcija + + + + Clear &All + Obriši &sve + + + + Balance: + Stanje: + + + + 123.456 MEC + 123,456 MEC + + + + Confirm the send action + Potvrdi akciju slanja + + + + S&end + &Pošalji + + + + <b>%1</b> to %2 (%3) + <b>%1</b> do %2 (%3) + + + + Confirm send coins + Potvrdi slanje novca + + + + Are you sure you want to send %1? + Jeste li sigurni da želite poslati %1? + + + + and + i + + + + The recipient address is not valid, please recheck. + Adresa primatelja je nevaljala, molimo provjerite je ponovo. + + + + The amount to pay must be larger than 0. + Iznos mora biti veći od 0. + + + + The amount exceeds your balance. + Iznos je veći od stanja računa. + + + + The total exceeds your balance when the %1 transaction fee is included. + Iznos je veći od stanja računa kad se doda naknada za transakcije od %1. + + + + 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: 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. + Generirani novčići moraju pričekati nastanak 120 blokova prije nego što ih je moguće potrošiti. Kad ste generirali taj blok, on je bio emitiran u mrežu kako bi bio dodan postojećim lancima blokova. Ako ne uspije biti dodan, njegov status bit će promijenjen u "nije prihvatljiv" i on neće biti potrošiv. S vremena na vrijeme tako nešto se može desiti ako neki drugi nod približno istovremeno generira blok. + + + + SendCoinsEntry + + + Form + Oblik + + + + A&mount: + &Iznos: + + + + Pay &To: + &Primatelj plaćanja: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + 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: + + + + Choose address from address book + Odaberite adresu iz adresara + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Zalijepi adresu iz međuspremnika + + + + Alt+P + Alt+P + + + + Remove this recipient + Ukloni ovog primatelja + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Unesite curecoin adresu (npr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + + + + + &Sign Message + &Potpišite poruku + + + + 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. + Možete potpisati poruke sa svojom adresom kako bi dokazali da ih posjedujete. Budite oprezni da ne potpisujete ništa mutno, jer bi vas phishing napadi mogli na prevaru natjerati da prepišete svoj identitet njima. Potpisujte samo detaljno objašnjene izjave sa kojima se slažete. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Unesite curecoin adresu (npr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Odaberite adresu iz adresara + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Zalijepi adresu iz međuspremnika + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Upišite poruku koju želite potpisati ovdje + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + Reset all sign message fields + + + + + + Clear &All + Obriši &sve + + + + &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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Unesite curecoin adresu (npr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Unesite curecoin adresu (npr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Otvoren do %1 + + + + %1/offline + %1 nije dostupan + + + + %1/unconfirmed + %1/nepotvrđeno + + + + %1 confirmations + %1 potvrda + + + + Status + Status + + + + , broadcast through %n node(s) + + + + + Date + Datum + + + + Source + + + + + Generated + Generiran + + + + + From + Od + + + + + + To + Za + + + + + own address + + + + + label + oznaka + + + + + + + + Credit + Uplaćeno + + + + matures in %n more block(s) + + + + + not accepted + Nije prihvaćeno + + + + + + + Debit + Zaduženje + + + + Transaction fee + Naknada za transakciju + + + + Net amount + Neto iznos + + + + Message + Poruka + + + + Comment + Komentar + + + + Transaction ID + + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Generirani novčići moraju pričekati nastanak 120 blokova prije nego što ih je moguće potrošiti. Kad ste generirali taj blok, on je bio emitiran u mrežu kako bi bio dodan postojećim lancima blokova. Ako ne uspije biti dodan, njegov status bit će promijenjen u "nije prihvaćen" i on neće biti potrošiv. S vremena na vrijeme tako nešto se može desiti ako neki drugi nod generira blok u približno isto vrijeme. + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + Iznos + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + , još nije bio uspješno emitiran + + + + Open for %n more block(s) + + + + + unknown + nepoznato + + + + TransactionDescDialog + + + Transaction details + Detalji transakcije + + + + This pane shows a detailed description of the transaction + Ova panela prikazuje detaljni opis transakcije + + + + TransactionTableModel + + + Date + Datum + + + + Type + Tip + + + + Address + Adresa + + + + Amount + Iznos + + + + Open for %n more block(s) + + + + + Open until %1 + Otvoren do %1 + + + + Offline (%1 confirmations) + Nije na mreži (%1 potvrda) + + + + Unconfirmed (%1 of %2 confirmations) + Nepotvrđen (%1 od %2 potvrda) + + + + Confirmed (%1 confirmations) + Potvrđen (%1 potvrda) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + Generirano - Upozorenje: ovaj blok nije bio primljen od strane bilo kojeg drugog noda i vjerojatno neće biti prihvaćen! + + + + Generated but not accepted + Generirano, ali nije prihvaćeno + + + + Received with + Primljeno s + + + + Received from + Primljeno od + + + + Sent to + Poslano za + + + + Payment to yourself + Plaćanje samom sebi + + + + Mined + Rudareno + + + + (n/a) + (n/d) + + + + Transaction status. Hover over this field to show number of confirmations. + Status transakcije + + + + Date and time that the transaction was received. + Datum i vrijeme kad je transakcija primljena + + + + Type of transaction. + Vrsta transakcije. + + + + Destination address of transaction. + Odredište transakcije + + + + Amount removed from or added to balance. + Iznos odbijen od ili dodan k saldu. + + + + TransactionView + + + + All + Sve + + + + Today + Danas + + + + This week + Ovaj tjedan + + + + This month + Ovaj mjesec + + + + Last month + Prošli mjesec + + + + This year + Ove godine + + + + Range... + Raspon... + + + + Received with + Primljeno s + + + + Sent to + Poslano za + + + + To yourself + Tebi + + + + Mined + Rudareno + + + + Other + Ostalo + + + + Enter address or label to search + Unesite adresu ili oznaku za pretraživanje + + + + Min amount + Min iznos + + + + Copy address + Kopirati adresu + + + + Copy label + Kopirati oznaku + + + + Copy amount + Kopiraj iznos + + + + Copy transaction ID + + + + + Edit label + Izmjeniti oznaku + + + + Show transaction details + + + + + Export Transaction Data + Izvoz podataka transakcija + + + + Comma separated file (*.csv) + Datoteka podataka odvojenih zarezima (*.csv) + + + + Confirmed + Potvrđeno + + + + Date + Datum + + + + Type + Tip + + + + Label + Oznaka + + + + Address + Adresa + + + + Amount + Iznos + + + + ID + ID + + + + Error exporting + Izvoz pogreške + + + + Could not write to file %1. + Ne mogu pisati u datoteku %1. + + + + Range: + Raspon: + + + + to + za + + + + WalletModel + + + Send Coins + Slanje novca + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + Izvoz podataka iz trenutnog taba u datoteku + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + curecoin verzija + + + + Usage: + Upotreba: + + + + Send command to -server or curecoind + Pošalji komandu usluzi -server ili curecoind + + + + List commands + Prikaži komande + + + + Get help for a command + Potraži pomoć za komandu + + + + Options: + Postavke: + + + + Specify configuration file (default: curecoin.conf) + Odredi konfiguracijsku datoteku (ugrađeni izbor: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Odredi proces ID datoteku (ugrađeni izbor: curecoin.pid) + + + + Specify data directory + Odredi direktorij za datoteke + + + + Set database cache size in megabytes (default: 25) + Postavi cache za bazu podataka u MB (zadano:25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Slušaj na <port>u (default: 7951 ili testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Održavaj najviše <n> veza sa članovima (default: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + Threshold for disconnecting misbehaving peers (default: 100) + Prag za odspajanje članova koji se čudno ponašaju (default: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Broj sekundi koliko se članovima koji se čudno ponašaju neće dopustiti da se opet spoje (default: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Prihvaćaj JSON-RPC povezivanje na portu broj <port> (ugrađeni izbor: 7950 or testnet: 17950) + + + + Accept command line and JSON-RPC commands + Prihvati komande iz tekst moda i JSON-RPC + + + + Run in the background as a daemon and accept commands + Izvršavaj u pozadini kao uslužnik i prihvaćaj komande + + + + Use the test network + Koristi test mrežu + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Upozorenje: -paytxfee je podešen na preveliki iznos. To je iznos koji ćete platiti za obradu transakcije. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Upozorenje: Molimo provjerite jesu li datum i vrijeme na vašem računalu točni. Ako vaš sat ide krivo, curecoin neće raditi ispravno. + + + + 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: + Opcije za kreiranje bloka: + + + + Connect only to the specified node(s) + Poveži se samo sa određenim nodom + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + Importiraj blokove sa vanjskog blk000??.dat fajla + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + Nevaljala -tor adresa: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + Prihvati samo lance blokova koji se podudaraju sa ugrađenim checkpoint-ovima (default: 1) + + + + 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 + Dodaj izlaz debuga na početak sa vremenskom oznakom + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL postavke: (za detalje o podešavanju SSL opcija vidi curecoin Wiki) + + + + Select the version of socks proxy to use (4-5, default: 5) + + + + + Send trace/debug info to console instead of debug.log file + Šalji trace/debug informacije na konzolu umjesto u debug.log datoteku + + + + Send trace/debug info to debugger + Pošalji trace/debug informacije u debugger + + + + Set maximum block size in bytes (default: 250000) + Podesite maksimalnu veličinu bloka u bajtovima (default: 250000) + + + + Set minimum block size in bytes (default: 0) + Podesite minimalnu veličinu bloka u bajtovima (default: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Odredi vremenski prozor za spajanje na mrežu u milisekundama (ugrađeni izbor: 5000) + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Pokušaj koristiti UPnP da otvoriš port za uslugu (default: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Pokušaj koristiti UPnP da otvoriš port za uslugu (default: 1 when listening) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + Korisničko ime za JSON-RPC veze + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Lozinka za JSON-RPC veze + + + + Allow JSON-RPC connections from specified IP address + Dozvoli JSON-RPC povezivanje s određene IP adrese + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Pošalji komande nodu na adresi <ip> (ugrađeni izbor: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Izvršite naredbu kada se najbolji blok promjeni (%s u cmd je zamjenjen sa block hash) + + + + Upgrade wallet to latest format + Nadogradite novčanik u posljednji format. + + + + Set key pool size to <n> (default: 100) + Podesi memorijski prostor za ključeve na <n> (ugrađeni izbor: 100) + + + + Rescan the block chain for missing wallet transactions + Ponovno pretraži lanac blokova za transakcije koje nedostaju + + + + Use OpenSSL (https) for JSON-RPC connections + Koristi OpenSSL (https) za JSON-RPC povezivanje + + + + Server certificate file (default: server.cert) + Uslužnikov SSL certifikat (ugrađeni izbor: server.cert) + + + + Server private key (default: server.pem) + Uslužnikov privatni ključ (ugrađeni izbor: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Prihvaljivi načini šifriranja (ugrađeni izbor: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Ova poruka za pomoć + + + + 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 + Poveži se kroz socks proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Dozvoli DNS upite za dodavanje nodova i povezivanje + + + + Loading addresses... + Učitavanje adresa... + + + + Error loading wallet.dat: Wallet corrupted + Greška kod učitavanja wallet.dat: Novčanik pokvaren + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Greška kod učitavanja wallet.dat: Novčanik zahtjeva noviju verziju curecoina + + + + Wallet needed to be rewritten: restart curecoin to complete + Novčanik je trebao prepravak: ponovo pokrenite curecoin + + + + Error loading wallet.dat + Greška kod učitavanja wallet.dat + + + + Invalid -proxy address: '%s' + Nevaljala -proxy adresa: '%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' + Nevaljali iznos za opciju -paytxfee=<amount>: '%s' + + + + Invalid amount + Nevaljali iznos za opciju + + + + Insufficient funds + Nedovoljna sredstva + + + + Loading block index... + Učitavanje indeksa blokova... + + + + 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. curecoin is probably already running. + Program ne može koristiti %s na ovom računalu. curecoin program je vjerojatno već pokrenut. + + + + Fee per KB to add to transactions you send + Naknada posredniku po KB-u koja će biti dodana svakoj transakciji koju pošalješ + + + + Loading wallet... + Učitavanje novčanika... + + + + Cannot downgrade wallet + Nije moguće novčanik vratiti na prijašnju verziju. + + + + Cannot write default address + Nije moguće upisati zadanu adresu. + + + + Rescanning... + Rescaniranje + + + + Done loading + Učitavanje gotovo + + + + To use the %s option + + + + + Error + Greška + + + + 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/curecoin_hu.qm b/src/qt/locale/curecoin_hu.qm new file mode 100644 index 0000000..25be45e Binary files /dev/null and b/src/qt/locale/curecoin_hu.qm differ diff --git a/src/qt/locale/curecoin_hu.ts b/src/qt/locale/curecoin_hu.ts new file mode 100644 index 0000000..feb387a --- /dev/null +++ b/src/qt/locale/curecoin_hu.ts @@ -0,0 +1,2950 @@ + +UTF-8 + + AboutDialog + + + About curecoin + A curecoinról + + + + <b>curecoin</b> version + <b>curecoin</b> verzió + + + + +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. + +Ez egy kísérleti program. +MIT/X11 szoftverlicenc alatt kiadva, lásd a mellékelt fájlt COPYING vagy http://www.opensource.org/licenses/mit-license.php. + +Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (http://www.openssl.org/) és kriptográfiai szoftvertben való felhasználásra, írta Eric Young (eay@cryptsoft.com) és UPnP szoftver, írta Thomas Bernard. + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Címjegyzék + + + + Double-click to edit address or label + Dupla-kattintás a cím vagy a címke szerkesztéséhez + + + + Create a new address + Új cím létrehozása + + + + Copy the currently selected address to the system clipboard + A kiválasztott cím másolása a vágólapra + + + + &New Address + &Új cím + + + + These are your curecoin 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. + Ezekkel a curecoin-címekkel fogadhatod kifizetéseket. Érdemes lehet minden egyes kifizető számára külön címet létrehozni, hogy könnyebben nyomon követhesd, kitől kaptál már pénzt. + + + + &Copy Address + &Cím másolása + + + + Show &QR Code + &QR kód mutatása + + + + Sign a message to prove you own a curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + Jelenlegi nézet exportálása fájlba + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + Üzenet ellenőrzése, hogy valóban a megjelölt curecoin címekkel van-e aláírva. + + + + &Verify Message + Üzenet ellenőrzése + + + + &Delete + &Törlés + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Címke &másolása + + + + &Edit + Sz&erkesztés + + + + Send &Coins + + + + + Export Address Book Data + Címjegyzék adatainak exportálása + + + + Comma separated file (*.csv) + Vesszővel elválasztott fájl (*. csv) + + + + Error exporting + Hiba exportálás közben + + + + Could not write to file %1. + %1 nevű fájl nem írható. + + + + AddressTableModel + + + Label + Címke + + + + Address + Cím + + + + (no label) + (nincs címke) + + + + AskPassphraseDialog + + + Passphrase Dialog + Kulcsszó párbeszédablak + + + + Enter passphrase + Add meg a jelszót + + + + New passphrase + Új jelszó + + + + Repeat new passphrase + Új jelszó újra + + + + 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>. + Írd be az új jelszót a tárcához.<br/>Használj legalább 10<br/>véletlenszerű karaktert</b> vagy <b>legalább nyolc szót</b>. + + + + Encrypt wallet + Tárca kódolása + + + + This operation needs your wallet passphrase to unlock the wallet. + A tárcád megnyitásához a műveletnek szüksége van a tárcád jelszavára. + + + + Unlock wallet + Tárca megnyitása + + + + This operation needs your wallet passphrase to decrypt the wallet. + A tárcád dekódolásához a műveletnek szüksége van a tárcád jelszavára. + + + + Decrypt wallet + Tárca dekódolása + + + + Change passphrase + Jelszó megváltoztatása + + + + Enter the old and new passphrase to the wallet. + Írd be a tárca régi és új jelszavát. + + + + Confirm wallet encryption + Biztosan kódolni akarod a tárcát? + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Figyelem: Ha kódolod a tárcát, és elveszíted a jelszavad, akkor <b>AZ ÖSSZES curecoinODAT IS EL FOGOD VESZÍTENI!</b> + + + + Are you sure you wish to encrypt your wallet? + Biztosan kódolni akarod a tárcát? + + + + 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. + FONTOS: A pénztárca-fájl korábbi mentéseit ezzel az új, titkosított pénztárca-fájllal kell helyettesíteni. Biztonsági okokból a pénztárca-fájl korábbi titkosítás nélküli mentései haszontalanná válnak amint elkezdi használni az új, titkosított pénztárcát. + + + + + Warning: The Caps Lock key is on! + + + + + + Wallet encrypted + Tárca kódolva + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin will close now to finish the encryption process. Ne feledd, hogy a tárca titkosítása sem nyújt teljes védelmet az adathalász programok fertőzésével szemben. + + + + + + + Wallet encryption failed + Tárca kódolása sikertelen. + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Tárca kódolása belső hiba miatt sikertelen. A tárcád nem lett kódolva. + + + + + The supplied passphrases do not match. + A megadott jelszavak nem egyeznek. + + + + Wallet unlock failed + Tárca megnyitása sikertelen + + + + + + The passphrase entered for the wallet decryption was incorrect. + Hibás jelszó. + + + + Wallet decryption failed + Dekódolás sikertelen. + + + + Wallet passphrase was successfully changed. + Jelszó megváltoztatva. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Tárolt címek és címkék listájának szerkesztése + + + + Show the list of addresses for receiving payments + Kiizetést fogadó címek listája + + + + E&xit + &Kilépés + + + + Quit application + Kilépés + + + + Show information about curecoin + Információk a curecoinról + + + + 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... + + + + Importing blocks from disk... + A blokkok importálása lemezről... + + + + Reindexing blocks on disk... + A blokkok lemezen történő ujraindexelése... + + + + Send coins to a curecoin address + Érmék küldése megadott címre + + + + Modify configuration options for curecoin + curecoin konfigurációs opciók + + + + 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 + + + + + curecoin + curecoin + + + + Wallet + Tárca + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &A curecoinról + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + A pénztárcájához tartozó privát kulcsok titkosítása + + + + Sign messages with your curecoin addresses to prove you own them + Üzenet aláírása a curecoin címmel, amivel bizonyítja, hogy a cím az ön tulajdona. + + + + Verify messages to ensure they were signed with specified curecoin addresses + Annak ellenőrzése, hogy az üzenetek valóban a megjelölt curecoin címekkel vannak-e alaírva + + + + &File + &Fájl + + + + &Settings + &Beállítások + + + + &Help + &Súgó + + + + Tabs toolbar + Fül eszköztár + + + + + [testnet] + [teszthálózat] + + + + curecoin client + curecoin kliens + + + + %n active connection(s) to curecoin network + %n aktív kapcsolat a curecoin-hálózattal%n aktív kapcsolat a curecoin-hálózattal + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + A tranzakció-történet %1 blokkja feldolgozva. + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Naprakész + + + + Catching up... + Frissítés... + + + + Confirm transaction fee + Tranzakciós díj jóváhagyása + + + + 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 curecoin 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>. + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + EditAddressDialog + + + Edit Address + Cím szerkesztése + + + + &Label + Cím&ke + + + + The label associated with this address book entry + A címhez tartozó címke + + + + &Address + &Cím + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Az ehhez a címjegyzék-bejegyzéshez tartozó cím. Ez csak a küldő címeknél módosítható. + + + + 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 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 curecoin address. + A megadott "%1" cím nem egy érvényes curecoin-cím. + + + + Could not unlock wallet. + Tárca feloldása sikertelen + + + + New key generation failed. + Új kulcs generálása sikertelen + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + + + + + version + verzió + + + + Usage: + Használat: + + + + command-line options + parancssoros opciók + + + + UI options + UI opciók + + + + Set language, for example "de_DE" (default: system locale) + + + + + Start minimized + Indítás lekicsinyítve + + + + + Show splash screen on startup (default: 1) + + + + + OptionsDialog + + + Options + Opciók + + + + &Main + &Fő + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Tranzakciós &díj fizetése + + + + Automatically start curecoin after logging in to the system. + Induljon el a curecoin a számítógép bekapcsolásakor + + + + &Start curecoin on system login + &Induljon el a számítógép bekapcsolásakor + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + A curecoin-kliens portjának automatikus megnyitása a routeren. Ez csak akkor működik, ha a routered támogatja az UPnP-t és az engedélyezve is van rajta. + + + + Map port using &UPnP + &UPnP port-feltérképezés + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + SOCKS proxyn keresztüli csatlakozás a curecoin hálózatához (pl. Tor-on keresztüli csatlakozás esetén) + + + + &Connect through SOCKS proxy: + &Csatlakozás SOCKS proxyn keresztül: + + + + Proxy &IP: + + + + + IP address of the proxy (e.g. 127.0.0.1) + Proxy IP címe (pl.: 127.0.0.1) + + + + &Port: + + + + + Port of the proxy (e.g. 9050) + Proxy portja (pl.: 9050) + + + + SOCKS &Version: + + + + + SOCKS version of the proxy (e.g. 5) + + + + + &Window + + + + + Show only a tray icon after minimizing the window. + Kicsinyítés után csak eszköztár-ikont mutass + + + + &Minimize to the tray instead of the taskbar + &Kicsinyítés a tálcára az eszköztár helyett + + + + 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. + Az alkalmazásból való kilépés helyett az eszköztárba kicsinyíti az alkalmazást az ablak bezárásakor. Ez esetben az alkalmazás csak a Kilépés menüponttal zárható be. + + + + M&inimize on close + K&icsinyítés záráskor + + + + &Display + &Megjelenítés + + + + User Interface &language: + + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + + + + + &Unit to show amounts in: + &Mértékegység: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Válaszd ki az interfészen és érmék küldésekor megjelenítendő alapértelmezett alegységet. + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + &Címek megjelenítése a tranzakciólistában + + + + &OK + + + + + &Cancel + Megszakítás + + + + &Apply + Alkalmazás + + + + default + alapértelmezett + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + Figyelem + + + + + This setting will take effect after restarting curecoin. + Ez a beállítás a curecoin ujraindítása után lép érvénybe. + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + Űrlap + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + A kijelzett információ lehet, hogy elavult. A pénztárcája automatikusan szinkronizálja magát a curecoin hálózattal miután a kapcsolat létrejön, de ez e folyamat még nem fejeződött be. + + + + Balance: + Egyenleg: + + + + Unconfirmed: + Megerősítetlen: + + + + Wallet + Tárca + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Legutóbbi tranzakciók</b> + + + + Your current balance + Aktuális egyenleged + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Még megerősítésre váró, a jelenlegi egyenlegbe be nem számított tranzakciók + + + + + out of sync + Nincs szinkronban. + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + QR kód párbeszédablak + + + + Request Payment + Fizetés kérése + + + + Amount: + Összeg: + + + + Label: + Címke: + + + + Message: + Üzenet: + + + + &Save As... + Mentés má&sként + + + + Error encoding URI into QR Code. + Hiba lépett fel az URI QR kóddá alakításakor + + + + The entered amount is invalid, please check. + A megadott összeg nem érvényes. Kérem ellenőrizze. + + + + Resulting URI too long, try to reduce the text for label / message. + A keletkezett URI túl hosszú, próbálja meg csökkenteni a cimkeszöveg / üzenet méretét. + + + + Save QR Code + QR kód mentése + + + + PNG Images (*.png) + PNG Képfájlok (*.png) + + + + RPCConsole + + + Client name + Kliens néve + + + + + + + + + + + + + N/A + Nem elérhető + + + + Client version + Kliens verzió + + + + &Information + &Információ + + + + Using OpenSSL version + + + + + Startup time + Bekapcsolás ideje + + + + Network + Hálózat + + + + Number of connections + Kapcsolatok száma + + + + On testnet + Teszthálózaton + + + + Block chain + Blokklánc + + + + Current number of blocks + Aktuális blokkok száma + + + + Estimated total blocks + Becsült összes blokk + + + + Last block time + Utolsó blokk ideje + + + + &Open + &Megnyitás + + + + Command-line options + + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + &Konzol + + + + Build date + Fordítás dátuma + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + Konzol törlése + + + + Welcome to the curecoin RPC console. + + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Navigálhat a fel és le nyilakkal, és <b>Ctrl-L</b> -vel törölheti a képernyőt. + + + + Type <b>help</b> for an overview of available commands. + + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Érmék küldése + + + + 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 + Az összes tranzakciós mező eltávolítása + + + + Clear &All + Mindent &töröl + + + + Balance: + Egyenleg: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Küldés megerősítése + + + + S&end + &Küldés + + + + <b>%1</b> to %2 (%3) + <b>%1</b> %2-re (%3) + + + + Confirm send coins + Küldés megerősítése + + + + Are you sure you want to send %1? + Valóban el akarsz küldeni %1-t? + + + + and + és + + + + The recipient address is not valid, please recheck. + A címzett címe érvénytelen, kérlek, ellenőrizd. + + + + The amount to pay must be larger than 0. + A fizetendő összegnek nagyobbnak kell lennie 0-nál. + + + + The amount exceeds your balance. + Nincs ennyi curecoin az egyenlegeden. + + + + The total exceeds your balance when the %1 transaction fee is included. + A küldeni kívánt összeg és a %1 tranzakciós díj együtt meghaladja az egyenlegeden rendelkezésedre álló összeget. + + + + 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: 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. + Hiba: a tranzakciót elutasították. Ezt az okozhatja, ha már elköltöttél valamennyi érmét a tárcádból például ha a wallet.dat-od egy másolatát használtad, és így az elköltés csak abban lett jelölve, de itt nem. + + + + SendCoinsEntry + + + Form + Űrlap + + + + A&mount: + Összeg: + + + + Pay &To: + Címzett: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + 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: + + + + Choose address from address book + Válassz egy címet a címjegyzékből + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Cím beillesztése a vágólapról + + + + Alt+P + Alt+P + + + + Remove this recipient + Címzett eltávolítása + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adj meg egy curecoin-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L ) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + + + + + &Sign Message + Üzenet aláírása... + + + + 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. + Aláírhat a címeivel üzeneteket, amivel bizonyíthatja, hogy a címek az önéi. Vigyázzon, hogy ne írjon alá semmi félreérthetőt, mivel a phising támadásokkal megpróbálhatják becsapni, hogy az azonosságát átírja másokra. Csak olyan részletes állításokat írjon alá, amivel egyetért. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adj meg egy curecoin-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L ) + + + + + Choose an address from the address book + Válassz egy címet a címjegyzékből + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Cím beillesztése a vágólapról + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Ide írja az aláírandó üzenetet + + + + Signature + + + + + Copy the current signature to the system clipboard + A jelenleg kiválasztott aláírás másolása a rendszer-vágólapra + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + Reset all sign message fields + + + + + + Clear &All + Mindent &töröl + + + + &Verify Message + Üzenet ellenőrzése + + + + 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. + Írja be az aláírás címét, az üzenetet (ügyelve arra, hogy az új-sor, szóköz, tab, stb. karaktereket is pontosan) és az aláírást az üzenet ellenőrzéséhez. Ügyeljen arra, ne gondoljon többet az aláírásról, mint amennyi az aláírt szövegben ténylegesen áll, hogy elkerülje a köztes-ember (man-in-the-middle) támadást. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adj meg egy curecoin-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L ) + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adj meg egy curecoin-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L ) + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin signature + Adja meg a curecoin aláírást + + + + + The entered address is invalid. + A megadott cím nem érvényes. + + + + + + + Please check the address and try again. + Ellenőrizze a címet és próbálja meg újra. + + + + + 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [teszthálózat] + + + + TransactionDesc + + + Open until %1 + Megnyitva %1-ig + + + + %1/offline + + + + + %1/unconfirmed + %1/megerősítetlen + + + + %1 confirmations + %1 megerősítés + + + + Status + Állapot + + + + , broadcast through %n node(s) + + + + + Date + Dátum + + + + Source + + + + + Generated + Legenerálva + + + + + From + Űrlap + + + + + + To + Címzett + + + + + own address + + + + + label + címke + + + + + + + + Credit + Jóváírás + + + + matures in %n more block(s) + + + + + not accepted + elutasítva + + + + + + + Debit + Terhelés + + + + Transaction fee + Tranzakciós díj + + + + Net amount + Nettó összeg + + + + Message + Üzenet + + + + Comment + Megjegyzés + + + + Transaction ID + + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + A frissen generált érméket csak 120 blokkal később tudod elkölteni. Ez a blokk nyomban szétküldésre került a hálózatba, amint legeneráltad, hogy hozzáadhassák a blokklánchoz. Ha nem kerül be a láncba, úgy az állapota "elutasítva"-ra módosul, és nem költheted el az érméket. Ez akkor következhet be időnként, ha egy másik csomópont mindössze néhány másodperc különbséggel generált le egy blokkot a tiédhez képest. + + + + Debug information + + + + + Transaction + Tranzakció + + + + Inputs + + + + + Amount + Összeg + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + , még nem sikerült elküldeni. + + + + Open for %n more block(s) + + + + + unknown + ismeretlen + + + + TransactionDescDialog + + + Transaction details + Tranzakció részletei + + + + This pane shows a detailed description of the transaction + Ez a mező a tranzakció részleteit mutatja + + + + TransactionTableModel + + + Date + Dátum + + + + Type + Típus + + + + Address + Cím + + + + Amount + Összeg + + + + Open for %n more block(s) + + + + + Open until %1 + %1-ig megnyitva + + + + Offline (%1 confirmations) + Offline (%1 megerősítés) + + + + Unconfirmed (%1 of %2 confirmations) + Megerősítetlen (%1 %2 megerősítésből) + + + + Confirmed (%1 confirmations) + Megerősítve (%1 megerősítés) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + Ezt a blokkot egyetlen másik csomópont sem kapta meg, így valószínűleg nem lesz elfogadva! + + + + Generated but not accepted + Legenerálva, de még el nem fogadva. + + + + Received with + Erre a címre + + + + Received from + Erről az + + + + Sent to + Erre a címre + + + + Payment to yourself + Magadnak kifizetve + + + + Mined + Kibányászva + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Tranzakció fogadásának dátuma és időpontja. + + + + Type of transaction. + Tranzakció típusa. + + + + Destination address of transaction. + A tranzakció címzettjének címe. + + + + Amount removed from or added to balance. + Az egyenleghez jóváírt vagy ráterhelt összeg. + + + + TransactionView + + + + All + Mind + + + + Today + Mai + + + + This week + Ezen a héten + + + + This month + Ebben a hónapban + + + + Last month + Múlt hónapban + + + + This year + Ebben az évben + + + + Range... + Tartomány ... + + + + Received with + Erre a címre + + + + Sent to + Erre a címre + + + + To yourself + Magadnak + + + + Mined + Kibányászva + + + + Other + Más + + + + Enter address or label to search + Írd be a keresendő címet vagy címkét + + + + Min amount + Minimális összeg + + + + Copy address + Cím másolása + + + + Copy label + Címke másolása + + + + Copy amount + Összeg másolása + + + + Copy transaction ID + + + + + Edit label + Címke szerkesztése + + + + Show transaction details + Tranzakciós részletek megjelenítése + + + + Export Transaction Data + Tranzakció adatainak exportálása + + + + Comma separated file (*.csv) + Vesszővel elválasztott fájl (*.csv) + + + + Confirmed + Megerősítve + + + + Date + Dátum + + + + Type + Típus + + + + Label + Címke + + + + Address + Cím + + + + Amount + Összeg + + + + ID + Azonosító + + + + Error exporting + Hiba lépett fel exportálás közben + + + + Could not write to file %1. + %1 fájlba való kiírás sikertelen. + + + + Range: + Tartomány: + + + + to + meddig + + + + WalletModel + + + Send Coins + Érmék küldése + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + Jelenlegi nézet exportálása fájlba + + + + Backup Wallet + Biztonsági másolat készítése a Tárcáról + + + + Wallet Data (*.dat) + Tárca fájl (*.dat) + + + + Backup Failed + Biztonsági másolat készítése sikertelen + + + + There was an error trying to save the wallet data to the new location. + Hiba lépett fel a Tárca másik helyre való mentése közben + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + curecoin verzió + + + + Usage: + Használat: + + + + Send command to -server or curecoind + Parancs küldése a -serverhez vagy a curecoindhez + + + + + List commands + Parancsok kilistázása + + + + + Get help for a command + Segítség egy parancsról + + + + + Options: + Opciók + + + + + Specify configuration file (default: curecoin.conf) + Konfigurációs fájl (alapértelmezett: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + pid-fájl (alapértelmezett: curecoind.pid) + + + + + Specify data directory + Adatkönyvtár + + + + + Set database cache size in megabytes (default: 25) + Az adatbázis gyorsítótár mérete megabájtban (alapértelmezés: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Csatlakozásokhoz figyelendő <port> (alapértelmezett: 7951 or testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Maximálisan <n> számú kapcsolat fenntartása a peerekkel (alapértelmezés: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Kapcsolódás egy csomóponthoz a peerek címeinek megszerzése miatt, majd szétkapcsolás + + + + Specify your own public address + Adja meg az Ön saját nyilvános címét + + + + Threshold for disconnecting misbehaving peers (default: 100) + Helytelenül viselkedő peerek leválasztási határértéke (alapértelmezés: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Helytelenül viselkedő peerek kizárási ideje másodpercben (alapértelmezés: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + JSON-RPC csatlakozásokhoz figyelendő <port> (alapértelmezett: 7950 or testnet: 17950) + + + + Accept command line and JSON-RPC commands + Parancssoros és JSON-RPC parancsok elfogadása + + + + + Run in the background as a daemon and accept commands + Háttérben futtatás daemonként és parancsok elfogadása + + + + + Use the test network + Teszthálózat használata + + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Figyelem: a -paytxfee nagyon magas. Ennyi tranzakciós díjat fogsz fizetni, ha elküldöd a tranzakciót. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Figyelem: Ellenőrizd, hogy helyesen van-e beállítva a gépeden a dátum és az idő. A curecoin nem fog megfelelően működni, ha rosszul van beállítvaaz órád. + + + + 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) + Csatlakozás csak a megadott csomóponthoz + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + Érvénytelen -tor cím: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + Csak blokklánccal egyező beépített ellenőrző pontok elfogadása (alapértelmezés: 1) + + + + 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 + Időbélyeges hibakeresési kimenet hozzáadása az elejéhez + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL-opciók: (lásd a curecoin Wiki SSL-beállítási instrukcióit) + + + + Select the version of socks proxy to use (4-5, default: 5) + + + + + Send trace/debug info to console instead of debug.log file + trace/debug információ küldése a konzolra a debog.log fájl helyett + + + + Send trace/debug info to debugger + trace/debug információ küldése a debuggerre + + + + 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Csatlakozás időkerete milliszekundumban (alapértelmezett: 5000) + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + UPnP-használat engedélyezése a figyelő port feltérképezésénél (default: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + UPnP-használat engedélyezése a figyelő port feltérképezésénél (default: 1 when listening) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + Felhasználói név JSON-RPC csatlakozásokhoz + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Jelszó JSON-RPC csatlakozásokhoz + + + + + Allow JSON-RPC connections from specified IP address + JSON-RPC csatlakozások engedélyezése meghatározott IP-címről + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Parancsok küldése <ip> címen működő csomóponthoz (alapértelmezett: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Parancs, amit akkor hajt végre, amikor a legjobb blokk megváltozik (%s a cmd-ban lecserélődik a blokk hash-re) + + + + Upgrade wallet to latest format + A Tárca frissítése a legfrissebb formátumra + + + + Set key pool size to <n> (default: 100) + Kulcskarika mérete <n> (alapértelmezett: 100) + + + + + Rescan the block chain for missing wallet transactions + Blokklánc újraszkennelése hiányzó tárca-tranzakciók után + + + + + Use OpenSSL (https) for JSON-RPC connections + OpenSSL (https) használata JSON-RPC csatalkozásokhoz + + + + + Server certificate file (default: server.cert) + Szervertanúsítvány-fájl (alapértelmezett: server.cert) + + + + + Server private key (default: server.pem) + Szerver titkos kulcsa (alapértelmezett: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Elfogadható rejtjelkulcsok (alapértelmezett: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH ) + + + + + This help message + Ez a súgó-üzenet + + + + + 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 + Csatlakozás SOCKS proxyn keresztül + + + + Allow DNS lookups for -addnode, -seednode and -connect + DNS-kikeresés engedélyezése az addnode-nál és a connect-nél + + + + Loading addresses... + Címek betöltése... + + + + Error loading wallet.dat: Wallet corrupted + Hiba a wallet.dat betöltése közben: meghibásodott tárca + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Hiba a wallet.dat betöltése közben: ehhez a tárcához újabb verziójú curecoin-kliens szükséges + + + + Wallet needed to be rewritten: restart curecoin to complete + A Tárca újraírása szükséges: Indítsa újra a teljesen a curecoin-t + + + + Error loading wallet.dat + Hiba az wallet.dat betöltése közben + + + + Invalid -proxy address: '%s' + Érvénytelen -proxy cím: '%s' + + + + Unknown network specified in -onlynet: '%s' + Ismeretlen hálózat lett megadva -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Ismeretlen -socks proxy kérése: %i + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + Étvénytelen -paytxfee=<összeg> összeg: '%s' + + + + Invalid amount + Étvénytelen összeg + + + + Insufficient funds + Nincs elég curecoinod. + + + + Loading block index... + Blokkindex betöltése... + + + + 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. curecoin is probably already running. + A %s nem elérhető ezen a gépen. A curecoin valószínűleg fut már. + + + + Fee per KB to add to transactions you send + kB-onként felajánlandó díj az általad küldött tranzakciókhoz + + + + Loading wallet... + Tárca betöltése... + + + + Cannot downgrade wallet + Nem sikerült a Tárca visszaállítása a korábbi verzióra + + + + Cannot write default address + Nem sikerült az alapértelmezett címet írni. + + + + Rescanning... + Újraszkennelés... + + + + Done loading + Betöltés befejezve. + + + + To use the %s option + Használd a %s opciót + + + + Error + Hiba + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Be kell állítani rpcpassword=<password> a konfigurációs fájlban +%s +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 diff --git a/src/qt/locale/curecoin_it.qm b/src/qt/locale/curecoin_it.qm new file mode 100644 index 0000000..12e07a9 Binary files /dev/null and b/src/qt/locale/curecoin_it.qm differ diff --git a/src/qt/locale/curecoin_it.ts b/src/qt/locale/curecoin_it.ts new file mode 100644 index 0000000..a730b37 --- /dev/null +++ b/src/qt/locale/curecoin_it.ts @@ -0,0 +1,2950 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Info su curecoin + + + + <b>curecoin</b> version + Versione di <b>curecoin</b> + + + + +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. + +Questo è un software sperimentale. + +Distribuito sotto la licenza software MIT/X11, vedi il file COPYING incluso oppure su http://www.opensource.org/licenses/mit-license.php. + +Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso del Toolkit OpenSSL (http://www.openssl.org/), software crittografico scritto da Eric Young (eay@cryptsoft.com) e software UPnP scritto da Thomas Bernard. + + + + Copyright + Copyright + + + + Dr. Kimoto Chan + Sviluppatori di curecoin + + + + AddressBookPage + + + Address Book + Rubrica + + + + Double-click to edit address or label + Fai doppio click per modificare o cancellare l'etichetta + + + + Create a new address + Crea un nuovo indirizzo + + + + Copy the currently selected address to the system clipboard + Copia l'indirizzo attualmente selezionato nella clipboard + + + + &New Address + &Nuovo indirizzo + + + + These are your curecoin 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. + Questi sono i tuoi indirizzi curecoin per ricevere pagamenti. Potrai darne uno diverso ad ognuno per tenere così traccia di chi ti sta pagando. + + + + &Copy Address + &Copia l'indirizzo + + + + Show &QR Code + Mostra il codice &QR + + + + Sign a message to prove you own a curecoin address + Firma un messaggio per dimostrare di possedere questo indirizzo + + + + Sign &Message + Firma il &messaggio + + + + Delete the currently selected address from the list + Cancella l'indirizzo attualmente selezionato dalla lista + + + + Export the data in the current tab to a file + Esporta i dati nella tabella corrente su un file + + + + &Export + &Esporta... + + + + Verify a message to ensure it was signed with a specified curecoin address + Verifica un messaggio per accertarsi che sia firmato con un indirizzo curecoin specifico + + + + &Verify Message + &Verifica Messaggio + + + + &Delete + &Cancella + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Copia &l'etichetta + + + + &Edit + &Modifica + + + + Send &Coins + Invia &curecoin + + + + Export Address Book Data + Esporta gli indirizzi della rubrica + + + + Comma separated file (*.csv) + Testo CSV (*.csv) + + + + Error exporting + Errore nell'esportazione + + + + Could not write to file %1. + Impossibile scrivere sul file %1. + + + + AddressTableModel + + + Label + Etichetta + + + + Address + Indirizzo + + + + (no label) + (nessuna etichetta) + + + + AskPassphraseDialog + + + Passphrase Dialog + Finestra passphrase + + + + Enter passphrase + Inserisci la passphrase + + + + New passphrase + Nuova passphrase + + + + Repeat new passphrase + Ripeti la passphrase + + + + 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>. + Inserisci la passphrase per il portamonete.<br/>Per piacere usare unapassphrase di <b>10 o più caratteri casuali</b>, o <b>otto o più parole</b>. + + + + Encrypt wallet + Cifra il portamonete + + + + This operation needs your wallet passphrase to unlock the wallet. + Quest'operazione necessita della passphrase per sbloccare il portamonete. + + + + Unlock wallet + Sblocca il portamonete + + + + This operation needs your wallet passphrase to decrypt the wallet. + Quest'operazione necessita della passphrase per decifrare il portamonete, + + + + Decrypt wallet + Decifra il portamonete + + + + Change passphrase + Cambia la passphrase + + + + Enter the old and new passphrase to the wallet. + Inserisci la vecchia e la nuova passphrase per il portamonete. + + + + Confirm wallet encryption + Conferma la cifratura del portamonete + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Attenzione: se si cifra il portamonete e si perde la frase d'ordine, <b>SI PERDERANNO TUTTI I PROPRI curecoin</b>! + + + + Are you sure you wish to encrypt your wallet? + Si è sicuri di voler cifrare il portamonete? + + + + 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: qualsiasi backup del portafoglio effettuato precedentemente dovrebbe essere sostituito con il file del portafoglio criptato appena generato. Per ragioni di sicurezza, i backup precedenti del file del portafoglio non criptato diventeranno inservibili non appena si inizi ad usare il nuovo portafoglio criptato. + + + + + Warning: The Caps Lock key is on! + Attenzione: tasto Blocco maiuscole attivo. + + + + + Wallet encrypted + Portamonete cifrato + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin verrà ora chiuso per finire il processo di crittazione. Ricorda che criptare il tuo portamonete non può fornire una protezione totale contro furti causati da malware che dovessero infettare il tuo computer. + + + + + + + Wallet encryption failed + Cifratura del portamonete fallita + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Cifratura del portamonete fallita a causa di un errore interno. Il portamonete non è stato cifrato. + + + + + The supplied passphrases do not match. + Le passphrase inserite non corrispondono. + + + + Wallet unlock failed + Sblocco del portamonete fallito + + + + + + The passphrase entered for the wallet decryption was incorrect. + La passphrase inserita per la decifrazione del portamonete è errata. + + + + Wallet decryption failed + Decifrazione del portamonete fallita + + + + Wallet passphrase was successfully changed. + Passphrase del portamonete modificata con successo. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Modifica la lista degli indirizzi salvati e delle etichette + + + + Show the list of addresses for receiving payments + Mostra la lista di indirizzi su cui ricevere pagamenti + + + + E&xit + &Esci + + + + Quit application + Chiudi applicazione + + + + Show information about curecoin + Mostra informazioni su curecoin + + + + 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... + + + + Importing blocks from disk... + Importa blocchi dal disco... + + + + Reindexing blocks on disk... + Re-indicizzazione blocchi su disco... + + + + Send coins to a curecoin address + Invia monete ad un indirizzo curecoin + + + + Modify configuration options for curecoin + Modifica configurazione opzioni per curecoin + + + + 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... + + + + + curecoin + curecoin + + + + Wallet + Portamonete + + + + &Send + &Spedisci + + + + &Receive + &Ricevi + + + + &Addresses + &Indirizzi + + + + &About curecoin + &Info su curecoin + + + + &Show / Hide + &Mostra/Nascondi + + + + Show or hide the main Window + Mostra o nascondi la Finestra principale + + + + Encrypt the private keys that belong to your wallet + Crittografa le chiavi private che appartengono al tuo portafoglio + + + + Sign messages with your curecoin addresses to prove you own them + Firma i messaggi con il tuo indirizzo curecoin per dimostrare di possederli + + + + Verify messages to ensure they were signed with specified curecoin addresses + Verifica i messaggi per accertarsi che siano stati firmati con gli indirizzi curecoin specificati + + + + &File + &File + + + + &Settings + &Impostazioni + + + + &Help + &Aiuto + + + + Tabs toolbar + Barra degli strumenti "Tabs" + + + + + [testnet] + [testnet] + + + + curecoin client + curecoin client + + + + %n active connection(s) to curecoin network + %n connessione attiva alla rete curecoin%n connessioni attive alla rete curecoin + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Processati %1 di %2 (circa) blocchi della cronologia transazioni. + + + + Processed %1 blocks of transaction history. + Processati %1 blocchi della cronologia transazioni. + + + + %n hour(s) + %n ora%n ore + + + + %n day(s) + %n giorno%n giorni + + + + %n week(s) + %n settimana%n settimane + + + + %1 behind + + + + + Last received block was generated %1 ago. + L'ultimo blocco ricevuto è stato generato %1 fa. + + + + Transactions after this will not yet be visible. + + + + + Error + Errore + + + + Warning + Attenzione + + + + Information + Informazione + + + + 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? + Questa transazione è superiore al limite di dimensione. È comunque possibile inviarla con una commissione di %1, che va ai nodi che processano la tua transazione e contribuisce a sostenere la rete. Vuoi pagare la commissione? + + + + Up to date + Aggiornato + + + + Catching up... + In aggiornamento... + + + + Confirm transaction fee + Conferma compenso transazione + + + + 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 + Gestione URI + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + Impossibile interpretare l'URI! Ciò può essere causato da un indirizzo curecoin invalido o da parametri URI non corretti. + + + + 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Riscontrato un errore irreversibile. curecoin non può più continuare in sicurezza e verrà terminato. + + + + ClientModel + + + Network Alert + Avviso di rete + + + + EditAddressDialog + + + Edit Address + Modifica l'indirizzo + + + + &Label + &Etichetta + + + + The label associated with this address book entry + L'etichetta associata a questo indirizzo nella rubrica + + + + &Address + &Indirizzo + + + + The address associated with this address book entry. This can only be modified for sending addresses. + L'indirizzo associato a questa voce della rubrica. Si può modificare solo negli indirizzi di spedizione. + + + + 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 already in the address book. + L'indirizzo inserito "%1" è già in rubrica. + + + + The entered address "%1" is not a valid curecoin address. + L'indirizzo inserito "%1" non è un indirizzo curecoin valido. + + + + Could not unlock wallet. + Impossibile sbloccare il portamonete. + + + + New key generation failed. + Generazione della nuova chiave non riuscita. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versione + + + + Usage: + Utilizzo: + + + + command-line options + opzioni riga di comando + + + + UI options + UI opzioni + + + + Set language, for example "de_DE" (default: system locale) + Imposta lingua, ad esempio "it_IT" (predefinita: lingua di sistema) + + + + Start minimized + Parti in icona + + + + + Show splash screen on startup (default: 1) + Mostra finestra di presentazione all'avvio (default: 1) + + + + OptionsDialog + + + Options + Opzioni + + + + &Main + &Principale + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Paga la &commissione + + + + Automatically start curecoin after logging in to the system. + Avvia automaticamente curecoin all'accensione del computer + + + + &Start curecoin on system login + &Fai partire curecoin all'avvio del sistema + + + + Reset all client options to default. + Ripristina tutte le opzioni del client alle predefinite. + + + + &Reset Options + &Ripristina Opzioni + + + + &Network + Rete + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Apri automaticamente la porta del client curecoin sul router. Questo funziona solo se il router supporta UPnP ed è abilitato. + + + + Map port using &UPnP + Mappa le porte tramite l'&UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Connettiti alla rete Bitcon attraverso un proxy SOCKS (ad esempio quando ci si collega via Tor) + + + + &Connect through SOCKS proxy: + &Collegati tramite SOCKS proxy: + + + + Proxy &IP: + &IP del proxy: + + + + IP address of the proxy (e.g. 127.0.0.1) + Indirizzo IP del proxy (ad esempio 127.0.0.1) + + + + &Port: + &Porta: + + + + Port of the proxy (e.g. 9050) + Porta del proxy (es. 9050) + + + + SOCKS &Version: + SOCKS &Version: + + + + SOCKS version of the proxy (e.g. 5) + Versione SOCKS del proxy (es. 5) + + + + &Window + &Finestra + + + + Show only a tray icon after minimizing the window. + Mostra solo un'icona nel tray quando si minimizza la finestra + + + + &Minimize to the tray instead of the taskbar + &Minimizza sul tray invece che sulla barra delle applicazioni + + + + 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. + Riduci ad icona, invece di uscire dall'applicazione quando la finestra viene chiusa. Quando questa opzione è attivata, l'applicazione verrà chiusa solo dopo aver selezionato Esci nel menu. + + + + M&inimize on close + M&inimizza alla chiusura + + + + &Display + &Mostra + + + + User Interface &language: + &Lingua Interfaccia Utente: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + La lingua dell'interfaccia utente può essere impostata qui. L'impostazione avrà effetto dopo il riavvio di curecoin. + + + + &Unit to show amounts in: + &Unità di misura degli importi in: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Scegli l'unità di suddivisione di default per l'interfaccia e per l'invio di monete + + + + Whether to show curecoin addresses in the transaction list or not. + Se mostrare l'indirizzo curecoin nella transazione o meno. + + + + &Display addresses in transaction list + &Mostra gli indirizzi nella lista delle transazioni + + + + &OK + &OK + + + + &Cancel + &Cancella + + + + &Apply + &Applica + + + + default + default + + + + Confirm options reset + Conferma ripristino opzioni + + + + Some settings may require a client restart to take effect. + Alcune modifiche necessitano del riavvio del programma per essere salvate. + + + + Do you want to proceed? + Vuoi procedere? + + + + + Warning + Attenzione + + + + + This setting will take effect after restarting curecoin. + L'impostazione avrà effetto dopo il riavvio di curecoin. + + + + The supplied proxy address is invalid. + L'indirizzo proxy che hai fornito è invalido. + + + + OverviewPage + + + Form + Modulo + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Le informazioni visualizzate sono datate. Il tuo partafogli verrà sincronizzato automaticamente con il network curecoin dopo che la connessione è stabilita, ma questo processo non può essere completato ora. + + + + Balance: + Saldo + + + + Unconfirmed: + Non confermato: + + + + Wallet + Portamonete + + + + Immature: + Immaturo: + + + + Mined balance that has not yet matured + Importo scavato che non è ancora maturato + + + + <b>Recent transactions</b> + <b>Transazioni recenti</b> + + + + Your current balance + Saldo attuale + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Totale delle transazioni in corso di conferma, che non sono ancora incluse nel saldo attuale + + + + + out of sync + fuori sincrono + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + Codice QR di dialogo + + + + Request Payment + Richiedi pagamento + + + + Amount: + Importo: + + + + Label: + Etichetta: + + + + Message: + Messaggio: + + + + &Save As... + &Salva come... + + + + Error encoding URI into QR Code. + Errore nella codifica URI nel codice QR + + + + The entered amount is invalid, please check. + L'importo specificato non è valido, prego verificare. + + + + Resulting URI too long, try to reduce the text for label / message. + L'URI risulta troppo lungo, prova a ridurre il testo nell'etichetta / messaggio. + + + + Save QR Code + Salva codice QR + + + + PNG Images (*.png) + Immagini PNG (*.png) + + + + RPCConsole + + + Client name + Nome del client + + + + + + + + + + + + + N/A + N/D + + + + Client version + Versione client + + + + &Information + &Informazione + + + + Using OpenSSL version + Versione OpenSSL in uso + + + + Startup time + Tempo di avvio + + + + Network + Rete + + + + Number of connections + Numero connessioni + + + + On testnet + Nel testnet + + + + Block chain + Block chain + + + + Current number of blocks + Numero attuale di blocchi + + + + Estimated total blocks + Numero totale stimato di blocchi + + + + Last block time + Ora dell blocco piu recente + + + + &Open + &Apri + + + + Command-line options + opzioni riga di comando + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Mostra il messaggio di aiuto di curecoin-QT per avere la lista di tutte le opzioni della riga di comando di curecoin. + + + + &Show + &Mostra + + + + &Console + &Console + + + + Build date + Data di creazione + + + + curecoin - Debug window + curecoin - Finestra debug + + + + curecoin Core + + + + + Debug log file + File log del Debug + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Apri il file di log del debug di curecoin dalla cartella attuale. Può richiedere alcuni secondi per file di log grandi. + + + + Clear console + Svuota console + + + + Welcome to the curecoin RPC console. + Benvenuto nella console RPC di curecoin + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Usa le frecce direzionali per navigare la cronologia, and <b>Ctrl-L</b> per cancellarla. + + + + Type <b>help</b> for an overview of available commands. + Scrivi <b>help</b> per un riassunto dei comandi disponibili + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Spedisci curecoin + + + + Send to multiple recipients at once + Spedisci a diversi beneficiari in una volta sola + + + + Add &Recipient + &Aggiungi beneficiario + + + + Remove all transaction fields + Rimuovi tutti i campi della transazione + + + + Clear &All + Cancella &tutto + + + + Balance: + Saldo: + + + + 123.456 MEC + 123,456 MEC + + + + Confirm the send action + Conferma la spedizione + + + + S&end + &Spedisci + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send coins + Conferma la spedizione di curecoin + + + + Are you sure you want to send %1? + Si è sicuri di voler spedire %1? + + + + and + e + + + + The recipient address is not valid, please recheck. + L'indirizzo del beneficiario non è valido, per cortesia controlla. + + + + The amount to pay must be larger than 0. + L'importo da pagare dev'essere maggiore di 0. + + + + The amount exceeds your balance. + L'importo è superiore al saldo attuale + + + + The total exceeds your balance when the %1 transaction fee is included. + Il totale è superiore al saldo attuale includendo la commissione %1. + + + + 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: Transaction creation failed! + Errore: Creazione transazione fallita! + + + + 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. + Errore: la transazione è stata rifiutata. Ciò accade se alcuni curecoin nel portamonete sono stati già spesi, ad esempio se è stata usata una copia del file wallet.dat e i curecoin sono stati spesi dalla copia ma non segnati come spesi qui. + + + + SendCoinsEntry + + + Form + Modulo + + + + A&mount: + &Importo: + + + + Pay &To: + Paga &a: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + L'indirizzo del beneficiario a cui inviare il pagamento (ad esempio 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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 + + + + Choose address from address book + Scegli l'indirizzo dalla rubrica + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Incollare l'indirizzo dagli appunti + + + + Alt+P + Alt+P + + + + Remove this recipient + Rimuovere questo beneficiario + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Inserisci un indirizzo curecoin (ad esempio 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Firme - Firma / Verifica un messaggio + + + + &Sign Message + &Firma il messaggio + + + + 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. + Puoi firmare messeggi con i tuoi indirizzi per dimostrare che sono tuoi. Fai attenzione a non firmare niente di vago, visto che gli attacchi di phishing potrebbero cercare di spingerti a mettere la tua firma su di loro. Firma solo dichiarazioni completamente dettagliate con cui sei d'accordo. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Inserisci un indirizzo curecoin (ad esempio 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Scegli l'indirizzo dalla rubrica + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Incollare l'indirizzo dagli appunti + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Inserisci qui il messaggio che vuoi firmare + + + + Signature + Firma + + + + Copy the current signature to the system clipboard + Copia la firma corrente nella clipboard + + + + Sign the message to prove you own this curecoin address + Firma un messaggio per dimostrare di possedere questo indirizzo + + + + Sign &Message + Firma &messaggio + + + + Reset all sign message fields + Reimposta tutti i campi della firma + + + + + Clear &All + Cancella &tutto + + + + &Verify Message + &Verifica Messaggio + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Inserisci un indirizzo curecoin (ad esempio 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Verifica il messaggio per assicurarsi che sia stato firmato con l'indirizzo curecoin specificato + + + + Verify &Message + &Verifica Messaggio + + + + Reset all verify message fields + Reimposta tutti i campi della verifica messaggio + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Inserisci un indirizzo curecoin (ad esempio 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Clicca "Firma il messaggio" per ottenere la firma + + + + Enter curecoin signature + Inserisci firma curecoin + + + + + The entered address is invalid. + L'indirizzo inserito non è valido. + + + + + + + Please check the address and try again. + Per favore controlla l'indirizzo e prova ancora + + + + + The entered address does not refer to a key. + L'indirizzo curecoin inserito non è associato a nessuna chiave. + + + + Wallet unlock was cancelled. + Sblocco del portafoglio annullato. + + + + Private key for the entered address is not available. + La chiave privata per l'indirizzo inserito non è disponibile. + + + + Message signing failed. + Firma messaggio fallita. + + + + Message signed. + Messaggio firmato. + + + + The signature could not be decoded. + Non è stato possibile decodificare la firma. + + + + + Please check the signature and try again. + Per favore controlla la firma e prova ancora. + + + + The signature did not match the message digest. + La firma non corrisponde al sunto del messaggio. + + + + Message verification failed. + Verifica messaggio fallita. + + + + Message verified. + Messaggio verificato. + + + + SplashScreen + + + Dr. Kimoto Chan + Sviluppatori di curecoin + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Aperto fino a %1 + + + + %1/offline + %1/offline + + + + %1/unconfirmed + %1/non confermato + + + + %1 confirmations + %1 conferme + + + + Status + Stato + + + + , broadcast through %n node(s) + , trasmesso attraverso %n nodo, trasmesso attraverso %n nodi + + + + Date + Data + + + + Source + Sorgente + + + + Generated + Generato + + + + + From + Da + + + + + + To + A + + + + + own address + proprio indirizzo + + + + label + etichetta + + + + + + + + Credit + Credito + + + + matures in %n more block(s) + matura in %n ulteriore bloccomatura in altri %n blocchi + + + + not accepted + non accettate + + + + + + + Debit + Debito + + + + Transaction fee + Tranzakciós díj + + + + Net amount + Importo netto + + + + Message + Messaggio + + + + Comment + Commento + + + + Transaction ID + ID della transazione + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Bisogna attendere 120 blocchi prima di spendere I curecoin generati. Quando è stato generato questo blocco, è stato trasmesso alla rete per aggiungerlo alla catena di blocchi. Se non riesce a entrare nella catena, verrà modificato in "non accettato" e non sarà spendibile. Questo può accadere a volte, se un altro nodo genera un blocco entro pochi secondi del tuo. + + + + Debug information + Informazione di debug + + + + Transaction + Transazione + + + + Inputs + Input + + + + Amount + Importo + + + + true + vero + + + + false + falso + + + + , has not been successfully broadcast yet + , non è stato ancora trasmesso con successo + + + + Open for %n more block(s) + Aperto per %n altro bloccoAperto per altri %n blocchi + + + + unknown + sconosciuto + + + + TransactionDescDialog + + + Transaction details + Dettagli sulla transazione + + + + This pane shows a detailed description of the transaction + Questo pannello mostra una descrizione dettagliata della transazione + + + + TransactionTableModel + + + Date + Data + + + + Type + Tipo + + + + Address + Indirizzo + + + + Amount + Importo + + + + Open for %n more block(s) + Aperto per %n altro bloccoAperto per altri %n blocchi + + + + Open until %1 + Aperto fino a %1 + + + + Offline (%1 confirmations) + Offline (%1 conferme) + + + + Unconfirmed (%1 of %2 confirmations) + Non confermati (%1 su %2 conferme) + + + + Confirmed (%1 confirmations) + Confermato (%1 conferme) + + + + Mined balance will be available when it matures in %n more block(s) + Il saldo generato sarà disponibile quando maturerà in %n altro bloccoIl saldo generato sarà disponibile quando maturerà in altri %n blocchi + + + + This block was not received by any other nodes and will probably not be accepted! + Questo blocco non è stato ricevuto da altri nodi e probabilmente non sarà accettato! + + + + Generated but not accepted + Generati, ma non accettati + + + + Received with + Ricevuto tramite + + + + Received from + Ricevuto da + + + + Sent to + Spedito a + + + + Payment to yourself + Pagamento a te stesso + + + + Mined + Ottenuto dal mining + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Data e ora in cui la transazione è stata ricevuta. + + + + Type of transaction. + Tipo di transazione. + + + + Destination address of transaction. + Indirizzo di destinazione della transazione. + + + + Amount removed from or added to balance. + Importo rimosso o aggiunto al saldo. + + + + TransactionView + + + + All + Tutti + + + + Today + Oggi + + + + This week + Questa settimana + + + + This month + Questo mese + + + + Last month + Il mese scorso + + + + This year + Quest'anno + + + + Range... + Intervallo... + + + + Received with + Ricevuto tramite + + + + Sent to + Spedito a + + + + To yourself + A te + + + + Mined + Ottenuto dal mining + + + + Other + Altro + + + + Enter address or label to search + Inserisci un indirizzo o un'etichetta da cercare + + + + Min amount + Importo minimo + + + + Copy address + Copia l'indirizzo + + + + Copy label + Copia l'etichetta + + + + Copy amount + Copia l'importo + + + + Copy transaction ID + + + + + Edit label + Modifica l'etichetta + + + + Show transaction details + Mostra i dettagli della transazione + + + + Export Transaction Data + Esporta i dati della transazione + + + + Comma separated file (*.csv) + Testo CSV (*.csv) + + + + Confirmed + Confermato + + + + Date + Data + + + + Type + Tipo + + + + Label + Etichetta + + + + Address + Indirizzo + + + + Amount + Importo + + + + ID + ID + + + + Error exporting + Errore nell'esportazione + + + + Could not write to file %1. + Impossibile scrivere sul file %1. + + + + Range: + Intervallo: + + + + to + a + + + + WalletModel + + + Send Coins + Spedisci curecoin + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + Esporta i dati nella tabella corrente su un file + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + Backup fallito + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + Backup eseguito con successo + + + + The wallet data was successfully saved to the new location. + Il portafoglio è stato correttamente salvato nella nuova cartella. + + + + curecoin-core + + + curecoin version + Versione di curecoin + + + + Usage: + Utilizzo: + + + + Send command to -server or curecoind + Manda il comando a -server o curecoind + + + + + List commands + Lista comandi + + + + + Get help for a command + Aiuto su un comando + + + + + Options: + Opzioni: + + + + + Specify configuration file (default: curecoin.conf) + Specifica il file di configurazione (di default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + Specifica il file pid (default: curecoind.pid) + + + + + Specify data directory + Specifica la cartella dati + + + + + Set database cache size in megabytes (default: 25) + Imposta la dimensione cache del database in megabyte (default: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Ascolta le connessioni JSON-RPC su <porta> (default: 7951 o testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Mantieni al massimo <n> connessioni ai peer (default: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Connessione ad un nodo per ricevere l'indirizzo del peer, e disconnessione + + + + Specify your own public address + Specifica il tuo indirizzo pubblico + + + + Threshold for disconnecting misbehaving peers (default: 100) + Soglia di disconnessione dei peer di cattiva qualità (default: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Numero di secondi di sospensione che i peer di cattiva qualità devono trascorrere prima di riconnettersi (default: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Errore riscontrato durante l'impostazione della porta RPC %u per l'ascolto su IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Attendi le connessioni JSON-RPC su <porta> (default: 7950 or testnet: 17950) + + + + Accept command line and JSON-RPC commands + Accetta da linea di comando e da comandi JSON-RPC + + + + + Run in the background as a daemon and accept commands + Esegui in background come demone e accetta i comandi + + + + + Use the test network + Utilizza la rete di prova + + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Accetta connessioni dall'esterno (default: 1 se no -proxy o -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Errore riscontrato durante l'impostazione della porta RPC %u per l'ascolto su IPv6, tornando su IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Collega all'indirizzo indicato e resta sempre in ascolto su questo. Usa la notazione [host]:porta per l'IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Non è possibile ottenere i dati sulla cartella %s. Probabilmente curecoin è già in esecuzione. + + + + 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. + Errore: la transazione è stata rifiutata. Ciò accade se alcuni curecoin nel portamonete sono stati già spesi, ad esempio se è stata usata una copia del file wallet.dat e i curecoin sono stati spesi dalla copia ma non segnati come spesi qui. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Errore: questa transazione necessita di una commissione di almeno %s a causa del suo ammontare, della sua complessità, o dell'uso di fondi recentemente ricevuti! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Esegui comando quando una transazione del portafoglio cambia (%s in cmd è sostituito da TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Imposta dimensione massima delle transazioni ad alta priorità/bassa-tassa in bytes (predefinito: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Questa versione è una compilazione pre-rilascio - usala a tuo rischio - non utilizzarla per la generazione o per applicazioni di commercio + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Attenzione: -paytxfee è molto alta. Questa è la commissione che si paga quando si invia una transazione. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Attenzione: le transazioni mostrate potrebbero essere sbagliate! Potresti aver bisogno di aggiornare, o altri nodi ne hanno bisogno. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Attenzione: si prega di controllare che la data del computer e l'ora siano corrette. Se il vostro orologio è sbagliato curecoin non funziona correttamente. + + + + 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. + + + + 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. + Attenzione: wallet.dat corrotto, dati salvati! Il wallet.dat originale salvato come wallet.{timestamp}.bak in %s; se il tuo bilancio o le transazioni non sono corrette dovresti ripristinare da un backup. + + + + Attempt to recover private keys from a corrupt wallet.dat + Tenta di recuperare le chiavi private da un wallet.dat corrotto + + + + Block creation options: + Opzioni creazione blocco: + + + + Connect only to the specified node(s) + Connetti solo al nodo specificato + + + + Corrupted block database detected + Rilevato database blocchi corrotto + + + + Discover own IP address (default: 1 when listening and no -externalip) + Scopri proprio indirizzo IP (default: 1 se in ascolto e no -externalip) + + + + Do you want to rebuild the block database now? + Vuoi ricostruire ora il database dei blocchi? + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + Errore caricamento database blocchi + + + + Error opening block database + Errore caricamento database blocchi + + + + Error: Disk space is low! + Errore: la spazio libero sul disco è poco! + + + + Error: Wallet locked, unable to create transaction! + Errore: portafoglio bloccato, impossibile creare la transazione! + + + + Error: system error: + Errore: errore di sistema: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Impossibile mettersi in ascolto su una porta. Usa -listen=0 se vuoi usare questa opzione. + + + + Failed to read block info + Lettura informazioni blocco fallita + + + + Failed to read block + Lettura blocco fallita + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + Scrittura informazioni blocco fallita + + + + Failed to write block + Scrittura blocco fallita + + + + Failed to write file info + Scrittura informazioni file fallita + + + + Failed to write to coin database + Scrittura nel database dei curecoin fallita + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + Trova peer utilizzando la ricerca DNS (predefinito: 1 finché utilizzato -connect) + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + Quanti blocchi da controllare all'avvio (predefinito: 288, 0 = tutti) + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + Verifica blocchi... + + + + Verifying wallet... + Verifica portafoglio... + + + + Imports blocks from external blk000??.dat file + Importa blocchi da un file blk000??.dat esterno + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + Informazione + + + + Invalid -tor address: '%s' + Indirizzo -tor non valido: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Buffer di ricezione massimo per connessione, <n>*1000 byte (default: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Buffer di invio massimo per connessione, <n>*1000 byte (default: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Connetti solo a nodi nella rete <net> (IPv4, IPv6 o Tor) + + + + Output extra debugging information. Implies all other -debug* options + Produci informazioni extra utili al debug. Implies all other -debug* options + + + + Output extra network debugging information + Genera informazioni extra utili al debug della rete + + + + Prepend debug output with timestamp + Anteponi all'output di debug una marca temporale + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Opzioni SSL: (vedi il wiki di curecoin per le istruzioni di configurazione SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + Selezionare la versione del proxy socks da usare (4-5, default: 5) + + + + Send trace/debug info to console instead of debug.log file + Invia le informazioni di trace/debug alla console invece che al file debug.log + + + + Send trace/debug info to debugger + Invia le informazioni di trace/debug al debugger + + + + Set maximum block size in bytes (default: 250000) + Imposta dimensione massima del blocco in bytes (predefinito: 250000) + + + + Set minimum block size in bytes (default: 0) + Imposta dimensione minima del blocco in bytes (predefinito: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Riduci il file debug.log all'avvio del client (predefinito: 1 se non impostato -debug) + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Specifica il timeout di connessione in millisecondi (default: 5000) + + + + System error: + Errore di sistema: + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + UPnP-használat engedélyezése a figyelő port feltérképezésénél (default: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + UPnP-használat engedélyezése a figyelő port feltérképezésénél (default: 1 when listening) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Usa un proxy per raggiungere servizi nascosti di tor (predefinito: uguale a -proxy) + + + + Username for JSON-RPC connections + Nome utente per connessioni JSON-RPC + + + + + Warning + Attenzione + + + + Warning: This version is obsolete, upgrade required! + Attenzione: questa versione è obsoleta, aggiornamento necessario! + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + wallet.dat corrotto, salvataggio fallito + + + + Password for JSON-RPC connections + Password per connessioni JSON-RPC + + + + + Allow JSON-RPC connections from specified IP address + Consenti connessioni JSON-RPC dall'indirizzo IP specificato + + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Inviare comandi al nodo in esecuzione su <ip> (default: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Esegui il comando quando il miglior block cambia(%s nel cmd è sostituito dall'hash del blocco) + + + + Upgrade wallet to latest format + Aggiorna il wallet all'ultimo formato + + + + Set key pool size to <n> (default: 100) + Impostare la quantità di chiavi di riserva a <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + Ripeti analisi della catena dei blocchi per cercare le transazioni mancanti dal portamonete + + + + + Use OpenSSL (https) for JSON-RPC connections + Utilizzare OpenSSL (https) per le connessioni JSON-RPC + + + + + Server certificate file (default: server.cert) + File certificato del server (default: server.cert) + + + + + Server private key (default: server.pem) + Chiave privata del server (default: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Cifrari accettabili (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + This help message + Questo messaggio di aiuto + + + + + 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 + Connessione tramite socks proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Consenti ricerche DNS per aggiungere nodi e collegare + + + + + Loading addresses... + Caricamento indirizzi... + + + + Error loading wallet.dat: Wallet corrupted + Errore caricamento wallet.dat: Wallet corrotto + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Errore caricamento wallet.dat: il wallet richiede una versione nuova di curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Il portamonete deve essere riscritto: riavviare curecoin per completare + + + + Error loading wallet.dat + Errore caricamento wallet.dat + + + + Invalid -proxy address: '%s' + Indirizzo -proxy non valido: '%s' + + + + Unknown network specified in -onlynet: '%s' + Rete sconosciuta specificata in -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Versione -socks proxy sconosciuta richiesta: %i + + + + Cannot resolve -bind address: '%s' + Impossibile risolvere -bind address: '%s' + + + + Cannot resolve -externalip address: '%s' + Impossibile risolvere indirizzo -externalip: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Importo non valido per -paytxfee=<amount>: '%s' + + + + Invalid amount + Importo non valido + + + + Insufficient funds + Fondi insufficienti + + + + Loading block index... + Caricamento dell'indice del blocco... + + + + 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. curecoin is probably already running. + Impossibile collegarsi alla %s su questo computer. Probabilmente curecoin è già in esecuzione. + + + + Fee per KB to add to transactions you send + Commissione per KB da aggiungere alle transazioni in uscita + + + + Loading wallet... + Caricamento portamonete... + + + + Cannot downgrade wallet + Non è possibile retrocedere il wallet + + + + Cannot write default address + Non è possibile scrivere l'indirizzo di default + + + + Rescanning... + Ripetere la scansione... + + + + Done loading + Caricamento completato + + + + To use the %s option + Per usare la opzione %s + + + + Error + Errore + + + + You must set rpcpassword=<password> in the configuration file: +%s +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 diff --git a/src/qt/locale/curecoin_ja.qm b/src/qt/locale/curecoin_ja.qm new file mode 100644 index 0000000..880c4c2 Binary files /dev/null and b/src/qt/locale/curecoin_ja.qm differ diff --git a/src/qt/locale/curecoin_ja.ts b/src/qt/locale/curecoin_ja.ts new file mode 100644 index 0000000..9eaf77f --- /dev/null +++ b/src/qt/locale/curecoin_ja.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + curecoinについて + + + + <b>curecoin</b> version + <b>curecoin</b> バージョン + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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 curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + 削除(&D) + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + + + + + Export Address Book Data + アドレス帳データをエクスポートする + + + + Comma separated file (*.csv) + CSVファイル (*.csv) + + + + Error exporting + エクスポートエラー + + + + Could not write to file %1. + %1のファイルに書き込めませんでした。 + + + + AddressTableModel + + + Label + ラベル + + + + Address + アドレス + + + + (no label) + (ラベル無し) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + パスフレーズを入力 + + + + New passphrase + 新しいパスフレーズ + + + + Repeat new passphrase + 新しいパスフレーズをもう一度 + + + + 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>. + ウォレットの新しいパスフレーズを入力してください。<br/><b>8個以上の単語か10個以上のランダムな文字</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 curecoinS</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 + ウォレットは暗号化されました + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + + + + + curecoinGUI + + + Sign &message... + + + + + Synchronizing with network... + ネットワークに同期中…… + + + + &Overview + 概要(&O) + + + + Show general overview of wallet + ウォレットの概要を見る + + + + &Transactions + 取引(&T) + + + + Browse transaction history + 取引履歴を閲覧 + + + + Edit the list of stored addresses and labels + 保存されたアドレスとラベルのリストを編集 + + + + Show the list of addresses for receiving payments + 支払い受け取り用アドレスのリストを見る + + + + E&xit + + + + + Quit application + アプリケーションを終了 + + + + Show information about curecoin + curecoinに関する情報を見る + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + オプション(&O) + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + ウォレット暗号化用パスフレーズの変更 + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + + + + + Wallet + + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + ファイル(&F) + + + + &Settings + 設定(&S) + + + + &Help + ヘルプ(&H) + + + + Tabs toolbar + タブツールバー + + + + + [testnet] + [testnet] + + + + curecoin client + + + + + %n active connection(s) to curecoin network + + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + バージョンは最新です + + + + Catching up... + + + + + 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 curecoin 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + EditAddressDialog + + + Edit Address + アドレスの編集 + + + + &Label + ラベル(&L) + + + + 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. + 入ったのアドレス「%1」はもうアドレス帳にあります。 + + + + The entered address "%1" is not a valid curecoin address. + + + + + Could not unlock wallet. + 財布をアンロックするのは出来ませんでした。 + + + + New key generation failed. + 新しいのキーの生成は失敗しました。 + + + + GUIUtil::HelpMessageBox + + + + curecoin-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. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + フォーム + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + 残高: + + + + Unconfirmed: + 未確認: + + + + Wallet + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>最近の取引</b> + + + + Your current balance + 今の残高 + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + コインを送る + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + 残高: + + + + 123.456 BTC + + + + + Confirm the send action + + + + + S&end + + + + + <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. + + + + + SendCoinsEntry + + + Form + フォーム + + + + A&mount: + + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a curecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + + + + + %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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + Open for %n more block(s) + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + Helbidea + + + + Amount + + + + + Open for %n more block(s) + + + + + Open until %1 + + + + + Offline (%1 confirmations) + + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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) + テキスト CSV (*.csv) + + + + Confirmed + + + + + Date + + + + + Type + + + + + Label + レーベル + + + + Address + Helbidea + + + + Amount + + + + + ID + + + + + Error exporting + エラー輸出 + + + + Could not write to file %1. + %1のファイルに書き込めませんでした。 + + + + Range: + + + + + to + + + + + WalletModel + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + curecoin Bertsio + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + + + + + Cannot downgrade wallet + + + + + 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/curecoin_la.qm b/src/qt/locale/curecoin_la.qm new file mode 100644 index 0000000..ec5172e Binary files /dev/null and b/src/qt/locale/curecoin_la.qm differ diff --git a/src/qt/locale/curecoin_la.ts b/src/qt/locale/curecoin_la.ts new file mode 100644 index 0000000..89375b1 --- /dev/null +++ b/src/qt/locale/curecoin_la.ts @@ -0,0 +1,2937 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Informatio de curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> versio + + + + +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. + Hoc est experimentale programma. + +Distributum sub MIT/X11 licentia programmatum, vide comitantem plicam COPYING vel http://www.opensource.org/licenses/mit-license.php. + +Hoc productum continet programmata composita ab OpenSSL Project pro utendo in OpenSSL Toolkit (http://www.openssl.org/) et programmata cifrarum scripta ab Eric Young (eay@cryptsoft.com) et UPnP programmata scripta ab Thomas Bernard. + + + + Copyright + Copyright + + + + Dr. Kimoto Chan + Dr. Kimoto Chan + + + + AddressBookPage + + + Address Book + Liber Inscriptionum + + + + Double-click to edit address or label + Dupliciter-clicca ut inscriptionem vel titulum mutes + + + + Create a new address + Crea novam inscriptionem + + + + Copy the currently selected address to the system clipboard + Copia inscriptionem iam selectam in latibulum systematis + + + + &New Address + &Nova Inscriptio + + + + These are your curecoin 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. + Haec sunt inscriptiones curecoin tuae pro accipendo pensitationes. Cupias variam ad quemque mittentem dare ut melius scias quem tibi pensare. + + + + &Copy Address + &Copia Inscriptionem + + + + Show &QR Code + Monstra codicem &QR + + + + Sign a message to prove you own a curecoin address + Signa nuntium ut demonstres inscriptionem curecoin a te possessam esse + + + + Sign &Message + Signa &Nuntium + + + + Delete the currently selected address from the list + Dele active selectam inscriptionem ex enumeratione + + + + Export the data in the current tab to a file + Exporta data in hac tabella in plicam + + + + &Export + &Exporta + + + + Verify a message to ensure it was signed with a specified curecoin address + Verifica nuntium ut cures signatum esse cum specificata inscriptione curecoin + + + + &Verify Message + &Verifica Nuntium + + + + &Delete + &Dele + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Hae sunt inscriptiones mittendi pensitationes. Semper inspice quantitatem et inscriptionem accipiendi antequam nummos mittis. + + + + Copy &Label + Copia &Titulum + + + + &Edit + &Muta + + + + Send &Coins + Mitte &Nummos + + + + Export Address Book Data + Exporta Data Libri Inscriptionum + + + + Comma separated file (*.csv) + Comma Separata Plica (*.csv) + + + + Error exporting + Error exportandi + + + + Could not write to file %1. + Non potuisse scribere in plicam %1. + + + + AddressTableModel + + + Label + Titulus + + + + Address + Inscriptio + + + + (no label) + (nullus titulus) + + + + AskPassphraseDialog + + + Passphrase Dialog + Dialogus Tesserae + + + + Enter passphrase + Insere tesseram + + + + New passphrase + Nova tessera + + + + Repeat new passphrase + Itera novam tesseram + + + + 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>. + Insero novam tesseram cassidili.<br/>Sodes tessera <b>10 pluriumve fortuitarum litterarum</b> utere aut <b>octo pluriumve verborum</b>. + + + + Encrypt wallet + Cifra cassidile + + + + This operation needs your wallet passphrase to unlock the wallet. + Huic operationi necesse est tessera cassidili tuo ut cassidile reseret. + + + + Unlock wallet + Resera cassidile + + + + This operation needs your wallet passphrase to decrypt the wallet. + Huic operationi necesse est tessera cassidili tuo ut cassidile decifret. + + + + Decrypt wallet + Decifra cassidile + + + + Change passphrase + Muta tesseram + + + + Enter the old and new passphrase to the wallet. + Insero veterem novamque tesseram cassidili. + + + + Confirm wallet encryption + Confirma cifrationem cassidilis + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Monitio: Si cassidile tuum cifras et tesseram amittis, tu <b>AMITTES OMNES TUOS NUMMOS MEGAOS</b>! + + + + Are you sure you wish to encrypt your wallet? + Certusne es te velle tuum cassidile cifrare? + + + + 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. + GRAVE: Oportet ulla prioria conservata quae fecisti de plica tui cassidilis reponi a nove generata cifrata plica cassidilis. Propter securitatem, prioria conservata de plica non cifrata cassidilis inutilia fiet simul atque incipis uti novo cifrato cassidili. + + + + + Warning: The Caps Lock key is on! + Monitio: Litterae ut capitales seratae sunt! + + + + + Wallet encrypted + Cassidile cifratum + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin iam desinet ut finiat actionem cifrandi. Memento cassidile cifrare non posse cuncte curare ne tui nummi clepantur ab malis programatibus in tuo computatro. + + + + + + + Wallet encryption failed + Cassidile cifrare abortum est + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Cassidile cifrare abortum est propter internum errorem. Tuum cassidile cifratum non est. + + + + + The supplied passphrases do not match. + Tesserae datae non eaedem sunt. + + + + Wallet unlock failed + Cassidile reserare abortum est. + + + + + + The passphrase entered for the wallet decryption was incorrect. + Tessera inserta pro cassidilis decifrando prava erat. + + + + Wallet decryption failed + Cassidile decifrare abortum est. + + + + Wallet passphrase was successfully changed. + Tessera cassidilis successa est in mutando. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Muta indicem salvatarum inscriptionum titulorumque + + + + Show the list of addresses for receiving payments + Monstra indicem inscriptionum quibus pensitationes acceptandae + + + + E&xit + E&xi + + + + Quit application + Exi applicatione + + + + Show information about curecoin + Monstra informationem de curecoin + + + + 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... + + + + Importing blocks from disk... + Importans frusta ab disco... + + + + Reindexing blocks on disk... + Recreans indicem frustorum in disco... + + + + Send coins to a curecoin address + Mitte nummos ad inscriptionem curecoin + + + + Modify configuration options for curecoin + Muta configurationis optiones pro curecoin + + + + 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... + + + + + curecoin + curecoin + + + + Wallet + Cassidile + + + + &Send + &Mitte + + + + &Receive + &Accipe + + + + &Addresses + &Inscriptiones + + + + &About curecoin + &Informatio de curecoin + + + + &Show / Hide + &Monstra/Occulta + + + + Show or hide the main Window + Monstra vel occulta Fenestram principem + + + + Encrypt the private keys that belong to your wallet + Cifra claves privatas quae cassidili tui sunt + + + + Sign messages with your curecoin addresses to prove you own them + Signa nuntios cum tuis inscriptionibus curecoin ut demonstres te eas possidere + + + + Verify messages to ensure they were signed with specified curecoin addresses + Verifica nuntios ut certus sis eos signatos esse cum specificatis inscriptionibus curecoin + + + + &File + &Plica + + + + &Settings + &Configuratio + + + + &Help + &Auxilium + + + + Tabs toolbar + Tabella instrumentorum "Tabs" + + + + + [testnet] + [testnet] + + + + curecoin client + curecoin cliens + + + + %n active connection(s) to curecoin network + %n activa conexio ad rete curecoin%n activae conexiones ad rete curecoin + + + + No block source available... + Nulla fons frustorum absens... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Perfecta %1 de %2 (aestimato) frusta historiae transactionum. + + + + Processed %1 blocks of transaction history. + Processae %1 frusta historiae transactionum. + + + + %n hour(s) + %n hora%n horae + + + + %n day(s) + %n dies%n dies + + + + %n week(s) + %n hebdomas%n hebdomades + + + + %1 behind + %1 post + + + + Last received block was generated %1 ago. + Postremum acceptum frustum generatum est %1 abhinc. + + + + Transactions after this will not yet be visible. + Transactiones post hoc nondum visibiles erunt. + + + + Error + Error + + + + Warning + Monitio + + + + Information + Informatio + + + + 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? + Haec transactio maior est quam limen magnitudinis. Adhuc potes id mittere mercede %1, quae it nodis qui procedunt tuam transactionem et adiuvat sustinere rete. Visne mercedem solvere? + + + + Up to date + Recentissimo + + + + Catching up... + Persequens... + + + + Confirm transaction fee + Confirma mercedem transactionis + + + + 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 + Tractatio URI + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + URI intellegi non posse! Huius causa possit inscriptionem curecoin non validam aut URI parametra maleformata. + + + + 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Error fatalis accidit. curecoin nondum pergere tute potest, et exibit. + + + + ClientModel + + + Network Alert + Monitio Retis + + + + EditAddressDialog + + + Edit Address + Muta Inscriptionem + + + + &Label + &Titulus + + + + The label associated with this address book entry + Titulus associatus huic insertione libri inscriptionum + + + + &Address + &Inscriptio + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Titulus associatus huic insertione libri inscriptionum. Haec tantum mutari potest pro inscriptionibus mittendi + + + + 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 already in the address book. + Inserta inscriptio "%1" iam in libro inscriptionum est. + + + + The entered address "%1" is not a valid curecoin address. + Inscriptio inserta "%1" non valida inscriptio curecoin est. + + + + Could not unlock wallet. + Non potuisse cassidile reserare + + + + New key generation failed. + Generare novam clavem abortum est. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versio + + + + Usage: + Usus: + + + + command-line options + Optiones mandati intiantis + + + + UI options + UI optiones + + + + Set language, for example "de_DE" (default: system locale) + Constitue linguam, exempli gratia "de_DE" (praedefinitum: lingua systematis) + + + + Start minimized + Incipe minifactum ut icon + + + + Show splash screen on startup (default: 1) + Monstra principem imaginem ad initium (praedefinitum: 1) + + + + OptionsDialog + + + Options + Optiones + + + + &Main + &Princeps + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Optionalis merces transactionum singulis kB quae adiuvat curare tuas transactiones processas esse celeriter. Plurimi transactiones 1kB sunt. + + + + Pay transaction &fee + Solve &mercedem transactionis + + + + Automatically start curecoin after logging in to the system. + Pelle curecoin per se postquam in systema inire. + + + + &Start curecoin on system login + &Pelle curecoin cum inire systema + + + + Reset all client options to default. + Reconstitue omnes optiones clientis ad praedefinita. + + + + &Reset Options + &Reconstitue Optiones + + + + &Network + &Rete + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Aperi per se portam clientis curecoin in itineratore. Hoc tantum effectivum est si itineratrum tuum supportat UPnP et id activum est. + + + + Map port using &UPnP + Designa portam utendo &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Connecte ad rete curecoin per SOCKS vicarium (e.g. quando conectens per Tor). + + + + &Connect through SOCKS proxy: + &Conecte per SOCKS vicarium: + + + + Proxy &IP: + &IP vicarii: + + + + IP address of the proxy (e.g. 127.0.0.1) + Inscriptio IP vicarii (e.g. 127.0.0.1) + + + + &Port: + &Porta: + + + + Port of the proxy (e.g. 9050) + Porta vicarii (e.g. 9050) + + + + SOCKS &Version: + SOCKS &Versio: + + + + SOCKS version of the proxy (e.g. 5) + SOCKS versio vicarii (e.g. 5) + + + + &Window + &Fenestra + + + + Show only a tray icon after minimizing the window. + Monstra tantum iconem in tabella systematis postquam fenestram minifactam est. + + + + &Minimize to the tray instead of the taskbar + &Minifac in tabellam systematis potius quam applicationum + + + + 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. + Minifac potius quam exire applicatione quando fenestra clausa sit. Si haec optio activa est, applicatio clausa erit tantum postquam selegeris Exi in menu. + + + + M&inimize on close + M&inifac ad claudendum + + + + &Display + &UI + + + + User Interface &language: + &Lingua monstranda utenti: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Lingua monstranda utenti hic constitui potest. Haec configuratio effectiva erit postquam curecoin iterum initiatum erit. + + + + &Unit to show amounts in: + &Unita qua quantitates monstrare: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Selige praedefinitam unitam subdivisionis monstrare in interfacie et quando nummos mittere + + + + Whether to show curecoin addresses in the transaction list or not. + Num monstrare inscriptiones curecoin in enumeratione transactionum. + + + + &Display addresses in transaction list + &Monstra inscriptiones in enumeratione transactionum + + + + &OK + &OK + + + + &Cancel + &Cancella + + + + &Apply + &Applica + + + + default + praedefinitum + + + + Confirm options reset + Confirma optionum reconstituere + + + + Some settings may require a client restart to take effect. + Aliis configurationibus fortasse necesse est clientem iterum initiare ut effectivae sint. + + + + Do you want to proceed? + Vis procedere? + + + + + Warning + Monitio + + + + + This setting will take effect after restarting curecoin. + Haec configuratio effectiva erit postquam curecoin iterum initiatum erit. + + + + The supplied proxy address is invalid. + Inscriptio vicarii tradita non valida est. + + + + OverviewPage + + + Form + Schema + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Monstrata informatio fortasse non recentissima est. Tuum cassidile per se synchronizat cum rete curecoin postquam conexio constabilita est, sed hoc actio nondum perfecta est. + + + + Balance: + Pendendum: + + + + Unconfirmed: + Non confirmata: + + + + Wallet + Cassidile + + + + Immature: + Immatura: + + + + Mined balance that has not yet matured + Fossum pendendum quod nondum maturum est + + + + <b>Recent transactions</b> + <b>Recentes transactiones</b> + + + + Your current balance + Tuum pendendum iam nunc + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Totali nummi transactionum quae adhuc confirmandae sunt, et nondum afficiunt pendendum + + + + + out of sync + non synchronizato + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + curecoin incipere non potest: cliccare-ad-pensandum handler + + + + QRCodeDialog + + + QR Code Dialog + Dialogus QR Codicis + + + + Request Payment + Posce Pensitationem + + + + Amount: + Quantitas: + + + + Label: + Titulus: + + + + Message: + Nuntius: + + + + &Save As... + &Salva ut... + + + + Error encoding URI into QR Code. + Error codificandi URI in codicem QR. + + + + The entered amount is invalid, please check. + Inserta quantitas non est valida, sodes proba. + + + + Resulting URI too long, try to reduce the text for label / message. + Resultato URI nimis longo, conare minuere verba pro titulo / nuntio. + + + + Save QR Code + Salva codicem QR + + + + PNG Images (*.png) + Imagines PNG (*.png) + + + + RPCConsole + + + Client name + Nomen clientis + + + + + + + + + + + + + N/A + N/A + + + + Client version + Versio clientis + + + + &Information + &Informatio + + + + Using OpenSSL version + Utens OpenSSL versione + + + + Startup time + Tempus initiandi + + + + Network + Rete + + + + Number of connections + Numerus conexionum + + + + On testnet + In testnet + + + + Block chain + Catena frustorum + + + + Current number of blocks + Numerus frustorum iam nunc + + + + Estimated total blocks + Aestimatus totalis numerus frustorum + + + + Last block time + Hora postremi frusti + + + + &Open + &Aperi + + + + Command-line options + Optiones mandati initiantis + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Monstra nuntium auxilii curecoin-Qt ut videas enumerationem possibilium optionum curecoin mandati initiantis. + + + + &Show + &Monstra + + + + &Console + &Terminale + + + + Build date + Dies aedificandi + + + + curecoin - Debug window + curecoin - Fenestra debug + + + + curecoin Core + curecoin Nucleus + + + + Debug log file + Debug catalogi plica + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Aperi plicam catalogi de curecoin debug ex activo indice datorum. Hoc possit pauca secunda pro plicis magnis catalogi. + + + + Clear console + Vacuefac terminale + + + + Welcome to the curecoin RPC console. + Bene ventio in terminale RPC de curecoin. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Utere sagittis sursum deorsumque ut per historiam naviges, et <b>Ctrl+L</b> ut scrinium vacuefacias. + + + + Type <b>help</b> for an overview of available commands. + Scribe <b>help</b> pro summario possibilium mandatorum. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Mitte Nummos + + + + Send to multiple recipients at once + Mitte pluribus accipientibus simul + + + + Add &Recipient + Adde &Accipientem + + + + Remove all transaction fields + Remove omnes campos transactionis + + + + Clear &All + Vacuefac &Omnia + + + + Balance: + Pendendum: + + + + 123.456 BTC + 123.456 BTC + + + + Confirm the send action + Confirma actionem mittendi + + + + S&end + &Mitte + + + + <b>%1</b> to %2 (%3) + <b>%1</b> ad %2 (%3) + + + + Confirm send coins + Confirma mittendum nummorum + + + + Are you sure you want to send %1? + Certus es te velle mittere %1? + + + + and + et + + + + The recipient address is not valid, please recheck. + Inscriptio accipientis non est valida, sodes reproba. + + + + The amount to pay must be larger than 0. + Oportet quantitatem ad pensandum maiorem quam 0 esse. + + + + The amount exceeds your balance. + Quantitas est ultra quod habes. + + + + The total exceeds your balance when the %1 transaction fee is included. + Quantitas est ultra quod habes cum merces transactionis %1 includitur. + + + + 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: Transaction creation failed! + Error: Creare transactionem abortum est! + + + + 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: transactio reiecta est. Hoc fiat si alii nummorum in tuo cassidili iam soluti sunt, ut si usus es exemplar de wallet.dat et nummi soluti sunt in exemplari sed non hic notati ut soluti. + + + + SendCoinsEntry + + + Form + Schema + + + + A&mount: + &Quantitas: + + + + Pay &To: + Pensa &Ad: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Inscriptio cui mittere pensitationem (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Selige inscriptionem ex libro inscriptionum + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Conglutina inscriptionem ex latibulo + + + + Alt+P + Alt+P + + + + Remove this recipient + Remove hunc accipientem + + + + Enter a curecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Insero inscriptionem curecoin (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Signationes - Signa / Verifica nuntium + + + + &Sign Message + &Signa Nuntium + + + + 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. + Potes nuntios signare inscriptionibus tuis ut demonstres te eas possidere. Cautus es non amibiguum signare, quia impetus phiscatorum conentur te fallere ut signes identitatem tuam ad eos. Solas signa sententias cuncte descriptas quibus convenis. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Inscriptio qua signare nuntium (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Selige inscriptionem ex librum inscriptionum + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Glutina inscriptionem ex latibulo + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Insere hic nuntium quod vis signare + + + + Signature + Signatio + + + + Copy the current signature to the system clipboard + Copia signationem in latibulum systematis + + + + Sign the message to prove you own this curecoin address + Signa nuntium ut demonstres hanc inscriptionem curecoin a te possessa esse + + + + Sign &Message + Signa &Nuntium + + + + Reset all sign message fields + Reconstitue omnes campos signandi nuntii + + + + + Clear &All + Vacuefac &Omnia + + + + &Verify Message + &Verifica Nuntium + + + + 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. + Insere inscriptionem signantem, nuntium (cura ut copias intermissiones linearum, spatia, tabs, et cetera exacte) et signationem infra ut nuntium verifices. Cautus esto ne magis legas in signationem quam in nuntio signato ipso est, ut vites falli ab impetu homo-in-medio. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Inscriptio qua nuntius signatus est (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Verifica nuntium ut cures signatum esse cum specifica inscriptione curecoin + + + + Verify &Message + Verifica &Nuntium + + + + Reset all verify message fields + Reconstitue omnes campos verificandi nuntii + + + + + Enter a curecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Insere inscriptionem curecoin (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Clicca "Signa Nuntium" ut signatio generetur + + + + Enter curecoin signature + Insere signationem curecoin + + + + + The entered address is invalid. + Inscriptio inserta non valida est. + + + + + + + Please check the address and try again. + Sodes inscriptionem proba et rursus conare. + + + + + The entered address does not refer to a key. + Inserta inscriptio clavem non refert. + + + + Wallet unlock was cancelled. + Cassidilis reserare cancellatum est. + + + + Private key for the entered address is not available. + Clavis privata absens est pro inserta inscriptione. + + + + Message signing failed. + Nuntium signare abortum est. + + + + Message signed. + Nuntius signatus. + + + + The signature could not be decoded. + Signatio decodificari non potuit. + + + + + Please check the signature and try again. + Sodes signationem proba et rursus conare. + + + + The signature did not match the message digest. + Signatio non convenit digesto nuntii + + + + Message verification failed. + Nuntium verificare abortum est. + + + + Message verified. + Nuntius verificatus. + + + + SplashScreen + + + Dr. Kimoto Chan + Dr. Kimoto Chan + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Apertum donec %1 + + + + %1/offline + %1/non conecto + + + + %1/unconfirmed + %1/non confirmata + + + + %1 confirmations + %1 confirmationes + + + + Status + Status + + + + , broadcast through %n node(s) + , disseminatum per %n nodo, disseminata per %n nodis + + + + Date + Dies + + + + Source + Fons + + + + Generated + Generatum + + + + + From + Ab + + + + + + To + Ad + + + + + own address + inscriptio propria + + + + label + titulus + + + + + + + + Credit + Creditum + + + + matures in %n more block(s) + maturum erit in %n plure frustomaturum erit in %n pluribus frustis + + + + not accepted + non acceptum + + + + + + + Debit + Debitum + + + + Transaction fee + Transactionis merces + + + + Net amount + Cuncta quantitas + + + + Message + Nuntius + + + + Comment + Annotatio + + + + Transaction ID + ID transactionis + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Nummis generatis necesse est maturitas 120 frustorum antequam illi transmitti possunt. Cum hoc frustum generavisti, disseminatum est ad rete ut addatur ad catenam frustorum. Si aboritur inire catenam, status eius mutabit in "non acceptum" et non transmittabile erit. Hoc interdum accidat si alter nodus frustum generat paucis secundis ante vel post tuum. + + + + Debug information + Informatio de debug + + + + Transaction + Transactio + + + + Inputs + Lectenda + + + + Amount + Quantitas + + + + true + verum + + + + false + falsum + + + + , has not been successfully broadcast yet + , nondum prospere disseminatum est + + + + Open for %n more block(s) + Aperi pro %n pluribus frustis + + + + unknown + ignotum + + + + TransactionDescDialog + + + Transaction details + Particularia transactionis + + + + This pane shows a detailed description of the transaction + Haec tabula monstrat descriptionem verbosam transactionis + + + + TransactionTableModel + + + Date + Dies + + + + Type + Typus + + + + Address + Inscriptio + + + + Amount + Quantitas + + + + Open for %n more block(s) + Aperi pro %n plure frustoAperi pro %n pluribus frustis + + + + Open until %1 + Apertum donec %1 + + + + Offline (%1 confirmations) + Non conectum (%1 confirmationes) + + + + Unconfirmed (%1 of %2 confirmations) + Non confirmatum (%1 de %2 confirmationibus) + + + + Confirmed (%1 confirmations) + Confirmatum (%1 confirmationes) + + + + Mined balance will be available when it matures in %n more block(s) + Fossum pendendum utibile erit quando id maturum est post %n plus frustumFossum pendendum utibile erit quando id maturum est post %n pluria frusta + + + + This block was not received by any other nodes and will probably not be accepted! + Hoc frustum non acceptum est ab ulla alia nodis et probabiliter non acceptum erit! + + + + Generated but not accepted + Generatum sed non acceptum + + + + Received with + Acceptum cum + + + + Received from + Acceptum ab + + + + Sent to + Missum ad + + + + Payment to yourself + Pensitatio ad te ipsum + + + + Mined + Fossa + + + + (n/a) + (n/a) + + + + Transaction status. Hover over this field to show number of confirmations. + Status transactionis. Supervola cum mure ut monstretur numerus confirmationum. + + + + Date and time that the transaction was received. + Dies et tempus quando transactio accepta est. + + + + Type of transaction. + Typus transactionis. + + + + Destination address of transaction. + Inscriptio destinationis transactionis. + + + + Amount removed from or added to balance. + Quantitas remota ex pendendo aut addita ei. + + + + TransactionView + + + + All + Omne + + + + Today + Hodie + + + + This week + Hac hebdomade + + + + This month + Hoc mense + + + + Last month + Postremo mense + + + + This year + Hoc anno + + + + Range... + Intervallum... + + + + Received with + Acceptum cum + + + + Sent to + Missum ad + + + + To yourself + Ad te ipsum + + + + Mined + Fossa + + + + Other + Alia + + + + Enter address or label to search + Insere inscriptionem vel titulum ut quaeras + + + + Min amount + Quantitas minima + + + + Copy address + Copia inscriptionem + + + + Copy label + Copia titulum + + + + Copy amount + Copia quantitatem + + + + Copy transaction ID + Copia transactionis ID + + + + Edit label + Muta titulum + + + + Show transaction details + Monstra particularia transactionis + + + + Export Transaction Data + Exporta Data Transactionum + + + + Comma separated file (*.csv) + Comma Separata Plica (*.csv) + + + + Confirmed + Confirmatum + + + + Date + Dies + + + + Type + Typus + + + + Label + Titulus + + + + Address + Inscriptio + + + + Amount + Quantitas + + + + ID + ID + + + + Error exporting + Error exportandi + + + + Could not write to file %1. + Non potuisse scribere ad plicam %1. + + + + Range: + Intervallum: + + + + to + ad + + + + WalletModel + + + Send Coins + Mitte Nummos + + + + WalletView + + + &Export + &Exporta + + + + Export the data in the current tab to a file + Exporta data in hac tabella in plicam + + + + Backup Wallet + Conserva cassidile + + + + Wallet Data (*.dat) + Data cassidilis (*.dat) + + + + Backup Failed + Conservare abortum est. + + + + There was an error trying to save the wallet data to the new location. + Error erat conante salvare data cassidilis ad novum locum. + + + + Backup Successful + Successum in conservando + + + + The wallet data was successfully saved to the new location. + Successum in salvando data cassidilis in novum locum. + + + + curecoin-core + + + curecoin version + Versio de curecoin + + + + Usage: + Usus: + + + + Send command to -server or curecoind + Mitte mandatum ad -server vel curecoind + + + + List commands + Enumera mandata + + + + Get help for a command + Accipe auxilium pro mandato + + + + Options: + Optiones: + + + + Specify configuration file (default: curecoin.conf) + Specifica configurationis plicam (praedefinitum: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Specifica pid plicam (praedefinitum: curecoin.pid) + + + + Specify data directory + Specifica indicem datorum + + + + Set database cache size in megabytes (default: 25) + Constitue magnitudinem databasis cache in megabytes (praedefinitum: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Ausculta pro conexionibus in <porta> (praedefinitum: 7951 vel testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Manutene non plures quam <n> conexiones ad paria (praedefinitum: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Conecta ad nodum acceptare inscriptiones parium, et disconecte + + + + Specify your own public address + Specifica tuam propriam publicam inscriptionem + + + + Threshold for disconnecting misbehaving peers (default: 100) + Limen pro disconectendo paria improba (praedefinitum: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Numerum secundorum prohibere ne paria improba reconectant (praedefinitum: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Error erat dum initians portam RPC %u pro auscultando in IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Ausculta pro conexionibus JSON-RPC in <porta> (praedefinitum: 7950 vel testnet: 17950) + + + + Accept command line and JSON-RPC commands + Accipe terminalis et JSON-RPC mandata. + + + + Run in the background as a daemon and accept commands + Operare infere sicut daemon et mandata accipe + + + + Use the test network + Utere rete experimentale + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Accipe conexiones externas (praedefinitum: 1 nisi -proxy neque -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, necesse est te rpcpassword constituere in plica configurationis: +%s +Hortatur te hanc fortuitam tesseram uti: +rpcuser=curecoinrpc +rpcpassword=%s +(non est necesse te hanc tesseram meminisse) +Nomen usoris et tessera eadem esse NON POSSUNT. +Si plica non existit, eam crea cum permissionibus ut eius dominus tantum sinitur id legere. +Quoque hortatur alertnotify constituere ut tu notificetur de problematibus; +exempli gratia: alertnotify=echo %%s | mail -s "curecoin Notificatio" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Error erat dum initians portam RPC %u pro auscultando in IPv6, labens retrorsum ad IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Conglutina ad inscriptionem datam et semper in eam ausculta. Utere [moderatrum]:porta notationem pro IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Non posse serare datorum indicem %s. curecoin probabiliter iam operatur. + + + + 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: Transactio eiecta est! Hoc possit accidere si alii nummorum in cassidili tuo iam soluti sint, ut si usus es exemplar de wallet.dat et nummi soluti sunt in exemplari sed non hic notati ut soluti. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Error: Huic transactioni necesse est merces saltem %s propter eius magnitudinem, complexitatem, vel usum recentum acceptorum nummorum! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Facere mandatum quotiescumque notificatio affinis accipitur (%s in mandato mutatur in nuntium) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Facere mandatum quotiescumque cassidilis transactio mutet (%s in mandato sbstituitur ab TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Constitue magnitudinem maximam transactionum magnae-prioritatis/parvae-mercedis in octetis/bytes (praedefinitum: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Hoc est prae-dimittum experimentala aedes - utere eo periculo tuo proprio - nolite utere fodendo vel applicationibus mercatoriis + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Monitio: -paytxfee constitutum valde magnum! Hoc est merces transactionis solves si mittis transactionem. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Monitio: Monstratae transactiones fortasse non recta sint! Forte oportet tibi progredere, an aliis nodis progredere. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Monitio: Sodes cura ut dies tempusque computatri tui recti sunt! Si horologium tuum pravum est, curecoin non proprie fungetur. + + + + 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. + + + + 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. + Monitio: wallet.data corrupta, data salvata! Originalis wallet.dat salvata ut wallet.{timestamp}.bak in %s; si pendendum tuum vel transactiones pravae sunt, oportet ab conservato restituere. + + + + Attempt to recover private keys from a corrupt wallet.dat + Conare recipere claves privatas de corrupto wallet.dat + + + + Block creation options: + Optiones creandi frustorum: + + + + Connect only to the specified node(s) + Conecte sole ad nodos specificatos (vel nodum specificatum) + + + + Corrupted block database detected + Corruptum databasum frustorum invenitur + + + + Discover own IP address (default: 1 when listening and no -externalip) + Discooperi propriam inscriptionem IP (praedefinitum: 1 quando auscultans et nullum -externalip) + + + + Do you want to rebuild the block database now? + Visne reficere databasum frustorum iam? + + + + Error initializing block database + Error initiando databasem frustorum + + + + Error initializing wallet database environment %s! + Error initiando systematem databasi cassidilis %s! + + + + Error loading block database + Error legendo frustorum databasem + + + + Error opening block database + Error aperiendo databasum frustorum + + + + Error: Disk space is low! + Error: Inopia spatii disci! + + + + Error: Wallet locked, unable to create transaction! + Error: Cassidile seratum, non posse transactionem creare! + + + + Error: system error: + Error: systematis error: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Non potuisse auscultare in ulla porta. Utere -listen=0 si hoc vis. + + + + Failed to read block info + Non potuisse informationem frusti legere + + + + Failed to read block + Non potuisse frustum legere + + + + Failed to sync block index + Synchronizare indicem frustorum abortum est + + + + Failed to write block index + Scribere indicem frustorum abortum est + + + + Failed to write block info + Scribere informationem abortum est + + + + Failed to write block + Scribere frustum abortum est + + + + Failed to write file info + Scribere informationem plicae abortum est + + + + Failed to write to coin database + Scribere databasem nummorum abortum est + + + + Failed to write transaction index + Scribere indicem transactionum abortum est + + + + Failed to write undo data + Scribere data pro cancellando mutationes abortum est + + + + Find peers using DNS lookup (default: 1 unless -connect) + Inveni paria utendo DNS quaerendo (praedefinitum: 1 nisi -connect) + + + + Generate coins (default: 0) + Genera nummos (praedefinitum: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Quot frusta proba ad initium (praedefinitum: 288, 0 = omnia) + + + + How thorough the block verification is (0-4, default: 3) + Quam perfecta frustorum verificatio est (0-4, praedefinitum: 3) + + + + Not enough file descriptors available. + Inopia descriptorum plicarum. + + + + Rebuild block chain index from current blk000??.dat files + Restituere indicem catenae frustorum ex activis plicis blk000??.dat + + + + Set the number of threads to service RPC calls (default: 4) + Constitue numerum filorum ad tractandum RPC postulationes (praedefinitum: 4) + + + + Verifying blocks... + Verificante frusta... + + + + Verifying wallet... + Verificante cassidilem... + + + + Imports blocks from external blk000??.dat file + Importat frusta ab externa plica blk000??.dat + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Constitue numerum filorum verificationis scriptorum (Maximum 16, 0 = auto, <0 = tot corda libera erunt, praedefinitum: 0) + + + + Information + Informatio + + + + Invalid -tor address: '%s' + Inscriptio -tor non valida: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + Quantitas non valida pro -minrelaytxfee=<amount>: '%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + Quantitas non valida pro -mintxfee=<amount>: '%s' + + + + Maintain a full transaction index (default: 0) + Manutene completam indicem transactionum (praedefinitum: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maxima magnitudo memoriae pro datis accipendis singulis conexionibus, <n>*1000 octetis/bytes (praedefinitum: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maxima magnitudo memoriae pro datis mittendis singulis conexionibus, <n>*1000 octetis/bytes (praedefinitum: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Tantum accipe catenam frustorum convenientem internis lapidibus (praedefinitum: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Tantum conecte ad nodos in rete <net> (IPv4, IPv6 aut Tor) + + + + Output extra debugging information. Implies all other -debug* options + Exscribe additiciam informationem pro debug. Implicat omnes alias optiones -debug* + + + + Output extra network debugging information + Exscribe additiciam informationem pro retis debug. + + + + Prepend debug output with timestamp + Antepone pittacium temporis ante exscriptum de debug + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Optiones SSL: (vide vici de curecoin pro instructionibus SSL configurationis) + + + + Select the version of socks proxy to use (4-5, default: 5) + Selige versionem socks vicarii utendam (4-5, praedefinitum: 5) + + + + Send trace/debug info to console instead of debug.log file + Mitte informationem vestigii/debug ad terminale potius quam plicam debug.log + + + + Send trace/debug info to debugger + Mitte informationem vestigii/debug ad debugger + + + + Set maximum block size in bytes (default: 250000) + Constitue maximam magnitudinem frusti in octetis/bytes (praedefinitum: 250000) + + + + Set minimum block size in bytes (default: 0) + Constitue minimam magnitudinem frusti in octetis/bytes (praedefinitum: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Diminue plicam debug.log ad initium clientis (praedefinitum: 1 nisi -debug) + + + + Signing transaction failed + Signandum transactionis abortum est + + + + Specify connection timeout in milliseconds (default: 5000) + Specifica tempumfati conexionis in millisecundis (praedefinitum: 5000) + + + + System error: + Systematis error: + + + + Transaction amount too small + Magnitudo transactionis nimis parva + + + + Transaction amounts must be positive + Necesse est magnitudines transactionum positivas esse. + + + + Transaction too large + Transactio nimis magna + + + + Use UPnP to map the listening port (default: 0) + Utere UPnP designare portam auscultandi (praedefinitum: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Utere UPnP designare portam auscultandi (praedefinitum: 1 quando auscultans) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Utere vicarium ut extendas ad tor servitia occulta (praedefinitum: idem ut -proxy) + + + + Username for JSON-RPC connections + Nomen utentis pro conexionibus JSON-RPC + + + + Warning + Monitio + + + + Warning: This version is obsolete, upgrade required! + Monitio: Haec versio obsoleta est, progressio postulata! + + + + You need to rebuild the databases using -reindex to change -txindex + Oportet recreare databases utendo -reindex ut mutes -txindex + + + + wallet.dat corrupt, salvage failed + wallet.dat corrupta, salvare abortum est + + + + Password for JSON-RPC connections + Tessera pro conexionibus JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + Permitte conexionibus JSON-RPC ex inscriptione specificata + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Mitte mandata nodo operanti in <ip> (praedefinitum: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Pelle mandatum quando optissimum frustum mutat (%s in mandato substituitur ab hash frusti) + + + + Upgrade wallet to latest format + Progredere cassidile ad formam recentissimam + + + + Set key pool size to <n> (default: 100) + Constitue magnitudinem stagni clavium ad <n> (praedefinitum: 100) + + + + Rescan the block chain for missing wallet transactions + Iterum perlege catenam frustorum propter absentes cassidilis transactiones + + + + Use OpenSSL (https) for JSON-RPC connections + Utere OpenSSL (https) pro conexionibus JSON-RPC + + + + Server certificate file (default: server.cert) + Plica certificationis daemonis moderantis (praedefinitum: server.cert) + + + + Server private key (default: server.pem) + Clavis privata daemonis moderans (praedefinitum: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Acceptabiles cifrae (praedefinitum: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Hic nuntius auxilii + + + + 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 + Conecte per socks vicarium + + + + Allow DNS lookups for -addnode, -seednode and -connect + Permitte quaerenda DNS pro -addnode, -seednode, et -connect + + + + Loading addresses... + Legens inscriptiones... + + + + Error loading wallet.dat: Wallet corrupted + Error legendi wallet.dat: Cassidile corruptum + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Error legendi wallet.dat: Cassidili necesse est recentior versio curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Cassidili necesse erat rescribi: Repelle curecoin ut compleas + + + + Error loading wallet.dat + Error legendi wallet.dat + + + + Invalid -proxy address: '%s' + Inscriptio -proxy non valida: '%s' + + + + Unknown network specified in -onlynet: '%s' + Ignotum rete specificatum in -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Ignota -socks vicarii versio postulata: %i + + + + Cannot resolve -bind address: '%s' + Non posse resolvere -bind inscriptonem: '%s' + + + + Cannot resolve -externalip address: '%s' + Non posse resolvere -externalip inscriptionem: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Quantitas non valida pro -paytxfee=<quantitas>: '%s' + + + + Invalid amount + Quantitas non valida + + + + Insufficient funds + Inopia nummorum + + + + Loading block index... + Legens indicem frustorum... + + + + 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. curecoin is probably already running. + Non posse conglutinare ad %s in hoc cumputatro. curecoin probabiliter iam operatur. + + + + Fee per KB to add to transactions you send + Merces per KB addere ad transactiones tu mittas + + + + Loading wallet... + Legens cassidile... + + + + Cannot downgrade wallet + Non posse cassidile regredi + + + + Cannot write default address + Non posse scribere praedefinitam inscriptionem + + + + Rescanning... + Iterum perlegens... + + + + Done loading + Completo lengendi + + + + To use the %s option + Ut utaris optione %s + + + + Error + 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. + Necesse est te rpcpassword=<tesseram> constituere in plica configurationum: +%s +Si plica non existat, crea eam cum permissionibus ut solus eius dominus eam legere sinatur. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_lt.qm b/src/qt/locale/curecoin_lt.qm new file mode 100644 index 0000000..fb58d1a Binary files /dev/null and b/src/qt/locale/curecoin_lt.qm differ diff --git a/src/qt/locale/curecoin_lt.ts b/src/qt/locale/curecoin_lt.ts new file mode 100644 index 0000000..79c7b2f --- /dev/null +++ b/src/qt/locale/curecoin_lt.ts @@ -0,0 +1,2924 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Apie curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> versija + + + + +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. + Tai eksperimentinė programa. + +Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.opensource.org/licenses/mit-license.php. + +Šiame produkte yra OpenSSL projekto kuriamas OpenSSL Toolkit (http://www.openssl.org/), Eric Young parašyta kriptografinė programinė įranga bei Thomas Bernard sukurta UPnP programinė įranga. + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Adresų knygelė + + + + Double-click to edit address or label + Spragtelėkite, kad pakeistumėte adresą arba žymę + + + + Create a new address + Sukurti naują adresą + + + + Copy the currently selected address to the system clipboard + Kopijuoti esamą adresą į mainų atmintį + + + + &New Address + &Naujas adresas + + + + These are your curecoin 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. + Tai yra jūsų curecoin adresai mokėjimų gavimui. Galite duoti skirtingus adresus atskiriems siuntėjams, kad galėtumėte sekti, kas jums moka. + + + + &Copy Address + &Kopijuoti adresą + + + + Show &QR Code + Rodyti &QR kodą + + + + Sign a message to prove you own a curecoin address + Pasirašykite žinutę, kad įrodytume, jog esate curecoin adreso savininkas + + + + Sign &Message + Registruoti praneši&mą + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + Patikrinkite žinutę, jog įsitikintumėte, kad ją pasirašė nurodytas curecoin adresas + + + + &Verify Message + &Tikrinti žinutę + + + + &Delete + &Trinti + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Kopijuoti ž&ymę + + + + &Edit + &Keisti + + + + Send &Coins + + + + + Export Address Book Data + Eksportuoti adresų knygelės duomenis + + + + Comma separated file (*.csv) + Kableliais išskirtas failas (*.csv) + + + + Error exporting + Eksportavimo klaida + + + + Could not write to file %1. + Nepavyko įrašyti į failą %1. + + + + AddressTableModel + + + Label + Žymė + + + + Address + Adresas + + + + (no label) + (nėra žymės) + + + + AskPassphraseDialog + + + Passphrase Dialog + Slaptafrazės dialogas + + + + Enter passphrase + Įvesti slaptafrazę + + + + New passphrase + Nauja slaptafrazė + + + + Repeat new passphrase + Pakartokite naują slaptafrazę + + + + 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>. + Įveskite naują piniginės slaptafrazę.<br/>Prašome naudoti slaptafrazę iš <b> 10 ar daugiau atsitiktinių simbolių</b> arba <b>aštuonių ar daugiau žodžių</b>. + + + + Encrypt wallet + Užšifruoti piniginę + + + + This operation needs your wallet passphrase to unlock the wallet. + Ši operacija reikalauja jūsų piniginės slaptafrazės jai atrakinti. + + + + Unlock wallet + Atrakinti piniginę + + + + This operation needs your wallet passphrase to decrypt the wallet. + Ši operacija reikalauja jūsų piniginės slaptafrazės jai iššifruoti. + + + + Decrypt wallet + Iššifruoti piniginę + + + + Change passphrase + Pakeisti slaptafrazę + + + + Enter the old and new passphrase to the wallet. + Įveskite seną ir naują piniginės slaptafrazes. + + + + Confirm wallet encryption + Patvirtinkite piniginės užšifravimą + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Dėmesio: jei užšifruosite savo piniginę ir pamesite slaptafrazę, jūs<b>PRARASITE VISUS SAVO curecoinUS</b>! + + + + Are you sure you wish to encrypt your wallet? + Ar tikrai norite šifruoti savo piniginę? + + + + 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! + Įspėjimas: įjungtas Caps Lock klavišas! + + + + + Wallet encrypted + Piniginė užšifruota + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin dabar užsidarys šifravimo proceso pabaigai. Atminkite, kad piniginės šifravimas negali pilnai apsaugoti curecoinų vagysčių kai tinkle esančios kenkėjiškos programos patenka į jūsų kompiuterį. + + + + + + + Wallet encryption failed + Nepavyko užšifruoti piniginę + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Dėl vidinės klaidos nepavyko užšifruoti piniginę.Piniginė neužšifruota. + + + + + The supplied passphrases do not match. + Įvestos slaptafrazės nesutampa. + + + + Wallet unlock failed + Nepavyko atrakinti piniginę + + + + + + The passphrase entered for the wallet decryption was incorrect. + Neteisingai įvestas slaptažodis piniginės iššifravimui. + + + + Wallet decryption failed + Nepavyko iššifruoti piniginės + + + + Wallet passphrase was successfully changed. + Piniginės slaptažodis sėkmingai pakeistas. + + + + curecoinGUI + + + 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ą + + + + Edit the list of stored addresses and labels + Redaguoti išsaugotus adresus bei žymes + + + + Show the list of addresses for receiving payments + Parodyti adresų sąraša mokėjimams gauti + + + + E&xit + &Išeiti + + + + Quit application + Išjungti programą + + + + Show information about curecoin + Rodyti informaciją apie curecoin + + + + 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ę... + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + Siųsti monetas curecoin adresui + + + + Modify configuration options for curecoin + Keisti curecoin konfigūracijos galimybes + + + + 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ę... + + + + + curecoin + curecoin + + + + Wallet + Piniginė + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &Apie curecoin + + + + &Show / Hide + &Rodyti / Slėpti + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Failas + + + + &Settings + &Nustatymai + + + + &Help + &Pagalba + + + + Tabs toolbar + Kortelių įrankinė + + + + + [testnet] + [testavimotinklas] + + + + curecoin client + curecoin klientas + + + + %n active connection(s) to curecoin network + %n curecoin tinklo aktyvus ryšys%n curecoin tinklo aktyvūs ryšiai%n curecoin tinklo aktyvūs ryšiai + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Atnaujinta + + + + Catching up... + Vejamasi... + + + + Confirm transaction fee + Patvirtinti sandorio mokestį + + + + 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 apdorojimas + + + + + URI can not be parsed! This can be caused by an invalid curecoin 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + Tinklo įspėjimas + + + + EditAddressDialog + + + Edit Address + Keisti adresą + + + + &Label + Ž&ymė + + + + The label associated with this address book entry + Žymė yra susieta su šios adresų knygelęs turiniu + + + + &Address + &Adresas + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Adresas yra susietas su šios adresų knygelęs turiniu. Tai gali būti keičiama tik siuntimo adresams. + + + + 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 already in the address book. + Įvestas adresas „%1“ jau yra adresų knygelėje. + + + + The entered address "%1" is not a valid curecoin address. + Įvestas adresas „%1“ nėra galiojantis curecoin adresas. + + + + Could not unlock wallet. + Nepavyko atrakinti piniginės. + + + + New key generation failed. + Naujo rakto generavimas nepavyko. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versija + + + + Usage: + Naudojimas: + + + + command-line options + komandinės eilutės parametrai + + + + UI options + Naudotoji sąsajos parametrai + + + + Set language, for example "de_DE" (default: system locale) + Nustatyti kalbą, pavyzdžiui "lt_LT" (numatyta: sistemos kalba) + + + + Start minimized + Paleisti sumažintą + + + + Show splash screen on startup (default: 1) + + + + + OptionsDialog + + + Options + Parinktys + + + + &Main + &Pagrindinės + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + &Mokėti sandorio mokestį + + + + Automatically start curecoin after logging in to the system. + Automatiškai paleisti Megakoin programą įjungus sistemą. + + + + &Start curecoin on system login + &Paleisti curecoin programą su window sistemos paleidimu + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + &Tinklas + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Automatiškai atidaryti curecoin kliento prievadą maršrutizatoriuje. Tai veikia tik tada, kai jūsų maršrutizatorius palaiko UPnP ir ji įjungta. + + + + Map port using &UPnP + Persiųsti prievadą naudojant &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Jungtis į Megakoin tinklą per socks proxy (pvz. jungiantis per Tor) + + + + &Connect through SOCKS proxy: + &Jungtis per SOCKS tarpinį serverį: + + + + Proxy &IP: + Tarpinio serverio &IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + Tarpinio serverio IP adresas (pvz. 127.0.0.1) + + + + &Port: + &Prievadas: + + + + Port of the proxy (e.g. 9050) + Tarpinio serverio preivadas (pvz, 9050) + + + + SOCKS &Version: + SOCKS &versija: + + + + SOCKS version of the proxy (e.g. 5) + Tarpinio serverio SOCKS versija (pvz., 5) + + + + &Window + &Langas + + + + Show only a tray icon after minimizing the window. + Po programos lango sumažinimo rodyti tik programos ikoną. + + + + &Minimize to the tray instead of the taskbar + &M sumažinti langą bet ne užduočių juostą + + + + 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. + Uždarant langą neuždaryti programos. Kai ši parinktis įjungta, programa bus uždaryta tik pasirinkus meniu komandą Baigti. + + + + M&inimize on close + &Sumažinti uždarant + + + + &Display + &Rodymas + + + + User Interface &language: + Naudotojo sąsajos &kalba: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Čia gali būti nustatyta naudotojo sąsajos kalba. Šis nustatymas įsigalios iš naujo paleidus curecoin. + + + + &Unit to show amounts in: + &Vienetai, kuriais rodyti sumas: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Rodomų ir siunčiamų monetų kiekio matavimo vienetai + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + &Rodyti adresus sandorių sąraše + + + + &OK + &Gerai + + + + &Cancel + &Atšaukti + + + + &Apply + &Pritaikyti + + + + default + numatyta + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + Įspėjimas + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + Nurodytas tarpinio serverio adresas negalioja. + + + + OverviewPage + + + Form + Forma + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + Balansas: + + + + Unconfirmed: + Nepatvirtinti: + + + + Wallet + Piniginė + + + + Immature: + Nepribrendę: + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Naujausi sandoriai</b> + + + + Your current balance + Jūsų einamasis balansas + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Iš viso sandorių, įskaitant tuos kurie dar turi būti patvirtinti, ir jie dar nėra įskaičiuotii į einamosios sąskaitos balansą + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + QR kodo dialogas + + + + Request Payment + Prašau išmokėti + + + + Amount: + Suma: + + + + Label: + Žymė: + + + + Message: + Žinutė: + + + + &Save As... + Į&rašyti kaip... + + + + Error encoding URI into QR Code. + Klaida, koduojant URI į QR kodą. + + + + The entered amount is invalid, please check. + Įvesta suma neteisinga, prašom patikrinti. + + + + Resulting URI too long, try to reduce the text for label / message. + + + + + Save QR Code + Įrašyti QR kodą + + + + PNG Images (*.png) + PNG paveikslėliai (*.png) + + + + RPCConsole + + + Client name + Kliento pavadinimas + + + + + + + + + + + + + N/A + nėra + + + + Client version + Kliento versija + + + + &Information + &Informacija + + + + Using OpenSSL version + Naudojama OpenSSL versija + + + + Startup time + Paleidimo laikas + + + + Network + Tinklas + + + + Number of connections + Prisijungimų kiekis + + + + On testnet + Testnete + + + + Block chain + Blokų grandinė + + + + Current number of blocks + Dabartinis blokų skaičius + + + + Estimated total blocks + + + + + Last block time + Paskutinio bloko laikas + + + + &Open + &Atverti + + + + Command-line options + Komandinės eilutės parametrai + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + &Rodyti + + + + &Console + &Konsolė + + + + Build date + Kompiliavimo data + + + + curecoin - Debug window + curecoin - Derinimo langas + + + + curecoin Core + curecoin branduolys + + + + Debug log file + Derinimo žurnalo failas + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + Išvalyti konsolę + + + + Welcome to the curecoin 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 + Siųsti monetas + + + + Send to multiple recipients at once + Siųsti keliems gavėjams vienu metu + + + + Add &Recipient + &A Pridėti gavėją + + + + Remove all transaction fields + Pašalinti visus sandorio laukus + + + + Clear &All + Išvalyti &viską + + + + Balance: + Balansas: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Patvirtinti siuntimo veiksmą + + + + S&end + &Siųsti + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send coins + Patvirtinti monetų siuntimą + + + + Are you sure you want to send %1? + Ar tikrai norite siųsti %1? + + + + and + ir + + + + The recipient address is not valid, please recheck. + Negaliojantis gavėjo adresas. Patikrinkite. + + + + The amount to pay must be larger than 0. + Apmokėjimo suma turi būti didesnė nei 0. + + + + The amount exceeds your balance. + Suma viršija jūsų balansą. + + + + The total exceeds your balance when the %1 transaction fee is included. + Jei pridedame sandorio mokestį %1 bendra suma viršija jūsų balansą. + + + + Duplicate address found, can only send to each address once per send operation. + Rastas adreso dublikatas. + + + + 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. + Klaida: sandoris buvo atmestas.Tai gali įvykti, jei kai kurios monetos iš jūsų piniginėje jau buvo panaudotos, pvz. jei naudojote wallet.dat kopiją ir monetos buvo išleistos kopijoje, bet nepažymėtos kaip skirtos išleisti čia. + + + + SendCoinsEntry + + + Form + Forma + + + + A&mount: + Su&ma: + + + + Pay &To: + Mokėti &gavėjui: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + 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ė: + + + + Choose address from address book + Pasirinkite adresą iš adresų knygelės + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Įvesti adresą iš mainų atminties + + + + Alt+P + Alt+P + + + + Remove this recipient + Pašalinti šį gavėją + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Įveskite megakoinų adresą (pvz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + + + + + &Sign Message + &Pasirašyti žinutę + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Įveskite megakoinų adresą (pvz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Pasirinkite adresą iš adresų knygelės + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Įvesti adresą iš mainų atminties + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Įveskite pranešimą, kurį norite pasirašyti čia + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + Registruotis žinute įrodymuii, kad turite šį adresą + + + + Sign &Message + + + + + Reset all sign message fields + + + + + + Clear &All + Išvalyti &viską + + + + &Verify Message + &Patikrinti žinutę + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Įveskite megakoinų adresą (pvz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Patikrinkite žinutę, jog įsitikintumėte, kad ją pasirašė nurodytas curecoin adresas + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Įveskite megakoinų adresą (pvz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Spragtelėkite "Registruotis žinutę" tam, kad gauti parašą + + + + Enter curecoin signature + Įveskite curecoin parašą + + + + + The entered address is invalid. + Įvestas adresas negalioja. + + + + + + + Please check the address and try again. + Prašom patikrinti adresą ir bandyti iš naujo. + + + + + The entered address does not refer to a key. + + + + + Wallet unlock was cancelled. + Piniginės atrakinimas atšauktas. + + + + Private key for the entered address is not available. + + + + + Message signing failed. + Žinutės pasirašymas nepavyko. + + + + Message signed. + Žinutė pasirašyta. + + + + The signature could not be decoded. + Nepavyko iškoduoti parašo. + + + + + Please check the signature and try again. + Prašom patikrinti parašą ir bandyti iš naujo. + + + + The signature did not match the message digest. + Parašas neatitinka žinutės. + + + + Message verification failed. + Žinutės tikrinimas nepavyko. + + + + Message verified. + Žinutė patikrinta. + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [testavimotinklas] + + + + TransactionDesc + + + Open until %1 + Atidaryta iki %1 + + + + %1/offline + %1/neprisijungęs + + + + %1/unconfirmed + %1/nepatvirtintas + + + + %1 confirmations + %1 patvirtinimų + + + + Status + Būsena + + + + , broadcast through %n node(s) + + + + + Date + Data + + + + Source + Šaltinis + + + + Generated + Sugeneruotas + + + + + From + Nuo + + + + + + To + Kam + + + + + own address + savo adresas + + + + label + žymė + + + + + + + + Credit + Kreditas + + + + matures in %n more block(s) + + + + + not accepted + nepriimta + + + + + + + Debit + Debitas + + + + Transaction fee + Sandorio mokestis + + + + Net amount + Neto suma + + + + Message + Žinutė + + + + Comment + Komentaras + + + + Transaction ID + Sandorio ID + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Išgautos monetos turi sulaukti 120 blokų, kol jos gali būti naudojamos. Kai sukūrėte šį bloką, jis buvo transliuojamas tinkle ir turėjo būti įtrauktas į blokų grandinę. Jei nepavyksta patekti į grandinę, bus pakeista į "nepriėmė", o ne "vartojamas". Tai kartais gali atsitikti, jei kitas mazgas per keletą sekundžių sukuria bloką po jūsų bloko. + + + + Debug information + Derinimo informacija + + + + Transaction + Sandoris + + + + Inputs + + + + + Amount + Suma + + + + true + tiesa + + + + false + netiesa + + + + , has not been successfully broadcast yet + , transliavimas dar nebuvo sėkmingas + + + + Open for %n more block(s) + + + + + unknown + nežinomas + + + + TransactionDescDialog + + + Transaction details + Sandorio detelės + + + + This pane shows a detailed description of the transaction + Šis langas sandorio detalų aprašymą + + + + TransactionTableModel + + + Date + Data + + + + Type + Tipas + + + + Address + Adresas + + + + Amount + Suma + + + + Open for %n more block(s) + + + + + Open until %1 + Atidaryta iki %1 + + + + Offline (%1 confirmations) + Atjungta (%1 patvirtinimai) + + + + Unconfirmed (%1 of %2 confirmations) + Nepatvirtintos (%1 iš %2 patvirtinimų) + + + + Confirmed (%1 confirmations) + Patvirtinta (%1 patvirtinimai) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + Šis blokas negautas nė vienu iš mazgų ir matomai nepriimtas + + + + Generated but not accepted + Išgauta bet nepriimta + + + + Received with + Gauta su + + + + Received from + Gauta iš + + + + Sent to + Siųsta + + + + Payment to yourself + Mokėjimas sau + + + + Mined + Išgauta + + + + (n/a) + 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ų. + + + + Date and time that the transaction was received. + Sandorio gavimo data ir laikas + + + + Type of transaction. + Sandorio tipas. + + + + Destination address of transaction. + Sandorio paskirties adresas + + + + Amount removed from or added to balance. + Suma pridėta ar išskaičiuota iš balanso + + + + TransactionView + + + + All + Visi + + + + Today + Šiandien + + + + This week + Šią savaitę + + + + This month + Šį mėnesį + + + + Last month + Paskutinį mėnesį + + + + This year + Šiais metais + + + + Range... + Intervalas... + + + + Received with + Gauta su + + + + Sent to + Išsiųsta + + + + To yourself + Skirta sau + + + + Mined + Išgauta + + + + Other + Kita + + + + Enter address or label to search + Įveskite adresą ar žymę į paiešką + + + + Min amount + Minimali suma + + + + Copy address + Kopijuoti adresą + + + + Copy label + Kopijuoti žymę + + + + Copy amount + Kopijuoti sumą + + + + Copy transaction ID + + + + + Edit label + Taisyti žymę + + + + Show transaction details + Rodyti sandėrio detales + + + + Export Transaction Data + Sandorio duomenų eksportavimas + + + + Comma separated file (*.csv) + Kableliais atskirtų duomenų failas (*.csv) + + + + Confirmed + Patvirtintas + + + + Date + Data + + + + Type + Tipas + + + + Label + Žymė + + + + Address + Adresas + + + + Amount + Suma + + + + ID + ID + + + + Error exporting + Eksportavimo klaida + + + + Could not write to file %1. + Neįmanoma įrašyti į failą %1. + + + + Range: + Grupė: + + + + to + skirta + + + + WalletModel + + + Send Coins + Siųsti monetas + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + curecoin versija + + + + Usage: + Naudojimas: + + + + Send command to -server or curecoind + Siųsti komandą serveriui arba curecoind + + + + List commands + Komandų sąrašas + + + + Get help for a command + Suteikti pagalba komandai + + + + Options: + Parinktys: + + + + Specify configuration file (default: curecoin.conf) + Nurodyti konfigūracijos failą (pagal nutylėjimąt: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Nurodyti pid failą (pagal nutylėjimą: curecoind.pid) + + + + Specify data directory + Nustatyti duomenų aplanką + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Sujungimo klausymas prijungčiai <port> (pagal nutylėjimą: 7951 arba testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Palaikyti ne daugiau <n> jungčių kolegoms (pagal nutylėjimą: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + Threshold for disconnecting misbehaving peers (default: 100) + Atjungimo dėl netinkamo kolegų elgesio riba (pagal nutylėjimą: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Sekundžių kiekis eikiamas palaikyti ryšį dėl lygiarangių nestabilumo (pagal nutylėjimą: 86.400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Klausymas JSON-RPC sujungimui prijungčiai <port> (pagal nutylėjimą: 7950 or testnet: 17950) + + + + Accept command line and JSON-RPC commands + Priimti komandinę eilutę ir JSON-RPC komandas + + + + Run in the background as a daemon and accept commands + Dirbti fone kaip šešėlyje ir priimti komandas + + + + Use the test network + Naudoti testavimo tinklą + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Įspėjimas: -paytxfee yra nustatytas per didelis. Tai sandorio mokestis, kurį turėsite mokėti, jei siųsite sandorį. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Įspėjimas: Patikrinkite, kad kompiuterio data ir laikas yra teisingi.Jei Jūsų laikrodis neteisingai nustatytas curecoin, veiks netinkamai. + + + + 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) + Prisijungti tik prie nurodyto mazgo + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + Neteisingas tor adresas: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maksimalus buferis priėmimo sujungimui <n>*1000 bitų (pagal nutylėjimą: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maksimalus buferis siuntimo sujungimui <n>*1000 bitų (pagal nutylėjimą: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + + + + + Output extra debugging information. Implies all other -debug* options + Išvesti papildomą derinimo informaciją. Numanomi visi kiti -debug* parametrai + + + + Output extra network debugging information + Išvesti papildomą tinklo derinimo informaciją + + + + Prepend debug output with timestamp + Prideėti laiko žymę derinimo rezultatams + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL opcijos (žr.e curecoin 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 + Siųsti atsekimo/derinimo info į konsolę vietoj debug.log failo + + + + Send trace/debug info to debugger + Siųsti sekimo/derinimo info derintojui + + + + 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Nustatyti sujungimo trukmę milisekundėmis (pagal nutylėjimą: 5000) + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Bandymas naudoti UPnP struktūra klausymosi prievadui (default: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Bandymas naudoti UPnP struktūra klausymosi prievadui (default: 1 when listening) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + Vartotojo vardas JSON-RPC jungimuisi + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Slaptažodis JSON-RPC sujungimams + + + + Allow JSON-RPC connections from specified IP address + Leisti JSON-RPC tik iš nurodytų IP adresų + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Siųsti komandą mazgui dirbančiam <ip> (pagal nutylėjimą: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Upgrade wallet to latest format + Atnaujinti piniginę į naujausią formatą + + + + Set key pool size to <n> (default: 100) + Nustatyti rakto apimties dydį <n> (pagal nutylėjimą: 100) + + + + Rescan the block chain for missing wallet transactions + Ieškoti prarastų piniginės sandorių blokų grandinėje + + + + Use OpenSSL (https) for JSON-RPC connections + Naudoti OpenSSL (https) jungimuisi JSON-RPC + + + + Server certificate file (default: server.cert) + Serverio sertifikato failas (pagal nutylėjimą: server.cert) + + + + Server private key (default: server.pem) + Serverio privatus raktas (pagal nutylėjimą: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Priimtini šifrai (pagal nutylėjimą: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Pagelbos žinutė + + + + 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 + Jungtis per socks tarpinį serverį + + + + Allow DNS lookups for -addnode, -seednode and -connect + Leisti DNS paiešką sujungimui ir mazgo pridėjimui + + + + Loading addresses... + Užkraunami adresai... + + + + Error loading wallet.dat: Wallet corrupted + wallet.dat pakrovimo klaida, wallet.dat sugadintas + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + wallet.dat pakrovimo klaida, wallet.dat reikalauja naujasnės curecoin versijos + + + + Wallet needed to be rewritten: restart curecoin to complete + Piniginė turi būti prrašyta: įvykdymui perkraukite curecoin + + + + Error loading wallet.dat + wallet.dat pakrovimo klaida + + + + Invalid -proxy address: '%s' + Neteisingas proxy adresas: '%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' + Neteisinga suma -paytxfee=<amount>: '%s' + + + + Invalid amount + Neteisinga suma + + + + Insufficient funds + Nepakanka lėšų + + + + Loading block index... + Įkeliamas blokų indeksas... + + + + 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. curecoin is probably already running. + Nepavyko susieti šiame kompiuteryje prievado %s. curecoin tikriausiai jau veikia. + + + + Fee per KB to add to transactions you send + Įtraukti mokestį už kB siunčiamiems sandoriams + + + + Loading wallet... + Užkraunama piniginė... + + + + Cannot downgrade wallet + + + + + Cannot write default address + + + + + Rescanning... + Peržiūra + + + + Done loading + Įkėlimas baigtas + + + + To use the %s option + + + + + Error + Klaida + + + + 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/curecoin_lv_LV.qm b/src/qt/locale/curecoin_lv_LV.qm new file mode 100644 index 0000000..6190324 Binary files /dev/null and b/src/qt/locale/curecoin_lv_LV.qm differ diff --git a/src/qt/locale/curecoin_lv_LV.ts b/src/qt/locale/curecoin_lv_LV.ts new file mode 100644 index 0000000..279e1d0 --- /dev/null +++ b/src/qt/locale/curecoin_lv_LV.ts @@ -0,0 +1,2923 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Par curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> versija + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Adrešu grāmata + + + + Double-click to edit address or label + Adresi vai nosaukumu rediģē ar dubultklikšķi + + + + Create a new address + Izveidot jaunu adresi + + + + Copy the currently selected address to the system clipboard + Kopēt iezīmēto adresi uz starpliktuvi + + + + &New Address + &Jauna adrese + + + + These are your curecoin 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 + Parādīt &QR kodu + + + + Sign a message to prove you own a curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &Dzēst + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Kopēt &Nosaukumu + + + + &Edit + &Rediģēt + + + + Send &Coins + + + + + Export Address Book Data + Eksportēt adreses + + + + Comma separated file (*.csv) + Fails ar komatu kā atdalītāju (*.csv) + + + + Error exporting + Kļūda eksportējot + + + + Could not write to file %1. + Nevar ierakstīt failā %1. + + + + AddressTableModel + + + Label + Nosaukums + + + + Address + Adrese + + + + (no label) + (bez nosaukuma) + + + + AskPassphraseDialog + + + Passphrase Dialog + Paroles dialogs + + + + Enter passphrase + Ierakstiet paroli + + + + New passphrase + Jauna parole + + + + Repeat new passphrase + Jaunā parole vēlreiz + + + + 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>. + Ierakstiet maciņa jauno paroli.<br/>Lūdzu izmantojiet <b>10 vai vairāk nejauši izvēlētas zīmes</b>, vai <b>astoņus un vairāk vārdus</b>. + + + + Encrypt wallet + Šifrēt maciņu + + + + This operation needs your wallet passphrase to unlock the wallet. + Lai veikto šo darbību, maciņš jāatslēdz ar paroli. + + + + Unlock wallet + Atslēgt maciņu + + + + This operation needs your wallet passphrase to decrypt the wallet. + Šai darbībai maciņš jāatšifrē ar maciņa paroli. + + + + Decrypt wallet + Atšifrēt maciņu + + + + Change passphrase + Mainīt paroli + + + + Enter the old and new passphrase to the wallet. + Ierakstiet maciņa veco un jauno paroli. + + + + Confirm wallet encryption + Apstiprināt maciņa šifrēšanu + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</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 + Maciņš nošifrēts + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin aizvērsies, lai pabeigtu šifrēšanu. Atcerieties, ka maciņa šifrēšana nevar pilnībā novērst megakoinu zādzību, ko veic datorā ieviesušās kaitīgas programmas. + + + + + + + Wallet encryption failed + Maciņa šifrēšana neizdevās + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Maciņa šifrēšana neizdevās programmas kļūdas dēļ. Jūsu maciņš netika šifrēts. + + + + + The supplied passphrases do not match. + Ievadītās paroles nav vienādas. + + + + Wallet unlock failed + Maciņu atšifrēt neizdevās + + + + + + The passphrase entered for the wallet decryption was incorrect. + Maciņa atšifrēšanai ievadītā parole nav pareiza. + + + + Wallet decryption failed + Maciņu neizdevās atšifrēt + + + + Wallet passphrase was successfully changed. + + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Rediģēt saglabātās adreses un nosaukumus + + + + Show the list of addresses for receiving payments + Rādīt maksājumu saņemšanas adreses + + + + E&xit + &Iziet + + + + Quit application + Aizvērt programmu + + + + Show information about curecoin + Parādīt informāciju par curecoin + + + + 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 + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + Nosūtīt megakoinus uz curecoin adresi + + + + Modify configuration options for curecoin + Mainīt curecoin konfigurācijas uzstādījumus + + + + 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... + + + + + curecoin + + + + + Wallet + Maciņš + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Fails + + + + &Settings + &Uzstādījumi + + + + &Help + &Palīdzība + + + + Tabs toolbar + Ciļņu rīkjosla + + + + + [testnet] + [testnet] + + + + curecoin client + curecoin klients + + + + %n active connection(s) to curecoin network + %n aktīvu savienojumu ar curecoin tīklu%n aktīvs savienojums ar curecoin tīklu%n aktīvu savienojumu as curecoin tīklu + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + Kļūda + + + + Warning + Brīdinājums + + + + Information + + + + + 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? + + + + + Up to date + Sinhronizēts + + + + Catching up... + Sinhronizējos... + + + + Confirm transaction fee + Apstiprināt transakcijas maksu + + + + 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 curecoin 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + Tīkla brīdinājums + + + + EditAddressDialog + + + Edit Address + Mainīt adrese + + + + &Label + &Nosaukums + + + + The label associated with this address book entry + Adrešu grāmatas ieraksta nosaukums + + + + &Address + &Adrese + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Adrese adrešu grāmatas ierakstā. To var mainīt tikai nosūtīšanas adresēm. + + + + 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 already in the address book. + Nupat ierakstītā adrese "%1" jau atrodas adrešu grāmatā. + + + + The entered address "%1" is not a valid curecoin address. + Ierakstītā adrese "%1" nav derīga curecoin adrese. + + + + Could not unlock wallet. + Nav iespējams atslēgt maciņu. + + + + New key generation failed. + Neizdevās ģenerēt jaunu atslēgu. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versija + + + + Usage: + Lietojums: + + + + command-line options + komandrindas izvēles + + + + UI options + Lietotāja interfeisa izvēlnes + + + + Set language, for example "de_DE" (default: system locale) + Uzstādiet valodu, piemēram "de_DE" (pēc noklusēšanas: sistēmas lokāle) + + + + Start minimized + Sākt minimizētu + + + + Show splash screen on startup (default: 1) + Uzsākot, parādīt programmas informācijas logu (pēc noklusēšanas: 1) + + + + OptionsDialog + + + Options + Iespējas + + + + &Main + &Galvenais + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + &Maksāt par transakciju + + + + Automatically start curecoin after logging in to the system. + Automātiski sākt curecoin pēc pieteikšanās sistēmā. + + + + &Start curecoin on system login + &Sākt curecoin reizē ar sistēmu + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + &Tīkls + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Uz rūtera automātiski atvērt curecoin klienta portu. Tas strādā tikai tad, ja rūteris atbalsta UPnP un tas ir ieslēgts. + + + + Map port using &UPnP + Kartēt portu, izmantojot &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + + + + + &Connect through SOCKS proxy: + &Savienoties caur SOCKS proxy: + + + + Proxy &IP: + Proxy &IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + proxy IP adrese (piem. 127.0.0.1) + + + + &Port: + &Ports: + + + + Port of the proxy (e.g. 9050) + Proxy ports (piem. 9050) + + + + SOCKS &Version: + SOCKS &Versija: + + + + SOCKS version of the proxy (e.g. 5) + proxy SOCKS versija (piem. 5) + + + + &Window + &Logs + + + + Show only a tray icon after minimizing the window. + Pēc loga minimizācijas rādīt tikai ikonu sistēmas teknē. + + + + &Minimize to the tray instead of the taskbar + &Minimizēt uz sistēmas tekni, nevis rīkjoslu + + + + 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. + Logu aizverot, minimizēt, nevis beigt darbu. Kad šī izvēlne iespējota, programma aizvērsies tikai pēc Beigt komandas izvēlnē. + + + + M&inimize on close + M&inimizēt aizverot + + + + &Display + &Izskats + + + + User Interface &language: + Lietotāja interfeiss un &valoda: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Šeit var iestatīt lietotāja valodu. Iestatījums aktivizēsies pēc curecoin pārstartēšanas. + + + + &Unit to show amounts in: + &Vienības, kurās attēlot daudzumus: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Izvēlēties dalījuma vienību pēc noklusēšanas, ko izmantot interfeisā un nosūtot megakoinus. + + + + Whether to show curecoin addresses in the transaction list or not. + Rādīt vai nē curecoin adreses transakciju sarakstā. + + + + &Display addresses in transaction list + &Attēlot adreses transakciju sarakstā + + + + &OK + &OK + + + + &Cancel + &Atcelt + + + + &Apply + &Pielietot + + + + default + pēc noklusēšanas + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + Brīdinājums + + + + + This setting will take effect after restarting curecoin. + Iestatījums aktivizēsies pēc Megakoin pārstartēšanas. + + + + The supplied proxy address is invalid. + Norādītā proxy adrese nav derīga. + + + + OverviewPage + + + Form + Forma + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Attēlotā informācija var būt novecojusi. Jūsu maciņš pēc savienojuma izveides automātiski sinhronizējas ar curecoin tīklu, taču šis process vēl nav beidzies. + + + + Balance: + Bilance: + + + + Unconfirmed: + Neapstiprinātas: + + + + Wallet + Maciņš + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Pēdējās transakcijas</b> + + + + Your current balance + Jūsu tekošā bilance + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Kopējā apstiprināmo transakciju vērtība, vēl nav ieskaitīta kopējā bilancē + + + + + out of sync + nav sinhronizēts + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + QR koda dialogs + + + + Request Payment + Pieprasīt maksājumu + + + + Amount: + Daudzums: + + + + Label: + Nosaukums: + + + + Message: + Ziņojums: + + + + &Save As... + &Saglabāt kā... + + + + Error encoding URI into QR Code. + Kļūda kodējot URI QR kodā. + + + + The entered amount is invalid, please check. + + + + + Resulting URI too long, try to reduce the text for label / message. + Rezultāta URI pārāk garš, mēģiniet saīsināt nosaukumu vai ziņojumu. + + + + Save QR Code + Saglabāt QR kodu + + + + PNG Images (*.png) + PNG attēli (*.png) + + + + RPCConsole + + + Client name + Klienta vārds + + + + + + + + + + + + + N/A + N/A + + + + Client version + Klienta versija + + + + &Information + &Informācija + + + + Using OpenSSL version + + + + + Startup time + Sākuma laiks + + + + Network + Tīkls + + + + Number of connections + Savienojumu skaits + + + + On testnet + Testa tīklā + + + + Block chain + Bloku virkne + + + + Current number of blocks + Pašreizējais bloku skaits + + + + Estimated total blocks + Bloku skaita novērtējums + + + + Last block time + Pēdējā bloka laiks + + + + &Open + &Atvērt + + + + Command-line options + + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + &Konsole + + + + Build date + Kompilācijas datums + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + Notīrīt konsoli + + + + Welcome to the curecoin RPC console. + Laipni lūgti curecoin RPC konsolē. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Izmantojiet bultiņas uz augšu un leju, lai pārvietotos pa vēsturi, un <b>Ctrl-L</b> ekrāna notīrīšanai. + + + + Type <b>help</b> for an overview of available commands. + Ierakstiet <b>help</b> lai iegūtu pieejamo komandu sarakstu. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Sūtīt megakoinus + + + + Send to multiple recipients at once + Sūtīt vairākiem saņēmējiem uzreiz + + + + Add &Recipient + + + + + Remove all transaction fields + Dzēst visus transakcijas laukus + + + + Clear &All + &Notīrīt visu + + + + Balance: + Bilance: + + + + 123.456 MEC + 123,456 MEC + + + + Confirm the send action + Apstiprināt nosūtīšanu + + + + S&end + + + + + <b>%1</b> to %2 (%3) + <b>%1</b> līdz %2 (%3) + + + + Confirm send coins + Apstiprināt megakoinu sūtīšanu + + + + Are you sure you want to send %1? + Vai tiešām vēlaties nosūtīt %1? + + + + and + un + + + + The recipient address is not valid, please recheck. + + + + + The amount to pay must be larger than 0. + Nosūtāmajai summai jābūt lielākai par 0. + + + + The amount exceeds your balance. + Daudzums pārsniedz pieejamo. + + + + The total exceeds your balance when the %1 transaction fee is included. + Kopsumma pārsniedz pieejamo, ja pieskaitīta %1 transakcijas maksa. + + + + 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: 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. + Kļūda: transakcija tika atteikta. Tā var gadīties, ja kāds no maciņā esošiem megakoiniem jau iztērēts, piemēram, izmantojot wallet.dat kopiju, kurā nav atzīmēti iztērētie megakoini. + + + + SendCoinsEntry + + + Form + Forma + + + + A&mount: + Apjo&ms + + + + Pay &To: + &Saņēmējs: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + 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: + + + + Choose address from address book + Izvēlēties adresi no adrešu grāmatas + + + + Alt+A + Alt+A + + + + Paste address from clipboard + ielīmēt adresi no starpliktuves + + + + Alt+P + Alt+P + + + + Remove this recipient + Dzēst šo saņēmēju + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Ierakstiet curecoin adresi (piem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + ielīmēt adresi no starpliktuves + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + Reset all sign message fields + + + + + + Clear &All + &Notīrīt visu + + + + &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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Ierakstiet curecoin adresi (piem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + Atvērts līdz %1 + + + + %1/offline + + + + + %1/unconfirmed + %1/neapstiprinātas + + + + %1 confirmations + %1 apstiprinājumu + + + + Status + + + + + , broadcast through %n node(s) + + + + + Date + Datums + + + + 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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + Daudzums + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + , vēl nav veiksmīgi izziņots + + + + Open for %n more block(s) + + + + + unknown + nav zināms + + + + TransactionDescDialog + + + Transaction details + Transakcijas detaļas + + + + This pane shows a detailed description of the transaction + Šis panelis parāda transakcijas detaļas + + + + TransactionTableModel + + + Date + Datums + + + + Type + Tips + + + + Address + Adrese + + + + Amount + Daudzums + + + + Open for %n more block(s) + + + + + Open until %1 + Atvērts līdz %1 + + + + Offline (%1 confirmations) + Nav pieslēgts (%1 apstiprinājumu) + + + + Unconfirmed (%1 of %2 confirmations) + Nav apstiprināts (%1 no %2 apstiprinājumu) + + + + Confirmed (%1 confirmations) + Apstiprināts (%1 apstiprinājumu) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + Neviens cits mezgls šo bloku nav saņēmis un droši vien netiks akceptēts! + + + + Generated but not accepted + Ģenerēts, taču nav akceptēts + + + + Received with + Saņemts ar + + + + Received from + Saņemts no + + + + Sent to + Nosūtīts + + + + Payment to yourself + Maksājums sev + + + + Mined + Atrasts + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Transakcijas saņemšanas datums un laiks. + + + + Type of transaction. + Transakcijas tips. + + + + Destination address of transaction. + Transakcijas mērķa adrese. + + + + Amount removed from or added to balance. + Bilancei pievienotais vai atņemtais daudzums. + + + + TransactionView + + + + All + Visi + + + + Today + Šodien + + + + This week + Šonedēļ + + + + This month + Šomēnes + + + + Last month + Pēdējais mēnesis + + + + This year + Šogad + + + + Range... + Diapazons... + + + + Received with + Saņemts ar + + + + Sent to + Nosūtīts + + + + To yourself + Sev + + + + Mined + Atrasts + + + + Other + Cits + + + + Enter address or label to search + Ierakstiet meklējamo nosaukumu vai adresi + + + + Min amount + Minimālais daudzums + + + + Copy address + Kopēt adresi + + + + Copy label + Kopēt nosaukumu + + + + Copy amount + Kopēt daudzumu + + + + Copy transaction ID + + + + + Edit label + Mainīt nosaukumu + + + + Show transaction details + Rādīt transakcijas detaļas + + + + Export Transaction Data + Eksportēt transakcijas datus + + + + Comma separated file (*.csv) + Fails ar komatu kā atdalītāju (*.csv) + + + + Confirmed + Apstiprināts + + + + Date + Datums + + + + Type + Tips + + + + Label + Nosaukums + + + + Address + Adrese + + + + Amount + Daudzums + + + + ID + ID + + + + Error exporting + Eksportēšanas kļūda + + + + Could not write to file %1. + Nevar ierakstīt failā %1. + + + + Range: + Diapazons: + + + + to + + + + + WalletModel + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + Izveidot maciņa rezerves kopiju + + + + Wallet Data (*.dat) + Maciņa dati (*.dat) + + + + Backup Failed + Rezerves kopēšana neizdevās + + + + There was an error trying to save the wallet data to the new location. + Kļūda, saglabājot maciņu jaunajā vietā. + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + curecoin versija + + + + Usage: + Lietojums: + + + + Send command to -server or curecoind + Nosūtīt komantu uz -server vai curecoind + + + + List commands + Komandu saraksts + + + + Get help for a command + Palīdzība par komandu + + + + Options: + Iespējas: + + + + Specify configuration file (default: curecoin.conf) + Norādiet konfigurācijas failu (pēc noklusēšanas: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Norādiet pid failu (pēc noklusēšanas: curecoind.pid) + + + + Specify data directory + Norādiet datu direktoriju + + + + Set database cache size in megabytes (default: 25) + Uzstādiet datu bāzes bufera izmēru megabaitos (pēc noklusēšanas: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Gaidīt savienojumus portā <port> (pēc noklusēšanas: 7951 vai testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Uzturēt līdz <n> savienojumiem ar citiem mezgliem(pēc noklusēšanas: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Pievienoties mezglam, lai iegūtu citu mezglu adreses, un atvienoties + + + + Specify your own public address + Norādiet savu publisko adresi + + + + Threshold for disconnecting misbehaving peers (default: 100) + Slieksnis pārkāpējmezglu atvienošanai (pēc noklusēšanas: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Sekundes, cik ilgi atturēt pārkāpējmezglus no atkārtotas pievienošanās (pēc noklusēšanas: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + Pieņemt komandrindas un JSON-RPC komandas + + + + Run in the background as a daemon and accept commands + Darbināt fonā kā servisu un pieņemt komandas + + + + Use the test network + Izmantot testa tīklu + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 + Debug izvadei sākumā pievienot laika zīmogu + + + + SSL options: (see the curecoin 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 + Debug/trace informāciju izvadīt konsolē, nevis debug.log failā + + + + Send trace/debug info to debugger + Debug/trace informāciju izvadīt debug programmai + + + + 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + JSON-RPC savienojumu lietotājvārds + + + + Warning + Brīdinājums + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + JSON-RPC savienojumu parole + + + + Allow JSON-RPC connections from specified IP address + Atļaut JSON-RPC savienojumus no norādītās IP adreses + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Nosūtīt komandas mezglam, kas darbojas adresē <ip> (pēc noklusēšanas: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Izpildīt komandu, kad labāk atbilstošais bloks izmainās (%s cmd aizvieto ar bloka hešu) + + + + Upgrade wallet to latest format + Atjaunot maciņa formātu uz jaunāko + + + + Set key pool size to <n> (default: 100) + Uzstādīt atslēgu bufera izmēru uz <n> (pēc noklusēšanas: 100) + + + + Rescan the block chain for missing wallet transactions + Atkārtoti skanēt bloku virkni, meklējot trūkstošās maciņa transakcijas + + + + Use OpenSSL (https) for JSON-RPC connections + JSON-RPC savienojumiem izmantot OpenSSL (https) + + + + Server certificate file (default: server.cert) + Servera sertifikāta fails (pēc noklusēšanas: server.cert) + + + + Server private key (default: server.pem) + Servera privātā atslēga (pēc noklusēšanas: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Pieņemamie šifri (pēc noklusēšanas: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Šis palīdzības paziņojums + + + + 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 + Savienoties caurs socks proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Atļaut DNS uzmeklēšanu priekš -addnode, -seednode un -connect + + + + Loading addresses... + Ielādē adreses... + + + + Error loading wallet.dat: Wallet corrupted + Nevar ielādēt wallet.dat: maciņš bojāts + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Nevar ielādēt wallet.dat: maciņa atvēršanai nepieciešama jaunāka curecoin versija + + + + Wallet needed to be rewritten: restart curecoin to complete + Bija nepieciešams pārstartēt maciņu: pabeigšanai pārstartējiet curecoin + + + + Error loading wallet.dat + Kļūda ielādējot wallet.dat + + + + Invalid -proxy address: '%s' + Nederīga -proxy adrese: '%s' + + + + Unknown network specified in -onlynet: '%s' + -onlynet komandā norādīts nepazīstams tīkls: '%s' + + + + Unknown -socks proxy version requested: %i + Pieprasīta nezināma -socks proxy versija: %i + + + + Cannot resolve -bind address: '%s' + Nevar uzmeklēt -bind adresi: '%s' + + + + Cannot resolve -externalip address: '%s' + Nevar atrisināt -externalip adresi: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Nederīgs daudzums priekš -paytxfree=<amount>: '%s' + + + + Invalid amount + Nederīgs daudzums + + + + Insufficient funds + Nepietiek megakoinu + + + + Loading block index... + Ielādē bloku indeksu... + + + + 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. curecoin is probably already running. + Nevar pievienoties %s uz šī datora. curecoin droši vien jau darbojas. + + + + Fee per KB to add to transactions you send + Maksa par KB, ko pievienot nosūtāmajām transakcijām + + + + Loading wallet... + Ielādē maciņu... + + + + Cannot downgrade wallet + Nevar maciņa formātu padarīt vecāku + + + + Cannot write default address + Nevar ierakstīt adresi pēc noklusēšanas + + + + Rescanning... + Skanēju no jauna... + + + + Done loading + Ielāde pabeigta + + + + To use the %s option + Izmantot opciju %s + + + + Error + Kļūda + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Konfigurācijas failā jāuzstāda rpcpassword=<password>: +%s +Ja fails neeksistē, izveidojiet to ar atļauju lasīšanai tikai īpašniekam. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_nb.qm b/src/qt/locale/curecoin_nb.qm new file mode 100644 index 0000000..844cded Binary files /dev/null and b/src/qt/locale/curecoin_nb.qm differ diff --git a/src/qt/locale/curecoin_nb.ts b/src/qt/locale/curecoin_nb.ts new file mode 100644 index 0000000..0d1f807 --- /dev/null +++ b/src/qt/locale/curecoin_nb.ts @@ -0,0 +1,2938 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Om curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> versjon + + + + +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. + +Dette er eksperimentell programvare. + +Distribuert under MIT/X11 programvarelisensen, se medfølgende fil COPYING eller http://www.opensource.org/licenses/mit-license.php. + +Dette produktet inneholder programvare utviklet av OpenSSL prosjektet for bruk i OpenSSL Toolkit (http://www.openssl.org/) og kryptografisk programvare skrevet av Eric Young (eay@cryptsoft.com) og UPnP programvare skrevet av Thomas Bernard. + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Adressebok + + + + Double-click to edit address or label + Dobbeltklikk for å redigere adresse eller merkelapp + + + + Create a new address + Lag en ny adresse + + + + Copy the currently selected address to the system clipboard + Kopier den valgte adressen til systemets utklippstavle + + + + &New Address + &Ny Adresse + + + + These are your curecoin 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 curecoin-adresser for mottak av betalinger. Du kan gi forskjellige adresser til alle som skal betale deg for å holde bedre oversikt. + + + + &Copy Address + &Kopier Adresse + + + + Show &QR Code + Vis &QR Kode + + + + Sign a message to prove you own a curecoin address + Signer en melding for å bevise at du eier en curecoin-adresse + + + + Sign &Message + Signér &Melding + + + + Delete the currently selected address from the list + Slett den valgte adressen fra listen. + + + + Export the data in the current tab to a file + Eksporter data fra nåværende fane til fil + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + Verifiser en melding for å være sikker på at den ble signert av en angitt curecoin-adresse + + + + &Verify Message + &Verifiser Melding + + + + &Delete + &Slett + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Kopier &Merkelapp + + + + &Edit + &Rediger + + + + Send &Coins + Send &Coins + + + + Export Address Book Data + Eksporter adressebok + + + + Comma separated file (*.csv) + Kommaseparert fil (*.csv) + + + + Error exporting + Feil ved eksportering + + + + Could not write to file %1. + Kunne ikke skrive til filen %1. + + + + AddressTableModel + + + Label + Merkelapp + + + + Address + Adresse + + + + (no label) + (ingen merkelapp) + + + + AskPassphraseDialog + + + Passphrase Dialog + Dialog for Adgangsfrase + + + + Enter passphrase + Angi adgangsfrase + + + + New passphrase + Ny adgangsfrase + + + + Repeat new passphrase + Gjenta ny adgangsfrase + + + + 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>. + Skriv inn den nye adgangsfrasen for lommeboken.<br/>Vennligst bruk en adgangsfrase med <b>10 eller flere tilfeldige tegn</b>, eller <b>åtte eller flere ord</b>. + + + + Encrypt wallet + Krypter lommebok + + + + This operation needs your wallet passphrase to unlock the wallet. + Denne operasjonen krever adgangsfrasen til lommeboken for å låse den opp. + + + + Unlock wallet + Lås opp lommebok + + + + This operation needs your wallet passphrase to decrypt the wallet. + Denne operasjonen krever adgangsfrasen til lommeboken for å dekryptere den. + + + + Decrypt wallet + Dekrypter lommebok + + + + Change passphrase + Endre adgangsfrase + + + + Enter the old and new passphrase to the wallet. + Skriv inn gammel og ny adgangsfrase for lommeboken. + + + + Confirm wallet encryption + Bekreft kryptering av lommebok + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Advarsel: Hvis du krypterer lommeboken og mister adgangsfrasen, så vil du <b>MISTE ALLE DINE curecoinS</b>! + + + + Are you sure you wish to encrypt your wallet? + Er du sikker på at du vil kryptere lommeboken? + + + + 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. + VIKTIG: Tidligere sikkerhetskopier av din lommebok-fil, bør erstattes med den nylig genererte, krypterte filen, da de blir ugyldiggjort av sikkerhetshensyn så snart du begynner å bruke den nye krypterte lommeboken. + + + + + Warning: The Caps Lock key is on! + Advarsel: Caps Lock er på ! + + + + + Wallet encrypted + Lommebok kryptert + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin vil nå lukkes for å fullføre krypteringsprosessen. Husk at kryptering av lommeboken ikke fullt ut kan beskytte dine curecoins fra å bli stjålet om skadevare infiserer datamaskinen. + + + + + + + Wallet encryption failed + Kryptering av lommebok feilet + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Kryptering av lommebok feilet på grunn av en intern feil. Din lommebok ble ikke kryptert. + + + + + The supplied passphrases do not match. + De angitte adgangsfrasene er ulike. + + + + Wallet unlock failed + Opplåsing av lommebok feilet + + + + + + The passphrase entered for the wallet decryption was incorrect. + Adgangsfrasen angitt for dekryptering av lommeboken var feil. + + + + Wallet decryption failed + Dekryptering av lommebok feilet + + + + Wallet passphrase was successfully changed. + Adgangsfrase for lommebok endret. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Rediger listen over adresser og deres merkelapper + + + + Show the list of addresses for receiving payments + Vis listen over adresser for mottak av betalinger + + + + E&xit + &Avslutt + + + + Quit application + Avslutt applikasjonen + + + + Show information about curecoin + Vis informasjon om curecoin + + + + 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... + + + + Importing blocks from disk... + Importere blokker... + + + + Reindexing blocks on disk... + Re-indekserer blokker på disk... + + + + Send coins to a curecoin address + Send til en curecoin-adresse + + + + Modify configuration options for curecoin + Endre oppsett for curecoin + + + + 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... + + + + + curecoin + curecoin + + + + Wallet + Lommebok + + + + &Send + &Send + + + + &Receive + &Motta + + + + &Addresses + &Adressebok + + + + &About curecoin + &Om curecoin + + + + &Show / Hide + &Gjem / vis + + + + Show or hide the main Window + Vis eller skjul hovedvinduet + + + + Encrypt the private keys that belong to your wallet + Krypter de private nøklene som tilhører lommeboken din + + + + Sign messages with your curecoin addresses to prove you own them + Signér en melding for å bevise at du eier denne adressen + + + + Verify messages to ensure they were signed with specified curecoin addresses + Bekreft meldinger for å være sikker på at de ble signert av en angitt curecoin-adresse + + + + &File + &Fil + + + + &Settings + &Innstillinger + + + + &Help + &Hjelp + + + + Tabs toolbar + Verktøylinje for faner + + + + + [testnet] + [testnett] + + + + curecoin client + curecoinklient + + + + %n active connection(s) to curecoin network + %n aktiv forbindelse til curecoin-nettverket%n aktive forbindelser til curecoin-nettverket + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + Lastet %1 blokker med transaksjonshistorikk. + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + Transaksjoner etter dette vil ikke være synlige enda. + + + + Error + + + + + Warning + + + + + Information + + + + + 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 transaksjonen overstiger størrelsesbegrensningen. Du kan likevel sende den med et gebyr på %1, som går til nodene som prosesserer transaksjonen din og støtter nettverket. Vil du betale gebyret? + + + + Up to date + Ajour + + + + Catching up... + Kommer ajour... + + + + Confirm transaction fee + Bekreft transaksjonsgebyr + + + + 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 håndtering + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + URI kunne ikke tolkes! Dette kan forårsakes av en ugyldig curecoin-adresse eller feil i URI-parametere. + + + + 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + En fatal feil har inntruffet. Det er ikke trygt å fortsette og curecoin må derfor avslutte. + + + + ClientModel + + + Network Alert + Nettverksvarsel + + + + EditAddressDialog + + + Edit Address + Rediger adresse + + + + &Label + &Merkelapp + + + + The label associated with this address book entry + Merkelappen koblet til denne adressen i adresseboken + + + + &Address + &Adresse + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Adressen til denne oppføringen i adresseboken. Denne kan kun endres for utsendingsadresser. + + + + 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 already in the address book. + Den oppgitte adressen "%1" er allerede i adresseboken. + + + + The entered address "%1" is not a valid curecoin address. + Den angitte adressed "%1" er ikke en gyldig curecoin-adresse. + + + + Could not unlock wallet. + Kunne ikke låse opp lommeboken. + + + + New key generation failed. + Generering av ny nøkkel feilet. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versjon + + + + Usage: + Bruk: + + + + command-line options + kommandolinjevalg + + + + UI options + valg i brukergrensesnitt + + + + Set language, for example "de_DE" (default: system locale) + Sett språk, for eksempel "nb_NO" (standardverdi: fra operativsystem) + + + + Start minimized + Start minimert + + + + + Show splash screen on startup (default: 1) + Vis splashskjerm ved oppstart (standardverdi: 1) + + + + OptionsDialog + + + Options + Innstillinger + + + + &Main + &Hoved + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Betal transaksjons&gebyr + + + + Automatically start curecoin after logging in to the system. + Start curecoin automatisk etter innlogging. + + + + &Start curecoin on system login + &Start curecoin ved systeminnlogging + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + &Nettverk + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Åpne automatisk curecoin klientporten på ruteren. Dette virker kun om din ruter støtter UPnP og dette er påslått. + + + + Map port using &UPnP + Sett opp port vha. &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Koble til curecoin-nettverket gjennom en SOCKS proxy (f.eks. ved tilkobling gjennom Tor). + + + + &Connect through SOCKS proxy: + &Koble til gjenom SOCKS proxy: + + + + Proxy &IP: + Proxy &IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + IP-adresse for mellomtjener (f.eks. 127.0.0.1) + + + + &Port: + &Port: + + + + Port of the proxy (e.g. 9050) + Proxyens port (f.eks. 9050) + + + + SOCKS &Version: + SOCKS &Versjon: + + + + SOCKS version of the proxy (e.g. 5) + Proxyens SOCKS versjon (f.eks. 5) + + + + &Window + &Vindu + + + + Show only a tray icon after minimizing the window. + Vis kun ikon i systemkurv etter minimering av vinduet. + + + + &Minimize to the tray instead of the taskbar + &Minimer til systemkurv istedenfor oppgavelinjen + + + + 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. + Minimerer vinduet istedenfor å avslutte applikasjonen når vinduet lukkes. Når dette er slått på avsluttes applikasjonen kun ved å velge avslutt i menyen. + + + + M&inimize on close + M&inimer ved lukking + + + + &Display + &Visning + + + + User Interface &language: + &Språk for brukergrensesnitt + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Språket for brukergrensesnittet kan settes her. Innstillingen trer i kraft ved omstart av curecoin. + + + + &Unit to show amounts in: + &Enhet for visning av beløper: + + + + 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 curecoins. + + + + Whether to show curecoin addresses in the transaction list or not. + Om curecoin-adresser skal vises i transaksjonslisten eller ikke. + + + + &Display addresses in transaction list + &Vis adresser i transaksjonslisten + + + + &OK + &OK + + + + &Cancel + &Avbryt + + + + &Apply + &Bruk + + + + default + standardverdi + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + Advarsel + + + + + This setting will take effect after restarting curecoin. + Denne innstillingen trer i kraft etter omstart av curecoin. + + + + The supplied proxy address is invalid. + Angitt proxyadresse er ugyldig. + + + + OverviewPage + + + Form + Skjema + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Informasjonen som vises kan være foreldet. Din lommebok synkroniseres automatisk med curecoin-nettverket etter at tilkobling er opprettet, men denne prosessen er ikke ferdig enda. + + + + Balance: + Saldo: + + + + Unconfirmed: + Ubekreftet + + + + Wallet + Lommebok + + + + Immature: + Umoden: + + + + Mined balance that has not yet matured + Minet saldo har ikke modnet enda + + + + <b>Recent transactions</b> + <b>Siste transaksjoner</b> + + + + Your current balance + Din nåværende saldo + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Totalt antall ubekreftede transaksjoner som ikke telles med i saldo enda + + + + + out of sync + ute av synk + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + Kan ikke starte curecoin: klikk-og-betal håndterer + + + + QRCodeDialog + + + QR Code Dialog + Dialog for QR Kode + + + + Request Payment + Etterspør Betaling + + + + Amount: + Beløp: + + + + Label: + Merkelapp: + + + + Message: + Melding: + + + + &Save As... + &Lagre Som... + + + + Error encoding URI into QR Code. + Feil ved koding av URI i QR kode. + + + + The entered amount is invalid, please check. + Angitt beløp er ugyldig. + + + + Resulting URI too long, try to reduce the text for label / message. + Resulterende URI for lang, prøv å redusere teksten for merkelapp / melding. + + + + Save QR Code + Lagre QR Kode + + + + PNG Images (*.png) + PNG bilder (*.png) + + + + RPCConsole + + + Client name + Klientnavn + + + + + + + + + + + + + N/A + - + + + + Client version + Klientversjon + + + + &Information + &Informasjon + + + + Using OpenSSL version + Bruker OpenSSL versjon + + + + Startup time + Oppstartstidspunkt + + + + Network + Nettverk + + + + Number of connections + Antall tilkoblinger + + + + On testnet + På testnett + + + + Block chain + Blokkjeden + + + + Current number of blocks + Nåværende antall blokker + + + + Estimated total blocks + Estimert totalt antall blokker + + + + Last block time + Tidspunkt for siste blokk + + + + &Open + &Åpne + + + + Command-line options + Kommandolinjevalg + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Vis curecoin-Qt hjelpemelding for å få en liste med mulige kommandolinjevalg. + + + + &Show + &Vis + + + + &Console + &Konsoll + + + + Build date + Byggedato + + + + curecoin - Debug window + curecoin - vindu for feilsøk + + + + curecoin Core + curecoin Kjerne + + + + Debug log file + Loggfil for feilsøk + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Åpne curecoin loggfil for feilsøk fra datamappen. Dette kan ta noen sekunder for store loggfiler. + + + + Clear console + Tøm konsoll + + + + Welcome to the curecoin RPC console. + Velkommen til curecoin RPC konsoll. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Bruk opp og ned pil for å navigere historikken, og <b>Ctrl-L</b> for å tømme skjermen. + + + + Type <b>help</b> for an overview of available commands. + Skriv <b>help</b> for en oversikt over kommandoer. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Send curecoins + + + + Send to multiple recipients at once + Send til flere enn én mottaker + + + + Add &Recipient + &Legg til Mottaker + + + + Remove all transaction fields + Fjern alle transaksjonsfelter + + + + Clear &All + Fjern &Alt + + + + Balance: + Saldo: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Bekreft sending + + + + S&end + S&avslutt + + + + <b>%1</b> to %2 (%3) + <b>%1</b> til %2 (%3) + + + + Confirm send coins + Bekreft sending av curecoins + + + + Are you sure you want to send %1? + Er du sikker på at du vil sende %1? + + + + and + og + + + + The recipient address is not valid, please recheck. + Adresse for mottaker er ugyldig. + + + + The amount to pay must be larger than 0. + Beløpen som skal betales må være over 0. + + + + The amount exceeds your balance. + Beløpet overstiger saldo. + + + + The total exceeds your balance when the %1 transaction fee is included. + Totalbeløpet overstiger saldo etter at %1 transaksjonsgebyr er lagt til. + + + + 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: Transaction creation failed! + Feil: Opprettelse av transaksjon feilet + + + + 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. + Feil: Transaksjonen ble avvist. Dette kan skje om noe av beløpet allerede var brukt, f.eks. hvis du kopierte wallet.dat og noen curecoins ble brukt i kopien men ikke ble markert som brukt her. + + + + SendCoinsEntry + + + Form + Skjema + + + + A&mount: + &Beløp: + + + + Pay &To: + Betal &Til: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adressen betalingen skal sendes til (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Velg adresse fra adresseboken + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Lim inn adresse fra utklippstavlen + + + + Alt+P + Alt+P + + + + Remove this recipient + Fjern denne mottakeren + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Skriv inn en curecoin adresse (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Signaturer - Signer / Verifiser en melding + + + + &Sign Message + &Signér Melding + + + + 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 signere meldinger med dine adresser for å bevise at du eier dem. Ikke signér vage meldinger da phishing-angrep kan prøve å lure deg til å signere din identitet over til andre. Signér kun fullt detaljerte utsagn som du er enig i. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adressen for signering av meldingen (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Velg en adresse fra adresseboken + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Lim inn adresse fra utklippstavlen + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Skriv inn meldingen du vil signere her + + + + Signature + + + + + Copy the current signature to the system clipboard + Kopier valgt signatur til utklippstavle + + + + Sign the message to prove you own this curecoin address + Signer meldingen for å bevise at du eier denne curecoin-adressen + + + + Sign &Message + + + + + Reset all sign message fields + Tilbakestill alle felter for meldingssignering + + + + + Clear &All + Fjern &Alt + + + + &Verify Message + &Verifiser Melding + + + + 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. + Angi adresse for signering, melding (vær sikker på at du kopierer linjeskift, mellomrom, tab, etc. helt nøyaktig) og signatur under for å verifisere meldingen. Vær forsiktig med at du ikke gir signaturen mer betydning enn det som faktisk står i meldingen, for å unngå å bli lurt av såkalte "man-in-the-middle" angrep. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adressen meldingen var signert med (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Verifiser meldingen for å være sikker på at den ble signert av den angitte curecoin-adressen + + + + Verify &Message + + + + + Reset all verify message fields + Tilbakestill alle felter for meldingsverifikasjon + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Skriv inn en curecoin adresse (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Klikk "Signer Melding" for å generere signatur + + + + Enter curecoin signature + Angi curecoin signatur + + + + + The entered address is invalid. + Angitt adresse er ugyldig. + + + + + + + Please check the address and try again. + Vennligst sjekk adressen og prøv igjen. + + + + + The entered address does not refer to a key. + Angitt adresse refererer ikke til en nøkkel. + + + + Wallet unlock was cancelled. + Opplåsing av lommebok ble avbrutt. + + + + Private key for the entered address is not available. + Privat nøkkel for den angitte adressen er ikke tilgjengelig. + + + + Message signing failed. + Signering av melding feilet. + + + + Message signed. + Melding signert. + + + + The signature could not be decoded. + Signaturen kunne ikke dekodes. + + + + + Please check the signature and try again. + Vennligst sjekk signaturen og prøv igjen. + + + + The signature did not match the message digest. + Signaturen passer ikke til meldingen. + + + + Message verification failed. + Verifikasjon av melding feilet. + + + + Message verified. + Melding verifisert. + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [testnett] + + + + TransactionDesc + + + Open until %1 + Åpen til %1 + + + + %1/offline + %1/frakoblet + + + + %1/unconfirmed + %1/ubekreftet + + + + %1 confirmations + %1 bekreftelser + + + + Status + Status + + + + , broadcast through %n node(s) + , kringkast gjennom %n node, kringkast gjennom %n noder + + + + Date + Dato + + + + Source + Kilde + + + + Generated + Generert + + + + + From + Fra + + + + + + To + Til + + + + + own address + egen adresse + + + + label + merkelapp + + + + + + + + Credit + Kredit + + + + matures in %n more block(s) + blir moden om %n blokkblir moden om %n blokker + + + + not accepted + ikke akseptert + + + + + + + Debit + Debet + + + + Transaction fee + Transaksjonsgebyr + + + + Net amount + Nettobeløp + + + + Message + Melding + + + + Comment + Kommentar + + + + Transaction ID + Transaksjons-ID + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Genererte curecoins må modnes 120 blokker før de kan brukes. Da du genererte denne blokken ble den kringkastet til nettverket for å legges til i blokkjeden. Hvis den ikke kommer inn i kjeden får den tilstanden "ikke akseptert" og vil ikke kunne brukes. Dette skjer noen ganger hvis en annen node genererer en blokk noen sekunder fra din. + + + + Debug information + Informasjon for feilsøk + + + + Transaction + Transaksjon + + + + Inputs + Inndata + + + + Amount + Beløp + + + + true + sann + + + + false + usann + + + + , has not been successfully broadcast yet + , har ikke blitt kringkastet uten problemer enda. + + + + Open for %n more block(s) + + + + + unknown + ukjent + + + + TransactionDescDialog + + + Transaction details + Transaksjonsdetaljer + + + + This pane shows a detailed description of the transaction + Her vises en detaljert beskrivelse av transaksjonen + + + + TransactionTableModel + + + Date + Dato + + + + Type + Type + + + + Address + Adresse + + + + Amount + Beløp + + + + Open for %n more block(s) + + + + + Open until %1 + Åpen til %1 + + + + Offline (%1 confirmations) + Frakoblet (%1 bekreftelser) + + + + Unconfirmed (%1 of %2 confirmations) + Ubekreftet (%1 av %2 bekreftelser) + + + + Confirmed (%1 confirmations) + Bekreftet (%1 bekreftelser) + + + + Mined balance will be available when it matures in %n more block(s) + Minet saldo blir tilgjengelig når den modner om %n blokkMinet saldo blir tilgjengelig når den modner om %n blokker + + + + This block was not received by any other nodes and will probably not be accepted! + Denne blokken har ikke blitt mottatt av noen andre noder og vil sannsynligvis ikke bli akseptert! + + + + Generated but not accepted + Generert men ikke akseptert + + + + Received with + Mottatt med + + + + Received from + Mottatt fra + + + + Sent to + Sendt til + + + + Payment to yourself + Betaling til deg selv + + + + Mined + Utvunnet + + + + (n/a) + - + + + + Transaction status. Hover over this field to show number of confirmations. + Transaksjonsstatus. Hold muspekeren over dette feltet for å se antall bekreftelser. + + + + Date and time that the transaction was received. + Dato og tid for da transaksjonen ble mottat. + + + + Type of transaction. + Type transaksjon. + + + + Destination address of transaction. + Mottaksadresse for transaksjonen + + + + Amount removed from or added to balance. + Beløp fjernet eller lagt til saldo. + + + + TransactionView + + + + All + Alle + + + + Today + I dag + + + + This week + Denne uken + + + + This month + Denne måneden + + + + Last month + Forrige måned + + + + This year + Dette året + + + + Range... + Intervall... + + + + Received with + Mottatt med + + + + Sent to + Sendt til + + + + To yourself + Til deg selv + + + + Mined + Utvunnet + + + + Other + Andre + + + + Enter address or label to search + Skriv inn adresse eller merkelapp for søk + + + + Min amount + Minimumsbeløp + + + + Copy address + Kopier adresse + + + + Copy label + Kopier merkelapp + + + + Copy amount + Kopiér beløp + + + + Copy transaction ID + Kopier transaksjons-ID + + + + Edit label + Rediger merkelapp + + + + Show transaction details + Vis transaksjonsdetaljer + + + + Export Transaction Data + Eksporter transaksjonsdata + + + + Comma separated file (*.csv) + Kommaseparert fil (*.csv) + + + + Confirmed + Bekreftet + + + + Date + Dato + + + + Type + Type + + + + Label + Merkelapp + + + + Address + Adresse + + + + Amount + Beløp + + + + ID + ID + + + + Error exporting + Feil ved eksport + + + + Could not write to file %1. + Kunne ikke skrive til filen %1. + + + + Range: + Intervall: + + + + to + til + + + + WalletModel + + + Send Coins + Send curecoins + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + Eksporter data fra nåværende fane til fil + + + + Backup Wallet + Sikkerhetskopier lommebok + + + + Wallet Data (*.dat) + Lommebokdata (*.dat) + + + + Backup Failed + Sikkerhetskopiering feilet + + + + There was an error trying to save the wallet data to the new location. + En feil oppstod under lagringen av lommeboken til den nye plasseringen. + + + + Backup Successful + Sikkerhetskopiering fullført + + + + The wallet data was successfully saved to the new location. + Lommebokdata ble lagret til den nye plasseringen. + + + + curecoin-core + + + curecoin version + curecoin versjon + + + + Usage: + Bruk: + + + + Send command to -server or curecoind + Send kommando til -server eller curecoind + + + + List commands + List opp kommandoer + + + + Get help for a command + Vis hjelpetekst for en kommando + + + + Options: + Innstillinger: + + + + Specify configuration file (default: curecoin.conf) + Angi konfigurasjonsfil (standardverdi: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Angi pid-fil (standardverdi: curecoind.pid) + + + + Specify data directory + Angi mappe for datafiler + + + + Set database cache size in megabytes (default: 25) + Sett størrelse på mellomlager for database i megabytes (standardverdi: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Lytt etter tilkoblinger på <port> (standardverdi: 7951 eller testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Hold maks <n> koblinger åpne til andre noder (standardverdi: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Koble til node for å hente adresser til andre noder, koble så fra igjen + + + + Specify your own public address + Angi din egen offentlige adresse + + + + Threshold for disconnecting misbehaving peers (default: 100) + Grenseverdi for å koble fra noder med dårlig oppførsel (standardverdi: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Antall sekunder noder med dårlig oppførsel hindres fra å koble til på nytt (standardverdi: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + En feil oppstod ved opprettelse av RPC port %u for lytting: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Lytt etter JSON-RPC tilkoblinger på <port> (standardverdi: 7950 or testnet: 17950) + + + + Accept command line and JSON-RPC commands + Ta imot kommandolinje- og JSON-RPC-kommandoer + + + + Run in the background as a daemon and accept commands + Kjør i bakgrunnen som daemon og ta imot kommandoer + + + + Use the test network + Bruk testnettverket + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Ta imot tilkoblinger fra utsiden (standardverdi: 1 hvis uten -proxy eller -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, du må angi rpcpassord i konfigurasjonsfilen. +%s +Det anbefales at du bruker det følgende tilfeldige passordet: +rpcbruker=curecoinrpc +rpcpassord=%s +(du behøver ikke å huske passordet) +Brukernavnet og passordet MÅ IKKE være like. +Om filen ikke eksisterer, opprett den nå med eier-kun-les filrettigheter. +Det er også anbefalt at å sette varselsmelding slik du får melding om problemer. +For eksempel: varselmelding=echo %%s | mail -s "curecoin varsel" admin@foo.com + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + En feil oppstod under oppsettet av RPC port %u for IPv6, tilbakestilles til IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Bind til angitt adresse. Bruk [vertsmaskin]:port notasjon for IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Kjør kommando når relevant varsel blir mottatt (%s i cmd er erstattet med TxID) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Kjør kommando når en lommeboktransaksjon endres (%s i cmd er erstattet med TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Sett maks størrelse for transaksjoner med høy prioritet / lavt gebyr, i bytes (standardverdi: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Advarsel: -paytxfee er satt veldig høyt! Dette er transaksjonsgebyret du betaler når du sender transaksjoner. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Advarsel: Viste transaksjoner kan være feil! Du, eller andre noder, kan trenge en oppgradering. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Advarsel: Vennligst undersøk at din datamaskin har riktig dato og klokkeslett! Hvis klokken er stilt feil vil ikke curecoin fungere riktig. + + + + 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: + Valg for opprettelse av blokker: + + + + Connect only to the specified node(s) + Koble kun til angitt(e) node(r) + + + + Corrupted block database detected + Oppdaget korrupt blokkdatabase + + + + Discover own IP address (default: 1 when listening and no -externalip) + Oppdag egen IP-adresse (standardverdi: 1 ved lytting og uten -externalip) + + + + Do you want to rebuild the block database now? + Ønsker du å gjenopprette blokkdatabasen nå? + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + Feil under oppstart av lommebokdatabasemiljø %s! + + + + Error loading block database + + + + + Error opening block database + Feil under åpning av blokkdatabase + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + Kunne ikke lytte på noen port. Bruk -listen=0 hvis det er dette du vil. + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + Finn andre noder gjennom DNS-oppslag (standardverdi: 1 med mindre -connect er oppgit) + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + Gjenopprett blokkjedeindex fra blk000??.dat filer + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + Verifiserer blokker... + + + + Verifying wallet... + Verifiserer lommebok... + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + Ugyldig -tor adresse: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maks mottaksbuffer per forbindelse, <n>*1000 bytes (standardverdi: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maks sendebuffer per forbindelse, <n>*1000 bytes (standardverdi: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Koble kun til noder i nettverket <nett> (IPv4, IPv6 eller Tor) + + + + Output extra debugging information. Implies all other -debug* options + Skriv ekstra informasjon for feilsøk. Medfører at alle -debug* valg tas med + + + + Output extra network debugging information + Skriv ekstra informasjon for feilsøk av nettverk + + + + Prepend debug output with timestamp + Sett tidsstempel på debugmeldinger + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL valg: (se curecoin Wiki for instruksjoner for oppsett av SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + Velg versjon av socks proxy (4-5, standardverdi 5) + + + + Send trace/debug info to console instead of debug.log file + Send spor/debug informasjon til konsollet istedenfor debug.log filen + + + + Send trace/debug info to debugger + Send spor/debug informasjon til debugger + + + + Set maximum block size in bytes (default: 250000) + Sett maks blokkstørrelse i bytes (standardverdi: 250000) + + + + Set minimum block size in bytes (default: 0) + Sett minimum blokkstørrelse i bytes (standardverdi: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Krymp debug.log filen når klienten starter (standardverdi: 1 hvis uten -debug) + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Angi tidsavbrudd for forbindelse i millisekunder (standardverdi: 5000) + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Bruk UPnP for lytteport (standardverdi: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Bruk UPnP for lytteport (standardverdi: 1 ved lytting) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Bruk en proxy for å nå skjulte tor tjenester (standardverdi: samme som -proxy) + + + + Username for JSON-RPC connections + Brukernavn for JSON-RPC forbindelser + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + Advarsel: Denne versjonen er foreldet, oppgradering kreves! + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Passord for JSON-RPC forbindelser + + + + Allow JSON-RPC connections from specified IP address + Tillat JSON-RPC tilkoblinger fra angitt IP-adresse + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Send kommandoer til node på <ip> (standardverdi: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Eksekvér kommando når beste blokk endrer seg (%s i kommandoen erstattes med blokkens hash) + + + + Upgrade wallet to latest format + Oppgradér lommebok til nyeste format + + + + Set key pool size to <n> (default: 100) + Angi størrelse på nøkkel-lager til <n> (standardverdi: 100) + + + + Rescan the block chain for missing wallet transactions + Se gjennom blokk-kjeden etter manglende lommeboktransaksjoner + + + + Use OpenSSL (https) for JSON-RPC connections + Bruk OpenSSL (https) for JSON-RPC forbindelser + + + + Server certificate file (default: server.cert) + Servers sertifikat (standardverdi: server.cert) + + + + Server private key (default: server.pem) + Servers private nøkkel (standardverdi: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Akseptable krypteringsmetoder (standardverdi: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Denne hjelpemeldingen + + + + 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 + Koble til gjennom socks proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Tillat DNS oppslag for -addnode, -seednode og -connect + + + + Loading addresses... + Laster adresser... + + + + Error loading wallet.dat: Wallet corrupted + Feil ved lasting av wallet.dat: Lommeboken er skadet + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Feil ved lasting av wallet.dat: Lommeboken krever en nyere versjon av curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Lommeboken måtte skrives om: start curecoin på nytt for å fullføre + + + + Error loading wallet.dat + Feil ved lasting av wallet.dat + + + + Invalid -proxy address: '%s' + Ugyldig -proxy adresse: '%s' + + + + Unknown network specified in -onlynet: '%s' + Ukjent nettverk angitt i -onlynet '%s' + + + + Unknown -socks proxy version requested: %i + Ukjent -socks proxy versjon angitt: %i + + + + Cannot resolve -bind address: '%s' + Kunne ikke slå opp -bind adresse: '%s' + + + + Cannot resolve -externalip address: '%s' + Kunne ikke slå opp -externalip adresse: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Ugyldig beløp for -paytxfee=<beløp>: '%s' + + + + Invalid amount + Ugyldig beløp + + + + Insufficient funds + Utilstrekkelige midler + + + + Loading block index... + Laster blokkindeks... + + + + 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. curecoin is probably already running. + Kan ikke binde til %s på denne datamaskinen. Sannsynligvis kjører curecoin allerede. + + + + Fee per KB to add to transactions you send + Gebyr per KB for transaksjoner du sender + + + + Loading wallet... + Laster lommebok... + + + + Cannot downgrade wallet + Kan ikke nedgradere lommebok + + + + Cannot write default address + Kan ikke skrive standardadresse + + + + Rescanning... + Leser gjennom... + + + + Done loading + Ferdig med lasting + + + + To use the %s option + For å bruke %s opsjonen + + + + Error + Feil + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Du må sette rpcpassword=<passord> i konfigurasjonsfilen: +%s +Hvis filen ikke finnes, opprett den med leserettighet kun for eier av filen. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_nl.qm b/src/qt/locale/curecoin_nl.qm new file mode 100644 index 0000000..97c8490 Binary files /dev/null and b/src/qt/locale/curecoin_nl.qm differ diff --git a/src/qt/locale/curecoin_nl.ts b/src/qt/locale/curecoin_nl.ts new file mode 100644 index 0000000..8854d76 --- /dev/null +++ b/src/qt/locale/curecoin_nl.ts @@ -0,0 +1,2938 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Over curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> versie + + + + +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. + +Dit is experimentele software. + +Gedistribueerd onder de MIT/X11 software licentie, zie het bijgevoegde bestand COPYING of http://www.opensource.org/licenses/mit-license.php. + +Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in de OpenSSL Toolkit (http://www.openssl.org/) en cryptografische software gemaakt door Eric Young (eay@cryptsoft.com) en UPnP software geschreven door Thomas Bernard. + + + + Copyright + Auteursrecht + + + + Dr. Kimoto Chan + De curecoin-ontwikkelaars + + + + AddressBookPage + + + Address Book + Adresboek + + + + Double-click to edit address or label + Dubbelklik om adres of label te wijzigen + + + + Create a new address + Maak een nieuw adres aan + + + + Copy the currently selected address to the system clipboard + Kopieer het huidig geselecteerde adres naar het klembord + + + + &New Address + &Nieuw Adres + + + + These are your curecoin 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 uw curecoinadressen om betalingen mee te ontvangen. U kunt er voor kiezen om een uniek adres aan te maken voor elke afzender. Op deze manier kunt u bijhouden wie al aan u betaald heeft. + + + + &Copy Address + &Kopiëer Adres + + + + Show &QR Code + Toon &QR-Code + + + + Sign a message to prove you own a curecoin address + Onderteken een bericht om te bewijzen dat u een bepaald curecoinadres bezit + + + + Sign &Message + &Onderteken Bericht + + + + Delete the currently selected address from the list + Verwijder het geselecteerde adres van de lijst + + + + Export the data in the current tab to a file + Exporteer de data in de huidige tab naar een bestand + + + + &Export + &Exporteer + + + + Verify a message to ensure it was signed with a specified curecoin address + Controleer een bericht om te verifiëren dat het gespecificeerde curecoinadres het bericht heeft ondertekend. + + + + &Verify Message + &Verifiëer Bericht + + + + &Delete + &Verwijder + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Dit zijn uw curecoinadressen om betalingen mee te verzenden. Check altijd het bedrag en het ontvangende adres voordat u uw curecoins verzendt. + + + + Copy &Label + Kopiëer &Label + + + + &Edit + &Bewerk + + + + Send &Coins + Verstuur &Coins + + + + Export Address Book Data + Exporteer Gegevens van het Adresboek + + + + Comma separated file (*.csv) + Kommagescheiden bestand (*.csv) + + + + Error exporting + Fout bij exporteren + + + + Could not write to file %1. + Kon niet schrijven naar bestand %1. + + + + AddressTableModel + + + Label + Label + + + + Address + Adres + + + + (no label) + (geen label) + + + + AskPassphraseDialog + + + Passphrase Dialog + Wachtwoorddialoogscherm + + + + Enter passphrase + Voer wachtwoord in + + + + New passphrase + Nieuw wachtwoord + + + + Repeat new passphrase + Herhaal wachtwoord + + + + 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>. + Vul een nieuw wachtwoord in voor uw portemonnee. <br/> Gebruik een wachtwoord van <b>10 of meer lukrake karakters</b>, of <b> acht of meer woorden</b> . + + + + Encrypt wallet + Versleutel portemonnee + + + + This operation needs your wallet passphrase to unlock the wallet. + Deze operatie vereist uw portemonneewachtwoord om de portemonnee te openen. + + + + Unlock wallet + Open portemonnee + + + + This operation needs your wallet passphrase to decrypt the wallet. + Deze operatie vereist uw portemonneewachtwoord om de portemonnee te ontsleutelen + + + + Decrypt wallet + Ontsleutel portemonnee + + + + Change passphrase + Wijzig wachtwoord + + + + Enter the old and new passphrase to the wallet. + Vul uw oude en nieuwe portemonneewachtwoord in. + + + + Confirm wallet encryption + Bevestig versleuteling van de portemonnee + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Waarschuwing: Als u uw portemonnee versleutelt en uw wachtwoord vergeet, zult u <b>AL UW curecoinS VERLIEZEN</b>! + + + + Are you sure you wish to encrypt your wallet? + Weet u zeker dat u uw portemonnee wilt versleutelen? + + + + 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. + + + + + Warning: The Caps Lock key is on! + Waarschuwing: De Caps-Lock-toets staat aan! + + + + + Wallet encrypted + Portemonnee versleuteld + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin zal nu afsluiten om het versleutelingsproces te voltooien. Onthoud dat het versleutelen van uw portemonnee u niet volledig kan beschermen: Malware kan uw computer infecteren en uw curecoins stelen. + + + + + + + Wallet encryption failed + Portemonneeversleuteling mislukt + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Portemonneeversleuteling mislukt door een interne fout. Uw portemonnee is niet versleuteld. + + + + + The supplied passphrases do not match. + De opgegeven wachtwoorden komen niet overeen + + + + Wallet unlock failed + Portemonnee openen mislukt + + + + + + The passphrase entered for the wallet decryption was incorrect. + Het opgegeven wachtwoord voor de portemonnee-ontsleuteling is niet correct. + + + + Wallet decryption failed + Portemonnee-ontsleuteling mislukt + + + + Wallet passphrase was successfully changed. + Portemonneewachtwoord is met succes gewijzigd. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Bewerk de lijst van opgeslagen adressen en labels + + + + Show the list of addresses for receiving payments + Toon lijst van adressen om betalingen mee te ontvangen + + + + E&xit + &Afsluiten + + + + Quit application + Programma afsluiten + + + + Show information about curecoin + Laat informatie zien over curecoin + + + + About &Qt + Over &Qt + + + + Show information about Qt + Toon informatie over Qt + + + + &Options... + O&pties... + + + + &Encrypt Wallet... + &Versleutel Portemonnee... + + + + &Backup Wallet... + &Backup Portemonnee... + + + + &Change Passphrase... + &Wijzig Wachtwoord + + + + Importing blocks from disk... + Blokken aan het importeren vanaf harde schijf... + + + + Reindexing blocks on disk... + Bezig met herindexeren van blokken op harde schijf... + + + + Send coins to a curecoin address + Verstuur munten naar een curecoinadres + + + + Modify configuration options for curecoin + Wijzig instellingen van curecoin + + + + 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... + + + + + curecoin + curecoin + + + + Wallet + Portemonnee + + + + &Send + &Versturen + + + + &Receive + &Ontvangen + + + + &Addresses + &Adressen + + + + &About curecoin + &Over curecoin + + + + &Show / Hide + &Toon / Verberg + + + + Show or hide the main Window + Toon of verberg het hoofdvenster + + + + Encrypt the private keys that belong to your wallet + Versleutel de geheime sleutels die bij uw portemonnee horen + + + + Sign messages with your curecoin addresses to prove you own them + Onderteken berichten met uw curecoinadressen om te bewijzen dat u deze adressen bezit + + + + Verify messages to ensure they were signed with specified curecoin addresses + Verifiëer handtekeningen om zeker te zijn dat de berichten zijn ondertekend met de gespecificeerde curecoinadressen + + + + &File + &Bestand + + + + &Settings + &Instellingen + + + + &Help + &Hulp + + + + Tabs toolbar + Tab-werkbalk + + + + + [testnet] + [testnetwerk] + + + + curecoin client + curecoin client + + + + %n active connection(s) to curecoin network + %n actieve connectie naar curecoinnetwerk%n actieve connecties naar curecoinnetwerk + + + + No block source available... + Geen bron van blokken beschikbaar... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + %1 van %2 (geschat) blokken van de transactiehistorie verwerkt. + + + + Processed %1 blocks of transaction history. + %1 blokken van transactiehistorie verwerkt. + + + + %n hour(s) + %n uur%n uur + + + + %n day(s) + %n dag%n dagen + + + + %n week(s) + %n week%n weken + + + + %1 behind + %1 achter + + + + Last received block was generated %1 ago. + Laatst ontvangen blok was %1 geleden gegenereerd. + + + + Transactions after this will not yet be visible. + Transacties na dit moment zullen nu nog niet zichtbaar zijn. + + + + Error + Fout + + + + Warning + Waarschuwing + + + + Information + Informatie + + + + 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? + Deze transactie overschrijdt de groottelimiet. Om de transactie alsnog te versturen kunt u transactiekosten betalen van %1. Deze transactiekosten gaan naar de nodes die uw transactie verwerken en het helpt op deze manier bij het ondersteunen van het curecoinnetwerk. Wilt u de transactiekosten betalen? + + + + Up to date + Bijgewerkt + + + + Catching up... + Aan het bijwerken... + + + + Confirm transaction fee + Bevestig transactiekosten + + + + 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 curecoin address or malformed URI parameters. + URI kan niet worden geïnterpreteerd. Dit kan komen door een ongeldig curecoinadres of misvormde 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Er is een fatale fout opgetreden. curecoin kan niet meer veilig doorgaan en zal nu afgesloten worden. + + + + ClientModel + + + Network Alert + Netwerkwaarschuwing + + + + EditAddressDialog + + + Edit Address + Bewerk Adres + + + + &Label + &Label + + + + The label associated with this address book entry + Het label dat geassocieerd is met dit adres + + + + &Address + &Adres + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Het adres dat geassocieerd is met deze inschrijving in het adresboek. Dit kan alleen worden veranderd voor zend-adressen. + + + + 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 already in the address book. + Het opgegeven adres "%1" bestaat al in uw adresboek. + + + + The entered address "%1" is not a valid curecoin address. + Het opgegeven adres "%1" is een ongeldig curecoinadres + + + + Could not unlock wallet. + Kon de portemonnee niet openen. + + + + New key generation failed. + Genereren nieuwe sleutel mislukt. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versie + + + + Usage: + Gebruik: + + + + command-line options + commandoregel-opties + + + + UI options + gebruikersinterfaceopties + + + + Set language, for example "de_DE" (default: system locale) + Stel taal in, bijvoorbeeld ''de_DE" (standaard: systeeminstellingen) + + + + Start minimized + Geminimaliseerd starten + + + + Show splash screen on startup (default: 1) + Laat laadscherm zien bij het opstarten. (standaard: 1) + + + + OptionsDialog + + + Options + Opties + + + + &Main + &Algemeen + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Optionele transactiekosten per kB. Transactiekosten helpen ervoor te zorgen dat uw transacties snel verwerkt worden. De meeste transacties zijn 1kB. + + + + Pay transaction &fee + Betaal &transactiekosten + + + + Automatically start curecoin after logging in to the system. + Start curecoin automatisch na inloggen in het systeem + + + + &Start curecoin on system login + Start &curecoin bij het inloggen in het systeem + + + + Reset all client options to default. + Reset alle clientopties naar de standaardinstellingen. + + + + &Reset Options + &Reset Opties + + + + &Network + &Netwerk + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Open de curecoin-poort automatisch op de router. Dit werkt alleen als de router UPnP ondersteunt en het aanstaat. + + + + Map port using &UPnP + Portmapping via &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Verbind met het curecoin-netwerk via een SOCKS-proxy (bijv. wanneer u via Tor wilt verbinden) + + + + &Connect through SOCKS proxy: + &Verbind via een SOCKS-proxy + + + + Proxy &IP: + Proxy &IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + IP-adres van de proxy (bijv. 127.0.0.1) + + + + &Port: + &Poort: + + + + Port of the proxy (e.g. 9050) + Poort van de proxy (bijv. 9050) + + + + SOCKS &Version: + SOCKS-&Versie: + + + + SOCKS version of the proxy (e.g. 5) + SOCKS-versie van de proxy (bijv. 5) + + + + &Window + &Scherm + + + + Show only a tray icon after minimizing the window. + Laat alleen een systeemvak-icoon zien wanneer het venster geminimaliseerd is + + + + &Minimize to the tray instead of the taskbar + &Minimaliseer naar het systeemvak in plaats van de taakbalk + + + + 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. + Minimaliseer het venster in de plaats van de applicatie af te sluiten als het venster gesloten wordt. Wanneer deze optie aan staan, kan de applicatie alleen worden afgesloten door Afsluiten te kiezen in het menu. + + + + M&inimize on close + Minimaliseer bij sluiten van het &venster + + + + &Display + &Interface + + + + User Interface &language: + Taal &Gebruikersinterface: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + De taal van de gebruikersinterface kan hier ingesteld worden. Deze instelling zal pas van kracht worden nadat curecoin herstart wordt. + + + + &Unit to show amounts in: + &Eenheid om bedrag in te tonen: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Kies de standaard onderverdelingseenheid om weer te geven in uw programma, en voor het versturen van munten + + + + Whether to show curecoin addresses in the transaction list or not. + Of curecoinadressen getoond worden in de transactielijst + + + + &Display addresses in transaction list + Toon a&dressen in de transactielijst + + + + &OK + &OK + + + + &Cancel + Ann&uleren + + + + &Apply + &Toepassen + + + + default + standaard + + + + Confirm options reset + Bevestig reset opties + + + + Some settings may require a client restart to take effect. + Sommige instellingen vereisen het herstarten van de client voordat ze in werking treden. + + + + Do you want to proceed? + Wilt u doorgaan? + + + + + Warning + Waarschuwing + + + + + This setting will take effect after restarting curecoin. + Deze instelling zal pas van kracht worden na het herstarten van curecoin. + + + + The supplied proxy address is invalid. + Het opgegeven proxyadres is ongeldig. + + + + OverviewPage + + + Form + Vorm + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + De weergegeven informatie kan verouderd zijn. Uw portemonnee synchroniseert automaticsh met het curecoinnetwerk nadat een verbinding is gelegd, maar dit proces is nog niet voltooid. + + + + Balance: + Saldo: + + + + Unconfirmed: + Onbevestigd: + + + + Wallet + Portemonnee + + + + Immature: + Immatuur: + + + + Mined balance that has not yet matured + Gedolven saldo dat nog niet tot wasdom is gekomen + + + + <b>Recent transactions</b> + <b>Recente transacties</b> + + + + Your current balance + Uw huidige saldo + + + + 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 zijn meegeteld in uw huidige saldo + + + + + out of sync + niet gesynchroniseerd + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + Kan curecoin niet starten: click-to-pay handler + + + + QRCodeDialog + + + QR Code Dialog + QR-codescherm + + + + Request Payment + Vraag betaling aan + + + + Amount: + Bedrag: + + + + Label: + Label: + + + + Message: + Bericht: + + + + &Save As... + &Opslaan Als... + + + + Error encoding URI into QR Code. + Fout tijdens encoderen URI in QR-code + + + + The entered amount is invalid, please check. + Het opgegeven bedrag is ongeldig, controleer het s.v.p. + + + + Resulting URI too long, try to reduce the text for label / message. + Resulterende URI te lang, probeer de tekst korter te maken voor het label/bericht. + + + + Save QR Code + Sla QR-code op + + + + PNG Images (*.png) + PNG-Afbeeldingen (*.png) + + + + RPCConsole + + + Client name + Clientnaam + + + + + + + + + + + + + N/A + N.v.t. + + + + Client version + Clientversie + + + + &Information + &Informatie + + + + Using OpenSSL version + Gebruikt OpenSSL versie + + + + Startup time + Opstarttijd + + + + Network + Netwerk + + + + Number of connections + Aantal connecties + + + + On testnet + Op testnet + + + + Block chain + Blokketen + + + + Current number of blocks + Huidig aantal blokken + + + + Estimated total blocks + Geschat totaal aantal blokken + + + + Last block time + Tijd laatste blok + + + + &Open + &Open + + + + Command-line options + Commandoregel-opties + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Toon het curecoinQt-hulpbericht voor een lijst met mogelijke curecoin commandoregel-opties. + + + + &Show + &Toon + + + + &Console + &Console + + + + Build date + Bouwdatum + + + + curecoin - Debug window + curecoin-debugscherm + + + + curecoin Core + curecoin Kern + + + + Debug log file + Debug-logbestand + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Open het curecoindebug-logbestand van de huidige datamap. Dit kan een aantal seconden duren voor grote logbestanden. + + + + Clear console + Maak console leeg + + + + Welcome to the curecoin RPC console. + Welkom bij de curecoin RPC-console. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Gebruik de pijltjestoetsen om door de geschiedenis te navigeren, en <b>Ctrl-L</b> om het scherm leeg te maken. + + + + Type <b>help</b> for an overview of available commands. + Typ <b>help</b> voor een overzicht van de beschikbare commando's. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Verstuur munten + + + + Send to multiple recipients at once + Verstuur aan verschillende ontvangers ineens + + + + Add &Recipient + Voeg &Ontvanger Toe + + + + Remove all transaction fields + Verwijder alle transactievelden + + + + Clear &All + Verwijder &Alles + + + + Balance: + Saldo: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Bevestig de verstuuractie + + + + S&end + &Verstuur + + + + <b>%1</b> to %2 (%3) + <b>%1</b> aan %2 (%3) + + + + Confirm send coins + Bevestig versturen munten + + + + Are you sure you want to send %1? + Weet u zeker dat u %1 wil versturen? + + + + and + en + + + + The recipient address is not valid, please recheck. + Het ontvangstadres is niet geldig, controleer uw invoer. + + + + The amount to pay must be larger than 0. + Het ingevoerde bedrag moet groter zijn dan 0. + + + + The amount exceeds your balance. + Bedrag is hoger dan uw huidige saldo + + + + The total exceeds your balance when the %1 transaction fee is included. + Totaal overschrijdt uw huidige saldo wanneer de %1 transactiekosten worden meegerekend + + + + 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: Transaction creation failed! + Fout: Aanmaak transactie mislukt! + + + + 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 afgewezen. Dit kan gebeuren als u eerder uitgegeven munten opnieuw wilt versturen, zoals wanneer u een kopie van uw portemonneebestand (wallet.dat) heeft gebruikt en in de kopie deze munten zijn uitgegeven, maar in de huidige portemonnee deze nog niet als zodanig zijn gemarkeerd. + + + + SendCoinsEntry + + + Form + Vorm + + + + A&mount: + Bedra&g: + + + + Pay &To: + Betaal &Aan: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Het adres waaraan u wilt betalen (bijv. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + 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 + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Vul een curecoinadres in (bijv. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Handtekeningen - Onderteken een bericht / Verifiëer een handtekening + + + + &Sign Message + O&nderteken Bericht + + + + 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. + U kunt berichten ondertekenen met een van uw adressen om te bewijzen dat u dit adres bezit. Pas op dat u geen onduidelijke dingen ondertekent, want phishingaanvallen zouden u kunnen misleiden om zo uw identiteit te stelen. Onderteken alleen berichten waarmee u het volledig eens bent. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Het adres om het bericht mee te ondertekenen (Vb.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L). + + + + + Choose an address from the address book + Kies een adres uit het adresboek + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Plak adres vanuit klembord + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Typ hier het bericht dat u wilt ondertekenen + + + + Signature + Handtekening + + + + Copy the current signature to the system clipboard + Kopieer de huidige handtekening naar het systeemklembord + + + + Sign the message to prove you own this curecoin address + Onderteken een bericht om te bewijzen dat u een bepaald curecoinadres bezit + + + + Sign &Message + Onderteken &Bericht + + + + Reset all sign message fields + Verwijder alles in de invulvelden + + + + + Clear &All + Verwijder &Alles + + + + &Verify Message + &Verifiëer Bericht + + + + 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. + Voer het ondertekenende adres, bericht en handtekening hieronder in (let erop dat u nieuwe regels, spaties en tabs juist overneemt) om de handtekening te verifiëren. Let erop dat u niet meer uit het bericht interpreteert dan er daadwerkelijk staat, om te voorkomen dat u wordt misleid in een man-in-the-middle-aanval. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Het adres waarmee bet bericht was ondertekend (Vb.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L). + + + + Verify the message to ensure it was signed with the specified curecoin address + Controleer een bericht om te verifiëren dat het gespecificeerde curecoinadres het bericht heeft ondertekend. + + + + Verify &Message + Verifiëer &Bericht + + + + Reset all verify message fields + Verwijder alles in de invulvelden + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Vul een curecoinadres in (bijv. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Klik "Onderteken Bericht" om de handtekening te genereren + + + + Enter curecoin signature + Voer curecoin-handtekening in + + + + + The entered address is invalid. + Het opgegeven adres is ongeldig. + + + + + + + Please check the address and try again. + Controleer s.v.p. het adres en probeer het opnieuw. + + + + + The entered address does not refer to a key. + Het opgegeven adres verwijst niet naar een sleutel. + + + + Wallet unlock was cancelled. + Portemonnee-ontsleuteling is geannuleerd + + + + Private key for the entered address is not available. + Geheime sleutel voor het ingevoerde adres is niet beschikbaar. + + + + Message signing failed. + Ondertekenen van het bericht is mislukt. + + + + Message signed. + Bericht ondertekend. + + + + The signature could not be decoded. + De handtekening kon niet worden gedecodeerd. + + + + + Please check the signature and try again. + Controleer s.v.p. de handtekening en probeer het opnieuw. + + + + The signature did not match the message digest. + De handtekening hoort niet bij het bericht. + + + + Message verification failed. + Berichtverificatie mislukt. + + + + Message verified. + Bericht correct geverifiëerd. + + + + SplashScreen + + + Dr. Kimoto Chan + De curecoin-ontwikkelaars + + + + [testnet] + [testnetwerk] + + + + TransactionDesc + + + Open until %1 + Openen totdat %1 + + + + %1/offline + %1/offline + + + + %1/unconfirmed + %1/onbevestigd + + + + %1 confirmations + %1 bevestigingen + + + + Status + Status + + + + , broadcast through %n node(s) + , uitgezonden naar %n node, uitgezonden naar %n nodes + + + + Date + Datum + + + + Source + Bron + + + + Generated + Gegenereerd + + + + + From + Van + + + + + + To + Aan + + + + + own address + eigen adres + + + + label + label + + + + + + + + Credit + Credit + + + + matures in %n more block(s) + komt tot wasdom na %n nieuw blokkomt tot wasdom na %n nieuwe blokken + + + + not accepted + niet geaccepteerd + + + + + + + Debit + Debet + + + + Transaction fee + Transactiekosten + + + + Net amount + Netto bedrag + + + + Message + Bericht + + + + Comment + Opmerking + + + + Transaction ID + Transactie-ID: + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Gegeneerde munten moeten 120 blokken wachten voordat ze tot wasdom komen en kunnen worden uitgegeven. Uw net gegenereerde blok is uitgezonden aan het netwerk om te worden toegevoegd aan de blokketen. Als het niet wordt geaccepteerd in de keten, zal het blok als "niet geaccepteerd" worden aangemerkt en kan het niet worden uitgegeven. Dit kan soms gebeuren als een andere node net iets sneller een blok heeft gegenereerd; een paar seconden voor het uwe. + + + + Debug information + Debug-informatie + + + + Transaction + Transactie + + + + Inputs + Inputs + + + + Amount + Bedrag + + + + true + waar + + + + false + onwaar + + + + , has not been successfully broadcast yet + , is nog niet met succes uitgezonden + + + + Open for %n more block(s) + Open voor nog %n blokOpen voor nog %n blokken + + + + unknown + onbekend + + + + TransactionDescDialog + + + Transaction details + Transactiedetails + + + + This pane shows a detailed description of the transaction + Dit venster laat een uitgebreide beschrijving van de transactie zien + + + + TransactionTableModel + + + Date + Datum + + + + Type + Type + + + + Address + Adres + + + + Amount + Bedrag + + + + Open for %n more block(s) + Open voor nog %n blokOpen voor nog %n blokken + + + + Open until %1 + Open tot %1 + + + + Offline (%1 confirmations) + Niet verbonden (%1 bevestigingen) + + + + Unconfirmed (%1 of %2 confirmations) + Onbevestigd (%1 van %2 bevestigd) + + + + Confirmed (%1 confirmations) + Bevestigd (%1 bevestigingen) + + + + Mined balance will be available when it matures in %n more block(s) + Gedolven saldo zal beschikbaar komen als het tot wasdom komt na %n blokGedolven saldo zal beschikbaar komen als het tot wasdom komt na %n blokken + + + + This block was not received by any other nodes and will probably not be accepted! + Dit blok is niet ontvangen bij andere nodes en zal waarschijnlijk niet worden geaccepteerd! + + + + Generated but not accepted + Gegenereerd maar niet geaccepteerd + + + + Received with + Ontvangen met + + + + Received from + Ontvangen van + + + + Sent to + Verzonden aan + + + + Payment to yourself + Betaling aan uzelf + + + + Mined + Gedolven + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Datum en tijd waarop deze transactie is ontvangen. + + + + Type of transaction. + Type transactie. + + + + Destination address of transaction. + Ontvangend adres van transactie. + + + + Amount removed from or added to balance. + Bedrag verwijderd van of toegevoegd aan saldo + + + + TransactionView + + + + All + Alles + + + + Today + Vandaag + + + + This week + Deze week + + + + This month + Deze maand + + + + Last month + Vorige maand + + + + This year + Dit jaar + + + + Range... + Bereik... + + + + Received with + Ontvangen met + + + + Sent to + Verzonden aan + + + + To yourself + Aan uzelf + + + + Mined + Gedolven + + + + Other + Anders + + + + Enter address or label to search + Vul adres of label in om te zoeken + + + + Min amount + Min. bedrag + + + + Copy address + Kopieer adres + + + + Copy label + Kopieer label + + + + Copy amount + Kopieer bedrag + + + + Copy transaction ID + Kopieer transactie-ID + + + + Edit label + Bewerk label + + + + Show transaction details + Toon transactiedetails + + + + Export Transaction Data + Exporteer transactiegegevens + + + + Comma separated file (*.csv) + Kommagescheiden bestand (*.csv) + + + + Confirmed + Bevestigd + + + + Date + Datum + + + + Type + Type + + + + Label + Label + + + + Address + Adres + + + + Amount + Bedrag + + + + ID + ID + + + + Error exporting + Fout bij exporteren + + + + Could not write to file %1. + Kon niet schrijven naar bestand %1. + + + + Range: + Bereik: + + + + to + naar + + + + WalletModel + + + Send Coins + Verstuur munten + + + + WalletView + + + &Export + &Exporteer + + + + Export the data in the current tab to a file + Exporteer de data in de huidige tab naar een bestand + + + + Backup Wallet + Portomonnee backuppen + + + + Wallet Data (*.dat) + Portemonnee-data (*.dat) + + + + Backup Failed + Backup Mislukt + + + + There was an error trying to save the wallet data to the new location. + Er is een fout opgetreden bij het wegschrijven van de portemonnee-data naar de nieuwe locatie. + + + + Backup Successful + Backup Succesvol + + + + The wallet data was successfully saved to the new location. + De portemonneedata is succesvol opgeslagen op de nieuwe locatie. + + + + curecoin-core + + + curecoin version + curecoinversie + + + + Usage: + Gebruik: + + + + Send command to -server or curecoind + Stuur commando naar -server of curecoind + + + + List commands + Lijst van commando's + + + + Get help for a command + Toon hulp voor een commando + + + + Options: + Opties: + + + + Specify configuration file (default: curecoin.conf) + Specificeer configuratiebestand (standaard: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + Specificeer pid-bestand (standaard: curecoind.pid) + + + + + Specify data directory + Stel datamap in + + + + Set database cache size in megabytes (default: 25) + Stel databankcachegrootte in in megabytes (standaard: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Luister voor verbindingen op <poort> (standaard: 7951 of testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Onderhoud maximaal <n> verbindingen naar peers (standaard: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Verbind naar een node om adressen van anderen op te halen, en verbreek vervolgens de verbinding + + + + Specify your own public address + Specificeer uw eigen publieke adres + + + + Threshold for disconnecting misbehaving peers (default: 100) + Drempel om verbinding te verbreken naar zich misdragende peers (standaard: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Aantal seconden dat zich misdragende peers niet opnieuw mogen verbinden (standaard: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Er is een fout opgetreden tijdens het instellen van de inkomende RPC-poort %u op IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Wacht op JSON-RPC-connecties op poort <port> (standaard: 7950 of testnet: 17950) + + + + Accept command line and JSON-RPC commands + Aanvaard commandoregel- en JSON-RPC-commando's + + + + Run in the background as a daemon and accept commands + Draai in de achtergrond als daemon en aanvaard commando's + + + + Use the test network + Gebruik het testnetwerk + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Accepteer verbindingen van buitenaf (standaard: 1 als geen -proxy of -connect is opgegeven) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, u moet een RPC-wachtwoord instellen in het configuratiebestand: %s +U wordt aangeraden het volgende willekeurige wachtwoord te gebruiken: +rpcuser=curecoinrpc +rpcpassword=%s +(u hoeft dit wachtwoord niet te onthouden) +De gebruikersnaam en wachtwoord mogen niet hetzelfde zijn. +Als het bestand niet bestaat, make hem dan aan met leesrechten voor enkel de eigenaar. +Het is ook aan te bevelen "alertnotify" in te stellen zodat u op de hoogte gesteld wordt van problemen; +for example: alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Er is een fout opgetreden tijdens het instellen van de inkomende RPC-poort %u op IPv6, terugval naar IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Bind aan opgegeven adres en luister er altijd op. Gebruik [host]:port notatie voor IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Kan geen lock op de datamap %s verkrijgen. curecoin draait vermoedelijk reeds. + + + + 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 afgewezen! Dit kan gebeuren als sommige munten in uw portemonnee al eerder uitgegeven zijn, zoals wanneer u een kopie van uw wallet.dat heeft gebruikt en in de kopie deze munten zijn uitgegeven, maar in deze portemonnee die munten nog niet als zodanig zijn gemarkeerd. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Fout: Deze transactie vereist transactiekosten van tenminste %s, vanwege zijn grootte, complexiteit, of het gebruik van onlangs ontvangen munten! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Voer opdracht uit zodra een relevante melding ontvangen is (%s wordt in cmd vervangen door het bericht) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Voer opdracht uit zodra een portemonneetransactie verandert (%s in cmd wordt vervangen door TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Stel maximumgrootte in in bytes voor hoge-prioriteits-/lage-transactiekosten-transacties (standaard: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Dit is een pre-release testversie - gebruik op eigen risico! Gebruik deze niet voor het delven van munten of handelsdoeleinden + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Waarschuwing: -paytxfee is zeer hoog ingesteld. Dit zijn de transactiekosten die u betaalt bij het versturen van een transactie. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Waarschuwing: Weergegeven transacties zijn mogelijk niet correct! Mogelijk dient u te upgraden, of andere nodes dienen te upgraden. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Waarschuwing: Controleer dat de datum en tijd op uw computer correct zijn ingesteld. Als uw klok fout staat zal curecoin niet correct 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. + + + + 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. + Waarschuwing: wallet.dat is corrupt, data is veiliggesteld! Originele wallet.dat is opgeslagen als wallet.{tijdstip}.bak in %s; als uw balans of transacties incorrect zijn dient u een backup terug te zetten. + + + + Attempt to recover private keys from a corrupt wallet.dat + Poog de geheime sleutels uit een corrupt wallet.dat bestand terug te halen + + + + Block creation options: + Blokcreatie-opties: + + + + Connect only to the specified node(s) + Verbind alleen naar de gespecificeerde node(s) + + + + Corrupted block database detected + Corrupte blokkendatabase gedetecteerd + + + + Discover own IP address (default: 1 when listening and no -externalip) + Ontdek eigen IP-adres (standaard: 1 als er wordt geluisterd en geen -externalip is opgegeven) + + + + Do you want to rebuild the block database now? + Wilt u de blokkendatabase nu herbouwen? + + + + Error initializing block database + Fout bij intialisatie blokkendatabase + + + + Error initializing wallet database environment %s! + Probleem met initializeren van de database-omgeving %s! + + + + Error loading block database + Fout bij het laden van blokkendatabase + + + + Error opening block database + Fout bij openen blokkendatabase + + + + Error: Disk space is low! + Fout: Weinig vrije diskruimte! + + + + Error: Wallet locked, unable to create transaction! + Fout: Portemonnee vergrendeld, aanmaak transactie niet mogelijk! + + + + Error: system error: + Fout: Systeemfout: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Mislukt om op welke poort dan ook te luisteren. Gebruik -listen=0 as u dit wilt. + + + + Failed to read block info + Lezen van blokinformatie mislukt + + + + Failed to read block + Lezen van blok mislukt + + + + Failed to sync block index + Synchroniseren van blokindex mislukt + + + + Failed to write block index + Schrijven van blokindex mislukt + + + + Failed to write block info + Schrijven van blokinformatie mislukt + + + + Failed to write block + Schrijven van blok mislukt + + + + Failed to write file info + Schrijven van bestandsinformatie mislukt + + + + Failed to write to coin database + Schrijven naar coindatabase mislukt + + + + Failed to write transaction index + Schrijven van transactieindex mislukt + + + + Failed to write undo data + Schrijven van undo-data mislukt + + + + Find peers using DNS lookup (default: 1 unless -connect) + Vind andere nodes d.m.v. DNS-naslag (standaard: 1 tenzij -connect) + + + + Generate coins (default: 0) + Genereer munten (standaard: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Aantal te checken blokken bij het opstarten (standaard: 288, 0 = allemaal) + + + + How thorough the block verification is (0-4, default: 3) + Hoe grondig de blokverificatie is (0-4, standaard: 3) + + + + Not enough file descriptors available. + Niet genoeg file descriptors beschikbaar. + + + + Rebuild block chain index from current blk000??.dat files + Blokketen opnieuw opbouwen van huidige blk000??.dat-bestanden + + + + Set the number of threads to service RPC calls (default: 4) + Stel het aantal threads in om RPC-aanvragen mee te bedienen (standaard: 4) + + + + Verifying blocks... + Blokken aan het controleren... + + + + Verifying wallet... + Portomonnee aan het controleren... + + + + Imports blocks from external blk000??.dat file + Importeert blokken van extern blk000??.dat bestand + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Stel het aantal threads voor scriptverificatie in (max 16, 0 = auto, <0 = laat zoveel cores vrij, standaard: 0) + + + + Information + Informatie + + + + Invalid -tor address: '%s' + Ongeldig -tor adres: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + Ongeldig bedrag voor -minrelaytxfee=<bedrag>: '%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + Ongeldig bedrag voor -mintxfee=<bedrag>: '%s' + + + + Maintain a full transaction index (default: 0) + Onderhoud een volledige transactieindex (standaard: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maximum per-connectie ontvangstbuffer, <n>*1000 bytes (standaard: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maximum per-connectie zendbuffer, <n>*1000 bytes (standaard: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Accepteer alleen blokketen die overeenkomt met de ingebouwde checkpoints (standaard: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Verbind alleen naar nodes in netwerk <net> (IPv4, IPv6 of Tor) + + + + Output extra debugging information. Implies all other -debug* options + Output extra debugginginformatie. Impliceert alle andere -debug* opties + + + + Output extra network debugging information + Output extra netwerk-debugginginformatie + + + + Prepend debug output with timestamp + Voorzie de debuggingsuitvoer van een tijdsaanduiding + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL-opties: (zie de curecoin wiki voor SSL-instructies) + + + + Select the version of socks proxy to use (4-5, default: 5) + Selecteer de versie van de SOCKS-proxy om te gebruiken (4 of 5, standaard is 5) + + + + Send trace/debug info to console instead of debug.log file + Stuur trace/debug-info naar de console in plaats van het debug.log bestand + + + + Send trace/debug info to debugger + Stuur trace/debug-info naar debugger + + + + Set maximum block size in bytes (default: 250000) + Stel maximum blokgrootte in in bytes (standaard: 250000) + + + + Set minimum block size in bytes (default: 0) + Stel minimum blokgrootte in in bytes (standaard: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Verklein debug.log-bestand bij het opstarten van de client (standaard: 1 als geen -debug) + + + + Signing transaction failed + Ondertekenen van transactie mislukt + + + + Specify connection timeout in milliseconds (default: 5000) + Specificeer de time-outtijd in milliseconden (standaard: 5000) + + + + System error: + Systeemfout: + + + + Transaction amount too small + Transactiebedrag te klein + + + + Transaction amounts must be positive + Transactiebedragen moeten positief zijn + + + + Transaction too large + Transactie te groot + + + + Use UPnP to map the listening port (default: 0) + Gebruik UPnP om de luisterende poort te mappen (standaard: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Gebruik UPnP om de luisterende poort te mappen (standaard: 1 als er wordt geluisterd) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Gebruik proxy om 'tor hidden services' te bereiken (standaard: hetzelfde als -proxy) + + + + Username for JSON-RPC connections + Gebruikersnaam voor JSON-RPC-verbindingen + + + + Warning + Waarschuwing + + + + Warning: This version is obsolete, upgrade required! + Waarschuwing: Deze versie is verouderd, een upgrade is vereist! + + + + You need to rebuild the databases using -reindex to change -txindex + U moet de databases herbouwen met behulp van -reindex om -txindex te kunnen veranderen + + + + wallet.dat corrupt, salvage failed + wallet.dat corrupt, veiligstellen mislukt + + + + Password for JSON-RPC connections + Wachtwoord voor JSON-RPC-verbindingen + + + + Allow JSON-RPC connections from specified IP address + Sta JSON-RPC verbindingen van opgegeven IP-adres toe + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Verstuur commando's naar proces dat op <ip> draait (standaard: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Voer commando uit zodra het beste blok verandert (%s in cmd wordt vervangen door blockhash) + + + + Upgrade wallet to latest format + Vernieuw portemonnee naar nieuwste versie + + + + Set key pool size to <n> (default: 100) + Stel sleutelpoelgrootte in op <n> (standaard: 100) + + + + Rescan the block chain for missing wallet transactions + Doorzoek de blokketen op ontbrekende portemonnee-transacties + + + + Use OpenSSL (https) for JSON-RPC connections + Gebruik OpenSSL (https) voor JSON-RPC-verbindingen + + + + Server certificate file (default: server.cert) + Certificaat-bestand voor server (standaard: server.cert) + + + + Server private key (default: server.pem) + Geheime sleutel voor server (standaard: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Aanvaardbare ciphers (standaard: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Dit helpbericht + + + + 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) + + + + Connect through socks proxy + Verbind via een socks-proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Sta DNS-naslag toe voor -addnode, -seednode en -connect + + + + Loading addresses... + Adressen aan het laden... + + + + Error loading wallet.dat: Wallet corrupted + Fout bij laden wallet.dat: Portemonnee corrupt + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Fout bij laden wallet.dat: Portemonnee vereist een nieuwere versie van curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Portemonnee moest herschreven worden: Herstart curecoin om te voltooien + + + + Error loading wallet.dat + Fout bij laden wallet.dat + + + + Invalid -proxy address: '%s' + Ongeldig -proxy adres: '%s' + + + + Unknown network specified in -onlynet: '%s' + Onbekend netwerk gespecificeerd in -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Onbekende -socks proxyversie aangegeven: %i + + + + Cannot resolve -bind address: '%s' + Kan -bind adres niet herleiden: '%s' + + + + Cannot resolve -externalip address: '%s' + Kan -externlip adres niet herleiden: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Ongeldig bedrag voor -paytxfee=<bedrag>: '%s' + + + + Invalid amount + Ongeldig bedrag + + + + Insufficient funds + Ontoereikend saldo + + + + Loading block index... + Blokindex aan het laden... + + + + Add a node to connect to and attempt to keep the connection open + Voeg een node om naar te verbinden toe en probeer de verbinding open te houden + + + + Unable to bind to %s on this computer. curecoin is probably already running. + Niet in staat om aan %s te binden op deze computer. curecoin draait vermoedelijk reeds. + + + + Fee per KB to add to transactions you send + Kosten per KB om aan transacties toe te voegen die u verstuurt + + + + Loading wallet... + Portemonnee aan het laden... + + + + Cannot downgrade wallet + Kan portemonnee niet downgraden + + + + Cannot write default address + Kan standaardadres niet schrijven + + + + Rescanning... + Blokketen aan het doorzoeken... + + + + Done loading + Klaar met laden + + + + To use the %s option + Om de %s optie te gebruiken + + + + Error + Fout + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + U dient rpcpassword=<wachtwoord> in te stellen in het configuratiebestand: +%s +Als het bestand niet bestaat, maak het dan aan, met een alleen-lezen-permissie. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_pl.qm b/src/qt/locale/curecoin_pl.qm new file mode 100644 index 0000000..fa90c77 Binary files /dev/null and b/src/qt/locale/curecoin_pl.qm differ diff --git a/src/qt/locale/curecoin_pl.ts b/src/qt/locale/curecoin_pl.ts new file mode 100644 index 0000000..f926eaa --- /dev/null +++ b/src/qt/locale/curecoin_pl.ts @@ -0,0 +1,2938 @@ + +UTF-8 + + AboutDialog + + + About curecoin + O curecoin + + + + <b>curecoin</b> version + Wersja <b>curecoin</b> + + + + +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. + +Oprogramowanie eksperymentalne. + +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. + + + + Copyright + Prawo autorskie + + + + Dr. Kimoto Chan + Deweloperzy curecoin + + + + AddressBookPage + + + Address Book + Książka Adresowa + + + + Double-click to edit address or label + Kliknij dwukrotnie, aby edytować adres lub etykietę + + + + Create a new address + Utwórz nowy adres + + + + Copy the currently selected address to the system clipboard + Skopiuj aktualnie wybrany adres do schowka + + + + &New Address + &Nowy Adres + + + + These are your curecoin 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 curecoin do odbioru płatności. Możesz nadać oddzielne adresy dla każdego z wysyłających monety, żeby śledzić oddzielnie ich opłaty. + + + + &Copy Address + &Kopiuj adres + + + + Show &QR Code + Pokaż Kod &QR + + + + Sign a message to prove you own a curecoin address + Podpisz wiadomość aby dowieść, że ten adres jest twój + + + + Sign &Message + Podpisz wiado&mość + + + + Delete the currently selected address from the list + Usuń zaznaczony adres z listy + + + + Export the data in the current tab to a file + Eksportuj dane z aktywnej karty do pliku + + + + &Export + &Eksportuj + + + + Verify a message to ensure it was signed with a specified curecoin address + Zweryfikuj wiadomość, aby upewnić się, że została podpisana odpowiednim adresem curecoin. + + + + &Verify Message + &Zweryfikuj wiadomość + + + + &Delete + &Usuń + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Tutaj znajdują się Twoje adresy curecoin do wysyłania płatności. Zawsze sprawdzaj ilość i adres odbiorcy przed wysyłką monet. + + + + Copy &Label + Kopiuj &Etykietę + + + + &Edit + &Edytuj + + + + Send &Coins + Wyślij monety + + + + Export Address Book Data + Eksportuj książkę adresową + + + + Comma separated file (*.csv) + Plik *.CSV (rozdzielany przecinkami) + + + + Error exporting + Błąd podczas eksportowania + + + + Could not write to file %1. + Błąd zapisu do pliku %1. + + + + AddressTableModel + + + Label + Etykieta + + + + Address + Adres + + + + (no label) + (bez etykiety) + + + + AskPassphraseDialog + + + Passphrase Dialog + Okienko Hasła + + + + Enter passphrase + Wpisz hasło + + + + New passphrase + Nowe hasło + + + + Repeat new passphrase + Powtórz nowe hasło + + + + 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>. + Wprowadź nowe hasło dla portfela.<br/>Proszę użyć hasła składającego się z <b>10 lub więcej losowych znaków</b> lub <b>ośmiu lub więcej słów</b>. + + + + Encrypt wallet + Zaszyfruj portfel + + + + This operation needs your wallet passphrase to unlock the wallet. + Ta operacja wymaga hasła do portfela ażeby odblokować portfel. + + + + Unlock wallet + Odblokuj portfel + + + + This operation needs your wallet passphrase to decrypt the wallet. + Ta operacja wymaga hasła do portfela ażeby odszyfrować portfel. + + + + Decrypt wallet + Odszyfruj portfel + + + + Change passphrase + Zmień hasło + + + + Enter the old and new passphrase to the wallet. + Podaj stare i nowe hasło do portfela. + + + + Confirm wallet encryption + Potwierdź szyfrowanie portfela + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Uwaga: Jeśli zaszyfrujesz swój portfel i zgubisz hasło to <b>STRACISZ WSZYSTKIE SWOJE curecoinS'Y</b>! + + + + Are you sure you wish to encrypt your wallet? + Jesteś pewien, że chcesz zaszyfrować swój portfel? + + + + 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. + WAŻNE: Wszystkie wykonane wcześniej kopie pliku portfela powinny być zamienione na nowe, szyfrowane pliki. Z powodów bezpieczeństwa, poprzednie kopie nieszyfrowanych plików portfela staną się bezużyteczne jak tylko zaczniesz korzystać z nowego, szyfrowanego portfela. + + + + + Warning: The Caps Lock key is on! + Uwaga: Klawisz Caps Lock jest włączony + + + + + Wallet encrypted + Portfel zaszyfrowany + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + Program curecoin zamknie się aby dokończyć proces szyfrowania. Pamiętaj, że szyfrowanie portfela nie zabezpiecza w pełni Twoich curecoinów przed kradzieżą przez wirusy lub trojany mogące zainfekować Twój komputer. + + + + + + + Wallet encryption failed + Szyfrowanie portfela nie powiodło się + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Szyfrowanie portfela nie powiodło się z powodu wewnętrznego błędu. Twój portfel nie został zaszyfrowany. + + + + + The supplied passphrases do not match. + Podane hasła nie są takie same. + + + + Wallet unlock failed + Odblokowanie portfela nie powiodło się + + + + + + The passphrase entered for the wallet decryption was incorrect. + Wprowadzone hasło do odszyfrowania portfela jest niepoprawne. + + + + Wallet decryption failed + Odszyfrowywanie portfela nie powiodło się + + + + Wallet passphrase was successfully changed. + Hasło portfela zostało pomyślnie zmienione. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Edytuj listę zapisanych adresów i i etykiet + + + + Show the list of addresses for receiving payments + Pokaż listę adresów do otrzymywania płatności + + + + E&xit + &Zakończ + + + + Quit application + Zamknij program + + + + Show information about curecoin + Pokaż informację o curecoin + + + + 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... + + + + Importing blocks from disk... + Importowanie bloków z dysku... + + + + Reindexing blocks on disk... + Ponowne indeksowanie bloków na dysku... + + + + Send coins to a curecoin address + Wyślij monety na adres curecoin + + + + Modify configuration options for curecoin + Zmienia opcje konfiguracji curecoina + + + + 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 debudowania + + + + Open debugging and diagnostic console + Otwórz konsolę debugowania i diagnostyki + + + + &Verify message... + &Zweryfikuj wiadomość... + + + + + curecoin + curecoin + + + + Wallet + Portfel + + + + &Send + Wyślij + + + + &Receive + Odbie&rz + + + + &Addresses + &Adresy + + + + &About curecoin + O curecoin + + + + &Show / Hide + &Pokaż / Ukryj + + + + Show or hide the main Window + Pokazuje lub ukrywa główne okno + + + + Encrypt the private keys that belong to your wallet + Szyfruj klucze prywatne, które są powiązane z twoim portfelem + + + + Sign messages with your curecoin addresses to prove you own them + Podpisz wiadomości swoim adresem aby udowodnić jego posiadanie + + + + Verify messages to ensure they were signed with specified curecoin addresses + Zweryfikuj wiadomość, aby upewnić się, że została podpisana odpowiednim adresem curecoin. + + + + &File + &Plik + + + + &Settings + P&referencje + + + + &Help + Pomo&c + + + + Tabs toolbar + Pasek zakładek + + + + + [testnet] + [testnet] + + + + curecoin client + curecoin klient + + + + %n active connection(s) to curecoin network + %n aktywne połączenie do sieci curecoin%n aktywne połączenia do sieci curecoin%n aktywnych połączeń do sieci curecoin + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Przetworzono (w przybliżeniu) %1 z %2 bloków historii transakcji. + + + + Processed %1 blocks of transaction history. + Pobrano %1 bloków z historią transakcji. + + + + %n hour(s) + %n godzina%n godzin%n godzin + + + + %n day(s) + %n dzień%n dni%n dni + + + + %n week(s) + %n tydzień%n tygodni%n tygodni + + + + %1 behind + + + + + Last received block was generated %1 ago. + Ostatni otrzymany blok został wygenerowany %1 temu. + + + + Transactions after this will not yet be visible. + + + + + Error + Błąd + + + + Warning + Ostrzeżenie + + + + Information + Informacja + + + + 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? + Transakcja przekracza limit. Możesz wysłać ją płacąc prowizję %1, która zostaje przekazana do węzłów, które ją prześlą i pomoże wspierać sieć curecoin. Czy chcesz zapłacić prowizję? + + + + Up to date + Aktualny + + + + Catching up... + Łapanie bloków... + + + + Confirm transaction fee + Potwierdź prowizję transakcyjną + + + + 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 + Obsługa URI + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + URI nie może zostać przetworzony! Prawdopodobnie błędny adres curecoin bądź nieprawidłowe parametry URI. + + + + 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Błąd krytyczny. curecoin nie może kontynuować bezpiecznie więc zostanie zamknięty. + + + + ClientModel + + + Network Alert + Sieć Alert + + + + EditAddressDialog + + + Edit Address + Edytuj adres + + + + &Label + &Etykieta + + + + The label associated with this address book entry + Etykieta skojarzona z tym wpisem w książce adresowej + + + + &Address + &Adres + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Ten adres jest skojarzony z wpisem w książce adresowej. Może być zmodyfikowany jedynie dla adresów wysyłających. + + + + 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 already in the address book. + Wprowadzony adres "%1" już istnieje w książce adresowej. + + + + The entered address "%1" is not a valid curecoin address. + Wprowadzony adres "%1" nie jest poprawnym adresem curecoin. + + + + Could not unlock wallet. + Nie można było odblokować portfela. + + + + New key generation failed. + Tworzenie nowego klucza nie powiodło się. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + wersja + + + + Usage: + Użycie: + + + + command-line options + opcje konsoli + + + + UI options + UI opcje + + + + Set language, for example "de_DE" (default: system locale) + Ustaw Język, na przykład "pl_PL" (domyślnie: systemowy) + + + + Start minimized + Uruchom zminimalizowany + + + + Show splash screen on startup (default: 1) + Pokazuj okno powitalne przy starcie (domyślnie: 1) + + + + OptionsDialog + + + Options + Opcje + + + + &Main + Główne + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Płać prowizję za transakcje + + + + Automatically start curecoin after logging in to the system. + Automatycznie uruchamia curecoin po zalogowaniu do systemu. + + + + &Start curecoin on system login + Uruchamiaj curecoin wraz z zalogowaniem do &systemu + + + + Reset all client options to default. + Przywróć domyślne wszystkie ustawienia klienta. + + + + &Reset Options + Z&resetuj Ustawienia + + + + &Network + &Sieć + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Automatycznie otwiera port klienta curecoin na routerze. Ta opcja dzieła tylko jeśli twój router wspiera UPnP i jest ono włączone. + + + + Map port using &UPnP + Mapuj port używając &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Podłącz się do sieci curecoin przez proxy SOCKS (np. gdy łączysz się poprzez Tor'a) + + + + &Connect through SOCKS proxy: + &Połącz się przez proxy SOCKS + + + + Proxy &IP: + Proxy &IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + Adres IP serwera proxy (np. 127.0.0.1) + + + + &Port: + &Port: + + + + Port of the proxy (e.g. 9050) + Port proxy (np. 9050) + + + + SOCKS &Version: + Wersja &SOCKS + + + + SOCKS version of the proxy (e.g. 5) + SOCKS wersja serwera proxy (np. 5) + + + + &Window + &Okno + + + + Show only a tray icon after minimizing the window. + Pokazuj tylko ikonę przy zegarku po zminimalizowaniu okna. + + + + &Minimize to the tray instead of the taskbar + &Minimalizuj do paska przy zegarku zamiast do paska zadań + + + + 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. + Minimalizuje zamiast zakończyć działanie programu przy zamykaniu okna. Kiedy ta opcja jest włączona, program zakończy działanie po wybieraniu Zamknij w menu. + + + + M&inimize on close + M&inimalizuj przy zamknięciu + + + + &Display + &Wyświetlanie + + + + User Interface &language: + Język &Użytkownika: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Można tu ustawić język interfejsu uzytkownika. Żeby ustawienie przyniosło skutek trzeba uruchomić ponownie curecoin. + + + + &Unit to show amounts in: + &Jednostka pokazywana przy kwocie: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Wybierz podział jednostki pokazywany w interfejsie oraz podczas wysyłania monet + + + + Whether to show curecoin addresses in the transaction list or not. + Pokazuj adresy curecoin na liście transakcji. + + + + &Display addresses in transaction list + &Wyświetlaj adresy w liście transakcji + + + + &OK + &OK + + + + &Cancel + &Anuluj + + + + &Apply + Z&astosuj + + + + default + domyślny + + + + Confirm options reset + Potwierdź reset ustawień + + + + Some settings may require a client restart to take effect. + Niektóre ustawienia mogą wymagać ponownego uruchomienia klienta, żeby zacząć działać. + + + + Do you want to proceed? + Czy chcesz kontynuować? + + + + + Warning + Ostrzeżenie + + + + + This setting will take effect after restarting curecoin. + To ustawienie zostanie zastosowane po restarcie curecoin + + + + The supplied proxy address is invalid. + Adres podanego proxy jest nieprawidłowy + + + + OverviewPage + + + Form + Formularz + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Wyświetlana informacja może być nieaktualna. Twój portfel synchronizuje się automatycznie z siecią curecoin, zaraz po tym jak uzyskano połączenie, ale proces ten nie został jeszcze ukończony. + + + + Balance: + Saldo: + + + + Unconfirmed: + Niepotwierdzony: + + + + Wallet + Portfel + + + + Immature: + Niedojrzały: + + + + Mined balance that has not yet matured + Balans wydobycia, który jeszcze nie dojrzał + + + + <b>Recent transactions</b> + <b>Ostatnie transakcje</b> + + + + Your current balance + Twoje obecne saldo + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Suma transakcji, które nie zostały jeszcze potwierdzone, i które nie zostały wliczone do twojego obecnego salda + + + + + out of sync + desynchronizacja + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + Okno Dialogowe Kodu QR + + + + Request Payment + Prośba o płatność + + + + Amount: + Kwota: + + + + Label: + Etykieta: + + + + Message: + Wiadomość: + + + + &Save As... + Zapi&sz jako... + + + + Error encoding URI into QR Code. + Błąd kodowania URI w Kodzie QR. + + + + The entered amount is invalid, please check. + Podana ilość jest nieprawidłowa, proszę sprawdzić + + + + Resulting URI too long, try to reduce the text for label / message. + Wynikowy URI jest zbyt długi, spróbuj zmniejszyć tekst etykiety / wiadomości + + + + Save QR Code + Zapisz Kod QR + + + + PNG Images (*.png) + Obraz PNG (*.png) + + + + RPCConsole + + + Client name + Nazwa klienta + + + + + + + + + + + + + N/A + NIEDOSTĘPNE + + + + Client version + Wersja klienta + + + + &Information + &Informacje + + + + Using OpenSSL version + Używana wersja OpenSSL + + + + Startup time + Czas uruchomienia + + + + Network + Sieć + + + + Number of connections + Liczba połączeń + + + + On testnet + W sieci testowej + + + + Block chain + Ciąg bloków + + + + Current number of blocks + Aktualna liczba bloków + + + + Estimated total blocks + Szacowana ilość bloków + + + + Last block time + Czas ostatniego bloku + + + + &Open + &Otwórz + + + + Command-line options + Opcje konsoli + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Pokaż pomoc curecoin-Qt, aby zobaczyć listę wszystkich opcji linii poleceń + + + + &Show + &Pokaż + + + + &Console + &Konsola + + + + Build date + Data kompilacji + + + + curecoin - Debug window + curecoin - Okno debudowania + + + + curecoin Core + Rdzeń curecoin + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + Wyczyść konsolę + + + + Welcome to the curecoin RPC console. + Witam w konsoli curecoin RPC + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Użyj strzałek do przewijania historii i <b>Ctrl-L</b> aby wyczyścić ekran + + + + Type <b>help</b> for an overview of available commands. + Wpisz <b>help</b> aby uzyskać listę dostępnych komend + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Wyślij płatność + + + + Send to multiple recipients at once + Wyślij do wielu odbiorców na raz + + + + Add &Recipient + Dodaj Odbio&rce + + + + Remove all transaction fields + Wyczyść wszystkie pola transakcji + + + + Clear &All + Wyczyść &wszystko + + + + Balance: + Saldo: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Potwierdź akcję wysyłania + + + + S&end + Wy&syłka + + + + <b>%1</b> to %2 (%3) + <b>%1</b> do %2 (%3) + + + + Confirm send coins + Potwierdź wysyłanie monet + + + + Are you sure you want to send %1? + Czy na pewno chcesz wysłać %1? + + + + and + i + + + + The recipient address is not valid, please recheck. + Adres odbiorcy jest nieprawidłowy, proszę poprawić + + + + The amount to pay must be larger than 0. + Kwota do zapłacenia musi być większa od 0. + + + + The amount exceeds your balance. + Kwota przekracza twoje saldo. + + + + The total exceeds your balance when the %1 transaction fee is included. + Suma przekracza twoje saldo, gdy doliczymy %1 prowizji transakcyjnej. + + + + 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: Transaction creation failed! + Błąd: Tworzenie transakcji zakończone niepowodzeniem! + + + + 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. + Błąd: transakcja została odrzucona. Może się to zdarzyć, gdy monety z Twojego portfela zostały już wydane, na przykład gdy używałeś kopii wallet.dat i curecoiny które tam wydałeś nie zostały jeszcze odjęte z portfela z którego teraz korzystasz. + + + + SendCoinsEntry + + + Form + Formularz + + + + A&mount: + Su&ma: + + + + Pay &To: + Zapłać dla: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adres, na który wysłasz płatności (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Wybierz adres z książki adresowej + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Wklej adres ze schowka + + + + Alt+P + Alt+P + + + + Remove this recipient + Usuń tego odbiorce + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Wprowadź adres curecoin (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Podpisy - Podpisz / zweryfikuj wiadomość + + + + &Sign Message + Podpi&sz Wiadomość + + + + 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. + Możesz podpisywać wiadomości swoimi adresami aby udowodnić, że jesteś ich właścicielem. Uważaj, aby nie podpisywać niczego co wzbudza Twoje podejrzenia, ponieważ ktoś może stosować phishing próbując nakłonić Cię do ich podpisania. Akceptuj i podpisuj tylko w pełni zrozumiałe komunikaty i wiadomości. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Wprowadź adres curecoin (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Wybierz adres z książki kontaktowej + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Wklej adres ze schowka + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Wprowadź wiadomość, którą chcesz podpisać, tutaj + + + + Signature + Podpis + + + + Copy the current signature to the system clipboard + Kopiuje aktualny podpis do schowka systemowego + + + + Sign the message to prove you own this curecoin address + Podpisz wiadomość aby dowieść, że ten adres jest twój + + + + Sign &Message + Podpisz Wiado&mość + + + + Reset all sign message fields + Zresetuj wszystkie pola podpisanej wiadomości + + + + + Clear &All + Wyczyść &wszystko + + + + &Verify Message + &Zweryfikuj wiadomość + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Wprowadź adres curecoin (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Zweryfikuj wiadomość, aby upewnić się, że została podpisana odpowiednim adresem curecoin. + + + + Verify &Message + Zweryfikuj Wiado&mość + + + + Reset all verify message fields + Resetuje wszystkie pola weryfikacji wiadomości + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Wprowadź adres curecoin (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Kliknij "Podpisz Wiadomość" żeby uzyskać podpis + + + + Enter curecoin signature + Wprowadź podpis curecoin + + + + + The entered address is invalid. + Podany adres jest nieprawidłowy. + + + + + + + Please check the address and try again. + Proszę sprawdzić adres i spróbować ponownie. + + + + + The entered address does not refer to a key. + Wprowadzony adres nie odnosi się do klucza. + + + + Wallet unlock was cancelled. + Odblokowanie portfela zostało anulowane. + + + + Private key for the entered address is not available. + Klucz prywatny dla podanego adresu nie jest dostępny + + + + Message signing failed. + Podpisanie wiadomości nie powiodło się + + + + Message signed. + Wiadomość podpisana. + + + + The signature could not be decoded. + Podpis nie może zostać zdekodowany. + + + + + Please check the signature and try again. + Sprawdź podpis i spróbuj ponownie. + + + + The signature did not match the message digest. + + + + + Message verification failed. + Weryfikacja wiadomości nie powiodła się. + + + + Message verified. + Wiadomość zweryfikowana. + + + + SplashScreen + + + Dr. Kimoto Chan + Deweloperzy curecoin + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Otwórz do %1 + + + + %1/offline + %1/offline + + + + %1/unconfirmed + %1/niezatwierdzone + + + + %1 confirmations + %1 potwierdzeń + + + + Status + Status + + + + , broadcast through %n node(s) + , emitowany przez %n węzeł, emitowany przez %n węzły, emitowany przez %n węzłów + + + + Date + Data + + + + Source + Źródło + + + + Generated + Wygenerowano + + + + + From + Od + + + + + + To + Do + + + + + own address + własny adres + + + + label + etykieta + + + + + + + + Credit + Przypisy + + + + matures in %n more block(s) + + + + + not accepted + niezaakceptowane + + + + + + + Debit + Debet + + + + Transaction fee + Prowizja transakcji + + + + Net amount + Kwota netto + + + + Message + Wiadomość + + + + Comment + Komentarz + + + + Transaction ID + ID transakcji + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Wygenerowane monety muszą zaczekać 120 bloków zanim będzie można je wydać. Kiedy wygenerowałeś ten blok, został on wyemitowany do sieci, aby dodać go do łańcucha bloków. Jeśli to się nie powiedzie nie zostanie on zaakceptowany i wygenerowanych monet nie będzie można wysyłać. Może się to czasami zdarzyć jeśli inny węzeł wygeneruje blok tuż przed tobą. + + + + Debug information + Informacje debugowania + + + + Transaction + Transakcja + + + + Inputs + Wejścia + + + + Amount + Kwota + + + + true + prawda + + + + false + fałsz + + + + , has not been successfully broadcast yet + , nie został jeszcze pomyślnie wyemitowany + + + + Open for %n more block(s) + Otwórz dla %n blokuOtwórz dla %n następnych blokówOtwórz dla %n następnych bloków + + + + unknown + nieznany + + + + TransactionDescDialog + + + Transaction details + Szczegóły transakcji + + + + This pane shows a detailed description of the transaction + Ten panel pokazuje szczegółowy opis transakcji + + + + TransactionTableModel + + + Date + Data + + + + Type + Typ + + + + Address + Adres + + + + Amount + Kwota + + + + Open for %n more block(s) + Otwórz dla %n następnych bloków + + + + Open until %1 + Otwórz do %1 + + + + Offline (%1 confirmations) + Offline (%1 potwierdzeń) + + + + Unconfirmed (%1 of %2 confirmations) + Niezatwierdzony (%1 z %2 potwierdzeń) + + + + Confirmed (%1 confirmations) + Zatwierdzony (%1 potwierdzeń) + + + + Mined balance will be available when it matures in %n more block(s) + Balans wydobycia będzie dostępny zaraz po tym, jak dojrzeje. Pozostał %n blokBalans wydobycia będzie dostępny zaraz po tym, jak dojrzeje. Pozostało %n blokówBalans wydobycia będzie dostępny zaraz po tym, jak dojrzeje. Pozostało %n bloków + + + + This block was not received by any other nodes and will probably not be accepted! + Ten blok nie został odebrany przez jakikolwiek inny węzeł i prawdopodobnie nie zostanie zaakceptowany! + + + + Generated but not accepted + Wygenerowano ale nie zaakceptowano + + + + Received with + Otrzymane przez + + + + Received from + Odebrano od + + + + Sent to + Wysłano do + + + + Payment to yourself + Płatność do siebie + + + + Mined + Wydobyto + + + + (n/a) + (brak) + + + + Transaction status. Hover over this field to show number of confirmations. + Status transakcji. Najedź na pole, aby zobaczyć liczbę potwierdzeń. + + + + Date and time that the transaction was received. + Data i czas odebrania transakcji. + + + + Type of transaction. + Rodzaj transakcji. + + + + Destination address of transaction. + Adres docelowy transakcji. + + + + Amount removed from or added to balance. + Kwota usunięta z lub dodana do konta. + + + + TransactionView + + + + All + Wszystko + + + + Today + Dzisiaj + + + + This week + W tym tygodniu + + + + This month + W tym miesiącu + + + + Last month + W zeszłym miesiącu + + + + This year + W tym roku + + + + Range... + Zakres... + + + + Received with + Otrzymane przez + + + + Sent to + Wysłano do + + + + To yourself + Do siebie + + + + Mined + Wydobyto + + + + Other + Inne + + + + Enter address or label to search + Wprowadź adres albo etykietę żeby wyszukać + + + + Min amount + Min suma + + + + Copy address + Kopiuj adres + + + + Copy label + Kopiuj etykietę + + + + Copy amount + Kopiuj kwotę + + + + Copy transaction ID + Skopiuj ID transakcji + + + + Edit label + Edytuj etykietę + + + + Show transaction details + Pokaż szczegóły transakcji + + + + Export Transaction Data + Eksportuj Dane Transakcyjne + + + + Comma separated file (*.csv) + CSV (rozdzielany przecinkami) + + + + Confirmed + Potwierdzony + + + + Date + Data + + + + Type + Typ + + + + Label + Etykieta + + + + Address + Adres + + + + Amount + Kwota + + + + ID + ID + + + + Error exporting + Błąd podczas eksportowania + + + + Could not write to file %1. + Błąd zapisu do pliku %1. + + + + Range: + Zakres: + + + + to + do + + + + WalletModel + + + Send Coins + Wyślij płatność + + + + WalletView + + + &Export + &Eksportuj + + + + Export the data in the current tab to a file + Eksportuj dane z aktywnej karty do pliku + + + + Backup Wallet + Kopia Zapasowa Portfela + + + + Wallet Data (*.dat) + Dane Portfela (*.dat) + + + + Backup Failed + Nie udało się wykonać kopii zapasowej + + + + There was an error trying to save the wallet data to the new location. + Wystąpił błąd przy zapisywaniu portfela do nowej lokalizacji. + + + + Backup Successful + Wykonano Kopię Zapasową + + + + The wallet data was successfully saved to the new location. + Dane portfela zostały poprawnie zapisane w nowym miejscu. + + + + curecoin-core + + + curecoin version + Wersja curecoin + + + + Usage: + Użycie: + + + + Send command to -server or curecoind + Wyślij polecenie do -server lub curecoind + + + + List commands + Lista poleceń + + + + Get help for a command + Uzyskaj pomoc do polecenia + + + + Options: + Opcje: + + + + Specify configuration file (default: curecoin.conf) + Wskaż plik konfiguracyjny (domyślnie: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Wskaż plik pid (domyślnie: curecoin.pid) + + + + Specify data directory + Wskaż folder danych + + + + Set database cache size in megabytes (default: 25) + Ustaw rozmiar w megabajtach cache-u bazy danych (domyślnie: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Nasłuchuj połączeń na <port> (domyślnie: 7951 lub testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Utrzymuj maksymalnie <n> połączeń z peerami (domyślnie: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Podłącz się do węzła aby otrzymać adresy peerów i rozłącz + + + + Specify your own public address + Podaj swój publiczny adres + + + + Threshold for disconnecting misbehaving peers (default: 100) + Próg po którym nastąpi rozłączenie nietrzymających się zasad peerów (domyślnie: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Czas w sekundach, przez jaki nietrzymający się zasad peerzy nie będą mogli ponownie się podłączyć (domyślnie: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Wystąpił błąd podczas ustawiania portu RPC %u w tryb nasłuchu: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Nasłuchuj połączeń JSON-RPC na <port> (domyślnie: 7950 or testnet: 17950) + + + + Accept command line and JSON-RPC commands + Akceptuj linię poleceń oraz polecenia JSON-RPC + + + + Run in the background as a daemon and accept commands + Uruchom w tle jako daemon i przyjmuj polecenia + + + + Use the test network + Użyj sieci testowej + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Akceptuj połączenia z zewnątrz (domyślnie: 1 jeśli nie ustawiono -proxy lub -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, musisz ustawić rpcpassword w pliku konfiguracyjnym:⏎ +%s⏎ +Zalecane jest użycie losowego hasła:⏎ +rpcuser=curecoinrpc⏎ +rpcpassword=%s⏎ +(nie musisz pamiętać tego hasła)⏎ +Użytkownik i hasło nie mogą być takie same.⏎ +Jeśli plik nie istnieje, utwórz go z uprawnieniami tylko-do-odczytu dla właściciela.⏎ +Zalecane jest ustawienie alertnotify aby poinformować o problemach:⏎ +na przykład: alertnotify=echo %%s | mail -s "Alarm curecoin" admin@foo.com⏎ + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Wystąpił błąd podczas ustawiania portu RPC %u w tryb nasłuchu dla IPv6, korzystam z IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Skojarz z podanym adresem. Użyj formatu [host]:port dla IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Nie można zablokować folderu danych %s. curecoin prawdopodobnie już działa. + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Uruchom polecenie przy otrzymaniu odpowiedniego powiadomienia (%s w poleceniu jest podstawiane za komunikat) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Wykonaj polecenie, kiedy transakcja portfela ulegnie zmianie (%s w poleceniu zostanie zastąpione przez TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Ustaw maksymalny rozmiar transakcji o wysokim priorytecie/niskiej prowizji w bajtach (domyślnie: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Ostrzeżenie: -paytxfee jest bardzo duży. To jest prowizja za transakcje, którą płacisz, gdy wysyłasz monety. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Uwaga: Wyświetlone transakcje mogą nie być poprawne! Możliwe, że potrzebujesz aktualizacji bądź inne węzły jej potrzebują + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Uwaga: Sprawdź czy data i czas na Twoim komputerze są prawidłowe! Jeśli nie to curecoin nie będzie działał prawidłowo. + + + + 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. + + + + 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. + Ostrzeżenie: Odtworzono dane z uszkodzonego pliku wallet.dat! Oryginalny wallet.dat został zapisany jako wallet.{timestamp}.bak w %s; jeśli twoje saldo lub transakcje są niepoprawne powinieneś odtworzyć kopię zapasową. + + + + Attempt to recover private keys from a corrupt wallet.dat + Próbuj odzyskać klucze prywatne z uszkodzonego wallet.dat + + + + Block creation options: + Opcje tworzenia bloku: + + + + Connect only to the specified node(s) + Łącz tylko do wskazanego węzła + + + + Corrupted block database detected + Wykryto uszkodzoną bazę bloków + + + + Discover own IP address (default: 1 when listening and no -externalip) + Odkryj własny adres IP (domyślnie: 1 kiedy w trybie nasłuchu i brak -externalip ) + + + + Do you want to rebuild the block database now? + Czy chcesz teraz przebudować bazę bloków? + + + + Error initializing block database + Błąd inicjowania bloku bazy danych + + + + Error initializing wallet database environment %s! + Błąd inicjowania środowiska bazy portfela %s! + + + + Error loading block database + Błąd ładowania bazy bloków + + + + Error opening block database + Błąd ładowania bazy bloków + + + + Error: Disk space is low! + Błąd: Mało miejsca na dysku! + + + + Error: Wallet locked, unable to create transaction! + Błąd: Zablokowany portfel, nie można utworzyć transakcji! + + + + Error: system error: + Błąd: błąd systemu: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Próba otwarcia jakiegokolwiek portu nie powiodła się. Użyj -listen=0 jeśli tego chcesz. + + + + Failed to read block info + Nie udało się odczytać informacji bloku + + + + Failed to read block + Nie udało się odczytać bloku. + + + + Failed to sync block index + Nie udało się zsynchronizować indeksu bloków. + + + + Failed to write block index + Nie udało się zapisać indeksu bloków. + + + + Failed to write block info + Nie udało się zapisać informacji bloku + + + + Failed to write block + Nie udało się zapisać bloku + + + + Failed to write file info + + + + + Failed to write to coin database + Nie udało się zapisać do bazy monet + + + + Failed to write transaction index + Nie udało się zapisać indeksu transakcji + + + + Failed to write undo data + Nie udało się zapisać danych odtwarzających + + + + Find peers using DNS lookup (default: 1 unless -connect) + Wyszukaj połączenia wykorzystując zapytanie DNS (domyślnie 1 jeśli nie użyto -connect) + + + + Generate coins (default: 0) + Generuj monety (domyślnie: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Ile bloków sprawdzić przy starcie (domyślnie: 288, 0 = wszystkie) + + + + How thorough the block verification is (0-4, default: 3) + Jak dokładna jest weryfikacja bloku (0-4, domyślnie: 3) + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + Odbuduj indeks łańcucha bloków z obecnych plików blk000??.dat + + + + Set the number of threads to service RPC calls (default: 4) + Ustaw liczbę wątków do odwołań RPC (domyślnie: 4) + + + + Verifying blocks... + Weryfikacja bloków... + + + + Verifying wallet... + Weryfikacja portfela... + + + + Imports blocks from external blk000??.dat file + Importuj bloki z zewnętrznego pliku blk000??.dat + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Ustaw liczbę wątków skryptu weryfikacji (do 16, 0 = auto, <0 = zostawia taką ilość rdzenie wolnych, domyślnie: 0) + + + + Information + Informacja + + + + Invalid -tor address: '%s' + Nieprawidłowy adres -tor: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + Utrzymuj pełen indeks transakcji (domyślnie: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maksymalny bufor odbioru na połączenie, <n>*1000 bajtów (domyślnie: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maksymalny bufor wysyłu na połączenie, <n>*1000 bajtów (domyślnie: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Akceptuj tylko łańcuch bloków zgodny z wbudowanymi punktami kontrolnymi (domyślnie: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Łącz z węzłami tylko w sieci <net> (IPv4, IPv6 lub Tor) + + + + Output extra debugging information. Implies all other -debug* options + + + + + Output extra network debugging information + + + + + Prepend debug output with timestamp + Poprzedź informacje debugowania znacznikiem czasowym + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Opcje SSL: (odwiedź curecoin Wiki w celu uzyskania instrukcji) + + + + Select the version of socks proxy to use (4-5, default: 5) + Wybierz używaną wersje socks serwera proxy (4-5, domyślnie:5) + + + + Send trace/debug info to console instead of debug.log file + Wyślij informację/raport do konsoli zamiast do pliku debug.log. + + + + Send trace/debug info to debugger + Wyślij informację/raport do debuggera. + + + + Set maximum block size in bytes (default: 250000) + Ustaw maksymalny rozmiar bloku w bajtach (domyślnie: 250000) + + + + Set minimum block size in bytes (default: 0) + Ustaw minimalny rozmiar bloku w bajtach (domyślnie: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Zmniejsz plik debug.log przy starcie programu (domyślnie: 1 jeśli nie użyto -debug) + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Wskaż czas oczekiwania bezczynności połączenia w milisekundach (domyślnie: 5000) + + + + System error: + Błąd systemu: + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Używaj UPnP do mapowania portu nasłuchu (domyślnie: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Używaj UPnP do mapowania portu nasłuchu (domyślnie: 1 gdy nasłuchuje) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + Nazwa użytkownika dla połączeń JSON-RPC + + + + Warning + Ostrzeżenie + + + + Warning: This version is obsolete, upgrade required! + Uwaga: Ta wersja jest przestarzała, aktualizacja wymagana! + + + + You need to rebuild the databases using -reindex to change -txindex + Musisz przebudować bazę używając parametru -reindex aby zmienić -txindex + + + + wallet.dat corrupt, salvage failed + wallet.dat uszkodzony, odtworzenie się nie powiodło + + + + Password for JSON-RPC connections + Hasło do połączeń JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + Przyjmuj połączenia JSON-RPC ze wskazanego adresu IP + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Wysyłaj polecenia do węzła działającego na <ip> (domyślnie: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Wykonaj polecenie kiedy najlepszy blok ulegnie zmianie (%s w komendzie zastanie zastąpione przez hash bloku) + + + + Upgrade wallet to latest format + Zaktualizuj portfel do najnowszego formatu. + + + + Set key pool size to <n> (default: 100) + Ustaw rozmiar puli kluczy na <n> (domyślnie: 100) + + + + Rescan the block chain for missing wallet transactions + Przeskanuj blok łańcuchów żeby znaleźć zaginione transakcje portfela + + + + Use OpenSSL (https) for JSON-RPC connections + Użyj OpenSSL (https) do połączeń JSON-RPC + + + + Server certificate file (default: server.cert) + Plik certyfikatu serwera (domyślnie: server.cert) + + + + Server private key (default: server.pem) + Klucz prywatny serwera (domyślnie: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Aceptowalne szyfry (domyślnie: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Ta wiadomość pomocy + + + + 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 + Łączy przez proxy socks + + + + Allow DNS lookups for -addnode, -seednode and -connect + Zezwól -addnode, -seednode i -connect na łączenie się z serwerem DNS + + + + Loading addresses... + Wczytywanie adresów... + + + + Error loading wallet.dat: Wallet corrupted + Błąd ładowania wallet.dat: Uszkodzony portfel + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Błąd ładowania wallet.dat: Portfel wymaga nowszej wersji curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Portfel wymaga przepisania: zrestartuj curecoina żeby ukończyć + + + + Error loading wallet.dat + Błąd ładowania wallet.dat + + + + Invalid -proxy address: '%s' + Nieprawidłowy adres -proxy: '%s' + + + + Unknown network specified in -onlynet: '%s' + Nieznana sieć w -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Nieznana wersja proxy w -socks: %i + + + + Cannot resolve -bind address: '%s' + Nie można uzyskać adresu -bind: '%s' + + + + Cannot resolve -externalip address: '%s' + Nie można uzyskać adresu -externalip: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Nieprawidłowa kwota dla -paytxfee=<amount>: '%s' + + + + Invalid amount + Nieprawidłowa kwota + + + + Insufficient funds + Niewystarczające środki + + + + Loading block index... + Ładowanie indeksu bloku... + + + + 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. curecoin is probably already running. + Nie można przywiązać %s na tym komputerze. curecoin prawdopodobnie już działa. + + + + Fee per KB to add to transactions you send + + + + + + Loading wallet... + Wczytywanie portfela... + + + + Cannot downgrade wallet + Nie można dezaktualizować portfela + + + + Cannot write default address + Nie można zapisać domyślnego adresu + + + + Rescanning... + Ponowne skanowanie... + + + + Done loading + Wczytywanie zakończone + + + + To use the %s option + Aby użyć opcji %s + + + + Error + Błąd + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Musisz ustawić rpcpassword=<hasło> w pliku configuracyjnym: +%s +Jeżeli plik nie istnieje, utwórz go z uprawnieniami właściciela-tylko-do-odczytu. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_pt_BR.qm b/src/qt/locale/curecoin_pt_BR.qm new file mode 100644 index 0000000..fa4d848 Binary files /dev/null and b/src/qt/locale/curecoin_pt_BR.qm differ diff --git a/src/qt/locale/curecoin_pt_BR.ts b/src/qt/locale/curecoin_pt_BR.ts new file mode 100644 index 0000000..1231b88 --- /dev/null +++ b/src/qt/locale/curecoin_pt_BR.ts @@ -0,0 +1,2937 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Sobre o curecoin + + + + <b>curecoin</b> version + Versão do <b>curecoin</b> + + + + +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. + ⏎ +Este é um software experimental.⏎ +⏎ +Distribuido sob a licença de software MIT/X11, veja o arquivo anexo COPYING ou http://www.opensource.org/licenses/mit-license.php.⏎ +⏎ +Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenSSL Toolkit (http://www.openssl.org/), software de criptografia escrito por Eric Young (eay@cryptsoft.com) e sofware UPnP escrito por Thomas Bernard. + + + + Copyright + Copyright + + + + Dr. Kimoto Chan + Dr. Kimoto Chan + + + + AddressBookPage + + + Address Book + Catálogo de endereços + + + + Double-click to edit address or label + Clique duas vezes para editar o endereço ou o etiqueta + + + + Create a new address + Criar um novo endereço + + + + Copy the currently selected address to the system clipboard + Copie o endereço selecionado para a área de transferência do sistema + + + + &New Address + &Novo endereço + + + + These are your curecoin 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 curecoin para receber pagamentos. Você pode querer enviar um endereço diferente para cada remetente, para acompanhar quem está pagando. + + + + &Copy Address + &Copiar Endereço + + + + Show &QR Code + Mostrar &QR Code + + + + Sign a message to prove you own a curecoin address + Assine uma mensagem para provar que você é dono de um endereço curecoin + + + + Sign &Message + &Assinar Mensagem + + + + Delete the currently selected address from the list + Excluir os endereços selecionados da lista + + + + Export the data in the current tab to a file + Exportar os dados na aba atual para um arquivo + + + + &Export + &Exportar + + + + Verify a message to ensure it was signed with a specified curecoin address + Verificar mensagem para se assegurar que ela foi assinada pelo dono de um endereço curecoin específico. + + + + &Verify Message + &Verificar Mensagem + + + + &Delete + &Excluir + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Estes são os seus endereços curecoin para receber pagamentos. Você pode querer enviar um endereço diferente para cada remetente, para acompanhar quem está pagando. + + + + Copy &Label + Copiar &Etiqueta + + + + &Edit + &Editar + + + + Send &Coins + Enviar &coins + + + + Export Address Book Data + Exportar Catálogo de Endereços + + + + 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 gravar no arquivo %1. + + + + AddressTableModel + + + Label + Rótulo + + + + Address + Endereço + + + + (no label) + (Sem rótulo) + + + + AskPassphraseDialog + + + Passphrase Dialog + Janela da Frase de Segurança + + + + Enter passphrase + Digite a frase de segurança + + + + New passphrase + Nova frase de segurança + + + + Repeat new passphrase + Repita a nova frase de segurança + + + + 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>. + Digite a nova frase de seguraça da sua carteira. <br/> Por favor, use uma frase de <b>10 ou mais caracteres aleatórios,</b> ou <b>oito ou mais palavras.</b> + + + + Encrypt wallet + Criptografar carteira + + + + This operation needs your wallet passphrase to unlock the wallet. + Esta operação precisa de sua frase de segurança para desbloquear a carteira. + + + + Unlock wallet + Desbloquear carteira + + + + This operation needs your wallet passphrase to decrypt the wallet. + Esta operação precisa de sua frase de segurança para descriptografar a carteira. + + + + Decrypt wallet + Descriptografar carteira + + + + Change passphrase + Alterar frase de segurança + + + + Enter the old and new passphrase to the wallet. + Digite a frase de segurança antiga e nova para a carteira. + + + + Confirm wallet encryption + Confirmar criptografia da carteira + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Aviso: Se você criptografar sua carteira e perder sua senha, você vai <b>perder todos os seus curecoinS!</b> + + + + Are you sure you wish to encrypt your wallet? + Tem certeza de que deseja criptografar sua carteira? + + + + 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. + + + + + Warning: The Caps Lock key is on! + Cuidado: A tecla Caps Lock está ligada! + + + + + Wallet encrypted + Carteira criptografada + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + O curecoin irá fechar agora para finalizar o processo de encriptação. Lembre-se de que encriptar sua carteira não protege totalmente suas curecoins de serem roubadas por malwares que tenham infectado o seu computador. + + + + + + + Wallet encryption failed + A criptografia da carteira falhou + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + A criptografia da carteira falhou devido a um erro interno. Sua carteira não estava criptografada. + + + + + The supplied passphrases do not match. + A frase de segurança fornecida não confere. + + + + Wallet unlock failed + A abertura da carteira falhou + + + + + + The passphrase entered for the wallet decryption was incorrect. + A frase de segurança digitada para a descriptografia da carteira estava incorreta. + + + + Wallet decryption failed + A descriptografia da carteira falhou + + + + Wallet passphrase was successfully changed. + A frase de segurança da carteira foi alterada com êxito. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Editar a lista de endereços e rótulos + + + + Show the list of addresses for receiving payments + Mostrar a lista de endereços para receber pagamentos + + + + E&xit + S&air + + + + Quit application + Sair da aplicação + + + + Show information about curecoin + Mostrar informação sobre curecoin + + + + 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... + + + + Importing blocks from disk... + Importando blocos do disco... + + + + Reindexing blocks on disk... + Reindexando blocos no disco... + + + + Send coins to a curecoin address + Enviar moedas para um endereço curecoin + + + + Modify configuration options for curecoin + Modificar opções de configuração para curecoin + + + + 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... + + + + + curecoin + curecoin + + + + Wallet + Carteira + + + + &Send + &Enviar + + + + &Receive + &Receber + + + + &Addresses + &Endereços + + + + &About curecoin + &Sobre o curecoin + + + + &Show / Hide + &Exibir/Ocultar + + + + Show or hide the main Window + Mostrar ou esconder a Janela Principal. + + + + Encrypt the private keys that belong to your wallet + Criptografar as chaves privadas que pertencem à sua carteira + + + + Sign messages with your curecoin addresses to prove you own them + Assine mensagems com seus endereços curecoin para provar que você é dono deles + + + + Verify messages to ensure they were signed with specified curecoin addresses + Verificar mensagens para se assegurar que elas foram assinadas pelo dono de Endereços curecoin específicos + + + + &File + &Arquivo + + + + &Settings + &Configurações + + + + &Help + &Ajuda + + + + Tabs toolbar + Barra de ferramentas + + + + + [testnet] + [testnet] + + + + curecoin client + Cliente curecoin + + + + %n active connection(s) to curecoin network + %n conexão ativa na rede curecoin%n conexões ativas na rede curecoin + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Processado %1 de %2 blocos (estimado) de histórico de transações. + + + + Processed %1 blocks of transaction history. + Processado %1 blocos do histórico de transações. + + + + %n hour(s) + %n hora%n horas + + + + %n day(s) + %n dia%n dias + + + + %n week(s) + %n semana%n semanas + + + + %1 behind + %1 atrás + + + + Last received block was generated %1 ago. + Último bloco recebido foi gerado %1 atrás. + + + + Transactions after this will not yet be visible. + Transações após isso ainda não estão visíveis. + + + + Error + Erro + + + + Warning + Cuidado + + + + Information + Informação + + + + 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? + A transação está acima do tamanho limite. Você ainda enviar ela com uma taxa de %1, que vai para os nós processam sua transação e ajuda a manter a rede. Você quer pagar a taxa? + + + + Up to date + Atualizado + + + + Catching up... + Recuperando o atraso ... + + + + Confirm transaction fee + Confirmar taxa de transação + + + + 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 + Manipulação de URI + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + URI não pode ser decodificado! Isso pode ter sido causado por um endereço curecoin inválido ou por parâmetros URI malformados. + + + + 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Um erro fatal ocorreu. curecoin não pode continuar em segurança e irá fechar. + + + + ClientModel + + + Network Alert + Alerta da Rede + + + + EditAddressDialog + + + Edit Address + Editar Endereço + + + + &Label + &Etiqueta + + + + The label associated with this address book entry + A etiqueta associada a esse endereço do catálogo + + + + &Address + &Endereço + + + + The address associated with this address book entry. This can only be modified for sending addresses. + O endereço associado à essa entrada do seu catálogo de endereços. Isso só pode ser modificado para endereço de envio. + + + + 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 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 curecoin address. + O endereço digitado "%1" não é um endereço curecoin válido. + + + + Could not unlock wallet. + Não foi possível destravar a carteira. + + + + New key generation failed. + A geração de nova chave falhou. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versão + + + + Usage: + Uso: + + + + command-line options + opções da linha de comando + + + + UI options + opções da UI + + + + Set language, for example "de_DE" (default: system locale) + Escolher língua, por exemplo "de_DE" (padrão: localização do sistema) + + + + Start minimized + Inicializar minimizado + + + + Show splash screen on startup (default: 1) + Mostrar tela inicial ao ligar (padrão: 1) + + + + OptionsDialog + + + Options + Opções + + + + &Main + Principal + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Pagar taxa de &transação + + + + Automatically start curecoin after logging in to the system. + Iniciar curecoin automaticamente após se logar no sistema. + + + + &Start curecoin on system login + Iniciar curecoin no login do sistema + + + + Reset all client options to default. + Redefinir todas as opções do cliente para opções padrão. + + + + &Reset Options + &Redefinir opções + + + + &Network + Rede + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Abrir as portas do cliente curecoin automaticamente no roteador. Isto só funcionará se seu roteador suportar UPnP e esta função estiver habilitada. + + + + Map port using &UPnP + Mapear porta usando &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Conectar à rede curecoin através de um proxy SOCKS (ex. quando estiver usando através do Tor) + + + + &Connect through SOCKS proxy: + &Conectar através de um proxy SOCKS: + + + + Proxy &IP: + &IP do proxy: + + + + IP address of the proxy (e.g. 127.0.0.1) + Endereço &IP do proxy (ex. 127.0.0.1) + + + + &Port: + &Porta: + + + + Port of the proxy (e.g. 9050) + Porta do serviço de proxy (ex. 9050) + + + + SOCKS &Version: + &Versão do SOCKS: + + + + SOCKS version of the proxy (e.g. 5) + Versão do proxy SOCKS (ex. 5) + + + + &Window + &Janela + + + + Show only a tray icon after minimizing the window. + Mostrar apenas um ícone na bandeja ao minimizar a janela. + + + + &Minimize to the tray instead of the taskbar + &Minimizar para a bandeja em vez da barra de tarefas. + + + + 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. + Minimizar em vez de sair do aplicativo quando a janela for fechada. Quando esta opção é escolhida, o aplicativo só será fechado selecionando Sair no menu Arquivo. + + + + M&inimize on close + M&inimizar ao sair + + + + &Display + &Mostrar + + + + User Interface &language: + &Língua da interface com usuário: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + A língua da interface com usuário pode ser escolhida aqui. Esta configuração só surtirá efeito após reiniciar o curecoin. + + + + &Unit to show amounts in: + &Unidade usada para mostrar quantidades: + + + + 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 curecoins. + + + + Whether to show curecoin addresses in the transaction list or not. + Mostrar ou não endereços curecoin na lista de transações. + + + + &Display addresses in transaction list + Mostrar en&dereços na lista de transações + + + + &OK + &OK + + + + &Cancel + &Cancelar + + + + &Apply + &Aplicar + + + + default + padrão + + + + Confirm options reset + Confirmar redefinição de opções + + + + Some settings may require a client restart to take effect. + Algumas configurações requerem reinicialização para surtirem efeito. + + + + Do you want to proceed? + Você quer continuar? + + + + + Warning + Cuidado + + + + + This setting will take effect after restarting curecoin. + Esta configuração surtirá efeito após reinicializar o aplicativo curecoin + + + + The supplied proxy address is invalid. + O endereço proxy fornecido é inválido. + + + + OverviewPage + + + Form + Formulário + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + A informação mostrada pode estar desatualizada. Sua carteira sincroniza automaticamente com a rede curecoin depois que a conexão é estabelecida, mas este processo pode não estar completo ainda. + + + + Balance: + Saldo: + + + + Unconfirmed: + Não confirmadas: + + + + Wallet + Carteira + + + + Immature: + Imaturo: + + + + Mined balance that has not yet matured + Saldo minerado que ainda não maturou + + + + <b>Recent transactions</b> + <b>Transações recentes</b> + + + + Your current balance + Seu saldo atual + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Total de transações ainda não confirmadas, e que ainda não contam no saldo atual + + + + + out of sync + fora de sincronia + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + Não foi possível iniciar curecoin: manipulador clique-para-pagar + + + + QRCodeDialog + + + QR Code Dialog + Janela do código QR + + + + Request Payment + Requisitar Pagamento + + + + Amount: + Quantia: + + + + Label: + Etiqueta: + + + + Message: + Mensagem: + + + + &Save As... + &Salvar como... + + + + Error encoding URI into QR Code. + Erro ao codigicar o URI em código QR + + + + The entered amount is invalid, please check. + A quantidade digitada é inválida, favor verificar. + + + + Resulting URI too long, try to reduce the text for label / message. + URI resultante muito longa. Tente reduzir o texto do rótulo ou da mensagem. + + + + Save QR Code + Salvar código QR + + + + PNG Images (*.png) + Imagens PNG (*.png) + + + + RPCConsole + + + Client name + Nome do cliente + + + + + + + + + + + + + N/A + N/A + + + + Client version + Versão do cliente + + + + &Information + &Informação + + + + Using OpenSSL version + Usando OpenSSL versão + + + + Startup time + Horário de inicialização + + + + Network + Rede + + + + Number of connections + Número de conexões + + + + On testnet + Na rede de teste + + + + Block chain + Corrente de blocos + + + + Current number of blocks + Quantidade atual de blocos + + + + Estimated total blocks + Total estimado de blocos + + + + Last block time + Horário do último bloco + + + + &Open + &Abrir + + + + Command-line options + Opções da linha de comando + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Mostrar mensagem de ajuda do curecoin-Qt para obter uma lista com possíveis opções da linha de comando do curecoin. + + + + &Show + &Mostrar + + + + &Console + &Console + + + + Build date + Data do 'build' + + + + curecoin - Debug window + curecoin - Janela de Depuração + + + + curecoin Core + Núcleo curecoin + + + + Debug log file + Arquivo de log de Depuração + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Abrir o arquivo de log de depuração do curecoin do diretório atual de dados. Isso pode levar alguns segundos para arquivos de log grandes. + + + + Clear console + Limpar console + + + + Welcome to the curecoin RPC console. + Bem-vindo ao console curecoin RPC. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Use as setas para cima e para baixo para navegar pelo histórico, e <b>Ctrl-L</b> para limpar a tela. + + + + Type <b>help</b> for an overview of available commands. + Digite <b>help</b> para uma visão geral dos comandos disponíveis. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Enviar dinheiro + + + + 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 + Remover todos os campos da transação + + + + Clear &All + Limpar Tudo + + + + Balance: + Saldo: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Confirmar o envio + + + + S&end + Enviar + + + + <b>%1</b> to %2 (%3) + <b>%1</b> para %2 (%3) + + + + Confirm send coins + Confirmar envio de dinheiro + + + + Are you sure you want to send %1? + Você tem certeza que deseja enviar %1? + + + + and + e + + + + The recipient address is not valid, please recheck. + O endereço do destinatário não é válido, favor verificar. + + + + The amount to pay must be larger than 0. + A quantidade a ser paga precisa ser maior que 0. + + + + The amount exceeds your balance. + A quantidade excede seu saldo. + + + + The total exceeds your balance when the %1 transaction fee is included. + O total excede seu saldo quando uma taxa de transação de %1 é incluída. + + + + 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: Transaction creation failed! + Erro: Criação da transação falhou! + + + + 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. + Erro: A transação foi rejeitada. Isso pode acontecer se alguns dos curecoins de sua carteira já haviam sido gastos, por exemplo se você usou uma cópia do arquivo wallet.dat e alguns curecoins foram gastos na cópia mas não foram marcados como gastos aqui. + + + + SendCoinsEntry + + + Form + Formulário + + + + A&mount: + Q&uantidade: + + + + Pay &To: + Pagar &Para: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + O endereço para onde enviar o pagamento (ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Escolha um endereço do seu catálogo + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Colar o endereço da área de transferência + + + + Alt+P + Alt+P + + + + Remove this recipient + Remover este destinatário + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Digite um endereço curecoin (exemplo: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Assinaturas - Assinar / Verificar uma mensagem + + + + &Sign Message + &Assinar Mensagem + + + + 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. + Você pode assinar mensagens com seus endereços para provar que você é o dono deles. Seja cuidadoso para não assinar algo vago, pois ataques de pishing podem tentar te enganar para dar sua assinatura de identidade para eles. Apenas assine afirmações completamente detalhadas com as quais você concorda. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Endereço a ser usado para assinar a mensagem (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Escolha um endereço do catálogo + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Colar o endereço da área de transferência + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Entre a mensagem que você quer assinar aqui + + + + Signature + Assinatura + + + + Copy the current signature to the system clipboard + Copiar a assinatura para a área de transferência do sistema + + + + Sign the message to prove you own this curecoin address + Assinar mensagem para provar que você é dono deste endereço curecoin + + + + Sign &Message + Assinar &Mensagem + + + + Reset all sign message fields + Limpar todos os campos de assinatura da mensagem + + + + + Clear &All + Limpar Tudo + + + + &Verify Message + &Verificar Mensagem + + + + 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. + Forneça o endereço da assinatura, a mensagem (se assegure que você copiou quebras de linha, espaços, tabs, etc. exatamente) e a assinatura abaixo para verificar a mensagem. Cuidado para não ler mais na assinatura do que está escrito na mensagem propriamente, para evitar ser vítima de uma ataque do tipo "man-in-the-middle". + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + O endereço usado para assinar a mensagem (ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Verificar mensagem para se assegurar que ela foi assinada pelo dono de um endereço curecoin específico. + + + + Verify &Message + Verificar %Mensagem + + + + Reset all verify message fields + Limpar todos os campos de assinatura da mensagem + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Digite um endereço curecoin (exemplo: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Clique em "Assinar Mensagem" para gerar a assinatura + + + + Enter curecoin signature + Entre com a assinatura curecoin + + + + + The entered address is invalid. + O endereço fornecido é inválido. + + + + + + + Please check the address and try again. + Por favor, verifique o endereço e tente novamente. + + + + + The entered address does not refer to a key. + O endereço fornecido não se refere a uma chave. + + + + Wallet unlock was cancelled. + Destravamento da Carteira foi cancelado. + + + + Private key for the entered address is not available. + A chave privada para o endereço fornecido não está disponível. + + + + Message signing failed. + Assinatura da mensagem falhou. + + + + Message signed. + Mensagem assinada. + + + + The signature could not be decoded. + A assinatura não pode ser decodificada. + + + + + Please check the signature and try again. + Por favor, verifique a assinatura e tente novamente. + + + + The signature did not match the message digest. + A assinatura não corresponde ao "resumo da mensagem". + + + + Message verification failed. + Verificação da mensagem falhou. + + + + Message verified. + Mensagem verificada. + + + + SplashScreen + + + Dr. Kimoto Chan + Dr. Kimoto Chan + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Aberto até %1 + + + + %1/offline + %1/offline + + + + %1/unconfirmed + %1/não confirmadas + + + + %1 confirmations + %1 confirmações + + + + Status + Status + + + + , broadcast through %n node(s) + , difundir atráves de %n nó, difundir atráves de %n nós + + + + Date + Data + + + + Source + Fonte + + + + Generated + Gerados + + + + + From + De + + + + + + To + Para + + + + + own address + seu próprio endereço + + + + label + etiqueta + + + + + + + + Credit + Crédito + + + + matures in %n more block(s) + matura em mais %n blocomatura em mais %n blocos + + + + not accepted + não aceito + + + + + + + Debit + Débito + + + + Transaction fee + Taxa de transação + + + + Net amount + Valor líquido + + + + Message + Mensagem + + + + Comment + Comentário + + + + Transaction ID + ID da transação + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + curecoins gerados precisam maturar por 120 blocos antes de serem gastos. Quando você gera este bloco, ele é difundido na rede para ser adicionado ao blockchain. Se ele falhar ao ser acrescentado no blockchain, seu estado mudará para "não aceito" e não poderá ser gasto. Isso pode ocasionamente acontecer se outro nó gerou um bloco poucos segundos antes do seu. + + + + Debug information + Informação de depuração + + + + Transaction + Transação + + + + Inputs + Entradas + + + + Amount + Quantidade + + + + true + verdadeiro + + + + false + falso + + + + , has not been successfully broadcast yet + , ainda não foi propagada na rede com sucesso. + + + + Open for %n more block(s) + Abrir para mais %n blocoAbrir para mais %n blocos + + + + unknown + desconhecido + + + + TransactionDescDialog + + + Transaction details + Detalhes da transação + + + + This pane shows a detailed description of the transaction + Este painel mostra uma descrição detalhada da transação + + + + TransactionTableModel + + + Date + Data + + + + Type + Tipo + + + + Address + Endereço + + + + Amount + Quantidade + + + + Open for %n more block(s) + Abrir para mais %n blocoAbrir para mais %n blocos + + + + Open until %1 + Aberto até %1 + + + + Offline (%1 confirmations) + Offline (%1 confirmações) + + + + Unconfirmed (%1 of %2 confirmations) + Não confirmado (%1 of %2 confirmações) + + + + Confirmed (%1 confirmations) + Confirmado (%1 confirmações) + + + + Mined balance will be available when it matures in %n more block(s) + Saldo minerado vai estar disponível quando ele maturar em mais %n blocoSaldo minerado vai estar disponível quando ele maturar em mais %n blocos + + + + This block was not received by any other nodes and will probably not be accepted! + Este bloco não foi recebido por nenhum outro participante da rede e provavelmente não será aceito! + + + + Generated but not accepted + Gerado mas não aceito + + + + Received with + Recebido por + + + + Received from + Recebido de + + + + Sent to + Enviado para + + + + Payment to yourself + Pagamento para você mesmo + + + + Mined + Minerado + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Data e hora em que a transação foi recebida. + + + + Type of transaction. + Tipo de transação. + + + + Destination address of transaction. + Endereço de destino da transação. + + + + Amount removed from or added to balance. + Quantidade debitada ou creditada ao saldo. + + + + TransactionView + + + + All + Todos + + + + Today + Hoje + + + + This week + Esta semana + + + + This month + Este mês + + + + Last month + Mês passado + + + + This year + Este ano + + + + Range... + Intervalo... + + + + Received with + Recebido por + + + + Sent to + Enviado para + + + + To yourself + Para você mesmo + + + + Mined + Minerado + + + + Other + Outro + + + + Enter address or label to search + Procure um endereço ou etiqueta + + + + Min amount + Quantidade mínima + + + + Copy address + Copiar endereço + + + + Copy label + Copiar etiqueta + + + + Copy amount + Copiar quantia + + + + Copy transaction ID + Copiar ID da transação + + + + Edit label + Editar etiqueta + + + + Show transaction details + Mostrar detalhes da transação + + + + Export Transaction Data + Exportar Dados das Transações + + + + Comma separated file (*.csv) + Arquivo separado por vírgulas (*. csv) + + + + Confirmed + Confirmado + + + + Date + Data + + + + Type + Tipo + + + + Label + Etiqueta + + + + Address + Endereço + + + + Amount + Quantidade + + + + ID + ID + + + + Error exporting + Erro ao exportar + + + + Could not write to file %1. + Não foi possível gravar no arquivo %1. + + + + Range: + Intervalo: + + + + to + para + + + + WalletModel + + + Send Coins + Send Coins + + + + WalletView + + + &Export + &Exportar + + + + Export the data in the current tab to a file + Exportar os dados na aba atual para um arquivo + + + + Backup Wallet + Fazer cópia de segurança da Carteira + + + + Wallet Data (*.dat) + Dados da Carteira (*.dat) + + + + Backup Failed + Cópia de segurança Falhou + + + + There was an error trying to save the wallet data to the new location. + Houve um erro ao tentar salvar os dados da carteira para uma nova localização. + + + + Backup Successful + Backup feito com sucesso + + + + The wallet data was successfully saved to the new location. + Os dados da carteira foram salvos com sucesso na nova localização + + + + curecoin-core + + + curecoin version + Versão do curecoin + + + + Usage: + Uso: + + + + Send command to -server or curecoind + Enviar comando para -server ou curecoind + + + + List commands + Lista de comandos + + + + Get help for a command + Obtenha ajuda sobre um comando + + + + Options: + Opções: + + + + Specify configuration file (default: curecoin.conf) + Especifique um arquivo de configurações (padrão: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Especifique um arquivo de pid (padrão: curecoind.pid) + + + + Specify data directory + Especificar diretório de dados + + + + Set database cache size in megabytes (default: 25) + Definir o tamanho do cache do banco de dados em megabytes (padrão: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Procurar por conexões em <port> (padrão: 7951 ou testnet:17951) + + + + Maintain at most <n> connections to peers (default: 125) + Manter no máximo <n> conexões aos peers (padrão: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Conectar a um nó para receber endereços de participantes, e desconectar. + + + + Specify your own public address + Especificar seu próprio endereço público + + + + Threshold for disconnecting misbehaving peers (default: 100) + Limite para desconectar peers mal comportados (padrão: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Número de segundos para impedir que peers mal comportados reconectem (padrão: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Um erro ocorreu ao configurar a porta RPC %u para escuta em IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Escutar conexões JSON-RPC na porta <porta> (padrão: 7950 ou testnet: 17950) + + + + Accept command line and JSON-RPC commands + Aceitar linha de comando e comandos JSON-RPC + + + + Run in the background as a daemon and accept commands + Rodar em segundo plano como serviço e aceitar comandos + + + + Use the test network + Usar rede de teste + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Aceitar conexões externas (padrão: 1 se opções -proxy ou -connect não estiverem presentes) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, você deve especificar uma senha rpcpassword no arquivo de configuração:⏎ +%s⏎ +É recomendado que você use a seguinte senha aleatória:⏎ +rpcuser=curecoinrpc⏎ +rpcpassword=%s⏎ +(você não precisa lembrar esta senha)⏎ +O nome de usuário e a senha NÃO PODEM ser os mesmos.⏎ +Se o arquivo não existir, crie um com permissão de leitura apenas para o dono.⏎ +É recomendado também definir um alertnotify para que você seja notificado de problemas;⏎ +por exemplo: alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com⏎ + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Um erro ocorreu ao configurar a porta RPC %u para escuta em IPv6, voltando ao IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Vincular ao endereço fornecido e sempre escutar nele. Use a notação [host]:port para IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Não foi possível obter exclusividade de escrita no endereço %s. O curecoin provavelmente já está rodando. + + + + 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. + Erro: A transação foi rejeitada. Isso pode acontecer se alguns dos curecoins de sua carteira já haviam sido gastos, por exemplo se você usou uma cópia do arquivo wallet.dat e alguns curecoins foram gastos na cópia mas não foram marcados como gastos aqui. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Erro: Esta transação requer uma taxa de transação de pelo menos %s, por causa sua quantidade, complexidade ou uso de dinheiro recebido recentemente. + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Executar comando quando um alerta relevante for recebido (%s no comando será substituído pela mensagem) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Executar comando quando uma transação da carteira mudar (%s no comando será substituído por TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Determinar tamanho máximo de transações de alta-prioridade/baixa-taxa em bytes (padrão: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Este pode ser um build de teste pré-lançamento - use por sua conta e risco - não use para mineração ou aplicações de comércio. + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + 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: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Cuidado: Transações mostradas podem não estar corretas! Você pode precisar atualizar, ou outros nós podem precisar atualizar o cliente. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Cuidado: Por favor, verifique que a data e hora do seu computador estão corretas! If o seu relógio estiver errado, o curecoin não irá funcionar corretamente. + + + + 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. + + + + 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. + Aviso: wallet.dat corrompido, dados recuperados! Arquivo wallet.dat original salvo como wallet.{timestamp}.bak em %s; se seu saldo ou transações estiverem incorretos, você deve restauras o backup. + + + + Attempt to recover private keys from a corrupt wallet.dat + Tentar recuperar chaves privadas de um arquivo wallet.dat corrompido + + + + Block creation options: + Opções de criação de blocos: + + + + Connect only to the specified node(s) + Conectar apenas a nó(s) específico(s) + + + + Corrupted block database detected + Detectado Banco de dados de blocos corrompido + + + + Discover own IP address (default: 1 when listening and no -externalip) + Descobrir os próprios endereços IP (padrão: 1 quando no modo listening e opção -externalip não estiver presente) + + + + Do you want to rebuild the block database now? + Você quer reconstruir o banco de dados de blocos agora? + + + + Error initializing block database + Erro ao inicializar banco de dados de blocos + + + + Error initializing wallet database environment %s! + Erro ao inicializar ambiente de banco de dados de carteira %s! + + + + Error loading block database + Erro ao carregar banco de dados de blocos + + + + Error opening block database + Erro ao abrir banco de dados de blocos + + + + Error: Disk space is low! + Erro: Espaço em disco insuficiente! + + + + Error: Wallet locked, unable to create transaction! + Erro: Carteira travada, impossível criar transação! + + + + Error: system error: + Erro: erro de sistema + + + + Failed to listen on any port. Use -listen=0 if you want this. + Falha ao escutar em qualquer porta. Use -listen=0 se você quiser isso. + + + + Failed to read block info + Falha ao ler informação de bloco + + + + Failed to read block + Falha ao ler bloco + + + + Failed to sync block index + Falha ao sincronizar índice de blocos + + + + Failed to write block index + Falha ao escrever índice de blocos + + + + Failed to write block info + Falha ao escrever informações de bloco + + + + Failed to write block + Falha ao escrever bloco + + + + Failed to write file info + Falha ao escrever informções de arquivo + + + + Failed to write to coin database + Falha ao escrever banco de dados de moedas + + + + Failed to write transaction index + Falha ao escrever índice de transações + + + + Failed to write undo data + Falha ao escrever dados para desfazer ações + + + + Find peers using DNS lookup (default: 1 unless -connect) + Procurar pares usando consulta de DNS (padrão: 1 a menos que a opção -connect esteja presente) + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + Quantos blocos checar ao inicializar (padrão: 288, 0 = todos) + + + + How thorough the block verification is (0-4, default: 3) + Quão minuciosa é a verificação dos blocos (0-4, padrão: 3) + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + Reconstruir índice de blockchain a partir dos arquivos atuais blk000??.dat + + + + Set the number of threads to service RPC calls (default: 4) + Defina o número de threads de script de verificação. (Padrão: 4) + + + + Verifying blocks... + Verificando blocos... + + + + Verifying wallet... + Verificando carteira... + + + + Imports blocks from external blk000??.dat file + Importar blocos de um arquivo externo blk000??.dat + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + Informação + + + + Invalid -tor address: '%s' + Endereço -tor inválido: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + Manter índice completo de transações (padrão: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Buffer máximo de recebimento por conexão, <n>*1000 bytes (padrão: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Buffer máximo de envio por conexão, <n>*1000 bytes (padrão: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Apenas aceitar cadeia de blocos correspondente a marcas de verificação internas (padrão: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Apenas conectar em nós na rede <net> (IPv4, IPv6, ou Tor) + + + + Output extra debugging information. Implies all other -debug* options + Mostrar informações extras de depuração. Implica em outras opções -debug* + + + + Output extra network debugging information + Mostrar informações extras de depuração da rede + + + + Prepend debug output with timestamp + Pré anexar a saída de debug com estampa de tempo + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Opções SSL: (veja a Wiki do curecoin para instruções de configuração SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + Escolher versão do proxy socks a ser usada (4-5, padrão: 5) + + + + Send trace/debug info to console instead of debug.log file + Mandar informação de trace/debug para o console em vez de para o arquivo debug.log + + + + Send trace/debug info to debugger + Mandar informação de trace/debug para o debugger + + + + Set maximum block size in bytes (default: 250000) + Determinar tamanho máximo de bloco em bytes (padrão: 250000) + + + + Set minimum block size in bytes (default: 0) + Determinar tamanho mínimo de bloco em bytes (padrão: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Encolher arquivo debug.log ao iniciar o cliente (padrão 1 se opção -debug não estiver presente) + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Especifique o tempo limite (timeout) da conexão em milissegundos (padrão: 5000) + + + + System error: + Erro de sistema: + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Usar UPnP para mapear porta de escuta (padrão: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Usar UPnP para mapear porta de escuta (padrão: 1 quando estiver escutando) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Usar proxy para alcançar serviços escondidos (padrão: mesmo que -proxy) + + + + Username for JSON-RPC connections + Nome de usuário para conexões JSON-RPC + + + + Warning + Cuidado + + + + Warning: This version is obsolete, upgrade required! + Cuidado: Esta versão está obsoleta, atualização exigida! + + + + You need to rebuild the databases using -reindex to change -txindex + Você precisa reconstruir os bancos de dados usando -reindex para mudar -txindex + + + + wallet.dat corrupt, salvage failed + wallet.dat corrompido, recuperação falhou + + + + Password for JSON-RPC connections + Senha para conexões JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + Permitir conexões JSON-RPC de endereços IP específicos + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Enviar comando para nó rodando em <ip> (pardão: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Executar comando quando o melhor bloco mudar (%s no comando será substituído pelo hash do bloco) + + + + Upgrade wallet to latest format + Atualizar carteira para o formato mais recente + + + + Set key pool size to <n> (default: 100) + Determinar tamanho do pool de endereços para <n> (padrão: 100) + + + + Rescan the block chain for missing wallet transactions + Re-escanear blocos procurando por transações perdidas da carteira + + + + Use OpenSSL (https) for JSON-RPC connections + Usar OpenSSL (https) para conexões JSON-RPC + + + + Server certificate file (default: server.cert) + Arquivo de certificado do servidor (padrão: server.cert) + + + + Server private key (default: server.pem) + Chave privada do servidor (padrão: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Algoritmos de criptografia aceitos (padrão: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Esta mensagem de ajuda + + + + 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 + Conectar através de um proxy socks + + + + Allow DNS lookups for -addnode, -seednode and -connect + Permitir consultas DNS para -addnode, -seednode e -connect + + + + Loading addresses... + Carregando endereços... + + + + Error loading wallet.dat: Wallet corrupted + Erro ao carregar wallet.dat: Carteira corrompida + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Erro ao carregar wallet.dat: Carteira requer uma versão mais nova do curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + A Carteira precisou ser reescrita: reinicie o curecoin para completar + + + + Error loading wallet.dat + Erro ao carregar wallet.dat + + + + Invalid -proxy address: '%s' + Endereço -proxy inválido: '%s' + + + + Unknown network specified in -onlynet: '%s' + Rede desconhecida especificada em -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Versão desconhecida do proxy -socks requisitada: %i + + + + Cannot resolve -bind address: '%s' + Impossível encontrar o endereço -bind: '%s' + + + + Cannot resolve -externalip address: '%s' + Impossível encontrar endereço -externalip: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Quantidade inválida para -paytxfee=<quantidade>: '%s' + + + + Invalid amount + Quantidade inválida + + + + Insufficient funds + Saldo insuficiente + + + + Loading block index... + Carregando índice de blocos... + + + + 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. curecoin is probably already running. + Impossível vincular a %s neste computador. O curecoin provavelmente já está rodando. + + + + Fee per KB to add to transactions you send + Taxa por KB a ser acrescida nas transações que você enviar + + + + Loading wallet... + Carregando carteira... + + + + Cannot downgrade wallet + Não é possível fazer downgrade da carteira + + + + Cannot write default address + Não foi possível escrever no endereço padrão + + + + Rescanning... + Re-escaneando... + + + + Done loading + Carregamento terminado + + + + To use the %s option + Para usar a opção %s + + + + Error + Erro + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Você precisa especificar rpcpassword=<senha> no arquivo de configurações:⏎ +%s⏎ +Se o arquivo não existir, crie um com permissão de leitura apenas pelo dono + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_pt_PT.qm b/src/qt/locale/curecoin_pt_PT.qm new file mode 100644 index 0000000..d612e7f Binary files /dev/null and b/src/qt/locale/curecoin_pt_PT.qm differ diff --git a/src/qt/locale/curecoin_pt_PT.ts b/src/qt/locale/curecoin_pt_PT.ts new file mode 100644 index 0000000..1350390 --- /dev/null +++ b/src/qt/locale/curecoin_pt_PT.ts @@ -0,0 +1,2938 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Sobre curecoin + + + + <b>curecoin</b> version + Versão do <b>curecoin</b> + + + + +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. + +Este é um programa experimental. + +Distribuído sob uma licença de software MIT/X11, por favor verifique o ficheiro anexo license.txt ou http://www.opensource.org/licenses/mit-license.php. + +Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no OpenSSL Toolkit (http://www.openssl.org/), software criptográfico escrito por Eric Young (eay@cryptsoft.com) e software UPnP escrito por Thomas Bernard. + + + + Copyright + Copyright + + + + Dr. Kimoto Chan + Os programadores curecoin + + + + AddressBookPage + + + Address Book + Livro de endereços + + + + 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 + + + + Copy the currently selected address to the system clipboard + Copie o endereço selecionado para a área de transferência + + + + &New Address + &Novo Endereço + + + + These are your curecoin 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 curecoin para receber pagamentos. Poderá enviar um endereço diferente para cada remetente para poder identificar os pagamentos. + + + + &Copy Address + &Copiar Endereço + + + + Show &QR Code + Mostrar Código &QR + + + + Sign a message to prove you own a curecoin address + Assine uma mensagem para provar que é dono de um endereço curecoin + + + + Sign &Message + Assinar &Mensagem + + + + Delete the currently selected address from the list + Apagar o endereço selecionado da lista + + + + Export the data in the current tab to a file + Exportar os dados no separador actual para um ficheiro + + + + &Export + &Exportar + + + + Verify a message to ensure it was signed with a specified curecoin address + Verifique a mensagem para assegurar que foi assinada com o endereço curecoin especificado + + + + &Verify Message + &Verificar Mensagem + + + + &Delete + E&liminar + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Estes são os seus endereços curecoin para enviar pagamentos. Verifique sempre o valor e a morada de envio antes de enviar moedas. + + + + Copy &Label + Copiar &Rótulo + + + + &Edit + &Editar + + + + Send &Coins + Enviar &Moedas + + + + Export Address Book Data + Exportar dados do Livro de Endereços + + + + Comma separated file (*.csv) + Ficheiro separado por vírgulas (*.csv) + + + + Error exporting + Erro ao exportar + + + + Could not write to file %1. + Não foi possível escrever para o ficheiro %1. + + + + AddressTableModel + + + Label + Rótulo + + + + Address + Endereço + + + + (no label) + (Sem rótulo) + + + + AskPassphraseDialog + + + Passphrase Dialog + Diálogo de Frase-Passe + + + + Enter passphrase + Escreva a frase de segurança + + + + New passphrase + Nova frase de segurança + + + + Repeat new passphrase + Repita a nova frase de segurança + + + + 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>. + Escreva a nova frase de seguraça da sua carteira. <br/> Por favor, use uma frase de <b>10 ou mais caracteres aleatórios,</b> ou <b>oito ou mais palavras</b>. + + + + Encrypt wallet + Encriptar carteira + + + + This operation needs your wallet passphrase to unlock the wallet. + A sua frase de segurança é necessária para desbloquear a carteira. + + + + Unlock wallet + Desbloquear carteira + + + + This operation needs your wallet passphrase to decrypt the wallet. + A sua frase de segurança é necessária para desencriptar a carteira. + + + + Decrypt wallet + Desencriptar carteira + + + + Change passphrase + Alterar frase de segurança + + + + Enter the old and new passphrase to the wallet. + Escreva a frase de segurança antiga seguida da nova para a carteira. + + + + Confirm wallet encryption + Confirmar encriptação da carteira + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Atenção: Se encriptar a carteira e perder a sua senha irá <b>PERDER TODOS OS SEUS curecoinS</b>! + + + + Are you sure you wish to encrypt your wallet? + Tem a certeza que deseja encriptar a carteira? + + + + 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 cópia de segurança anterior da carteira deverá ser substituída com o novo, actualmente encriptado, ficheiro de carteira. Por razões de segurança, cópias de segurança não encriptadas efectuadas anteriormente do ficheiro da carteira tornar-se-ão inúteis assim que começar a usar a nova carteira encriptada. + + + + + Warning: The Caps Lock key is on! + Atenção: A tecla Caps Lock está activa! + + + + + Wallet encrypted + Carteira encriptada + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + O cliente curecoin irá agora ser fechado para terminar o processo de encriptação. Recorde que a encriptação da sua carteira não protegerá totalmente os seus curecoins de serem roubados por programas maliciosos que infectem o seu computador. + + + + + + + Wallet encryption failed + A encriptação da carteira falhou + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + A encriptação da carteira falhou devido a um erro interno. A carteira não foi encriptada. + + + + + The supplied passphrases do not match. + As frases de segurança fornecidas não coincidem. + + + + Wallet unlock failed + O desbloqueio da carteira falhou + + + + + + The passphrase entered for the wallet decryption was incorrect. + A frase de segurança introduzida para a desencriptação da carteira estava incorreta. + + + + Wallet decryption failed + A desencriptação da carteira falhou + + + + Wallet passphrase was successfully changed. + A frase de segurança da carteira foi alterada com êxito. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Editar a lista de endereços e rótulos + + + + Show the list of addresses for receiving payments + Mostrar a lista de endereços para receber pagamentos + + + + E&xit + Fec&har + + + + Quit application + Sair da aplicação + + + + Show information about curecoin + Mostrar informação sobre curecoin + + + + 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... + + + + Importing blocks from disk... + Importando blocos do disco... + + + + Reindexing blocks on disk... + Reindexando blocos no disco... + + + + Send coins to a curecoin address + Enviar moedas para um endereço curecoin + + + + Modify configuration options for curecoin + Modificar opções de configuração para curecoin + + + + 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... + + + + + curecoin + curecoin + + + + Wallet + Carteira + + + + &Send + &Enviar + + + + &Receive + &Receber + + + + &Addresses + E&ndereços + + + + &About curecoin + &Sobre o curecoin + + + + &Show / Hide + Mo&strar / Ocultar + + + + Show or hide the main Window + Mostrar ou esconder a Janela principal + + + + Encrypt the private keys that belong to your wallet + Encriptar as chaves privadas que pertencem à sua carteira + + + + Sign messages with your curecoin addresses to prove you own them + Assine mensagens com os seus endereços curecoin para provar que os controla + + + + Verify messages to ensure they were signed with specified curecoin addresses + Verifique mensagens para assegurar que foram assinadas com o endereço curecoin especificado + + + + &File + &Ficheiro + + + + &Settings + Con&figurações + + + + &Help + A&juda + + + + Tabs toolbar + Barra de separadores + + + + + [testnet] + [rede de testes] + + + + curecoin client + Cliente curecoin + + + + %n active connection(s) to curecoin network + %n ligação ativa à rede curecoin%n ligações ativas à rede curecoin + + + + No block source available... + Nenhum bloco fonto disponível + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Processados %1 dos %2 blocos (estimados) do histórico de transacções. + + + + Processed %1 blocks of transaction history. + Processados %1 blocos do histórico de transações. + + + + %n hour(s) + %n hora%n horas + + + + %n day(s) + %n dia%n dias + + + + %n week(s) + %n semana%n semanas + + + + %1 behind + %1 em atraso + + + + Last received block was generated %1 ago. + Último bloco recebido foi gerado há %1 atrás. + + + + Transactions after this will not yet be visible. + Transações posteriores poderão não ser imediatamente visíveis. + + + + Error + Erro + + + + Warning + Aviso + + + + Information + Informação + + + + 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 transação tem um tamanho superior ao limite máximo. Poderá enviá-la pagando uma taxa de %1, que será entregue ao nó que processar a sua transação e ajudará a suportar a rede. Deseja pagar a taxa? + + + + Up to date + Atualizado + + + + Catching up... + Recuperando... + + + + Confirm transaction fee + Confirme a taxa de transação + + + + 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 + Manuseamento URI + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + URI não foi lido correctamente! Isto pode ser causado por um endereço curecoin inválido ou por parâmetros URI malformados. + + + + 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Ocorreu um erro fatal. O curecoin não pode continuar com segurança e irá fechar. + + + + ClientModel + + + Network Alert + Alerta da Rede + + + + EditAddressDialog + + + Edit Address + Editar Endereço + + + + &Label + &Rótulo + + + + The label associated with this address book entry + O rótulo a ser associado com esta entrada do livro de endereços + + + + &Address + E&ndereço + + + + The address associated with this address book entry. This can only be modified for sending addresses. + O endereço associado com esta entrada do livro de endereços. Apenas poderá ser modificado para endereços de saída. + + + + 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 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 curecoin address. + O endereço introduzido "%1" não é um endereço curecoin válido. + + + + Could not unlock wallet. + Impossível desbloquear carteira. + + + + New key generation failed. + Falha ao gerar nova chave. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versão + + + + Usage: + Utilização: + + + + command-line options + opções da linha de comandos + + + + UI options + Opções de UI + + + + Set language, for example "de_DE" (default: system locale) + Definir linguagem, por exemplo "pt_PT" (por defeito: linguagem do sistema) + + + + Start minimized + Iniciar minimizado + + + + Show splash screen on startup (default: 1) + Mostrar animação ao iniciar (por defeito: 1) + + + + OptionsDialog + + + Options + Opções + + + + &Main + &Principal + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Taxa de transação opcional por KB que ajuda a assegurar que as suas transações serão processadas rapidamente. A maioria das transações tem 1 kB. + + + + Pay transaction &fee + Pagar &taxa de transação + + + + Automatically start curecoin after logging in to the system. + Começar o curecoin automaticamente ao iniciar sessão no sistema. + + + + &Start curecoin on system login + &Começar o curecoin ao iniciar o sistema + + + + Reset all client options to default. + Repôr todas as opções. + + + + &Reset Options + &Repôr Opções + + + + &Network + &Rede + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Abrir a porta do cliente curecoin automaticamente no seu router. Isto penas funciona se o seu router suportar UPnP e este se encontrar ligado. + + + + Map port using &UPnP + Mapear porta usando &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Ligar à rede curecoin através de um proxy SOCKS (p.ex. quando ligar através de Tor). + + + + &Connect through SOCKS proxy: + Ligar através de proxy SO&CKS: + + + + Proxy &IP: + &IP do proxy: + + + + IP address of the proxy (e.g. 127.0.0.1) + Endereço IP do proxy (p.ex. 127.0.0.1) + + + + &Port: + &Porta: + + + + Port of the proxy (e.g. 9050) + Porta do proxy (p.ex. 9050) + + + + SOCKS &Version: + &Versão SOCKS: + + + + SOCKS version of the proxy (e.g. 5) + Versão do proxy SOCKS (p.ex. 5) + + + + &Window + &Janela + + + + Show only a tray icon after minimizing the window. + Apenas mostrar o ícone da bandeja após minimizar a janela. + + + + &Minimize to the tray instead of the taskbar + &Minimizar para a bandeja e não para a barra de ferramentas + + + + 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. + Minimize ao invés de sair da aplicação quando a janela é fechada. Com esta opção selecionada, a aplicação apenas será encerrada quando escolher Sair da aplicação no menú. + + + + M&inimize on close + M&inimizar ao fechar + + + + &Display + Vis&ualização + + + + User Interface &language: + &Linguagem da interface de utilizador: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + A linguagem da interface do utilizador pode ser definida aqui. Esta definição entrará em efeito após reiniciar o curecoin. + + + + &Unit to show amounts in: + &Unidade a usar em quantias: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Escolha a subdivisão unitária a ser mostrada por defeito na aplicação e ao enviar moedas. + + + + Whether to show curecoin addresses in the transaction list or not. + Se mostrar, ou não, os endereços curecoin na lista de transações. + + + + &Display addresses in transaction list + Mostrar en&dereços na lista de transações + + + + &OK + &OK + + + + &Cancel + &Cancelar + + + + &Apply + &Aplicar + + + + default + padrão + + + + Confirm options reset + Confirme a reposição de opções + + + + Some settings may require a client restart to take effect. + Algumas opções requerem o reinício do programa para funcionar. + + + + Do you want to proceed? + Deseja proceder? + + + + + Warning + Aviso + + + + + This setting will take effect after restarting curecoin. + Esta opção entrará em efeito após reiniciar o curecoin. + + + + The supplied proxy address is invalid. + O endereço de proxy introduzido é inválido. + + + + OverviewPage + + + Form + Formulário + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + A informação mostrada poderá estar desatualizada. A sua carteira sincroniza automaticamente com a rede curecoin depois de estabelecer ligação, mas este processo ainda não está completo. + + + + Balance: + Saldo: + + + + Unconfirmed: + Não confirmado: + + + + Wallet + Carteira + + + + Immature: + Imaturo: + + + + Mined balance that has not yet matured + O saldo minado ainda não maturou + + + + <b>Recent transactions</b> + <b>Transações recentes</b> + + + + Your current balance + O seu saldo atual + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Total de transações ainda não confirmadas, e que não estão contabilizadas ainda no seu saldo actual + + + + + out of sync + fora de sincronia + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + Impossível começar o modo clicar-para-pagar com curecoin: + + + + QRCodeDialog + + + QR Code Dialog + Diálogo de Código QR + + + + Request Payment + Requisitar Pagamento + + + + Amount: + Quantia: + + + + Label: + Rótulo: + + + + Message: + Mensagem: + + + + &Save As... + &Salvar Como... + + + + Error encoding URI into QR Code. + Erro ao codificar URI em Código QR. + + + + The entered amount is invalid, please check. + A quantia introduzida é inválida, por favor verifique. + + + + Resulting URI too long, try to reduce the text for label / message. + URI resultante muito longo. Tente reduzir o texto do rótulo / mensagem. + + + + Save QR Code + Guardar Código QR + + + + PNG Images (*.png) + Imagens PNG (*.png) + + + + RPCConsole + + + Client name + Nome do Cliente + + + + + + + + + + + + + N/A + N/D + + + + Client version + Versão do Cliente + + + + &Information + &Informação + + + + Using OpenSSL version + Usando versão OpenSSL + + + + Startup time + Tempo de início + + + + Network + Rede + + + + Number of connections + Número de ligações + + + + On testnet + Em rede de testes + + + + Block chain + Cadeia de blocos + + + + Current number of blocks + Número actual de blocos + + + + Estimated total blocks + Total estimado de blocos + + + + Last block time + Tempo do último bloco + + + + &Open + &Abrir + + + + Command-line options + Opções de linha de comandos + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Mostrar a mensagem de ajuda do curecoin-Qt para obter uma lista com possíveis opções a usar na linha de comandos. + + + + &Show + Mo&strar + + + + &Console + &Consola + + + + Build date + Data de construção + + + + curecoin - Debug window + curecoin - Janela de depuração + + + + curecoin Core + Núcleo curecoin + + + + Debug log file + Ficheiro de registo de depuração + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Abrir o ficheiro de registo de depuração da pasta de dados actual. Isto pode demorar alguns segundos para ficheiros de registo maiores. + + + + Clear console + Limpar consola + + + + Welcome to the curecoin RPC console. + Bem-vindo à consola RPC curecoin. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Use as setas para cima e para baixo para navegar no histórico e <b>Ctrl-L</b> para limpar o ecrã. + + + + Type <b>help</b> for an overview of available commands. + Digite <b>help</b> para visualizar os comandos disponíveis. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Enviar Moedas + + + + Send to multiple recipients at once + Enviar para múltiplos destinatários de uma vez + + + + Add &Recipient + Adicionar &Destinatário + + + + Remove all transaction fields + Remover todos os campos da transação + + + + Clear &All + &Limpar Tudo + + + + Balance: + Saldo: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Confirme ação de envio + + + + S&end + &Enviar + + + + <b>%1</b> to %2 (%3) + <b>%1</b> para %2 (%3) + + + + Confirm send coins + Confirme envio de moedas + + + + Are you sure you want to send %1? + Tem a certeza que deseja enviar %1? + + + + and + e + + + + The recipient address is not valid, please recheck. + O endereço de destino não é válido, por favor verifique. + + + + The amount to pay must be larger than 0. + A quantia a pagar deverá ser maior que 0. + + + + The amount exceeds your balance. + A quantia excede o seu saldo. + + + + The total exceeds your balance when the %1 transaction fee is included. + O total excede o seu saldo quando a taxa de transação de %1 for incluída. + + + + 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: Transaction creation failed! + Erro: A criação da transacção falhou! + + + + 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. + Erro: A transação foi rejeitada. Isso poderá acontecer se algumas das moedas na sua carteira já tiverem sido gastas, se por exemplo tiver usado uma cópia do ficheiro wallet.dat e as moedas foram gastas na cópia mas não foram marcadas como gastas aqui. + + + + SendCoinsEntry + + + Form + Formulário + + + + A&mount: + Qu&antia: + + + + Pay &To: + &Pagar A: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + O endereço para onde enviar o pagamento (p.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Escolher endereço do livro de endereços + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Cole endereço da área de transferência + + + + Alt+P + Alt+P + + + + Remove this recipient + Remover este destinatário + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduza um endereço curecoin (p.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Assinaturas - Assinar / Verificar uma Mensagem + + + + &Sign Message + A&ssinar Mensagem + + + + 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. + Pode assinar mensagens com os seus endereços para provar que são seus. Tenha atenção ao assinar mensagens ambíguas, pois ataques de phishing podem tentar enganá-lo, de modo a assinar a sua identidade para os atacantes. Apenas assine declarações completamente detalhadas com as quais concorde. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + O endereço a utilizar para assinar a mensagem (p.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Escolher endereço do livro de endereços + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Cole endereço da área de transferência + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Escreva aqui a mensagem que deseja assinar + + + + Signature + Assinatura + + + + Copy the current signature to the system clipboard + Copiar a assinatura actual para a área de transferência + + + + Sign the message to prove you own this curecoin address + Assine uma mensagem para provar que é dono deste endereço curecoin + + + + Sign &Message + Assinar &Mensagem + + + + Reset all sign message fields + Repôr todos os campos de assinatura de mensagem + + + + + Clear &All + Limpar &Tudo + + + + &Verify Message + &Verificar Mensagem + + + + 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. + Introduza o endereço de assinatura, mensagem (assegure-se de copiar quebras de linha, espaços, tabuladores, etc. exactamente) e assinatura abaixo para verificar a mensagem. Tenha atenção para não ler mais na assinatura do que o que estiver na mensagem assinada, para evitar ser enganado por um atacante que se encontre entre si e quem assinou a mensagem. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + O endereço utilizado para assinar a mensagem (p.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Verifique a mensagem para assegurar que foi assinada com o endereço curecoin especificado + + + + Verify &Message + Verificar &Mensagem + + + + Reset all verify message fields + Repôr todos os campos de verificação de mensagem + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduza um endereço curecoin (p.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Clique "Assinar mensagem" para gerar a assinatura + + + + Enter curecoin signature + Introduza assinatura curecoin + + + + + The entered address is invalid. + O endereço introduzido é inválido. + + + + + + + Please check the address and try again. + Por favor verifique o endereço e tente de novo. + + + + + The entered address does not refer to a key. + O endereço introduzido não refere a chave alguma. + + + + Wallet unlock was cancelled. + O desbloqueio da carteira foi cancelado. + + + + Private key for the entered address is not available. + A chave privada para o endereço introduzido não está disponível. + + + + Message signing failed. + Assinatura de mensagem falhou. + + + + Message signed. + Mensagem assinada. + + + + The signature could not be decoded. + A assinatura não pôde ser descodificada. + + + + + Please check the signature and try again. + Por favor verifique a assinatura e tente de novo. + + + + The signature did not match the message digest. + A assinatura não condiz com o conteúdo da mensagem. + + + + Message verification failed. + Verificação da mensagem falhou. + + + + Message verified. + Mensagem verificada. + + + + SplashScreen + + + Dr. Kimoto Chan + Os programadores curecoin + + + + [testnet] + [rede de testes] + + + + TransactionDesc + + + Open until %1 + Aberto até %1 + + + + %1/offline + %1/desligado + + + + %1/unconfirmed + %1/não confirmada + + + + %1 confirmations + %1 confirmações + + + + Status + Estado + + + + , broadcast through %n node(s) + , transmitida através de %n nó, transmitida através de %n nós + + + + Date + Data + + + + Source + Origem + + + + Generated + Gerado + + + + + From + De + + + + + + To + Para + + + + + own address + endereço próprio + + + + label + rótulo + + + + + + + + Credit + Crédito + + + + matures in %n more block(s) + matura daqui por %n blocomatura daqui por %n blocos + + + + not accepted + não aceite + + + + + + + Debit + Débito + + + + Transaction fee + Taxa de transação + + + + Net amount + Valor líquido + + + + Message + Mensagem + + + + Comment + Comentário + + + + Transaction ID + ID da Transação + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Moedas geradas deverão maturar por 120 blocos antes de poderem ser gastas. Quando gerou este bloco, ele foi transmitido para a rede para ser incluído na cadeia de blocos. Se a inclusão na cadeia de blocos falhar, irá mudar o estado para "não aceite" e as moedas não poderão ser gastas. Isto poderá acontecer ocasionalmente se outro nó da rede gerar um bloco a poucos segundos de diferença do seu. + + + + Debug information + Informação de depuração + + + + Transaction + Transação + + + + Inputs + Entradas + + + + Amount + Quantia + + + + true + verdadeiro + + + + false + falso + + + + , has not been successfully broadcast yet + , ainda não foi transmitida com sucesso + + + + Open for %n more block(s) + Aberta por mais %n blocoAberta por mais %n blocos + + + + unknown + desconhecido + + + + TransactionDescDialog + + + Transaction details + Detalhes da transação + + + + This pane shows a detailed description of the transaction + Esta janela mostra uma descrição detalhada da transação + + + + TransactionTableModel + + + Date + Data + + + + Type + Tipo + + + + Address + Endereço + + + + Amount + Quantia + + + + Open for %n more block(s) + Aberta por mais %n blocoAberta por mais %n blocos + + + + Open until %1 + Aberto até %1 + + + + Offline (%1 confirmations) + Desligado (%1 confirmação) + + + + Unconfirmed (%1 of %2 confirmations) + Não confirmada (%1 de %2 confirmações) + + + + Confirmed (%1 confirmations) + Confirmada (%1 confirmação) + + + + Mined balance will be available when it matures in %n more block(s) + Saldo minado ficará disponível quando maturar, daqui por %n blocoSaldo minado ficará disponível quando maturar, daqui por %n blocos + + + + This block was not received by any other nodes and will probably not be accepted! + Este bloco não foi recebido por outros nós e provavelmente não será aceite pela rede! + + + + Generated but not accepted + Gerado mas não aceite + + + + Received with + Recebido com + + + + Received from + Recebido de + + + + Sent to + Enviado para + + + + Payment to yourself + Pagamento ao próprio + + + + Mined + Minado + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Data e hora a que esta transação foi recebida. + + + + Type of transaction. + Tipo de transação. + + + + Destination address of transaction. + Endereço de destino da transação. + + + + Amount removed from or added to balance. + Quantia retirada ou adicionada ao saldo. + + + + TransactionView + + + + All + Todas + + + + Today + Hoje + + + + This week + Esta semana + + + + This month + Este mês + + + + Last month + Mês passado + + + + This year + Este ano + + + + Range... + Período... + + + + Received with + Recebida com + + + + Sent to + Enviada para + + + + To yourself + Para si + + + + Mined + Minadas + + + + Other + Outras + + + + Enter address or label to search + Escreva endereço ou rótulo a procurar + + + + Min amount + Quantia mínima + + + + Copy address + Copiar endereço + + + + Copy label + Copiar rótulo + + + + Copy amount + Copiar quantia + + + + Copy transaction ID + Copiar ID da Transação + + + + Edit label + Editar rótulo + + + + Show transaction details + Mostrar detalhes da transação + + + + Export Transaction Data + Exportar Dados das Transações + + + + Comma separated file (*.csv) + Ficheiro separado por vírgula (*.csv) + + + + Confirmed + Confirmada + + + + Date + Data + + + + Type + Tipo + + + + Label + Rótulo + + + + Address + Endereço + + + + Amount + Quantia + + + + ID + ID + + + + Error exporting + Erro ao exportar + + + + Could not write to file %1. + Impossível escrever para o ficheiro %1. + + + + Range: + Período: + + + + to + até + + + + WalletModel + + + Send Coins + Enviar Moedas + + + + WalletView + + + &Export + &Exportar + + + + Export the data in the current tab to a file + Exportar os dados no separador actual para um ficheiro + + + + Backup Wallet + Cópia de Segurança da Carteira + + + + Wallet Data (*.dat) + Dados da Carteira (*.dat) + + + + Backup Failed + Cópia de Segurança Falhou + + + + There was an error trying to save the wallet data to the new location. + Ocorreu um erro ao tentar guardar os dados da carteira na nova localização. + + + + Backup Successful + Cópia de Segurança Bem Sucedida + + + + The wallet data was successfully saved to the new location. + Os dados da carteira foram salvos com sucesso numa nova localização. + + + + curecoin-core + + + curecoin version + Versão curecoin + + + + Usage: + Utilização: + + + + Send command to -server or curecoind + Enviar comando para -server ou curecoind + + + + List commands + Listar comandos + + + + Get help for a command + Obter ajuda para um comando + + + + Options: + Opções: + + + + Specify configuration file (default: curecoin.conf) + Especificar ficheiro de configuração (por defeito: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Especificar ficheiro pid (por defeito: curecoind.pid) + + + + Specify data directory + Especificar pasta de dados + + + + Set database cache size in megabytes (default: 25) + Definir o tamanho da cache de base de dados em megabytes (por defeito: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Escute por ligações em <port> (por defeito: 7951 ou testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Manter no máximo <n> ligações a outros nós da rede (por defeito: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Ligar a um nó para recuperar endereços de pares, e desligar + + + + Specify your own public address + Especifique o seu endereço público + + + + Threshold for disconnecting misbehaving peers (default: 100) + Tolerância para desligar nós mal-formados (por defeito: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Número de segundos a impedir que nós mal-formados se liguem de novo (por defeito: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Ocorreu um erro ao definir a porta %u do serviço RPC a escutar em IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Escutar por ligações JSON-RPC em <port> (por defeito: 7950 ou rede de testes: 17950) + + + + Accept command line and JSON-RPC commands + Aceitar comandos da consola e JSON-RPC + + + + Run in the background as a daemon and accept commands + Correr o processo como um daemon e aceitar comandos + + + + Use the test network + Utilizar a rede de testes - testnet + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Aceitar ligações externas (padrão: 1 sem -proxy ou -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, deverá definir rpcpassword no ficheiro de configuração : + %s +É recomendado que use a seguinte palavra-passe aleatória: +rpcuser=curecoinrpc +rpcpassword=%s +(não precisa recordar esta palavra-passe) +O nome de utilizador e password NÃO DEVEM ser iguais. +Se o ficheiro não existir, crie-o com permissões de leitura apenas para o dono. +Também é recomendado definir alertnotify para que seja alertado sobre problemas; +por exemplo: alertnotify=echo %%s | mail -s "Alerta curecoin" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Ocorreu um erro ao definir a porta %u do serviço RPC a escutar em IPv6, a usar IPv4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Trancar a endereço específio e sempre escutar nele. Use a notação [anfitrião]:porta para IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Impossível trancar a pasta de dados %s. Provavelmente o curecoin já está a ser executado. + + + + 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. + Erro: A transação foi rejeitada. Isso poderá acontecer se algumas das moedas na sua carteira já tiverem sido gastas, se por exemplo tiver usado uma cópia do ficheiro wallet.dat e as moedas foram gastas na cópia mas não foram marcadas como gastas aqui. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Erro: Esta transação requer uma taxa de transação mínima de %s devido á sua quantia, complexidade, ou uso de fundos recebidos recentemente! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Executar comando quando um alerta relevante for recebido (no comando, %s é substituído pela mensagem) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Executar comando quando uma das transações na carteira mudar (no comando, %s é substituído pelo ID da Transação) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Definir tamanho máximo de transações de alta-/baixa-prioridade em bytes (por defeito: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Esta é uma versão de pré-lançamento - use à sua responsabilidade - não usar para minar ou aplicações comerciais + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Atenção: -paytxfee está definida com um valor muito alto! Esta é a taxa que irá pagar se enviar uma transação. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Atenção: As transações mostradas poderão não estar correctas! Poderá ter que atualizar ou outros nós poderão ter que atualizar. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Atenção: Por favor verifique que a data e hora do seu computador estão correctas! Se o seu relógio não estiver certo o curecoin não irá funcionar correctamente. + + + + 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. + + + + 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. + Atenção: wallet.dat corrupto, dados recuperados! wallet.dat original salvo como wallet.{timestamp}.bak em %s; se o seu saldo ou transações estiverem incorrectos deverá recuperar de uma cópia de segurança. + + + + Attempt to recover private keys from a corrupt wallet.dat + Tentar recuperar chaves privadas de um wallet.dat corrupto + + + + Block creation options: + Opções de criação de bloco: + + + + Connect only to the specified node(s) + Apenas ligar ao(s) nó(s) especificado(s) + + + + Corrupted block database detected + Cadeia de blocos corrompida detectada + + + + Discover own IP address (default: 1 when listening and no -externalip) + Descobrir endereço IP próprio (padrão: 1 ao escutar e sem -externalip) + + + + Do you want to rebuild the block database now? + Deseja reconstruir agora a cadeia de blocos? + + + + Error initializing block database + Erro ao inicializar a cadeia de blocos + + + + Error initializing wallet database environment %s! + Erro ao inicializar o ambiente de base de dados da carteira %s! + + + + Error loading block database + Erro ao carregar cadeia de blocos + + + + Error opening block database + Erro ao abrir a cadeia de blocos + + + + Error: Disk space is low! + Erro: Pouco espaço em disco! + + + + Error: Wallet locked, unable to create transaction! + Erro: Carteira bloqueada, incapaz de criar transação! + + + + Error: system error: + Erro: erro do sistema: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Falhou a escutar em qualquer porta. Use -listen=0 se quer isto. + + + + Failed to read block info + Falha ao ler info do bloco + + + + Failed to read block + Falha ao ler bloco + + + + Failed to sync block index + Falha ao sincronizar índice do bloco + + + + Failed to write block index + Falha ao escrever índice do bloco + + + + Failed to write block info + Falha ao escrever info do bloco + + + + Failed to write block + Falha ao escrever o bloco + + + + Failed to write file info + Falha ao escrever info do ficheiro + + + + Failed to write to coin database + Falha ao escrever na base de dados de moedas + + + + Failed to write transaction index + Falha ao escrever índice de transações + + + + Failed to write undo data + Falha ao escrever histórico de modificações + + + + Find peers using DNS lookup (default: 1 unless -connect) + Encontrar pares usando procura DNS (por defeito: 1 excepto -connect) + + + + Generate coins (default: 0) + Gerar moedas (por defeito: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Quantos blocos verificar ao começar (por defeito: 288, 0 = todos) + + + + How thorough the block verification is (0-4, default: 3) + Qual a minúcia na verificação de blocos (0-4, por defeito: 3) + + + + Not enough file descriptors available. + Descritores de ficheiros disponíveis são insuficientes. + + + + Rebuild block chain index from current blk000??.dat files + Reconstruir a cadeia de blocos dos ficheiros blk000??.dat actuais + + + + Set the number of threads to service RPC calls (default: 4) + Defina o número de processos para servir as chamadas RPC (por defeito: 4) + + + + Verifying blocks... + Verificando blocos... + + + + Verifying wallet... + Verificando a carteira... + + + + Imports blocks from external blk000??.dat file + Importar blocos de um ficheiro blk000??.dat externo + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Defina o número de processos de verificação (até 16, 0 = automático, <0 = disponibiliza esse número de núcleos livres, por defeito: 0) + + + + Information + Informação + + + + Invalid -tor address: '%s' + Endereço -tor inválido: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + Quantia inválida para -minrelaytxfee=<amount>: '%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + Quantia inválida para -mintxfee=<amount>: '%s' + + + + Maintain a full transaction index (default: 0) + Manter índice de transações completo (por defeito: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Armazenamento intermédio de recepção por ligação, <n>*1000 bytes (por defeito: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Armazenamento intermédio de envio por ligação, <n>*1000 bytes (por defeito: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Apenas aceitar cadeia de blocos coincidente com marcas de verificação internas (por defeito: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Apenas ligar a nós na rede <net> (IPv4, IPv6 ou Tor) + + + + Output extra debugging information. Implies all other -debug* options + Produzir informação de depuração extra. Implica todas as outras opções -debug* + + + + Output extra network debugging information + Produzir informação de depuração extraordinária + + + + Prepend debug output with timestamp + Preceder informação de depuração com selo temporal + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Opções SSL: (ver a Wiki curecoin para instruções de configuração SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + Selecione a versão do proxy socks a usar (4-5, padrão: 5) + + + + Send trace/debug info to console instead of debug.log file + Enviar informação de rastreio/depuração para a consola e não para o ficheiro debug.log + + + + Send trace/debug info to debugger + Enviar informação de rastreio/depuração para o depurador + + + + Set maximum block size in bytes (default: 250000) + Definir tamanho máximo de um bloco em bytes (por defeito: 250000) + + + + Set minimum block size in bytes (default: 0) + Definir tamanho minímo de um bloco em bytes (por defeito: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Encolher ficheiro debug.log ao iniciar o cliente (por defeito: 1 sem -debug definido) + + + + Signing transaction failed + Falhou assinatura da transação + + + + Specify connection timeout in milliseconds (default: 5000) + Especificar tempo de espera da ligação em millisegundos (por defeito: 5000) + + + + System error: + Erro de sistema: + + + + Transaction amount too small + Quantia da transação é muito baixa + + + + Transaction amounts must be positive + Quantia da transação deverá ser positiva + + + + Transaction too large + Transação grande demais + + + + Use UPnP to map the listening port (default: 0) + Usar UPnP para mapear a porta de escuta (padrão: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Usar UPnP para mapear a porta de escuta (padrão: 1 ao escutar) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Utilizar proxy para aceder a serviços escondidos Tor (por defeito: mesmo que -proxy) + + + + Username for JSON-RPC connections + Nome de utilizador para ligações JSON-RPC + + + + Warning + Aviso + + + + Warning: This version is obsolete, upgrade required! + Atenção: Esta versão está obsoleta, é necessário actualizar! + + + + You need to rebuild the databases using -reindex to change -txindex + Necessita reconstruir as bases de dados usando -reindex para mudar -txindex + + + + wallet.dat corrupt, salvage failed + wallet.dat corrupta, recuperação falhou + + + + Password for JSON-RPC connections + Palavra-passe para ligações JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + Permitir ligações JSON-RPC do endereço IP especificado + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Enviar comandos para o nó a correr em <ip> (por defeito: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Executar comando quando mudar o melhor bloco (no comando, %s é substituído pela hash do bloco) + + + + Upgrade wallet to latest format + Atualize a carteira para o formato mais recente + + + + Set key pool size to <n> (default: 100) + Definir o tamanho da memória de chaves para <n> (por defeito: 100) + + + + Rescan the block chain for missing wallet transactions + Reexaminar a cadeia de blocos para transações em falta na carteira + + + + Use OpenSSL (https) for JSON-RPC connections + Usar OpenSSL (https) para ligações JSON-RPC + + + + Server certificate file (default: server.cert) + Ficheiro de certificado do servidor (por defeito: server.cert) + + + + Server private key (default: server.pem) + Chave privada do servidor (por defeito: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Cifras aceitáveis (por defeito: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Esta mensagem de ajuda + + + + 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 + Ligar através de um proxy socks + + + + Allow DNS lookups for -addnode, -seednode and -connect + Permitir procuras DNS para -addnode, -seednode e -connect + + + + Loading addresses... + Carregar endereços... + + + + Error loading wallet.dat: Wallet corrupted + Erro ao carregar wallet.dat: Carteira danificada + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Erro ao carregar wallet.dat: A Carteira requer uma versão mais recente do curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + A Carteira precisou ser reescrita: reinicie o curecoin para completar + + + + Error loading wallet.dat + Erro ao carregar wallet.dat + + + + Invalid -proxy address: '%s' + Endereço -proxy inválido: '%s' + + + + Unknown network specified in -onlynet: '%s' + Rede desconhecida especificada em -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Versão desconhecida de proxy -socks requisitada: %i + + + + Cannot resolve -bind address: '%s' + Não conseguiu resolver endereço -bind: '%s' + + + + Cannot resolve -externalip address: '%s' + Não conseguiu resolver endereço -externalip: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Quantia inválida para -paytxfee=<amount>: '%s' + + + + Invalid amount + Quantia inválida + + + + Insufficient funds + Fundos insuficientes + + + + Loading block index... + Carregar índice de blocos... + + + + 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. curecoin is probably already running. + Incapaz de vincular à porta %s neste computador. Provavelmente o curecoin já está a funcionar. + + + + Fee per KB to add to transactions you send + Taxa por KB a adicionar a transações enviadas + + + + Loading wallet... + Carregar carteira... + + + + Cannot downgrade wallet + Impossível mudar a carteira para uma versão anterior + + + + Cannot write default address + Impossível escrever endereço por defeito + + + + Rescanning... + Reexaminando... + + + + Done loading + Carregamento completo + + + + To use the %s option + Para usar a opção %s + + + + Error + Erro + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Deverá definir rpcpassword=<password> no ficheiro de configuração: +%s +Se o ficheiro não existir, crie-o com permissões de leitura apenas para o dono. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_ro_RO.qm b/src/qt/locale/curecoin_ro_RO.qm new file mode 100644 index 0000000..ef929ff Binary files /dev/null and b/src/qt/locale/curecoin_ro_RO.qm differ diff --git a/src/qt/locale/curecoin_ro_RO.ts b/src/qt/locale/curecoin_ro_RO.ts new file mode 100644 index 0000000..a72024e --- /dev/null +++ b/src/qt/locale/curecoin_ro_RO.ts @@ -0,0 +1,2922 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Despre curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> versiunea + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Listă de adrese + + + + Double-click to edit address or label + Dublu-click pentru a edita adresa sau eticheta + + + + Create a new address + Creaţi o adresă nouă + + + + Copy the currently selected address to the system clipboard + Copiați adresa selectată în clipboard + + + + &New Address + &Adresă nouă + + + + These are your curecoin 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 dumneavoastră curecoin pentru a primi plăţi. Dacă doriţi, puteți da o adresa diferită fiecărui expeditor, pentru a putea ţine evidenţa plăţilor. + + + + &Copy Address + &Copiază adresa + + + + Show &QR Code + Arata codul QR + + + + Sign a message to prove you own a curecoin address + Semneaza mesajul pentru a dovedi ca detii aceasta adresa Bitocin + + + + Sign &Message + Semneaza mesajul + + + + Delete the currently selected address from the list + Sterge adresele curent selectate din lista + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + Verifica mesajul pentru a te asigura ca a fost insemnat cu o adresa curecoin specifica + + + + &Verify Message + Verifica mesajele + + + + &Delete + &Șterge + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Copiază &eticheta + + + + &Edit + &Editează + + + + Send &Coins + + + + + Export Address Book Data + Exportă Lista de adrese + + + + Comma separated file (*.csv) + Fisier csv: valori separate prin virgulă (*.csv) + + + + Error exporting + Eroare la exportare. + + + + Could not write to file %1. + Eroare la scrierea în fişerul %1. + + + + AddressTableModel + + + Label + Etichetă + + + + Address + Adresă + + + + (no label) + (fără etichetă) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + Introduceți fraza de acces. + + + + New passphrase + Frază de acces nouă + + + + Repeat new passphrase + Repetaţi noua frază de acces + + + + 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>. + Introduceţi noua parolă a portofelului electronic.<br/>Vă rugăm să folosiţi <b>minimum 10 caractere aleatoare</b>, sau <b>minimum 8 cuvinte</b>. + + + + Encrypt wallet + Criptează portofelul + + + + This operation needs your wallet passphrase to unlock the wallet. + Aceasta operație are nevoie de un portofel deblocat. + + + + Unlock wallet + Deblochează portofelul + + + + This operation needs your wallet passphrase to decrypt the wallet. + Această operaţiune necesită parola pentru decriptarea portofelului electronic. + + + + Decrypt wallet + Decriptează portofelul. + + + + Change passphrase + Schimbă fraza de acces + + + + Enter the old and new passphrase to the wallet. + Introduceţi vechea parola a portofelului eletronic şi apoi pe cea nouă. + + + + Confirm wallet encryption + Confirmă criptarea portofelului. + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Atenție: Dacă pierdeţi parola portofelului electronic dupa criptare, <b>VEŢI PIERDE ÎNTREAGA SUMĂ DE curecoinS ACUMULATĂ</b>! + + + + Are you sure you wish to encrypt your wallet? + Sunteţi sigur că doriţi să criptaţi portofelul electronic? + + + + 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! + Atentie! Caps Lock este pornit + + + + + Wallet encrypted + Portofel criptat + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin se va închide acum pentru a termina procesul de criptare. Amintiți-vă că criptarea portofelului dumneavoastră nu poate proteja în totalitate curecoins dvs. de a fi furate de intentii rele. + + + + + + + Wallet encryption failed + Criptarea portofelului a eșuat. + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Criptarea portofelului a eșuat din cauza unei erori interne. Portofelul tău nu a fost criptat. + + + + + The supplied passphrases do not match. + Fraza de acces introdusă nu se potrivește. + + + + Wallet unlock failed + Deblocarea portofelului electronic a eşuat. + + + + + + The passphrase entered for the wallet decryption was incorrect. + Parola introdusă pentru decriptarea portofelului electronic a fost incorectă. + + + + Wallet decryption failed + Decriptarea portofelului electronic a eşuat. + + + + Wallet passphrase was successfully changed. + Parola portofelului electronic a fost schimbată. + + + + curecoinGUI + + + Sign &message... + Semneaza &mesaj... + + + + Synchronizing with network... + Se sincronizează cu reţeaua... + + + + &Overview + &Detalii + + + + Show general overview of wallet + Afişează detalii despre portofelul electronic + + + + &Transactions + &Tranzacţii + + + + Browse transaction history + Istoricul tranzacţiilor + + + + Edit the list of stored addresses and labels + Editaţi lista de adrese şi etichete. + + + + Show the list of addresses for receiving payments + Lista de adrese pentru recepţionarea plăţilor + + + + E&xit + Ieșire + + + + Quit application + Părăsiţi aplicaţia + + + + Show information about curecoin + Informaţii despre curecoin + + + + About &Qt + Despre &Qt + + + + Show information about Qt + Informaţii despre Qt + + + + &Options... + &Setări... + + + + &Encrypt Wallet... + Criptează portofelul electronic... + + + + &Backup Wallet... + &Backup portofelul electronic... + + + + &Change Passphrase... + &Schimbă parola... + + + + Importing blocks from disk... + Importare blocks de pe disk... + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + &Trimiteţi curecoin către o anumită adresă + + + + Modify configuration options for curecoin + Modifică setările pentru curecoin + + + + Backup wallet to another location + Creaza copie de rezerva a portofelului intr-o locatie diferita + + + + Change the passphrase used for wallet encryption + &Schimbă parola folosită pentru criptarea portofelului electronic + + + + &Debug window + & Fereastra debug + + + + Open debugging and diagnostic console + Deschide consola de debug si diagnosticare + + + + &Verify message... + Verifica mesajul + + + + + curecoin + curecoin + + + + Wallet + Portofelul + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &Despre curecoin + + + + &Show / Hide + Arata/Ascunde + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Fişier + + + + &Settings + &Setări + + + + &Help + &Ajutor + + + + Tabs toolbar + Bara de ferestre de lucru + + + + + [testnet] + [testnet] + + + + curecoin client + Client curecoin + + + + %n active connection(s) to curecoin network + %n active connections to curecoin network%n active connections to curecoin network%n active connections to curecoin network + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Actualizat + + + + Catching up... + Se actualizează... + + + + Confirm transaction fee + Confirma taxa tranzactiei + + + + 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⏎ Addresa: %4⏎ + + + + + URI handling + + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + + + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Portofelul electronic este <b>criptat</b> iar in momentul de faţă este <b>deblocat</b> + + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Portofelul electronic este <b>criptat</b> iar in momentul de faţă este <b>blocat</b> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + Alerta retea + + + + EditAddressDialog + + + Edit Address + Editează adresa + + + + &Label + &Eticheta + + + + The label associated with this address book entry + Eticheta asociată cu această înregistrare în Lista de adrese + + + + &Address + &Adresă + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Adresa asociată cu această înregistrare în Lista de adrese. Aceasta poate fi modificată doar pentru expediere. + + + + 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 already in the address book. + Adresa introdusă "%1" se află deja în Lista de adrese. + + + + The entered address "%1" is not a valid curecoin address. + Adresa introdusă "%1" nu este o adresă curecoin valabilă. + + + + Could not unlock wallet. + Portofelul electronic nu a putut fi deblocat . + + + + New key generation failed. + New key generation failed. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + versiunea + + + + Usage: + Uz: + + + + command-line options + command-line setări + + + + UI options + UI setări + + + + Set language, for example "de_DE" (default: system locale) + Seteaza limba, de exemplu: "de_DE" (initialt: system locale) + + + + Start minimized + Incepe miniaturizare + + + + Show splash screen on startup (default: 1) + Afișează pe ecran splash la pornire (implicit: 1) + + + + OptionsDialog + + + Options + Setări + + + + &Main + &Principal + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Plăteşte comision pentru tranzacţie &f + + + + Automatically start curecoin after logging in to the system. + Porneşte automat programul curecoin la pornirea computerului. + + + + &Start curecoin on system login + &S Porneşte curecoin la pornirea sistemului + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + &Retea + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Deschide automat în router portul aferent clientului curecoin. Funcţionează doar în cazul în care routerul e compatibil UPnP şi opţiunea e activată. + + + + Map port using &UPnP + Mapeaza portul folosind &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Conectare la reţeaua curecoin folosind un proxy SOCKS (de exemplu, când conexiunea se stabileşte prin reţeaua Tor) + + + + &Connect through SOCKS proxy: + &Conectează prin proxy SOCKS: + + + + Proxy &IP: + Proxy &IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + Adresa de IP a proxy serverului (de exemplu: 127.0.0.1) + + + + &Port: + &Port: + + + + Port of the proxy (e.g. 9050) + Portul pe care se concetează proxy serverul (de exemplu: 9050) + + + + SOCKS &Version: + SOCKS &Versiune: + + + + SOCKS version of the proxy (e.g. 5) + Versiunea SOCKS a proxiului (ex. 5) + + + + &Window + &Fereastra + + + + Show only a tray icon after minimizing the window. + Afişează doar un icon in tray la ascunderea ferestrei + + + + &Minimize to the tray instead of the taskbar + &M Ascunde în tray în loc de 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. + Ascunde fereastra în locul părăsirii programului în momentul închiderii ferestrei. Când acestă opţiune e activă, aplicaţia se va opri doar în momentul selectării comenzii Quit din menu. + + + + M&inimize on close + &i Ascunde fereastra în locul închiderii programului + + + + &Display + &Afişare + + + + User Interface &language: + Interfata & limba userului + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Limba interfeței utilizatorului poate fi setat aici. Această setare va avea efect după repornirea curecoin. + + + + &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 curecoin. + + + + Whether to show curecoin addresses in the transaction list or not. + Vezi dacă adresele curecoin sunt în lista de tranzacție sau nu + + + + &Display addresses in transaction list + &Afişează adresele în lista de tranzacţii + + + + &OK + & OK + + + + &Cancel + & Renunta + + + + &Apply + Aplica + + + + default + Initial + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + Atentie! + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + Adresa curecoin pe care a-ti specificat-o este invalida + + + + OverviewPage + + + Form + Form + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Informațiile afișate pot fi expirate. Portofelul tău se sincronizează automat cu rețeaua curecoin după ce o conexiune este stabilita, dar acest proces nu a fost finalizat încă. + + + + Balance: + Balanţă: + + + + Unconfirmed: + Neconfirmat: + + + + Wallet + Portofelul + + + + Immature: + Nematurizat: + + + + Mined balance that has not yet matured + Balanta minata care nu s-a maturizat inca + + + + <b>Recent transactions</b> + <b>Ultimele tranzacţii</b> + + + + Your current balance + Soldul contul + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Totalul tranzacţiilor care aşteaptă să fie confirmate şi care nu sunt încă luate în calcul la afişarea soldului contului. + + + + + out of sync + Nu este sincronizat + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + Dialogul codului QR + + + + Request Payment + Cerere de plata + + + + Amount: + Sumă: + + + + Label: + Etichetă: + + + + Message: + Mesaj: + + + + &Save As... + Salvare ca... + + + + Error encoding URI into QR Code. + Eroare la incercarea codarii URl-ului in cod QR + + + + The entered amount is invalid, please check. + Suma introdusa nu este valida, verifica suma. + + + + Resulting URI too long, try to reduce the text for label / message. + + + + + Save QR Code + Salveaza codul QR + + + + PNG Images (*.png) + Imagini de tip PNG (*.png) + + + + RPCConsole + + + Client name + Numaele clientului + + + + + + + + + + + + + N/A + N/A + + + + Client version + Versiunea clientului + + + + &Information + & Informatie + + + + Using OpenSSL version + Foloseste versiunea OpenSSL + + + + Startup time + Data pornirii + + + + Network + Retea + + + + Number of connections + Numarul de conexiuni + + + + On testnet + Pe testnet + + + + Block chain + Lant bloc + + + + Current number of blocks + Numarul curent de blockuri + + + + Estimated total blocks + Estimarea totala a blocks + + + + Last block time + Ultimul block a fost gasit la: + + + + &Open + &Deschide + + + + Command-line options + Command-line setări + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Arata mesajul de ajutor curecoin-QT pentru a obtine o lista cu posibilele optiuni ale comenzilor curecoin + + + + &Show + & Arata + + + + &Console + &Consola + + + + Build date + Construit la data: + + + + curecoin - Debug window + curecoin-Fereastra pentru debug + + + + curecoin Core + curecoin Core + + + + Debug log file + Loguri debug + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Deschide logurile debug din directorul curent. Aceasta poate dura cateva secunde pentru fisierele mai mari + + + + Clear console + Curata consola + + + + Welcome to the curecoin RPC console. + Bun venit la consola curecoin RPC + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Foloseste sagetile sus si jos pentru a naviga in istoric si <b>Ctrl-L</b> pentru a curata. + + + + Type <b>help</b> for an overview of available commands. + Scrie <b>help</b> pentru a vedea comenzile disponibile + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Trimite curecoin + + + + Send to multiple recipients at once + Trimite simultan către mai mulţi destinatari + + + + Add &Recipient + &Adaugă destinatar + + + + Remove all transaction fields + Sterge toate spatiile de tranzactie + + + + Clear &All + Şterge &tot + + + + Balance: + Balanţă: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Confirmă operaţiunea de trimitere + + + + S&end + &S Trimite + + + + <b>%1</b> to %2 (%3) + <b>%1</b> la %2 (%3) + + + + Confirm send coins + Confirmaţi trimiterea de curecoin + + + + Are you sure you want to send %1? + Sunteţi sigur că doriţi să trimiteţi %1? + + + + and + şi + + + + The recipient address is not valid, please recheck. + Adresa destinatarului nu este validă, vă rugăm să o verificaţi. + + + + The amount to pay must be larger than 0. + Suma de plată trebuie să fie mai mare decât 0. + + + + The amount exceeds your balance. + Suma depăşeşte soldul contului. + + + + The total exceeds your balance when the %1 transaction fee is included. + Total depăşeşte soldul contului in cazul plăţii comisionului de %1. + + + + 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: 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. + Eroare: Tranyacţia a fost respinsă. Acesta poate fi rezultatul cheltuirii prealabile a unei sume de curecoin din portofelul electronic, ca în cazul folosirii unei copii a fisierului wallet.dat, în care s-au efectuat tranzacţii neînregistrate în fisierul curent. + + + + SendCoinsEntry + + + Form + Form + + + + A&mount: + Su&mă : + + + + Pay &To: + Plăteşte Că&tre: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + Adaugă o etichetă acestei adrese pentru a o trece în Lista de adrese + + + + &Label: + &L Etichetă: + + + + Choose address from address book + Alegeţi adresa din Listă + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Lipiţi adresa copiată in clipboard. + + + + Alt+P + Alt+P + + + + Remove this recipient + Şterge destinatarul + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduceţi o adresă curecoin (de exemplu: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Semnatura- Semneaza/verifica un mesaj + + + + &Sign Message + Semneaza Mesajul + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduceţi o adresă curecoin (de exemplu: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Alegeţi adresa din Listă + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Lipiţi adresa copiată in clipboard. + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Introduce mesajul pe care vrei sa il semnezi, aici. + + + + Signature + + + + + Copy the current signature to the system clipboard + Copiaza semnatura curenta in clipboard-ul sistemului + + + + Sign the message to prove you own this curecoin address + Semneaza mesajul pentru a dovedi ca detii acesta adresa curecoin + + + + Sign &Message + + + + + Reset all sign message fields + Reseteaza toate spatiile mesajelor semnate. + + + + + Clear &All + Şterge &tot + + + + &Verify Message + Verifica mesajul + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduceţi o adresă curecoin (de exemplu: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Verifica mesajul pentru a fi sigur ca a fost semnat cu adresa curecoin specifica + + + + Verify &Message + + + + + Reset all verify message fields + Reseteaza toate spatiile mesajelor semnate. + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Introduceţi o adresă curecoin (de exemplu: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Click "Semneaza msajul" pentru a genera semnatura + + + + Enter curecoin signature + Introduce semnatura bitocin + + + + + The entered address is invalid. + Adresa introdusa nu este valida + + + + + + + Please check the address and try again. + Te rugam verifica adresa si introduce-o din nou + + + + + The entered address does not refer to a key. + Adresa introdusa nu se refera la o cheie. + + + + Wallet unlock was cancelled. + Blocarea portofelului a fost intrerupta + + + + Private key for the entered address is not available. + Cheia privata pentru adresa introdusa nu este valida. + + + + Message signing failed. + Semnarea mesajului a esuat + + + + Message signed. + Mesaj Semnat! + + + + The signature could not be decoded. + Aceasta semnatura nu a putut fi decodata + + + + + Please check the signature and try again. + Verifica semnatura si incearca din nou + + + + The signature did not match the message digest. + Semnatura nu seamana! + + + + Message verification failed. + Verificarea mesajului a esuat + + + + Message verified. + Mesaj verificat + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Deschis până la %1 + + + + %1/offline + + + + + %1/unconfirmed + %1/neconfirmat + + + + %1 confirmations + %1 confirmări + + + + Status + Stare + + + + , broadcast through %n node(s) + + + + + Date + Data + + + + Source + Sursa + + + + Generated + Generat + + + + + From + De la + + + + + + To + Către + + + + + own address + Adresa posedata + + + + label + etichetă + + + + + + + + Credit + Credit + + + + matures in %n more block(s) + + + + + not accepted + nu este acceptat + + + + + + + Debit + Debit + + + + Transaction fee + Comisionul tranzacţiei + + + + Net amount + Suma netă + + + + Message + Mesaj + + + + Comment + Comentarii + + + + Transaction ID + ID-ul tranzactiei + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Monedele curecoin generate se pot cheltui dupa parcurgerea a 120 de blocuri. După ce a fost generat, s-a propagat în reţea, urmând să fie adăugat lanţului de blocuri. Dacă nu poate fi inclus in lanţ, starea sa va deveni "neacceptat" si nu va putea fi folosit la tranzacţii. Acest fenomen se întâmplă atunci cand un alt nod a generat un bloc la o diferenţa de câteva secunde. + + + + Debug information + Informatii pentru debug + + + + Transaction + Tranzacţie + + + + Inputs + Intrari + + + + Amount + Sumă + + + + true + Adevarat! + + + + false + Fals! + + + + , has not been successfully broadcast yet + , nu s-a propagat încă + + + + Open for %n more block(s) + + + + + unknown + necunoscut + + + + TransactionDescDialog + + + Transaction details + Detaliile tranzacţiei + + + + This pane shows a detailed description of the transaction + Afişează detalii despre tranzacţie + + + + TransactionTableModel + + + Date + Data + + + + Type + Tipul + + + + Address + Adresa + + + + Amount + Cantitate + + + + Open for %n more block(s) + + + + + Open until %1 + Deschis până la %1 + + + + Offline (%1 confirmations) + Neconectat (%1 confirmări) + + + + Unconfirmed (%1 of %2 confirmations) + Neconfirmat (%1 din %2 confirmări) + + + + Confirmed (%1 confirmations) + Confirmat (%1 confirmări) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + Blocul nu a fost recepţionat de niciun alt nod şi e probabil că nu va fi acceptat. + + + + Generated but not accepted + Generat, dar neacceptat + + + + Received with + Recepţionat cu + + + + Received from + Primit de la: + + + + Sent to + Trimis către + + + + Payment to yourself + Plată către un cont propriu + + + + Mined + Produs + + + + (n/a) + (n/a) + + + + Transaction status. Hover over this field to show number of confirmations. + Starea tranzacţiei. Treceţi cu mouse-ul peste acest câmp pentru afişarea numărului de confirmări. + + + + Date and time that the transaction was received. + Data şi ora la care a fost recepţionată tranzacţia. + + + + Type of transaction. + Tipul tranzacţiei. + + + + Destination address of transaction. + Adresa de destinaţie a tranzacţiei. + + + + Amount removed from or added to balance. + Suma extrasă sau adăugată la sold. + + + + TransactionView + + + + All + Toate + + + + Today + Astăzi + + + + This week + Săptămâna aceasta + + + + This month + Luna aceasta + + + + Last month + Luna trecută + + + + This year + Anul acesta + + + + Range... + Între... + + + + Received with + Recepţionat cu... + + + + Sent to + Trimis către + + + + To yourself + Către propriul cont + + + + Mined + Produs + + + + Other + Altele + + + + Enter address or label to search + Introduceţi adresa sau eticheta pentru căutare + + + + Min amount + Cantitatea produsă + + + + Copy address + Copiază adresa + + + + Copy label + Copiază eticheta + + + + Copy amount + Copiază sumă + + + + Copy transaction ID + + + + + Edit label + Editează eticheta + + + + Show transaction details + Arata detaliile tranzactiei + + + + Export Transaction Data + Exportă tranzacţiile + + + + Comma separated file (*.csv) + Fişier text cu valori separate prin virgulă (*.csv) + + + + Confirmed + Confirmat + + + + Date + Data + + + + Type + Tipul + + + + Label + Etichetă + + + + Address + Adresă + + + + Amount + Sumă + + + + ID + ID + + + + Error exporting + Eroare în timpul exportului + + + + Could not write to file %1. + Fisierul %1 nu a putut fi accesat pentru scriere. + + + + Range: + Interval: + + + + to + către + + + + WalletModel + + + Send Coins + Trimite curecoin + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + 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. + A apărut o eroare la încercarea de a salva datele din portofel intr-o noua locație. + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + versiunea curecoin + + + + Usage: + Uz: + + + + Send command to -server or curecoind + Trimite comanda la -server sau curecoind + + + + List commands + Listă de comenzi + + + + Get help for a command + Ajutor pentru o comandă + + + + Options: + Setări: + + + + Specify configuration file (default: curecoin.conf) + Specifica-ți configurația fisierului (in mod normal: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + Specifica datele directorului + + + + Set database cache size in megabytes (default: 25) + Seteaza marimea cache a bazei de date in MB (initial: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Lista a conectiunile in <port> (initial: 7951 sau testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Se menține la cele mai multe conexiuni <n> cu colegii (implicit: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Conecteaza-te la nod pentru a optine adresa peer, si deconecteaza-te + + + + Specify your own public address + Specifica adresa ta publica + + + + Threshold for disconnecting misbehaving peers (default: 100) + Prag pentru deconectarea colegii funcționează corect (implicit: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Numărul de secunde pentru a păstra colegii funcționează corect la reconectare (implicit: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + Se accepta command line si comenzi JSON-RPC + + + + Run in the background as a daemon and accept commands + Ruleaza în background ca un demon și accepta comenzi. + + + + Use the test network + Utilizeaza test de retea + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Accepta conexiuni de la straini (initial: 1 if no -proxy or -connect) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Seteaza marimea maxima a tranzactie mare/mica in bytes (initial:27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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: + Optiuni creare block + + + + Connect only to the specified node(s) + Conecteaza-te doar la nod(urile) specifice + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + Descopera propria ta adresa IP (intial: 1) + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 + Copie de ieșire de depanare cu timestamp + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Optiuni SSl (vezi curecoin wiki pentru intructiunile de instalare) + + + + Select the version of socks proxy to use (4-5, default: 5) + Selecteaza versiunea socks-ului pe care vrei sa il folosesti (4-5, initial: 5) + + + + Send trace/debug info to console instead of debug.log file + Trimite urmări / debug info la consola loc de debug.log fișier + + + + Send trace/debug info to debugger + Trimite urmări / debug info la depanatorul + + + + 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Foloseste UPnP pentru a vedea porturile (initial: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Foloseste UPnP pentru a vedea porturile (initial: 1 cand listezi) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + Username pentru conectiunile JSON-RPC + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Parola pentru conectiunile JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + Permiteti conectiunile JSON-RPC de la o adresa IP specifica. + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Trimite comenzi la nod, ruland pe ip-ul (initial: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Executa comanda cand cel mai bun block se schimba (%s in cmd se inlocuieste cu block hash) + + + + Upgrade wallet to latest format + Actualizeaza portofelul la ultimul format + + + + Set key pool size to <n> (default: 100) + Setarea marimii cheii bezinului la <n>(initial 100) + + + + Rescan the block chain for missing wallet transactions + Rescanare lanțul de bloc pentru tranzacțiile portofel lipsă + + + + Use OpenSSL (https) for JSON-RPC connections + Foloseste Open SSL(https) pentru coneciunile JSON-RPC + + + + Server certificate file (default: server.cert) + Certificatul serverulu (initial: server.cert) + + + + Server private key (default: server.pem) + Cheia privata a serverului ( initial: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Accepta cifruri (initial: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Acest mesaj de ajutor. + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + Nu se poate lega %s cu acest calculator (retunare eroare legatura %d, %s) + + + + + + Connect through socks proxy + Conectează prin proxy SOCKS + + + + Allow DNS lookups for -addnode, -seednode and -connect + Permite DNS-ului sa se uite dupa -addnode, -seednode si -connect + + + + Loading addresses... + Încarc adrese... + + + + Error loading wallet.dat: Wallet corrupted + Eroare incarcand wallet.dat: Portofel corupt + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Eroare incarcare wallet.dat: Portofelul are nevoie de o versiune curecoin mai noua + + + + Wallet needed to be rewritten: restart curecoin to complete + Portofelul trebuie rescris: restarteaza aplicatia curecoin pentru a face asta. + + + + Error loading wallet.dat + Eroare incarcand wallet.dat + + + + Invalid -proxy address: '%s' + Adresa proxy invalida: '%s' + + + + Unknown network specified in -onlynet: '%s' + Retea specificata necunoscuta -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Necunoscut -socks proxy version requested: %i + + + + Cannot resolve -bind address: '%s' + Nu se poate rezolca -bind address: '%s' + + + + Cannot resolve -externalip address: '%s' + Nu se poate rezolva -externalip address: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Suma invalida pentru -paytxfee=<amount>: '%s' + + + + Invalid amount + Suma invalida + + + + Insufficient funds + Fonduri insuficiente + + + + Loading block index... + Încarc indice bloc... + + + + Add a node to connect to and attempt to keep the connection open + Add a node to connect to and attempt to keep the connection open +details suggestions history + + + + + Unable to bind to %s on this computer. curecoin is probably already running. + Imposibilitatea de a lega la% s pe acest computer. curecoin este, probabil, deja în execuție. + + + + Fee per KB to add to transactions you send + Taxa pe kb pentru a adauga tranzactii trimise + + + + Loading wallet... + Încarc portofel... + + + + Cannot downgrade wallet + Nu se poate face downgrade la portofel + + + + Cannot write default address + Nu se poate scrie adresa initiala + + + + Rescanning... + Rescanez... + + + + Done loading + Încărcare terminată + + + + To use the %s option + Pentru a folosii optiunea %s + + + + Error + Eroare + + + + 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/curecoin_ru.qm b/src/qt/locale/curecoin_ru.qm new file mode 100644 index 0000000..affa692 Binary files /dev/null and b/src/qt/locale/curecoin_ru.qm differ diff --git a/src/qt/locale/curecoin_ru.ts b/src/qt/locale/curecoin_ru.ts new file mode 100644 index 0000000..1bf535e --- /dev/null +++ b/src/qt/locale/curecoin_ru.ts @@ -0,0 +1,2753 @@ + + + +UTF-8 + + AboutDialog + + + About curecoin + О curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> версия + + + + Copyright © 2009-2012 The curecoin developers + Все права защищены © 2009-2012 Разработчики curecoin + + + + +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. + +Это экспериментальная программа. + +Распространяется на правах лицензии MIT/X11, см. файл license.txt или http://www.opensource.org/licenses/mit-license.php. + +Этот продукт включает ПО, разработанное OpenSSL Project для использования в OpenSSL Toolkit (http://www.openssl.org/) и криптографическое ПО, написанное Eric Young (eay@cryptsoft.com) и ПО для работы с UPnP, написанное 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 curecoin 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 + Показать &QR код + + + + Sign a message to prove you own a curecoin address + Подписать сообщение, чтобы доказать владение адресом curecoin + + + + Sign &Message + &Подписать сообщение + + + + Delete the currently selected address from the list + Удалить выбранный адрес из списка + + + + Verify a message to ensure it was signed with a specified curecoin address + Проверить сообщение, чтобы убедиться, что оно было подписано указанным адресом curecoin + + + + &Verify Message + &Проверить сообщение + + + + &Delete + &Удалить + + + + Copy &Label + Копировать &метку + + + + &Edit + &Правка + + + + Export Address Book Data + Экспортировать адресную книгу + + + + Comma separated file (*.csv) + Текст, разделённый запятыми (*.csv) + + + + Error exporting + Ошибка экспорта + + + + Could not write to file %1. + Невозможно записать в файл %1. + + + + AddressTableModel + + + Label + Метка + + + + Address + Адрес + + + + (no label) + [нет метки] + + + + AskPassphraseDialog + + + Passphrase Dialog + Диалог ввода пароля + + + + Enter passphrase + Введите пароль + + + + New passphrase + Новый пароль + + + + Repeat new passphrase + Повторите новый пароль + + + + 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>. + Введите новый пароль для бумажника. <br/> Пожалуйста, используйте фразы из <b>10 или более случайных символов,</b> или <b>восьми и более слов.</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>! + Внимание: если вы зашифруете бумажник и потеряете пароль, вы <b>ПОТЕРЯЕТЕ ВСЕ ВАШИ МОНЕТЫ</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! + Внимание: Caps Lock включен! + + + + + Wallet encrypted + Бумажник зашифрован + + + + curecoin 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. + Пароль бумажника успешно изменён. + + + + curecoinGUI + + + 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 curecoin + Показать информацию о curecoin'е + + + + 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 curecoin address + Отправить монеты на указанный адрес curecoin + + + + Modify configuration options for curecoin + Изменить параметры конфигурации curecoin + + + + 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... + &Проверить сообщение... + + + + curecoin + curecoin + + + + Wallet + Бумажник + + + + &About curecoin + &О curecoin + + + + &Show / Hide + &Показать / Скрыть + + + + &File + &Файл + + + + &Settings + &Настройки + + + + &Help + &Помощь + + + + Tabs toolbar + Панель вкладок + + + + Actions toolbar + Панель действий + + + + + [testnet] + [тестовая сеть] + + + + + curecoin client + curecoin клиент + + + + %n active connection(s) to curecoin network + + %n активное соединение с сетью + %n активных соединений с сетью + %n активных соединений с сетью + + + + + Downloaded %1 blocks of transaction history. + Загружено %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 + + + + + + URI handling + Обработка URI + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + Не удалось обработать URI! Это может быть связано с неверным адресом curecoin или неправильными параметрами 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. + При попытке сохранения данных бумажника в новое место произошла ошибка. + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Произошла неисправимая ошибка. curecoin не может безопасно продолжать работу и будет закрыт. + + + + ClientModel + + + Network Alert + Сетевая Тревога + + + + 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. + Введённый адрес «%1» уже находится в адресной книге. + + + + The entered address "%1" is not a valid curecoin address. + Введённый адрес "%1" не является правильным curecoin-адресом. + + + + Could not unlock wallet. + Не удается разблокировать бумажник. + + + + New key generation failed. + Генерация нового ключа не удалась. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + версия + + + + Usage: + Использование: + + + + command-line options + параметры командной строки + + + + UI options + Опции интерфейса + + + + Set language, for example "de_DE" (default: system locale) + Выберите язык, например "de_DE" (по умолчанию: как в системе) + + + + Start minimized + Запускать свёрнутым + + + + Show splash screen on startup (default: 1) + Показывать сплэш при запуске (по умолчанию: 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. + Опциональная комиссия за каждый КБ транзакции, которая позволяет быть уверенным, что Ваша транзакция будет обработана быстро. Большинство транзакций занимают 1КБ. Рекомендуется комиссия 0.01. + + + + Pay transaction &fee + Заплатить ко&миссию + + + + Automatically start curecoin after logging in to the system. + Автоматически запускать curecoin после входа в систему + + + + &Start curecoin on system login + &Запускать curecoin при входе в систему + + + + 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 curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Автоматически открыть порт для curecoin-клиента на роутере. Работает только если Ваш роутер поддерживает UPnP, и данная функция включена. + + + + Map port using &UPnP + Пробросить порт через &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Подключаться к сети curecoin через прокси SOCKS (например, при подключении через Tor). + + + + &Connect through SOCKS proxy: + &Подключаться через SOCKS прокси: + + + + Proxy &IP: + &IP Прокси: + + + + IP address of the proxy (e.g. 127.0.0.1) + IP-адрес прокси (например 127.0.0.1) + + + + &Port: + По&рт: + + + + Port of the proxy (e.g. 9050) + Порт прокси-сервера (например, 9050) + + + + SOCKS &Version: + &Версия SOCKS: + + + + SOCKS version of the proxy (e.g. 5) + Версия SOCKS-прокси (например, 5) + + + + &Window + &Окно + + + + Show only a tray icon after minimizing the window. + Показывать только иконку в системном лотке после сворачивания окна. + + + + &Minimize to the tray instead of the taskbar + &Cворачивать в системный лоток вместо панели задач + + + + 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 curecoin. + Здесь можно выбрать язык интерфейса. Настройки вступят в силу после перезапуска curecoin. + + + + &Unit to show amounts in: + &Отображать суммы в единицах: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Выберите единицу измерения монет при отображении и отправке. + + + + Whether to show curecoin addresses in the transaction list or not. + Показывать ли адреса curecoin в списке транзакций. + + + + &Display addresses in transaction list + &Показывать адреса в списке транзакций + + + + &OK + О&К + + + + &Cancel + &Отмена + + + + &Apply + &Применить + + + + default + по умолчанию + + + + + Warning + Внимание + + + + + This setting will take effect after restarting curecoin. + Эта настройка вступит в силу после перезапуска curecoin + + + + The supplied proxy address is invalid. + Адрес прокси неверен. + + + + OverviewPage + + + Form + Форма + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Отображаемая информация может быть устаревшей. Ваш бумажник автоматически синхронизируется с сетью curecoin после подключения, но этот процесс пока не завершён. + + + + Balance: + Баланс: + + + + Stake: + Доля: + + + + Number of transactions: + Количество транзакций: + + + + Unconfirmed: + Не подтверждено: + + + + Wallet + Бумажник + + + + Immature: + Незрелые: + + + + Mined balance that has not yet matured + Баланс добытых монет, который ещё не созрел + + + + <b>Recent transactions</b> + <b>Последние транзакции</b> + + + + Your current balance + Ваш текущий баланс + + + + 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 + Общая сумма всех монет, используемых для Proof-of-Stake, и не учитывающихся на балансе + + + + Total number of transactions in wallet + Общее количество транзакций в Вашем бумажнике + + + + + out of sync + не синхронизировано + + + + QRCodeDialog + + + QR Code Dialog + Диалог QR-кода + + + + Request Payment + Запросить платёж + + + + Amount: + Количество: + + + + Label: + Метка: + + + + Message: + Сообщение: + + + + &Save As... + &Сохранить как... + + + + Error encoding URI into QR Code. + Ошибка кодирования URI в QR-код + + + + The entered amount is invalid, please check. + Введено неверное количество, проверьте ещё раз. + + + + Resulting URI too long, try to reduce the text for label / message. + Получившийся URI слишком длинный, попробуйте сократить текст метки / сообщения. + + + + Save QR Code + Сохранить QR-код + + + + PNG Images (*.png) + PNG Изображения (*.png) + + + + RPCConsole + + + Client name + Имя клиента + + + + + + + + + + + + + N/A + Н/Д + + + + Client version + Версия клиента + + + + &Information + &Информация + + + + Using OpenSSL version + Используется версия OpenSSL + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + Показать помощь по curecoin-Qt, чтобы получить список доступных параметров командной строки. + + + + &Show + &Показать + + + + &Console + Консоль + + + + Build date + Дата сборки + + + + curecoin - Debug window + curecoin - Окно отладки + + + + curecoin Core + Ядро curecoin + + + + Debug log file + Отладочный лог-файл + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Открыть отладочный лог-файл curecoin из текущего каталога данных. Это может занять несколько секунд для больших лог-файлов. + + + + Clear console + Очистить консоль + + + + Welcome to the curecoin RPC console. + Добро пожаловать в RPC-консоль curecoin. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Используйте стрелки вверх и вниз для просмотра истории и <b>Ctrl-L</b> для очистки экрана. + + + + Type <b>help</b> for an overview of available commands. + Напишите <b>help</b> для просмотра доступных команд. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Отправка + + + + Send to multiple recipients at once + Отправить нескольким получателям одновременно + + + + Add &Recipient + &Добавить получателя + + + + Remove all transaction fields + Удалить все поля транзакции + + + + Clear &All + Очистить &всё + + + + Balance: + Баланс: + + + + 123.456 BTC + 123.456 BTC + + + + Confirm the send action + Подтвердить отправку + + + + S&end + &Отправить + + + + <b>%1</b> to %2 (%3) + <b>%1</b> адресату %2 (%3) + + + + Confirm send coins + Подтвердите отправку монет + + + + Are you sure you want to send %1? + Вы уверены, что хотите отправить %1? + + + + and + и + + + + The recipient address is not valid, please recheck. + Адрес получателя неверный, пожалуйста, перепроверьте. + + + + The amount to pay must be larger than 0. + Количество монет для отправки должно быть больше 0. + + + + The amount exceeds your balance. + Количество отправляемых монет превышает Ваш баланс + + + + The total exceeds your balance when the %1 transaction fee is included. + Сумма превысит Ваш баланс, если комиссия в размере %1 будет добавлена к транзакции + + + + 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. + Ошибка: В транзакции отказано. Такое может произойти, если некоторые монеты уже были потрачены, например, если Вы используете одну копию файла wallet.dat, а монеты были потрачены из другой копии, но не были отмечены как потраченные в этой. + + + + 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. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + Адрес получателя платежа (например 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + Choose address from address book + Выберите адрес из адресной книги + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Вставить адрес из буфера обмена + + + + Alt+P + Alt+P + + + + Remove this recipient + Удалить этого получателя + + + + Enter a curecoin address (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + Введите curecoin-адрес (например 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + 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. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + Адрес, которым вы хотите подписать сообщение (напр. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + + 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 curecoin address + Подписать сообщение, чтобы доказать владение адресом curecoin + + + + 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. + Введите ниже адрес для подписи, сообщение (убедитесь, что переводы строк, пробелы, табы и т.п. в точности скопированы) и подпись, чтобы проверить сообщение. Убедитесь, что не скопировали лишнего в подпись, по сравнению с самим подписываемым сообщением, чтобы не стать жертвой атаки "man-in-the-middle". + + + + The address the message was signed with (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + Адрес, которым было подписано сообщение (напр. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + Verify the message to ensure it was signed with the specified curecoin address + Проверить сообщение, чтобы убедиться, что оно было подписано указанным адресом curecoin + + + + Reset all verify message fields + Сбросить все поля проверки сообщения + + + + + Enter a curecoin address (e.g. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + Введите адрес curecoin (напр. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + + + + Click "Sign Message" to generate signature + Нажмите "Подписать сообщение" для создания подписи + + + + Enter curecoin signature + Введите подпись curecoin + + + + + 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 + Открыто до %1 + + + + Open for %n block(s) + + Открыто для %n блока + Открыто для %n блоков + Открыто для %n блоков + + + + + %1/offline + %1/отключен + + + + %1/unconfirmed + %1/не подтверждено + + + + %1 confirmations + %1 подтверждений + + + + Status + Статус + + + + , broadcast through %n node(s) + + , разослано через %n узел + , разослано через %n узла + , разослано через %n узлов + + + + + Date + Дата + + + + Source + Источник + + + + Generated + Сгенерированно + + + + + From + От + + + + + + To + Для + + + + + own address + свой адрес + + + + label + метка + + + + + + + + Credit + Кредит + + + + matures in %n more block(s) + + будет доступно через %n блок + будет доступно через %n блока + будет доступно через %n блоков + + + + + not accepted + не принято + + + + + + + Debit + Дебет + + + + Transaction fee + Комиссия + + + + Net amount + Чистая сумма + + + + Message + Сообщение + + + + Comment + Комментарий: + + + + Transaction ID + ID транзакции + + + + Generated coins must mature 30 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. + Сгенерированные монеты должны подождать 30 блоков, прежде чем они могут быть потрачены. Когда Вы сгенерировали этот блок, он был отправлен в сеть для добавления в цепочку блоков. Если данная процедура не удастся, статус изменится на «не подтверждено», и монеты будут недействительны. Это иногда происходит в случае, если другой узел сгенерирует блок на несколько секунд раньше вас. + + + + Staked coins must wait 30 blocks before they can return to balance and be spent. When you generated this proof-of-stake block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be a valid stake. This may occasionally happen if another node generates a proof-of-stake block within a few seconds of yours. + Использованные в Proof-of-Stake монеты должны подождать 30 блоков, прежде чем они вернутся на баланс и смогут быть потрачены. Когда вы сгенерировали этот proof-of-stake блок, он был отправлен в сеть для добавления в цепочку блоков. Если данная процедура не удается, статус изменится на \"не подтверждени\" и блок будет недействителен. Это иногда происходит в случае, если другой узел сгенерирует блок на несколько секунд раньше вас. + + + + 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 for %n block(s) + + Открыто для %n блока + Открыто для %n блоков + Открыто для %n блоков + + + + + Open until %1 + Открыто до %1 + + + + Offline (%1 confirmations) + Оффлайн (%1 подтверждений) + + + + Unconfirmed (%1 of %2 confirmations) + Не подтверждено (%1 из %2 подтверждений) + + + + Confirmed (%1 confirmations) + Подтверждено (%1 подтверждений) + + + + Mined balance will be available when it matures in %n more block(s) + + Добытыми монетами можно будет воспользоваться через %n блок + Добытыми монетами можно будет воспользоваться через %n блока + Добытыми монетами можно будет воспользоваться через %n блоков + + + + + 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 + Скопировать сумму + + + + Edit label + Изменить метку + + + + Show transaction details + Показать подробности транзакции + + + + Export Transaction Data + Экспортировать данные транзакций + + + + Comma separated file (*.csv) + Текст, разделённый запятыми (*.csv) + + + + Confirmed + Подтверждено + + + + Date + Дата + + + + Type + Тип + + + + Label + Метка + + + + Address + Адрес + + + + Amount + Количество + + + + ID + ID + + + + Error exporting + Ошибка экспорта + + + + Could not write to file %1. + Невозможно записать в файл %1. + + + + Range: + Промежуток от: + + + + to + до + + + + WalletModel + + + Sending... + Отправка.... + + + + curecoin-core + + + curecoin version + Версия + + + + Usage: + Использование: + + + + Send command to -server or curecoind + Отправить команду на -server или curecoind + + + + List commands + Список команд + + + + + Get help for a command + Получить помощь по команде + + + + Options: + Опции: + + + + Specify configuration file (default: curecoin.conf) + Указать конфигурационный файл (по умолчанию: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Указать pid-файл (по умолчанию: curecoin.pid) + + + + Generate coins + Генерировать монеты + + + + Don't generate coins + Не генерировать монеты + + + + Specify data directory + Укажите каталог данных + + + + Set database cache size in megabytes (default: 25) + Установить размер кэша базы данных в мегабайтах (по умолчанию: 25) + + + + Set database disk log size in megabytes (default: 100) + Установить размер лога базы данных в мегабайтах (по умолчанию: 100) + + + + Listen for connections on <port> (default: 7777 or testnet: 17777) + Принимать входящие подключения на <port> (по умолчанию: 7777 или 17777 в тестовой сети) + + + + Maintain at most <n> connections to peers (default: 125) + Поддерживать не более <n> подключений к узлам (по умолчанию: 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 + Привязаться (bind) к указанному адресу. Используйте запись вида [хост]:порт для IPv6 + + + + Threshold for disconnecting misbehaving peers (default: 100) + Порог для отключения неправильно ведущих себя узлов (по умолчанию: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Число секунд блокирования неправильно ведущих себя узлов (по умолчанию: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Произошла ошибка при открытии RPC-порта %u для прослушивания на IPv4: %s + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Произошла ошибка при открытии на прослушивание IPv6 RCP-порта %u, возвращаемся к IPv4: %s + + + + Detach block and address databases. Increases shutdown time (default: 0) + Отключить базы данных блоков и адресов. Увеличивает время завершения работы (по умолчанию: 0) + + + + Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat. + + + + + Listen for JSON-RPC connections on <port> (default: 8344 or testnet: 18344) + Прослушивать подключения JSON-RPC на <порту> (по умолчанию: 8344 или для testnet: 18344) + + + + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + Внимание: ошибка чтения wallet.dat! Все ключи восстановлены, но записи в адресной книге и истории транзакций могут быть некорректными. + + + + 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. + Внимание: wallet.dat был поврежден, данные восстановлены! Оригинальный wallet.dat сохранен как wallet.{timestamp}.bak в %s;, если ваши транзакции или баланс отображаются неправильно, следует восстановить его из данной копии. + + + + Accept command line and JSON-RPC commands + Принимать командную строку и команды JSON-RPC + + + + Attempt to recover private keys from a corrupt wallet.dat + Попытка восстановления ключей из поврежденного wallet.dat + + + + Importing blockchain data file. + Импортируется файл цепи блоков. + + + + Importing bootstrap blockchain data file. + Импортируется bootstrap-файл цепи блоков. + + + + 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) + Принимать подключения извне (по умолчанию: 1, если не используется -proxy или -connect) + + + + 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: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds + Ошибка: эта транзакция требует комиссию в размере как минимум %s из-за её объёма, сложности или использования недавно полученных средств + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Максимальный размер высокоприоритетных/низкокомиссионных транзакций в байтах (по умолчанию: 27000) + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Внимание: установлено очень большое значение -paytxfee. Это комиссия, которую вы заплатите при проведении транзакции. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Внимание: отображаемые транзакции могут быть некорректны! Вам или другим узлам, возможно, следует обновиться. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Внимание: убедитесь, что дата и время на Вашем компьютере выставлены верно. Если Ваши часы идут неправильно, curecoin будет работать некорректно. + + + + Block creation options: + Параметры создания блоков: + + + + Connect only to the specified node(s) + Подключаться только к указанному узлу(ам) + + + + Discover own IP address (default: 1 when listening and no -externalip) + Определить свой IP (по умолчанию: 1 при прослушивании и если не используется -externalip) + + + + Error: Transaction creation failed + Ошибка: Создание транзакции не удалось + + + + Error: Wallet locked, unable to create transaction + Ошибка: бумажник заблокирован, невозможно создать транзакцию + + + + Failed to listen on any port. Use -listen=0 if you want this. + Не удалось начать прослушивание на порту. Используйте -listen=0 если вас это устраивает. + + + + Find peers using DNS lookup (default: 0 unless -connect) + Искать узлы с помощью DNS (по умолчанию: 0) + + + + Invalid -tor address: '%s' + Неверный адрес -tor: '%s' + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Максимальный размер буфера приёма на соединение, <n>*1000 байт (по умолчанию: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Максимальный размер буфера отправки на соединение, <n>*1000 байт (по умолчанию: 1000) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Подключаться только к узлам из сети <net> (IPv4, IPv6 или Tor) + + + + Output extra debugging information. Implies all other -debug* options + Выводить больше отладочной информации. Включает все остальные опции -debug* + + + + Output extra network debugging information + Выводить дополнительную сетевую отладочную информацию + + + + Prepend debug output with timestamp + Дописывать отметки времени к отладочному выводу + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + +Параметры SSL: (см. curecoin Wiki для инструкций по настройке SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + Выберите версию SOCKS-прокси (4-5, по умолчанию: 5) + + + + Send trace/debug info to console instead of debug.log file + Выводить информацию трассировки/отладки на консоль вместо файла debug.log + + + + Send trace/debug info to debugger + Отправлять информацию трассировки/отладки в отладчик + + + + Set maximum block size in bytes (default: 250000) + Максимальный размер блока в байтах (по умолчанию: 250000) + + + + Set minimum block size in bytes (default: 0) + Минимальный размер блока в байтах (по умолчанию: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Сжимать файл debug.log при запуске клиента (по умолчанию: 1, если нет -debug) + + + + Specify connection timeout in milliseconds (default: 5000) + Таймаут соединения в миллисекундах (по умолчанию: 5000) + + + + Use UPnP to map the listening port (default: 0) + Использовать UPnP для проброса порта (по умолчанию: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Использовать UPnP для проброса порта (по умолчанию: 1, если используется прослушивание) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Использовать прокси для скрытых сервисов (по умолчанию: тот же, что и в -proxy) + + + + Username for JSON-RPC connections + Имя для подключений JSON-RPC + + + + Verifying database integrity... + + + + + Warning: Disk space is low! + Внимание: мало места на диске! + + + + Warning: This version is obsolete, upgrade required! + Внимание: эта версия устарела, требуется обновление! + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Пароль для подключений JSON-RPC + + + + Allow JSON-RPC connections from specified IP address + Разрешить подключения JSON-RPC с указанного IP + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Посылать команды узлу, запущенному на <ip> (по умолчанию: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Выполнить команду, когда появляется новый блок (%s в команде заменяется на хэш блока) + + + + Upgrade wallet to latest format + Обновить бумажник до последнего формата + + + + Set key pool size to <n> (default: 100) + Установить размер запаса ключей в <n> (по умолчанию: 100) + + + + Rescan the block chain for missing wallet transactions + Перепроверить цепь блоков на предмет отсутствующих в бумажнике транзакций + + + + How many blocks to check at startup (default: 2500, 0 = all) + Сколько блоков проверять при запуске (по умолчанию: 2500, 0 = все) + + + + How thorough the block verification is (0-6, default: 1) + Насколько тщательно проверять блоки (0-6, по умолчанию: 1) + + + + Imports blocks from external blk000?.dat file + Импортировать блоки из внешнего файла blk000?.dat + + + + Use OpenSSL (https) for JSON-RPC connections + Использовать OpenSSL (https) для подключений JSON-RPC + + + + Server certificate file (default: server.cert) + Файл серверного сертификата (по умолчанию: server.cert) + + + + Server private key (default: server.pem) + Приватный ключ сервера (по умолчанию: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Разрешённые алгоритмы (по умолчанию: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Эта справка + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Невозможно установить блокировку на рабочую директорию %s. Возможно, бумажник уже запущен. + + + + curecoin + curecoin + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + Невозможно привязаться к %s на этом компьютере (bind вернул ошибку %d, %s) + + + + Connect through socks proxy + Подключаться через socks прокси + + + + Allow DNS lookups for -addnode, -seednode and -connect + Разрешить поиск в DNS для -addnode, -seednode и -connect + + + + Loading addresses... + Загрузка адресов... + + + + Error loading blkindex.dat + Ошибка чтения blkindex.dat + + + + Error loading wallet.dat: Wallet corrupted + Ошибка загрузки wallet.dat: Бумажник поврежден + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Ошибка загрузки wallet.dat: бумажник требует более новую версию curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Необходимо перезаписать бумажник, перезапустите curecoin для завершения операции. + + + + Error loading wallet.dat + Ошибка при загрузке wallet.dat + + + + Invalid -proxy address: '%s' + Неверный адрес -proxy: '%s' + + + + Unknown network specified in -onlynet: '%s' + В параметре -onlynet указана неизвестная сеть: '%s' + + + + Unknown -socks proxy version requested: %i + В параметре -socks запрошена неизвестная версия: %i + + + + Cannot resolve -bind address: '%s' + Не удаётся разрешить адрес в параметре -bind: '%s' + + + + Cannot resolve -externalip address: '%s' + Не удаётся разрешить адрес в параметре -externalip: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Неверное количество в параметре -paytxfee=<кол-во>: '%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. curecoin is probably already running. + Невозможно привязаться к %s на этом компьютере. Возможно, curecoin уже работает. + + + + Find peers using internet relay chat (default: 1) + Найти участников через IRC (по умолчанию: 1) + + + + Fee per KB to add to transactions you send + Комиссия на килобайт, добавляемая к вашим транзакциям + + + + Loading wallet... + Загрузка бумажника... + + + + Cannot downgrade wallet + Не удаётся понизить версию бумажника + + + + Cannot initialize keypool + Не удаётся инициализировать массив ключей + + + + Cannot write default address + Не удаётся записать адрес по умолчанию + + + + Rescanning... + Сканирование... + + + + Done loading + Загрузка завершена + + + + To use the %s option + Чтобы использовать опцию %s + + + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=curecoinrpc +rpcpassword=%s +(you do not need to remember this password) +If the file does not exist, create it with owner-readable-only file permissions. + + %s, вы должны установить опцию rpcpassword в конфигурационном файле: + %s +Рекомендуется использовать следующий случайный пароль: +rpcuser=curecoinrpc +rpcpassword=%s +(вам не нужно запоминать этот пароль) +Если файл не существует, создайте его и установите права доступа только для владельца. + + + + + 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. + Вы должны установить rpcpassword=<password> в конфигурационном файле: +%s +Если файл не существует, создайте его и установите права доступа только для владельца. + + + diff --git a/src/qt/locale/curecoin_sk.qm b/src/qt/locale/curecoin_sk.qm new file mode 100644 index 0000000..e2f3f5c Binary files /dev/null and b/src/qt/locale/curecoin_sk.qm differ diff --git a/src/qt/locale/curecoin_sk.ts b/src/qt/locale/curecoin_sk.ts new file mode 100644 index 0000000..611f6c3 --- /dev/null +++ b/src/qt/locale/curecoin_sk.ts @@ -0,0 +1,2922 @@ + +UTF-8 + + AboutDialog + + + About curecoin + O curecoin + + + + <b>curecoin</b> version + <b>curecoin</b> verzia + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + AddressBookPage + + + Address Book + Adresár + + + + Double-click to edit address or label + Dvojklikom editovať adresu alebo popis + + + + Create a new address + Vytvoriť novú adresu + + + + Copy the currently selected address to the system clipboard + Kopírovať práve zvolenú adresu do systémového klipbordu + + + + &New Address + &Nová adresa + + + + These are your curecoin 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 curecoin adresy pre prijímanie platieb. Môžete dať každému odosielateľovi inú rôznu adresu a tak udržiavať prehľad o platbách. + + + + &Copy Address + &Kopírovať adresu + + + + Show &QR Code + Zobraz &QR Kód + + + + Sign a message to prove you own a curecoin address + Podpísať správu a dokázať že vlastníte túto adresu + + + + Sign &Message + Podpísať &správu + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + Exportovať tento náhľad do súboru + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &Zmazať + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Kopírovať &popis + + + + &Edit + &Upraviť + + + + Send &Coins + + + + + Export Address Book Data + Exportovať dáta z adresára + + + + Comma separated file (*.csv) + Čiarkou oddelený súbor (*.csv) + + + + Error exporting + Chyba exportu. + + + + Could not write to file %1. + Nedalo sa zapisovať do súboru %1. + + + + AddressTableModel + + + Label + Popis + + + + Address + Adresa + + + + (no label) + (bez popisu) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + Zadajte heslo + + + + New passphrase + Nové heslo + + + + Repeat new passphrase + Zopakujte nové heslo + + + + 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>. + Zadajte nové heslo k peňaženke.<br/>Prosím použite heslo s dĺžkou aspon <b>10 alebo viac náhodných znakov</b>, alebo <b>8 alebo viac slov</b>. + + + + Encrypt wallet + Zašifrovať peňaženku + + + + This operation needs your wallet passphrase to unlock the wallet. + Táto operácia potrebuje heslo k vašej peňaženke aby ju mohla dešifrovať. + + + + Unlock wallet + Odomknúť peňaženku + + + + This operation needs your wallet passphrase to decrypt the wallet. + Táto operácia potrebuje heslo k vašej peňaženke na dešifrovanie peňaženky. + + + + Decrypt wallet + Dešifrovať peňaženku + + + + Change passphrase + Zmena hesla + + + + Enter the old and new passphrase to the wallet. + Zadajte staré a nové heslo k peňaženke. + + + + Confirm wallet encryption + Potvrďte šifrovanie peňaženky + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Varovanie: Ak zašifrujete peňaženku a stratíte heslo, <b>STRATÍTE VŠETKY VAŠE curecoinY</b>!⏎ + + + + Are you sure you wish to encrypt your wallet? + Ste si istí, že si želáte zašifrovať peňaženku? + + + + 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! + Varovanie: Caps Lock je zapnutý + + + + + Wallet encrypted + Peňaženka zašifrovaná + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin sa teraz ukončí pre dokončenie procesu šifrovania. Pamätaj že šifrovanie peňaženky Ťa nemôže úplne ochrániť pred kráďežou curecoinov pomocou škodlivého software. + + + + + + + Wallet encryption failed + Šifrovanie peňaženky zlyhalo + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Šifrovanie peňaženky zlyhalo kôli internej chybe. Vaša peňaženka nebola zašifrovaná. + + + + + The supplied passphrases do not match. + Zadané heslá nesúhlasia. + + + + Wallet unlock failed + Odomykanie peňaženky zlyhalo + + + + + + The passphrase entered for the wallet decryption was incorrect. + Zadané heslo pre dešifrovanie peňaženky bolo nesprávne. + + + + Wallet decryption failed + Zlyhalo šifrovanie peňaženky. + + + + Wallet passphrase was successfully changed. + Heslo k peňaženke bolo úspešne zmenené. + + + + curecoinGUI + + + 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í + + + + Edit the list of stored addresses and labels + Editovať zoznam uložených adries a popisov + + + + Show the list of addresses for receiving payments + Zobraziť zoznam adries pre prijímanie platieb. + + + + E&xit + U&končiť + + + + Quit application + Ukončiť program + + + + Show information about curecoin + Zobraziť informácie o curecoin + + + + 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... + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + Poslať curecoins na adresu + + + + Modify configuration options for curecoin + Upraviť možnosti nastavenia pre curecoin + + + + 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... + + + + + + curecoin + + + + + Wallet + Peňaženka + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &O curecoin + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Súbor + + + + &Settings + &Nastavenia + + + + &Help + &Pomoc + + + + Tabs toolbar + Lišta záložiek + + + + + [testnet] + [testovacia sieť] + + + + curecoin client + curecoin klient + + + + %n active connection(s) to curecoin network + %n aktívne spojenie v curecoin sieti%n aktívne spojenia v curecoin sieti%n aktívnych spojení v Megaconi sieti + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Aktualizovaný + + + + Catching up... + Sťahujem... + + + + Confirm transaction fee + Potvrď poplatok za transakciu. + + + + 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 can not be parsed! This can be caused by an invalid curecoin 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + EditAddressDialog + + + Edit Address + Upraviť adresu + + + + &Label + &Popis + + + + The label associated with this address book entry + Popis priradený k tomuto záznamu v adresári + + + + &Address + &Adresa + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Adresa spojená s týmto záznamom v adresári. Možno upravovať len pre odosielajúce adresy. + + + + 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 already in the address book. + Vložená adresa "%1" sa už nachádza v adresári. + + + + The entered address "%1" is not a valid curecoin address. + Vložená adresa "%1" nieje platnou adresou curecoin. + + + + Could not unlock wallet. + Nepodarilo sa odomknúť peňaženku. + + + + New key generation failed. + Generovanie nového kľúča zlyhalo. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + + + + + version + verzia + + + + Usage: + Použitie: + + + + command-line options + + + + + UI options + UI možnosti + + + + Set language, for example "de_DE" (default: system locale) + + + + + Start minimized + Spustiť minimalizované + + + + Show splash screen on startup (default: 1) + + + + + OptionsDialog + + + Options + Možnosti + + + + &Main + &Hlavné + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Zaplatiť transakčné &poplatky + + + + Automatically start curecoin after logging in to the system. + Automaticky spustiť curecoin po zapnutí počítača + + + + &Start curecoin on system login + &Spustiť curecoin pri spustení systému správy okien + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Automaticky otvorit port pre curecoin na routeri. Toto funguje len ak router podporuje UPnP a je táto podpora aktivovaná. + + + + Map port using &UPnP + Mapovať port pomocou &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Pripojiť do siete curecoin cez SOCKS proxy (napr. keď sa pripájate cez Tor) + + + + &Connect through SOCKS proxy: + &Pripojiť cez SOCKS proxy: + + + + Proxy &IP: + + + + + IP address of the proxy (e.g. 127.0.0.1) + IP addresa proxy (napr. 127.0.0.1) + + + + &Port: + + + + + Port of the proxy (e.g. 9050) + Port proxy (napr. 9050) + + + + SOCKS &Version: + + + + + SOCKS version of the proxy (e.g. 5) + + + + + &Window + + + + + Show only a tray icon after minimizing the window. + Zobraziť len ikonu na lište po minimalizovaní okna. + + + + &Minimize to the tray instead of the taskbar + Zobraziť len ikonu na lište po minimalizovaní okna. + + + + 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. + Minimalizovat namiesto ukončenia aplikácie keď sa okno zavrie. Keď je zvolená táto možnosť, aplikácia sa zavrie len po zvolení Ukončiť v menu. + + + + M&inimize on close + M&inimalizovať pri zavretí + + + + &Display + &Displej + + + + User Interface &language: + + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + + + + + &Unit to show amounts in: + &Zobrazovať hodnoty v jednotkách: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + &Zobraziť adresy zo zoznamu transakcií + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + Varovanie + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + Forma + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + Zostatok: + + + + Unconfirmed: + Nepotvrdené: + + + + Wallet + Peňaženka + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Nedávne transakcie</b> + + + + Your current balance + Váš súčasný zostatok + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Suma transakcií ktoré ešte neboli potvrdené a nezapočítavaju sa do celkového zostatku. + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + + + + + Request Payment + Vyžiadať platbu + + + + Amount: + Suma: + + + + Label: + Popis: + + + + Message: + Správa: + + + + &Save As... + &Uložiť ako... + + + + Error encoding URI into QR Code. + Chyba v zakódovaní URI do QR kódu + + + + The entered amount is invalid, please check. + + + + + Resulting URI too long, try to reduce the text for label / message. + Výsledné URI príliš dlhé, skráť text pre názov / správu. + + + + Save QR Code + Ukladanie QR kódu + + + + PNG Images (*.png) + PNG obrázky (*.png) + + + + RPCConsole + + + Client name + Meno klienta + + + + + + + + + + + + + N/A + nie je k dispozícii + + + + Client version + Verzia klienta + + + + &Information + + + + + Using OpenSSL version + + + + + Startup time + + + + + Network + Sieť + + + + Number of connections + Počet pripojení + + + + On testnet + Na testovacej sieti + + + + Block chain + Reťazec blokov + + + + Current number of blocks + Aktuálny počet blokov + + + + Estimated total blocks + + + + + Last block time + + + + + &Open + + + + + Command-line options + + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + Poslať curecoins + + + + Send to multiple recipients at once + Poslať viacerým príjemcom naraz + + + + Add &Recipient + &Pridať príjemcu + + + + Remove all transaction fields + Odobrať všetky políčka transakcie + + + + Clear &All + Zmazať &všetko + + + + Balance: + Zostatok: + + + + 123.456 BTC + 123.456 BTC + + + + Confirm the send action + Potvrďte odoslanie + + + + S&end + &Odoslať + + + + <b>%1</b> to %2 (%3) + <b>%1</b> do %2 (%3) + + + + Confirm send coins + Potvrdiť odoslanie curecoins + + + + Are you sure you want to send %1? + Ste si istí, že chcete odoslať %1? + + + + and + a + + + + The recipient address is not valid, please recheck. + Adresa príjemcu je neplatná, prosím, overte ju. + + + + The amount to pay must be larger than 0. + Suma na úhradu musí byť väčšia ako 0. + + + + The amount exceeds your balance. + Suma je vyššia ako Váš zostatok. + + + + The total exceeds your balance when the %1 transaction fee is included. + Suma celkom prevyšuje Váš zostatok ak sú započítané %1 transakčné poplatky. + + + + 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: 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. + Chyba: Transakcia bola odmietnutá. Toto sa môže stať ak niektoré z mincí vo vašej peňaženke boli už utratené, napríklad ak používaš kópiu wallet.dat a mince označené v druhej kópií neboli označené ako utratené v tejto. + + + + SendCoinsEntry + + + Form + Forma + + + + A&mount: + Su&ma: + + + + Pay &To: + Zapla&tiť: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + 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: + + + + Choose address from address book + Zvoľte adresu z adresára + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Vložiť adresu z klipbordu + + + + Alt+P + Alt+P + + + + Remove this recipient + Odstrániť tohto príjemcu + + + + Enter a curecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Zadajte curecoin adresu (napr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + + + + + &Sign Message + &Podpísať Správu + + + + 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. + Môžete podpísať správy svojou adresou a dokázať, že ju vlastníte. Buďte opatrní a podpíšte len prehlásenia s ktorými plne súhlasíte, nakoľko útoky typu "phishing" Vás môžu lákať k ich podpísaniu. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Zadajte curecoin adresu (napr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Zvoľte adresu z adresára + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Vložte adresu z klipbordu + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Sem vložte správu ktorú chcete podpísať + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + Podpíšte správu aby ste dokázali že vlastníte túto adresu + + + + Sign &Message + + + + + Reset all sign message fields + + + + + + Clear &All + Zmazať &všetko + + + + &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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Zadajte curecoin adresu (napr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Zadajte curecoin adresu (napr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Kliknite "Podpísať Správu" na získanie podpisu + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [testovacia sieť] + + + + TransactionDesc + + + Open until %1 + Otvorené do %1 + + + + %1/offline + + + + + %1/unconfirmed + %1/nepotvrdené + + + + %1 confirmations + %1 potvrdení + + + + Status + Stav + + + + , broadcast through %n node(s) + + + + + Date + Dátum + + + + Source + + + + + Generated + + + + + + From + od + + + + + + To + + + + + + own address + + + + + label + popis + + + + + + + + Credit + Kredit + + + + matures in %n more block(s) + + + + + not accepted + neprijaté + + + + + + + Debit + Debet + + + + Transaction fee + Transakčný poplatok + + + + Net amount + Suma netto + + + + Message + Správa + + + + Comment + Komentár + + + + Transaction ID + ID transakcie + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + Transakcie + + + + Inputs + + + + + Amount + Suma + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + , ešte nebola úspešne odoslaná + + + + Open for %n more block(s) + + + + + unknown + neznámy + + + + TransactionDescDialog + + + Transaction details + Detaily transakcie + + + + This pane shows a detailed description of the transaction + Táto časť obrazovky zobrazuje detailný popis transakcie + + + + TransactionTableModel + + + Date + Dátum + + + + Type + Typ + + + + Address + Adresa + + + + Amount + Hodnota + + + + Open for %n more block(s) + + + + + Open until %1 + Otvorené do %1 + + + + Offline (%1 confirmations) + Offline (%1 potvrdení) + + + + Unconfirmed (%1 of %2 confirmations) + Nepotvrdené (%1 z %2 potvrdení) + + + + Confirmed (%1 confirmations) + Potvrdené (%1 potvrdení) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + Ten blok nebol prijatý žiadnou inou nódou a pravdepodobne nebude akceptovaný! + + + + Generated but not accepted + Vypočítané ale neakceptované + + + + Received with + Prijaté s + + + + Received from + Prijaté od: + + + + Sent to + Odoslané na + + + + Payment to yourself + Platba sebe samému + + + + Mined + Vyfárané + + + + (n/a) + (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í. + + + + Date and time that the transaction was received. + Dátum a čas prijatia transakcie. + + + + Type of transaction. + Typ transakcie. + + + + Destination address of transaction. + Cieľová adresa transakcie. + + + + Amount removed from or added to balance. + Suma pridaná alebo odobraná k zostatku. + + + + TransactionView + + + + All + Všetko + + + + Today + Dnes + + + + This week + Tento týždeň + + + + This month + Tento mesiac + + + + Last month + Minulý mesiac + + + + This year + Tento rok + + + + Range... + Rozsah... + + + + Received with + Prijaté s + + + + Sent to + Odoslané na + + + + To yourself + Samému sebe + + + + Mined + Vyfárané + + + + Other + Iné + + + + Enter address or label to search + Vložte adresu alebo popis pre vyhľadávanie + + + + Min amount + Min množstvo + + + + Copy address + Kopírovať adresu + + + + Copy label + Kopírovať popis + + + + Copy amount + Kopírovať sumu + + + + Copy transaction ID + + + + + Edit label + Editovať popis + + + + Show transaction details + + + + + Export Transaction Data + Exportovať transakčné dáta + + + + Comma separated file (*.csv) + Čiarkou oddelovaný súbor (*.csv) + + + + Confirmed + Potvrdené + + + + Date + Dátum + + + + Type + Typ + + + + Label + Popis + + + + Address + Adresa + + + + Amount + Suma + + + + ID + ID + + + + Error exporting + Chyba exportu + + + + Could not write to file %1. + Nedalo sa zapisovať do súboru %1. + + + + Range: + Rozsah: + + + + to + do + + + + WalletModel + + + Send Coins + Poslať curecoins + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + Exportovať tento náhľad do súboru + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + curecoin verzia + + + + Usage: + Použitie: + + + + Send command to -server or curecoind + Odoslať príkaz -server alebo curecoind + + + + List commands + Zoznam príkazov + + + + Get help for a command + Dostať pomoc pre príkaz + + + + Options: + Možnosti: + + + + Specify configuration file (default: curecoin.conf) + Určiť súbor s nastaveniami (predvolené: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Určiť súbor pid (predvolené: curecoind.pid) + + + + Specify data directory + Určiť priečinok s dátami + + + + Set database cache size in megabytes (default: 25) + Veľkosť vyrovnávajúcej pamäte pre databázu v megabytoch (predvolené:25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Načúvať spojeniam na <port> (prednastavené: 7951 alebo testovacia sieť: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Udržiavať maximálne <n> spojení (predvolené: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + Threshold for disconnecting misbehaving peers (default: 100) + Hranica pre odpojenie zle sa správajúcich peerov (predvolené: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Počet sekúnd kedy sa zabráni zle sa správajúcim peerom znovupripojenie (predvolené: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Počúvať JSON-RPC spojeniam na <port> (predvolené: 7950 or testnet: 17950) + + + + Accept command line and JSON-RPC commands + Prijímať príkazy z príkazového riadku a JSON-RPC + + + + Run in the background as a daemon and accept commands + Bežať na pozadí ako démon a prijímať príkazy + + + + Use the test network + Použiť testovaciu sieť + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Varovanie: -paytxfee je nastavené veľmi vysoko. Toto sú transakčné poplatky ktoré zaplatíte ak odošlete transakciu. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + Pripojiť sa len k určenej nóde + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + Neplatná adresa tor: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + + + + + Output extra debugging information. Implies all other -debug* options + Produkovať extra ladiace informácie. Implies all other -debug* options + + + + Output extra network debugging information + + + + + Prepend debug output with timestamp + Pridať na začiatok ladiaceho výstupu časový údaj + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL možnosť: (pozrite curecoin Wiki pre návod na nastavenie SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + + + + + Send trace/debug info to console instead of debug.log file + Odoslať trace/debug informácie na konzolu namiesto debug.info žurnálu + + + + Send trace/debug info to debugger + Odoslať trace/debug informácie do ladiaceho programu + + + + 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Určiť aut spojenia v milisekundách (predvolené: 5000) + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Skúsiť použiť UPnP pre mapovanie počúvajúceho portu (default: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Skúsiť použiť UPnP pre mapovanie počúvajúceho portu (default: 1 when listening) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + Užívateľské meno pre JSON-RPC spojenia + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Heslo pre JSON-rPC spojenia + + + + Allow JSON-RPC connections from specified IP address + Povoliť JSON-RPC spojenia z určenej IP adresy. + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Poslať príkaz nóde bežiacej na <ip> (predvolené: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Vykonaj príkaz, ak zmeny v najlepšom bloku (%s v príkaze nahradí blok hash) + + + + Upgrade wallet to latest format + Aktualizuj peňaženku na najnovší formát. + + + + Set key pool size to <n> (default: 100) + Nastaviť zásobu adries na <n> (predvolené: 100) + + + + Rescan the block chain for missing wallet transactions + Znovu skenovať reťaz blokov pre chýbajúce transakcie + + + + Use OpenSSL (https) for JSON-RPC connections + Použiť OpenSSL (https) pre JSON-RPC spojenia + + + + Server certificate file (default: server.cert) + Súbor s certifikátom servra (predvolené: server.cert) + + + + Server private key (default: server.pem) + Súkromný kľúč servra (predvolené: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Prijateľné šifry (predvolené: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Táto pomocná správa + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + + + + + Connect through socks proxy + Pripojenie cez socks proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Povoliť vyhľadávanie DNS pre pridanie nódy a spojenie + + + + Loading addresses... + Načítavanie adries... + + + + Error loading wallet.dat: Wallet corrupted + Chyba načítania wallet.dat: Peňaženka je poškodená + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Chyba načítania wallet.dat: Peňaženka vyžaduje novšiu verziu curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Bolo potrebné prepísať peňaženku: dokončite reštartovaním curecoin + + + + Error loading wallet.dat + Chyba načítania wallet.dat + + + + Invalid -proxy address: '%s' + Neplatná adresa proxy: '%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' + Neplatná suma pre -paytxfee=<amount>: '%s' + + + + Invalid amount + Neplatná suma + + + + Insufficient funds + Nedostatok prostriedkov + + + + Loading block index... + Načítavanie zoznamu blokov... + + + + Add a node to connect to and attempt to keep the connection open + Pridať nód na pripojenie a pokus o udržanie pripojenia otvoreného + + + + Unable to bind to %s on this computer. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + Poplatok za kB ktorý treba pridať k odoslanej transakcii + + + + Loading wallet... + Načítavam peňaženku... + + + + Cannot downgrade wallet + Nie je možné prejsť na nižšiu verziu peňaženky + + + + Cannot write default address + Nie je možné zapísať predvolenú adresu. + + + + Rescanning... + + + + + Done loading + Dokončené načítavanie + + + + To use the %s option + Použiť %s možnosť. + + + + Error + Chyba + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Musíš nastaviť rpcpassword=<heslo> v konfiguračnom súbore: +%s +Ak súbor neexistuje, vytvor ho s oprávnením pre čítanie len vlastníkom (owner-readable-only) + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_sr.qm b/src/qt/locale/curecoin_sr.qm new file mode 100644 index 0000000..e741e27 Binary files /dev/null and b/src/qt/locale/curecoin_sr.qm differ diff --git a/src/qt/locale/curecoin_sr.ts b/src/qt/locale/curecoin_sr.ts new file mode 100644 index 0000000..b8d5f31 --- /dev/null +++ b/src/qt/locale/curecoin_sr.ts @@ -0,0 +1,2919 @@ + +UTF-8 + + AboutDialog + + + About curecoin + О curecoin-у + + + + <b>curecoin</b> version + <b>curecoin</b> верзија + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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. + Ово су Ваше curecoin адресе за примање уплата. Можете да сваком пошиљаоцу дате другачију адресу да би пратили ко је вршио уплате. + + + + &Copy Address + + + + + Show &QR Code + Prikaži &QR kod + + + + Sign a message to prove you own a curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + &Избриши + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + + + + + Export Address Book Data + Извоз података из адресара + + + + Comma separated file (*.csv) + Зарезом одвојене вредности (*.csv) + + + + Error exporting + Грешка током извоза + + + + Could not write to file %1. + Није могуће писати у фајл %1. + + + + AddressTableModel + + + Label + Етикета + + + + Address + Адреса + + + + (no label) + (без етикете) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + Унесите лозинку + + + + New passphrase + Нова лозинка + + + + Repeat new passphrase + Поновите нову лозинку + + + + 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>. + Унесите нову лозинку за приступ новчанику.<br/>Молимо Вас да лозинка буде <b>10 или више насумице одабраних знакова</b>, или <b>осам или више речи</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 curecoinS</b>! + Упозорење: Ако се ваш новчаник шифрује а потом изгубите лозинкзу, ви ћете <b>ИЗГУБИТИ СВЕ curecoin-Е</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 + Новчаник је шифрован + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + curecoin će se sad zatvoriti da bi završio proces enkripcije. Zapamti da enkripcija tvog novčanika ne može u potpunosti da zaštiti tvoje curecoine da ne budu ukradeni od malawarea koji bi inficirao tvoj kompjuter. + + + + + + + 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. + Лозинка за приступ новчанику је успешно промењена. + + + + curecoinGUI + + + Sign &message... + + + + + Synchronizing with network... + Синхронизација са мрежом у току... + + + + &Overview + &Општи преглед + + + + Show general overview of wallet + Погледајте општи преглед новчаника + + + + &Transactions + &Трансакције + + + + Browse transaction history + Претражите историјат трансакција + + + + Edit the list of stored addresses and labels + Уредите запамћене адресе и њихове етикете + + + + Show the list of addresses for receiving payments + Прегледајте листу адреса на којима прихватате уплате + + + + E&xit + I&zlaz + + + + Quit application + Напустите програм + + + + Show information about curecoin + Прегледајте информације о curecoin-у + + + + About &Qt + О &Qt-у + + + + Show information about Qt + Прегледајте информације о Qt-у + + + + &Options... + П&оставке... + + + + &Encrypt Wallet... + &Шифровање новчаника... + + + + &Backup Wallet... + &Backup новчаника + + + + &Change Passphrase... + Промени &лозинку... + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + Пошаљите новац на curecoin адресу + + + + Modify configuration options for curecoin + Изаберите могућности curecoin-а + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + Мењање лозинке којом се шифрује новчаник + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + + + + + Wallet + новчаник + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &О curecoin-у + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + &Фајл + + + + &Settings + &Подешавања + + + + &Help + П&омоћ + + + + Tabs toolbar + Трака са картицама + + + + + [testnet] + [testnet] + + + + curecoin client + + + + + %n active connection(s) to curecoin network + %n активна веза са curecoin мрежом%n активне везе са curecoin мрежом%n активних веза са curecoin мрежом + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + Ажурно + + + + Catching up... + Ажурирање у току... + + + + 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 curecoin 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + 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. + Унешена адреса "%1" се већ налази у адресару. + + + + The entered address "%1" is not a valid curecoin address. + + + + + Could not unlock wallet. + Немогуће откључати новчаник. + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + + + + + version + верзија + + + + 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) + + + + + OptionsDialog + + + Options + Поставке + + + + &Main + + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + &Јединица за приказивање износа: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + Форма + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + + + + + Unconfirmed: + Непотврђено: + + + + Wallet + новчаник + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Недавне трансакције</b> + + + + Your current balance + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + + + + + Request Payment + Zatraži isplatu + + + + Amount: + Iznos: + + + + Label: + &Етикета + + + + Message: + Poruka: + + + + &Save As... + &Snimi kao... + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + Слање новца + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + Ukloni sva polja sa transakcijama + + + + Clear &All + + + + + Balance: + + + + + 123.456 MEC + + + + + Confirm the send action + Потврди акцију слања + + + + S&end + &Пошаљи + + + + <b>%1</b> to %2 (%3) + + + + + Confirm send coins + + + + + Are you sure you want to send %1? + Да ли сте сигурни да желите да пошаљете %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. + + + + + SendCoinsEntry + + + Form + Форма + + + + A&mount: + + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + &Етикета + + + + Choose address from address book + Izaberite adresu iz adresara + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Unesite curecoin adresu (n.pr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Unesite curecoin adresu (n.pr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Otvorite do %1 + + + + %1/offline + + + + + %1/unconfirmed + %1/nepotvrdjeno + + + + %1 confirmations + %1 potvrde + + + + Status + + + + + , broadcast through %n node(s) + + + + + Date + datum + + + + 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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + iznos + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + , nije još uvek uspešno emitovan + + + + Open for %n more block(s) + + + + + unknown + nepoznato + + + + TransactionDescDialog + + + Transaction details + detalji transakcije + + + + This pane shows a detailed description of the transaction + Ovaj odeljak pokazuje detaljan opis transakcije + + + + TransactionTableModel + + + Date + datum + + + + Type + tip + + + + Address + Адреса + + + + Amount + iznos + + + + Open for %n more block(s) + + + + + Open until %1 + Otvoreno do %1 + + + + Offline (%1 confirmations) + Offline * van mreže (%1 potvrdjenih) + + + + Unconfirmed (%1 of %2 confirmations) + Nepotvrdjeno (%1 of %2 potvrdjenih) + + + + Confirmed (%1 confirmations) + Potvrdjena (%1 potvrdjenih) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + This block was not received by any other nodes and will probably not be accepted! + Ovaj blok nije primljen od ostalih čvorova (nodova) i verovatno neće biti prihvaćen! + + + + Generated but not accepted + Generisan ali nije prihvaćen + + + + Received with + Primljen sa + + + + Received from + Primljeno od + + + + Sent to + Poslat ka + + + + Payment to yourself + Isplata samom sebi + + + + Mined + Minirano + + + + (n/a) + (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 + + + + Date and time that the transaction was received. + Datum i vreme primljene transakcije. + + + + Type of transaction. + Tip transakcije + + + + Destination address of transaction. + Destinacija i adresa transakcije + + + + Amount removed from or added to balance. + Iznos odbijen ili dodat balansu. + + + + TransactionView + + + + All + Sve + + + + Today + Danas + + + + This week + ove nedelje + + + + This month + Ovog meseca + + + + Last month + Prošlog meseca + + + + This year + Ove godine + + + + Range... + Opseg... + + + + Received with + Primljen sa + + + + Sent to + Poslat ka + + + + To yourself + Vama - samom sebi + + + + Mined + Minirano + + + + Other + Drugi + + + + Enter address or label to search + Navedite adresu ili naziv koji bi ste potražili + + + + Min amount + Min iznos + + + + Copy address + kopiraj adresu + + + + Copy label + kopiraj naziv + + + + Copy amount + kopiraj iznos + + + + Copy transaction ID + + + + + Edit label + promeni naziv + + + + Show transaction details + + + + + Export Transaction Data + Izvezi podatke o transakcijama + + + + Comma separated file (*.csv) + Зарезом одвојене вредности (*.csv) + + + + Confirmed + Potvrdjen + + + + Date + datum + + + + Type + tip + + + + Label + Етикета + + + + Address + Адреса + + + + Amount + iznos + + + + ID + + + + + Error exporting + Грешка током извоза + + + + Could not write to file %1. + Није могуће писати у фајл %1. + + + + Range: + Opseg: + + + + to + do + + + + WalletModel + + + Send Coins + Слање новца + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + curecoin верзија + + + + Usage: + Korišćenje: + + + + Send command to -server or curecoind + Pošalji naredbu na -server ili curecoinid + + + + + List commands + Listaj komande + + + + Get help for a command + Zatraži pomoć za komande + + + + Options: + Opcije + + + + Specify configuration file (default: curecoin.conf) + Potvrdi željeni konfiguracioni fajl (podrazumevani:curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Konkretizuj pid fajl (podrazumevani: curecoind.pid) + + + + Specify data directory + Gde je konkretni data direktorijum + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Slušaj konekcije na <port> (default: 7951 or testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Održavaj najviše <n> konekcija po priključku (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + Prihvati komandnu liniju i JSON-RPC komande + + + + Run in the background as a daemon and accept commands + Radi u pozadini kao daemon servis i prihvati komande + + + + Use the test network + Koristi testnu mrežu + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + Korisničko ime za JSON-RPC konekcije + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Lozinka za JSON-RPC konekcije + + + + Allow JSON-RPC connections from specified IP address + Dozvoli JSON-RPC konekcije sa posebne IP adrese + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Pošalji komande to nodu koji radi na <ip> (default: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + Odredi veličinu zaštićenih ključeva na <n> (default: 100) + + + + Rescan the block chain for missing wallet transactions + Ponovo skeniraj lanac blokova za nedostajuće transakcije iz novčanika + + + + Use OpenSSL (https) for JSON-RPC connections + Koristi OpenSSL (https) za JSON-RPC konekcije + + + + Server certificate file (default: server.cert) + + + + + Server private key (default: server.pem) + privatni ključ za Server (podrazumevan: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Prihvatljive cifre (podrazumevano: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Ova poruka Pomoći + + + + 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... + učitavam adrese.... + + + + Error loading wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + Invalid amount + + + + + Insufficient funds + + + + + Loading block index... + Učitavam blok indeksa... + + + + Add a node to connect to and attempt to keep the connection open + + + + + Unable to bind to %s on this computer. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + Новчаник се учитава... + + + + Cannot downgrade wallet + + + + + Cannot write default address + + + + + Rescanning... + Ponovo skeniram... + + + + Done loading + Završeno učitavanje + + + + 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/curecoin_sv.qm b/src/qt/locale/curecoin_sv.qm new file mode 100644 index 0000000..cd1c658 Binary files /dev/null and b/src/qt/locale/curecoin_sv.qm differ diff --git a/src/qt/locale/curecoin_sv.ts b/src/qt/locale/curecoin_sv.ts new file mode 100644 index 0000000..523c048 --- /dev/null +++ b/src/qt/locale/curecoin_sv.ts @@ -0,0 +1,2939 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Om curecoin + + + + <b>curecoin</b> version + <b>curecoin</b>-version + + + + +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. + +Detta är experimentell mjukvara. + + +Distribuerad under mjukvarulicensen MIT/X11, se den medföljande filen COPYING eller http://www.opensource.org/licenses/mit-license.php. + +Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användning i OpenSSL Toolkit (http://www.openssl.org/) och kryptografisk mjukvara utvecklad av Eric Young (eay@cryptsoft.com) samt UPnP-mjukvara skriven av Thomas Bernard. + + + + Copyright + Copyright + + + + Dr. Kimoto Chan + curecoin-utvecklarna + + + + AddressBookPage + + + Address Book + Adressbok + + + + Double-click to edit address or label + Dubbel-klicka för att ändra adressen eller etiketten + + + + Create a new address + Skapa ny adress + + + + Copy the currently selected address to the system clipboard + Kopiera den markerade adressen till systemets Urklipp + + + + &New Address + &Ny adress + + + + These are your curecoin 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. + Detta är dina curecoin-adresser för att ta emot betalningar. Du kan ge varje avsändare en egen adress så att du kan hålla reda på vem som betalar dig. + + + + &Copy Address + &Kopiera adress + + + + Show &QR Code + Visa &QR-kod + + + + Sign a message to prove you own a curecoin address + Signera ett meddelande för att bevisa att du äger denna adress + + + + Sign &Message + Signera &Meddelande + + + + Delete the currently selected address from the list + Ta bort den valda adressen från listan + + + + Export the data in the current tab to a file + Exportera informationen i den nuvarande fliken till en fil + + + + &Export + &Exportera + + + + Verify a message to ensure it was signed with a specified curecoin address + Verifiera meddelandet för att vara säker på att den var signerad med den specificerade curecoin-adressen + + + + &Verify Message + &Verifiera Meddelande + + + + &Delete + &Radera + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Detta är dina curecoin adresser för att skicka betalningar. Kolla alltid summan och den mottagande adressen innan du skickar curecoins. + + + + Copy &Label + Kopiera &etikett + + + + &Edit + &Editera + + + + Send &Coins + Skicka &curecoins + + + + Export Address Book Data + Exportera Adressbok + + + + Comma separated file (*.csv) + Kommaseparerad fil (*.csv) + + + + Error exporting + Fel vid export + + + + Could not write to file %1. + Kunde inte skriva till filen %1. + + + + AddressTableModel + + + Label + Etikett + + + + Address + Adress + + + + (no label) + (Ingen etikett) + + + + AskPassphraseDialog + + + Passphrase Dialog + Lösenords Dialog + + + + Enter passphrase + Ange lösenord + + + + New passphrase + Nytt lösenord + + + + Repeat new passphrase + Upprepa nytt lösenord + + + + 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>. + Ange plånbokens nya lösenord. <br/> Använd ett lösenord på <b>10 eller fler slumpmässiga tecken,</b> eller <b>åtta eller fler ord.</b> + + + + Encrypt wallet + Kryptera plånbok + + + + This operation needs your wallet passphrase to unlock the wallet. + Denna operation behöver din plånboks lösenord för att låsa upp plånboken. + + + + Unlock wallet + Lås upp plånbok + + + + This operation needs your wallet passphrase to decrypt the wallet. + Denna operation behöver din plånboks lösenord för att dekryptera plånboken. + + + + Decrypt wallet + Dekryptera plånbok + + + + Change passphrase + Ändra lösenord + + + + Enter the old and new passphrase to the wallet. + Ange plånbokens gamla och nya lösenord. + + + + Confirm wallet encryption + Bekräfta kryptering av plånbok + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + VARNING: Om du krypterar din plånbok och glömmer ditt lösenord, kommer du att <b>FÖRLORA ALLA DINA TILLGÅNGAR</b>! + + + + Are you sure you wish to encrypt your wallet? + Är du säker på att du vill kryptera din plånbok? + + + + 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. + + + + + Warning: The Caps Lock key is on! + Varning: Caps Lock är påslaget! + + + + + Wallet encrypted + Plånboken är krypterad + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + Programmet kommer nu att stänga ner för att färdigställa krypteringen. Tänk på att en krypterad plånbok inte skyddar mot stöld om din dator är infekterad med en keylogger. + + + + + + + Wallet encryption failed + Kryptering av plånbok misslyckades + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Kryptering av plånbok misslyckades på grund av ett internt fel. Din plånbok blev inte krypterad. + + + + + The supplied passphrases do not match. + De angivna lösenorden överensstämmer inte. + + + + Wallet unlock failed + Upplåsning av plånbok misslyckades + + + + + + The passphrase entered for the wallet decryption was incorrect. + Lösenordet för dekryptering av plånbok var felaktig. + + + + Wallet decryption failed + Dekryptering av plånbok misslyckades + + + + Wallet passphrase was successfully changed. + Plånbokens lösenord har ändrats. + + + + curecoinGUI + + + 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 + + + + Edit the list of stored addresses and labels + Redigera listan med lagrade adresser och etiketter + + + + Show the list of addresses for receiving payments + Visa listan med adresser för att ta emot betalningar + + + + E&xit + &Avsluta + + + + Quit application + Avsluta programmet + + + + Show information about curecoin + Visa information om curecoin + + + + 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... + + + + Importing blocks from disk... + Importerar block från disk... + + + + Reindexing blocks on disk... + Återindexerar block på disken... + + + + Send coins to a curecoin address + Skicka mynt till en curecoin-adress + + + + Modify configuration options for curecoin + Ändra konfigurationsalternativ för curecoin + + + + 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... + + + + + curecoin + curecoin + + + + Wallet + Plånbok + + + + &Send + &Skicka + + + + &Receive + &Ta emot + + + + &Addresses + &Adresser + + + + &About curecoin + &Om curecoin + + + + &Show / Hide + &Visa / Göm + + + + Show or hide the main Window + Visa eller göm huvudfönstret + + + + Encrypt the private keys that belong to your wallet + Kryptera de privata nycklar som tillhör din plånbok + + + + Sign messages with your curecoin addresses to prove you own them + Signera meddelanden med din curecoinadress för att bevisa att du äger dem + + + + Verify messages to ensure they were signed with specified curecoin addresses + Verifiera meddelanden för att vara säker på att de var signerade med den specificerade curecoin-adressen + + + + &File + &Arkiv + + + + &Settings + &Inställningar + + + + &Help + &Hjälp + + + + Tabs toolbar + Verktygsfält för Tabbar + + + + + [testnet] + [testnet] + + + + curecoin client + curecoin-klient + + + + %n active connection(s) to curecoin network + %n aktiv anslutning till curecoin-nätverket%n aktiva anslutningar till curecoin-nätverket + + + + No block source available... + Ingen block-källa tillgänglig... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Bearbetat %1 av %2 (uppskattade) block av transaktionshistorik. + + + + Processed %1 blocks of transaction history. + Bearbetat %1 block i transaktionshistoriken. + + + + %n hour(s) + %n timme%n timmar + + + + %n day(s) + %n dag%n dagar + + + + %n week(s) + %n vecka%n veckor + + + + %1 behind + %1 efter + + + + Last received block was generated %1 ago. + Senast mottagna block genererades %1 sen. + + + + Transactions after this will not yet be visible. + Transaktioner efter denna kommer inte ännu vara synliga. + + + + Error + Fel + + + + Warning + Varning + + + + Information + Information + + + + 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? + Transaktionen överskrider storleksgränsen. Du kan dock fortfarande skicka den mot en kostnad av %1, som går till noderna som behandlar din transaktion och bidrar till nätverket. Vill du betala denna avgift? + + + + Up to date + Uppdaterad + + + + Catching up... + Hämtar senaste... + + + + Confirm transaction fee + Bekräfta överföringsavgift + + + + 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 curecoin address or malformed URI parameters. + URI går inte att tolkas! Detta kan orsakas av en ogiltig curecoin-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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Ett allvarligt fel har uppstått. curecoin kan inte längre köras säkert och kommer att avslutas. + + + + ClientModel + + + Network Alert + Nätverkslarm + + + + EditAddressDialog + + + Edit Address + Redigera Adress + + + + &Label + &Etikett + + + + The label associated with this address book entry + Den etikett som är associerad med detta adressboksinlägg + + + + &Address + &Adress + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Adressen som är associerad med detta adressboksinlägg. Detta kan enbart ändras för sändande adresser. + + + + 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 already in the address book. + Den angivna adressen "%1" finns redan i adressboken. + + + + The entered address "%1" is not a valid curecoin address. + Den angivna adressen "%1" är inte en giltig curecoin-adress. + + + + Could not unlock wallet. + Plånboken kunde inte låsas upp. + + + + New key generation failed. + Misslyckades med generering av ny nyckel. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + version + + + + Usage: + Användning: + + + + command-line options + kommandoradsalternativ + + + + UI options + UI alternativ + + + + Set language, for example "de_DE" (default: system locale) + Ändra språk, till exempel "de_DE" (förvalt: systemets språk) + + + + Start minimized + Starta som minimerad + + + + Show splash screen on startup (default: 1) + Visa startbilden vid uppstart (förvalt: 1) + + + + OptionsDialog + + + Options + Alternativ + + + + &Main + &Allmänt + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Valfri transaktionsavgift per kB som ser till att dina transaktioner behandlas snabbt. De flesta transaktioner är 1 kB. + + + + Pay transaction &fee + Betala överförings&avgift + + + + Automatically start curecoin after logging in to the system. + Starta curecoin automatiskt efter inloggning. + + + + &Start curecoin on system login + &Starta curecoin vid systemstart + + + + Reset all client options to default. + Återställ alla klient inställningar till förvalen. + + + + &Reset Options + &Återställ Alternativ + + + + &Network + &Nätverk + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Öppna automatiskt curecoin-klientens port på routern. Detta fungerar endast om din router har UPnP aktiverat. + + + + Map port using &UPnP + Tilldela port med hjälp av &UPnP + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Anslut till curecoin-nätverket genom en SOCKS-proxy (t.ex. när du ansluter genom Tor). + + + + &Connect through SOCKS proxy: + &Anslut genom SOCKS-proxy: + + + + Proxy &IP: + Proxy-&IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + Proxyns IP-adress (t.ex. 127.0.0.1) + + + + &Port: + &Port: + + + + Port of the proxy (e.g. 9050) + Proxyns port (t.ex. 9050) + + + + SOCKS &Version: + SOCKS &Version: + + + + SOCKS version of the proxy (e.g. 5) + SOCKS version av proxyn (t.ex. 5) + + + + &Window + &Fönster + + + + Show only a tray icon after minimizing the window. + Visa endast en systemfältsikon vid minimering. + + + + &Minimize to the tray instead of the taskbar + &Minimera till systemfältet istället för aktivitetsfältet + + + + 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. + Minimera applikationen istället för att stänga ner den när fönstret stängs. Detta innebär att programmet fotrsätter att köras tills du väljer Avsluta i menyn. + + + + M&inimize on close + M&inimera vid stängning + + + + &Display + &Visa + + + + User Interface &language: + Användargränssnittets &språk: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Användargränssnittets språk kan ställas in här. Denna inställning träder i kraft efter en omstart av curecoin. + + + + &Unit to show amounts in: + &Måttenhet att visa belopp i: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Välj en måttenhet att visa när du skickar mynt. + + + + Whether to show curecoin addresses in the transaction list or not. + Anger om curecoin-adresser skall visas i transaktionslistan. + + + + &Display addresses in transaction list + &Visa adresser i transaktionslistan + + + + &OK + &OK + + + + &Cancel + &Avbryt + + + + &Apply + &Verkställ + + + + default + standard + + + + Confirm options reset + Bekräfta att alternativen ska återställs + + + + Some settings may require a client restart to take effect. + Vissa inställningar kan behöva en omstart av klienten för att börja gälla. + + + + Do you want to proceed? + Vill du fortsätta? + + + + + Warning + Varning + + + + + This setting will take effect after restarting curecoin. + Denna inställning träder i kraft efter en omstart av curecoin. + + + + The supplied proxy address is invalid. + Den medföljande proxy adressen är ogiltig. + + + + OverviewPage + + + Form + Formulär + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Den visade informationen kan vara inaktuell. Plånboken synkroniseras automatiskt med curecoin-nätverket efter att anslutningen är upprättad, men denna process har inte slutförts ännu. + + + + Balance: + Saldo: + + + + Unconfirmed: + Obekräftade: + + + + Wallet + Plånbok + + + + Immature: + Omogen: + + + + Mined balance that has not yet matured + Den genererade balansen som ännu inte har mognat + + + + <b>Recent transactions</b> + <b>Nyligen genomförda transaktioner</b> + + + + Your current balance + Ditt nuvarande saldo + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Totalt antal transaktioner som ännu inte bekräftats, och som ännu inte räknas med i aktuellt saldo + + + + + out of sync + osynkroniserad + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + Kan inte starta megacin: klicka-och-betala handhavare + + + + QRCodeDialog + + + QR Code Dialog + QR-kod dialogruta + + + + Request Payment + Begär Betalning + + + + Amount: + Belopp: + + + + Label: + Etikett: + + + + Message: + Meddelande: + + + + &Save As... + &Spara som... + + + + Error encoding URI into QR Code. + Fel vid skapande av QR-kod från URI. + + + + The entered amount is invalid, please check. + Det angivna beloppet är ogiltigt, vänligen kontrollera. + + + + Resulting URI too long, try to reduce the text for label / message. + URI:n är för lång, försöka minska texten för etikett / meddelande. + + + + Save QR Code + Spara QR-kod + + + + PNG Images (*.png) + PNG-bilder (*.png) + + + + RPCConsole + + + Client name + Klientnamn + + + + + + + + + + + + + N/A + ej tillgänglig + + + + Client version + Klient-version + + + + &Information + &Information + + + + Using OpenSSL version + Använder OpenSSL version + + + + Startup time + Uppstartstid + + + + Network + Nätverk + + + + Number of connections + Antalet anslutningar + + + + On testnet + På testnet + + + + Block chain + Blockkedja + + + + Current number of blocks + Aktuellt antal block + + + + Estimated total blocks + Beräknade totala block + + + + Last block time + Sista blocktid + + + + &Open + &Öppna + + + + Command-line options + Kommandoradsalternativ + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Visa curecoin-Qt hjälpmeddelande för att få en lista med möjliga curecoin kommandoradsalternativ. + + + + &Show + &Visa + + + + &Console + &Konsol + + + + Build date + Kompileringsdatum + + + + curecoin - Debug window + curecoin - Debug fönster + + + + curecoin Core + curecoin Kärna + + + + Debug log file + Debugloggfil + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Öppna curecoin debug-loggfilen som finns i datakatalogen. Detta kan ta några sekunder för stora loggfiler. + + + + Clear console + Rensa konsollen + + + + Welcome to the curecoin RPC console. + Välkommen till curecoin RPC-konsollen. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Använd upp- och ner-pilarna för att navigera i historiken, och <b>Ctrl-L</b> för att rensa skärmen. + + + + Type <b>help</b> for an overview of available commands. + Skriv <b>help</b> för en översikt av alla kommandon. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Skicka pengar + + + + Send to multiple recipients at once + Skicka till flera mottagare samtidigt + + + + Add &Recipient + Lägg till &mottagare + + + + Remove all transaction fields + Ta bort alla transaktions-fält + + + + Clear &All + Rensa &alla + + + + Balance: + Balans: + + + + 123.456 MEC + 123,456 MEC + + + + Confirm the send action + Bekräfta sändordern + + + + S&end + &Skicka + + + + <b>%1</b> to %2 (%3) + <b>%1</b> till %2 (%3) + + + + Confirm send coins + Bekräfta skickade mynt + + + + Are you sure you want to send %1? + Är du säker på att du vill skicka %1? + + + + and + och + + + + The recipient address is not valid, please recheck. + Mottagarens adress är inte giltig, vänligen kontrollera igen. + + + + The amount to pay must be larger than 0. + Det betalade beloppet måste vara större än 0. + + + + The amount exceeds your balance. + Värdet överstiger ditt saldo. + + + + The total exceeds your balance when the %1 transaction fee is included. + Totalvärdet överstiger ditt saldo när transaktionsavgiften %1 är pålagd. + + + + 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: Transaction creation failed! + Fel: Transaktionen gick inte att skapa! + + + + 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 avslogs. Detta kan hända om några av mynten i plånboken redan spenderats, t.ex om du använt en kopia av wallet.dat och mynt spenderades i kopian men inte markerats som spenderas här. + + + + SendCoinsEntry + + + Form + Formulär + + + + A&mount: + &Belopp: + + + + Pay &To: + Betala &Till: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adressen som betalningen skall skickas till (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Välj adress från adresslistan + + + + 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 + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Ange en curecoin-adress (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Signaturer - Signera / Verifiera ett Meddelande + + + + &Sign Message + &Signera Meddelande + + + + 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 signera meddelanden med dina adresser för att bevisa att du äger dem. Var försiktig med vad du signerar eftersom phising-attacker kan försöka få dig att skriva över din identitet till någon annan. Signera bara väldetaljerade påståenden du kan gå i god för. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adressen att signera meddelandet med (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Välj en adress från adressboken + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Klistra in adress från Urklipp + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Skriv in meddelandet du vill signera här + + + + Signature + Signatur + + + + Copy the current signature to the system clipboard + Kopiera signaturen till systemets Urklipp + + + + Sign the message to prove you own this curecoin address + Signera meddelandet för att bevisa att du äger denna adress + + + + Sign &Message + Signera &Meddelande + + + + Reset all sign message fields + Rensa alla fält + + + + + Clear &All + Rensa &alla + + + + &Verify Message + &Verifiera Meddelande + + + + 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. + Skriv in din adress, meddelande (se till att du kopierar radbrytningar, mellanslag, tabbar, osv. exakt) och signatur nedan för att verifiera meddelandet. Var noga med att inte läsa in mer i signaturen än vad som finns i det signerade meddelandet, för att undvika att luras av en man-in-the-middle attack. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Adressen som meddelandet var signerat med (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Verifiera meddelandet för att vara säker på att den var signerad med den angivna curecoin-adressen + + + + Verify &Message + Verifiera &Meddelande + + + + Reset all verify message fields + Rensa alla fält + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Ange en curecoin-adress (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Klicka "Signera Meddelande" för att få en signatur + + + + Enter curecoin signature + Ange curecoin-signatur + + + + + The entered address is invalid. + Den angivna adressen är ogiltig. + + + + + + + Please check the address and try again. + Vad god kontrollera adressen och försök igen. + + + + + The entered address does not refer to a key. + Den angivna adressen refererar inte till en nyckel. + + + + Wallet unlock was cancelled. + Upplåsningen av plånboken avbröts. + + + + Private key for the entered address is not available. + Privata nyckel för den angivna adressen är inte tillgänglig. + + + + Message signing failed. + Signeringen av meddelandet misslyckades. + + + + Message signed. + Meddelandet är signerat. + + + + The signature could not be decoded. + Signaturen kunde inte avkodas. + + + + + Please check the signature and try again. + Kontrollera signaturen och försök igen. + + + + The signature did not match the message digest. + Signaturen matchade inte meddelandesammanfattningen. + + + + Message verification failed. + Meddelandet verifikation misslyckades. + + + + Message verified. + Meddelandet är verifierad. + + + + SplashScreen + + + Dr. Kimoto Chan + curecoin-utvecklarna + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + Öppet till %1 + + + + %1/offline + %1/nerkopplad + + + + %1/unconfirmed + %1/obekräftade + + + + %1 confirmations + %1 bekräftelser + + + + Status + Status + + + + , broadcast through %n node(s) + , sänd genom %n nod, sänd genom %n noder + + + + Date + Datum + + + + Source + Källa + + + + Generated + Genererad + + + + + From + Från + + + + + + To + Till + + + + + own address + egen adress + + + + label + etikett + + + + + + + + Credit + Kredit + + + + matures in %n more block(s) + mognar om %n blockmognar om %n fler block + + + + not accepted + inte accepterad + + + + + + + Debit + Belasta + + + + Transaction fee + Transaktionsavgift + + + + Net amount + Nettobelopp + + + + Message + Meddelande + + + + Comment + Kommentar + + + + Transaction ID + Transaktions-ID + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Genererade mynt måste vänta 120 block innan de kan användas. När du skapade detta block sändes det till nätverket för att läggas till i blockkedjan. Om blocket inte kommer in i kedjan kommer det att ändras till "accepteras inte" och kommer ej att gå att spendera. Detta kan ibland hända om en annan nod genererar ett block nästan samtidigt som dig. + + + + Debug information + Debug information + + + + Transaction + Transaktion + + + + Inputs + Inputs + + + + Amount + Mängd + + + + true + sant + + + + false + falsk + + + + , has not been successfully broadcast yet + , har inte lyckats skickas ännu + + + + Open for %n more block(s) + Öppet för %n mer blockÖppet för %n mer block + + + + unknown + okänd + + + + TransactionDescDialog + + + Transaction details + Transaktionsdetaljer + + + + This pane shows a detailed description of the transaction + Den här panelen visar en detaljerad beskrivning av transaktionen + + + + TransactionTableModel + + + Date + Datum + + + + Type + Typ + + + + Address + Adress + + + + Amount + Mängd + + + + Open for %n more block(s) + Öppet för %n mer blockÖppet för %n mer block + + + + Open until %1 + Öppet till %1 + + + + Offline (%1 confirmations) + Offline (%1 bekräftelser) + + + + Unconfirmed (%1 of %2 confirmations) + Obekräftad (%1 av %2 bekräftelser) + + + + Confirmed (%1 confirmations) + Bekräftad (%1 bekräftelser) + + + + Mined balance will be available when it matures in %n more block(s) + Genererade balansen kommer att finnas tillgänglig när den mognar om %n mer blockGenererade balansen kommer att finnas tillgänglig när den mognar om %n fler block + + + + This block was not received by any other nodes and will probably not be accepted! + Det här blocket togs inte emot av några andra noder och kommer antagligen inte att bli godkänt. + + + + Generated but not accepted + Genererad men inte accepterad + + + + Received with + Mottagen med + + + + Received from + Mottaget från + + + + Sent to + Skickad till + + + + Payment to yourself + Betalning till dig själv + + + + Mined + Genererade + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Tidpunkt då transaktionen mottogs. + + + + Type of transaction. + Transaktionstyp. + + + + Destination address of transaction. + Transaktionens destinationsadress. + + + + Amount removed from or added to balance. + Belopp draget eller tillagt till balans. + + + + TransactionView + + + + All + Alla + + + + Today + Idag + + + + This week + Denna vecka + + + + This month + Denna månad + + + + Last month + Föregående månad + + + + This year + Det här året + + + + Range... + Period... + + + + Received with + Mottagen med + + + + Sent to + Skickad till + + + + To yourself + Till dig själv + + + + Mined + Genererade + + + + Other + Övriga + + + + Enter address or label to search + Sök efter adress eller etikett + + + + Min amount + Minsta mängd + + + + Copy address + Kopiera adress + + + + Copy label + Kopiera etikett + + + + Copy amount + Kopiera belopp + + + + Copy transaction ID + Kopiera transaktions ID + + + + Edit label + Ändra etikett + + + + Show transaction details + Visa transaktionsdetaljer + + + + Export Transaction Data + Exportera Transaktionsdata + + + + Comma separated file (*.csv) + Kommaseparerad fil (*. csv) + + + + Confirmed + Bekräftad + + + + Date + Datum + + + + Type + Typ + + + + Label + Etikett + + + + Address + Adress + + + + Amount + Mängd + + + + ID + ID + + + + Error exporting + Fel vid export + + + + Could not write to file %1. + Kunde inte skriva till filen %1. + + + + Range: + Intervall: + + + + to + till + + + + WalletModel + + + Send Coins + Skicka pengar + + + + WalletView + + + &Export + &Exportera + + + + Export the data in the current tab to a file + Exportera informationen i den nuvarande fliken till en fil + + + + Backup Wallet + Säkerhetskopiera Plånbok + + + + Wallet Data (*.dat) + Plånboks-data (*.dat) + + + + Backup Failed + Säkerhetskopiering misslyckades + + + + There was an error trying to save the wallet data to the new location. + Det inträffade ett fel när plånboken skulle sparas till den nya platsen. + + + + Backup Successful + Säkerhetskopiering lyckades + + + + The wallet data was successfully saved to the new location. + Plånbokens data har sparats till den nya platsen. + + + + curecoin-core + + + curecoin version + curecoin version + + + + Usage: + Användning: + + + + Send command to -server or curecoind + Skicka kommando till -server eller curecoind + + + + List commands + Lista kommandon + + + + Get help for a command + Få hjälp med ett kommando + + + + Options: + Inställningar: + + + + Specify configuration file (default: curecoin.conf) + Ange konfigurationsfil (förvalt: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Ange pid fil (förvalt: curecoind.pid) + + + + Specify data directory + Ange katalog för data + + + + Set database cache size in megabytes (default: 25) + Sätt databas cache storleken i megabyte (förvalt: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Lyssna efter anslutningar på <port> (förvalt: 7951 eller testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Ha som mest <n> anslutningar till andra klienter (förvalt: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Anslut till en nod för att hämta klientadresser, och koppla från + + + + Specify your own public address + Ange din egen publika adress + + + + Threshold for disconnecting misbehaving peers (default: 100) + Tröskelvärde för att koppla ifrån klienter som missköter sig (förvalt: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Antal sekunder att hindra klienter som missköter sig från att ansluta (förvalt: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + Ett fel uppstod vid upprättandet av RPC port %u för att lyssna på IPv4: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Lyssna på JSON-RPC-anslutningar på <port> (förvalt: 7950 eller testnet: 17950) + + + + Accept command line and JSON-RPC commands + Tillåt kommandon från kommandotolken och JSON-RPC-kommandon + + + + Run in the background as a daemon and accept commands + Kör i bakgrunden som tjänst och acceptera kommandon + + + + Use the test network + Använd testnätverket + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Acceptera anslutningar utifrån (förvalt: 1 om ingen -proxy eller -connect) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, du behöver sätta ett rpclösensord i konfigurationsfilen: +%s +Det är rekommenderat att använda följande slumpade lösenord: +rpcuser=curecoinrpc +rpcpassword=%s +(du behöver inte komma ihåg lösenordet) +Användarnamnet och lösenordet FÅR INTE bara detsamma. +Om filen inte existerar, skapa den med enbart ägarläsbara filrättigheter. +Det är också rekommenderat att sätta alertnotify så du meddelas om problem; +till exempel: alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + Ett fel uppstod vid upprättandet av RPC port %u för att lyssna på IPv6, faller tillbaka till IPV4: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Bind till given adress och lyssna alltid på den. Använd [värd]:port notation för IPv6 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Kan inte låsa data-mappen %s. curecoin körs förmodligen redan. + + + + 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 avslogs! Detta kan hända om några av mynten i plånboken redan spenderats, t.ex om du använt en kopia av wallet.dat och mynt spenderades i kopian men inte markerats som spenderas här. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Fel: Denna transaktion kräver en transaktionsavgift på minst %s på grund av dess storlek, komplexitet, eller användning av senast mottagna curecoins! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + Exekvera kommando när ett relevant meddelande är mottagen (%s i cmd är utbytt med ett meddelande) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Exekvera kommando när en plånbokstransaktion ändras (%s i cmd är ersatt av TxID) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Sätt den maximala storleken av hög-prioriterade/låg-avgifts transaktioner i byte (förvalt: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Detta är ett förhands testbygge - använd på egen risk - använd inte för mining eller handels applikationer + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Varning: -paytxfee är satt väldigt hög! Detta är avgiften du kommer betala för varje transaktion. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Varning: Visade transaktioner kanske inte är korrekt! Du kan behöva uppgradera, eller andra noder kan behöva uppgradera. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Varning: Vänligen kolla så att din dators datum och tid är korrekt! Om din klocka går fel kommer curecoin inte fungera korrekt. + + + + 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. + + + + 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. + Varning: wallet.dat korrupt, datan har räddats! Den ursprungliga wallet.dat har sparas som wallet.{timestamp}.bak i %s; om ditt saldo eller transaktioner är felaktiga ska du återställa från en säkerhetskopia. + + + + Attempt to recover private keys from a corrupt wallet.dat + Försök att rädda de privata nycklarna från en korrupt wallet.dat + + + + Block creation options: + Block skapande inställningar: + + + + Connect only to the specified node(s) + Koppla enbart upp till den/de specificerade noden/noder + + + + Corrupted block database detected + Korrupt blockdatabas har upptäckts + + + + Discover own IP address (default: 1 when listening and no -externalip) + Hitta egen IP-adress (förvalt: 1 under lyssning och utan -externalip) + + + + Do you want to rebuild the block database now? + Vill du bygga om blockdatabasen nu? + + + + Error initializing block database + Fel vid initiering av blockdatabasen + + + + Error initializing wallet database environment %s! + Fel vid initiering av plånbokens databasmiljö %s! + + + + Error loading block database + Fel vid inläsning av blockdatabasen + + + + Error opening block database + Fel vid öppning av blockdatabasen + + + + Error: Disk space is low! + Fel: Hårddiskutrymme är lågt! + + + + Error: Wallet locked, unable to create transaction! + Fel: Plånboken är låst, det går ej att skapa en transaktion! + + + + Error: system error: + Fel: systemfel: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Misslyckades att lyssna på någon port. Använd -listen=0 om du vill detta. + + + + Failed to read block info + Misslyckades att läsa blockinformation + + + + Failed to read block + Misslyckades att läsa blocket + + + + Failed to sync block index + Misslyckades att synkronisera blockindex + + + + Failed to write block index + Misslyckades att skriva blockindex + + + + Failed to write block info + Misslyckades att skriva blockinformation + + + + Failed to write block + Misslyckades att skriva blocket + + + + Failed to write file info + Misslyckades att skriva filinformation + + + + Failed to write to coin database + Misslyckades att skriva till myntdatabas + + + + Failed to write transaction index + Misslyckades att skriva transaktionsindex + + + + Failed to write undo data + Misslyckades att skriva ångradata + + + + Find peers using DNS lookup (default: 1 unless -connect) + Sök efter klienter med DNS sökningen (förvalt: 1 om inte -connect) + + + + Generate coins (default: 0) + Generera mynt (förvalt: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Hur många block att kontrollera vid uppstart (standardvärde: 288, 0 = alla) + + + + How thorough the block verification is (0-4, default: 3) + Hur grundlig blockverifikationen är (0-4, förvalt: 3) + + + + Not enough file descriptors available. + Inte tillräckligt med filbeskrivningar tillgängliga. + + + + Rebuild block chain index from current blk000??.dat files + Återskapa blockkedjans index från nuvarande blk000??.dat filer + + + + Set the number of threads to service RPC calls (default: 4) + Ange antalet trådar för att hantera RPC anrop (standard: 4) + + + + Verifying blocks... + Verifierar block... + + + + Verifying wallet... + Verifierar plånboken... + + + + Imports blocks from external blk000??.dat file + Importerar block från extern blk000??.dat fil + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Ange antalet skriptkontrolltrådar (upp till 16, 0 = auto, <0 = lämna så många kärnor lediga, förval: 0) + + + + Information + Information + + + + Invalid -tor address: '%s' + Ogiltig -tor adress: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + Ogiltigt belopp för -minrelaytxfee=<belopp>: '%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + Ogiltigt belopp för -mintxfee=<belopp>: '%s' + + + + Maintain a full transaction index (default: 0) + Upprätthåll ett fullständigt transaktionsindex (förval: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maximal buffert för mottagning per anslutning, <n>*1000 byte (förvalt: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maximal buffert för sändning per anslutning, <n>*1000 byte (förvalt: 5000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Acceptera bara blockkedjans matchande inbyggda kontrollpunkter (förvalt: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Anslut enbart till noder i nätverket <net> (IPv4, IPv6 eller Tor) + + + + Output extra debugging information. Implies all other -debug* options + Skriv ut extra felsökningsinformation. Gäller alla andra -debug* alternativ + + + + Output extra network debugging information + Skriv ut extra felsökningsinformation om nätverk + + + + Prepend debug output with timestamp + Skriv ut tid i felsökningsinformationen + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL-inställningar: (se curecoin-wikin för SSL-setup instruktioner) + + + + Select the version of socks proxy to use (4-5, default: 5) + Välj socks-proxy version att använda (4-5, förvalt: 5) + + + + Send trace/debug info to console instead of debug.log file + Skicka trace-/debuginformation till terminalen istället för till debug.log + + + + Send trace/debug info to debugger + Skicka trace-/debuginformation till debugger + + + + Set maximum block size in bytes (default: 250000) + Sätt maximal blockstorlek i byte (förvalt: 250000) + + + + Set minimum block size in bytes (default: 0) + Sätt minsta blockstorlek i byte (förvalt: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Krymp debug.log filen vid klient start (förvalt: 1 vid ingen -debug) + + + + Signing transaction failed + Signering av transaktion misslyckades + + + + Specify connection timeout in milliseconds (default: 5000) + Ange timeout för uppkoppling i millisekunder (förvalt: 5000) + + + + System error: + Systemfel: + + + + Transaction amount too small + Transaktions belopp för liten + + + + Transaction amounts must be positive + Transaktionens belopp måste vara positiva + + + + Transaction too large + Transaktionen är för stor + + + + Use UPnP to map the listening port (default: 0) + Använd UPnP för att mappa den lyssnande porten (förvalt: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Använd UPnP för att mappa den lyssnande porten (förvalt: 1 under lyssning) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Använd en proxy för att nå tor (förvalt: samma som -proxy) + + + + Username for JSON-RPC connections + Användarnamn för JSON-RPC-anslutningar + + + + Warning + Varning + + + + Warning: This version is obsolete, upgrade required! + Varning: denna version är föråldrad, uppgradering krävs! + + + + You need to rebuild the databases using -reindex to change -txindex + Du måste återskapa databaserna med -reindex för att ändra -txindex + + + + wallet.dat corrupt, salvage failed + wallet.dat korrupt, räddning misslyckades + + + + Password for JSON-RPC connections + Lösenord för JSON-RPC-anslutningar + + + + Allow JSON-RPC connections from specified IP address + Tillåt JSON-RPC-anslutningar från specifika IP-adresser + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Skicka kommandon till klient på <ip> (förvalt: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Exekvera kommando när det bästa blocket ändras (%s i cmd är utbytt av blockhash) + + + + Upgrade wallet to latest format + Uppgradera plånboken till senaste formatet + + + + Set key pool size to <n> (default: 100) + Sätt storleken på nyckelpoolen till <n> (förvalt: 100) + + + + Rescan the block chain for missing wallet transactions + Sök i blockkedjan efter saknade plånboks transaktioner + + + + Use OpenSSL (https) for JSON-RPC connections + Använd OpenSSL (https) för JSON-RPC-anslutningar + + + + Server certificate file (default: server.cert) + Serverns certifikatfil (förvalt: server.cert) + + + + Server private key (default: server.pem) + Serverns privata nyckel (förvalt: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Accepterade krypteringsalgoritmer (förvalt: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Det här hjälp medelandet + + + + 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) + + + + Connect through socks proxy + Anslut genom socks-proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Tillåt DNS-sökningar för -addnode, -seednode och -connect + + + + Loading addresses... + Laddar adresser... + + + + Error loading wallet.dat: Wallet corrupted + Fel vid inläsningen av wallet.dat: Plånboken är skadad + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Fel vid inläsningen av wallet.dat: Plånboken kräver en senare version av curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + Plånboken behöver skrivas om: Starta om curecoin för att färdigställa + + + + Error loading wallet.dat + Fel vid inläsning av plånboksfilen wallet.dat + + + + Invalid -proxy address: '%s' + Ogiltig -proxy adress: '%s' + + + + Unknown network specified in -onlynet: '%s' + Okänt nätverk som anges i -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Okänd -socks proxy version begärd: %i + + + + Cannot resolve -bind address: '%s' + Kan inte matcha -bind adress: '%s' + + + + Cannot resolve -externalip address: '%s' + Kan inte matcha -externalip adress: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Ogiltigt belopp för -paytxfee=<belopp>:'%s' + + + + Invalid amount + Ogiltig mängd + + + + Insufficient funds + Otillräckligt med curecoins + + + + Loading block index... + Laddar blockindex... + + + + Add a node to connect to and attempt to keep the connection open + 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. curecoin is probably already running. + Det går inte att binda till %s på den här datorn. curecoin är förmodligen redan igång. + + + + Fee per KB to add to transactions you send + Avgift per KB att lägga till på transaktioner du skickar + + + + Loading wallet... + Laddar plånbok... + + + + Cannot downgrade wallet + Kan inte nedgradera plånboken + + + + Cannot write default address + Kan inte skriva standardadress + + + + Rescanning... + Söker igen... + + + + Done loading + Klar med laddning + + + + To use the %s option + Att använda %s alternativet + + + + Error + Fel + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + Du behöver välja ett rpclösensord i konfigurationsfilen: +%s +Om filen inte existerar, skapa den med filrättigheten endast läsbar för ägaren. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_th_TH.qm b/src/qt/locale/curecoin_th_TH.qm new file mode 100644 index 0000000..cc4aeb6 Binary files /dev/null and b/src/qt/locale/curecoin_th_TH.qm differ diff --git a/src/qt/locale/curecoin_th_TH.ts b/src/qt/locale/curecoin_th_TH.ts new file mode 100644 index 0000000..ac5ccad --- /dev/null +++ b/src/qt/locale/curecoin_th_TH.ts @@ -0,0 +1,2917 @@ + +UTF-8 + + AboutDialog + + + About curecoin + เกี่ยวกับ บิตคอย์น + + + + <b>curecoin</b> version + <b>บิตคอย์น<b>รุ่น + + + + +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. + + + + + Copyright + + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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 curecoin address + + + + + Sign &Message + + + + + Delete the currently selected address from the list + + + + + Export the data in the current tab to a file + + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + + + + + &Verify Message + + + + + &Delete + ลบ + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + + + + + &Edit + + + + + Send &Coins + + + + + Export Address Book Data + ส่งออกรายชื่อทั้งหมด + + + + Comma separated file (*.csv) + + + + + Error exporting + ส่งออกผิดพลาด + + + + Could not write to file %1. + ไม่สามารถเขียนไปยังไฟล์ %1 + + + + AddressTableModel + + + Label + ชื่อ + + + + Address + ที่อยู่ + + + + (no label) + (ไม่มีชื่อ) + + + + AskPassphraseDialog + + + Passphrase Dialog + + + + + Enter passphrase + ใส่รหัสผ่าน + + + + New passphrase + รหัสผา่นใหม่ + + + + Repeat new passphrase + กรุณากรอกรหัสผ่านใหม่อีกครั้งหนึ่ง + + + + 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 curecoinS</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 + กระเป๋าสตางค์ถูกเข้ารหัสเรียบร้อยแล้ว + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + + + + + curecoinGUI + + + Sign &message... + + + + + Synchronizing with network... + + + + + &Overview + + + + + Show general overview of wallet + + + + + &Transactions + + + + + Browse transaction history + + + + + Edit the list of stored addresses and labels + + + + + Show the list of addresses for receiving payments + + + + + E&xit + + + + + Quit application + + + + + Show information about curecoin + + + + + About &Qt + + + + + Show information about Qt + + + + + &Options... + + + + + &Encrypt Wallet... + + + + + &Backup Wallet... + + + + + &Change Passphrase... + + + + + Importing blocks from disk... + + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + + + + + Modify configuration options for curecoin + + + + + Backup wallet to another location + + + + + Change the passphrase used for wallet encryption + + + + + &Debug window + + + + + Open debugging and diagnostic console + + + + + &Verify message... + + + + + + curecoin + + + + + Wallet + + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + + + + + &Show / Hide + + + + + Show or hide the main Window + + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + + + + + Verify messages to ensure they were signed with specified curecoin addresses + + + + + &File + + + + + &Settings + + + + + &Help + + + + + Tabs toolbar + + + + + + [testnet] + + + + + curecoin client + + + + + %n active connection(s) to curecoin network + + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + + + + + Warning + + + + + Information + + + + + 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? + + + + + Up to date + + + + + Catching up... + + + + + 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 curecoin 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> + + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + + + + + 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 curecoin address. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + GUIUtil::HelpMessageBox + + + + curecoin-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. + + + + + Pay transaction &fee + + + + + Automatically start curecoin after logging in to the system. + + + + + &Start curecoin on system login + + + + + Reset all client options to default. + + + + + &Reset Options + + + + + &Network + + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + + + + + Map port using &UPnP + + + + + Connect to the curecoin 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 curecoin. + + + + + &Unit to show amounts in: + + + + + Choose the default subdivision unit to show in the interface and when sending coins. + + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + + + + + &OK + + + + + &Cancel + + + + + &Apply + + + + + default + + + + + Confirm options reset + + + + + Some settings may require a client restart to take effect. + + + + + Do you want to proceed? + + + + + + Warning + + + + + + This setting will take effect after restarting curecoin. + + + + + The supplied proxy address is invalid. + + + + + OverviewPage + + + Form + + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + + + + + Balance: + + + + + Unconfirmed: + + + + + Wallet + + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + + + + + Your current balance + + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + + + + + + out of sync + + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + + + + + &Show + + + + + &Console + + + + + Build date + + + + + curecoin - Debug window + + + + + curecoin Core + + + + + Debug log file + + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + + + + + Welcome to the curecoin 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 + + + + + Send to multiple recipients at once + + + + + Add &Recipient + + + + + Remove all transaction fields + + + + + Clear &All + + + + + Balance: + + + + + 123.456 MEC + + + + + Confirm the send action + + + + + S&end + + + + + <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. + + + + + SendCoinsEntry + + + Form + + + + + A&mount: + + + + + Pay &To: + + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + + + + + &Label: + + + + + Choose address from address book + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Remove this recipient + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Choose an address from the address book + + + + + + Alt+A + + + + + Paste address from clipboard + + + + + Alt+P + + + + + Enter the message you want to sign here + + + + + Signature + + + + + Copy the current signature to the system clipboard + + + + + Sign the message to prove you own this curecoin address + + + + + Sign &Message + + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Verify the message to ensure it was signed with the specified curecoin address + + + + + Verify &Message + + + + + Reset all verify message fields + + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Click "Sign Message" to generate signature + + + + + Enter curecoin 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. + + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + + + + + TransactionDesc + + + Open until %1 + + + + + %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 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + + + + + Open for %n more block(s) + + + + + unknown + + + + + TransactionDescDialog + + + Transaction details + + + + + This pane shows a detailed description of the transaction + + + + + TransactionTableModel + + + Date + + + + + Type + + + + + Address + ที่อยู่ + + + + Amount + + + + + Open for %n more block(s) + + + + + Open until %1 + + + + + Offline (%1 confirmations) + + + + + Unconfirmed (%1 of %2 confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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. + ไม่สามารถเขียนไปยังไฟล์ %1 + + + + Range: + + + + + to + + + + + WalletModel + + + Send Coins + + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + + + + + Backup Successful + + + + + The wallet data was successfully saved to the new location. + + + + + curecoin-core + + + curecoin version + + + + + Usage: + + + + + Send command to -server or curecoind + + + + + List commands + + + + + Get help for a command + + + + + Options: + + + + + Specify configuration file (default: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + + + + + Specify data directory + + + + + Set database cache size in megabytes (default: 25) + + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + + + + + Maintain at most <n> connections to peers (default: 125) + + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + 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 + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + + + + + Accept command line and JSON-RPC commands + + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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) + + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + + + + + Error opening block database + + + + + Error: Disk space is low! + + + + + Error: Wallet locked, unable to create transaction! + + + + + Error: system error: + + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + + + + + Invalid -tor address: '%s' + + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + 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 curecoin 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) + + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + + + + + System error: + + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + 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 + + + + + Warning + + + + + Warning: This version is obsolete, upgrade required! + + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + + + + + 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) + + + + + Upgrade wallet to latest format + + + + + Set key pool size to <n> (default: 100) + + + + + Rescan the block chain for missing wallet transactions + + + + + 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) + + + + + This help message + + + + + 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 wallet.dat: Wallet corrupted + + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + + + + + Wallet needed to be rewritten: restart curecoin 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' + + + + + 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. curecoin is probably already running. + + + + + Fee per KB to add to transactions you send + + + + + Loading wallet... + + + + + Cannot downgrade wallet + + + + + 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/curecoin_tr.qm b/src/qt/locale/curecoin_tr.qm new file mode 100644 index 0000000..2619d41 Binary files /dev/null and b/src/qt/locale/curecoin_tr.qm differ diff --git a/src/qt/locale/curecoin_tr.ts b/src/qt/locale/curecoin_tr.ts new file mode 100644 index 0000000..1cc5586 --- /dev/null +++ b/src/qt/locale/curecoin_tr.ts @@ -0,0 +1,2938 @@ + +UTF-8 + + AboutDialog + + + About curecoin + curecoin hakkında + + + + <b>curecoin</b> version + <b>curecoin</b> sürüm + + + + +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. + + Bu yazılım deneme safhasındadır. + + MIT/X11 yazılım lisansı kapsamında yayınlanmıştır, COPYING dosyasına ya da http://www.opensource.org/licenses/mit-license.php sayfasına bakınız. + + Bu ürün OpenSSL projesi tarafından OpenSSL araç takımı (http://www.openssl.org/) için geliştirilen yazılımlar, Eric Young (eay@cryptsoft.com) tarafından hazırlanmış şifreleme yazılımları ve Thomas Bernard tarafından programlanmış UPnP yazılımı içerir. + + + + Copyright + Telif hakkı + + + + Dr. Kimoto Chan + curecoin geliştiricileri + + + + AddressBookPage + + + Address Book + Adres defteri + + + + 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 + + + + Copy the currently selected address to the system clipboard + Şu anda seçili olan adresi panoya kopyala + + + + &New Address + &Yeni adres + + + + These are your curecoin 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 curecoin adresleridir. Kimin ödeme yaptığını izleyebilmek için her ödeme yollaması gereken kişiye değişik bir adres verebilirsiniz. + + + + &Copy Address + Adresi &kopyala + + + + Show &QR Code + &QR kodunu göster + + + + Sign a message to prove you own a curecoin address + Bir curecoin adresinin sizin olduğunu ispatlamak için mesaj imzalayın + + + + Sign &Message + &Mesaj imzala + + + + Delete the currently selected address from the list + Seçili adresi listeden sil + + + + Export the data in the current tab to a file + Güncel sekmedeki verileri bir dosyaya aktar + + + + &Export + &Dışa aktar + + + + Verify a message to ensure it was signed with a specified curecoin address + Belirtilen curecoin adresi ile imzalandığını doğrulamak için bir mesajı kontrol et + + + + &Verify Message + Mesaj &kontrol et + + + + &Delete + &Sil + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Bunlar ödeme yapmak için kullanacağınız curecoin adreslerinizdir. curecoin yollamadan önce meblağı ve alıcı adresini daima kontrol ediniz. + + + + Copy &Label + &Etiketi kopyala + + + + &Edit + &Düzenle + + + + Send &Coins + Mega&coin Gönder + + + + Export Address Book Data + Adres defteri verilerini dışa aktar + + + + Comma separated file (*.csv) + Virgülle ayrılmış değerler dosyası (*.csv) + + + + Error exporting + Dışa aktarımda hata oluştu + + + + Could not write to file %1. + %1 dosyasına yazılamadı. + + + + AddressTableModel + + + Label + Etiket + + + + Address + Adres + + + + (no label) + (boş etiket) + + + + AskPassphraseDialog + + + Passphrase Dialog + Parola diyaloğu + + + + Enter passphrase + Parolayı giriniz + + + + New passphrase + Yeni parola + + + + Repeat new passphrase + Yeni parolayı tekrarlayınız + + + + 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>. + Cüzdanınız için yeni parolayı giriniz.<br/>Lütfen <b>10 ya da daha fazla rastgele karakter</b> veya <b>sekiz ya da daha fazla kelime</b> içeren bir parola seçiniz. + + + + Encrypt wallet + Cüzdanı şifrele + + + + This operation needs your wallet passphrase to unlock the wallet. + Bu işlem cüzdan kilidini açmak için cüzdan parolanızı gerektirir. + + + + Unlock wallet + Cüzdan kilidini aç + + + + This operation needs your wallet passphrase to decrypt the wallet. + Bu işlem, cüzdan şifresini açmak için cüzdan parolasını gerektirir. + + + + Decrypt wallet + Cüzdan şifresini aç + + + + Change passphrase + Parolayı değiştir + + + + Enter the old and new passphrase to the wallet. + Cüzdan için eski ve yeni parolaları giriniz. + + + + Confirm wallet encryption + Cüzdan şifrelenmesini teyit eder + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR curecoinS</b>! + Uyarı: Eğer cüzdanınızı şifrelerseniz ve parolanızı kaybederseniz, <b>TÜM curecoinLERİNİZİ KAYBEDERSİNİZ</b>! + + + + Are you sure you wish to encrypt your wallet? + Cüzdanınızı şifrelemek istediğinizden emin misiniz? + + + + 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 gerekir. Güvenlik nedenleriyle yeni, şifrelenmiş cüzdanı kullanmaya başladığınızda eski şifrelenmemiş cüzdan dosyaları işe yaramaz hale gelecektir. + + + + + Warning: The Caps Lock key is on! + Uyarı: Caps Lock tuşu faal durumda! + + + + + Wallet encrypted + Cüzdan şifrelendi + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins from being stolen by malware infecting your computer. + Şifreleme işlemini tamamlamak için curecoin şimdi kapanacaktır. Cüzdanınızı şifrelemenin, curecoinlerinizin bilgisayara bulaşan kötücül bir yazılım tarafından çalınmaya karşı tamamen koruyamayacağını unutmayınız. + + + + + + + Wallet encryption failed + Cüzdan şifrelemesi başarısız oldu + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Dahili bir hata sebebiyle cüzdan şifrelemesi başarısız oldu. Cüzdanınız şifrelenmedi. + + + + + The supplied passphrases do not match. + Girilen parolalar birbirleriyle uyumlu değil. + + + + Wallet unlock failed + Cüzdan kilidinin açılması başarısız oldu + + + + + + The passphrase entered for the wallet decryption was incorrect. + Cüzdan şifresinin açılması için girilen parola yanlıştı. + + + + Wallet decryption failed + Cüzdan şifresinin açılması başarısız oldu + + + + Wallet passphrase was successfully changed. + Cüzdan parolası başarılı bir şekilde değiştirildi. + + + + curecoinGUI + + + Sign &message... + &Mesaj imzala... + + + + Synchronizing with network... + Şebeke ile senkronizasyon... + + + + &Overview + &Genel bakış + + + + Show general overview of wallet + Cüzdana genel bakışı göster + + + + &Transactions + &Muameleler + + + + Browse transaction history + Muamele tarihçesini tara + + + + Edit the list of stored addresses and labels + Saklanan adres ve etiket listesini düzenle + + + + Show the list of addresses for receiving payments + Ödeme alma adreslerinin listesini göster + + + + E&xit + &Çık + + + + Quit application + Uygulamadan çık + + + + Show information about curecoin + curecoin hakkında bilgi göster + + + + About &Qt + &Qt hakkında + + + + Show information about Qt + Qt hakkında bilgi görüntü + + + + &Options... + &Seçenekler... + + + + &Encrypt Wallet... + Cüzdanı &şifrele... + + + + &Backup Wallet... + Cüzdanı &yedekle... + + + + &Change Passphrase... + Parolayı &değiştir... + + + + Importing blocks from disk... + Bloklar diskten içe aktarılıyor... + + + + Reindexing blocks on disk... + Diskteki bloklar yeniden endeksleniyor... + + + + Send coins to a curecoin address + Bir curecoin adresine curecoin yolla + + + + Modify configuration options for curecoin + curecoin seçeneklerinin yapılandırmasını değiştir + + + + Backup wallet to another location + Cüzdanı diğer bir konumda 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 &kontrol et... + + + + + curecoin + curecoin + + + + Wallet + Cüzdan + + + + &Send + &Gönder + + + + &Receive + &Al + + + + &Addresses + &Adresler + + + + &About curecoin + curecoin &Hakkında + + + + &Show / Hide + &Göster / Sakla + + + + Show or hide the main Window + Ana pencereyi görüntüle ya da sakla + + + + Encrypt the private keys that belong to your wallet + Cüzdanınızın özel anahtarlarını şifrele + + + + Sign messages with your curecoin addresses to prove you own them + Mesajları adreslerin size ait olduğunu ispatlamak için curecoin adresleri ile imzala + + + + Verify messages to ensure they were signed with specified curecoin addresses + Belirtilen curecoin adresleri ile imzalandıklarından emin olmak için mesajları kontrol et + + + + &File + &Dosya + + + + &Settings + &Ayarlar + + + + &Help + &Yardım + + + + Tabs toolbar + Sekme araç çubuğu + + + + + [testnet] + [testnet] + + + + curecoin client + curecoin istemcisi + + + + %n active connection(s) to curecoin network + curecoin şebekesine %n faal bağlantıcurecoin şebekesine %n faal bağlantı + + + + No block source available... + Hiçbir blok kaynağı mevcut değil... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + Muamele tarihçesinin toplam (tahmini) %2 blokundan %1 blok işlendi. + + + + Processed %1 blocks of transaction history. + Muamele tarihçesinde %1 blok işlendi. + + + + %n hour(s) + %n saat%n saat + + + + %n day(s) + %n gün%n gün + + + + %n week(s) + %n hafta%n hafta + + + + %1 behind + %1 geride + + + + Last received block was generated %1 ago. + Son alınan blok %1 evvel oluşturulmuştu. + + + + Transactions after this will not yet be visible. + Bundan sonraki muameleler henüz görüntülenemez. + + + + Error + Hata + + + + Warning + Uyarı + + + + Information + Bilgi + + + + 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 muamele boyut sınırlarını aşmıştır. Gene de %1 ücret ödeyerek gönderebilirsiniz, ki bu ücret muamelenizi işleyen ve şebekeye yardım eden düğümlere ödenecektir. Ücreti ödemek istiyor musunuz? + + + + Up to date + Güncel + + + + Catching up... + Aralık kapatılıyor... + + + + Confirm transaction fee + Muamele ücretini teyit et + + + + Sent transaction + Muamele yollandı + + + + Incoming transaction + Gelen muamele + + + + Date: %1 +Amount: %2 +Type: %3 +Address: %4 + + Tarih: %1 +Miktar: %2 +Tür: %3 +Adres: %4 + + + + + + URI handling + URI yönetimi + + + + + URI can not be parsed! This can be caused by an invalid curecoin address or malformed URI parameters. + URI okunamadı! Sebebi geçersiz bir curecoin adresi veya hatalı URI parametreleri 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + Ciddi bir hata oluştu. curecoin artık güvenli bir şekilde işlemeye devam edemez ve kapanacaktır. + + + + ClientModel + + + Network Alert + Şebeke hakkında uyarı + + + + EditAddressDialog + + + Edit Address + Adresi düzenle + + + + &Label + &Etiket + + + + The label associated with this address book entry + Bu adres defteri unsuru ile ilişkili etiket + + + + &Address + &Adres + + + + The address associated with this address book entry. This can only be modified for sending addresses. + Bu adres defteri unsuru ile ilişkili adres. Bu, sadece gönderi adresi için değiştirilebilir. + + + + 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 already in the address book. + Girilen "%1" adresi hâlihazırda adres defterinde mevcuttur. + + + + The entered address "%1" is not a valid curecoin address. + Girilen "%1" adresi geçerli bir curecoin adresi değildir. + + + + Could not unlock wallet. + Cüzdan kilidi açılamadı. + + + + New key generation failed. + Yeni anahtar oluşturulması başarısız oldu. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + sürüm + + + + Usage: + Kullanım: + + + + command-line options + komut satırı seçenekleri + + + + UI options + Kullanıcı arayüzü seçenekleri + + + + Set language, for example "de_DE" (default: system locale) + Lisan belirt, mesela "de_De" (varsayılan: sistem dili) + + + + Start minimized + Küçültülmüş olarak başlat + + + + Show splash screen on startup (default: 1) + Başlatıldığında başlangıç ekranını göster (varsayılan: 1) + + + + OptionsDialog + + + Options + Seçenekler + + + + &Main + &Esas ayarlar + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + Muamelelerin hızlı işlenmesini garantilemeye yardım eden, seçime dayalı kB başı muamele ücreti. Muamelelerin çoğunluğunun boyutu 1 kB'dir. + + + + Pay transaction &fee + Muamele ücreti &öde + + + + Automatically start curecoin after logging in to the system. + Sistemde oturum açıldığında curecoin'i otomatik olarak başlat. + + + + &Start curecoin on system login + curecoin'i sistem oturumuyla &başlat + + + + Reset all client options to default. + İstemcinin tüm seçeneklerini varsayılan değerlere geri al. + + + + &Reset Options + Seçenekleri &sıfırla + + + + &Network + &Şebeke + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + Yönlendiricide curecoin istemci portlarını otomatik olarak açar. Bu, sadece yönlendiricinizin UPnP desteği bulunuyorsa ve etkinse çalışabilir. + + + + Map port using &UPnP + Portları &UPnP kullanarak haritala + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + curecoin şebekesine SOCKS vekil sunucusu vasıtasıyla bağlan (mesela Tor ile bağlanıldığında). + + + + &Connect through SOCKS proxy: + SOCKS vekil sunucusu vasıtasıyla ba&ğlan: + + + + Proxy &IP: + Vekil &İP: + + + + IP address of the proxy (e.g. 127.0.0.1) + Vekil sunucunun İP adresi (mesela 127.0.0.1) + + + + &Port: + &Port: + + + + Port of the proxy (e.g. 9050) + Vekil sunucunun portu (mesela 9050) + + + + SOCKS &Version: + SOCKS &sürümü: + + + + SOCKS version of the proxy (e.g. 5) + Vekil sunucunun SOCKS sürümü (mesela 5) + + + + &Window + &Pencere + + + + Show only a tray icon after minimizing the window. + Küçültüldükten sonra sadece çekmece ikonu göster. + + + + &Minimize to the tray instead of the taskbar + İşlem çubuğu yerine sistem çekmecesine &küçült + + + + 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. + Pencere kapatıldığında uygulamadan çıkmak yerine uygulamayı küçültür. Bu seçenek etkinleştirildiğinde, uygulama sadece menüden çıkış seçildiğinde kapanacaktır. + + + + M&inimize on close + Kapatma sırasında k&üçült + + + + &Display + &Görünüm + + + + User Interface &language: + Kullanıcı arayüzü &lisanı: + + + + The user interface language can be set here. This setting will take effect after restarting curecoin. + Kullanıcı arayüzünün dili burada belirtilebilir. Bu ayar curecoin tekrar başlatıldığında etkinleşecektir. + + + + &Unit to show amounts in: + Miktarı göstermek için &birim: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + curecoin gönderildiğinde arayüzde gösterilecek varsayılan alt birimi seçiniz. + + + + Whether to show curecoin addresses in the transaction list or not. + Muamele listesinde curecoin adreslerinin gösterilip gösterilmeyeceklerini belirler. + + + + &Display addresses in transaction list + Muamele listesinde adresleri &göster + + + + &OK + &Tamam + + + + &Cancel + &İptal + + + + &Apply + &Uygula + + + + default + varsayılan + + + + Confirm options reset + Seçeneklerin sıfırlanmasını teyit et + + + + Some settings may require a client restart to take effect. + Bazı ayarların dikkate alınması istemcinin tekrar başlatılmasını gerektirebilir. + + + + Do you want to proceed? + Devam etmek istiyor musunuz? + + + + + Warning + Uyarı + + + + + This setting will take effect after restarting curecoin. + Bu ayarlar curecoin tekrar başlatıldığında etkinleşecektir. + + + + The supplied proxy address is invalid. + Girilen vekil sunucu adresi geçersizdir. + + + + OverviewPage + + + Form + Form + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Görüntülenen veriler zaman aşımına uğramış olabilir. Bağlantı kurulduğunda cüzdanınız otomatik olarak şebeke ile eşleşir ancak bu işlem henüz tamamlanmamıştır. + + + + Balance: + Bakiye: + + + + Unconfirmed: + Doğrulanmamış: + + + + Wallet + Cüzdan + + + + Immature: + Olgunlaşmamış: + + + + Mined balance that has not yet matured + Oluşturulan bakiye henüz olgunlaşmamıştır + + + + <b>Recent transactions</b> + <b>Son muameleler</b> + + + + Your current balance + Güncel bakiyeniz + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Doğrulanması beklenen ve henüz güncel bakiyeye ilâve edilmemiş muamelelerin toplamı + + + + + out of sync + eşleşme dışı + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + curecoin başlatılamadı: tıkla-ve-öde yöneticisi + + + + QRCodeDialog + + + QR Code Dialog + QR kodu diyaloğu + + + + Request Payment + Ödeme talebi + + + + Amount: + Miktar: + + + + Label: + Etiket: + + + + Message: + Mesaj: + + + + &Save As... + &Farklı kaydet... + + + + Error encoding URI into QR Code. + URI'nin QR koduna kodlanmasında hata oluştu. + + + + The entered amount is invalid, please check. + Girilen miktar geçersizdir, kontrol ediniz. + + + + Resulting URI too long, try to reduce the text for label / message. + Sonuç URI çok uzun, etiket ya da mesaj metnini kısaltmayı deneyiniz. + + + + Save QR Code + QR kodu kaydet + + + + PNG Images (*.png) + PNG resimleri (*.png) + + + + RPCConsole + + + Client name + İstemci ismi + + + + + + + + + + + + + N/A + Mevcut değil + + + + Client version + İstemci sürümü + + + + &Information + &Malumat + + + + Using OpenSSL version + Kullanılan OpenSSL sürümü + + + + Startup time + Başlama zamanı + + + + Network + Şebeke + + + + Number of connections + Bağlantı sayısı + + + + On testnet + Testnet üzerinde + + + + Block chain + Blok zinciri + + + + Current number of blocks + Güncel blok sayısı + + + + Estimated total blocks + Tahmini toplam blok sayısı + + + + Last block time + Son blok zamanı + + + + &Open + &Aç + + + + Command-line options + Komut satırı seçenekleri + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + Mevcut curecoin komut satırı seçeneklerinin listesini içeren curecoin-Qt yardımını göster. + + + + &Show + &Göster + + + + &Console + &Konsol + + + + Build date + Derleme tarihi + + + + curecoin - Debug window + curecoin - Hata ayıklama penceresi + + + + curecoin Core + curecoin Çekirdeği + + + + Debug log file + Hata ayıklama kütük dosyası + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + Güncel veri klasöründen curecoin hata ayıklama kütük dosyasını açar. Büyük kütük dosyaları için bu birkaç saniye alabilir. + + + + Clear console + Konsolu temizle + + + + Welcome to the curecoin RPC console. + curecoin RPC konsoluna hoş geldiniz. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Tarihçede gezinmek için imleç tuşlarını kullanınız, <b>Ctrl-L</b> ile de ekranı temizleyebilirsiniz. + + + + Type <b>help</b> for an overview of available commands. + Mevcut komutların listesi için <b>help</b> yazınız. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + curecoin yolla + + + + Send to multiple recipients at once + Birçok alıcıya aynı anda gönder + + + + Add &Recipient + &Alıcı ekle + + + + Remove all transaction fields + Bütün muamele alanlarını kaldır + + + + Clear &All + Tümünü &temizle + + + + Balance: + Bakiye: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Yollama etkinliğini teyit ediniz + + + + S&end + G&önder + + + + <b>%1</b> to %2 (%3) + <b>%1</b> şu adrese: %2 (%3) + + + + Confirm send coins + Gönderiyi teyit ediniz + + + + Are you sure you want to send %1? + %1 göndermek istediğinizden emin misiniz? + + + + and + ve + + + + The recipient address is not valid, please recheck. + Alıcı adresi geçerli değildir, lütfen denetleyiniz. + + + + The amount to pay must be larger than 0. + Ödeyeceğiniz tutarın sıfırdan yüksek olması gerekir. + + + + The amount exceeds your balance. + Tutar bakiyenizden yüksektir. + + + + The total exceeds your balance when the %1 transaction fee is included. + Toplam, %1 muamele ücreti ilâve edildiğinde bakiyenizi geçmektedir. + + + + 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: Transaction creation failed! + Hata: Muamele oluşturması başarısız oldu! + + + + 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. + Hata: Muamele reddedildi. Cüzdanınızdaki madenî paraların bazıları zaten harcanmış olduğunda bu meydana gelebilir. Örneğin wallet.dat dosyasının bir kopyasını kullandıysanız ve kopyada para harcandığında ancak burada harcandığı işaretlenmediğinde. + + + + SendCoinsEntry + + + Form + Form + + + + A&mount: + M&iktar: + + + + Pay &To: + &Şu kişiye öde: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Ödemenin gönderileceği adres (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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: + + + + Choose address from address book + Adres defterinden adres seç + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Panodan adres yapıştır + + + + Alt+P + Alt+P + + + + Remove this recipient + Bu alıcıyı kaldır + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + curecoin adresi giriniz (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + İmzalar - Mesaj İmzala / Kontrol et + + + + &Sign Message + Mesaj &imzala + + + + 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. + Bir adresin sizin olduğunu ispatlamak için adresinizle mesaj imzalayabilirsiniz. Oltalama saldırılarının kimliğinizi imzanızla elde etmeyi deneyebilecekleri için belirsiz hiçbir şey imzalamamaya dikkat ediniz. Sadece ayrıntılı açıklaması olan ve tümüne katıldığınız ifadeleri imzalayınız. + + + + The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Mesajın imzalanmasında kullanılacak adres (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Choose an address from the address book + Adres defterinden bir adres seç + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Panodan adres yapıştır + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + İmzalamak istediğiniz mesajı burada giriniz + + + + Signature + İmza + + + + Copy the current signature to the system clipboard + Güncel imzayı sistem panosuna kopyala + + + + Sign the message to prove you own this curecoin address + Bu curecoin adresinin sizin olduğunu ispatlamak için mesajı imzalayın + + + + Sign &Message + &Mesajı imzala + + + + Reset all sign message fields + Tüm mesaj alanlarını sıfırla + + + + + Clear &All + Tümünü &temizle + + + + &Verify Message + Mesaj &kontrol et + + + + 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. + İmza için kullanılan adresi, mesajı (satır sonları, boşluklar, sekmeler vs. karakterleri tam olarak kopyaladığınızdan emin olunuz) ve imzayı aşağıda giriniz. Bir ortadaki adam saldırısı tarafından kandırılmaya mâni olmak için imzadan, imzalı mesajın içeriğini aşan bir anlam çıkarmamaya dikkat ediniz. + + + + The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Mesajı imzalamak için kullanılmış olan adres (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Belirtilen curecoin adresi ile imzalandığını doğrulamak için mesajı kontrol et + + + + Verify &Message + &Mesaj kontrol et + + + + Reset all verify message fields + Tüm mesaj kontrolü alanlarını sıfırla + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + curecoin adresi giriniz (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + İmzayı oluşturmak için "Mesaj İmzala" unsurunu tıklayın + + + + Enter curecoin signature + curecoin imzası gir + + + + + The entered address is invalid. + Girilen adres geçersizdir. + + + + + + + Please check the address and try again. + Adresi kontrol edip tekrar deneyiniz. + + + + + The entered address does not refer to a key. + Girilen adres herhangi bir anahtara işaret etmemektedir. + + + + Wallet unlock was cancelled. + Cüzdan kilidinin açılması iptal edildi. + + + + Private key for the entered address is not available. + Girilen adres için özel anahtar mevcut değildir. + + + + Message signing failed. + Mesajın imzalanması başarısız oldu. + + + + Message signed. + Mesaj imzalandı. + + + + The signature could not be decoded. + İmzanın kodu çözülemedi. + + + + + Please check the signature and try again. + İmzayı kontrol edip tekrar deneyiniz. + + + + The signature did not match the message digest. + İmza mesajın hash değeri ile eşleşmedi. + + + + Message verification failed. + Mesaj doğrulaması başarısız oldu. + + + + Message verified. + Mesaj doğrulandı. + + + + SplashScreen + + + Dr. Kimoto Chan + curecoin geliştiricileri + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + %1 değerine dek açık + + + + %1/offline + %1/çevrim dışı + + + + %1/unconfirmed + %1/doğrulanmadı + + + + %1 confirmations + %1 teyit + + + + Status + Durum + + + + , broadcast through %n node(s) + , %n düğüm vasıtasıyla yayınlandı, %n düğüm vasıtasıyla yayınlandı + + + + Date + Tarih + + + + Source + Kaynak + + + + Generated + Oluşturuldu + + + + + From + Gönderen + + + + + + To + Alıcı + + + + + own address + kendi adresiniz + + + + label + etiket + + + + + + + + Credit + Gider + + + + matures in %n more block(s) + %n ek blok sonrasında olgunlaşacak%n ek blok sonrasında olgunlaşacak + + + + not accepted + kabul edilmedi + + + + + + + Debit + Gelir + + + + Transaction fee + Muamele ücreti + + + + Net amount + Net miktar + + + + Message + Mesaj + + + + Comment + Yorum + + + + Transaction ID + Muamele tanımlayıcı + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Oluşturulan curecoin'lerin harcanabilmelerinden önce 120 blok beklemeleri gerekmektedir. Bu blok, oluşturduğunuzda blok zincirine eklenmesi için ağda yayınlandı. Zincire eklenmesi başarısız olursa, durumu "kabul edilmedi" olarak değiştirilecek ve harcanamayacaktır. Bu, bazen başka bir düğüm sizden birkaç saniye önce ya da sonra blok oluşturursa meydana gelebilir. + + + + Debug information + Hata ayıklama verileri + + + + Transaction + Muamele + + + + Inputs + Girdiler + + + + Amount + Miktar + + + + true + doğru + + + + false + yanlış + + + + , has not been successfully broadcast yet + , henüz başarılı bir şekilde yayınlanmadı + + + + Open for %n more block(s) + %n ilâve blok için açık%n ilâve blok için açık + + + + unknown + bilinmiyor + + + + TransactionDescDialog + + + Transaction details + Muamele detayları + + + + This pane shows a detailed description of the transaction + Bu pano muamelenin ayrıntılı açıklamasını gösterir + + + + TransactionTableModel + + + Date + Tarih + + + + Type + Tür + + + + Address + Adres + + + + Amount + Miktar + + + + Open for %n more block(s) + %n ilâve blok için açık%n ilâve blok için açık + + + + Open until %1 + %1 değerine dek açık + + + + Offline (%1 confirmations) + Çevrimdışı (%1 teyit) + + + + Unconfirmed (%1 of %2 confirmations) + Doğrulanmadı (%1 (toplam %2 üzerinden) teyit) + + + + Confirmed (%1 confirmations) + Doğrulandı (%1 teyit) + + + + Mined balance will be available when it matures in %n more block(s) + Madenden çıkarılan bakiye %n ek blok sonrasında olgunlaştığında kullanılabilecektirMadenden çıkarılan bakiye %n ek blok sonrasında olgunlaştığında kullanılabilecektir + + + + This block was not received by any other nodes and will probably not be accepted! + Bu blok başka hiçbir düğüm tarafından alınmamıştır ve muhtemelen kabul edilmeyecektir! + + + + Generated but not accepted + Oluşturuldu ama kabul edilmedi + + + + Received with + Şununla alındı + + + + Received from + Alındığı kişi + + + + Sent to + Gönderildiği adres + + + + Payment to yourself + Kendinize ödeme + + + + Mined + Madenden çıkarılan + + + + (n/a) + (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. + + + + Date and time that the transaction was received. + Muamelenin alındığı tarih ve zaman. + + + + Type of transaction. + Muamele türü. + + + + Destination address of transaction. + Muamelenin alıcı adresi. + + + + Amount removed from or added to balance. + Bakiyeden alınan ya da bakiyeye eklenen miktar. + + + + TransactionView + + + + All + Hepsi + + + + Today + Bugün + + + + This week + Bu hafta + + + + This month + Bu ay + + + + Last month + Geçen ay + + + + This year + Bu sene + + + + Range... + Aralık... + + + + Received with + Şununla alınan + + + + Sent to + Gönderildiği adres + + + + To yourself + Kendinize + + + + Mined + Oluşturulan + + + + Other + Diğer + + + + Enter address or label to search + Aranacak adres ya da etiket giriniz + + + + Min amount + Asgari miktar + + + + Copy address + Adresi kopyala + + + + Copy label + Etiketi kopyala + + + + Copy amount + Miktarı kopyala + + + + Copy transaction ID + Muamele kimliğini kopyala + + + + Edit label + Etiketi düzenle + + + + Show transaction details + Muamele detaylarını göster + + + + Export Transaction Data + Muamele verilerini dışa aktar + + + + Comma separated file (*.csv) + Virgülle ayrılmış değerler dosyası (*.csv) + + + + Confirmed + Doğrulandı + + + + Date + Tarih + + + + Type + Tür + + + + Label + Etiket + + + + Address + Adres + + + + Amount + Miktar + + + + ID + Tanımlayıcı + + + + Error exporting + Dışa aktarımda hata oluştu + + + + Could not write to file %1. + %1 dosyasına yazılamadı. + + + + Range: + Aralık: + + + + to + ilâ + + + + WalletModel + + + Send Coins + curecoin yolla + + + + WalletView + + + &Export + &Dışa aktar + + + + Export the data in the current tab to a file + Güncel sekmedeki verileri bir dosyaya aktar + + + + Backup Wallet + Cüzdanı yedekle + + + + Wallet Data (*.dat) + Cüzdan verileri (*.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ı değişik bir konuma kaydetmek denenirken bir hata meydana geldi. + + + + Backup Successful + Yedekleme başarılı + + + + The wallet data was successfully saved to the new location. + Cüzdan verileri başarılı bir şekilde yeni konuma kaydedildi. + + + + curecoin-core + + + curecoin version + curecoin sürümü + + + + Usage: + Kullanım: + + + + Send command to -server or curecoind + -server ya da curecoind'ye komut gönder + + + + List commands + Komutları listele + + + + Get help for a command + Bir komut için yardım al + + + + Options: + Seçenekler: + + + + Specify configuration file (default: curecoin.conf) + Yapılandırma dosyası belirt (varsayılan: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Pid dosyası belirt (varsayılan: curecoind.pid) + + + + Specify data directory + Veri dizinini belirt + + + + Set database cache size in megabytes (default: 25) + Veritabanı önbellek boyutunu megabayt olarak belirt (varsayılan: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Bağlantılar için dinlenecek <port> (varsayılan: 7951 ya da testnet: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Eşler ile en çok <n> adet bağlantı kur (varsayılan: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Eş adresleri elde etmek için bir düğüme bağlan ve ardından bağlantıyı kes + + + + Specify your own public address + Kendi genel adresinizi tanımlayın + + + + Threshold for disconnecting misbehaving peers (default: 100) + Aksaklık gösteren eşlerle bağlantıyı kesme sınırı (varsayılan: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Aksaklık gösteren eşlerle yeni bağlantıları engelleme süresi, saniye olarak (varsayılan: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + IPv4 üzerinde dinlemek için %u numaralı RPC portunun kurulumu sırasında hata meydana geldi: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + JSON-RPC bağlantılarını <port> üzerinde dinle (varsayılan: 7950 veya tesnet: 17950) + + + + Accept command line and JSON-RPC commands + Konut satırı ve JSON-RPC komutlarını kabul et + + + + Run in the background as a daemon and accept commands + Arka planda daemon (servis) olarak çalış ve komutları kabul et + + + + Use the test network + Deneme şebekesini kullan + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Dışarıdan gelen bağlantıları kabul et (varsayılan: -proxy veya -connect yoksa 1) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, şu yapılandırma dosyasında rpc parolası belirtmeniz gerekir: +%s +Aşağıdaki rastgele oluşturulan parolayı kullanmanız tavsiye edilir: +rpcuser=curecoinrpc +rpcpassword=%s +(bu parolayı hatırlamanız gerekli değildir) +Kullanıcı ismi ile parolanın FARKLI olmaları gerekir. +Dosya mevcut değilse, sadece sahibi için okumayla sınırlı izin ile oluşturunuz. +Sorunlar hakkında bildiri almak için alertnotify unsurunu ayarlamanız tavsiye edilir; +mesela: alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + IPv6 üzerinde dinlemek için %u numaralı RPC portu kurulurken bir hata meydana geldi, IPv4'e dönülüyor: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Belirtilen adrese bağlan ve daima ondan dinle. IPv6 için [makine]:port yazımını kullanınız + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + %s veri dizininde kilit elde edilemedi. curecoin muhtemelen hâlihazırda çalışmaktadır. + + + + 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. + Hata: Muamele reddedildi! Cüzdanınızdaki madenî paraların bazıları zaten harcanmış olduğunda bu meydana gelebilir. Örneğin wallet.dat dosyasının bir kopyasını kullandıysanız ve kopyada para harcandığında ancak burada harcandığı işaretlenmediğinde. + + + + Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + Hata: Muamelenin miktarı, karmaşıklığı ya da yakın geçmişte alınan fonların kullanılması nedeniyle bu muamele en az %s tutarında ücret gerektirmektedir! + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + İlgili bir uyarı alındığında komut çalıştır (komuttaki %s mesaj ile değiştirilecektir) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Bir cüzdan muamelesi değiştiğinde komutu çalıştır (komuttaki %s TxID ile değiştirilecektir) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + Yüksek öncelikli/düşük ücretli muamelelerin boyutunu bayt olarak tanımla (varsayılan: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Bu yayın öncesi bir deneme sürümüdür - tüm riski siz üstlenmiş olursunuz - curecoin oluşturmak ya da ticari uygulamalar için kullanmayınız + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Uyarı: -paytxfee çok yüksek bir değere ayarlanmış! Bu, muamele gönderirseniz ödeyeceğiniz muamele ücretidir. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Uyarı: Görüntülenen muameleler doğru olmayabilir! Sizin ya da diğer düğümlerin güncelleme yapması gerekebilir. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Uyarı: Lütfen bilgisayarınızın tarih ve saatinin doğru olup olmadığını kontrol ediniz! Saatiniz doğru değilse curecoin gerektiği gibi çalışamaz. + + + + 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. + + + + 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. + Uyarı: wallet.dat bozuk, veriler geri kazanıldı! Özgün wallet.dat, wallet.{zamandamgası}.bak olarak %s klasörüne kaydedildi; bakiyeniz ya da muameleleriniz yanlışsa bir yedeklemeden tekrar yüklemeniz gerekir. + + + + Attempt to recover private keys from a corrupt wallet.dat + Bozuk bir wallet.dat dosyasından özel anahtarları geri kazanmayı dene + + + + Block creation options: + Blok oluşturma seçenekleri: + + + + Connect only to the specified node(s) + Sadece belirtilen düğüme veya düğümlere bağlan + + + + Corrupted block database detected + Bozuk blok veritabanı tespit edildi + + + + Discover own IP address (default: 1 when listening and no -externalip) + Kendi IP adresini keşfet (varsayılan: dinlenildiğinde ve -externalip yoksa 1) + + + + Do you want to rebuild the block database now? + Blok veritabanını şimdi yeniden inşa etmek istiyor musunuz? + + + + Error initializing block database + Blok veritabanını başlatılırken bir hata meydana geldi + + + + Error initializing wallet database environment %s! + %s cüzdan veritabanı ortamının başlatılmasında hata meydana geldi! + + + + Error loading block database + Blok veritabanının yüklenmesinde hata + + + + Error opening block database + Blok veritabanının açılışı sırasında hata + + + + Error: Disk space is low! + Hata: Disk alanı düşük! + + + + Error: Wallet locked, unable to create transaction! + Hata: Cüzdan kilitli, muamele oluşturulamadı! + + + + Error: system error: + Hata: sistem hatası: + + + + Failed to listen on any port. Use -listen=0 if you want this. + Herhangi bir portun dinlenmesi başarısız oldu. Bunu istiyorsanız -listen=0 seçeneğini kullanınız. + + + + Failed to read block info + Blok verileri okunamadı + + + + Failed to read block + Blok okunamadı + + + + Failed to sync block index + Blok indeksi eşleştirilemedi + + + + Failed to write block index + Blok indeksi yazılamadı + + + + Failed to write block info + Blok verileri yazılamadı + + + + Failed to write block + Blok yazılamadı + + + + Failed to write file info + Dosya verileri yazılamadı + + + + Failed to write to coin database + Madenî para veritabanına yazılamadı + + + + Failed to write transaction index + Muamele indeksi yazılamadı + + + + Failed to write undo data + Geri alma verilerinin yazılamadı + + + + Find peers using DNS lookup (default: 1 unless -connect) + Eşleri DNS araması vasıtasıyla bul (varsayılan: 1, eğer -connect kullanılmadıysa) + + + + Generate coins (default: 0) + curecoin oluştur (varsayılan: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + Başlangıçta kontrol edilecek blok sayısı (varsayılan: 288, 0 = hepsi) + + + + How thorough the block verification is (0-4, default: 3) + Blok kontrolünün ne kadar derin olacağı (0 ilâ 4, varsayılan: 3) + + + + Not enough file descriptors available. + Kafi derecede dosya tanımlayıcıları mevcut değil. + + + + Rebuild block chain index from current blk000??.dat files + Blok zinciri indeksini güncel blk000??.dat dosyalarından tekrar inşa et + + + + Set the number of threads to service RPC calls (default: 4) + RPC aramaları için iş parçacığı sayısını belirle (varsayılan: 4) + + + + Verifying blocks... + Bloklar kontrol ediliyor... + + + + Verifying wallet... + Cüzdan kontrol ediliyor... + + + + Imports blocks from external blk000??.dat file + Harici blk000??.dat dosyasından blokları içe aktarır + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + Betik kontrolü iş parçacığı sayısını belirt (azami 16, 0 = otomatik, <0 = bu sayıda çekirdeği boş bırak, varsayılan: 0) + + + + Information + Bilgi + + + + Invalid -tor address: '%s' + Geçersiz -tor adresi: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + -minrelaytxfee=<amount> için geçersiz meblağ: '%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + -mintxfee=<amount> için geçersiz meblağ: '%s' + + + + Maintain a full transaction index (default: 0) + Muamelelerin tamamının indeksini tut (varsayılan: 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Bağlantı başına azami alım tamponu, <n>*1000 bayt (varsayılan: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Bağlantı başına azami yollama tamponu, <n>*1000 bayt (varsayılan: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + Sadece yerleşik kontrol noktalarıyla eşleşen blok zincirini kabul et (varsayılan: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Sadece <net> şebekesindeki düğümlere bağlan (IPv4, IPv6 ya da Tor) + + + + Output extra debugging information. Implies all other -debug* options + İlâve hata ayıklama verileri çıkart. Diğer tüm -debug* seçeneklerini ima eder + + + + Output extra network debugging information + İlâve şebeke hata ayıklama verileri çıkart + + + + Prepend debug output with timestamp + Hata ayıklama çıktısına tarih ön ekleri ilâve et + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL seçenekleri: (SSL kurulum bilgisi için curecoin vikisine bakınız) + + + + Select the version of socks proxy to use (4-5, default: 5) + Kullanılacak socks vekil sunucu sürümünü seç (4-5, varsayılan: 5) + + + + Send trace/debug info to console instead of debug.log file + Trace/hata ayıklama verilerini debug.log dosyası yerine konsola gönder + + + + Send trace/debug info to debugger + Hata ayıklayıcıya -debugger- trace/hata ayıklama verileri gönder + + + + Set maximum block size in bytes (default: 250000) + Bayt olarak azami blok boyutunu tanımla (varsayılan: 250000) + + + + Set minimum block size in bytes (default: 0) + Bayt olarak asgari blok boyutunu tanımla (varsayılan: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + İstemci başlatıldığında debug.log dosyasını küçült (varsayılan: -debug bulunmadığında 1) + + + + Signing transaction failed + Muamelenin imzalanması başarısız oldu + + + + Specify connection timeout in milliseconds (default: 5000) + Bağlantı zaman aşım süresini milisaniye olarak belirt (varsayılan: 5000) + + + + System error: + Sistem hatası: + + + + Transaction amount too small + Muamele meblağı çok düşük + + + + Transaction amounts must be positive + Muamele tutarının pozitif olması lazımdır + + + + Transaction too large + Muamele çok büyük + + + + Use UPnP to map the listening port (default: 0) + Dinlenecek portu haritalamak için UPnP kullan (varsayılan: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Dinlenecek portu haritalamak için UPnP kullan (varsayılan: dinlenildiğinde 1) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Gizli tor servislerine erişmek için vekil sunucu kullan (varsayılan: -proxy ile aynısı) + + + + Username for JSON-RPC connections + JSON-RPC bağlantıları için kullanıcı ismi + + + + Warning + Uyarı + + + + Warning: This version is obsolete, upgrade required! + Uyarı: Bu sürüm çok eskidir, güncellemeniz gerekir! + + + + You need to rebuild the databases using -reindex to change -txindex + -txindex'i değiştirmek için veritabanlarını -reindex kullanarak yeniden inşa etmeniz gerekir. + + + + wallet.dat corrupt, salvage failed + wallet.dat bozuk, geri kazanım başarısız oldu + + + + Password for JSON-RPC connections + JSON-RPC bağlantıları için parola + + + + Allow JSON-RPC connections from specified IP address + Belirtilen İP adresinden JSON-RPC bağlantılarını kabul et + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Şu <ip> adresinde (varsayılan: 127.0.0.1) çalışan düğüme komut yolla + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + En iyi blok değiştiğinde komutu çalıştır (komut için %s parametresi blok hash değeri ile değiştirilecektir) + + + + Upgrade wallet to latest format + Cüzdanı en yeni biçime güncelle + + + + Set key pool size to <n> (default: 100) + Anahtar alan boyutunu <n> değerine ayarla (varsayılan: 100) + + + + Rescan the block chain for missing wallet transactions + Blok zincirini eksik cüzdan muameleleri için tekrar tara + + + + Use OpenSSL (https) for JSON-RPC connections + JSON-RPC bağlantıları için OpenSSL (https) kullan + + + + Server certificate file (default: server.cert) + Sunucu sertifika dosyası (varsayılan: server.cert) + + + + Server private key (default: server.pem) + Sunucu özel anahtarı (varsayılan: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Kabul edilebilir şifreler (varsayılan: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Bu yardım mesajı + + + + 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 + Socks vekil sunucusu vasıtasıyla bağlan + + + + Allow DNS lookups for -addnode, -seednode and -connect + -addnode, -seednode ve -connect için DNS aramalarına izin ver + + + + Loading addresses... + Adresler yükleniyor... + + + + Error loading wallet.dat: Wallet corrupted + wallet.dat dosyasının yüklenmesinde hata oluştu: bozuk cüzdan + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + wallet.dat dosyasının yüklenmesinde hata oluştu: cüzdanın daha yeni bir curecoin sürümüne ihtiyacı var + + + + Wallet needed to be rewritten: restart curecoin to complete + Cüzdanın tekrar yazılması gerekiyordu: işlemi tamamlamak için curecoin'i yeniden başlatınız + + + + Error loading wallet.dat + wallet.dat dosyasının yüklenmesinde hata oluştu + + + + Invalid -proxy address: '%s' + Geçersiz -proxy adresi: '%s' + + + + Unknown network specified in -onlynet: '%s' + -onlynet için bilinmeyen bir şebeke belirtildi: '%s' + + + + Unknown -socks proxy version requested: %i + Bilinmeyen bir -socks vekil sürümü talep edildi: %i + + + + Cannot resolve -bind address: '%s' + -bind adresi çözümlenemedi: '%s' + + + + Cannot resolve -externalip address: '%s' + -externalip adresi çözümlenemedi: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + -paytxfee=<miktar> için geçersiz miktar: '%s' + + + + Invalid amount + Geçersiz miktar + + + + Insufficient funds + Yetersiz bakiye + + + + Loading block index... + Blok indeksi yükleniyor... + + + + 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. curecoin is probably already running. + Bu bilgisayarda %s unsuruna bağlanılamadı. curecoin muhtemelen hâlihazırda çalışmaktadır. + + + + Fee per KB to add to transactions you send + Yolladığınız muameleler için eklenecek KB başı ücret + + + + Loading wallet... + Cüzdan yükleniyor... + + + + Cannot downgrade wallet + Cüzdan eski biçime geri alınamaz + + + + Cannot write default address + Varsayılan adres yazılamadı + + + + Rescanning... + Yeniden tarama... + + + + Done loading + Yükleme tamamlandı + + + + To use the %s option + %s seçeneğini kullanmak için + + + + Error + Hata + + + + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + rpcpassword=<parola> şu yapılandırma dosyasında belirtilmelidir: +%s +Dosya mevcut değilse, sadece sahibi için okumayla sınırlı izin ile oluşturunuz. + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_uk.qm b/src/qt/locale/curecoin_uk.qm new file mode 100644 index 0000000..9fa19ea Binary files /dev/null and b/src/qt/locale/curecoin_uk.qm differ diff --git a/src/qt/locale/curecoin_uk.ts b/src/qt/locale/curecoin_uk.ts new file mode 100644 index 0000000..2981cf2 --- /dev/null +++ b/src/qt/locale/curecoin_uk.ts @@ -0,0 +1,2928 @@ + +UTF-8 + + AboutDialog + + + About curecoin + Про curecoin + + + + <b>curecoin</b> version + Версія <b>curecoin'a<b> + + + + +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. + +Це програмне забезпечення є експериментальним. + +Поширюється за ліцензією MIT/X11, додаткова інформація міститься у файлі COPYING, а також за адресою http://www.opensource.org/licenses/mit-license.php. + +Цей продукт включає в себе програмне забезпечення, розроблене в рамках проекту OpenSSL (http://www.openssl.org/), криптографічне програмне забезпечення, написане Еріком Янгом (eay@cryptsoft.com), та функції для роботи з UPnP, написані Томасом Бернардом. + + + + Copyright + Авторське право + + + + Dr. Kimoto Chan + + + + + 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 curecoin 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 + Показати QR-&Код + + + + Sign a message to prove you own a curecoin address + Підпишіть повідомлення щоб довести, що ви є власником цієї адреси + + + + Sign &Message + &Підписати повідомлення + + + + Delete the currently selected address from the list + Вилучити вибрані адреси з переліку + + + + Export the data in the current tab to a file + Експортувати дані з поточної вкладки в файл + + + + &Export + + + + + Verify a message to ensure it was signed with a specified curecoin address + Перевірте повідомлення для впевненості, що воно підписано вказаною curecoin-адресою + + + + &Verify Message + Перевірити повідомлення + + + + &Delete + &Видалити + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + Copy &Label + Скопіювати &мітку + + + + &Edit + &Редагувати + + + + Send &Coins + + + + + Export Address Book Data + Експортувати адресну книгу + + + + Comma separated file (*.csv) + Файли відділені комами (*.csv) + + + + Error exporting + Помилка при експортуванні + + + + Could not write to file %1. + Неможливо записати у файл %1. + + + + AddressTableModel + + + Label + Назва + + + + Address + Адреса + + + + (no label) + (немає назви) + + + + AskPassphraseDialog + + + Passphrase Dialog + Діалог введення паролю + + + + Enter passphrase + Введіть пароль + + + + New passphrase + Новий пароль + + + + Repeat new passphrase + Повторіть пароль + + + + 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>. + Введіть новий пароль для гаманця.<br/>Будь ласка, використовуйте паролі що містять <b>як мінімум 10 випадкових символів</b>, або <b>як мінімум 8 слів</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 curecoinS</b>! + УВАГА: Якщо ви зашифруєте гаманець і забудете пароль, ви <b>ВТРАТИТЕ ВСІ СВОЇ MEGAКОІНИ</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! + Увага: Ввімкнено Caps Lock! + + + + + Wallet encrypted + Гаманець зашифровано + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + Пароль було успішно змінено. + + + + curecoinGUI + + + Sign &message... + &Підписати повідомлення... + + + + Synchronizing with network... + Синхронізація з мережею... + + + + &Overview + &Огляд + + + + Show general overview of wallet + Показати загальний огляд гаманця + + + + &Transactions + Транзакції + + + + Browse transaction history + Переглянути історію транзакцій + + + + Edit the list of stored addresses and labels + Редагувати список збережених адрес та міток + + + + Show the list of addresses for receiving payments + Показати список адрес для отримання платежів + + + + E&xit + &Вихід + + + + Quit application + Вийти + + + + Show information about curecoin + Показати інформацію про curecoin + + + + About &Qt + &Про Qt + + + + Show information about Qt + Показати інформацію про Qt + + + + &Options... + &Параметри... + + + + &Encrypt Wallet... + &Шифрування гаманця... + + + + &Backup Wallet... + &Резервне копіювання гаманця... + + + + &Change Passphrase... + Змінити парол&ь... + + + + Importing blocks from disk... + Імпорт блоків з диску... + + + + Reindexing blocks on disk... + + + + + Send coins to a curecoin address + Відправити монети на вказану адресу + + + + Modify configuration options for curecoin + Редагувати параметри + + + + Backup wallet to another location + Резервне копіювання гаманця в інше місце + + + + Change the passphrase used for wallet encryption + Змінити пароль, який використовується для шифрування гаманця + + + + &Debug window + Вікно зневадження + + + + Open debugging and diagnostic console + Відкрити консоль зневадження і діагностики + + + + &Verify message... + Перевірити повідомлення... + + + + + curecoin + curecoin + + + + Wallet + Гаманець + + + + &Send + + + + + &Receive + + + + + &Addresses + + + + + &About curecoin + &Про curecoin + + + + &Show / Hide + Показати / Приховати + + + + Show or hide the main Window + Показує або приховує головне вікно + + + + Encrypt the private keys that belong to your wallet + + + + + Sign messages with your curecoin addresses to prove you own them + Підтвердіть, що Ви є власником повідомлення підписавши його Вашою curecoin-адресою + + + + Verify messages to ensure they were signed with specified curecoin addresses + Перевірте повідомлення для впевненості, що воно підписано вказаною curecoin-адресою + + + + &File + &Файл + + + + &Settings + &Налаштування + + + + &Help + &Довідка + + + + Tabs toolbar + Панель вкладок + + + + + [testnet] + [тестова мережа] + + + + curecoin client + curecoin-клієнт + + + + %n active connection(s) to curecoin network + %n активне з'єднання з мережею%n активні з'єднання з мережею%n активних з'єднань з мережею + + + + No block source available... + + + + + Processed %1 of %2 (estimated) blocks of transaction history. + + + + + Processed %1 blocks of transaction history. + Оброблено %1 блоків історії транзакцій. + + + + %n hour(s) + + + + + %n day(s) + + + + + %n week(s) + + + + + %1 behind + + + + + Last received block was generated %1 ago. + + + + + Transactions after this will not yet be visible. + + + + + Error + Помилка + + + + Warning + Увага + + + + Information + Інформація + + + + 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? + + + + + Up to date + Синхронізовано + + + + Catching up... + Синхронізується... + + + + 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 curecoin address or malformed URI parameters. + Неможливо обробити URI! Це може бути викликано неправильною curecoin-адресою, чи невірними параметрами 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + + + + + ClientModel + + + Network Alert + Сповіщення мережі + + + + 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. + Введена адреса «%1» вже присутня в адресній книзі. + + + + The entered address "%1" is not a valid curecoin address. + Введена адреса «%1» не є коректною адресою в мережі curecoin. + + + + Could not unlock wallet. + Неможливо розблокувати гаманець. + + + + New key generation failed. + Не вдалося згенерувати нові ключі. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + версія + + + + Usage: + Використання: + + + + command-line options + параметри командного рядка + + + + UI options + Параметри інтерфейсу + + + + Set language, for example "de_DE" (default: system locale) + Встановлення мови, наприклад "de_DE" (типово: системна) + + + + Start minimized + Запускати згорнутим + + + + Show splash screen on startup (default: 1) + Показувати заставку під час запуску (типово: 1) + + + + OptionsDialog + + + Options + Параметри + + + + &Main + &Головні + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + + + + + Pay transaction &fee + Заплатити комісі&ю + + + + Automatically start curecoin after logging in to the system. + Автоматично запускати гаманець при вході до системи. + + + + &Start curecoin on system login + &Запускати гаманець при вході в систему + + + + Reset all client options to default. + Скинути всі параметри клієнта на типові. + + + + &Reset Options + Скинути параметри + + + + &Network + &Мережа + + + + Automatically open the curecoin 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 curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + Підключатись до мережі curecoin через SOCKS-проксі (наприклад при використанні Tor). + + + + &Connect through SOCKS proxy: + Підключатись через &SOCKS-проксі: + + + + Proxy &IP: + &IP проксі: + + + + IP address of the proxy (e.g. 127.0.0.1) + IP-адреса проксі-сервера (наприклад 127.0.0.1) + + + + &Port: + &Порт: + + + + Port of the proxy (e.g. 9050) + Порт проксі-сервера (наприклад 9050) + + + + SOCKS &Version: + SOCKS версії: + + + + SOCKS version of the proxy (e.g. 5) + Версія SOCKS-проксі (наприклад 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 curecoin. + Встановлює мову інтерфейсу. Зміни набудуть чинності після перезапуску curecoin. + + + + &Unit to show amounts in: + В&имірювати монети в: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + Виберіть одиницю вимірювання монет, яка буде відображатись в гаманці та при відправленні. + + + + Whether to show curecoin addresses in the transaction list or not. + + + + + &Display addresses in transaction list + &Відображати адресу в списку транзакцій + + + + &OK + &Гаразд + + + + &Cancel + &Скасувати + + + + &Apply + &Застосувати + + + + default + типово + + + + Confirm options reset + Підтвердження скидання параметрів + + + + Some settings may require a client restart to take effect. + Деякі параметри потребують перезапуск клієнта для набуття чинності. + + + + Do you want to proceed? + Продовжувати? + + + + + Warning + Увага + + + + + This setting will take effect after restarting curecoin. + Цей параметр набуде чинності після перезапуску curecoin. + + + + The supplied proxy address is invalid. + Невірно вказано адресу проксі. + + + + OverviewPage + + + Form + Форма + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + Показана інформація вже може бути застарілою. Ваш гаманець буде автоматично синхронізовано з мережею curecoin після встановлення підключення, але цей процес ще не завершено. + + + + Balance: + Баланс: + + + + Unconfirmed: + Непідтверджені: + + + + Wallet + Гаманець + + + + Immature: + + + + + Mined balance that has not yet matured + + + + + <b>Recent transactions</b> + <b>Недавні транзакції</b> + + + + Your current balance + Ваш поточний баланс + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + Загальна сума всіх транзакцій, які ще не підтверджені, та до цих пір не враховуються в загальному балансі + + + + + out of sync + не синхронізовано + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + + + + + QRCodeDialog + + + QR Code Dialog + Діалог QR-коду + + + + Request Payment + Запросити Платіж + + + + Amount: + Кількість: + + + + Label: + Мітка: + + + + Message: + Повідомлення: + + + + &Save As... + &Зберегти як... + + + + Error encoding URI into QR Code. + Помилка при кодуванні URI в QR-код. + + + + The entered amount is invalid, please check. + Невірно введено кількість, будь ласка, перевірте. + + + + Resulting URI too long, try to reduce the text for label / message. + Кінцевий URI занадто довгий, спробуйте зменшити текст для мітки / повідомлення. + + + + Save QR Code + Зберегти QR-код + + + + PNG Images (*.png) + PNG-зображення (*.png) + + + + RPCConsole + + + Client name + Назва клієнту + + + + + + + + + + + + + N/A + Н/Д + + + + Client version + Версія клієнту + + + + &Information + &Інформація + + + + Using OpenSSL version + Використовується OpenSSL версії + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + Показати довідку curecoin-Qt для отримання переліку можливих параметрів командного рядка. + + + + &Show + Показати + + + + &Console + Консоль + + + + Build date + Дата збирання + + + + curecoin - Debug window + curecoin - Вікно зневадження + + + + curecoin Core + + + + + Debug log file + Файл звіту зневадження + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + + + + + Clear console + Очистити консоль + + + + Welcome to the curecoin RPC console. + Вітаємо у консолі curecoin RPC. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Використовуйте стрілки вгору вниз для навігації по історії, і <b>Ctrl-L</b> для очищення екрана. + + + + Type <b>help</b> for an overview of available commands. + Наберіть <b>help</b> для перегляду доступних команд. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + Відправити + + + + Send to multiple recipients at once + Відправити на декілька адрес + + + + Add &Recipient + Дод&ати одержувача + + + + Remove all transaction fields + Видалити всі поля транзакції + + + + Clear &All + Очистити &все + + + + Balance: + Баланс: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + Підтвердити відправлення + + + + S&end + &Відправити + + + + <b>%1</b> to %2 (%3) + <b>%1</b> адресату %2 (%3) + + + + Confirm send coins + Підтвердіть відправлення + + + + Are you sure you want to send %1? + Ви впевнені що хочете відправити %1? + + + + and + і + + + + The recipient address is not valid, please recheck. + Адреса отримувача невірна, будь ласка перепровірте. + + + + The amount to pay must be larger than 0. + Кількість монет для відправлення повинна бути більшою 0. + + + + The amount exceeds your balance. + Кількість монет для відправлення перевищує ваш баланс. + + + + The total exceeds your balance when the %1 transaction fee is included. + Сума перевищить ваш баланс, якщо комісія %1 буде додана до вашої транзакції. + + + + 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. + Помилка: транзакцію було відхилено. Це може статись, якщо декілька монет з вашого гаманця вже використані, наприклад, якщо ви використовуєте одну копію гаманця (wallet.dat), а монети були використані з іншої копії, але не позначені як використані в цій. + + + + SendCoinsEntry + + + Form + Форма + + + + A&mount: + &Кількість: + + + + Pay &To: + &Отримувач: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + + Enter a label for this address to add it to your address book + Введіть мітку для цієї адреси для додавання її в адресну книгу + + + + &Label: + &Мітка: + + + + Choose address from address book + Вибрати адресу з адресної книги + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Вставити адресу + + + + Alt+P + Alt+P + + + + Remove this recipient + Видалити цього отримувача + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Введіть адресу curecoin (наприклад 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Введіть адресу curecoin (наприклад 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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 + Введіть повідомлення, яке ви хочете підписати тут + + + + Signature + Підпис + + + + Copy the current signature to the system clipboard + Копіювати поточну сигнатуру до системного буферу обміну + + + + Sign the message to prove you own this curecoin address + Підпишіть повідомлення щоб довести, що ви є власником цієї адреси + + + + Sign &Message + &Підписати повідомлення + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Введіть адресу curecoin (наприклад 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + Перевірте повідомлення для впевненості, що воно підписано вказаною curecoin-адресою + + + + Verify &Message + Перевірити повідомлення + + + + Reset all verify message fields + Скинути всі поля перевірки повідомлення + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + Введіть адресу curecoin (наприклад 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + Натисніть кнопку «Підписати повідомлення», для отримання підпису + + + + Enter curecoin signature + Введіть сигнатуру curecoin + + + + + 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. + Повідомлення перевірено. + + + + SplashScreen + + + Dr. Kimoto Chan + + + + + [testnet] + [тестова мережа] + + + + TransactionDesc + + + Open until %1 + Відкрити до %1 + + + + %1/offline + %1/поза інтернетом + + + + %1/unconfirmed + %1/не підтверджено + + + + %1 confirmations + %1 підтверджень + + + + 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 + ID транзакції + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Після генерації монет, потрібно зачекати 120 блоків, перш ніж їх можна буде використати. Коли ви згенерували цей блок, його було відправлено в мережу для того, щоб він був доданий до ланцюжка блоків. Якщо ця процедура не вдасться, статус буде змінено на «не підтверджено» і ви не зможете потратити згенеровані монету. Таке може статись, якщо хтось інший згенерував блок на декілька секунд раніше. + + + + Debug information + + + + + Transaction + Транзакція + + + + Inputs + + + + + Amount + Кількість + + + + true + true + + + + false + false + + + + , has not been successfully broadcast yet + , ще не було успішно розіслано + + + + Open for %n more block(s) + + + + + unknown + невідомий + + + + TransactionDescDialog + + + Transaction details + Деталі транзакції + + + + This pane shows a detailed description of the transaction + Даний діалог показує детальну статистику по вибраній транзакції + + + + TransactionTableModel + + + Date + Дата + + + + Type + Тип + + + + Address + Адреса + + + + Amount + Кількість + + + + Open for %n more block(s) + + + + + Open until %1 + Відкрити до %1 + + + + Offline (%1 confirmations) + Поза інтернетом (%1 підтверджень) + + + + Unconfirmed (%1 of %2 confirmations) + Непідтверджено (%1 із %2 підтверджень) + + + + Confirmed (%1 confirmations) + Підтверджено (%1 підтверджень) + + + + Mined balance will be available when it matures in %n more block(s) + + + + + 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) + Файли, розділені комою (*.csv) + + + + Confirmed + Підтверджені + + + + Date + Дата + + + + Type + Тип + + + + Label + Мітка + + + + Address + Адреса + + + + Amount + Кількість + + + + ID + Ідентифікатор + + + + Error exporting + Помилка експорту + + + + Could not write to file %1. + Неможливо записати у файл %1. + + + + Range: + Діапазон від: + + + + to + до + + + + WalletModel + + + Send Coins + Відправити + + + + WalletView + + + &Export + + + + + Export the data in the current tab to a file + Експортувати дані з поточної вкладки в файл + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to the new location. + Виникла помилка при спробі зберегти гаманець в новому місці. + + + + Backup Successful + Успішне створення резервної копії + + + + The wallet data was successfully saved to the new location. + Данні гаманця успішно збережено в новому місці призначення. + + + + curecoin-core + + + curecoin version + Версія + + + + Usage: + Використання: + + + + Send command to -server or curecoind + Відправити команду серверу -server чи демону + + + + List commands + Список команд + + + + Get help for a command + Отримати довідку по команді + + + + Options: + Параметри: + + + + Specify configuration file (default: curecoin.conf) + Вкажіть файл конфігурації (типово: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + Вкажіть pid-файл (типово: curecoind.pid) + + + + Specify data directory + Вкажіть робочий каталог + + + + Set database cache size in megabytes (default: 25) + Встановити розмір кешу бази даних в мегабайтах (типово: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + Чекати на з'єднання на <port> (типово: 7951 або тестова мережа: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + Підтримувати не більше <n> зв'язків з колегами (типово: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + + + + + Specify your own public address + + + + + Threshold for disconnecting misbehaving peers (default: 100) + Поріг відключення неправильно під'єднаних пірів (типово: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + Максимальній розмір вхідного буферу на одне з'єднання (типово: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + Прослуховувати <port> для JSON-RPC-з'єднань (типово: 7950 або тестова мережа: 17950) + + + + Accept command line and JSON-RPC commands + Приймати команди із командного рядка та команди JSON-RPC + + + + 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) + + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + + 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: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + Увага: встановлено занадто велику комісію (-paytxfee). Комісія зніматиметься кожен раз коли ви проводитимете транзакції. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Увага: будь ласка, перевірте дату і час на своєму комп'ютері. Якщо ваш годинник йде неправильно, curecoin може працювати некоректно. + + + + Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + Увага: помилка читання wallet.dat! Всі ключі прочитано коректно, але дані транзакцій чи записи адресної книги можуть бути пропущені, або пошкоджені. + + + + 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. + Увага: файл wallet.dat пошкоджено, дані врятовано! Оригінальний wallet.dat збережено як wallet.{timestamp}.bak до %s; якщо Ваш баланс чи транзакції неправильні, Ви можете відновити їх з резервної копії. + + + + Attempt to recover private keys from a corrupt wallet.dat + Спроба відновити закриті ключі з пошкодженого wallet.dat + + + + Block creation options: + + + + + Connect only to the specified node(s) + Підключитись лише до вказаного вузла + + + + Corrupted block database detected + + + + + Discover own IP address (default: 1 when listening and no -externalip) + + + + + Do you want to rebuild the block database now? + + + + + Error initializing block database + Помилка ініціалізації бази даних блоків + + + + Error initializing wallet database environment %s! + + + + + Error loading block database + Помилка завантаження бази даних блоків + + + + Error opening block database + + + + + Error: Disk space is low! + Помилка: Мало вільного місця на диску! + + + + Error: Wallet locked, unable to create transaction! + Помилка: Гаманець заблокований, неможливо створити транзакцію! + + + + Error: system error: + Помилка: системна помилка: + + + + Failed to listen on any port. Use -listen=0 if you want this. + + + + + Failed to read block info + + + + + Failed to read block + + + + + Failed to sync block index + + + + + Failed to write block index + + + + + Failed to write block info + + + + + Failed to write block + + + + + Failed to write file info + + + + + Failed to write to coin database + + + + + Failed to write transaction index + + + + + Failed to write undo data + + + + + Find peers using DNS lookup (default: 1 unless -connect) + + + + + Generate coins (default: 0) + + + + + How many blocks to check at startup (default: 288, 0 = all) + Скільки блоків перевіряти під час запуску (типово: 288, 0 = всі) + + + + How thorough the block verification is (0-4, default: 3) + + + + + Not enough file descriptors available. + + + + + Rebuild block chain index from current blk000??.dat files + + + + + Set the number of threads to service RPC calls (default: 4) + + + + + Verifying blocks... + + + + + Verifying wallet... + + + + + Imports blocks from external blk000??.dat file + Імпорт блоків з зовнішнього файлу blk000??.dat + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + + + + + Information + Інформація + + + + Invalid -tor address: '%s' + Помилка в адресі -tor: «%s» + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + + + + + Invalid amount for -mintxfee=<amount>: '%s' + + + + + Maintain a full transaction index (default: 0) + + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Максимальний буфер, <n>*1000 байт (типово: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Максимальній розмір вихідного буферу на одне з'єднання, <n>*1000 байт (типово: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + + + + + Output extra debugging information. Implies all other -debug* options + Виводити більше налагоджувальної інформації. Мається на увазі всі шнші -debug* параметри + + + + Output extra network debugging information + + + + + Prepend debug output with timestamp + Доповнювати налагоджувальний вивід відміткою часу + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + Параметри SSL: (див. curecoin Wiki для налаштування SSL) + + + + Select the version of socks proxy to use (4-5, default: 5) + Вибір версії socks-проксі для використання (4-5, типово: 5) + + + + Send trace/debug info to console instead of debug.log file + Відсилати налагоджувальну інформацію на консоль, а не у файл debug.log + + + + Send trace/debug info to debugger + Відсилати налагоджувальну інформацію до налагоджувача + + + + Set maximum block size in bytes (default: 250000) + Встановити максимальний розмір блоку у байтах (типово: 250000) + + + + Set minimum block size in bytes (default: 0) + Встановити мінімальний розмір блоку у байтах (типово: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Стискати файл debug.log під час старту клієнта (типово: 1 коли відсутутній параметр -debug) + + + + Signing transaction failed + + + + + Specify connection timeout in milliseconds (default: 5000) + Вказати тайм-аут підключення у мілісекундах (типово: 5000) + + + + System error: + Системна помилка: + + + + Transaction amount too small + + + + + Transaction amounts must be positive + + + + + Transaction too large + + + + + Use UPnP to map the listening port (default: 0) + Намагатись використовувати UPnP для відображення порту, що прослуховується на роутері (default: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Намагатись використовувати UPnP для відображення порту, що прослуховується на роутері (default: 1 when listening) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + + + + + Username for JSON-RPC connections + Ім'я користувача для JSON-RPC-з'єднань + + + + Warning + Попередження + + + + Warning: This version is obsolete, upgrade required! + Увага: Поточна версія застаріла, необхідне оновлення! + + + + You need to rebuild the databases using -reindex to change -txindex + + + + + wallet.dat corrupt, salvage failed + wallet.dat пошкоджено, відновлення не вдалося + + + + Password for JSON-RPC connections + Пароль для JSON-RPC-з'єднань + + + + Allow JSON-RPC connections from specified IP address + Дозволити JSON-RPC-з'єднання з вказаної IP-адреси + + + + Send commands to node running on <ip> (default: 127.0.0.1) + Відправляти команди на вузол, запущений на <ip> (типово: 127.0.0.1) + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + + + + + Upgrade wallet to latest format + Модернізувати гаманець до останнього формату + + + + Set key pool size to <n> (default: 100) + Встановити розмір пулу ключів <n> (типово: 100) + + + + Rescan the block chain for missing wallet transactions + Пересканувати ланцюжок блоків, в пошуку втрачених транзакцій + + + + Use OpenSSL (https) for JSON-RPC connections + Використовувати OpenSSL (https) для JSON-RPC-з'єднань + + + + Server certificate file (default: server.cert) + Файл сертифіката сервера (типово: server.cert) + + + + Server private key (default: server.pem) + Закритий ключ сервера (типово: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Допустимі шифри (типово: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + Дана довідка + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + Неможливо прив'язати до порту %s на цьому комп'ютері (bind returned error %d, %s) + + + + Connect through socks proxy + Підключитись через SOCKS-проксі + + + + Allow DNS lookups for -addnode, -seednode and -connect + Дозволити пошук в DNS для команд -addnode, -seednode та -connect + + + + Loading addresses... + Завантаження адрес... + + + + Error loading wallet.dat: Wallet corrupted + Помилка при завантаженні wallet.dat: Гаманець пошкоджено + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + Помилка при завантаженні wallet.dat: Гаманець потребує новішої версії Біткоін-клієнта + + + + Wallet needed to be rewritten: restart curecoin to complete + Потрібно перезаписати гаманець: перезапустіть Біткоін-клієнт для завершення + + + + Error loading wallet.dat + Помилка при завантаженні wallet.dat + + + + Invalid -proxy address: '%s' + Помилка в адресі проксі-сервера: «%s» + + + + Unknown network specified in -onlynet: '%s' + Невідома мережа вказана в -onlynet: «%s» + + + + Unknown -socks proxy version requested: %i + + + + + Cannot resolve -bind address: '%s' + + + + + Cannot resolve -externalip address: '%s' + + + + + Invalid amount for -paytxfee=<amount>: '%s' + Помилка у величині комісії -paytxfee=<amount>: «%s» + + + + 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. curecoin is probably already running. + Неможливо прив'язати до порту %s на цьому комп'ютері. Можливо гаманець вже запущено. + + + + Fee per KB to add to transactions you send + Комісія за КБ + + + + Loading wallet... + Завантаження гаманця... + + + + Cannot downgrade wallet + + + + + 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. + Ви мусите встановити rpcpassword=<password> в файлі конфігурації: +%s +Якщо файл не існує, створіть його із правами тільки для читання власником (owner-readable-only). + + + \ No newline at end of file diff --git a/src/qt/locale/curecoin_zh_CN.qm b/src/qt/locale/curecoin_zh_CN.qm new file mode 100644 index 0000000..8337beb Binary files /dev/null and b/src/qt/locale/curecoin_zh_CN.qm differ diff --git a/src/qt/locale/curecoin_zh_CN.ts b/src/qt/locale/curecoin_zh_CN.ts new file mode 100644 index 0000000..f2e1dd0 --- /dev/null +++ b/src/qt/locale/curecoin_zh_CN.ts @@ -0,0 +1,2738 @@ + + + +UTF-8 + + AboutDialog + + + About curecoin + 关于赏金币 + + + + <b>curecoin</b> version + <b>赏金币</b>版本 + + + + Copyright © 2013 The curecoin developers + 版权所有 © 2013 赏金币开发团队 + + + + +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. + + +这是一个实验性软件。 + +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/) 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 curecoin 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 curecoin address + 发送签名消息以证明您是该赏金币地址的拥有者 + + + + Sign &Message + &发送签名消息 + + + + Delete the currently selected address from the list + 从列表中删除当前选中地址。只有发送地址可以被删除。 + + + + Verify a message to ensure it was signed with a specified curecoin address + 进行消息验证,以确认该消息是被某一赏金币地址签名的。 + + + + &Verify Message + &Verify Message + + + + &Delete + &删除 + + + + Copy &Label + 复制 &标签 + + + + &Edit + &编辑 + + + + Export Address Book Data + 导出地址薄数据 + + + + Comma separated file (*.csv) + 逗号分隔文件 (*.csv) + + + + Error exporting + 导出错误 + + + + Could not write to file %1. + 无法写入文件 %1。 + + + + AddressTableModel + + + Label + 标签 + + + + Address + 地址 + + + + (no label) + (没有标签) + + + + AskPassphraseDialog + + + Passphrase Dialog + 密码对话框 + + + + Enter passphrase + 输入口令 + + + + New passphrase + 新口令 + + + + Repeat new passphrase + 重复新口令 + + + + 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>. + 输入钱包的新口令。<br/>使用的口令请至少包含<b>10个以上随机字符</>,或者是<b>8个以上的单词</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>! + 警告:如果您加密了您的钱包之后忘记了口令,您将会<b>失去所有的赏金币</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! + 警告:大写锁定键CapsLock开启! + + + + + Wallet encrypted + 钱包已被加密 + + + + curecoin 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. + 钱包口令修改成功 + + + + curecoinGUI + + + 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 curecoin + 显示赏金币的相关信息 + + + + About &Qt + 关于 &Qt + + + + Show information about Qt + 显示Qt相关信息 + + + + &Options... + &选项... + + + + &Encrypt Wallet... + &加密钱包... + + + + &Backup Wallet... + &备份钱包... + + + + &Change Passphrase... + &修改密码... + + + + ~%n block(s) remaining + + ~还剩 %n 个区块 + + + + + Downloaded %1 of %2 blocks of transaction history (%3% done). + 已下载 %2 个交易历史区块中的 %1 个 (完成率 %3% ). + + + + &Export... + &导出... + + + + Send coins to a curecoin address + 向一个赏金币地址发送赏金币 + + + + Modify configuration options for curecoin + 设置选项 + + + + + 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... + &验证消息... + + + + curecoin + 赏金币 + + + + Wallet + 钱包 + + + + &About curecoin + &关于赏金币 + + + + &Show / Hide + &显示 / 隐藏 + + + + &File + &文件 + + + + &Settings + &设置 + + + + &Help + &帮助 + + + + Tabs toolbar + 分页工具栏 + + + + Actions toolbar + 操作工具栏 + + + + + [testnet] + [测试网络] + + + + + curecoin client + 赏金币客户端 + + + + %n active connection(s) to curecoin network + + %n 个到赏金币网络的活动连接 + + + + + Downloaded %1 blocks of transaction history. + %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 + + + + + + URI handling + URI处理 + + + + + URI can not be parsed! This can be caused by an invalid curecoin 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. + 备份钱包到其它文件夹失败. + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + 发生致命错误. 赏金币客户端的安全存在问题,将退出. + + + + ClientModel + + + Network Alert + 网络警报 + + + + + 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. + 输入的地址 "%1" 已经存在于地址薄。 + + + + The entered address "%1" is not a valid curecoin address. + 您输入的 "%1" 不是合法的赏金币地址. + + + + Could not unlock wallet. + 无法解锁钱包 + + + + New key generation failed. + 密钥创建失败. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + curecoin-Qt + + + + version + 版本 + + + + Usage: + 使用: + + + + command-line options + 命令行选项 + + + + UI options + UI选项 + + + + Set language, for example "de_DE" (default: system locale) + 设置语言, 例如 "de_DE" (缺省: 系统语言) + + + + Start minimized + 启动时最小化 + + + + Show splash screen on startup (default: 1) + 启动时显示启动画面 (缺省: 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.00001 recommended. + 建议支付交易费用,有助于您的交易得到尽快处理. 绝大多数交易的字节数为 1 kB. 建议支付0.00001个赏金币. + + + + Pay transaction &fee + 支付手续费 &fee + + + + Automatically start curecoin after logging in to the system. + 系统启动后自动运行赏金币客户端软件. + + + + &Start curecoin 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 curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + 在路由器上自动打开赏金币端口——只有在您的路由器支持UPnP并且已经开启UPnP的情况下可用。 + + + + + Map port using &UPnP + 使用UPnP映射端口 & + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + 使用SOCKS代理链接赏金币网络(例如. 当使用Tor连接赏金币网络时). + + + + &Connect through SOCKS proxy: + &通过SOCK代理连接网络: + + + + Proxy &IP: + 代理 &IP: + + + + IP address of the proxy (e.g. 127.0.0.1) + 代理的IP地址 (e.g. 127.0.0.1) + + + + &Port: + &端口: + + + + Port of the proxy (e.g. 9050) + 代理端口 (e.g. 9050) + + + + SOCKS &Version: + SOCKS &版本: + + + + SOCKS version of the proxy (e.g. 5) + 代理的SOCKS版本 (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 curecoin. + 此处设置界面语言重启客户端后生效. + + + + &Unit to show amounts in: + &货币单位: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + 选择发送货币时的默认货币单位. + + + + Whether to show curecoin addresses in the transaction list or not. + 交易列表中是否显示赏金币地址. + + + + &Display addresses in transaction list + &在交易列表中显示地址 + + + + &OK + &确认 + + + + &Cancel + &取消 + + + + &Apply + &应用 + + + + default + 默认 + + + + + Warning + 警告 + + + + + This setting will take effect after restarting curecoin. + 重启赏金币客户端后生效. + + + + The supplied proxy address is invalid. + 代理地址无效. + + + + OverviewPage + + + Form + 窗口 + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + 显示的信息可能过期。,当客户端与赏金币网络建立连接后,会自动进行同步,现在同步过程还没有完成。 + + + + Balance: + 余额: + + + + Stake: + 利息: + + + + Number of transactions: + 交易笔数: + + + + Unconfirmed: + 未确认的: + + + + Wallet + 钱包 + + + + Immature: + 未成熟的: + + + + Mined balance that has not yet matured + 未成熟的帐户余额 + + + + <b>Recent transactions</b> + <b>当前交易</b> + + + + Your current balance + 当前余额 + + + + 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 + 尚未确认的利息余额,未计入当前余额 + + + + Total number of transactions in wallet + 钱包交易总笔数 + + + + + out of sync + 未同步 + + + + QRCodeDialog + + + QR Code Dialog + 显示二维码 + + + + Request Payment + 请求支付 + + + + Amount: + 金额: + + + + Label: + 标签: + + + + Message: + 消息: + + + + &Save As... + &另存为... + + + + Error encoding URI into QR Code. + 将URI写入二维码时错误. + + + + The entered amount is invalid, please check. + 输入金额无效,请检查。 + + + + Resulting URI too long, try to reduce the text for label / message. + URI过长,请缩短标签/消息的长度. + + + + Save QR Code + 保存二维码 + + + + PNG Images (*.png) + PNG 图片 (*.png) + + + + RPCConsole + + + Client name + 客户端名称 + + + + + + + + + + + + + N/A + N/A + + + + Client version + 客户端版本 + + + + &Information + &信息 + + + + Using OpenSSL version + OpenSSL版本 + + + + Startup time + 启动时间 + + + + Network + 网络 + + + + Number of connections + 连接节点数 + + + + On testnet + 是否Testnet + + + + Block chain + 区块链 + + + + Current number of blocks + 当前区块数 + + + + Estimated total blocks + 预计总区块数 + + + + Last block time + 上一区块时间 + + + + &Open + &打开 + + + + Command-line options + 命令行选项 + + + + Show the curecoin-Qt help message to get a list with possible curecoin command-line options. + 显示赏金币帮助消息,获得赏金币命令行命令. + + + + &Show + &显示 + + + + &Console + &控制台 + + + + Build date + 编译时间 + + + + curecoin - Debug window + 赏金币 - 调试窗口 + + + + curecoin Core + 赏金币核心信息 + + + + Debug log file + 调试日志 + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + 打开当前数据文件夹下的调试日志,若调试日志文件很大,可能花费较长时间。 + + + + Clear console + 清空控制台 + + + + Welcome to the curecoin RPC console. + 欢迎使用赏金币RPC控制台 + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + 使用上下方向键选择历史命令,使用 <b>Ctrl-L</b> 清空输出窗口. + + + + Type <b>help</b> for an overview of available commands. + 输入 <b>help</b> 显示可用命令. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + 发送货币 + + + + Send to multiple recipients at once + 同时发送给多个接受者 + + + + Add &Recipient + 增加接收者 + + + + Remove all transaction fields + 清空已填写交易信息 + + + + Clear &All + 清空 &全部 + + + + Balance: + 余额: + + + + 123.456 BTC + 123.456 BTC + + + + Confirm the send action + 确认发送操作 + + + + S&end + 发送 + + + + <b>%1</b> to %2 (%3) + <b>%1</b> to %2 (%3) + + + + Confirm send coins + 确认发送货币 + + + + Are you sure you want to send %1? + 确认发送 %1? + + + + and + + + + + The recipient address is not valid, please recheck. + 接收地址无效,请重新检查. + + + + The amount to pay must be larger than 0. + 付款金额必须大于 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. + 错误:交易被拒绝. 可能是因为您钱包里的货币已经被发送, 例如当你使用了一个复制的钱包文件,并且该钱包中的货币已经被使用并且没有在钱包里标记为已使用. + + + + 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. 4Zo1ga6xuKuQ7JV7M9rGDoxdbYwV5zgQJ5) + 发送目的地址 + + + + Choose address from address book + 从地址簿选择地址 + + + + Alt+A + Alt+A + + + + Paste address from clipboard + 从剪切板粘贴地址 + + + + Alt+P + Alt+P + + + + Remove this recipient + 删除此接收者 + + + + Enter a valid curecoin address + 输入有效的赏金币地址 + + + + 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. + 通过对你的地址进行签名,以证明你拥有这些地址. 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 + 对该消息进行签名的地址是 + + + + + 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 curecoin address + 签名该消息以证明你拥有这个赏金币地址 + + + + Reset all sign message fields + 重置所有签名数据栏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 + 消息签名使用的地址 + + + + Verify the message to ensure it was signed with the specified curecoin address + 验证该消息是否由特定的赏金币地址签名的 + + + + Reset all verify message fields + 重置所有验证签名数据栏 + + + + + Enter a valid curecoin address + 输入有效的赏金币地址 + + + + Click "Sign Message" to generate signature + 点击 "消息签名" 来生成消息的签名 + + + + Enter curecoin 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 + 打开直到 %1 + + + + Open for %n block(s) + + 打开 %n block + + + + + %1/offline + %1/离线 + + + + %1/unconfirmed + %1/未确认 + + + + %1 confirmations + %1 个确认 + + + + Status + 状态 + + + + , broadcast through %n node(s) + + , 通过 %n 个节点广播 + + + + + Date + 日期 + + + + Source + 来源 + + + + Generated + 生成 + + + + + From + 接收于 + + + + + + To + 发送到 + + + + + own address + 自身地址 + + + + label + 标签 + + + + + + + + Credit + 到账 + + + + matures in %n more block(s) + + 需要 %n 个区块才能成熟 + + + + + not accepted + 未接受 + + + + + + + Debit + 金额 + + + + Transaction fee + 交易手续费 + + + + Net amount + 网络金额 + + + + Message + 消息 + + + + Comment + 留言 + + + + Transaction ID + 交易 ID + + + + Generated coins must mature 30 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. + 新生产的赏金币必须等待30个数据块之后才能被使用. 当您生产出此数据块,它将被广播至赏金币网络并添加至数据链. 如果添加到数据链失败, 它的状态将变成"不被接受",生产的赏金币将不能使用. 在您生产新数据块的几秒钟内, 如果其它节点也生产出同样的数据块,有可能会发生这种情况. + + + + Staked coins must wait 30 blocks before they can return to balance and be spent. When you generated this proof-of-stake block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be a valid stake. This may occasionally happen if another node generates a proof-of-stake block within a few seconds of yours. + 通过利息获得的赏金币必须等待30个数据块之后才能被使用. 当您生产出此数据块,它将被广播至赏金币网络并添加至数据链. 如果添加到数据链失败, 它的状态将变成"不被接受",生产的赏金币将不能使用. 在您生产新数据块的几秒钟内, 如果其它节点也生产出同样的数据块,有可能会发生这种情况. + + + + Debug information + 调试信息 + + + + Transaction + 交易 + + + + Inputs + 输入 + + + + Amount + 金额 + + + + true + true + + + + false + 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 for %n block(s) + + Open for %n block + + + + + Open until %1 + Open until %1 + + + + Offline (%1 confirmations) + 离线 (%1 个确认) + + + + Unconfirmed (%1 of %2 confirmations) + 未确认 (%1 of %2 个确认) + + + + Confirmed (%1 confirmations) + 已确认 (%1 个确认) + + + + Mined balance will be available when it matures in %n more block(s) + + 挖矿产生的数据块在 %n 个区块后成熟 + + + + + 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) + (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 + 复制金额 + + + + Edit label + 编辑标签 + + + + Show transaction details + 显示交易详情 + + + + Export Transaction Data + 导出交易数据 + + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + + Confirmed + 已确认 + + + + Date + 日期 + + + + Type + 类型 + + + + Label + 标签 + + + + Address + 地址 + + + + Amount + 金额 + + + + ID + ID + + + + Error exporting + 导出错误 + + + + Could not write to file %1. + 无法写入文件 %1. + + + + Range: + 范围: + + + + to + + + + + WalletModel + + + Sending... + 发送中... + + + + curecoin-core + + + curecoin version + 赏金币版本 + + + + Usage: + 使用方法: + + + + Send command to -server or curecoind + 发送命令到-server或curecoind + + + + List commands + 命令列表 + + + + Get help for a command + 获取某个命令的帮助 + + + + Options: + 选项: + + + + Specify configuration file (default: curecoin.conf) + 制定配置文件(默认: curecoin.conf) + + + + Specify pid file (default: curecoind.pid) + 指定pid文件(默认: curecoind.pid) + + + + Generate coins + 生成货币 + + + + Don't generate coins + Don't generate coins + + + + Specify data directory + 指定数据文件夹 + + + + Set database cache size in megabytes (default: 25) + 设置数据缓存大小(MB为单位)(默认: 25) + + + + Set database disk log size in megabytes (default: 100) + Set database disk log size in megabytes (default: 100) + + + + Listen for connections on <port> (default: 7777 or testnet: 17777) + Listen for connections on <port> (default: 8333 or testnet: 18333) + + + + Maintain at most <n> connections to peers (default: 125) + Maintain at most <n> connections to peers (default: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + Connect to a node to retrieve peer addresses, and disconnect + + + + Specify your own public address + Specify your own public address + + + + Bind to given address. Use [host]:port notation for IPv6 + Bind to given address. Use [host]:port notation for IPv6 + + + + Threshold for disconnecting misbehaving peers (default: 100) + Threshold for disconnecting misbehaving peers (default: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + 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) + 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: 8344 or testnet: 18344) + + + + + Accept command line and JSON-RPC commands + 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 + Run in the background as a daemon and accept commands + + + + Use the test network + Use the test network + + + + Accept connections from outside (default: 1 if no -proxy or -connect) + 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) + 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: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin will not work properly. + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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. + + + + 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. + 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 + Attempt to recover private keys from a corrupt wallet.dat + + + + Block creation options: + Block creation options: + + + + Connect only to the specified node(s) + Connect only to the specified node(s) + + + + Discover own IP address (default: 1 when listening and no -externalip) + Discover own IP address (default: 1 when listening and no -externalip) + + + + Failed to listen on any port. Use -listen=0 if you want this. + Failed to listen on any port. Use -listen=0 if you want this. + + + + Find peers using DNS lookup (default: 0) + Find peers using DNS lookup (default: 0) + + + + Invalid -tor address: '%s' + Invalid -tor address: '%s' + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + + + + Output extra debugging information. Implies all other -debug* options + Output extra debugging information. Implies all other -debug* options + + + + Output extra network debugging information + Output extra network debugging information + + + + Prepend debug output with timestamp + Prepend debug output with timestamp + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL options: (see the curecoin Wiki for SSL setup instructions) + + + + Select the version of socks proxy to use (4-5, default: 5) + 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 console instead of debug.log file + + + + Send trace/debug info to debugger + Send trace/debug info to debugger + + + + Set maximum block size in bytes (default: 250000) + Set maximum block size in bytes (default: 250000) + + + + Set minimum block size in bytes (default: 0) + Set minimum block size in bytes (default: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Shrink debug.log file on client startup (default: 1 when no -debug) + + + + Specify connection timeout in milliseconds (default: 5000) + Specify connection timeout in milliseconds (default: 5000) + + + + Use UPnP to map the listening port (default: 0) + Use UPnP to map the listening port (default: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + Use UPnP to map the listening port (default: 1 when listening) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + Use proxy to reach tor hidden services (default: same as -proxy) + + + + Username for JSON-RPC connections + Username for JSON-RPC connections + + + + Verifying database integrity... + + + + + Warning: Disk space is low! + Warning: Disk space is low! + + + + Warning: This version is obsolete, upgrade required! + Warning: This version is obsolete, upgrade required! + + + + wallet.dat corrupt, salvage failed + + + + + Password for JSON-RPC connections + Password for JSON-RPC connections + + + + Allow JSON-RPC connections from specified IP address + Allow JSON-RPC connections from specified IP address + + + + Send commands to node running on <ip> (default: 127.0.0.1) + 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 the best block changes (%s in cmd is replaced by block hash) + + + + Upgrade wallet to latest format + Upgrade wallet to latest format + + + + Set key pool size to <n> (default: 100) + Set key pool size to <n> (default: 100) + + + + Rescan the block chain for missing wallet transactions + Rescan the block chain for missing wallet transactions + + + + How many blocks to check at startup (default: 2500, 0 = all) + How many blocks to check at startup (default: 2500, 0 = all) + + + + How thorough the block verification is (0-6, default: 1) + How thorough the block verification is (0-6, default: 1) + + + + Imports blocks from external blk000?.dat file + Imports blocks from external blk000?.dat file + + + + Use OpenSSL (https) for JSON-RPC connections + Use OpenSSL (https) for JSON-RPC connections + + + + Server certificate file (default: server.cert) + Server certificate file (default: server.cert) + + + + Server private key (default: server.pem) + Server private key (default: server.pem) + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + This help message + This help message + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + Cannot obtain a lock on data directory %s. curecoin is probably already running. + + + + curecoin + curecoin + + + + 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) + + + + Connect through socks proxy + Connect through socks proxy + + + + Allow DNS lookups for -addnode, -seednode and -connect + Allow DNS lookups for -addnode, -seednode and -connect + + + + Loading addresses... + 加载地址... + + + + Error loading blkindex.dat + 加载blkindex.dat失败 + + + + Error loading wallet.dat: Wallet corrupted + 加载钱包文件wallet.dat失败: 钱包已损坏 + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + 加载钱包文件wallet.dat失败: 钱包需要新版本的客户端才能运行 + + + + Wallet needed to be rewritten: restart curecoin to complete + Wallet needed to be rewritten: restart curecoin to complete + + + + Error loading wallet.dat + Error loading wallet.dat + + + + Invalid -proxy address: '%s' + Invalid -proxy address: '%s' + + + + Unknown network specified in -onlynet: '%s' + Unknown network specified in -onlynet: '%s' + + + + Unknown -socks proxy version requested: %i + Unknown -socks proxy version requested: %i + + + + Cannot resolve -bind address: '%s' + Cannot resolve -bind address: '%s' + + + + Cannot resolve -externalip address: '%s' + Cannot resolve -externalip address: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + Invalid amount for -paytxfee=<amount>: '%s' + + + + Error: could not start node + Error: could not start node + + + + Sending... + Sending... + + + + Invalid amount + Invalid amount + + + + Insufficient funds + Insufficient funds + + + + Loading block index... + 加载区块索引... + + + + Add a node to connect to and attempt to keep the connection open + Add a node to connect to and attempt to keep the connection open + + + + Unable to bind to %s on this computer. curecoin is probably already running. + Unable to bind to %s on this computer. curecoin is probably already running. + + + + Find peers using internet relay chat (default: 1) + Find peers using internet relay chat (default: 1) + + + + Fee per KB to add to transactions you send + Fee per KB to add to transactions you send + + + + Loading wallet... + Loading wallet... + + + + Cannot downgrade wallet + Cannot downgrade wallet + + + + Cannot initialize keypool + Cannot initialize keypool + + + + Cannot write default address + Cannot write default address + + + + Rescanning... + Rescanning... + + + + Done loading + 加载完成 + + + + To use the %s option + To use the %s option + + + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=curecoinrpc +rpcpassword=%s +(you do not need to remember this password) +If the file does not exist, create it with owner-readable-only file permissions. + + %s, you must set a rpcpassword in the configuration file: + %s +It is recommended you use the following random password: +rpcuser=curecoinrpc +rpcpassword=%s +(you do not need to remember this password) +If the file does not exist, create it with owner-readable-only file permissions. + + + + + Error + 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. + You must set rpcpassword=<password> in the configuration file: +%s +If the file does not exist, create it with owner-readable-only file permissions. + + + diff --git a/src/qt/locale/curecoin_zh_TW.qm b/src/qt/locale/curecoin_zh_TW.qm new file mode 100644 index 0000000..603ca8e Binary files /dev/null and b/src/qt/locale/curecoin_zh_TW.qm differ diff --git a/src/qt/locale/curecoin_zh_TW.ts b/src/qt/locale/curecoin_zh_TW.ts new file mode 100644 index 0000000..71b0041 --- /dev/null +++ b/src/qt/locale/curecoin_zh_TW.ts @@ -0,0 +1,2955 @@ + +UTF-8 + + AboutDialog + + + About curecoin + 關於賞金幣 + + + + <b>curecoin</b> version + <b>賞金幣</b>版本 + + + + +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. + +這是一套實驗性的軟體. + +此軟體是依據 MIT/X11 軟體授權條款散布, 詳情請見附帶的 COPYING 檔案, 或是以下網站: http://www.opensource.org/licenses/mit-license.php. + +此產品也包含了由 OpenSSL Project 所開發的 OpenSSL Toolkit (http://www.openssl.org/) 軟體, 由 Eric Young (eay@cryptsoft.com) 撰寫的加解密軟體, 以及由 Thomas Bernard 所撰寫的 UPnP 軟體. + + + + Copyright + 版權 + + + + Dr. Kimoto Chan + 賞金幣開發人員 + + + + 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 curecoin 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 + 顯示 &QR 條碼 + + + + Sign a message to prove you own a curecoin address + 簽署訊息是用來證明賞金幣位址是你的 + + + + Sign &Message + 訊息簽署 + + + + Delete the currently selected address from the list + 從列表中刪除目前選取的位址 + + + + Export the data in the current tab to a file + 將目前分頁的資料匯出存成檔案 + + + + &Export + 匯出 + + + + Verify a message to ensure it was signed with a specified curecoin address + 驗證訊息是用來確認訊息是用指定的賞金幣位址簽署的 + + + + &Verify Message + 訊息驗證 + + + + &Delete + 刪除 + + + + These are your curecoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + 這是你用來付款的賞金幣位址. 在付錢之前, 務必要檢查金額和收款位址是否正確. + + + + Copy &Label + 複製標記 + + + + &Edit + 編輯 + + + + Send &Coins + 付錢 + + + + Export Address Book Data + 匯出位址簿資料 + + + + Comma separated file (*.csv) + 逗號區隔資料檔 (*.csv) + + + + Error exporting + 匯出失敗 + + + + Could not write to file %1. + 無法寫入檔案 %1. + + + + AddressTableModel + + + Label + 標記 + + + + Address + 位址 + + + + (no label) + (沒有標記) + + + + AskPassphraseDialog + + + Passphrase Dialog + 密碼對話視窗 + + + + Enter passphrase + 輸入密碼 + + + + New passphrase + 新的密碼 + + + + Repeat new passphrase + 重複新密碼 + + + + 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>. + 輸入錢包的新密碼.<br/>請用<b>10個以上的字元</b>, 或是<b>8個以上的單字</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 curecoinS</b>! + 警告: 如果將錢包加密後忘記密碼, 你會<b>失去其中所有的賞金幣</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 + 錢包已加密 + + + + curecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your curecoins 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. + 錢包密碼變更成功. + + + + curecoinGUI + + + Sign &message... + 訊息簽署... + + + + Synchronizing with network... + 網路同步中... + + + + &Overview + 總覽 + + + + Show general overview of wallet + 顯示錢包一般總覽 + + + + &Transactions + 交易 + + + + Browse transaction history + 瀏覽交易紀錄 + + + + Edit the list of stored addresses and labels + 編輯位址與標記的儲存列表 + + + + Show the list of addresses for receiving payments + 顯示收款位址的列表 + + + + E&xit + 結束 + + + + Quit application + 結束應用程式 + + + + Show information about curecoin + 顯示賞金幣相關資訊 + + + + About &Qt + 關於 &Qt + + + + Show information about Qt + 顯示有關於 Qt 的資訊 + + + + &Options... + 選項... + + + + &Encrypt Wallet... + 錢包加密... + + + + &Backup Wallet... + 錢包備份... + + + + &Change Passphrase... + 密碼變更... + + + + Importing blocks from disk... + 從磁碟匯入區塊中... + + + + Reindexing blocks on disk... + 重建磁碟區塊索引中... + + + + Send coins to a curecoin address + 付錢到賞金幣位址 + + + + Modify configuration options for curecoin + 修改賞金幣的設定選項 + + + + Backup wallet to another location + 將錢包備份到其它地方 + + + + Change the passphrase used for wallet encryption + 變更錢包加密用的密碼 + + + + &Debug window + 除錯視窗 + + + + Open debugging and diagnostic console + 開啓除錯與診斷主控台 + + + + &Verify message... + 驗證訊息... + + + + + curecoin + 賞金幣 + + + + Wallet + 錢包 + + + + &Send + 付出 + + + + &Receive + 收受 + + + + &Addresses + 位址 + + + + &About curecoin + 關於賞金幣 + + + + &Show / Hide + 顯示或隱藏 + + + + Show or hide the main Window + 顯示或隱藏主視窗 + + + + Encrypt the private keys that belong to your wallet + 將屬於你的錢包的密鑰加密 + + + + Sign messages with your curecoin addresses to prove you own them + 用賞金幣位址簽署訊息來證明那是你的 + + + + Verify messages to ensure they were signed with specified curecoin addresses + 驗證訊息來確認是用指定的賞金幣位址簽署的 + + + + &File + 檔案 + + + + &Settings + 設定 + + + + &Help + 求助 + + + + Tabs toolbar + 分頁工具列 + + + + + [testnet] + [testnet] + + + + curecoin client + 賞金幣客戶端軟體 + + + + %n active connection(s) to curecoin network + 與賞金幣網路有 %n 個連線在使用中 + + + + No block source available... + 目前沒有區塊來源... + + + + Processed %1 of %2 (estimated) blocks of transaction history. + 已處理了估計全部 %2 個中的 %1 個區塊的交易紀錄. + + + + Processed %1 blocks of transaction history. + 已處理了 %1 個區塊的交易紀錄. + + + + %n hour(s) + %n 個小時 + + + + %n day(s) + %n 天 + + + + %n week(s) + %n 個星期 + + + + %1 behind + 落後 %1 + + + + Last received block was generated %1 ago. + 最近收到的區塊是在 %1 之前生產出來. + + + + Transactions after this will not yet be visible. + 會看不見在這之後的交易. + + + + Error + 錯誤 + + + + Warning + 警告 + + + + Information + 資訊 + + + + 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 的費用來傳送, 這筆費用會付給處理你的交易的節點, 並幫助維持整個網路. 你願意支付這項費用嗎? + + + + Up to date + 最新狀態 + + + + Catching up... + 進度追趕中... + + + + 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 curecoin 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> + + + + A fatal error occurred. curecoin can no longer continue safely and will quit. + 發生了致命的錯誤. 賞金幣程式無法再繼續安全執行, 只好結束. + + + + ClientModel + + + Network Alert + 網路警報 + + + + 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. + 輸入的位址"%1"已存在於位址簿中. + + + + The entered address "%1" is not a valid curecoin address. + 輸入的位址 "%1" 並不是有效的賞金幣位址. + + + + Could not unlock wallet. + 無法將錢包解鎖. + + + + New key generation failed. + 新密鑰產生失敗. + + + + GUIUtil::HelpMessageBox + + + + curecoin-Qt + 賞金幣-Qt + + + + version + 版本 + + + + Usage: + 用法: + + + + command-line options + 命令列選項 + + + + UI options + 使用界面選項 + + + + Set language, for example "de_DE" (default: system locale) + 設定語言, 比如說 "de_DE" (預設: 系統語系) + + + + Start minimized + 啓動時最小化 + + + + + Show splash screen on startup (default: 1) + 顯示啓動畫面 (預設: 1) + + + + OptionsDialog + + + Options + 選項 + + + + &Main + 主要 + + + + Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. + 非必要的交易手續費, 以 kB 為計費單位, 且有助於縮短你的交易處理時間. 大部份交易資料的大小是 1 kB. + + + + Pay transaction &fee + 付交易手續費 + + + + Automatically start curecoin after logging in to the system. + 在登入系統後自動啓動賞金幣. + + + + &Start curecoin on system login + 系統登入時啟動賞金幣 + + + + Reset all client options to default. + 回復所有客戶端軟體選項成預設值. + + + + &Reset Options + 選項回復 + + + + &Network + 網路 + + + + Automatically open the curecoin client port on the router. This only works when your router supports UPnP and it is enabled. + 自動在路由器上開啟 curecoin 的客戶端通訊埠. 只有在你的路由器支援 UPnP 且開啟時才有作用. + + + + Map port using &UPnP + 用 &UPnP 設定通訊埠對應 + + + + Connect to the curecoin network through a SOCKS proxy (e.g. when connecting through Tor). + 透過 SOCKS 代理伺服器連線至賞金幣網路 (比如說要透過 Tor 連線). + + + + &Connect through SOCKS proxy: + 透過 SOCKS 代理伺服器連線: + + + + Proxy &IP: + 代理伺服器位址: + + + + IP address of the proxy (e.g. 127.0.0.1) + 代理伺服器的網際網路位址 (比如說 127.0.0.1) + + + + &Port: + 通訊埠: + + + + Port of the proxy (e.g. 9050) + 代理伺服器的通訊埠 (比如說 9050) + + + + SOCKS &Version: + SOCKS 協定版本: + + + + SOCKS version of the proxy (e.g. 5) + 代理伺服器的 SOCKS 協定版本 (比如說 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 curecoin. + 可以在這裡設定使用者介面的語言. 這個設定在賞金幣程式重啓後才會生效. + + + + &Unit to show amounts in: + 金額顯示單位: + + + + Choose the default subdivision unit to show in the interface and when sending coins. + 選擇操作界面與付錢時預設顯示的細分單位. + + + + Whether to show curecoin addresses in the transaction list or not. + 是否要在交易列表中顯示賞金幣位址. + + + + &Display addresses in transaction list + 在交易列表顯示位址 + + + + &OK + + + + + &Cancel + 取消 + + + + &Apply + 套用 + + + + default + 預設 + + + + Confirm options reset + 確認回復選項 + + + + Some settings may require a client restart to take effect. + 有些設定可能需要重新啓動客戶端軟體才會生效. + + + + Do you want to proceed? + 你想要就做下去嗎? + + + + + Warning + 警告 + + + + + This setting will take effect after restarting curecoin. + 這個設定會在賞金幣程式重啓後生效. + + + + The supplied proxy address is invalid. + 提供的代理伺服器位址無效 + + + + OverviewPage + + + Form + 表單 + + + + + The displayed information may be out of date. Your wallet automatically synchronizes with the curecoin network after a connection is established, but this process has not completed yet. + 顯示的資訊可能是過期的. 與賞金幣網路的連線建立後, 你的錢包會自動和網路同步, 但這個步驟還沒完成. + + + + Balance: + 餘額: + + + + Unconfirmed: + 未確認額: + + + + Wallet + 錢包 + + + + Immature: + 未熟成 + + + + Mined balance that has not yet matured + 尚未熟成的開採金額 + + + + <b>Recent transactions</b> + <b>最近交易</b> + + + + Your current balance + 目前餘額 + + + + Total of transactions that have yet to be confirmed, and do not yet count toward the current balance + 尚未確認之交易的總額, 不包含在目前餘額中 + + + + + out of sync + 沒同步 + + + + PaymentServer + + + Cannot start curecoin: click-to-pay handler + 無法啟動 curecoin 隨按隨付處理器 + + + + QRCodeDialog + + + QR Code Dialog + QR 條碼對話視窗 + + + + Request Payment + 付款單 + + + + Amount: + 金額: + + + + Label: + 標記: + + + + Message: + 訊息: + + + + &Save As... + 儲存為... + + + + Error encoding URI into QR Code. + 將 URI 編碼成 QR 條碼失敗 + + + + The entered amount is invalid, please check. + 輸入的金額無效, 請檢查看看. + + + + Resulting URI too long, try to reduce the text for label / message. + 造出的網址太長了,請把標籤或訊息的文字縮短再試看看. + + + + Save QR Code + 儲存 QR 條碼 + + + + PNG Images (*.png) + PNG 圖檔 (*.png) + + + + RPCConsole + + + Client name + 客戶端軟體名稱 + + + + + + + + + + + + + N/A + + + + + Client version + 客戶端軟體版本 + + + + &Information + 資訊 + + + + Using OpenSSL version + 使用 OpenSSL 版本 + + + + 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 curecoin-Qt help message to get a list with possible curecoin command-line options. + 顯示賞金幣-Qt的求助訊息, 來取得可用的命令列選項列表. + + + + &Show + 顯示 + + + + &Console + 主控台 + + + + Build date + 建置日期 + + + + curecoin - Debug window + 賞金幣 - 除錯視窗 + + + + curecoin Core + 賞金幣核心 + + + + Debug log file + 除錯紀錄檔 + + + + Open the curecoin debug log file from the current data directory. This can take a few seconds for large log files. + 從目前的資料目錄下開啓賞金幣的除錯紀錄檔. 當紀錄檔很大時可能要花好幾秒的時間. + + + + Clear console + 清主控台 + + + + Welcome to the curecoin RPC console. + 歡迎使用賞金幣 RPC 主控台. + + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + 請用上下游標鍵來瀏覽歷史指令, 且可用 <b>Ctrl-L</b> 來清理畫面. + + + + Type <b>help</b> for an overview of available commands. + 請打 <b>help</b> 來看可用指令的簡介. + + + + SendCoinsDialog + + + + + + + + + + Send Coins + 付錢 + + + + Send to multiple recipients at once + 一次付給多個人 + + + + Add &Recipient + 加收款人 + + + + Remove all transaction fields + 移除所有交易欄位 + + + + Clear &All + 全部清掉 + + + + Balance: + 餘額: + + + + 123.456 MEC + 123.456 MEC + + + + Confirm the send action + 確認付款動作 + + + + S&end + 付出 + + + + <b>%1</b> to %2 (%3) + <b>%1</b> 給 %2 (%3) + + + + Confirm send coins + 確認要付錢 + + + + Are you sure you want to send %1? + 確定要付出 %1 嗎? + + + + and + + + + + The recipient address is not valid, please recheck. + 無效的收款位址, 請再檢查看看. + + + + The amount to pay must be larger than 0. + 付款金額必須大於 0. + + + + The amount exceeds your balance. + 金額超過餘額了. + + + + The total exceeds your balance when the %1 transaction fee is included. + 包含 %1 的交易手續費後, 總金額超過你的餘額了. + + + + 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. + 錯誤: 交易被拒絕. 有時候會發生這種錯誤, 是因為你錢包中的一些錢已經被花掉了. 比如說你複製了錢包檔 wallet.dat, 然後用複製的錢包花掉了錢, 你現在所用的原來的錢包中卻沒有該筆交易紀錄. + + + + SendCoinsEntry + + + Form + 表單 + + + + A&mount: + 金額: + + + + Pay &To: + 付給: + + + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + 付款的目標位址 (比如說 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + Enter a label for this address to add it to your address book + 輸入一個標記給這個位址, 並加到位址簿中 + + + + &Label: + 標記: + + + + Choose address from address book + 從位址簿中選一個位址 + + + + Alt+A + Alt+A + + + + Paste address from clipboard + 從剪貼簿貼上位址 + + + + Alt+P + Alt+P + + + + Remove this recipient + 去掉這個收款人 + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + 輸入賞金幣位址 (比如說 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + 用來簽署訊息的位址 (比如說 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + + 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 + 在這裡輸入你想簽署的訊息 + + + + Signature + 簽章 + + + + Copy the current signature to the system clipboard + 複製目前的簽章到系統剪貼簿 + + + + Sign the message to prove you own this curecoin address + 簽署訊息是用來證明這個賞金幣位址是你的 + + + + Sign &Message + 訊息簽署 + + + + 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. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + 簽署該訊息的位址 (比如說 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Verify the message to ensure it was signed with the specified curecoin address + 驗證訊息是用來確認訊息是用指定的賞金幣位址簽署的 + + + + Verify &Message + 訊息驗證 + + + + Reset all verify message fields + 重置所有訊息驗證欄位 + + + + + Enter a curecoin address (e.g. MNS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + 輸入賞金幣位址 (比如說 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + + + + Click "Sign Message" to generate signature + 按"訊息簽署"來產生簽章 + + + + Enter curecoin 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. + 訊息已驗證. + + + + SplashScreen + + + Dr. Kimoto Chan + 賞金幣開發人員 + + + + [testnet] + [testnet] + + + + TransactionDesc + + + Open until %1 + 在 %1 前未定 + + + + %1/offline + %1/離線中 + + + + %1/unconfirmed + %1/未確認 + + + + %1 confirmations + 經確認 %1 次 + + + + Status + 狀態 + + + + , broadcast through %n node(s) + , 已公告至 %n 個節點 + + + + Date + 日期 + + + + Source + 來源 + + + + Generated + 生產出 + + + + + From + 來處 + + + + + + To + 目的 + + + + + own address + 自己的位址 + + + + label + 標籤 + + + + + + + + Credit + 入帳 + + + + matures in %n more block(s) + 將在 %n 個區塊產出後熟成 + + + + not accepted + 不被接受 + + + + + + + Debit + 出帳 + + + + Transaction fee + 交易手續費 + + + + Net amount + 淨額 + + + + Message + 訊息 + + + + Comment + 附註 + + + + Transaction ID + 交易識別碼 + + + + Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + 生產出來的錢要再等 120 個區塊熟成之後, 才能夠花用. 當你產出區塊時, 它會被公布到網路上, 以被串連至區塊鎖鏈. 如果串連失敗了, 它的狀態就會變成"不被接受", 且不能被花用. 當你產出區塊的幾秒鐘內, 也有其他節點產出區塊的話, 有時候就會發生這種情形. + + + + Debug information + 除錯資訊 + + + + Transaction + 交易 + + + + Inputs + 輸入 + + + + Amount + 金額 + + + + true + + + + + false + + + + + , has not been successfully broadcast yet + , 尚未成功公告出去 + + + + Open for %n more block(s) + 在接下來 %n 個區塊產出前未定 + + + + unknown + 未知 + + + + TransactionDescDialog + + + Transaction details + 交易明細 + + + + This pane shows a detailed description of the transaction + 此版面顯示交易的詳細說明 + + + + TransactionTableModel + + + Date + 日期 + + + + Type + 種類 + + + + Address + 位址 + + + + Amount + 金額 + + + + Open for %n more block(s) + 在接下來 %n 個區塊產出前未定 + + + + Open until %1 + 在 %1 前未定 + + + + Offline (%1 confirmations) + 離線中 (經確認 %1 次) + + + + Unconfirmed (%1 of %2 confirmations) + 未確認 (經確認 %1 次, 應確認 %2 次) + + + + Confirmed (%1 confirmations) + 已確認 (經確認 %1 次) + + + + Mined balance will be available when it matures in %n more block(s) + 開採金額將可在 %n 個區塊熟成後可用 + + + + 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) + 逗號分隔資料檔 (*.csv) + + + + Confirmed + 已確認 + + + + Date + 日期 + + + + Type + 種類 + + + + Label + 標記 + + + + Address + 位址 + + + + Amount + 金額 + + + + ID + 識別碼 + + + + Error exporting + 匯出失敗 + + + + Could not write to file %1. + 無法寫入至 %1 檔案. + + + + Range: + 範圍: + + + + to + + + + + WalletModel + + + Send Coins + 付錢 + + + + WalletView + + + &Export + 匯出 + + + + Export the data in the current tab to a file + 將目前分頁的資料匯出存成檔案 + + + + Backup Wallet + 錢包備份 + + + + Wallet Data (*.dat) + 錢包資料檔 (*.dat) + + + + Backup Failed + 備份失敗 + + + + There was an error trying to save the wallet data to the new location. + 儲存錢包資料到新的地方失敗 + + + + Backup Successful + 備份成功 + + + + The wallet data was successfully saved to the new location. + 錢包的資料已經成功儲存到新的地方了. + + + + curecoin-core + + + curecoin version + 賞金幣版本 + + + + Usage: + 用法: + + + + Send command to -server or curecoind + 送指令給 -server 或 curecoind + + + + + List commands + 列出指令 + + + + + Get help for a command + 取得指令說明 + + + + + Options: + 選項: + + + + + Specify configuration file (default: curecoin.conf) + 指定設定檔 (預設: curecoin.conf) + + + + + Specify pid file (default: curecoind.pid) + 指定行程識別碼檔案 (預設: curecoind.pid) + + + + + Specify data directory + 指定資料目錄 + + + + + Set database cache size in megabytes (default: 25) + 設定資料庫快取大小為多少百萬位元組(MB, 預設: 25) + + + + Listen for connections on <port> (default: 7951 or testnet: 17951) + 在通訊埠 <port> 聽候連線 (預設: 7951, 或若為測試網路: 17951) + + + + Maintain at most <n> connections to peers (default: 125) + 維持與節點連線數的上限為 <n> 個 (預設: 125) + + + + Connect to a node to retrieve peer addresses, and disconnect + 連線到某個節點以取得其它節點的位址, 然後斷線 + + + + Specify your own public address + 指定自己公開的位址 + + + + Threshold for disconnecting misbehaving peers (default: 100) + 與亂搞的節點斷線的臨界值 (預設: 100) + + + + Number of seconds to keep misbehaving peers from reconnecting (default: 86400) + 避免與亂搞的節點連線的秒數 (預設: 86400) + + + + An error occurred while setting up the RPC port %u for listening on IPv4: %s + 在 IPv4 網路上以通訊埠 %u 聽取 RPC 連線時發生錯誤: %s + + + + Listen for JSON-RPC connections on <port> (default: 7950 or testnet: 17950) + 在通訊埠 <port> 聽候 JSON-RPC 連線 (預設: 7950, 或若為測試網路: 17950) + + + + Accept command line and JSON-RPC commands + 接受命令列與 JSON-RPC 指令 + + + + + 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) + 是否接受外來連線 (預設: 當沒有 -proxy 或 -connect 時預設為 1) + + + + %s, you must set a rpcpassword in the configuration file: +%s +It is recommended you use the following random password: +rpcuser=curecoinrpc +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 "curecoin Alert" admin@foo.com + + %s, 你必須要在以下設定檔中設定 RPC 密碼(rpcpassword): +%s +建議你使用以下隨機產生的密碼: +rpcuser=curecoinrpc +rpcpassword=%s +(你不用記住這個密碼) +使用者名稱(rpcuser)和密碼(rpcpassword)不可以相同! +如果設定檔還不存在, 請在新增時, 設定檔案權限為"只有主人才能讀取". +也建議你設定警示通知, 發生問題時你才會被通知到; +比如說設定為: +alertnotify=echo %%s | mail -s "curecoin Alert" admin@foo.com + + + + + An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s + 設定在 IPv6 網路的通訊埠 %u 上聽候 RPC 連線失敗, 退而改用 IPv4 網路: %s + + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + 和指定的位址繫結, 並總是在該位址聽候連線. IPv6 請用 "[主機]:通訊埠" 這種格式 + + + + Cannot obtain a lock on data directory %s. curecoin is probably already running. + 無法鎖定資料目錄 %s. 也許賞金幣已經在執行了. + + + + 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: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds! + 錯誤: 這筆交易需要至少 %s 的手續費! 因為它的金額太大, 或複雜度太高, 或是使用了最近才剛收到的款項. + + + + Execute command when a relevant alert is received (%s in cmd is replaced by message) + 當收到相關警示時所要執行的指令 (指令中的 %s 會被取代為警示訊息) + + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + 當錢包有交易改變時所要執行的指令 (指令中的 %s 會被取代為交易識別碼) + + + + Set maximum size of high-priority/low-fee transactions in bytes (default: 27000) + 設定高優先權或低手續費的交易資料大小上限為多少位元組 (預設: 27000) + + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + 這是尚未發表的測試版本 - 使用請自負風險 - 請不要用於開採或商業應用 + + + + Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + 警告: -paytxfee 設定了很高的金額! 這可是你交易付款所要付的手續費. + + + + Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. + 警告: 顯示的交易可能不正確! 你可能需要升級, 或者需要等其它的節點升級. + + + + Warning: Please check that your computer's date and time are correct! If your clock is wrong curecoin 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 失敗了! 所有的密鑰都正確讀取了, 但是交易資料或位址簿資料可能會缺少或不正確. + + + + 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. + 警告: 錢包檔 wallet.dat 壞掉, 但資料被拯救回來了! 原來的 wallet.dat 會改儲存在 %s, 檔名為 wallet.{timestamp}.bak. 如果餘額或交易資料有誤, 你應該要用備份資料復原回來. + + + + Attempt to recover private keys from a corrupt wallet.dat + 嘗試從壞掉的錢包檔 wallet.dat 復原密鑰 + + + + Block creation options: + 區塊產生選項: + + + + Connect only to the specified node(s) + 只連線至指定節點(可多個) + + + + Corrupted block database detected + 發現區塊資料庫壞掉了 + + + + Discover own IP address (default: 1 when listening and no -externalip) + 找出自己的網際網路位址 (預設: 當有聽候連線且沒有 -externalip 時為 1) + + + + Do you want to rebuild the block database now? + 你要現在重建區塊資料庫嗎? + + + + Error initializing block database + 初始化區塊資料庫失敗 + + + + Error initializing wallet database environment %s! + 錢包資料庫環境 %s 初始化錯誤! + + + + Error loading block database + 載入區塊資料庫失敗 + + + + Error opening block database + 打開區塊資料庫檔案失敗 + + + + Error: Disk space is low! + 錯誤: 磁碟空間很少! + + + + Error: Wallet locked, unable to create transaction! + 錯誤: 錢包被上鎖了, 無法產生新的交易! + + + + Error: system error: + 錯誤: 系統錯誤: + + + + Failed to listen on any port. Use -listen=0 if you want this. + 在任意的通訊埠聽候失敗. 如果你想的話可以用 -listen=0. + + + + Failed to read block info + 讀取區塊資訊失敗 + + + + Failed to read block + 讀取區塊失敗 + + + + Failed to sync block index + 同步區塊索引失敗 + + + + Failed to write block index + 寫入區塊索引失敗 + + + + Failed to write block info + 寫入區塊資訊失敗 + + + + Failed to write block + 寫入區塊失敗 + + + + Failed to write file info + 寫入檔案資訊失敗 + + + + Failed to write to coin database + 寫入賞金幣資料庫失敗 + + + + Failed to write transaction index + 寫入交易索引失敗 + + + + Failed to write undo data + 寫入回復資料失敗 + + + + Find peers using DNS lookup (default: 1 unless -connect) + 是否允許在找節點時使用域名查詢 (預設: 當沒用 -connect 時為 1) + + + + Generate coins (default: 0) + 生產賞金幣 (預設值: 0) + + + + How many blocks to check at startup (default: 288, 0 = all) + 啓動時檢查的區塊數 (預設: 288, 指定 0 表示全部) + + + + How thorough the block verification is (0-4, default: 3) + 區塊檢查的仔細程度 (0 至 4, 預設: 3) + + + + Not enough file descriptors available. + 檔案描述器不足. + + + + Rebuild block chain index from current blk000??.dat files + 從目前的區塊檔 blk000??.dat 重建鎖鏈索引 + + + + Set the number of threads to service RPC calls (default: 4) + 設定處理 RPC 服務請求的執行緒數目 (預設為 4) + + + + Verifying blocks... + 驗證區塊資料中... + + + + Verifying wallet... + 驗證錢包資料中... + + + + Imports blocks from external blk000??.dat file + 從其它來源的 blk000??.dat 檔匯入區塊 + + + + Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0) + 設定指令碼驗證的執行緒數目 (最多為 16, 若為 0 表示程式自動決定, 小於 0 表示保留不用的處理器核心數目, 預設為 0) + + + + Information + 資訊 + + + + Invalid -tor address: '%s' + 無效的 -tor 位址: '%s' + + + + Invalid amount for -minrelaytxfee=<amount>: '%s' + 設定 -minrelaytxfee=<金額> 的金額無效: '%s' + + + + Invalid amount for -mintxfee=<amount>: '%s' + 設定 -mintxfee=<amount> 的金額無效: '%s' + + + + Maintain a full transaction index (default: 0) + 維護全部交易的索引 (預設為 0) + + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) + 每個連線的接收緩衝區大小上限為 <n>*1000 個位元組 (預設: 5000) + + + + Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) + 每個連線的傳送緩衝區大小上限為 <n>*1000 位元組 (預設: 1000) + + + + Only accept block chain matching built-in checkpoints (default: 1) + 只接受與內建的檢查段點吻合的區塊鎖鏈 (預設: 1) + + + + Only connect to nodes in network <net> (IPv4, IPv6 or Tor) + 只和 <net> 網路上的節點連線 (IPv4, IPv6, 或 Tor) + + + + Output extra debugging information. Implies all other -debug* options + 輸出額外的除錯資訊. 包含了其它所有的 -debug* 選項 + + + + Output extra network debugging information + 輸出額外的網路除錯資訊 + + + + Prepend debug output with timestamp + 在除錯輸出內容前附加時間 + + + + SSL options: (see the curecoin Wiki for SSL setup instructions) + SSL 選項: (SSL 設定程序請見 curecoin Wiki) + + + + Select the version of socks proxy to use (4-5, default: 5) + 選擇 SOCKS 代理伺服器的協定版本(4 或 5, 預設: 5) + + + + Send trace/debug info to console instead of debug.log file + 在終端機顯示追蹤或除錯資訊, 而非寫到 debug.log 檔 + + + + Send trace/debug info to debugger + 輸出追蹤或除錯資訊給除錯器 + + + + Set maximum block size in bytes (default: 250000) + 設定區塊大小上限為多少位元組 (預設: 250000) + + + + Set minimum block size in bytes (default: 0) + 設定區塊大小下限為多少位元組 (預設: 0) + + + + Shrink debug.log file on client startup (default: 1 when no -debug) + 客戶端軟體啓動時將 debug.log 檔縮小 (預設: 當沒有 -debug 時為 1) + + + + Signing transaction failed + 簽署交易失敗 + + + + Specify connection timeout in milliseconds (default: 5000) + 指定連線在幾毫秒後逾時 (預設: 5000) + + + + System error: + 系統錯誤: + + + + Transaction amount too small + 交易金額太小 + + + + Transaction amounts must be positive + 交易金額必須是正的 + + + + Transaction too large + 交易位元量太大 + + + + Use UPnP to map the listening port (default: 0) + 是否使用通用即插即用(UPnP)協定來設定聽候連線的通訊埠 (預設: 0) + + + + Use UPnP to map the listening port (default: 1 when listening) + 是否使用通用即插即用(UPnP)協定來設定聽候連線的通訊埠 (預設: 當有聽候連線為 1) + + + + Use proxy to reach tor hidden services (default: same as -proxy) + 透過代理伺服器來使用 Tor 隱藏服務 (預設: 同 -proxy) + + + + Username for JSON-RPC connections + JSON-RPC 連線使用者名稱 + + + + Warning + 警告 + + + + Warning: This version is obsolete, upgrade required! + 警告: 這個版本已經被淘汰掉了, 必須要升級! + + + + You need to rebuild the databases using -reindex to change -txindex + 改變 -txindex 參數後, 必須要用 -reindex 參數來重建資料庫 + + + + wallet.dat corrupt, salvage failed + 錢包檔 weallet.dat 壞掉了, 拯救失敗 + + + + Password for JSON-RPC connections + JSON-RPC 連線密碼 + + + + Allow JSON-RPC connections from specified IP address + 只允許從指定網路位址來的 JSON-RPC 連線 + + + + Send commands to node running on <ip> (default: 127.0.0.1) + 送指令給在 <ip> 的節點 (預設: 127.0.0.1) + + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + 當最新區塊改變時所要執行的指令 (指令中的 %s 會被取代為區塊的雜湊值) + + + + Upgrade wallet to latest format + 將錢包升級成最新的格式 + + + + Set key pool size to <n> (default: 100) + 設定密鑰池大小為 <n> (預設: 100) + + + + + Rescan the block chain for missing wallet transactions + 重新掃描區塊鎖鏈, 以尋找錢包所遺漏的交易. + + + + Use OpenSSL (https) for JSON-RPC connections + 於 JSON-RPC 連線使用 OpenSSL (https) + + + + + Server certificate file (default: server.cert) + 伺服器憑證檔 (預設: server.cert) + + + + + Server private key (default: server.pem) + 伺服器密鑰檔 (預設: server.pem) + + + + + Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + 可以接受的加密法 (預設: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH) + + + + + This help message + 此協助訊息 + + + + + Unable to bind to %s on this computer (bind returned error %d, %s) + 無法和這台電腦上的 %s 繫結 (繫結回傳錯誤 %d, %s) + + + + Connect through socks proxy + 透過 SOCKS 代理伺服器連線 + + + + Allow DNS lookups for -addnode, -seednode and -connect + 允許對 -addnode, -seednode, -connect 的參數使用域名查詢 + + + + Loading addresses... + 載入位址中... + + + + Error loading wallet.dat: Wallet corrupted + 載入檔案 wallet.dat 失敗: 錢包壞掉了 + + + + Error loading wallet.dat: Wallet requires newer version of curecoin + 載入檔案 wallet.dat 失敗: 此錢包需要新版的 curecoin + + + + Wallet needed to be rewritten: restart curecoin to complete + 錢包需要重寫: 請重啟賞金幣來完成 + + + + Error loading wallet.dat + 載入檔案 wallet.dat 失敗 + + + + Invalid -proxy address: '%s' + 無效的 -proxy 位址: '%s' + + + + Unknown network specified in -onlynet: '%s' + 在 -onlynet 指定了不明的網路別: '%s' + + + + Unknown -socks proxy version requested: %i + 在 -socks 指定了不明的代理協定版本: %i + + + + Cannot resolve -bind address: '%s' + 無法解析 -bind 位址: '%s' + + + + Cannot resolve -externalip address: '%s' + 無法解析 -externalip 位址: '%s' + + + + Invalid amount for -paytxfee=<amount>: '%s' + 設定 -paytxfee=<金額> 的金額無效: '%s' + + + + 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. curecoin is probably already running. + 無法和這台電腦上的 %s 繫結. 也許賞金幣已經在執行了. + + + + Fee per KB to add to transactions you send + 交易付款時每 KB 的交易手續費 + + + + Loading wallet... + 載入錢包中... + + + + Cannot downgrade wallet + 無法將錢包格式降級 + + + + Cannot write default address + 無法寫入預設位址 + + + + Rescanning... + 重新掃描中... + + + + Done loading + 載入完成 + + + + To use the %s option + 為了要使用 %s 選項 + + + + 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. + 你必須在下列設定檔中設定 RPC 密碼(rpcpassword=<password>): +%s +如果這個檔案還不存在, 請在新增時, 設定檔案權限為"只有主人才能讀取". + + + \ No newline at end of file diff --git a/src/qt/macdockiconhandler.h b/src/qt/macdockiconhandler.h new file mode 100644 index 0000000..2092fb2 --- /dev/null +++ b/src/qt/macdockiconhandler.h @@ -0,0 +1,44 @@ +#ifndef MACDOCKICONHANDLER_H +#define MACDOCKICONHANDLER_H + +#include + +class QMenu; +class QIcon; +class QWidget; + +#ifdef __OBJC__ +@class DockIconClickEventHandler; +#else +class DockIconClickEventHandler; +#endif + +/** Macintosh-specific dock icon handler. + */ +class MacDockIconHandler : public QObject +{ + Q_OBJECT +public: + ~MacDockIconHandler(); + + QMenu *dockMenu(); + void setIcon(const QIcon &icon); + + static MacDockIconHandler *instance(); + + void handleDockIconClickEvent(); + +signals: + void dockIconClicked(); + +public slots: + +private: + MacDockIconHandler(); + + DockIconClickEventHandler *m_dockIconClickEventHandler; + QWidget *m_dummyWidget; + QMenu *m_dockMenu; +}; + +#endif // MACDOCKICONCLICKHANDLER_H diff --git a/src/qt/macdockiconhandler.mm b/src/qt/macdockiconhandler.mm new file mode 100644 index 0000000..7568440 --- /dev/null +++ b/src/qt/macdockiconhandler.mm @@ -0,0 +1,99 @@ + +#include "macdockiconhandler.h" + +#include +#include + +extern void qt_mac_set_dock_menu(QMenu*); + +#undef slots +#include + +@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); + qt_mac_set_dock_menu(this->m_dockMenu); + [pool release]; +} + +MacDockIconHandler::~MacDockIconHandler() +{ + [this->m_dockIconClickEventHandler release]; + delete this->m_dummyWidget; +} + +QMenu *MacDockIconHandler::dockMenu() +{ + return this->m_dockMenu; +} + +void MacDockIconHandler::setIcon(const QIcon &icon) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSImage *image; + if (icon.isNull()) + image = [[NSImage imageNamed:@"NSApplicationIcon"] retain]; + else { + QSize size = icon.actualSize(QSize(128, 128)); + QPixmap pixmap = icon.pixmap(size); + CGImageRef cgImage = pixmap.toMacCGImageRef(); + image = [[NSImage alloc] initWithCGImage:cgImage size:NSZeroSize]; + CFRelease(cgImage); + } + + [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() +{ + emit this->dockIconClicked(); +} diff --git a/src/qt/monitoreddatamapper.cpp b/src/qt/monitoreddatamapper.cpp new file mode 100644 index 0000000..88948d0 --- /dev/null +++ b/src/qt/monitoreddatamapper.cpp @@ -0,0 +1,36 @@ +#include "monitoreddatamapper.h" + +#include +#include +#include + +MonitoredDataMapper::MonitoredDataMapper(QObject *parent) : + QDataWidgetMapper(parent) +{ +} + + +void MonitoredDataMapper::addMapping(QWidget *widget, int section) +{ + QDataWidgetMapper::addMapping(widget, section); + addChangeMonitor(widget); +} + +void MonitoredDataMapper::addMapping(QWidget *widget, int section, const QByteArray &propertyName) +{ + QDataWidgetMapper::addMapping(widget, section, propertyName); + addChangeMonitor(widget); +} + +void MonitoredDataMapper::addChangeMonitor(QWidget *widget) +{ + // Watch user property of widget for changes, and connect + // the signal to our viewModified signal. + QMetaProperty prop = widget->metaObject()->userProperty(); + int signal = prop.notifySignalIndex(); + int method = this->metaObject()->indexOfMethod("viewModified()"); + if(signal != -1 && method != -1) + { + QMetaObject::connect(widget, signal, this, method); + } +} diff --git a/src/qt/monitoreddatamapper.h b/src/qt/monitoreddatamapper.h new file mode 100644 index 0000000..33a874e --- /dev/null +++ b/src/qt/monitoreddatamapper.h @@ -0,0 +1,31 @@ +#ifndef MONITOREDDATAMAPPER_H +#define MONITOREDDATAMAPPER_H + +#include + +QT_BEGIN_NAMESPACE +class QWidget; +QT_END_NAMESPACE + +/** Data to Widget mapper that watches for edits and notifies listeners when a field is edited. + This can be used, for example, to enable a commit/apply button in a configuration dialog. + */ +class MonitoredDataMapper : public QDataWidgetMapper +{ + Q_OBJECT +public: + explicit MonitoredDataMapper(QObject *parent=0); + + void addMapping(QWidget *widget, int section); + void addMapping(QWidget *widget, int section, const QByteArray &propertyName); +private: + void addChangeMonitor(QWidget *widget); + +signals: + void viewModified(); + +}; + + + +#endif // MONITOREDDATAMAPPER_H diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp new file mode 100644 index 0000000..8028190 --- /dev/null +++ b/src/qt/notificator.cpp @@ -0,0 +1,302 @@ +#include "notificator.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef USE_DBUS +#include +#include +#endif + +#ifdef Q_OS_MAC +#include +extern bool qt_mac_execute_apple_script(const QString &script, AEDesc *ret); +#endif + +// https://wiki.ubuntu.com/NotificationDevelopmentGuidelines recommends at least 128 +const int FREEDESKTOP_NOTIFICATION_ICON_SIZE = 128; + +Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, QWidget *parent): + QObject(parent), + parent(parent), + programName(programName), + mode(None), + trayIcon(trayicon) +#ifdef USE_DBUS + ,interface(0) +#endif +{ + if(trayicon && trayicon->supportsMessages()) + { + mode = QSystemTray; + } +#ifdef USE_DBUS + interface = new QDBusInterface("org.freedesktop.Notifications", + "/org/freedesktop/Notifications", "org.freedesktop.Notifications"); + if(interface->isValid()) + { + mode = Freedesktop; + } +#endif +#ifdef Q_OS_MAC + // Check if Growl is installed (based on Qt's tray icon implementation) + CFURLRef cfurl; + OSStatus status = LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator, CFSTR("growlTicket"), kLSRolesAll, 0, &cfurl); + if (status != kLSApplicationNotFoundErr) { + CFBundleRef bundle = CFBundleCreate(0, cfurl); + if (CFStringCompare(CFBundleGetIdentifier(bundle), CFSTR("com.Growl.GrowlHelperApp"), kCFCompareCaseInsensitive | kCFCompareBackwards) == kCFCompareEqualTo) { + if (CFStringHasSuffix(CFURLGetString(cfurl), CFSTR("/Growl.app/"))) + mode = Growl13; + else + mode = Growl12; + } + CFRelease(cfurl); + CFRelease(bundle); + } +#endif +} + +Notificator::~Notificator() +{ +#ifdef USE_DBUS + delete interface; +#endif +} + +#ifdef USE_DBUS + +// Loosely based on http://www.qtcentre.org/archive/index.php/t-25879.html +class FreedesktopImage +{ +public: + FreedesktopImage() {} + FreedesktopImage(const QImage &img); + + static int metaType(); + + // Image to variant that can be marshalled over DBus + static QVariant toVariant(const QImage &img); + +private: + int width, height, stride; + bool hasAlpha; + int channels; + int bitsPerSample; + QByteArray image; + + friend QDBusArgument &operator<<(QDBusArgument &a, const FreedesktopImage &i); + friend const QDBusArgument &operator>>(const QDBusArgument &a, FreedesktopImage &i); +}; + +Q_DECLARE_METATYPE(FreedesktopImage); + +// Image configuration settings +const int CHANNELS = 4; +const int BYTES_PER_PIXEL = 4; +const int BITS_PER_SAMPLE = 8; + +FreedesktopImage::FreedesktopImage(const QImage &img): + width(img.width()), + height(img.height()), + stride(img.width() * BYTES_PER_PIXEL), + hasAlpha(true), + channels(CHANNELS), + bitsPerSample(BITS_PER_SAMPLE) +{ + // Convert 00xAARRGGBB to RGBA bytewise (endian-independent) format + QImage tmp = img.convertToFormat(QImage::Format_ARGB32); + const uint32_t *data = reinterpret_cast(tmp.constBits()); + + unsigned int num_pixels = width * height; + image.resize(num_pixels * BYTES_PER_PIXEL); + + for(unsigned int ptr = 0; ptr < num_pixels; ++ptr) + { + image[ptr*BYTES_PER_PIXEL+0] = data[ptr] >> 16; // R + image[ptr*BYTES_PER_PIXEL+1] = data[ptr] >> 8; // G + image[ptr*BYTES_PER_PIXEL+2] = data[ptr]; // B + image[ptr*BYTES_PER_PIXEL+3] = data[ptr] >> 24; // A + } +} + +QDBusArgument &operator<<(QDBusArgument &a, const FreedesktopImage &i) +{ + a.beginStructure(); + a << i.width << i.height << i.stride << i.hasAlpha << i.bitsPerSample << i.channels << i.image; + a.endStructure(); + return a; +} + +const QDBusArgument &operator>>(const QDBusArgument &a, FreedesktopImage &i) +{ + a.beginStructure(); + a >> i.width >> i.height >> i.stride >> i.hasAlpha >> i.bitsPerSample >> i.channels >> i.image; + a.endStructure(); + return a; +} + +int FreedesktopImage::metaType() +{ + return qDBusRegisterMetaType(); +} + +QVariant FreedesktopImage::toVariant(const QImage &img) +{ + FreedesktopImage fimg(img); + return QVariant(FreedesktopImage::metaType(), &fimg); +} + +void Notificator::notifyDBus(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout) +{ + Q_UNUSED(cls); + // Arguments for DBus call: + QList args; + + // Program Name: + args.append(programName); + + // Unique ID of this notification type: + args.append(0U); + + // Application Icon, empty string + args.append(QString()); + + // Summary + args.append(title); + + // Body + args.append(text); + + // Actions (none, actions are deprecated) + QStringList actions; + args.append(actions); + + // Hints + QVariantMap hints; + + // If no icon specified, set icon based on class + QIcon tmpicon; + if(icon.isNull()) + { + QStyle::StandardPixmap sicon = QStyle::SP_MessageBoxQuestion; + switch(cls) + { + case Information: sicon = QStyle::SP_MessageBoxInformation; break; + case Warning: sicon = QStyle::SP_MessageBoxWarning; break; + case Critical: sicon = QStyle::SP_MessageBoxCritical; break; + default: break; + } + tmpicon = QApplication::style()->standardIcon(sicon); + } + else + { + tmpicon = icon; + } + hints["icon_data"] = FreedesktopImage::toVariant(tmpicon.pixmap(FREEDESKTOP_NOTIFICATION_ICON_SIZE).toImage()); + args.append(hints); + + // Timeout (in msec) + args.append(millisTimeout); + + // "Fire and forget" + interface->callWithArgumentList(QDBus::NoBlock, "Notify", args); +} +#endif + +void Notificator::notifySystray(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout) +{ + Q_UNUSED(icon); + QSystemTrayIcon::MessageIcon sicon = QSystemTrayIcon::NoIcon; + switch(cls) // Set icon based on class + { + case Information: sicon = QSystemTrayIcon::Information; break; + case Warning: sicon = QSystemTrayIcon::Warning; break; + case Critical: sicon = QSystemTrayIcon::Critical; break; + } + trayIcon->showMessage(title, text, sicon, millisTimeout); +} + +// Based on Qt's tray icon implementation +#ifdef Q_OS_MAC +void Notificator::notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon) +{ + const QString script( + "tell application \"%5\"\n" + " set the allNotificationsList to {\"Notification\"}\n" // -- Make a list of all the notification types (all) + " set the enabledNotificationsList to {\"Notification\"}\n" // -- Make a list of the notifications (enabled) + " register as application \"%1\" all notifications allNotificationsList default notifications enabledNotificationsList\n" // -- Register our script with Growl + " notify with name \"Notification\" title \"%2\" description \"%3\" application name \"%1\"%4\n" // -- Send a Notification + "end tell" + ); + + QString notificationApp(QApplication::applicationName()); + if (notificationApp.isEmpty()) + notificationApp = "Application"; + + QPixmap notificationIconPixmap; + if (icon.isNull()) { // If no icon specified, set icon based on class + QStyle::StandardPixmap sicon = QStyle::SP_MessageBoxQuestion; + switch (cls) + { + case Information: sicon = QStyle::SP_MessageBoxInformation; break; + case Warning: sicon = QStyle::SP_MessageBoxWarning; break; + case Critical: sicon = QStyle::SP_MessageBoxCritical; break; + } + notificationIconPixmap = QApplication::style()->standardPixmap(sicon); + } + else { + QSize size = icon.actualSize(QSize(48, 48)); + notificationIconPixmap = icon.pixmap(size); + } + + QString notificationIcon; + QTemporaryFile notificationIconFile; + if (!notificationIconPixmap.isNull() && notificationIconFile.open()) { + QImageWriter writer(¬ificationIconFile, "PNG"); + if (writer.write(notificationIconPixmap.toImage())) + notificationIcon = QString(" image from location \"file://%1\"").arg(notificationIconFile.fileName()); + } + + QString quotedTitle(title), quotedText(text); + quotedTitle.replace("\\", "\\\\").replace("\"", "\\"); + quotedText.replace("\\", "\\\\").replace("\"", "\\"); + QString growlApp(this->mode == Notificator::Growl13 ? "Growl" : "GrowlHelperApp"); + qt_mac_execute_apple_script(script.arg(notificationApp, quotedTitle, quotedText, notificationIcon, growlApp), 0); +} +#endif + +void Notificator::notify(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout) +{ + switch(mode) + { +#ifdef USE_DBUS + case Freedesktop: + notifyDBus(cls, title, text, icon, millisTimeout); + break; +#endif + case QSystemTray: + notifySystray(cls, title, text, icon, millisTimeout); + break; +#ifdef Q_OS_MAC + case Growl12: + case Growl13: + notifyGrowl(cls, title, text, icon); + break; +#endif + default: + if(cls == Critical) + { + // Fall back to old fashioned pop-up dialog if critical and no other notification available + QMessageBox::critical(parent, title, text, QMessageBox::Ok, QMessageBox::Ok); + } + break; + } +} diff --git a/src/qt/notificator.h b/src/qt/notificator.h new file mode 100644 index 0000000..abb4710 --- /dev/null +++ b/src/qt/notificator.h @@ -0,0 +1,69 @@ +#ifndef NOTIFICATOR_H +#define NOTIFICATOR_H + +#include +#include + +QT_BEGIN_NAMESPACE +class QSystemTrayIcon; +#ifdef USE_DBUS +class QDBusInterface; +#endif +QT_END_NAMESPACE + +/** Cross-platform desktop notification client. */ +class Notificator: public QObject +{ + Q_OBJECT +public: + /** Create a new notificator. + @note Ownership of trayIcon is not transferred to this object. + */ + Notificator(const QString &programName=QString(), QSystemTrayIcon *trayIcon=0, QWidget *parent=0); + ~Notificator(); + + // Message class + enum Class + { + Information, /**< Informational message */ + Warning, /**< Notify user of potential problem */ + Critical /**< An error occurred */ + }; + +public slots: + + /** Show notification message. + @param[in] cls general message class + @param[in] title title shown with message + @param[in] text message content + @param[in] icon optional icon to show with message + @param[in] millisTimeout notification timeout in milliseconds (defaults to 10 seconds) + @note Platform implementations are free to ignore any of the provided fields except for \a text. + */ + void notify(Class cls, const QString &title, const QString &text, + const QIcon &icon = QIcon(), int millisTimeout = 10000); + +private: + QWidget *parent; + enum Mode { + None, /**< Ignore informational notifications, and show a modal pop-up dialog for Critical notifications. */ + Freedesktop, /**< Use DBus org.freedesktop.Notifications */ + QSystemTray, /**< Use QSystemTray::showMessage */ + Growl12, /**< Use the Growl 1.2 notification system (Mac only) */ + Growl13 /**< Use the Growl 1.3 notification system (Mac only) */ + }; + QString programName; + Mode mode; + QSystemTrayIcon *trayIcon; +#ifdef USE_DBUS + QDBusInterface *interface; + + void notifyDBus(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout); +#endif + void notifySystray(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout); +#ifdef Q_OS_MAC + void notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon); +#endif +}; + +#endif // NOTIFICATOR_H diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp new file mode 100644 index 0000000..ce85e12 --- /dev/null +++ b/src/qt/optionsdialog.cpp @@ -0,0 +1,256 @@ +#include "optionsdialog.h" +#include "ui_optionsdialog.h" + +#include "curecoinunits.h" +#include "monitoreddatamapper.h" +#include "netbase.h" +#include "optionsmodel.h" + +#include +#include +#include +#include +#include +#include + +OptionsDialog::OptionsDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::OptionsDialog), + model(0), + mapper(0), + fRestartWarningDisplayed_Proxy(false), + fRestartWarningDisplayed_Lang(false), + fProxyIpValid(true) +{ + ui->setupUi(this); + + /* Network elements init */ +#ifndef USE_UPNP + ui->mapPortUpnp->setEnabled(false); +#endif + + ui->proxyIp->setEnabled(false); + ui->proxyPort->setEnabled(false); + ui->proxyPort->setValidator(new QIntValidator(1, 65535, this)); + + ui->socksVersion->setEnabled(false); + ui->socksVersion->addItem("5", 5); + ui->socksVersion->addItem("4", 4); + ui->socksVersion->setCurrentIndex(0); + + connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->proxyIp, SLOT(setEnabled(bool))); + connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->proxyPort, SLOT(setEnabled(bool))); + connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->socksVersion, SLOT(setEnabled(bool))); + connect(ui->connectSocks, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning_Proxy())); + + ui->proxyIp->installEventFilter(this); + + /* Window elements init */ +#ifdef Q_OS_MAC + ui->tabWindow->setVisible(false); +#endif + + /* Display elements init */ + QDir translations(":translations"); + ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant("")); + foreach(const QString &langStr, translations.entryList()) + { + QLocale locale(langStr); + + /** check if the locale name consists of 2 parts (language_country) */ + if(langStr.contains("_")) + { +#if QT_VERSION >= 0x040800 + /** display language strings as "native language - native country (locale name)", e.g. "Deutsch - Deutschland (de)" */ + ui->lang->addItem(locale.nativeLanguageName() + QString(" - ") + locale.nativeCountryName() + QString(" (") + langStr + QString(")"), QVariant(langStr)); +#else + /** display language strings as "language - country (locale name)", e.g. "German - Germany (de)" */ + ui->lang->addItem(QLocale::languageToString(locale.language()) + QString(" - ") + QLocale::countryToString(locale.country()) + QString(" (") + langStr + QString(")"), QVariant(langStr)); +#endif + } + else + { +#if QT_VERSION >= 0x040800 + /** display language strings as "native language (locale name)", e.g. "Deutsch (de)" */ + ui->lang->addItem(locale.nativeLanguageName() + QString(" (") + langStr + QString(")"), QVariant(langStr)); +#else + /** display language strings as "language (locale name)", e.g. "German (de)" */ + ui->lang->addItem(QLocale::languageToString(locale.language()) + QString(" (") + langStr + QString(")"), QVariant(langStr)); +#endif + } + } + + ui->unit->setModel(new curecoinUnits(this)); + + /* Widget-to-option mapper */ + mapper = new MonitoredDataMapper(this); + mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit); + mapper->setOrientation(Qt::Vertical); + + /* enable apply button when data modified */ + connect(mapper, SIGNAL(viewModified()), this, SLOT(enableApplyButton())); + /* disable apply button when new data loaded */ + connect(mapper, SIGNAL(currentIndexChanged(int)), this, SLOT(disableApplyButton())); + /* setup/change UI elements when proxy IP is invalid/valid */ + connect(this, SIGNAL(proxyIpValid(QValidatedLineEdit *, bool)), this, SLOT(handleProxyIpValid(QValidatedLineEdit *, bool))); +} + +OptionsDialog::~OptionsDialog() +{ + delete ui; +} + +void OptionsDialog::setModel(OptionsModel *model) +{ + this->model = model; + + if(model) + { + connect(model, SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); + + mapper->setModel(model); + setMapper(); + mapper->toFirst(); + } + + /* update the display unit, to not use the default ("BTC") */ + updateDisplayUnit(); + + /* warn only when language selection changes by user action (placed here so init via mapper doesn't trigger this) */ + connect(ui->lang, SIGNAL(valueChanged()), this, SLOT(showRestartWarning_Lang())); + + /* disable apply button after settings are loaded as there is nothing to save */ + disableApplyButton(); +} + +void OptionsDialog::setMapper() +{ + /* Main */ + mapper->addMapping(ui->transactionFee, OptionsModel::Fee); + mapper->addMapping(ui->curecoinAtStartup, OptionsModel::StartAtStartup); + mapper->addMapping(ui->detachDatabases, OptionsModel::DetachDatabases); + + /* Network */ + mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP); + + mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse); + mapper->addMapping(ui->proxyIp, OptionsModel::ProxyIP); + mapper->addMapping(ui->proxyPort, OptionsModel::ProxyPort); + mapper->addMapping(ui->socksVersion, OptionsModel::ProxySocksVersion); + + /* Window */ +#ifndef Q_OS_MAC + mapper->addMapping(ui->minimizeToTray, OptionsModel::MinimizeToTray); + mapper->addMapping(ui->minimizeOnClose, OptionsModel::MinimizeOnClose); +#endif + + /* Display */ + mapper->addMapping(ui->lang, OptionsModel::Language); + mapper->addMapping(ui->unit, OptionsModel::DisplayUnit); + mapper->addMapping(ui->displayAddresses, OptionsModel::DisplayAddresses); +} + +void OptionsDialog::enableApplyButton() +{ + ui->applyButton->setEnabled(true); +} + +void OptionsDialog::disableApplyButton() +{ + ui->applyButton->setEnabled(false); +} + +void OptionsDialog::enableSaveButtons() +{ + /* prevent enabling of the save buttons when data modified, if there is an invalid proxy address present */ + if(fProxyIpValid) + setSaveButtonState(true); +} + +void OptionsDialog::disableSaveButtons() +{ + setSaveButtonState(false); +} + +void OptionsDialog::setSaveButtonState(bool fState) +{ + ui->applyButton->setEnabled(fState); + ui->okButton->setEnabled(fState); +} + +void OptionsDialog::on_okButton_clicked() +{ + mapper->submit(); + accept(); +} + +void OptionsDialog::on_cancelButton_clicked() +{ + reject(); +} + +void OptionsDialog::on_applyButton_clicked() +{ + mapper->submit(); + disableApplyButton(); +} + +void OptionsDialog::showRestartWarning_Proxy() +{ + if(!fRestartWarningDisplayed_Proxy) + { + QMessageBox::warning(this, tr("Warning"), tr("This setting will take effect after restarting curecoin."), QMessageBox::Ok); + fRestartWarningDisplayed_Proxy = true; + } +} + +void OptionsDialog::showRestartWarning_Lang() +{ + if(!fRestartWarningDisplayed_Lang) + { + QMessageBox::warning(this, tr("Warning"), tr("This setting will take effect after restarting curecoin."), QMessageBox::Ok); + fRestartWarningDisplayed_Lang = true; + } +} + +void OptionsDialog::updateDisplayUnit() +{ + if(model) + { + /* Update transactionFee with the current unit */ + ui->transactionFee->setDisplayUnit(model->getDisplayUnit()); + } +} + +void OptionsDialog::handleProxyIpValid(QValidatedLineEdit *object, bool fState) +{ + // this is used in a check before re-enabling the save buttons + fProxyIpValid = fState; + + if(fProxyIpValid) + { + enableSaveButtons(); + ui->statusLabel->clear(); + } + else + { + disableSaveButtons(); + object->setValid(fProxyIpValid); + ui->statusLabel->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel->setText(tr("The supplied proxy address is invalid.")); + } +} + +bool OptionsDialog::eventFilter(QObject *object, QEvent *event) +{ + if(event->type() == QEvent::FocusOut) + { + if(object == ui->proxyIp) + { + CService addr; + /* Check proxyIp for a valid IPv4/IPv6 address and emit the proxyIpValid signal */ + emit proxyIpValid(ui->proxyIp, LookupNumeric(ui->proxyIp->text().toStdString().c_str(), addr)); + } + } + return QDialog::eventFilter(object, event); +} diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h new file mode 100644 index 0000000..18469f5 --- /dev/null +++ b/src/qt/optionsdialog.h @@ -0,0 +1,60 @@ +#ifndef OPTIONSDIALOG_H +#define OPTIONSDIALOG_H + +#include + +namespace Ui { +class OptionsDialog; +} +class OptionsModel; +class MonitoredDataMapper; +class QValidatedLineEdit; + +/** Preferences dialog. */ +class OptionsDialog : public QDialog +{ + Q_OBJECT + +public: + explicit OptionsDialog(QWidget *parent = 0); + ~OptionsDialog(); + + void setModel(OptionsModel *model); + void setMapper(); + +protected: + bool eventFilter(QObject *object, QEvent *event); + +private slots: + /* enable only apply button */ + void enableApplyButton(); + /* disable only apply button */ + void disableApplyButton(); + /* enable apply button and OK button */ + void enableSaveButtons(); + /* disable apply button and OK button */ + void disableSaveButtons(); + /* set apply button and OK button state (enabled / disabled) */ + void setSaveButtonState(bool fState); + void on_okButton_clicked(); + void on_cancelButton_clicked(); + void on_applyButton_clicked(); + + void showRestartWarning_Proxy(); + void showRestartWarning_Lang(); + void updateDisplayUnit(); + void handleProxyIpValid(QValidatedLineEdit *object, bool fState); + +signals: + void proxyIpValid(QValidatedLineEdit *object, bool fValid); + +private: + Ui::OptionsDialog *ui; + OptionsModel *model; + MonitoredDataMapper *mapper; + bool fRestartWarningDisplayed_Proxy; + bool fRestartWarningDisplayed_Lang; + bool fProxyIpValid; +}; + +#endif // OPTIONSDIALOG_H diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp new file mode 100644 index 0000000..da9656d --- /dev/null +++ b/src/qt/optionsmodel.cpp @@ -0,0 +1,293 @@ +#include "optionsmodel.h" +#include "curecoinunits.h" +#include + +#include "init.h" +#include "walletdb.h" +#include "guiutil.h" + +OptionsModel::OptionsModel(QObject *parent) : + QAbstractListModel(parent) +{ + Init(); +} + +bool static ApplyProxySettings() +{ + QSettings settings; + 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(); + nSocksVersion = 0; + return false; + } + if (nSocksVersion && !addrProxy.IsValid()) + return false; + if (!IsLimited(NET_IPV4)) + SetProxy(NET_IPV4, addrProxy, nSocksVersion); + if (nSocksVersion > 4) { +#ifdef USE_IPV6 + if (!IsLimited(NET_IPV6)) + SetProxy(NET_IPV6, addrProxy, nSocksVersion); +#endif + SetNameProxy(addrProxy, nSocksVersion); + } + return true; +} + +void OptionsModel::Init() +{ + QSettings settings; + + // These are Qt-only settings: + nDisplayUnit = settings.value("nDisplayUnit", curecoinUnits::BTC).toInt(); + bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool(); + fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool(); + fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool(); + nTransactionFee = settings.value("nTransactionFee").toLongLong(); + language = settings.value("language", "").toString(); + + // These are shared with core curecoin; we want + // command-line options to override the GUI settings: + if (settings.contains("fUseUPnP")) + SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool()); + if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool()) + SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString()); + if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool()) + SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString()); + if (settings.contains("detachDB")) + SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool()); + if (!language.isEmpty()) + 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; +} + +QVariant OptionsModel::data(const QModelIndex & index, int role) const +{ + if(role == Qt::EditRole) + { + QSettings settings; + switch(index.row()) + { + case StartAtStartup: + return QVariant(GUIUtil::GetStartOnSystemStartup()); + case MinimizeToTray: + return QVariant(fMinimizeToTray); + case MapPortUPnP: + return settings.value("fUseUPnP", GetBoolArg("-upnp", true)); + case MinimizeOnClose: + return QVariant(fMinimizeOnClose); + case ProxyUse: + return settings.value("fUseProxy", false); + case ProxyIP: { + proxyType proxy; + if (GetProxy(NET_IPV4, proxy)) + return QVariant(QString::fromStdString(proxy.first.ToStringIP())); + else + return QVariant(QString::fromStdString("127.0.0.1")); + } + case ProxyPort: { + proxyType proxy; + if (GetProxy(NET_IPV4, proxy)) + return QVariant(proxy.first.GetPort()); + else + return QVariant(9050); + } + case ProxySocksVersion: + return settings.value("nSocksVersion", 5); + case Fee: + return QVariant(nTransactionFee); + case DisplayUnit: + return QVariant(nDisplayUnit); + case DisplayAddresses: + return QVariant(bDisplayAddresses); + case DetachDatabases: + return QVariant(bitdb.GetDetach()); + case Language: + return settings.value("language", ""); + default: + return QVariant(); + } + } + return QVariant(); +} + +bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, int role) +{ + bool successful = true; /* set to false on parse error */ + if(role == Qt::EditRole) + { + QSettings settings; + switch(index.row()) + { + case StartAtStartup: + successful = GUIUtil::SetStartOnSystemStartup(value.toBool()); + break; + case MinimizeToTray: + fMinimizeToTray = value.toBool(); + settings.setValue("fMinimizeToTray", fMinimizeToTray); + break; + case MapPortUPnP: + fUseUPnP = value.toBool(); + settings.setValue("fUseUPnP", fUseUPnP); + MapPort(); + break; + case MinimizeOnClose: + fMinimizeOnClose = value.toBool(); + settings.setValue("fMinimizeOnClose", fMinimizeOnClose); + break; + case ProxyUse: + settings.setValue("fUseProxy", value.toBool()); + ApplyProxySettings(); + break; + case ProxyIP: { + proxyType proxy; + proxy.first = CService("127.0.0.1", 9050); + GetProxy(NET_IPV4, proxy); + + CNetAddr addr(value.toString().toStdString()); + proxy.first.SetIP(addr); + settings.setValue("addrProxy", proxy.first.ToStringIPPort().c_str()); + successful = ApplyProxySettings(); + } + break; + case ProxyPort: { + proxyType proxy; + proxy.first = CService("127.0.0.1", 9050); + GetProxy(NET_IPV4, proxy); + + proxy.first.SetPort(value.toInt()); + settings.setValue("addrProxy", proxy.first.ToStringIPPort().c_str()); + successful = ApplyProxySettings(); + } + break; + case ProxySocksVersion: { + proxyType proxy; + proxy.second = 5; + GetProxy(NET_IPV4, proxy); + + proxy.second = value.toInt(); + settings.setValue("nSocksVersion", proxy.second); + successful = ApplyProxySettings(); + } + break; + case Fee: + nTransactionFee = value.toLongLong(); + settings.setValue("nTransactionFee", nTransactionFee); + break; + case DisplayUnit: + nDisplayUnit = value.toInt(); + settings.setValue("nDisplayUnit", nDisplayUnit); + emit displayUnitChanged(nDisplayUnit); + break; + case DisplayAddresses: + bDisplayAddresses = value.toBool(); + settings.setValue("bDisplayAddresses", bDisplayAddresses); + break; + case DetachDatabases: { + bool fDetachDB = value.toBool(); + bitdb.SetDetach(fDetachDB); + settings.setValue("detachDB", fDetachDB); + } + break; + case Language: + settings.setValue("language", value); + break; + default: + break; + } + } + emit dataChanged(index, index); + + return successful; +} + +qint64 OptionsModel::getTransactionFee() +{ + return nTransactionFee; +} + +bool OptionsModel::getMinimizeToTray() +{ + return fMinimizeToTray; +} + +bool OptionsModel::getMinimizeOnClose() +{ + return fMinimizeOnClose; +} + +int OptionsModel::getDisplayUnit() +{ + return nDisplayUnit; +} + +bool OptionsModel::getDisplayAddresses() +{ + return bDisplayAddresses; +} diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h new file mode 100644 index 0000000..9146a07 --- /dev/null +++ b/src/qt/optionsmodel.h @@ -0,0 +1,64 @@ +#ifndef OPTIONSMODEL_H +#define OPTIONSMODEL_H + +#include + +/** Interface from Qt to configuration data structure for curecoin 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 + complex. + */ +class OptionsModel : public QAbstractListModel +{ + Q_OBJECT + +public: + explicit OptionsModel(QObject *parent = 0); + + enum OptionID { + StartAtStartup, // bool + MinimizeToTray, // bool + MapPortUPnP, // bool + MinimizeOnClose, // bool + ProxyUse, // bool + ProxyIP, // QString + ProxyPort, // int + ProxySocksVersion, // int + Fee, // qint64 + DisplayUnit, // curecoinUnits::Unit + DisplayAddresses, // bool + DetachDatabases, // bool + Language, // QString + OptionIDRowCount, + }; + + void Init(); + + /* Migrate settings from wallet.dat after app initialization */ + bool Upgrade(); /* returns true if settings upgraded */ + + int rowCount(const QModelIndex & parent = QModelIndex()) const; + QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const; + bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole); + + /* Explicit getters */ + qint64 getTransactionFee(); + bool getMinimizeToTray(); + bool getMinimizeOnClose(); + int getDisplayUnit(); + bool getDisplayAddresses(); + QString getLanguage() { return language; } + +private: + int nDisplayUnit; + bool bDisplayAddresses; + bool fMinimizeToTray; + bool fMinimizeOnClose; + QString language; + +signals: + void displayUnitChanged(int unit); +}; + +#endif // OPTIONSMODEL_H diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp new file mode 100644 index 0000000..3ea0cd7 --- /dev/null +++ b/src/qt/overviewpage.cpp @@ -0,0 +1,208 @@ +#include "overviewpage.h" +#include "ui_overviewpage.h" + +#include "walletmodel.h" +#include "curecoinunits.h" +#include "optionsmodel.h" +#include "transactiontablemodel.h" +#include "transactionfilterproxy.h" +#include "guiutil.h" +#include "guiconstants.h" + +#include +#include + +#define DECORATION_SIZE 64 +#define NUM_ITEMS 3 + +class TxViewDelegate : public QAbstractItemDelegate +{ + Q_OBJECT +public: + TxViewDelegate(): QAbstractItemDelegate(), unit(curecoinUnits::BTC) + { + + } + + inline void paint(QPainter *painter, const QStyleOptionViewItem &option, + const QModelIndex &index ) const + { + painter->save(); + + QIcon icon = qvariant_cast(index.data(Qt::DecorationRole)); + QRect mainRect = option.rect; + QRect decorationRect(mainRect.topLeft(), QSize(DECORATION_SIZE, DECORATION_SIZE)); + int xspace = DECORATION_SIZE + 8; + int ypad = 6; + int halfheight = (mainRect.height() - 2*ypad)/2; + QRect amountRect(mainRect.left() + xspace, mainRect.top()+ypad, mainRect.width() - xspace, halfheight); + QRect addressRect(mainRect.left() + xspace, mainRect.top()+ypad+halfheight, mainRect.width() - xspace, halfheight); + icon.paint(painter, decorationRect); + + QDateTime date = index.data(TransactionTableModel::DateRole).toDateTime(); + QString address = index.data(Qt::DisplayRole).toString(); + qint64 amount = index.data(TransactionTableModel::AmountRole).toLongLong(); + 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); + } + + painter->setPen(foreground); + painter->drawText(addressRect, Qt::AlignLeft|Qt::AlignVCenter, address); + + if(amount < 0) + { + foreground = COLOR_NEGATIVE; + } + else if(!confirmed) + { + foreground = COLOR_UNCONFIRMED; + } + else + { + foreground = option.palette.color(QPalette::Text); + } + painter->setPen(foreground); + QString amountText = curecoinUnits::formatWithUnit(unit, amount, true); + if(!confirmed) + { + amountText = QString("[") + amountText + QString("]"); + } + painter->drawText(amountRect, Qt::AlignRight|Qt::AlignVCenter, amountText); + + painter->setPen(option.palette.color(QPalette::Text)); + painter->drawText(amountRect, Qt::AlignLeft|Qt::AlignVCenter, GUIUtil::dateTimeStr(date)); + + painter->restore(); + } + + inline QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const + { + return QSize(DECORATION_SIZE, DECORATION_SIZE); + } + + int unit; + +}; +#include "overviewpage.moc" + +OverviewPage::OverviewPage(QWidget *parent) : + QWidget(parent), + ui(new Ui::OverviewPage), + currentBalance(-1), + currentStake(0), + currentUnconfirmedBalance(-1), + currentImmatureBalance(-1), + txdelegate(new TxViewDelegate()), + filter(0) +{ + ui->setupUi(this); + + // Recent transactions + ui->listTransactions->setItemDelegate(txdelegate); + ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE)); + ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2)); + ui->listTransactions->setAttribute(Qt::WA_MacShowFocusRect, false); + + connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SLOT(handleTransactionClicked(QModelIndex))); + + // init "out of sync" warning labels + ui->labelWalletStatus->setText("(" + tr("out of sync") + ")"); + ui->labelTransactionsStatus->setText("(" + tr("out of sync") + ")"); + + QPalette p; + p.setColor(QPalette::WindowText,Qt::red); + ui->label_curecoin_Intro->setPalette(p); + + + // start with displaying the "out of sync" warnings + showOutOfSyncWarning(true); +} + +void OverviewPage::handleTransactionClicked(const QModelIndex &index) +{ + if(filter) + emit transactionClicked(filter->mapToSource(index)); +} + +OverviewPage::~OverviewPage() +{ + delete ui; +} + +void OverviewPage::setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBalance, qint64 immatureBalance) +{ + int unit = model->getOptionsModel()->getDisplayUnit(); + currentBalance = balance; + currentStake = stake; + currentUnconfirmedBalance = unconfirmedBalance; + currentImmatureBalance = immatureBalance; + ui->labelBalance->setText(curecoinUnits::formatWithUnit(unit, balance)); + ui->labelStake->setText(curecoinUnits::formatWithUnit(unit, stake)); + ui->labelUnconfirmed->setText(curecoinUnits::formatWithUnit(unit, unconfirmedBalance)); + ui->labelImmature->setText(curecoinUnits::formatWithUnit(unit, immatureBalance)); + + // only show immature (newly mined) balance if it's non-zero, so as not to complicate things + // for the non-mining users + bool showImmature = immatureBalance != 0; + ui->labelImmature->setVisible(showImmature); + ui->labelImmatureText->setVisible(showImmature); +} + +void OverviewPage::setNumTransactions(int count) +{ + ui->labelNumTransactions->setText(QLocale::system().toString(count)); +} + +void OverviewPage::setModel(WalletModel *model) +{ + this->model = model; + if(model && model->getOptionsModel()) + { + // Set up transaction list + filter = new TransactionFilterProxy(); + filter->setSourceModel(model->getTransactionTableModel()); + filter->setLimit(NUM_ITEMS); + filter->setDynamicSortFilter(true); + filter->setSortRole(Qt::EditRole); + filter->sort(TransactionTableModel::Status, Qt::DescendingOrder); + + ui->listTransactions->setModel(filter); + ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress); + + // Keep up to date with wallet + 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 ("BTC") + updateDisplayUnit(); +} + +void OverviewPage::updateDisplayUnit() +{ + if(model && model->getOptionsModel()) + { + if(currentBalance != -1) + setBalance(currentBalance, model->getStake(), currentUnconfirmedBalance, currentImmatureBalance); + + // Update txdelegate->unit with the current unit + txdelegate->unit = model->getOptionsModel()->getDisplayUnit(); + + ui->listTransactions->update(); + } +} + +void OverviewPage::showOutOfSyncWarning(bool fShow) +{ + ui->labelWalletStatus->setVisible(fShow); + ui->labelTransactionsStatus->setVisible(fShow); +} diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h new file mode 100644 index 0000000..59fbb1d --- /dev/null +++ b/src/qt/overviewpage.h @@ -0,0 +1,52 @@ +#ifndef OVERVIEWPAGE_H +#define OVERVIEWPAGE_H + +#include + +QT_BEGIN_NAMESPACE +class QModelIndex; +QT_END_NAMESPACE + +namespace Ui { + class OverviewPage; +} +class WalletModel; +class TxViewDelegate; +class TransactionFilterProxy; + +/** Overview ("home") page widget */ +class OverviewPage : public QWidget +{ + Q_OBJECT + +public: + explicit OverviewPage(QWidget *parent = 0); + ~OverviewPage(); + + void setModel(WalletModel *model); + void showOutOfSyncWarning(bool fShow); + +public slots: + void setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBalance, qint64 immatureBalance); + void setNumTransactions(int count); + +signals: + void transactionClicked(const QModelIndex &index); + +private: + Ui::OverviewPage *ui; + WalletModel *model; + qint64 currentBalance; + qint64 currentStake; + qint64 currentUnconfirmedBalance; + qint64 currentImmatureBalance; + + TxViewDelegate *txdelegate; + TransactionFilterProxy *filter; + +private slots: + void updateDisplayUnit(); + void handleTransactionClicked(const QModelIndex &index); +}; + +#endif // OVERVIEWPAGE_H diff --git a/src/qt/qrcodedialog.cpp b/src/qt/qrcodedialog.cpp new file mode 100644 index 0000000..bab8d1d --- /dev/null +++ b/src/qt/qrcodedialog.cpp @@ -0,0 +1,171 @@ +#include "qrcodedialog.h" +#include "ui_qrcodedialog.h" + +#include "curecoinunits.h" +#include "guiconstants.h" +#include "guiutil.h" +#include "optionsmodel.h" + +#include +#include + +#include + +QRCodeDialog::QRCodeDialog(const QString &addr, const QString &label, bool enableReq, QWidget *parent) : + QDialog(parent), + ui(new Ui::QRCodeDialog), + model(0), + address(addr) +{ + ui->setupUi(this); + + setWindowTitle(QString("%1").arg(address)); + + ui->chkReqPayment->setVisible(enableReq); + ui->lblAmount->setVisible(enableReq); + ui->lnReqAmount->setVisible(enableReq); + + ui->lnLabel->setText(label); + + ui->btnSaveAs->setEnabled(false); + + genCode(); +} + +QRCodeDialog::~QRCodeDialog() +{ + delete ui; +} + +void QRCodeDialog::setModel(OptionsModel *model) +{ + this->model = model; + + if (model) + connect(model, SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); + + // update the display unit, to not use the default ("BTC") + updateDisplayUnit(); +} + +void QRCodeDialog::genCode() +{ + QString uri = getURI(); + + if (uri != "") + { + ui->lblQRCode->setText(""); + + QRcode *code = QRcode_encodeString(uri.toUtf8().constData(), 0, QR_ECLEVEL_L, QR_MODE_8, 1); + if (!code) + { + ui->lblQRCode->setText(tr("Error encoding URI into QR Code.")); + return; + } + myImage = QImage(code->width + 8, code->width + 8, QImage::Format_RGB32); + myImage.fill(0xffffff); + unsigned char *p = code->data; + for (int y = 0; y < code->width; y++) + { + for (int x = 0; x < code->width; x++) + { + myImage.setPixel(x + 4, y + 4, ((*p & 1) ? 0x0 : 0xffffff)); + p++; + } + } + QRcode_free(code); + + ui->lblQRCode->setPixmap(QPixmap::fromImage(myImage).scaled(300, 300)); + + ui->outUri->setPlainText(uri); + } +} + +QString QRCodeDialog::getURI() +{ + QString ret = QString("curecoin:%1").arg(address); + int paramCount = 0; + + ui->outUri->clear(); + + if (ui->chkReqPayment->isChecked()) + { + 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(curecoinUnits::format(curecoinUnits::BTC, ui->lnReqAmount->value())); + paramCount++; + } + else + { + ui->btnSaveAs->setEnabled(false); + ui->lblQRCode->setText(tr("The entered amount is invalid, please check.")); + return QString(""); + } + } + + if (!ui->lnLabel->text().isEmpty()) + { + QString lbl(QUrl::toPercentEncoding(ui->lnLabel->text())); + ret += QString("%1label=%2").arg(paramCount == 0 ? "?" : "&").arg(lbl); + paramCount++; + } + + if (!ui->lnMessage->text().isEmpty()) + { + QString msg(QUrl::toPercentEncoding(ui->lnMessage->text())); + ret += QString("%1message=%2").arg(paramCount == 0 ? "?" : "&").arg(msg); + paramCount++; + } + + // limit URI length to prevent a DoS against the QR-Code dialog + if (ret.length() > MAX_URI_LENGTH) + { + ui->btnSaveAs->setEnabled(false); + ui->lblQRCode->setText(tr("Resulting URI too long, try to reduce the text for label / message.")); + return QString(""); + } + + ui->btnSaveAs->setEnabled(true); + return ret; +} + +void QRCodeDialog::on_lnReqAmount_textChanged() +{ + genCode(); +} + +void QRCodeDialog::on_lnLabel_textChanged() +{ + genCode(); +} + +void QRCodeDialog::on_lnMessage_textChanged() +{ + genCode(); +} + +void QRCodeDialog::on_btnSaveAs_clicked() +{ + QString fn = GUIUtil::getSaveFileName(this, tr("Save QR Code"), QString(), tr("PNG Images (*.png)")); + if (!fn.isEmpty()) + myImage.scaled(EXPORT_IMAGE_SIZE, EXPORT_IMAGE_SIZE).save(fn); +} + +void QRCodeDialog::on_chkReqPayment_toggled(bool fChecked) +{ + if (!fChecked) + // if chkReqPayment is not active, don't display lnReqAmount as invalid + ui->lnReqAmount->setValid(true); + + genCode(); +} + +void QRCodeDialog::updateDisplayUnit() +{ + if (model) + { + // Update lnReqAmount with the current unit + ui->lnReqAmount->setDisplayUnit(model->getDisplayUnit()); + } +} diff --git a/src/qt/qrcodedialog.h b/src/qt/qrcodedialog.h new file mode 100644 index 0000000..c55c34b --- /dev/null +++ b/src/qt/qrcodedialog.h @@ -0,0 +1,41 @@ +#ifndef QRCODEDIALOG_H +#define QRCODEDIALOG_H + +#include +#include + +namespace Ui { + class QRCodeDialog; +} +class OptionsModel; + +class QRCodeDialog : public QDialog +{ + Q_OBJECT + +public: + explicit QRCodeDialog(const QString &addr, const QString &label, bool enableReq, QWidget *parent = 0); + ~QRCodeDialog(); + + void setModel(OptionsModel *model); + +private slots: + void on_lnReqAmount_textChanged(); + void on_lnLabel_textChanged(); + void on_lnMessage_textChanged(); + void on_btnSaveAs_clicked(); + void on_chkReqPayment_toggled(bool fChecked); + + void updateDisplayUnit(); + +private: + Ui::QRCodeDialog *ui; + OptionsModel *model; + QString address; + QImage myImage; + + void genCode(); + QString getURI(); +}; + +#endif // QRCODEDIALOG_H diff --git a/src/qt/qtipcserver.cpp b/src/qt/qtipcserver.cpp new file mode 100644 index 0000000..65646f7 --- /dev/null +++ b/src/qt/qtipcserver.cpp @@ -0,0 +1,162 @@ +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include +#if defined(WIN32) && BOOST_VERSION == 104900 +#define BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME +#define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME +#endif + +#include "qtipcserver.h" +#include "guiconstants.h" +#include "ui_interface.h" +#include "util.h" + +#include +#include +#include +#include + +#if defined(WIN32) && (!defined(BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME) || !defined(BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME) || BOOST_VERSION < 104900) +#warning Compiling without BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME and BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME uncommented in boost/interprocess/detail/tmp_dir_helpers.hpp or using a boost version before 1.49 may have unintended results see svn.boost.org/trac/boost/ticket/5392 +#endif + +using namespace boost; +using namespace boost::interprocess; +using namespace boost::posix_time; + +#if defined MAC_OSX || defined __FreeBSD__ +// URI handling not implemented on OSX yet + +void ipcScanRelay(int argc, char *argv[]) { } +void ipcInit(int argc, char *argv[]) { } + +#else + +static void ipcThread2(void* pArg); + +static bool ipcScanCmd(int argc, char *argv[], bool fRelay) +{ + // Check for URI in argv + bool fSent = false; + for (int i = 1; i < argc; i++) + { + if (boost::algorithm::istarts_with(argv[i], "curecoin:")) + { + const char *strURI = argv[i]; + try { + boost::interprocess::message_queue mq(boost::interprocess::open_only, curecoinURI_QUEUE_NAME); + if (mq.try_send(strURI, strlen(strURI), 0)) + fSent = true; + else if (fRelay) + break; + } + catch (boost::interprocess::interprocess_exception &ex) { + // don't log the "file not found" exception, because that's normal for + // the first start of the first instance + if (ex.get_error_code() != boost::interprocess::not_found_error || !fRelay) + { + printf("main() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what()); + break; + } + } + } + } + return fSent; +} + +void ipcScanRelay(int argc, char *argv[]) +{ + if (ipcScanCmd(argc, argv, true)) + exit(0); +} + +static void ipcThread(void* pArg) +{ + // Make this thread recognisable as the GUI-IPC thread + RenameThread("curecoin-gui-ipc"); + + try + { + ipcThread2(pArg); + } + catch (std::exception& e) { + PrintExceptionContinue(&e, "ipcThread()"); + } catch (...) { + PrintExceptionContinue(NULL, "ipcThread()"); + } + printf("ipcThread exited\n"); +} + +static void ipcThread2(void* pArg) +{ + printf("ipcThread started\n"); + + message_queue* mq = (message_queue*)pArg; + char buffer[MAX_URI_LENGTH + 1] = ""; + size_t nSize = 0; + unsigned int nPriority = 0; + + loop + { + ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(100); + if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d)) + { + uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize)); + Sleep(1000); + } + + if (fShutdown) + break; + } + + // Remove message queue + message_queue::remove(curecoinURI_QUEUE_NAME); + // Cleanup allocated memory + delete mq; +} + +void ipcInit(int argc, char *argv[]) +{ + message_queue* mq = NULL; + char buffer[MAX_URI_LENGTH + 1] = ""; + size_t nSize = 0; + unsigned int nPriority = 0; + + try { + mq = new message_queue(open_or_create, curecoinURI_QUEUE_NAME, 2, MAX_URI_LENGTH); + + // Make sure we don't lose any curecoin: URIs + for (int i = 0; i < 2; i++) + { + ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(1); + if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d)) + { + uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize)); + } + else + break; + } + + // Make sure only one curecoin instance is listening + message_queue::remove(curecoinURI_QUEUE_NAME); + delete mq; + + mq = new message_queue(open_or_create, curecoinURI_QUEUE_NAME, 2, MAX_URI_LENGTH); + } + catch (interprocess_exception &ex) { + printf("ipcInit() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what()); + return; + } + + if (!NewThread(ipcThread, mq)) + { + delete mq; + return; + } + + ipcScanCmd(argc, argv, false); +} + +#endif diff --git a/src/qt/qtipcserver.h b/src/qt/qtipcserver.h new file mode 100644 index 0000000..f74be16 --- /dev/null +++ b/src/qt/qtipcserver.h @@ -0,0 +1,10 @@ +#ifndef QTIPCSERVER_H +#define QTIPCSERVER_H + +// Define curecoin-Qt message queue name +#define curecoinURI_QUEUE_NAME "curecoinURI" + +void ipcScanRelay(int argc, char *argv[]); +void ipcInit(int argc, char *argv[]); + +#endif // QTIPCSERVER_H diff --git a/src/qt/qvalidatedlineedit.cpp b/src/qt/qvalidatedlineedit.cpp new file mode 100644 index 0000000..8ca230c --- /dev/null +++ b/src/qt/qvalidatedlineedit.cpp @@ -0,0 +1,45 @@ +#include "qvalidatedlineedit.h" + +#include "guiconstants.h" + +QValidatedLineEdit::QValidatedLineEdit(QWidget *parent) : + QLineEdit(parent), valid(true) +{ + connect(this, SIGNAL(textChanged(QString)), this, SLOT(markValid())); +} + +void QValidatedLineEdit::setValid(bool valid) +{ + if(valid == this->valid) + { + return; + } + + if(valid) + { + setStyleSheet(""); + } + else + { + setStyleSheet(STYLE_INVALID); + } + this->valid = valid; +} + +void QValidatedLineEdit::focusInEvent(QFocusEvent *evt) +{ + // Clear invalid flag on focus + setValid(true); + QLineEdit::focusInEvent(evt); +} + +void QValidatedLineEdit::markValid() +{ + setValid(true); +} + +void QValidatedLineEdit::clear() +{ + setValid(true); + QLineEdit::clear(); +} diff --git a/src/qt/qvalidatedlineedit.h b/src/qt/qvalidatedlineedit.h new file mode 100644 index 0000000..66e26be --- /dev/null +++ b/src/qt/qvalidatedlineedit.h @@ -0,0 +1,29 @@ +#ifndef QVALIDATEDLINEEDIT_H +#define QVALIDATEDLINEEDIT_H + +#include + +/** Line 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 QValidatedLineEdit : public QLineEdit +{ + Q_OBJECT +public: + explicit QValidatedLineEdit(QWidget *parent = 0); + void clear(); + +protected: + void focusInEvent(QFocusEvent *evt); + +private: + bool valid; + +public slots: + void setValid(bool valid); + +private slots: + void markValid(); +}; + +#endif // QVALIDATEDLINEEDIT_H diff --git a/src/qt/qvaluecombobox.cpp b/src/qt/qvaluecombobox.cpp new file mode 100644 index 0000000..d7ce3d0 --- /dev/null +++ b/src/qt/qvaluecombobox.cpp @@ -0,0 +1,27 @@ +#include "qvaluecombobox.h" + +QValueComboBox::QValueComboBox(QWidget *parent) : + QComboBox(parent), role(Qt::UserRole) +{ + connect(this, SIGNAL(currentIndexChanged(int)), this, SLOT(handleSelectionChanged(int))); +} + +QVariant QValueComboBox::value() const +{ + return itemData(currentIndex(), role); +} + +void QValueComboBox::setValue(const QVariant &value) +{ + setCurrentIndex(findData(value, role)); +} + +void QValueComboBox::setRole(int role) +{ + this->role = role; +} + +void QValueComboBox::handleSelectionChanged(int idx) +{ + emit valueChanged(); +} diff --git a/src/qt/qvaluecombobox.h b/src/qt/qvaluecombobox.h new file mode 100644 index 0000000..1a47bb6 --- /dev/null +++ b/src/qt/qvaluecombobox.h @@ -0,0 +1,33 @@ +#ifndef QVALUECOMBOBOX_H +#define QVALUECOMBOBOX_H + +#include +#include + +/* QComboBox that can be used with QDataWidgetMapper to select ordinal values from a model. */ +class QValueComboBox : public QComboBox +{ + Q_OBJECT + Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged USER true) +public: + explicit QValueComboBox(QWidget *parent = 0); + + QVariant value() const; + void setValue(const QVariant &value); + + /** Specify model role to use as ordinal value (defaults to Qt::UserRole) */ + void setRole(int role); + +signals: + void valueChanged(); + +public slots: + +private: + int role; + +private slots: + void handleSelectionChanged(int idx); +}; + +#endif // QVALUECOMBOBOX_H diff --git a/src/qt/res/curecoin-qt.rc b/src/qt/res/curecoin-qt.rc new file mode 100644 index 0000000..afecb87 --- /dev/null +++ b/src/qt/res/curecoin-qt.rc @@ -0,0 +1,37 @@ +IDI_ICON1 ICON DISCARDABLE "icons/curecoin.ico" + +#include // needed for VERSIONINFO +#include "../../clientversion.h" // holds the needed client version information + +#define VER_PRODUCTVERSION CLIENT_VERSION_MAJOR,CLIENT_VERSION_MINOR,CLIENT_VERSION_REVISION,CLIENT_VERSION_BUILD +#define VER_PRODUCTVERSION_STR STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_REVISION) "." STRINGIZE(CLIENT_VERSION_BUILD) +#define VER_FILEVERSION VER_PRODUCTVERSION +#define VER_FILEVERSION_STR VER_PRODUCTVERSION_STR + +VS_VERSION_INFO VERSIONINFO +FILEVERSION VER_FILEVERSION +PRODUCTVERSION VER_PRODUCTVERSION +FILEOS VOS_NT_WINDOWS32 +FILETYPE VFT_APP +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" // U.S. English - multilingual (hex) + BEGIN + VALUE "CompanyName", "curecoin" + VALUE "FileDescription", "curecoin-Qt (OSS GUI client for curecoin)" + VALUE "FileVersion", VER_FILEVERSION_STR + VALUE "InternalName", "curecoin-qt" + VALUE "LegalCopyright", "2009-2012 The Bitcon developers, 2012-2013 The curecoin & PPCoin developers, 2003 The curecoin developer" + 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", "curecoin-qt.exe" + VALUE "ProductName", "curecoin-Qt" + VALUE "ProductVersion", VER_PRODUCTVERSION_STR + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal) + END +END diff --git a/src/qt/res/icons/add.png b/src/qt/res/icons/add.png new file mode 100644 index 0000000..f98e2a8 Binary files /dev/null and b/src/qt/res/icons/add.png differ diff --git a/src/qt/res/icons/address-book.png b/src/qt/res/icons/address-book.png new file mode 100644 index 0000000..01bd03b Binary files /dev/null and b/src/qt/res/icons/address-book.png differ diff --git a/src/qt/res/icons/clock1.png b/src/qt/res/icons/clock1.png new file mode 100644 index 0000000..448e47f Binary files /dev/null and b/src/qt/res/icons/clock1.png differ diff --git a/src/qt/res/icons/clock2.png b/src/qt/res/icons/clock2.png new file mode 100644 index 0000000..c1a6e99 Binary files /dev/null and b/src/qt/res/icons/clock2.png differ diff --git a/src/qt/res/icons/clock3.png b/src/qt/res/icons/clock3.png new file mode 100644 index 0000000..e429a40 Binary files /dev/null and b/src/qt/res/icons/clock3.png differ diff --git a/src/qt/res/icons/clock4.png b/src/qt/res/icons/clock4.png new file mode 100644 index 0000000..ba036f4 Binary files /dev/null and b/src/qt/res/icons/clock4.png differ diff --git a/src/qt/res/icons/clock5.png b/src/qt/res/icons/clock5.png new file mode 100644 index 0000000..411d7a7 Binary files /dev/null and b/src/qt/res/icons/clock5.png differ diff --git a/src/qt/res/icons/configure.png b/src/qt/res/icons/configure.png new file mode 100644 index 0000000..95bd319 Binary files /dev/null and b/src/qt/res/icons/configure.png differ diff --git a/src/qt/res/icons/connect0_16.png b/src/qt/res/icons/connect0_16.png new file mode 100644 index 0000000..66f3ae4 Binary files /dev/null and b/src/qt/res/icons/connect0_16.png differ diff --git a/src/qt/res/icons/connect1_16.png b/src/qt/res/icons/connect1_16.png new file mode 100644 index 0000000..76000be Binary files /dev/null and b/src/qt/res/icons/connect1_16.png differ diff --git a/src/qt/res/icons/connect2_16.png b/src/qt/res/icons/connect2_16.png new file mode 100644 index 0000000..6d9a372 Binary files /dev/null and b/src/qt/res/icons/connect2_16.png differ diff --git a/src/qt/res/icons/connect3_16.png b/src/qt/res/icons/connect3_16.png new file mode 100644 index 0000000..a211700 Binary files /dev/null and b/src/qt/res/icons/connect3_16.png differ diff --git a/src/qt/res/icons/connect4_16.png b/src/qt/res/icons/connect4_16.png new file mode 100644 index 0000000..c1232f5 Binary files /dev/null and b/src/qt/res/icons/connect4_16.png differ diff --git a/src/qt/res/icons/curecoin-128.png b/src/qt/res/icons/curecoin-128.png new file mode 100644 index 0000000..1fb75a8 Binary files /dev/null and b/src/qt/res/icons/curecoin-128.png differ diff --git a/src/qt/res/icons/curecoin-16.png b/src/qt/res/icons/curecoin-16.png new file mode 100644 index 0000000..0070f38 Binary files /dev/null and b/src/qt/res/icons/curecoin-16.png differ diff --git a/src/qt/res/icons/curecoin.icns b/src/qt/res/icons/curecoin.icns new file mode 100644 index 0000000..1605383 Binary files /dev/null and b/src/qt/res/icons/curecoin.icns differ diff --git a/src/qt/res/icons/curecoin.ico b/src/qt/res/icons/curecoin.ico new file mode 100644 index 0000000..86f36a1 Binary files /dev/null and b/src/qt/res/icons/curecoin.ico differ diff --git a/src/qt/res/icons/curecoin.png b/src/qt/res/icons/curecoin.png new file mode 100644 index 0000000..dde60b9 Binary files /dev/null and b/src/qt/res/icons/curecoin.png differ diff --git a/src/qt/res/icons/curecoin_small.png b/src/qt/res/icons/curecoin_small.png new file mode 100644 index 0000000..a8af839 Binary files /dev/null and b/src/qt/res/icons/curecoin_small.png differ diff --git a/src/qt/res/icons/debugwindow.png b/src/qt/res/icons/debugwindow.png new file mode 100644 index 0000000..1712adf Binary files /dev/null and b/src/qt/res/icons/debugwindow.png differ diff --git a/src/qt/res/icons/edit.png b/src/qt/res/icons/edit.png new file mode 100644 index 0000000..1d69145 Binary files /dev/null and b/src/qt/res/icons/edit.png differ diff --git a/src/qt/res/icons/editcopy.png b/src/qt/res/icons/editcopy.png new file mode 100644 index 0000000..f882aa2 Binary files /dev/null and b/src/qt/res/icons/editcopy.png differ diff --git a/src/qt/res/icons/editpaste.png b/src/qt/res/icons/editpaste.png new file mode 100644 index 0000000..a192060 Binary files /dev/null and b/src/qt/res/icons/editpaste.png differ diff --git a/src/qt/res/icons/export.png b/src/qt/res/icons/export.png new file mode 100644 index 0000000..1df9c23 Binary files /dev/null and b/src/qt/res/icons/export.png differ diff --git a/src/qt/res/icons/filesave.png b/src/qt/res/icons/filesave.png new file mode 100644 index 0000000..ae13a15 Binary files /dev/null and b/src/qt/res/icons/filesave.png differ diff --git a/src/qt/res/icons/history.png b/src/qt/res/icons/history.png new file mode 100644 index 0000000..d371848 Binary files /dev/null and b/src/qt/res/icons/history.png differ diff --git a/src/qt/res/icons/key.png b/src/qt/res/icons/key.png new file mode 100644 index 0000000..ece0164 Binary files /dev/null and b/src/qt/res/icons/key.png differ diff --git a/src/qt/res/icons/lock_closed.png b/src/qt/res/icons/lock_closed.png new file mode 100644 index 0000000..c566510 Binary files /dev/null and b/src/qt/res/icons/lock_closed.png differ diff --git a/src/qt/res/icons/lock_open.png b/src/qt/res/icons/lock_open.png new file mode 100644 index 0000000..c98ca86 Binary files /dev/null and b/src/qt/res/icons/lock_open.png differ diff --git a/src/qt/res/icons/notsynced.png b/src/qt/res/icons/notsynced.png new file mode 100644 index 0000000..c9e7118 Binary files /dev/null and b/src/qt/res/icons/notsynced.png differ diff --git a/src/qt/res/icons/overview.png b/src/qt/res/icons/overview.png new file mode 100644 index 0000000..46d61d0 Binary files /dev/null and b/src/qt/res/icons/overview.png differ diff --git a/src/qt/res/icons/qrcode.png b/src/qt/res/icons/qrcode.png new file mode 100644 index 0000000..a8d9717 Binary files /dev/null and b/src/qt/res/icons/qrcode.png differ diff --git a/src/qt/res/icons/quit.png b/src/qt/res/icons/quit.png new file mode 100644 index 0000000..0dde6f3 Binary files /dev/null and b/src/qt/res/icons/quit.png differ diff --git a/src/qt/res/icons/receive.png b/src/qt/res/icons/receive.png new file mode 100644 index 0000000..97ffa7c Binary files /dev/null and b/src/qt/res/icons/receive.png differ diff --git a/src/qt/res/icons/remove.png b/src/qt/res/icons/remove.png new file mode 100644 index 0000000..a44b6d1 Binary files /dev/null and b/src/qt/res/icons/remove.png differ diff --git a/src/qt/res/icons/send.png b/src/qt/res/icons/send.png new file mode 100644 index 0000000..82c2e4d Binary files /dev/null and b/src/qt/res/icons/send.png differ diff --git a/src/qt/res/icons/synced.png b/src/qt/res/icons/synced.png new file mode 100644 index 0000000..4d7e0e8 Binary files /dev/null and b/src/qt/res/icons/synced.png differ diff --git a/src/qt/res/icons/toolbar.png b/src/qt/res/icons/toolbar.png new file mode 100644 index 0000000..a3a4afc Binary files /dev/null and b/src/qt/res/icons/toolbar.png differ diff --git a/src/qt/res/icons/transaction0.png b/src/qt/res/icons/transaction0.png new file mode 100644 index 0000000..4578666 Binary files /dev/null and b/src/qt/res/icons/transaction0.png differ diff --git a/src/qt/res/icons/transaction2.png b/src/qt/res/icons/transaction2.png new file mode 100644 index 0000000..01bb558 Binary files /dev/null and b/src/qt/res/icons/transaction2.png differ diff --git a/src/qt/res/icons/tx_inout.png b/src/qt/res/icons/tx_inout.png new file mode 100644 index 0000000..bb72837 Binary files /dev/null and b/src/qt/res/icons/tx_inout.png differ diff --git a/src/qt/res/icons/tx_input.png b/src/qt/res/icons/tx_input.png new file mode 100644 index 0000000..4d7135c Binary files /dev/null and b/src/qt/res/icons/tx_input.png differ diff --git a/src/qt/res/icons/tx_mined.png b/src/qt/res/icons/tx_mined.png new file mode 100644 index 0000000..8349197 Binary files /dev/null and b/src/qt/res/icons/tx_mined.png differ diff --git a/src/qt/res/icons/tx_output.png b/src/qt/res/icons/tx_output.png new file mode 100644 index 0000000..3e707e0 Binary files /dev/null and b/src/qt/res/icons/tx_output.png differ diff --git a/src/qt/res/images/about.png b/src/qt/res/images/about.png new file mode 100644 index 0000000..a42e41f Binary files /dev/null and b/src/qt/res/images/about.png differ diff --git a/src/qt/res/images/splash2.jpg b/src/qt/res/images/splash2.jpg new file mode 100644 index 0000000..1ce4bf4 Binary files /dev/null and b/src/qt/res/images/splash2.jpg differ diff --git a/src/qt/res/images/wallet_bgcoin.png b/src/qt/res/images/wallet_bgcoin.png new file mode 100644 index 0000000..a42e41f Binary files /dev/null and b/src/qt/res/images/wallet_bgcoin.png differ diff --git a/src/qt/res/movies/update_spinner.mng b/src/qt/res/movies/update_spinner.mng new file mode 100644 index 0000000..7df3baa Binary files /dev/null and b/src/qt/res/movies/update_spinner.mng differ diff --git a/src/qt/res/src/bitcoin.svg b/src/qt/res/src/bitcoin.svg new file mode 100644 index 0000000..96f1017 --- /dev/null +++ b/src/qt/res/src/bitcoin.svg @@ -0,0 +1,115 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/qt/res/src/clock1.svg b/src/qt/res/src/clock1.svg new file mode 100644 index 0000000..793dc7f --- /dev/null +++ b/src/qt/res/src/clock1.svg @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/qt/res/src/clock2.svg b/src/qt/res/src/clock2.svg new file mode 100644 index 0000000..6a78adf --- /dev/null +++ b/src/qt/res/src/clock2.svg @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/qt/res/src/clock3.svg b/src/qt/res/src/clock3.svg new file mode 100644 index 0000000..09ccc25 --- /dev/null +++ b/src/qt/res/src/clock3.svg @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/qt/res/src/clock4.svg b/src/qt/res/src/clock4.svg new file mode 100644 index 0000000..7d9dc37 --- /dev/null +++ b/src/qt/res/src/clock4.svg @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/qt/res/src/clock5.svg b/src/qt/res/src/clock5.svg new file mode 100644 index 0000000..9fd58d9 --- /dev/null +++ b/src/qt/res/src/clock5.svg @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/qt/res/src/clock_green.svg b/src/qt/res/src/clock_green.svg new file mode 100644 index 0000000..e31f0e7 --- /dev/null +++ b/src/qt/res/src/clock_green.svg @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/qt/res/src/inout.svg b/src/qt/res/src/inout.svg new file mode 100644 index 0000000..bfab8ef --- /dev/null +++ b/src/qt/res/src/inout.svg @@ -0,0 +1,122 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/src/qt/res/src/questionmark.svg b/src/qt/res/src/questionmark.svg new file mode 100644 index 0000000..c03c159 --- /dev/null +++ b/src/qt/res/src/questionmark.svg @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + ? + ? + + + ? + + diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp new file mode 100644 index 0000000..05106bd --- /dev/null +++ b/src/qt/rpcconsole.cpp @@ -0,0 +1,437 @@ +#include "rpcconsole.h" +#include "ui_rpcconsole.h" + +#include "clientmodel.h" +#include "curecoinrpc.h" +#include "guiutil.h" + +#include +#include +#include +#include +#include +#include +#include + +#include + +// TODO: make it possible to filter out categories (esp debug messages when implemented) +// TODO: receive errors and debug messages through ClientModel + +const int CONSOLE_SCROLLBACK = 50; +const int CONSOLE_HISTORY = 50; + +const QSize ICON_SIZE(24, 24); + +const struct { + const char *url; + const char *source; +} ICON_MAPPING[] = { + {"cmd-request", ":/icons/tx_input"}, + {"cmd-reply", ":/icons/tx_output"}, + {"cmd-error", ":/icons/tx_output"}, + {"misc", ":/icons/tx_inout"}, + {NULL, NULL} +}; + +/* Object for executing console RPC commands in a separate thread. +*/ +class RPCExecutor: public QObject +{ + Q_OBJECT +public slots: + void start(); + void request(const QString &command); +signals: + void reply(int category, const QString &command); +}; + +#include "rpcconsole.moc" + +void RPCExecutor::start() +{ + // Nothing to do +} + +/** + * Split shell command line into a list of arguments. Aims to emulate \c bash and friends. + * + * - Arguments are delimited with whitespace + * - Extra whitespace at the beginning and end and between arguments will be ignored + * - Text can be "double" or 'single' quoted + * - The backslash \c \ is used as escape character + * - Outside quotes, any character can be escaped + * - Within double quotes, only escape \c " and backslashes before a \c " or another backslash + * - Within single quotes, no escaping is possible and no special interpretation takes place + * + * @param[out] args Parsed arguments will be appended to this list + * @param[in] strCommand Command line to split + */ +bool parseCommandLine(std::vector &args, const std::string &strCommand) +{ + enum CmdParseState + { + STATE_EATING_SPACES, + STATE_ARGUMENT, + STATE_SINGLEQUOTED, + STATE_DOUBLEQUOTED, + STATE_ESCAPE_OUTER, + STATE_ESCAPE_DOUBLEQUOTED + } state = STATE_EATING_SPACES; + std::string curarg; + foreach(char ch, strCommand) + { + switch(state) + { + case STATE_ARGUMENT: // In or after argument + case STATE_EATING_SPACES: // Handle runs of whitespace + switch(ch) + { + case '"': state = STATE_DOUBLEQUOTED; break; + case '\'': state = STATE_SINGLEQUOTED; break; + case '\\': state = STATE_ESCAPE_OUTER; break; + case ' ': case '\n': case '\t': + if(state == STATE_ARGUMENT) // Space ends argument + { + args.push_back(curarg); + curarg.clear(); + } + state = STATE_EATING_SPACES; + break; + default: curarg += ch; state = STATE_ARGUMENT; + } + break; + case STATE_SINGLEQUOTED: // Single-quoted string + switch(ch) + { + case '\'': state = STATE_ARGUMENT; break; + default: curarg += ch; + } + break; + case STATE_DOUBLEQUOTED: // Double-quoted string + switch(ch) + { + case '"': state = STATE_ARGUMENT; break; + case '\\': state = STATE_ESCAPE_DOUBLEQUOTED; break; + default: curarg += ch; + } + break; + case STATE_ESCAPE_OUTER: // '\' outside quotes + curarg += ch; state = STATE_ARGUMENT; + break; + case STATE_ESCAPE_DOUBLEQUOTED: // '\' in double-quoted text + if(ch != '"' && ch != '\\') curarg += '\\'; // keep '\' for everything but the quote and '\' itself + curarg += ch; state = STATE_DOUBLEQUOTED; + break; + } + } + switch(state) // final state + { + case STATE_EATING_SPACES: + return true; + case STATE_ARGUMENT: + args.push_back(curarg); + return true; + default: // ERROR to end in one of the other states + return false; + } +} + +void RPCExecutor::request(const QString &command) +{ + std::vector args; + if(!parseCommandLine(args, command.toStdString())) + { + emit reply(RPCConsole::CMD_ERROR, QString("Parse error: unbalanced ' or \"")); + return; + } + if(args.empty()) + return; // Nothing to do + try + { + std::string strPrint; + // Convert argument list to JSON objects in method-dependent way, + // and pass it along with the method name to the dispatcher. + json_spirit::Value result = tableRPC.execute( + args[0], + RPCConvertValues(args[0], std::vector(args.begin() + 1, args.end()))); + + // Format result reply + if (result.type() == json_spirit::null_type) + strPrint = ""; + else if (result.type() == json_spirit::str_type) + strPrint = result.get_str(); + else + strPrint = write_string(result, true); + + emit reply(RPCConsole::CMD_REPLY, QString::fromStdString(strPrint)); + } + catch (json_spirit::Object& objError) + { + try // Nice formatting for standard-format error + { + int code = find_value(objError, "code").get_int(); + std::string message = find_value(objError, "message").get_str(); + emit reply(RPCConsole::CMD_ERROR, QString::fromStdString(message) + " (code " + QString::number(code) + ")"); + } + catch(std::runtime_error &) // raised when converting to invalid type, i.e. missing code or message + { // Show raw JSON object + emit reply(RPCConsole::CMD_ERROR, QString::fromStdString(write_string(json_spirit::Value(objError), false))); + } + } + catch (std::exception& e) + { + emit reply(RPCConsole::CMD_ERROR, QString("Error: ") + QString::fromStdString(e.what())); + } +} + +RPCConsole::RPCConsole(QWidget *parent) : + QDialog(parent), + ui(new Ui::RPCConsole), + historyPtr(0) +{ + ui->setupUi(this); + +#ifndef Q_OS_MAC + ui->openDebugLogfileButton->setIcon(QIcon(":/icons/export")); + ui->showCLOptionsButton->setIcon(QIcon(":/icons/options")); +#endif + + // Install event filter for up and down arrow + ui->lineEdit->installEventFilter(this); + ui->messagesWidget->installEventFilter(this); + + connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear())); + + // set OpenSSL version label + ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION)); + + startExecutor(); + + clear(); +} + +RPCConsole::~RPCConsole() +{ + emit stopExecutor(); + delete ui; +} + +bool RPCConsole::eventFilter(QObject* obj, QEvent *event) +{ + if(event->type() == QEvent::KeyPress) // Special key handling + { + QKeyEvent *keyevt = static_cast(event); + int key = keyevt->key(); + Qt::KeyboardModifiers mod = keyevt->modifiers(); + switch(key) + { + case Qt::Key_Up: if(obj == ui->lineEdit) { browseHistory(-1); return true; } break; + case Qt::Key_Down: if(obj == ui->lineEdit) { browseHistory(1); return true; } break; + case Qt::Key_PageUp: /* pass paging keys to messages widget */ + case Qt::Key_PageDown: + if(obj == ui->lineEdit) + { + QApplication::postEvent(ui->messagesWidget, new QKeyEvent(*keyevt)); + return true; + } + break; + default: + // Typing in messages widget brings focus to line edit, and redirects key there + // Exclude most combinations and keys that emit no text, except paste shortcuts + if(obj == ui->messagesWidget && ( + (!mod && !keyevt->text().isEmpty() && key != Qt::Key_Tab) || + ((mod & Qt::ControlModifier) && key == Qt::Key_V) || + ((mod & Qt::ShiftModifier) && key == Qt::Key_Insert))) + { + ui->lineEdit->setFocus(); + QApplication::postEvent(ui->lineEdit, new QKeyEvent(*keyevt)); + return true; + } + } + } + return QDialog::eventFilter(obj, event); +} + +void RPCConsole::setClientModel(ClientModel *model) +{ + this->clientModel = model; + if(model) + { + // Subscribe to information, replies, messages, errors + connect(model, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int))); + connect(model, SIGNAL(numBlocksChanged(int,int)), this, SLOT(setNumBlocks(int,int))); + + // Provide initial values + ui->clientVersion->setText(model->formatFullVersion()); + ui->clientName->setText(model->clientName()); + ui->buildDate->setText(model->formatBuildDate()); + ui->startupTime->setText(model->formatClientStartupTime()); + + setNumConnections(model->getNumConnections()); + ui->isTestNet->setChecked(model->isTestNet()); + + setNumBlocks(model->getNumBlocks(), model->getNumBlocksOfPeers()); + } +} + +static QString categoryClass(int category) +{ + switch(category) + { + case RPCConsole::CMD_REQUEST: return "cmd-request"; break; + case RPCConsole::CMD_REPLY: return "cmd-reply"; break; + case RPCConsole::CMD_ERROR: return "cmd-error"; break; + default: return "misc"; + } +} + +void RPCConsole::clear() +{ + ui->messagesWidget->clear(); + ui->lineEdit->clear(); + ui->lineEdit->setFocus(); + + // Add smoothly scaled icon images. + // (when using width/height on an img, Qt uses nearest instead of linear interpolation) + for(int i=0; ICON_MAPPING[i].url; ++i) + { + ui->messagesWidget->document()->addResource( + QTextDocument::ImageResource, + QUrl(ICON_MAPPING[i].url), + QImage(ICON_MAPPING[i].source).scaled(ICON_SIZE, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); + } + + // Set default style sheet + ui->messagesWidget->document()->setDefaultStyleSheet( + "table { }" + "td.time { color: #808080; padding-top: 3px; } " + "td.message { font-family: Monospace; font-size: 12px; } " + "td.cmd-request { color: #006060; } " + "td.cmd-error { color: red; } " + "b { color: #006060; } " + ); + + message(CMD_REPLY, (tr("Welcome to the curecoin 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); +} + +void RPCConsole::message(int category, const QString &message, bool html) +{ + QTime time = QTime::currentTime(); + QString timeString = time.toString(); + QString out; + out += ""; + out += ""; + out += "
" + timeString + ""; + if(html) + out += message; + else + out += GUIUtil::HtmlEscape(message, true); + out += "
"; + ui->messagesWidget->append(out); +} + +void RPCConsole::setNumConnections(int count) +{ + ui->numberOfConnections->setText(QString::number(count)); +} + +void RPCConsole::setNumBlocks(int count, int countOfPeers) +{ + ui->numberOfBlocks->setText(QString::number(count)); + ui->totalBlocks->setText(QString::number(countOfPeers)); + if(clientModel) + { + // If there is no current number available display N/A instead of 0, which can't ever be true + ui->totalBlocks->setText(clientModel->getNumBlocksOfPeers() == 0 ? tr("N/A") : QString::number(clientModel->getNumBlocksOfPeers())); + ui->lastBlockTime->setText(clientModel->getLastBlockDate().toString()); + } +} + +void RPCConsole::on_lineEdit_returnPressed() +{ + QString cmd = ui->lineEdit->text(); + ui->lineEdit->clear(); + + if(!cmd.isEmpty()) + { + message(CMD_REQUEST, cmd); + emit cmdRequest(cmd); + // Truncate history from current position + history.erase(history.begin() + historyPtr, history.end()); + // Append command to history + history.append(cmd); + // Enforce maximum history size + while(history.size() > CONSOLE_HISTORY) + history.removeFirst(); + // Set pointer to end of history + historyPtr = history.size(); + // Scroll console view to end + scrollToEnd(); + } +} + +void RPCConsole::browseHistory(int offset) +{ + historyPtr += offset; + if(historyPtr < 0) + historyPtr = 0; + if(historyPtr > history.size()) + historyPtr = history.size(); + QString cmd; + if(historyPtr < history.size()) + cmd = history.at(historyPtr); + ui->lineEdit->setText(cmd); +} + +void RPCConsole::startExecutor() +{ + QThread* thread = new QThread; + RPCExecutor *executor = new RPCExecutor(); + executor->moveToThread(thread); + + // Notify executor when thread started (in executor thread) + connect(thread, SIGNAL(started()), executor, SLOT(start())); + // Replies from executor object must go to this object + connect(executor, SIGNAL(reply(int,QString)), this, SLOT(message(int,QString))); + // Requests from this object must go to executor + connect(this, SIGNAL(cmdRequest(QString)), executor, SLOT(request(QString))); + // On stopExecutor signal + // - queue executor for deletion (in execution thread) + // - quit the Qt event loop in the execution thread + connect(this, SIGNAL(stopExecutor()), executor, SLOT(deleteLater())); + connect(this, SIGNAL(stopExecutor()), thread, SLOT(quit())); + // Queue the thread for deletion (in this thread) when it is finished + connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); + + // Default implementation of QThread::run() simply spins up an event loop in the thread, + // which is what we want. + thread->start(); +} + +void RPCConsole::on_tabWidget_currentChanged(int index) +{ + if(ui->tabWidget->widget(index) == ui->tab_console) + { + ui->lineEdit->setFocus(); + } +} + +void RPCConsole::on_openDebugLogfileButton_clicked() +{ + GUIUtil::openDebugLogfile(); +} + +void RPCConsole::scrollToEnd() +{ + QScrollBar *scrollbar = ui->messagesWidget->verticalScrollBar(); + scrollbar->setValue(scrollbar->maximum()); +} + +void RPCConsole::on_showCLOptionsButton_clicked() +{ + GUIUtil::HelpMessageBox help; + help.exec(); +} diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h new file mode 100644 index 0000000..a5d411c --- /dev/null +++ b/src/qt/rpcconsole.h @@ -0,0 +1,66 @@ +#ifndef RPCCONSOLE_H +#define RPCCONSOLE_H + +#include + +namespace Ui { + class RPCConsole; +} +class ClientModel; + +/** Local curecoin RPC console. */ +class RPCConsole: public QDialog +{ + Q_OBJECT + +public: + explicit RPCConsole(QWidget *parent = 0); + ~RPCConsole(); + + void setClientModel(ClientModel *model); + + enum MessageClass { + MC_ERROR, + MC_DEBUG, + CMD_REQUEST, + CMD_REPLY, + CMD_ERROR + }; + +protected: + virtual bool eventFilter(QObject* obj, QEvent *event); + +private slots: + void on_lineEdit_returnPressed(); + 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 curecoin-qt --help) */ + void on_showCLOptionsButton_clicked(); + +public slots: + void clear(); + void message(int category, const QString &message, bool html = false); + /** Set number of connections shown in the UI */ + void setNumConnections(int count); + /** Set number of blocks shown in the UI */ + void setNumBlocks(int count, int countOfPeers); + /** Go forward or back in history */ + void browseHistory(int offset); + /** Scroll console view to end */ + void scrollToEnd(); +signals: + // For RPC command executor + void stopExecutor(); + void cmdRequest(const QString &command); + +private: + Ui::RPCConsole *ui; + ClientModel *clientModel; + QStringList history; + int historyPtr; + + void startExecutor(); +}; + +#endif // RPCCONSOLE_H diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp new file mode 100644 index 0000000..168e998 --- /dev/null +++ b/src/qt/sendcoinsdialog.cpp @@ -0,0 +1,317 @@ +#include "sendcoinsdialog.h" +#include "ui_sendcoinsdialog.h" +#include "walletmodel.h" +#include "curecoinunits.h" +#include "addressbookpage.h" +#include "optionsmodel.h" +#include "sendcoinsentry.h" +#include "guiutil.h" +#include "askpassphrasedialog.h" +#include "base58.h" + +#include +#include +#include +#include + +SendCoinsDialog::SendCoinsDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::SendCoinsDialog), + model(0) +{ + 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 */ + ui->editTxComment->setPlaceholderText(tr("Enter a transaction comment (MAX 256 Characters) (Note: This information is public)")); +#endif + + addEntry(); + + connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addEntry())); + connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear())); + + fNewRecipientAllowed = true; +} + +void SendCoinsDialog::setModel(WalletModel *model) +{ + this->model = model; + + for(int i = 0; i < ui->entries->count(); ++i) + { + SendCoinsEntry *entry = qobject_cast(ui->entries->itemAt(i)->widget()); + if(entry) + { + entry->setModel(model); + } + } + if(model && model->getOptionsModel()) + { + 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())); + } +} + +SendCoinsDialog::~SendCoinsDialog() +{ + delete ui; +} + +void SendCoinsDialog::on_sendButton_clicked() +{ + QList recipients; + bool valid = true; + + if(!model) + return; + + QString txcomment = ui->editTxComment->text(); + + for(int i = 0; i < ui->entries->count(); ++i) + { + SendCoinsEntry *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 SendCoinsRecipient &rcp, recipients) + { + formatted.append(tr("%1 to %2 (%3)").arg(curecoinUnits::formatWithUnit(curecoinUnits::BTC, rcp.amount), Qt::escape(rcp.label), rcp.address)); + } + + fNewRecipientAllowed = false; + + QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm send coins"), + 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; + } + + WalletModel::UnlockContext ctx(model->requestUnlock()); + if(!ctx.isValid()) + { + // Unlock wallet was cancelled + fNewRecipientAllowed = true; + return; + } + + WalletModel::SendCoinsReturn sendstatus = model->sendCoins(txcomment, recipients); + switch(sendstatus.status) + { + case WalletModel::InvalidAddress: + QMessageBox::warning(this, tr("Send Coins"), + tr("The recipient address is not valid, please recheck."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case WalletModel::InvalidAmount: + QMessageBox::warning(this, tr("Send Coins"), + tr("The amount to pay must be larger than 0."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case WalletModel::AmountExceedsBalance: + QMessageBox::warning(this, tr("Send Coins"), + tr("The amount exceeds your balance."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case WalletModel::AmountWithFeeExceedsBalance: + QMessageBox::warning(this, tr("Send Coins"), + tr("The total exceeds your balance when the %1 transaction fee is included."). + arg(curecoinUnits::formatWithUnit(curecoinUnits::BTC, sendstatus.fee)), + QMessageBox::Ok, QMessageBox::Ok); + break; + case WalletModel::DuplicateAddress: + QMessageBox::warning(this, tr("Send Coins"), + tr("Duplicate address found, can only send to each address once per send operation."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case WalletModel::TransactionCreationFailed: + QMessageBox::warning(this, tr("Send Coins"), + tr("Error: Transaction creation failed."), + QMessageBox::Ok, QMessageBox::Ok); + break; + case WalletModel::TransactionCommitFailed: + QMessageBox::warning(this, tr("Send Coins"), + 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 + break; + case WalletModel::OK: + accept(); + break; + } + fNewRecipientAllowed = true; +} + +void SendCoinsDialog::clear() +{ + ui->editTxComment->clear(); + + // Remove entries until only one left + while(ui->entries->count()) + { + delete ui->entries->takeAt(0)->widget(); + } + addEntry(); + + updateRemoveEnabled(); + + ui->sendButton->setDefault(true); +} + +void SendCoinsDialog::reject() +{ + clear(); +} + +void SendCoinsDialog::accept() +{ + clear(); +} + +SendCoinsEntry *SendCoinsDialog::addEntry() +{ + SendCoinsEntry *entry = new SendCoinsEntry(this); + entry->setModel(model); + ui->entries->addWidget(entry); + connect(entry, SIGNAL(removeEntry(SendCoinsEntry*)), this, SLOT(removeEntry(SendCoinsEntry*))); + + 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 SendCoinsDialog::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) + { + SendCoinsEntry *entry = qobject_cast(ui->entries->itemAt(i)->widget()); + if(entry) + { + entry->setRemoveEnabled(enabled); + } + } + setupTabChain(0); +} + +void SendCoinsDialog::removeEntry(SendCoinsEntry* entry) +{ + delete entry; + updateRemoveEnabled(); +} + +QWidget *SendCoinsDialog::setupTabChain(QWidget *prev) +{ + QWidget::setTabOrder(prev, ui->editTxComment); + prev = ui->editTxComment; + + for(int i = 0; i < ui->entries->count(); ++i) + { + SendCoinsEntry *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 SendCoinsDialog::pasteEntry(const SendCoinsRecipient &rv) +{ + if(!fNewRecipientAllowed) + return; + + SendCoinsEntry *entry = 0; + // Replace the first entry if it is still unused + if(ui->entries->count() == 1) + { + SendCoinsEntry *first = qobject_cast(ui->entries->itemAt(0)->widget()); + if(first->isClear()) + { + entry = first; + } + } + if(!entry) + { + entry = addEntry(); + } + + entry->setValue(rv); +} + +bool SendCoinsDialog::handleURI(const QString &uri) +{ + SendCoinsRecipient rv; + // URI has to be valid + if (GUIUtil::parsecurecoinURI(uri, &rv)) + { + CcurecoinAddress address(rv.address.toStdString()); + if (!address.IsValid()) + return false; + pasteEntry(rv); + return true; + } + + return false; +} + +void SendCoinsDialog::setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBalance, qint64 immatureBalance) +{ + Q_UNUSED(stake); + Q_UNUSED(unconfirmedBalance); + Q_UNUSED(immatureBalance); + if(!model || !model->getOptionsModel()) + return; + + int unit = model->getOptionsModel()->getDisplayUnit(); + ui->labelBalance->setText(curecoinUnits::formatWithUnit(unit, balance)); +} + +void SendCoinsDialog::updateDisplayUnit() +{ + if(model && model->getOptionsModel()) + { + // Update labelBalance with the current balance and the current unit + ui->labelBalance->setText(curecoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), model->getBalance())); + } +} diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h new file mode 100644 index 0000000..e6c6468 --- /dev/null +++ b/src/qt/sendcoinsdialog.h @@ -0,0 +1,54 @@ +#ifndef SENDCOINSDIALOG_H +#define SENDCOINSDIALOG_H + +#include + +namespace Ui { + class SendCoinsDialog; +} +class WalletModel; +class SendCoinsEntry; +class SendCoinsRecipient; + +QT_BEGIN_NAMESPACE +class QUrl; +QT_END_NAMESPACE + +/** Dialog for sending curecoins */ +class SendCoinsDialog : public QDialog +{ + Q_OBJECT + +public: + explicit SendCoinsDialog(QWidget *parent = 0); + ~SendCoinsDialog(); + + void setModel(WalletModel *model); + + /** 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 SendCoinsRecipient &rv); + bool handleURI(const QString &uri); + +public slots: + void clear(); + void reject(); + void accept(); + SendCoinsEntry *addEntry(); + void updateRemoveEnabled(); + void setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBalance, qint64 immatureBalance); + +private: + Ui::SendCoinsDialog *ui; + WalletModel *model; + bool fNewRecipientAllowed; + +private slots: + void on_sendButton_clicked(); + void removeEntry(SendCoinsEntry* entry); + void updateDisplayUnit(); +}; + +#endif // SENDCOINSDIALOG_H diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp new file mode 100644 index 0000000..9f9ac3b --- /dev/null +++ b/src/qt/sendcoinsentry.cpp @@ -0,0 +1,172 @@ +#include "sendcoinsentry.h" +#include "ui_sendcoinsentry.h" +#include "guiutil.h" +#include "curecoinunits.h" +#include "addressbookpage.h" +#include "walletmodel.h" +#include "optionsmodel.h" +#include "addresstablemodel.h" + +#include +#include + +SendCoinsEntry::SendCoinsEntry(QWidget *parent) : + QFrame(parent), + ui(new Ui::SendCoinsEntry), + model(0) +{ + ui->setupUi(this); + +#ifdef Q_OS_MAC + ui->payToLayout->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->payTo->setPlaceholderText(tr("Enter a valid curecoin address")); +#endif + setFocusPolicy(Qt::TabFocus); + setFocusProxy(ui->payTo); + + GUIUtil::setupAddressWidget(ui->payTo, this); +} + +SendCoinsEntry::~SendCoinsEntry() +{ + delete ui; +} + +void SendCoinsEntry::on_pasteButton_clicked() +{ + // Paste text from clipboard into recipient field + ui->payTo->setText(QApplication::clipboard()->text()); +} + +void SendCoinsEntry::on_addressBookButton_clicked() +{ + if(!model) + return; + AddressBookPage dlg(AddressBookPage::ForSending, AddressBookPage::SendingTab, this); + dlg.setModel(model->getAddressTableModel()); + if(dlg.exec()) + { + ui->payTo->setText(dlg.getReturnValue()); + ui->payAmount->setFocus(); + } +} + +void SendCoinsEntry::on_payTo_textChanged(const QString &address) +{ + if(!model) + return; + // Fill in label from address book, if address has an associated label + QString associatedLabel = model->getAddressTableModel()->labelForAddress(address); + if(!associatedLabel.isEmpty()) + ui->addAsLabel->setText(associatedLabel); +} + +void SendCoinsEntry::setModel(WalletModel *model) +{ + this->model = model; + + if(model && model->getOptionsModel()) + connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); + + clear(); +} + +void SendCoinsEntry::setRemoveEnabled(bool enabled) +{ + ui->deleteButton->setEnabled(enabled); +} + +void SendCoinsEntry::clear() +{ + ui->payTo->clear(); + ui->addAsLabel->clear(); + ui->payAmount->clear(); + ui->payTo->setFocus(); + // update the display unit, to not use the default ("BTC") + updateDisplayUnit(); +} + +void SendCoinsEntry::on_deleteButton_clicked() +{ + emit removeEntry(this); +} + +bool SendCoinsEntry::validate() +{ + // Check input validity + bool retval = true; + + if(!ui->payAmount->validate()) + { + retval = false; + } + else + { + if(ui->payAmount->value() <= 0) + { + // Cannot send 0 coins or less + ui->payAmount->setValid(false); + retval = false; + } + } + + if(!ui->payTo->hasAcceptableInput() || + (model && !model->validateAddress(ui->payTo->text()))) + { + ui->payTo->setValid(false); + retval = false; + } + + return retval; +} + +SendCoinsRecipient SendCoinsEntry::getValue() +{ + SendCoinsRecipient rv; + + rv.address = ui->payTo->text(); + rv.label = ui->addAsLabel->text(); + rv.amount = ui->payAmount->value(); + + return rv; +} + +QWidget *SendCoinsEntry::setupTabChain(QWidget *prev) +{ + 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); +} + +void SendCoinsEntry::setValue(const SendCoinsRecipient &value) +{ + ui->payTo->setText(value.address); + ui->addAsLabel->setText(value.label); + ui->payAmount->setValue(value.amount); +} + +bool SendCoinsEntry::isClear() +{ + return ui->payTo->text().isEmpty(); +} + +void SendCoinsEntry::setFocus() +{ + ui->payTo->setFocus(); +} + +void SendCoinsEntry::updateDisplayUnit() +{ + if(model && model->getOptionsModel()) + { + // Update payAmount with the current unit + ui->payAmount->setDisplayUnit(model->getOptionsModel()->getDisplayUnit()); + } +} diff --git a/src/qt/sendcoinsentry.h b/src/qt/sendcoinsentry.h new file mode 100644 index 0000000..c8cf47c --- /dev/null +++ b/src/qt/sendcoinsentry.h @@ -0,0 +1,55 @@ +#ifndef SENDCOINSENTRY_H +#define SENDCOINSENTRY_H + +#include + +namespace Ui { + class SendCoinsEntry; +} +class WalletModel; +class SendCoinsRecipient; + +/** A single entry in the dialog for sending curecoins. */ +class SendCoinsEntry : public QFrame +{ + Q_OBJECT + +public: + explicit SendCoinsEntry(QWidget *parent = 0); + ~SendCoinsEntry(); + + void setModel(WalletModel *model); + bool validate(); + SendCoinsRecipient getValue(); + + /** Return whether the entry is still empty and unedited */ + bool isClear(); + + void setValue(const SendCoinsRecipient &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(SendCoinsEntry *entry); + +private slots: + void on_deleteButton_clicked(); + void on_payTo_textChanged(const QString &address); + void on_addressBookButton_clicked(); + void on_pasteButton_clicked(); + void updateDisplayUnit(); + +private: + Ui::SendCoinsEntry *ui; + WalletModel *model; +}; + +#endif // SENDCOINSENTRY_H diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp new file mode 100644 index 0000000..25799fa --- /dev/null +++ b/src/qt/signverifymessagedialog.cpp @@ -0,0 +1,274 @@ +#include "signverifymessagedialog.h" +#include "ui_signverifymessagedialog.h" + +#include "addressbookpage.h" +#include "base58.h" +#include "guiutil.h" +#include "init.h" +#include "main.h" +#include "optionsmodel.h" +#include "walletmodel.h" +#include "wallet.h" + +#include +#include + +#include + +SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::SignVerifyMessageDialog), + model(0) +{ + ui->setupUi(this); + +#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 curecoin address")); + ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature")); + + ui->addressIn_VM->setPlaceholderText(tr("Enter a valid curecoin address")); + ui->signatureIn_VM->setPlaceholderText(tr("Enter curecoin signature")); +#endif + + GUIUtil::setupAddressWidget(ui->addressIn_SM, this); + GUIUtil::setupAddressWidget(ui->addressIn_VM, this); + + ui->addressIn_SM->installEventFilter(this); + ui->messageIn_SM->installEventFilter(this); + ui->signatureOut_SM->installEventFilter(this); + ui->addressIn_VM->installEventFilter(this); + ui->messageIn_VM->installEventFilter(this); + ui->signatureIn_VM->installEventFilter(this); + + ui->signatureOut_SM->setFont(GUIUtil::curecoinAddressFont()); + ui->signatureIn_VM->setFont(GUIUtil::curecoinAddressFont()); +} + +SignVerifyMessageDialog::~SignVerifyMessageDialog() +{ + delete ui; +} + +void SignVerifyMessageDialog::setModel(WalletModel *model) +{ + this->model = model; +} + +void SignVerifyMessageDialog::setAddress_SM(QString address) +{ + ui->addressIn_SM->setText(address); + ui->messageIn_SM->setFocus(); +} + +void SignVerifyMessageDialog::setAddress_VM(QString address) +{ + ui->addressIn_VM->setText(address); + ui->messageIn_VM->setFocus(); +} + +void SignVerifyMessageDialog::showTab_SM(bool fShow) +{ + ui->tabWidget->setCurrentIndex(0); + + if (fShow) + this->show(); +} + +void SignVerifyMessageDialog::showTab_VM(bool fShow) +{ + ui->tabWidget->setCurrentIndex(1); + if (fShow) + this->show(); +} + +void SignVerifyMessageDialog::on_addressBookButton_SM_clicked() +{ + if (model && model->getAddressTableModel()) + { + AddressBookPage dlg(AddressBookPage::ForSending, AddressBookPage::ReceivingTab, this); + dlg.setModel(model->getAddressTableModel()); + if (dlg.exec()) + { + setAddress_SM(dlg.getReturnValue()); + } + } +} + +void SignVerifyMessageDialog::on_pasteButton_SM_clicked() +{ + setAddress_SM(QApplication::clipboard()->text()); +} + +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(); + + CcurecoinAddress addr(ui->addressIn_SM->text().toStdString()); + if (!addr.IsValid()) + { + ui->addressIn_SM->setValid(false); + ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel_SM->setText(tr("The entered address is invalid.") + QString(" ") + tr("Please check the address and try again.")); + return; + } + CKeyID keyID; + if (!addr.GetKeyID(keyID)) + { + ui->addressIn_SM->setValid(false); + ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel_SM->setText(tr("The entered address does not refer to a key.") + QString(" ") + tr("Please check the address and try again.")); + return; + } + + WalletModel::UnlockContext ctx(model->requestUnlock()); + if (!ctx.isValid()) + { + ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel_SM->setText(tr("Wallet unlock was cancelled.")); + return; + } + + CKey key; + if (!pwalletMain->GetKey(keyID, key)) + { + ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel_SM->setText(tr("Private key for the entered address is not available.")); + return; + } + + CDataStream ss(SER_GETHASH, 0); + ss << strMessageMagic; + ss << ui->messageIn_SM->document()->toPlainText().toStdString(); + + std::vector vchSig; + if (!key.SignCompact(Hash(ss.begin(), ss.end()), vchSig)) + { + ui->statusLabel_SM->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel_SM->setText(QString("") + tr("Message signing failed.") + QString("")); + return; + } + + ui->statusLabel_SM->setStyleSheet("QLabel { color: green; }"); + ui->statusLabel_SM->setText(QString("") + tr("Message signed.") + QString("")); + + ui->signatureOut_SM->setText(QString::fromStdString(EncodeBase64(&vchSig[0], vchSig.size()))); +} + +void SignVerifyMessageDialog::on_copySignatureButton_SM_clicked() +{ + QApplication::clipboard()->setText(ui->signatureOut_SM->text()); +} + +void SignVerifyMessageDialog::on_clearButton_SM_clicked() +{ + ui->addressIn_SM->clear(); + ui->messageIn_SM->clear(); + ui->signatureOut_SM->clear(); + ui->statusLabel_SM->clear(); + + ui->addressIn_SM->setFocus(); +} + +void SignVerifyMessageDialog::on_addressBookButton_VM_clicked() +{ + if (model && model->getAddressTableModel()) + { + AddressBookPage dlg(AddressBookPage::ForSending, AddressBookPage::SendingTab, this); + dlg.setModel(model->getAddressTableModel()); + if (dlg.exec()) + { + setAddress_VM(dlg.getReturnValue()); + } + } +} + +void SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked() +{ + CcurecoinAddress addr(ui->addressIn_VM->text().toStdString()); + if (!addr.IsValid()) + { + ui->addressIn_VM->setValid(false); + ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel_VM->setText(tr("The entered address is invalid.") + QString(" ") + tr("Please check the address and try again.")); + return; + } + CKeyID keyID; + if (!addr.GetKeyID(keyID)) + { + ui->addressIn_VM->setValid(false); + ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel_VM->setText(tr("The entered address does not refer to a key.") + QString(" ") + tr("Please check the address and try again.")); + return; + } + + bool fInvalid = false; + std::vector vchSig = DecodeBase64(ui->signatureIn_VM->text().toStdString().c_str(), &fInvalid); + + if (fInvalid) + { + ui->signatureIn_VM->setValid(false); + ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel_VM->setText(tr("The signature could not be decoded.") + QString(" ") + tr("Please check the signature and try again.")); + return; + } + + CDataStream ss(SER_GETHASH, 0); + ss << strMessageMagic; + ss << ui->messageIn_VM->document()->toPlainText().toStdString(); + + CKey key; + if (!key.SetCompactSignature(Hash(ss.begin(), ss.end()), vchSig)) + { + ui->signatureIn_VM->setValid(false); + ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel_VM->setText(tr("The signature did not match the message digest.") + QString(" ") + tr("Please check the signature and try again.")); + return; + } + + if (!(CcurecoinAddress(key.GetPubKey().GetID()) == addr)) + { + ui->statusLabel_VM->setStyleSheet("QLabel { color: red; }"); + ui->statusLabel_VM->setText(QString("") + tr("Message verification failed.") + QString("")); + return; + } + + ui->statusLabel_VM->setStyleSheet("QLabel { color: green; }"); + ui->statusLabel_VM->setText(QString("") + tr("Message verified.") + QString("")); +} + +void SignVerifyMessageDialog::on_clearButton_VM_clicked() +{ + ui->addressIn_VM->clear(); + ui->signatureIn_VM->clear(); + ui->messageIn_VM->clear(); + ui->statusLabel_VM->clear(); + + ui->addressIn_VM->setFocus(); +} + +bool SignVerifyMessageDialog::eventFilter(QObject *object, QEvent *event) +{ + if (event->type() == QEvent::MouseButtonPress || event->type() == QEvent::FocusIn) + { + if (ui->tabWidget->currentIndex() == 0) + { + /* Clear status message on focus change */ + ui->statusLabel_SM->clear(); + + /* Select generated signature */ + if (object == ui->signatureOut_SM) + { + ui->signatureOut_SM->selectAll(); + return true; + } + } + else if (ui->tabWidget->currentIndex() == 1) + { + /* Clear status message on focus change */ + ui->statusLabel_VM->clear(); + } + } + return QDialog::eventFilter(object, event); +} diff --git a/src/qt/signverifymessagedialog.h b/src/qt/signverifymessagedialog.h new file mode 100644 index 0000000..5569c8b --- /dev/null +++ b/src/qt/signverifymessagedialog.h @@ -0,0 +1,49 @@ +#ifndef SIGNVERIFYMESSAGEDIALOG_H +#define SIGNVERIFYMESSAGEDIALOG_H + +#include + +namespace Ui { + class SignVerifyMessageDialog; +} +class WalletModel; + +QT_BEGIN_NAMESPACE +QT_END_NAMESPACE + +class SignVerifyMessageDialog : public QDialog +{ + Q_OBJECT + +public: + explicit SignVerifyMessageDialog(QWidget *parent = 0); + ~SignVerifyMessageDialog(); + + void setModel(WalletModel *model); + void setAddress_SM(QString address); + void setAddress_VM(QString address); + + void showTab_SM(bool fShow); + void showTab_VM(bool fShow); + +protected: + bool eventFilter(QObject *object, QEvent *event); + +private: + Ui::SignVerifyMessageDialog *ui; + WalletModel *model; + +private slots: + /* sign message */ + void on_addressBookButton_SM_clicked(); + void on_pasteButton_SM_clicked(); + void on_signMessageButton_SM_clicked(); + void on_copySignatureButton_SM_clicked(); + void on_clearButton_SM_clicked(); + /* verify message */ + void on_addressBookButton_VM_clicked(); + void on_verifyMessageButton_VM_clicked(); + void on_clearButton_VM_clicked(); +}; + +#endif // SIGNVERIFYMESSAGEDIALOG_H diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp new file mode 100644 index 0000000..3c7794b --- /dev/null +++ b/src/qt/test/test_main.cpp @@ -0,0 +1,16 @@ +#include +#include + +#include "uritests.h" + +// This is all you need to run all the tests +int main(int argc, char *argv[]) +{ + bool fInvalid = false; + + URITests test1; + if (QTest::qExec(&test1) != 0) + fInvalid = true; + + return fInvalid; +} diff --git a/src/qt/test/uritests.cpp b/src/qt/test/uritests.cpp new file mode 100644 index 0000000..a5abe3c --- /dev/null +++ b/src/qt/test/uritests.cpp @@ -0,0 +1,71 @@ +#include "uritests.h" +#include "../guiutil.h" +#include "../walletmodel.h" + +#include + +/* +struct SendCoinsRecipient +{ + QString address; + QString label; + qint64 amount; +}; +*/ + +void URITests::uriTests() +{ + SendCoinsRecipient rv; + QUrl uri; + uri.setUrl(QString("curecoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?req-dontexist=")); + QVERIFY(!GUIUtil::parsecurecoinURI(uri, &rv)); + + uri.setUrl(QString("curecoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?dontexist=")); + QVERIFY(GUIUtil::parsecurecoinURI(uri, &rv)); + QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); + QVERIFY(rv.label == QString()); + QVERIFY(rv.amount == 0); + + uri.setUrl(QString("curecoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?label=Wikipedia Example Address")); + QVERIFY(GUIUtil::parsecurecoinURI(uri, &rv)); + QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); + QVERIFY(rv.label == QString("Wikipedia Example Address")); + QVERIFY(rv.amount == 0); + + uri.setUrl(QString("curecoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=0.001")); + QVERIFY(GUIUtil::parsecurecoinURI(uri, &rv)); + QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); + QVERIFY(rv.label == QString()); + QVERIFY(rv.amount == 100000); + + uri.setUrl(QString("curecoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=1.001")); + QVERIFY(GUIUtil::parsecurecoinURI(uri, &rv)); + QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); + QVERIFY(rv.label == QString()); + QVERIFY(rv.amount == 100100000); + + uri.setUrl(QString("curecoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=100&label=Wikipedia Example")); + QVERIFY(GUIUtil::parsecurecoinURI(uri, &rv)); + QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); + QVERIFY(rv.amount == 10000000000LL); + QVERIFY(rv.label == QString("Wikipedia Example")); + + uri.setUrl(QString("curecoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?message=Wikipedia Example Address")); + QVERIFY(GUIUtil::parsecurecoinURI(uri, &rv)); + QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); + QVERIFY(rv.label == QString()); + + QVERIFY(GUIUtil::parsecurecoinURI("curecoin://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("curecoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?req-message=Wikipedia Example Address")); + QVERIFY(!GUIUtil::parsecurecoinURI(uri, &rv)); + + uri.setUrl(QString("curecoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=1,000&label=Wikipedia Example")); + QVERIFY(!GUIUtil::parsecurecoinURI(uri, &rv)); + + uri.setUrl(QString("curecoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=1,000.0&label=Wikipedia Example")); + QVERIFY(!GUIUtil::parsecurecoinURI(uri, &rv)); +} diff --git a/src/qt/test/uritests.h b/src/qt/test/uritests.h new file mode 100644 index 0000000..1237516 --- /dev/null +++ b/src/qt/test/uritests.h @@ -0,0 +1,15 @@ +#ifndef URITESTS_H +#define URITESTS_H + +#include +#include + +class URITests : public QObject +{ + Q_OBJECT + +private slots: + void uriTests(); +}; + +#endif // URITESTS_H diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp new file mode 100644 index 0000000..b6c535d --- /dev/null +++ b/src/qt/transactiondesc.cpp @@ -0,0 +1,285 @@ +#include "transactiondesc.h" +#include "transactionrecord.h" +#include "guiutil.h" +#include "curecoinunits.h" + +#include "main.h" +#include "wallet.h" +#include "db.h" +#include "ui_interface.h" +#include "base58.h" + +QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx) +{ + if (!wtx.IsFinal()) + { + if (wtx.nLockTime < LOCKTIME_THRESHOLD) + return tr("Open for %n block(s)", "", nBestHeight - wtx.nLockTime); + else + return tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx.nLockTime)); + } + else + { + int nDepth = wtx.GetDepthInMainChain(); + if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0) + return tr("%1/offline").arg(nDepth); + else if (nDepth < TransactionRecord::NumConfirmations)//modified by curecoin to adjust the confirm + return tr("%1/unconfirmed").arg(nDepth); + else + return tr("%1 confirmations").arg(nDepth); + } +} + +QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) +{ + QString strHTML; + + { + LOCK(wallet->cs_wallet); + strHTML.reserve(4000); + strHTML += ""; + + int64 nTime = wtx.GetTxTime(); + int64 nCredit = wtx.GetCredit(); + int64 nDebit = wtx.GetDebit(); + int64 nNet = nCredit - nDebit; + + strHTML += "" + tr("Status") + ": " + FormatTxStatus(wtx); + int nRequests = wtx.GetRequestCount(); + if (nRequests != -1) + { + if (nRequests == 0) + strHTML += tr(", has not been successfully broadcast yet"); + else if (nRequests > 0) + strHTML += tr(", broadcast through %n node(s)", "", nRequests); + } + strHTML += "
"; + + strHTML += "" + tr("Date") + ": " + (nTime ? GUIUtil::dateTimeStr(nTime) : "") + "
"; + + // + // From + // + if (wtx.IsCoinBase()) + { + strHTML += "" + tr("Source") + ": " + tr("Generated") + "
"; + } + else if (wtx.mapValue.count("from") && !wtx.mapValue["from"].empty()) + { + // Online transaction + strHTML += "" + tr("From") + ": " + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "
"; + } + else + { + // Offline transaction + if (nNet > 0) + { + // Credit + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + { + if (wallet->IsMine(txout)) + { + CTxDestination address; + if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address)) + { + if (wallet->mapAddressBook.count(address)) + { + strHTML += "" + tr("From") + ": " + tr("unknown") + "
"; + strHTML += "" + tr("To") + ": "; + strHTML += GUIUtil::HtmlEscape(CcurecoinAddress(address).ToString()); + if (!wallet->mapAddressBook[address].empty()) + strHTML += " (" + tr("own address") + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address]) + ")"; + else + strHTML += " (" + tr("own address") + ")"; + strHTML += "
"; + } + } + break; + } + } + } + } + + // + // To + // + if (wtx.mapValue.count("to") && !wtx.mapValue["to"].empty()) + { + // Online transaction + std::string strAddress = wtx.mapValue["to"]; + strHTML += "" + tr("To") + ": "; + CTxDestination dest = CcurecoinAddress(strAddress).Get(); + if (wallet->mapAddressBook.count(dest) && !wallet->mapAddressBook[dest].empty()) + strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[dest]) + " "; + strHTML += GUIUtil::HtmlEscape(strAddress) + "
"; + } + + // + // Amount + // + if (wtx.IsCoinBase() && nCredit == 0) + { + // + // Coinbase + // + int64 nUnmatured = 0; + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + nUnmatured += wallet->GetCredit(txout); + strHTML += "" + tr("Credit") + ": "; + if (wtx.IsInMainChain()) + strHTML += curecoinUnits::formatWithUnit(curecoinUnits::BTC, nUnmatured)+ " (" + tr("matures in %n more block(s)", "", wtx.GetBlocksToMaturity()) + ")"; + else + strHTML += "(" + tr("not accepted") + ")"; + strHTML += "
"; + } + else if (nNet > 0) + { + // + // Credit + // + strHTML += "" + tr("Credit") + ": " + curecoinUnits::formatWithUnit(curecoinUnits::BTC, nNet) + "
"; + } + else + { + bool fAllFromMe = true; + BOOST_FOREACH(const CTxIn& txin, wtx.vin) + fAllFromMe = fAllFromMe && wallet->IsMine(txin); + + bool fAllToMe = true; + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + fAllToMe = fAllToMe && wallet->IsMine(txout); + + if (fAllFromMe) + { + // + // Debit + // + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + { + if (wallet->IsMine(txout)) + continue; + + if (!wtx.mapValue.count("to") || wtx.mapValue["to"].empty()) + { + // Offline transaction + CTxDestination address; + if (ExtractDestination(txout.scriptPubKey, address)) + { + strHTML += "" + tr("To") + ": "; + if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].empty()) + strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address]) + " "; + strHTML += GUIUtil::HtmlEscape(CcurecoinAddress(address).ToString()); + strHTML += "
"; + } + } + + strHTML += "" + tr("Debit") + ": " + curecoinUnits::formatWithUnit(curecoinUnits::BTC, -txout.nValue) + "
"; + } + + if (fAllToMe) + { + // Payment to self + int64 nChange = wtx.GetChange(); + int64 nValue = nCredit - nChange; + strHTML += "" + tr("Debit") + ": " + curecoinUnits::formatWithUnit(curecoinUnits::BTC, -nValue) + "
"; + strHTML += "" + tr("Credit") + ": " + curecoinUnits::formatWithUnit(curecoinUnits::BTC, nValue) + "
"; + } + + int64 nTxFee = nDebit - wtx.GetValueOut(); + if (nTxFee > 0) + strHTML += "" + tr("Transaction fee") + ": " + curecoinUnits::formatWithUnit(curecoinUnits::BTC, -nTxFee) + "
"; + } + else + { + // + // Mixed debit transaction + // + BOOST_FOREACH(const CTxIn& txin, wtx.vin) + if (wallet->IsMine(txin)) + strHTML += "" + tr("Debit") + ": " + curecoinUnits::formatWithUnit(curecoinUnits::BTC, -wallet->GetDebit(txin)) + "
"; + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + if (wallet->IsMine(txout)) + strHTML += "" + tr("Credit") + ": " + curecoinUnits::formatWithUnit(curecoinUnits::BTC, wallet->GetCredit(txout)) + "
"; + } + } + + strHTML += "" + tr("Net amount") + ": " + curecoinUnits::formatWithUnit(curecoinUnits::BTC, nNet, true) + "
"; + strHTML += "" + tr("Transaction ID") + ": " + wtx.GetHash().ToString().c_str() + "
"; + + // + // Comments + // + if (!wtx.mapValue["comment"].empty()) + strHTML += "" + tr("Wallet comment") + ":
" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "
"; + if (!wtx.strTxComment.empty()) + strHTML += "" + tr("Transaction comment") + ":
" + wtx.strTxComment.c_str() + "
"; + + + // + // Message + // + if (wtx.mapValue.count("message") && !wtx.mapValue["message"].empty()) + strHTML += "
" + tr("Message") + ":
" + GUIUtil::HtmlEscape(wtx.mapValue["message"], true) + "
"; + + + + + + if (wtx.IsCoinBase() || wtx.IsCoinStake()) + strHTML += "
" + tr("Generated coins must mature 30 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 + // + if (fDebug) + { + strHTML += "

" + tr("Debug information") + "

"; + BOOST_FOREACH(const CTxIn& txin, wtx.vin) + if(wallet->IsMine(txin)) + strHTML += "" + tr("Debit") + ": " + curecoinUnits::formatWithUnit(curecoinUnits::BTC, -wallet->GetDebit(txin)) + "
"; + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + if(wallet->IsMine(txout)) + strHTML += "" + tr("Credit") + ": " + curecoinUnits::formatWithUnit(curecoinUnits::BTC, wallet->GetCredit(txout)) + "
"; + + strHTML += "
" + tr("Transaction") + ":
"; + strHTML += GUIUtil::HtmlEscape(wtx.ToString(), true); + + CTxDB txdb("r"); // To fetch source txouts + + strHTML += "
" + tr("Inputs") + ":"; + strHTML += "
    "; + + { + LOCK(wallet->cs_wallet); + BOOST_FOREACH(const CTxIn& txin, wtx.vin) + { + COutPoint prevout = txin.prevout; + + CTransaction prev; + if(txdb.ReadDiskTx(prevout.hash, prev)) + { + if (prevout.n < prev.vout.size()) + { + strHTML += "
  • "; + const CTxOut &vout = prev.vout[prevout.n]; + CTxDestination address; + if (ExtractDestination(vout.scriptPubKey, address)) + { + if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].empty()) + strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address]) + " "; + strHTML += QString::fromStdString(CcurecoinAddress(address).ToString()); + } + strHTML = strHTML + " " + tr("Amount") + "=" + curecoinUnits::formatWithUnit(curecoinUnits::BTC, vout.nValue); + strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) ? tr("true") : tr("false")) + "
  • "; + } + } + } + } + + strHTML += "
"; + } + + strHTML += "
"; + } + return strHTML; +} diff --git a/src/qt/transactiondesc.h b/src/qt/transactiondesc.h new file mode 100644 index 0000000..2523f9a --- /dev/null +++ b/src/qt/transactiondesc.h @@ -0,0 +1,24 @@ +#ifndef TRANSACTIONDESC_H +#define TRANSACTIONDESC_H + +#include +#include +#include + +class CWallet; +class CWalletTx; + +/** Provide a human-readable extended HTML description of a transaction. + */ +class TransactionDesc: public QObject +{ + Q_OBJECT +public: + static QString toHTML(CWallet *wallet, CWalletTx &wtx); +private: + TransactionDesc() {} + + static QString FormatTxStatus(const CWalletTx& wtx); +}; + +#endif // TRANSACTIONDESC_H diff --git a/src/qt/transactiondescdialog.cpp b/src/qt/transactiondescdialog.cpp new file mode 100644 index 0000000..3bd4808 --- /dev/null +++ b/src/qt/transactiondescdialog.cpp @@ -0,0 +1,20 @@ +#include "transactiondescdialog.h" +#include "ui_transactiondescdialog.h" + +#include "transactiontablemodel.h" + +#include + +TransactionDescDialog::TransactionDescDialog(const QModelIndex &idx, QWidget *parent) : + QDialog(parent), + ui(new Ui::TransactionDescDialog) +{ + ui->setupUi(this); + QString desc = idx.data(TransactionTableModel::LongDescriptionRole).toString(); + ui->detailText->setHtml(desc); +} + +TransactionDescDialog::~TransactionDescDialog() +{ + delete ui; +} diff --git a/src/qt/transactiondescdialog.h b/src/qt/transactiondescdialog.h new file mode 100644 index 0000000..e86fb58 --- /dev/null +++ b/src/qt/transactiondescdialog.h @@ -0,0 +1,26 @@ +#ifndef TRANSACTIONDESCDIALOG_H +#define TRANSACTIONDESCDIALOG_H + +#include + +namespace Ui { + class TransactionDescDialog; +} +QT_BEGIN_NAMESPACE +class QModelIndex; +QT_END_NAMESPACE + +/** Dialog showing transaction details. */ +class TransactionDescDialog : public QDialog +{ + Q_OBJECT + +public: + explicit TransactionDescDialog(const QModelIndex &idx, QWidget *parent = 0); + ~TransactionDescDialog(); + +private: + Ui::TransactionDescDialog *ui; +}; + +#endif // TRANSACTIONDESCDIALOG_H diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp new file mode 100644 index 0000000..16fb4da --- /dev/null +++ b/src/qt/transactionfilterproxy.cpp @@ -0,0 +1,86 @@ +#include "transactionfilterproxy.h" +#include "transactiontablemodel.h" + +#include + +#include + +// Earliest date that can be represented (far in the past) +const QDateTime TransactionFilterProxy::MIN_DATE = QDateTime::fromTime_t(0); +// Last date that can be represented (far in the future) +const QDateTime TransactionFilterProxy::MAX_DATE = QDateTime::fromTime_t(0xFFFFFFFF); + +TransactionFilterProxy::TransactionFilterProxy(QObject *parent) : + QSortFilterProxyModel(parent), + dateFrom(MIN_DATE), + dateTo(MAX_DATE), + addrPrefix(), + typeFilter(ALL_TYPES), + minAmount(0), + limitRows(-1) +{ +} + +bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const +{ + QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent); + + int type = index.data(TransactionTableModel::TypeRole).toInt(); + QDateTime datetime = index.data(TransactionTableModel::DateRole).toDateTime(); + QString address = index.data(TransactionTableModel::AddressRole).toString(); + QString label = index.data(TransactionTableModel::LabelRole).toString(); + qint64 amount = llabs(index.data(TransactionTableModel::AmountRole).toLongLong()); + + if(!(TYPE(type) & typeFilter)) + return false; + if(datetime < dateFrom || datetime > dateTo) + return false; + if (!address.contains(addrPrefix, Qt::CaseInsensitive) && !label.contains(addrPrefix, Qt::CaseInsensitive)) + return false; + if(amount < minAmount) + return false; + + return true; +} + +void TransactionFilterProxy::setDateRange(const QDateTime &from, const QDateTime &to) +{ + this->dateFrom = from; + this->dateTo = to; + invalidateFilter(); +} + +void TransactionFilterProxy::setAddressPrefix(const QString &addrPrefix) +{ + this->addrPrefix = addrPrefix; + invalidateFilter(); +} + +void TransactionFilterProxy::setTypeFilter(quint32 modes) +{ + this->typeFilter = modes; + invalidateFilter(); +} + +void TransactionFilterProxy::setMinAmount(qint64 minimum) +{ + this->minAmount = minimum; + invalidateFilter(); +} + +void TransactionFilterProxy::setLimit(int limit) +{ + this->limitRows = limit; +} + +int TransactionFilterProxy::rowCount(const QModelIndex &parent) const +{ + if(limitRows != -1) + { + return std::min(QSortFilterProxyModel::rowCount(parent), limitRows); + } + else + { + return QSortFilterProxyModel::rowCount(parent); + } +} diff --git a/src/qt/transactionfilterproxy.h b/src/qt/transactionfilterproxy.h new file mode 100644 index 0000000..30b9858 --- /dev/null +++ b/src/qt/transactionfilterproxy.h @@ -0,0 +1,52 @@ +#ifndef TRANSACTIONFILTERPROXY_H +#define TRANSACTIONFILTERPROXY_H + +#include +#include + +/** Filter the transaction list according to pre-specified rules. */ +class TransactionFilterProxy : public QSortFilterProxyModel +{ + Q_OBJECT +public: + explicit TransactionFilterProxy(QObject *parent = 0); + + /** Earliest date that can be represented (far in the past) */ + static const QDateTime MIN_DATE; + /** Last date that can be represented (far in the future) */ + static const QDateTime MAX_DATE; + /** Type filter bit field (all types) */ + static const quint32 ALL_TYPES = 0xFFFFFFFF; + + static quint32 TYPE(int type) { return 1< 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(); + std::map mapValue = wtx.mapValue; + + if (wtx.IsCoinStake()) + { + // Stake generation + parts.append(TransactionRecord(hash, nTime, TransactionRecord::StakeMint, "", -nDebit, wtx.GetValueOut())); + } + else if (nNet > 0 || wtx.IsCoinBase()) + { + // + // Credit + // + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + { + if(wallet->IsMine(txout)) + { + TransactionRecord sub(hash, nTime); + CTxDestination address; + sub.idx = parts.size(); // sequence number + sub.credit = txout.nValue; + if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address)) + { + // Received by curecoin Address + sub.type = TransactionRecord::RecvWithAddress; + sub.address = CcurecoinAddress(address).ToString(); + } + else + { + // Received by IP connection (deprecated features), or a multisignature or other non-simple transaction + sub.type = TransactionRecord::RecvFromOther; + sub.address = mapValue["from"]; + } + if (wtx.IsCoinBase()) + { + // Generated + sub.type = TransactionRecord::Generated; + } + + parts.append(sub); + } + } + } + else + { + bool fAllFromMe = true; + BOOST_FOREACH(const CTxIn& txin, wtx.vin) + fAllFromMe = fAllFromMe && wallet->IsMine(txin); + + bool fAllToMe = true; + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + fAllToMe = fAllToMe && wallet->IsMine(txout); + + if (fAllFromMe && fAllToMe) + { + // Payment to self + int64 nChange = wtx.GetChange(); + + parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "", + -(nDebit - nChange), nCredit - nChange)); + } + else if (fAllFromMe) + { + // + // Debit + // + int64 nTxFee = nDebit - wtx.GetValueOut(); + + for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++) + { + const CTxOut& txout = wtx.vout[nOut]; + TransactionRecord sub(hash, nTime); + sub.idx = parts.size(); + + if(wallet->IsMine(txout)) + { + // Ignore parts sent to self, as this is usually the change + // from a transaction sent back to our own address. + continue; + } + + CTxDestination address; + if (ExtractDestination(txout.scriptPubKey, address)) + { + // Sent to curecoin Address + sub.type = TransactionRecord::SendToAddress; + sub.address = CcurecoinAddress(address).ToString(); + } + else + { + // Sent to IP, or other non-address transaction like OP_EVAL + sub.type = TransactionRecord::SendToOther; + sub.address = mapValue["to"]; + } + + int64 nValue = txout.nValue; + /* Add fee to first output */ + if (nTxFee > 0) + { + nValue += nTxFee; + nTxFee = 0; + } + sub.debit = -nValue; + + parts.append(sub); + } + } + else + { + // + // Mixed debit transaction, can't break down payees + // + parts.append(TransactionRecord(hash, nTime, TransactionRecord::Other, "", nNet, 0)); + } + } + + return parts; +} + +void TransactionRecord::updateStatus(const CWalletTx &wtx) +{ + // Determine transaction status + + // Find the block the tx is in + CBlockIndex* pindex = NULL; + std::map::iterator mi = mapBlockIndex.find(wtx.hashBlock); + if (mi != mapBlockIndex.end()) + pindex = (*mi).second; + + // Sort order, unrecorded transactions sort to the top + status.sortKey = strprintf("%010d-%01d-%010u-%03d", + (pindex ? pindex->nHeight : std::numeric_limits::max()), + (wtx.IsCoinBase() ? 1 : 0), + wtx.nTimeReceived, + idx); + status.confirmed = wtx.IsConfirmed(); + status.depth = wtx.GetDepthInMainChain(); + status.cur_num_blocks = nBestHeight; + + if (!wtx.IsFinal()) + { + if (wtx.nLockTime < LOCKTIME_THRESHOLD) + { + status.status = TransactionStatus::OpenUntilBlock; + status.open_for = nBestHeight - wtx.nLockTime; + } + else + { + status.status = TransactionStatus::OpenUntilDate; + 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) + { + int64 nCredit = wtx.GetCredit(true); + if (nCredit == 0) + { + status.maturity = TransactionStatus::Immature; + + if (wtx.IsInMainChain()) + { + status.matures_in = wtx.GetBlocksToMaturity(); + + // Check if the block was requested by anyone + if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0) + status.maturity = TransactionStatus::MaturesWarning; + } + else + { + status.maturity = TransactionStatus::NotAccepted; + } + } + else + { + status.maturity = TransactionStatus::Mature; + } + } +} + +bool TransactionRecord::statusUpdateNeeded() +{ + return status.cur_num_blocks != nBestHeight; +} + +std::string TransactionRecord::getTxID() +{ + return hash.ToString() + strprintf("-%03d", idx); +} + diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h new file mode 100644 index 0000000..f12a1e8 --- /dev/null +++ b/src/qt/transactionrecord.h @@ -0,0 +1,130 @@ +#ifndef TRANSACTIONRECORD_H +#define TRANSACTIONRECORD_H + +#include "uint256.h" + +#include + +class CWallet; +class CWalletTx; + +/** UI model for transaction status. The transaction status is the part of a transaction that will change over time. + */ +class TransactionStatus +{ +public: + TransactionStatus(): + confirmed(false), sortKey(""), maturity(Mature), + 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 + }; + + bool confirmed; + 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 */ + /**@}*/ + + /** Current number of blocks (to know whether cached status is still valid) */ + int cur_num_blocks; +}; + +/** UI model for a transaction. A core transaction can be represented by multiple UI transactions if it has + multiple outputs. + */ +class TransactionRecord +{ +public: + enum Type + { + Other, + Generated, + SendToAddress, + SendToOther, + RecvWithAddress, + RecvFromOther, + SendToSelf, + StakeMint + }; + + /** Number of confirmation needed for transaction */ + static const int NumConfirmations = 3; + + TransactionRecord(): + hash(), time(0), type(Other), address(""), debit(0), credit(0), idx(0) + { + } + + TransactionRecord(uint256 hash, int64 time): + hash(hash), time(time), type(Other), address(""), 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), + idx(0) + { + } + + /** Decompose CWallet transaction to model transaction records. + */ + static bool showTransaction(const CWalletTx &wtx); + static QList decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx); + + /** @name Immutable transaction attributes + @{*/ + uint256 hash; + int64 time; + Type type; + std::string address; + int64 debit; + int64 credit; + /**@}*/ + + /** Subtransaction index, for sort key */ + int idx; + + /** Status: can change with block chain update */ + TransactionStatus status; + + /** Return the unique identifier for this transaction (part) */ + std::string getTxID(); + + /** Update status from core wallet tx. + */ + void updateStatus(const CWalletTx &wtx); + + /** Return whether a status update is needed. + */ + bool statusUpdateNeeded(); +}; + +#endif // TRANSACTIONRECORD_H diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp new file mode 100644 index 0000000..386c969 --- /dev/null +++ b/src/qt/transactiontablemodel.cpp @@ -0,0 +1,636 @@ +#include "transactiontablemodel.h" +#include "guiutil.h" +#include "transactionrecord.h" +#include "guiconstants.h" +#include "transactiondesc.h" +#include "walletmodel.h" +#include "optionsmodel.h" +#include "addresstablemodel.h" +#include "curecoinunits.h" + +#include "wallet.h" +#include "ui_interface.h" + +#include +#include +#include +#include +#include +#include +#include + +// Amount column is right-aligned it contains numbers +static int column_alignments[] = { + Qt::AlignLeft|Qt::AlignVCenter, + Qt::AlignLeft|Qt::AlignVCenter, + Qt::AlignLeft|Qt::AlignVCenter, + Qt::AlignLeft|Qt::AlignVCenter, + Qt::AlignRight|Qt::AlignVCenter + }; + +// Comparison operator for sort/binary search of model tx list +struct TxLessThan +{ + bool operator()(const TransactionRecord &a, const TransactionRecord &b) const + { + return a.hash < b.hash; + } + bool operator()(const TransactionRecord &a, const uint256 &b) const + { + return a.hash < b; + } + bool operator()(const uint256 &a, const TransactionRecord &b) const + { + return a < b.hash; + } +}; + +// Private implementation +class TransactionTablePriv +{ +public: + TransactionTablePriv(CWallet *wallet, TransactionTableModel *parent): + wallet(wallet), + parent(parent) + { + } + CWallet *wallet; + TransactionTableModel *parent; + + /* Local cache of wallet. + * As it is in the same order as the CWallet, by definition + * this is sorted by sha256. + */ + QList cachedWallet; + + /* Query entire wallet anew from core. + */ + void refreshWallet() + { + OutputDebugStringF("refreshWallet\n"); + cachedWallet.clear(); + { + LOCK(wallet->cs_wallet); + for(std::map::iterator it = wallet->mapWallet.begin(); it != wallet->mapWallet.end(); ++it) + { + if(TransactionRecord::showTransaction(it->second)) + cachedWallet.append(TransactionRecord::decomposeTransaction(wallet, it->second)); + } + } + } + + /* Update our model of the wallet incrementally, to synchronize our model of the wallet + with that of the core. + + Call with transaction that was added, removed or changed. + */ + void updateWallet(const uint256 &hash, int status) + { + OutputDebugStringF("updateWallet %s %i\n", hash.ToString().c_str(), status); + { + LOCK(wallet->cs_wallet); + + // Find transaction in wallet + std::map::iterator mi = wallet->mapWallet.find(hash); + bool inWallet = mi != wallet->mapWallet.end(); + + // Find bounds of this transaction in model + QList::iterator lower = qLowerBound( + cachedWallet.begin(), cachedWallet.end(), hash, TxLessThan()); + QList::iterator upper = qUpperBound( + cachedWallet.begin(), cachedWallet.end(), hash, TxLessThan()); + int lowerIndex = (lower - cachedWallet.begin()); + int upperIndex = (upper - cachedWallet.begin()); + bool inModel = (lower != upper); + + // Determine whether to show transaction or not + bool showTransaction = (inWallet && TransactionRecord::showTransaction(mi->second)); + + if(status == CT_UPDATED) + { + if(showTransaction && !inModel) + status = CT_NEW; /* Not in model, but want to show, treat as new */ + if(!showTransaction && inModel) + status = CT_DELETED; /* In model, but want to hide, treat as deleted */ + } + + OutputDebugStringF(" inWallet=%i inModel=%i Index=%i-%i showTransaction=%i derivedStatus=%i\n", + inWallet, inModel, lowerIndex, upperIndex, showTransaction, status); + + switch(status) + { + case CT_NEW: + if(inModel) + { + OutputDebugStringF("Warning: updateWallet: Got CT_NEW, but transaction is already in model\n"); + break; + } + if(!inWallet) + { + OutputDebugStringF("Warning: updateWallet: Got CT_NEW, but transaction is not in wallet\n"); + break; + } + if(showTransaction) + { + // Added -- insert at the right position + QList toInsert = + TransactionRecord::decomposeTransaction(wallet, mi->second); + if(!toInsert.isEmpty()) /* only if something to insert */ + { + parent->beginInsertRows(QModelIndex(), lowerIndex, lowerIndex+toInsert.size()-1); + int insert_idx = lowerIndex; + foreach(const TransactionRecord &rec, toInsert) + { + cachedWallet.insert(insert_idx, rec); + insert_idx += 1; + } + parent->endInsertRows(); + } + } + break; + case CT_DELETED: + if(!inModel) + { + OutputDebugStringF("Warning: updateWallet: Got CT_DELETED, but transaction is not in model\n"); + break; + } + // Removed -- remove entire transaction from table + parent->beginRemoveRows(QModelIndex(), lowerIndex, upperIndex-1); + cachedWallet.erase(lower, upper); + parent->endRemoveRows(); + break; + case CT_UPDATED: + // Miscellaneous updates -- nothing to do, status update will take care of this, and is only computed for + // visible transactions. + break; + } + } + } + + int size() + { + return cachedWallet.size(); + } + + TransactionRecord *index(int idx) + { + if(idx >= 0 && idx < cachedWallet.size()) + { + TransactionRecord *rec = &cachedWallet[idx]; + + // If a status update is needed (blocks came in since last check), + // update the status of this transaction from the wallet. Otherwise, + // simply re-use the cached status. + if(rec->statusUpdateNeeded()) + { + { + LOCK(wallet->cs_wallet); + std::map::iterator mi = wallet->mapWallet.find(rec->hash); + + if(mi != wallet->mapWallet.end()) + { + rec->updateStatus(mi->second); + } + } + } + return rec; + } + else + { + return 0; + } + } + + QString describe(TransactionRecord *rec) + { + { + LOCK(wallet->cs_wallet); + std::map::iterator mi = wallet->mapWallet.find(rec->hash); + if(mi != wallet->mapWallet.end()) + { + return TransactionDesc::toHTML(wallet, mi->second); + } + } + return QString(""); + } + +}; + +TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *parent): + QAbstractTableModel(parent), + wallet(wallet), + walletModel(parent), + priv(new TransactionTablePriv(wallet, this)), + cachedNumBlocks(0) +{ + columns << QString() << tr("Date") << tr("Type") << tr("Address") << tr("Amount"); + + priv->refreshWallet(); + + QTimer *timer = new QTimer(this); + connect(timer, SIGNAL(timeout()), this, SLOT(updateConfirmations())); + timer->start(MODEL_UPDATE_DELAY); + + connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); +} + +TransactionTableModel::~TransactionTableModel() +{ + delete priv; +} + +void TransactionTableModel::updateTransaction(const QString &hash, int status) +{ + uint256 updated; + updated.SetHex(hash.toStdString()); + + priv->updateWallet(updated, status); +} + +void TransactionTableModel::updateConfirmations() +{ + if(nBestHeight != cachedNumBlocks) + { + cachedNumBlocks = nBestHeight; + // Blocks came in since last poll. + // Invalidate status (number of confirmations) and (possibly) description + // for all rows. Qt is smart enough to only actually request the data for the + // visible rows. + emit dataChanged(index(0, Status), index(priv->size()-1, Status)); + emit dataChanged(index(0, ToAddress), index(priv->size()-1, ToAddress)); + } +} + +int TransactionTableModel::rowCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent); + return priv->size(); +} + +int TransactionTableModel::columnCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent); + return columns.length(); +} + +QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) const +{ + QString status; + + switch(wtx->status.status) + { + case TransactionStatus::OpenUntilBlock: + status = tr("Open for %n 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); + break; + case TransactionStatus::Unconfirmed: + status = tr("Unconfirmed (%1 of %2 confirmations)").arg(wtx->status.depth).arg(TransactionRecord::NumConfirmations); + break; + case TransactionStatus::HaveConfirmations: + 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; + } + } + + return status; +} + +QString TransactionTableModel::formatTxDate(const TransactionRecord *wtx) const +{ + if(wtx->time) + { + return GUIUtil::dateTimeStr(wtx->time); + } + else + { + return QString(); + } +} + +/* Look up address in address book, if found return label (address) + otherwise just return (address) + */ +QString TransactionTableModel::lookupAddress(const std::string &address, bool tooltip) const +{ + QString label = walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(address)); + QString description; + if(!label.isEmpty()) + { + description += label + QString(" "); + } + if(label.isEmpty() || walletModel->getOptionsModel()->getDisplayAddresses() || tooltip) + { + description += QString("(") + QString::fromStdString(address) + QString(")"); + } + return description; +} + +QString TransactionTableModel::formatTxType(const TransactionRecord *wtx) const +{ + switch(wtx->type) + { + case TransactionRecord::RecvWithAddress: + return tr("Received with"); + case TransactionRecord::RecvFromOther: + return tr("Received from"); + case TransactionRecord::SendToAddress: + case TransactionRecord::SendToOther: + return tr("Sent to"); + case TransactionRecord::SendToSelf: + return tr("Payment to yourself"); + case TransactionRecord::StakeMint: + return tr("POFMined"); + case TransactionRecord::Generated: + return tr("POWMined"); + default: + return QString(); + } +} + +QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx) const +{ + switch(wtx->type) + { + case TransactionRecord::Generated: + case TransactionRecord::StakeMint: + return QIcon(":/icons/tx_mined"); + case TransactionRecord::RecvWithAddress: + case TransactionRecord::RecvFromOther: + return QIcon(":/icons/tx_input"); + case TransactionRecord::SendToAddress: + case TransactionRecord::SendToOther: + return QIcon(":/icons/tx_output"); + default: + return QIcon(":/icons/tx_inout"); + } + return QVariant(); +} + +QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const +{ + switch(wtx->type) + { + case TransactionRecord::RecvFromOther: + return QString::fromStdString(wtx->address); + case TransactionRecord::RecvWithAddress: + case TransactionRecord::SendToAddress: + case TransactionRecord::Generated: + return lookupAddress(wtx->address, tooltip); + case TransactionRecord::SendToOther: + return QString::fromStdString(wtx->address); + case TransactionRecord::SendToSelf: + default: + return tr("(n/a)"); + } +} + +QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const +{ + // Show addresses without label in a less visible color + switch(wtx->type) + { + case TransactionRecord::RecvWithAddress: + case TransactionRecord::SendToAddress: + case TransactionRecord::Generated: + { + QString label = walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(wtx->address)); + if(label.isEmpty()) + return COLOR_BAREADDRESS; + } break; + case TransactionRecord::SendToSelf: + return COLOR_BAREADDRESS; + default: + break; + } + return QVariant(); +} + +QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed) const +{ + QString str = curecoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), wtx->credit + wtx->debit); + if(showUnconfirmed) + { + if(!wtx->status.confirmed || wtx->status.maturity != TransactionStatus::Mature) + { + str = QString("[") + str + QString("]"); + } + } + return QString(str); +} + +QVariant TransactionTableModel::txStatusDecoration(const TransactionRecord *wtx) const +{ + if(wtx->type == TransactionRecord::Generated || wtx->type == TransactionRecord::StakeMint) + { + switch(wtx->status.maturity) + { + 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"); + } + } + return QColor(0,0,0); +} + +QString TransactionTableModel::formatTooltip(const TransactionRecord *rec) const +{ + QString tooltip = formatTxStatus(rec) + QString("\n") + formatTxType(rec); + if(rec->type==TransactionRecord::RecvFromOther || rec->type==TransactionRecord::SendToOther || + rec->type==TransactionRecord::SendToAddress || rec->type==TransactionRecord::RecvWithAddress) + { + tooltip += QString(" ") + formatTxToAddress(rec, true); + } + return tooltip; +} + +QVariant TransactionTableModel::data(const QModelIndex &index, int role) const +{ + if(!index.isValid()) + return QVariant(); + TransactionRecord *rec = static_cast(index.internalPointer()); + + switch(role) + { + case Qt::DecorationRole: + switch(index.column()) + { + case Status: + return txStatusDecoration(rec); + case ToAddress: + return txAddressDecoration(rec); + } + break; + case Qt::DisplayRole: + switch(index.column()) + { + case Date: + return formatTxDate(rec); + case Type: + return formatTxType(rec); + case ToAddress: + return formatTxToAddress(rec, false); + case Amount: + return formatTxAmount(rec); + } + break; + case Qt::EditRole: + // Edit role is used for sorting, so return the unformatted values + switch(index.column()) + { + case Status: + return QString::fromStdString(rec->status.sortKey); + case Date: + return rec->time; + case Type: + return formatTxType(rec); + case ToAddress: + return formatTxToAddress(rec, true); + case Amount: + return rec->credit + rec->debit; + } + break; + case Qt::ToolTipRole: + return formatTooltip(rec); + case Qt::TextAlignmentRole: + return column_alignments[index.column()]; + case Qt::ForegroundRole: + // Non-confirmed transactions are grey + if(!rec->status.confirmed) + { + return COLOR_UNCONFIRMED; + } + if(index.column() == Amount && (rec->credit+rec->debit) < 0) + { + return COLOR_NEGATIVE; + } + if(index.column() == ToAddress) + { + return addressColor(rec); + } + break; + case TypeRole: + return rec->type; + case DateRole: + return QDateTime::fromTime_t(static_cast(rec->time)); + case LongDescriptionRole: + return priv->describe(rec); + case AddressRole: + return QString::fromStdString(rec->address); + case LabelRole: + return walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(rec->address)); + case AmountRole: + return rec->credit + rec->debit; + 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); + case FormattedAmountRole: + return formatTxAmount(rec, false); + } + return QVariant(); +} + +QVariant TransactionTableModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + if(orientation == Qt::Horizontal) + { + if(role == Qt::DisplayRole) + { + return columns[section]; + } + else if (role == Qt::TextAlignmentRole) + { + return column_alignments[section]; + } else if (role == Qt::ToolTipRole) + { + switch(section) + { + case Status: + return tr("Transaction status. Hover over this field to show number of confirmations."); + case Date: + return tr("Date and time that the transaction was received."); + case Type: + return tr("Type of transaction."); + case ToAddress: + return tr("Destination address of transaction."); + case Amount: + return tr("Amount removed from or added to balance."); + } + } + } + return QVariant(); +} + +QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex &parent) const +{ + Q_UNUSED(parent); + TransactionRecord *data = priv->index(row); + if(data) + { + return createIndex(row, column, priv->index(row)); + } + else + { + return QModelIndex(); + } +} + +void TransactionTableModel::updateDisplayUnit() +{ + // emit dataChanged to update Amount column with the current unit + emit dataChanged(index(0, Amount), index(priv->size()-1, Amount)); +} diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h new file mode 100644 index 0000000..fd321ce --- /dev/null +++ b/src/qt/transactiontablemodel.h @@ -0,0 +1,85 @@ +#ifndef TRANSACTIONTABLEMODEL_H +#define TRANSACTIONTABLEMODEL_H + +#include +#include + +class CWallet; +class TransactionTablePriv; +class TransactionRecord; +class WalletModel; + +/** UI model for the transaction table of a wallet. + */ +class TransactionTableModel : public QAbstractTableModel +{ + Q_OBJECT +public: + explicit TransactionTableModel(CWallet* wallet, WalletModel *parent = 0); + ~TransactionTableModel(); + + enum ColumnIndex { + Status = 0, + Date = 1, + Type = 2, + ToAddress = 3, + Amount = 4 + }; + + /** Roles to get specific information from a transaction row. + These are independent of column. + */ + enum RoleIndex { + /** Type of transaction */ + TypeRole = Qt::UserRole, + /** Date and time this transaction was created */ + DateRole, + /** Long description (HTML format) */ + LongDescriptionRole, + /** Address of transaction */ + AddressRole, + /** Label of address related to transaction */ + LabelRole, + /** Net amount of transaction */ + AmountRole, + /** Unique identifier */ + TxIDRole, + /** Is transaction confirmed? */ + ConfirmedRole, + /** Formatted amount, without brackets when unconfirmed */ + FormattedAmountRole + }; + + 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 = QModelIndex()) const; +private: + CWallet* wallet; + WalletModel *walletModel; + QStringList columns; + TransactionTablePriv *priv; + int cachedNumBlocks; + + QString lookupAddress(const std::string &address, bool tooltip) const; + QVariant addressColor(const TransactionRecord *wtx) const; + QString formatTxStatus(const TransactionRecord *wtx) const; + QString formatTxDate(const TransactionRecord *wtx) const; + QString formatTxType(const TransactionRecord *wtx) const; + QString formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const; + QString formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed=true) const; + QString formatTooltip(const TransactionRecord *rec) const; + QVariant txStatusDecoration(const TransactionRecord *wtx) const; + QVariant txAddressDecoration(const TransactionRecord *wtx) const; + +public slots: + void updateTransaction(const QString &hash, int status); + void updateConfirmations(); + void updateDisplayUnit(); + + friend class TransactionTablePriv; +}; + +#endif + diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp new file mode 100644 index 0000000..254b4d5 --- /dev/null +++ b/src/qt/transactionview.cpp @@ -0,0 +1,432 @@ +#include "transactionview.h" + +#include "transactionfilterproxy.h" +#include "transactionrecord.h" +#include "walletmodel.h" +#include "addresstablemodel.h" +#include "transactiontablemodel.h" +#include "curecoinunits.h" +#include "csvmodelwriter.h" +#include "transactiondescdialog.h" +#include "editaddressdialog.h" +#include "optionsmodel.h" +#include "guiutil.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +TransactionView::TransactionView(QWidget *parent) : + QWidget(parent), model(0), transactionProxyModel(0), + transactionView(0) +{ + // Build filter row + setContentsMargins(0,0,0,0); + + QHBoxLayout *hlayout = new QHBoxLayout(); + hlayout->setContentsMargins(0,0,0,0); +#ifdef Q_OS_MAC + hlayout->setSpacing(5); + hlayout->addSpacing(26); +#else + hlayout->setSpacing(0); + hlayout->addSpacing(23); +#endif + + dateWidget = new QComboBox(this); +#ifdef Q_OS_MAC + dateWidget->setFixedWidth(121); +#else + dateWidget->setFixedWidth(120); +#endif + dateWidget->addItem(tr("All"), All); + dateWidget->addItem(tr("Today"), Today); + dateWidget->addItem(tr("This week"), ThisWeek); + dateWidget->addItem(tr("This month"), ThisMonth); + dateWidget->addItem(tr("Last month"), LastMonth); + dateWidget->addItem(tr("This year"), ThisYear); + dateWidget->addItem(tr("Range..."), Range); + hlayout->addWidget(dateWidget); + + typeWidget = new QComboBox(this); +#ifdef Q_OS_MAC + typeWidget->setFixedWidth(121); +#else + typeWidget->setFixedWidth(120); +#endif + + typeWidget->addItem(tr("All"), TransactionFilterProxy::ALL_TYPES); + typeWidget->addItem(tr("Received with"), TransactionFilterProxy::TYPE(TransactionRecord::RecvWithAddress) | + TransactionFilterProxy::TYPE(TransactionRecord::RecvFromOther)); + 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("POFMined"), TransactionFilterProxy::TYPE(TransactionRecord::StakeMint)); + typeWidget->addItem(tr("POWMined"), TransactionFilterProxy::TYPE(TransactionRecord::Generated)); + typeWidget->addItem(tr("Other"), TransactionFilterProxy::TYPE(TransactionRecord::Other)); + + hlayout->addWidget(typeWidget); + + addressWidget = new QLineEdit(this); +#if QT_VERSION >= 0x040700 + /* Do not move this to the XML file, Qt before 4.7 will choke on it */ + addressWidget->setPlaceholderText(tr("Enter address or label to search")); +#endif + hlayout->addWidget(addressWidget); + + amountWidget = new QLineEdit(this); +#if QT_VERSION >= 0x040700 + /* Do not move this to the XML file, Qt before 4.7 will choke on it */ + amountWidget->setPlaceholderText(tr("Min amount")); +#endif +#ifdef Q_OS_MAC + amountWidget->setFixedWidth(97); +#else + amountWidget->setFixedWidth(100); +#endif + amountWidget->setValidator(new QDoubleValidator(0, 1e20, 8, this)); + hlayout->addWidget(amountWidget); + + QVBoxLayout *vlayout = new QVBoxLayout(this); + vlayout->setContentsMargins(0,0,0,0); + vlayout->setSpacing(0); + + QTableView *view = new QTableView(this); + vlayout->addLayout(hlayout); + vlayout->addWidget(createDateRangeWidget()); + vlayout->addWidget(view); + vlayout->setSpacing(0); + int width = view->verticalScrollBar()->sizeHint().width(); + // Cover scroll bar width with spacing +#ifdef Q_OS_MAC + hlayout->addSpacing(width+2); +#else + hlayout->addSpacing(width); +#endif + // Always show scroll bar + view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + view->setTabKeyNavigation(false); + view->setContextMenuPolicy(Qt::CustomContextMenu); + + transactionView = view; + + // Actions + 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 *editLabelAction = new QAction(tr("Edit label"), this); + QAction *showDetailsAction = new QAction(tr("Show transaction details"), this); + + contextMenu = new QMenu(); + contextMenu->addAction(copyAddressAction); + contextMenu->addAction(copyLabelAction); + contextMenu->addAction(copyAmountAction); + contextMenu->addAction(editLabelAction); + contextMenu->addAction(showDetailsAction); + + // Connect actions + connect(dateWidget, SIGNAL(activated(int)), this, SLOT(chooseDate(int))); + connect(typeWidget, SIGNAL(activated(int)), this, SLOT(chooseType(int))); + connect(addressWidget, SIGNAL(textChanged(QString)), this, SLOT(changedPrefix(QString))); + connect(amountWidget, SIGNAL(textChanged(QString)), this, SLOT(changedAmount(QString))); + + connect(view, SIGNAL(doubleClicked(QModelIndex)), this, SIGNAL(doubleClicked(QModelIndex))); + connect(view, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); + + connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress())); + connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(copyLabel())); + connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount())); + connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel())); + connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails())); +} + +void TransactionView::setModel(WalletModel *model) +{ + this->model = model; + if(model) + { + transactionProxyModel = new TransactionFilterProxy(this); + transactionProxyModel->setSourceModel(model->getTransactionTableModel()); + transactionProxyModel->setDynamicSortFilter(true); + transactionProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); + transactionProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); + + transactionProxyModel->setSortRole(Qt::EditRole); + + transactionView->setModel(transactionProxyModel); + transactionView->setAlternatingRowColors(true); + transactionView->setSelectionBehavior(QAbstractItemView::SelectRows); + transactionView->setSelectionMode(QAbstractItemView::ExtendedSelection); + transactionView->setSortingEnabled(true); + transactionView->sortByColumn(TransactionTableModel::Status, Qt::DescendingOrder); + transactionView->verticalHeader()->hide(); + + transactionView->horizontalHeader()->resizeSection( + TransactionTableModel::Status, 23); + transactionView->horizontalHeader()->resizeSection( + TransactionTableModel::Date, 120); + transactionView->horizontalHeader()->resizeSection( + TransactionTableModel::Type, 120); + transactionView->horizontalHeader()->setResizeMode( + TransactionTableModel::ToAddress, QHeaderView::Stretch); + transactionView->horizontalHeader()->resizeSection( + TransactionTableModel::Amount, 100); + } +} + +void TransactionView::chooseDate(int idx) +{ + if(!transactionProxyModel) + return; + QDate current = QDate::currentDate(); + dateRangeWidget->setVisible(false); + switch(dateWidget->itemData(idx).toInt()) + { + case All: + transactionProxyModel->setDateRange( + TransactionFilterProxy::MIN_DATE, + TransactionFilterProxy::MAX_DATE); + break; + case Today: + transactionProxyModel->setDateRange( + QDateTime(current), + TransactionFilterProxy::MAX_DATE); + break; + case ThisWeek: { + // Find last Monday + QDate startOfWeek = current.addDays(-(current.dayOfWeek()-1)); + transactionProxyModel->setDateRange( + QDateTime(startOfWeek), + TransactionFilterProxy::MAX_DATE); + + } break; + case ThisMonth: + transactionProxyModel->setDateRange( + QDateTime(QDate(current.year(), current.month(), 1)), + TransactionFilterProxy::MAX_DATE); + break; + case LastMonth: + transactionProxyModel->setDateRange( + QDateTime(QDate(current.year(), current.month()-1, 1)), + QDateTime(QDate(current.year(), current.month(), 1))); + break; + case ThisYear: + transactionProxyModel->setDateRange( + QDateTime(QDate(current.year(), 1, 1)), + TransactionFilterProxy::MAX_DATE); + break; + case Range: + dateRangeWidget->setVisible(true); + dateRangeChanged(); + break; + } +} + +void TransactionView::chooseType(int idx) +{ + if(!transactionProxyModel) + return; + transactionProxyModel->setTypeFilter( + typeWidget->itemData(idx).toInt()); +} + +void TransactionView::changedPrefix(const QString &prefix) +{ + if(!transactionProxyModel) + return; + transactionProxyModel->setAddressPrefix(prefix); +} + +void TransactionView::changedAmount(const QString &amount) +{ + if(!transactionProxyModel) + return; + qint64 amount_parsed = 0; + if(curecoinUnits::parse(model->getOptionsModel()->getDisplayUnit(), amount, &amount_parsed)) + { + transactionProxyModel->setMinAmount(amount_parsed); + } + else + { + transactionProxyModel->setMinAmount(0); + } +} + +void TransactionView::exportClicked() +{ + // CSV is currently the only supported format + QString filename = GUIUtil::getSaveFileName( + this, + tr("Export Transaction Data"), QString(), + tr("Comma separated file (*.csv)")); + + if (filename.isNull()) return; + + CSVModelWriter writer(filename); + + // name, column, role + writer.setModel(transactionProxyModel); + writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole); + writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole); + writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole); + writer.addColumn(tr("Label"), 0, TransactionTableModel::LabelRole); + writer.addColumn(tr("Address"), 0, TransactionTableModel::AddressRole); + writer.addColumn(tr("Amount"), 0, TransactionTableModel::FormattedAmountRole); + writer.addColumn(tr("ID"), 0, TransactionTableModel::TxIDRole); + + if(!writer.write()) + { + QMessageBox::critical(this, tr("Error exporting"), tr("Could not write to file %1.").arg(filename), + QMessageBox::Abort, QMessageBox::Abort); + } +} + +void TransactionView::contextualMenu(const QPoint &point) +{ + QModelIndex index = transactionView->indexAt(point); + if(index.isValid()) + { + contextMenu->exec(QCursor::pos()); + } +} + +void TransactionView::copyAddress() +{ + GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::AddressRole); +} + +void TransactionView::copyLabel() +{ + GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::LabelRole); +} + +void TransactionView::copyAmount() +{ + GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::FormattedAmountRole); +} + +void TransactionView::editLabel() +{ + if(!transactionView->selectionModel() ||!model) + return; + QModelIndexList selection = transactionView->selectionModel()->selectedRows(); + if(!selection.isEmpty()) + { + AddressTableModel *addressBook = model->getAddressTableModel(); + if(!addressBook) + return; + QString address = selection.at(0).data(TransactionTableModel::AddressRole).toString(); + if(address.isEmpty()) + { + // If this transaction has no associated address, exit + return; + } + // Is address in address book? Address book can miss address when a transaction is + // sent from outside the UI. + int idx = addressBook->lookupAddress(address); + if(idx != -1) + { + // Edit sending / receiving address + QModelIndex modelIdx = addressBook->index(idx, 0, QModelIndex()); + // Determine type of address, launch appropriate editor dialog type + QString type = modelIdx.data(AddressTableModel::TypeRole).toString(); + + EditAddressDialog dlg(type==AddressTableModel::Receive + ? EditAddressDialog::EditReceivingAddress + : EditAddressDialog::EditSendingAddress, + this); + dlg.setModel(addressBook); + dlg.loadRow(idx); + dlg.exec(); + } + else + { + // Add sending address + EditAddressDialog dlg(EditAddressDialog::NewSendingAddress, + this); + dlg.setModel(addressBook); + dlg.setAddress(address); + dlg.exec(); + } + } +} + +void TransactionView::showDetails() +{ + if(!transactionView->selectionModel()) + return; + QModelIndexList selection = transactionView->selectionModel()->selectedRows(); + if(!selection.isEmpty()) + { + TransactionDescDialog dlg(selection.at(0)); + dlg.exec(); + } +} + +QWidget *TransactionView::createDateRangeWidget() +{ + dateRangeWidget = new QFrame(); + dateRangeWidget->setFrameStyle(QFrame::Panel | QFrame::Raised); + dateRangeWidget->setContentsMargins(1,1,1,1); + QHBoxLayout *layout = new QHBoxLayout(dateRangeWidget); + layout->setContentsMargins(0,0,0,0); + layout->addSpacing(23); + layout->addWidget(new QLabel(tr("Range:"))); + + dateFrom = new QDateTimeEdit(this); + dateFrom->setDisplayFormat("dd/MM/yy"); + dateFrom->setCalendarPopup(true); + dateFrom->setMinimumWidth(100); + dateFrom->setDate(QDate::currentDate().addDays(-7)); + layout->addWidget(dateFrom); + layout->addWidget(new QLabel(tr("to"))); + + dateTo = new QDateTimeEdit(this); + dateTo->setDisplayFormat("dd/MM/yy"); + dateTo->setCalendarPopup(true); + dateTo->setMinimumWidth(100); + dateTo->setDate(QDate::currentDate()); + layout->addWidget(dateTo); + layout->addStretch(); + + // Hide by default + dateRangeWidget->setVisible(false); + + // Notify on change + connect(dateFrom, SIGNAL(dateChanged(QDate)), this, SLOT(dateRangeChanged())); + connect(dateTo, SIGNAL(dateChanged(QDate)), this, SLOT(dateRangeChanged())); + + return dateRangeWidget; +} + +void TransactionView::dateRangeChanged() +{ + if(!transactionProxyModel) + return; + transactionProxyModel->setDateRange( + QDateTime(dateFrom->date()), + QDateTime(dateTo->date()).addDays(1)); +} + +void TransactionView::focusTransaction(const QModelIndex &idx) +{ + if(!transactionProxyModel) + return; + QModelIndex targetIdx = transactionProxyModel->mapFromSource(idx); + transactionView->scrollTo(targetIdx); + transactionView->setCurrentIndex(targetIdx); + transactionView->setFocus(); +} diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h new file mode 100644 index 0000000..4ade3ec --- /dev/null +++ b/src/qt/transactionview.h @@ -0,0 +1,82 @@ +#ifndef TRANSACTIONVIEW_H +#define TRANSACTIONVIEW_H + +#include + +class WalletModel; +class TransactionFilterProxy; + +QT_BEGIN_NAMESPACE +class QTableView; +class QComboBox; +class QLineEdit; +class QModelIndex; +class QMenu; +class QFrame; +class QDateTimeEdit; +QT_END_NAMESPACE + +/** Widget showing the transaction list for a wallet, including a filter row. + Using the filter row, the user can view or export a subset of the transactions. + */ +class TransactionView : public QWidget +{ + Q_OBJECT +public: + explicit TransactionView(QWidget *parent = 0); + + void setModel(WalletModel *model); + + // Date ranges for filter + enum DateEnum + { + All, + Today, + ThisWeek, + ThisMonth, + LastMonth, + ThisYear, + Range + }; + +private: + WalletModel *model; + TransactionFilterProxy *transactionProxyModel; + QTableView *transactionView; + + QComboBox *dateWidget; + QComboBox *typeWidget; + QLineEdit *addressWidget; + QLineEdit *amountWidget; + + QMenu *contextMenu; + + QFrame *dateRangeWidget; + QDateTimeEdit *dateFrom; + QDateTimeEdit *dateTo; + + QWidget *createDateRangeWidget(); + +private slots: + void contextualMenu(const QPoint &); + void dateRangeChanged(); + void showDetails(); + void copyAddress(); + void editLabel(); + void copyLabel(); + void copyAmount(); + +signals: + void doubleClicked(const QModelIndex&); + +public slots: + void chooseDate(int idx); + void chooseType(int idx); + void changedPrefix(const QString &prefix); + void changedAmount(const QString &amount); + void exportClicked(); + void focusTransaction(const QModelIndex&); + +}; + +#endif // TRANSACTIONVIEW_H diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp new file mode 100644 index 0000000..75225f3 --- /dev/null +++ b/src/qt/walletmodel.cpp @@ -0,0 +1,386 @@ +#include "walletmodel.h" +#include "guiconstants.h" +#include "optionsmodel.h" +#include "addresstablemodel.h" +#include "transactiontablemodel.h" + +#include "ui_interface.h" +#include "wallet.h" +#include "walletdb.h" // for BackupWallet +#include "base58.h" + +#include +#include + +WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent) : + QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0), + transactionTableModel(0), + cachedBalance(0), cachedStake(0), cachedUnconfirmedBalance(0), cachedImmatureBalance(0), + cachedNumTransactions(0), + cachedEncryptionStatus(Unencrypted), + cachedNumBlocks(0) +{ + addressTableModel = new AddressTableModel(wallet, this); + transactionTableModel = new TransactionTableModel(wallet, this); + + // This timer will be fired repeatedly to update the balance + pollTimer = new QTimer(this); + connect(pollTimer, SIGNAL(timeout()), this, SLOT(pollBalanceChanged())); + pollTimer->start(MODEL_UPDATE_DELAY); + + subscribeToCoreSignals(); +} + +WalletModel::~WalletModel() +{ + unsubscribeFromCoreSignals(); +} + +qint64 WalletModel::getBalance() const +{ + return wallet->GetBalance(); +} + +qint64 WalletModel::getUnconfirmedBalance() const +{ + return wallet->GetUnconfirmedBalance(); +} + +qint64 WalletModel::getStake() const +{ + return wallet->GetStake(); +} + +qint64 WalletModel::getImmatureBalance() const +{ + return wallet->GetImmatureBalance(); +} + +int WalletModel::getNumTransactions() const +{ + int numTransactions = 0; + { + LOCK(wallet->cs_wallet); + numTransactions = wallet->mapWallet.size(); + } + return numTransactions; +} + +void WalletModel::updateStatus() +{ + EncryptionStatus newEncryptionStatus = getEncryptionStatus(); + + if(cachedEncryptionStatus != newEncryptionStatus) + emit encryptionStatusChanged(newEncryptionStatus); +} + +void WalletModel::pollBalanceChanged() +{ + if(nBestHeight != cachedNumBlocks) + { + // Balance and number of transactions might have changed + cachedNumBlocks = nBestHeight; + checkBalanceChanged(); + } +} + +void WalletModel::checkBalanceChanged() +{ + qint64 newBalance = getBalance(); + qint64 newStake = getStake(); + qint64 newUnconfirmedBalance = getUnconfirmedBalance(); + qint64 newImmatureBalance = getImmatureBalance(); + + if(cachedBalance != newBalance || cachedStake != newStake || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance) + { + cachedBalance = newBalance; + cachedStake = newStake; + cachedUnconfirmedBalance = newUnconfirmedBalance; + cachedImmatureBalance = newImmatureBalance; + emit balanceChanged(newBalance, newStake, newUnconfirmedBalance, newImmatureBalance); + } +} + +void WalletModel::updateTransaction(const QString &hash, int status) +{ + if(transactionTableModel) + transactionTableModel->updateTransaction(hash, status); + + // Balance and number of transactions might have changed + checkBalanceChanged(); + + int newNumTransactions = getNumTransactions(); + if(cachedNumTransactions != newNumTransactions) + { + cachedNumTransactions = newNumTransactions; + emit numTransactionsChanged(newNumTransactions); + } +} + +void WalletModel::updateAddressBook(const QString &address, const QString &label, bool isMine, int status) +{ + if(addressTableModel) + addressTableModel->updateEntry(address, label, isMine, status); +} + +bool WalletModel::validateAddress(const QString &address) +{ + CcurecoinAddress addressParsed(address.toStdString()); + return addressParsed.IsValid(); +} + +WalletModel::SendCoinsReturn WalletModel::sendCoins(const QString &txcomment, const QList &recipients) +{ + qint64 total = 0; + QSet setAddress; + QString hex; + + if(recipients.empty()) + { + return OK; + } + + // Pre-check input data for validity + foreach(const SendCoinsRecipient &rcp, recipients) + { + if(!validateAddress(rcp.address)) + { + return InvalidAddress; + } + setAddress.insert(rcp.address); + + if(rcp.amount <= 0) + { + return InvalidAmount; + } + total += rcp.amount; + } + + if(recipients.size() > setAddress.size()) + { + return DuplicateAddress; + } + + if(total > getBalance()) + { + return AmountExceedsBalance; + } + + if((total + nTransactionFee) > getBalance()) + { + return SendCoinsReturn(AmountWithFeeExceedsBalance, nTransactionFee); + } + + { + LOCK2(cs_main, wallet->cs_wallet); + + // Sendmany + std::vector > vecSend; + foreach(const SendCoinsRecipient &rcp, recipients) + { + CScript scriptPubKey; + scriptPubKey.SetDestination(CcurecoinAddress(rcp.address.toStdString()).Get()); + vecSend.push_back(make_pair(scriptPubKey, rcp.amount)); + } + + CWalletTx wtx; + CReserveKey keyChange(wallet); + int64 nFeeRequired = 0; + std::string strTxComment = txcomment.toStdString(); + if (!strTxComment.empty()) + strTxComment = "text:" + strTxComment; + bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, strTxComment); + + if(!fCreated) + { + if((total + nFeeRequired) > wallet->GetBalance()) + { + return SendCoinsReturn(AmountWithFeeExceedsBalance, nFeeRequired); + } + return TransactionCreationFailed; + } + if(!uiInterface.ThreadSafeAskFee(nFeeRequired, tr("Sending...").toStdString())) + { + return Aborted; + } + if(!wallet->CommitTransaction(wtx, keyChange)) + { + return TransactionCommitFailed; + } + hex = QString::fromStdString(wtx.GetHash().GetHex()); + } + + // Add addresses / update labels that we've sent to to the address book + foreach(const SendCoinsRecipient &rcp, recipients) + { + std::string strAddress = rcp.address.toStdString(); + CTxDestination dest = CcurecoinAddress(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); + } + } + } + + return SendCoinsReturn(OK, 0, hex); +} + +OptionsModel *WalletModel::getOptionsModel() +{ + return optionsModel; +} + +AddressTableModel *WalletModel::getAddressTableModel() +{ + return addressTableModel; +} + +TransactionTableModel *WalletModel::getTransactionTableModel() +{ + return transactionTableModel; +} + +WalletModel::EncryptionStatus WalletModel::getEncryptionStatus() const +{ + if(!wallet->IsCrypted()) + { + return Unencrypted; + } + else if(wallet->IsLocked()) + { + return Locked; + } + else + { + return Unlocked; + } +} + +bool WalletModel::setWalletEncrypted(bool encrypted, const SecureString &passphrase) +{ + if(encrypted) + { + // Encrypt + return wallet->EncryptWallet(passphrase); + } + else + { + // Decrypt -- TODO; not supported yet + return false; + } +} + +bool WalletModel::setWalletLocked(bool locked, const SecureString &passPhrase) +{ + if(locked) + { + // Lock + return wallet->Lock(); + } + else + { + // Unlock + return wallet->Unlock(passPhrase); + } +} + +bool WalletModel::changePassphrase(const SecureString &oldPass, const SecureString &newPass) +{ + bool retval; + { + LOCK(wallet->cs_wallet); + wallet->Lock(); // Make sure wallet is locked before attempting pass change + retval = wallet->ChangeWalletPassphrase(oldPass, newPass); + } + return retval; +} + +bool WalletModel::backupWallet(const QString &filename) +{ + return BackupWallet(*wallet, filename.toLocal8Bit().data()); +} + +// Handlers for core signals +static void NotifyKeyStoreStatusChanged(WalletModel *walletmodel, CCryptoKeyStore *wallet) +{ + OutputDebugStringF("NotifyKeyStoreStatusChanged\n"); + QMetaObject::invokeMethod(walletmodel, "updateStatus", Qt::QueuedConnection); +} + +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", CcurecoinAddress(address).ToString().c_str(), label.c_str(), isMine, status); + QMetaObject::invokeMethod(walletmodel, "updateAddressBook", Qt::QueuedConnection, + Q_ARG(QString, QString::fromStdString(CcurecoinAddress(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) +{ + OutputDebugStringF("NotifyTransactionChanged %s status=%i\n", hash.GetHex().c_str(), status); + QMetaObject::invokeMethod(walletmodel, "updateTransaction", Qt::QueuedConnection, + Q_ARG(QString, QString::fromStdString(hash.GetHex())), + Q_ARG(int, status)); +} + +void WalletModel::subscribeToCoreSignals() +{ + // Connect signals to wallet + wallet->NotifyStatusChanged.connect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1)); + wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5)); + wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3)); +} + +void WalletModel::unsubscribeFromCoreSignals() +{ + // Disconnect signals from wallet + wallet->NotifyStatusChanged.disconnect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1)); + wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5)); + wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3)); +} + +// WalletModel::UnlockContext implementation +WalletModel::UnlockContext WalletModel::requestUnlock() +{ + bool was_locked = getEncryptionStatus() == Locked; + if(was_locked) + { + // Request UI to unlock wallet + emit requireUnlock(); + } + // If wallet is still locked, unlock was failed or cancelled, mark context as invalid + bool valid = getEncryptionStatus() != Locked; + + return UnlockContext(this, valid, was_locked); +} + +WalletModel::UnlockContext::UnlockContext(WalletModel *wallet, bool valid, bool relock): + wallet(wallet), + valid(valid), + relock(relock) +{ +} + +WalletModel::UnlockContext::~UnlockContext() +{ + if(valid && relock) + { + wallet->setWalletLocked(true); + } +} + +void WalletModel::UnlockContext::CopyFrom(const UnlockContext& rhs) +{ + // Transfer context; old object no longer relocks wallet + *this = rhs; + rhs.relock = false; +} diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h new file mode 100644 index 0000000..cafe7fe --- /dev/null +++ b/src/qt/walletmodel.h @@ -0,0 +1,169 @@ +#ifndef WALLETMODEL_H +#define WALLETMODEL_H + +#include + +#include "allocators.h" /* for SecureString */ + +class OptionsModel; +class AddressTableModel; +class TransactionTableModel; +class CWallet; + +QT_BEGIN_NAMESPACE +class QTimer; +QT_END_NAMESPACE + +class SendCoinsRecipient +{ +public: + QString address; + QString label; + qint64 amount; +}; + +/** Interface to curecoin wallet from Qt view code. */ +class WalletModel : public QObject +{ + Q_OBJECT + +public: + explicit WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent = 0); + ~WalletModel(); + + enum StatusCode // Returned by sendCoins + { + OK, + InvalidAmount, + InvalidAddress, + AmountExceedsBalance, + AmountWithFeeExceedsBalance, + DuplicateAddress, + TransactionCreationFailed, // Error returned when wallet is still locked + TransactionCommitFailed, + Aborted + }; + + enum EncryptionStatus + { + Unencrypted, // !wallet->IsCrypted() + Locked, // wallet->IsCrypted() && wallet->IsLocked() + Unlocked // wallet->IsCrypted() && !wallet->IsLocked() + }; + + OptionsModel *getOptionsModel(); + AddressTableModel *getAddressTableModel(); + TransactionTableModel *getTransactionTableModel(); + + qint64 getBalance() const; + qint64 getStake() const; + qint64 getUnconfirmedBalance() const; + qint64 getImmatureBalance() const; + int getNumTransactions() const; + EncryptionStatus getEncryptionStatus() const; + + // Check address for validity + bool validateAddress(const QString &address); + + // Return status record for SendCoins, contains error id + information + struct SendCoinsReturn + { + SendCoinsReturn(StatusCode status, + qint64 fee=0, + QString hex=QString()): + status(status), fee(fee), hex(hex) {} + StatusCode status; + qint64 fee; // is used in case status is "AmountWithFeeExceedsBalance" + QString hex; // is filled with the transaction hash if status is "OK" + }; + + // Send coins to a list of recipients + SendCoinsReturn sendCoins(const QString &txcomment, const QList &recipients); + + // Wallet encryption + bool setWalletEncrypted(bool encrypted, const SecureString &passphrase); + // Passphrase only needed when unlocking + bool setWalletLocked(bool locked, const SecureString &passPhrase=SecureString()); + bool changePassphrase(const SecureString &oldPass, const SecureString &newPass); + // Wallet backup + bool backupWallet(const QString &filename); + + // RAI object for unlocking wallet, returned by requestUnlock() + class UnlockContext + { + public: + UnlockContext(WalletModel *wallet, bool valid, bool relock); + ~UnlockContext(); + + bool isValid() const { return valid; } + + // Copy operator and constructor transfer the context + UnlockContext(const UnlockContext& obj) { CopyFrom(obj); } + UnlockContext& operator=(const UnlockContext& rhs) { CopyFrom(rhs); return *this; } + private: + WalletModel *wallet; + bool valid; + mutable bool relock; // mutable, as it can be set to false by copying + + void CopyFrom(const UnlockContext& rhs); + }; + + UnlockContext requestUnlock(); + +private: + CWallet *wallet; + + // Wallet has an options model for wallet-specific options + // (transaction fee, for example) + OptionsModel *optionsModel; + + AddressTableModel *addressTableModel; + TransactionTableModel *transactionTableModel; + + // Cache some values to be able to detect changes + qint64 cachedBalance; + qint64 cachedStake; + qint64 cachedUnconfirmedBalance; + qint64 cachedImmatureBalance; + qint64 cachedNumTransactions; + EncryptionStatus cachedEncryptionStatus; + int cachedNumBlocks; + + QTimer *pollTimer; + + void subscribeToCoreSignals(); + void unsubscribeFromCoreSignals(); + void checkBalanceChanged(); + + +public slots: + /* Wallet status might have changed */ + void updateStatus(); + /* New transaction, or transaction changed status */ + void updateTransaction(const QString &hash, int status); + /* New, updated or removed address book entry */ + void updateAddressBook(const QString &address, const QString &label, bool isMine, int status); + /* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */ + void pollBalanceChanged(); + +signals: + // Signal that balance in wallet changed + void balanceChanged(qint64 balance, qint64 stake, qint64 unconfirmedBalance, qint64 immatureBalance); + + // Number of transactions in wallet changed + void numTransactionsChanged(int count); + + // Encryption status of wallet changed + void encryptionStatusChanged(int status); + + // Signal emitted when wallet needs to be unlocked + // It is valid behaviour for listeners to keep the wallet locked after this signal; + // this means that the unlocking failed or was cancelled. + void requireUnlock(); + + // Asynchronous error notification + void error(const QString &title, const QString &message, bool modal); +}; + + +#endif // WALLETMODEL_H diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp new file mode 100644 index 0000000..a6cd4af --- /dev/null +++ b/src/rpcblockchain.cpp @@ -0,0 +1,232 @@ +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// 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 "curecoinrpc.h" + +using namespace json_spirit; +using namespace std; + +extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, json_spirit::Object& entry); + +double GetDifficulty(const CBlockIndex* blockindex) +{ + // Floating point number that is a multiple of the minimum difficulty, + // minimum difficulty = 1.0. + if (blockindex == NULL) + { + if (pindexBest == NULL) + return 1.0; + else + blockindex = GetLastBlockIndex(pindexBest, false); + } + + int nShift = (blockindex->nBits >> 24) & 0xff; + + double dDiff = + (double)0x0000ffff / (double)(blockindex->nBits & 0x00ffffff); + + while (nShift < 29) + { + dDiff *= 256.0; + nShift++; + } + while (nShift > 29) + { + dDiff /= 256.0; + nShift--; + } + + return dDiff; +} + + +Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool fPrintTransactionDetail) +{ + Object result; + result.push_back(Pair("hash", block.GetHash().GetHex())); + CMerkleTx txGen(block.vtx[0]); + txGen.SetMerkleBranch(&block); + result.push_back(Pair("confirmations", (int)txGen.GetDepthInMainChain())); + result.push_back(Pair("size", (int)::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION))); + result.push_back(Pair("height", blockindex->nHeight)); + result.push_back(Pair("version", block.nVersion)); + result.push_back(Pair("merkleroot", block.hashMerkleRoot.GetHex())); + result.push_back(Pair("mint", ValueFromAmount(blockindex->nMint))); + result.push_back(Pair("time", (boost::int64_t)block.GetBlockTime())); + 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))); + + if (blockindex->pprev) + result.push_back(Pair("previousblockhash", blockindex->pprev->GetBlockHash().GetHex())); + if (blockindex->pnext) + result.push_back(Pair("nextblockhash", blockindex->pnext->GetBlockHash().GetHex())); + + 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("modifierchecksum", strprintf("%08x", blockindex->nStakeModifierChecksum))); + Array txinfo; + BOOST_FOREACH (const CTransaction& tx, block.vtx) + { + if (fPrintTransactionDetail) + { + Object entry; + + entry.push_back(Pair("txid", tx.GetHash().GetHex())); + TxToJSON(tx, 0, entry); + + txinfo.push_back(entry); + } + else + txinfo.push_back(tx.GetHash().GetHex()); + } + + result.push_back(Pair("tx", txinfo)); + result.push_back(Pair("signature", HexStr(block.vchBlockSig.begin(), block.vchBlockSig.end()))); + + return result; +} + + +Value getblockcount(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "getblockcount\n" + "Returns the number of blocks in the longest block chain."); + + return nBestHeight; +} + + +Value getdifficulty(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "getdifficulty\n" + "Returns the difficulty as a multiple of the minimum difficulty."); + + Object obj; + obj.push_back(Pair("proof-of-work", GetDifficulty())); + obj.push_back(Pair("proof-of-stake", GetDifficulty(GetLastBlockIndex(pindexBest, true)))); + obj.push_back(Pair("search-interval", (int)nLastCoinStakeSearchInterval)); + return obj; +} + + +Value settxfee(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 1 || AmountFromValue(params[0]) < MIN_TX_FEE) + throw runtime_error( + "settxfee \n" + " is a real and is rounded to the nearest 0.01"); + + nTransactionFee = AmountFromValue(params[0]); + nTransactionFee = (nTransactionFee / CENT) * CENT; // round to cent + + return true; +} + +Value getrawmempool(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "getrawmempool\n" + "Returns all transaction ids in memory pool."); + + vector vtxid; + mempool.queryHashes(vtxid); + + Array a; + BOOST_FOREACH(const uint256& hash, vtxid) + a.push_back(hash.ToString()); + + return a; +} + +Value getblockhash(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "getblockhash \n" + "Returns hash of block in best-block-chain at ."); + + int nHeight = params[0].get_int(); + if (nHeight < 0 || nHeight > nBestHeight) + throw runtime_error("Block number out of range."); + + CBlockIndex* pblockindex = FindBlockByHeight(nHeight); + return pblockindex->phashBlock->GetHex(); +} + +Value getblock(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 2) + throw runtime_error( + "getblock [txinfo]\n" + "txinfo optional to print more detailed tx info\n" + "Returns details of a block with given block-hash."); + + std::string strHash = params[0].get_str(); + uint256 hash(strHash); + + if (mapBlockIndex.count(hash) == 0) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found"); + + CBlock block; + CBlockIndex* pblockindex = mapBlockIndex[hash]; + block.ReadFromDisk(pblockindex, true); + + return blockToJSON(block, pblockindex, params.size() > 1 ? params[1].get_bool() : false); +} + +Value getblockbynumber(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 2) + throw runtime_error( + "getblock [txinfo]\n" + "txinfo optional to print more detailed tx info\n" + "Returns details of a block with given block-number."); + + int nHeight = params[0].get_int(); + if (nHeight < 0 || nHeight > nBestHeight) + throw runtime_error("Block number out of range."); + + CBlock block; + CBlockIndex* pblockindex = mapBlockIndex[hashBestChain]; + while (pblockindex->nHeight > nHeight) + pblockindex = pblockindex->pprev; + + uint256 hash = *pblockindex->phashBlock; + + pblockindex = mapBlockIndex[hash]; + block.ReadFromDisk(pblockindex, true); + + return blockToJSON(block, pblockindex, params.size() > 1 ? params[1].get_bool() : false); +} + +// ppcoin: get information of sync-checkpoint +Value getcheckpoint(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "getcheckpoint\n" + "Show info of synchronized checkpoint.\n"); + + Object result; + CBlockIndex* pindexCheckpoint; + + result.push_back(Pair("synccheckpoint", Checkpoints::hashSyncCheckpoint.ToString().c_str())); + pindexCheckpoint = mapBlockIndex[Checkpoints::hashSyncCheckpoint]; + result.push_back(Pair("height", pindexCheckpoint->nHeight)); + result.push_back(Pair("timestamp", DateTimeStrFormat(pindexCheckpoint->GetBlockTime()).c_str())); + if (mapArgs.count("-checkpointkey")) + result.push_back(Pair("checkpointmaster", true)); + + return result; +} diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp new file mode 100644 index 0000000..55acc0c --- /dev/null +++ b/src/rpcdump.cpp @@ -0,0 +1,95 @@ +// Copyright (c) 2003 curecoin Developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "init.h" // for pwalletMain +#include "curecoinrpc.h" +#include "ui_interface.h" +#include "base58.h" + +#include + +#define printf OutputDebugStringF + +using namespace json_spirit; +using namespace std; + +class CTxDump +{ +public: + CBlockIndex *pindex; + int64 nValue; + bool fSpent; + CWalletTx* ptx; + int nOut; + CTxDump(CWalletTx* ptx = NULL, int nOut = -1) + { + pindex = NULL; + nValue = 0; + fSpent = false; + this->ptx = ptx; + this->nOut = nOut; + } +}; + +Value importprivkey(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 2) + throw runtime_error( + "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(); + CcurecoinSecret vchSecret; + bool fGood = vchSecret.SetString(strSecret); + + if (!fGood) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key"); + if (fWalletUnlockMintOnly) // ppcoin: no importprivkey in mint-only mode + throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Wallet is unlocked for minting only."); + + CKey key; + bool fCompressed; + CSecret secret = vchSecret.GetSecret(fCompressed); + key.SetSecret(secret, fCompressed); + CKeyID vchAddress = key.GetPubKey().GetID(); + { + LOCK2(cs_main, pwalletMain->cs_wallet); + + pwalletMain->MarkDirty(); + pwalletMain->SetAddressBookName(vchAddress, strLabel); + + if (!pwalletMain->AddKey(key)) + throw JSONRPCError(RPC_WALLET_ERROR, "Error adding key to wallet"); + + pwalletMain->ScanForWalletTransactions(pindexGenesisBlock, true); + pwalletMain->ReacceptWalletTransactions(); + } + + 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 ."); + + string strAddress = params[0].get_str(); + CcurecoinAddress address; + if (!address.SetString(strAddress)) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid curecoin address"); + if (fWalletUnlockMintOnly) // ppcoin: no dumpprivkey in mint-only mode + throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Wallet is unlocked for minting only."); + CKeyID keyID; + if (!address.GetKeyID(keyID)) + throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to a key"); + CSecret vchSecret; + bool fCompressed; + if (!pwalletMain->GetSecret(keyID, vchSecret, fCompressed)) + throw JSONRPCError(RPC_WALLET_ERROR, "Private key for address " + strAddress + " is not known"); + return CcurecoinSecret(vchSecret, fCompressed).ToString(); +} diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp new file mode 100644 index 0000000..51dfaeb --- /dev/null +++ b/src/rpcmining.cpp @@ -0,0 +1,553 @@ +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// 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 "db.h" +#include "init.h" +#include "curecoinrpc.h" + +using namespace json_spirit; +using namespace std; + +Value getgenerate(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "getgenerate\n" + "Returns true or false."); + + return GetBoolArg("-gen"); +} + + +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) + { + int nGenProcLimit = params[1].get_int(); + mapArgs["-genproclimit"] = itostr(nGenProcLimit); + if (nGenProcLimit == 0) + fGenerate = false; + } + mapArgs["-gen"] = (fGenerate ? "1" : "0"); + + Generatecurecoins(fGenerate, pwalletMain); + return Value::null; +} + + +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; +} + +// 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) +{ + if (fHelp || params.size() > 1) + 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."); + + return GetNetworkHashPS(params.size() > 0 ? params[0].get_int() : 120); +} + + +Value getmininginfo(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "getmininginfo\n" + "Returns an object containing mining-related information."); + + Object obj; + 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())); + 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())); + obj.push_back(Pair("testnet", fTestNet)); + return obj; +} + + +Value getworkex(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 2) + throw runtime_error( + "getworkex [data, coinbase]\n" + "If [data, coinbase] is not specified, returns extended work data.\n" + ); + + if (vNodes.empty()) + throw JSONRPCError(-9, "curecoin is not connected!"); + + if (IsInitialBlockDownload()) + throw JSONRPCError(-10, "curecoin is downloading blocks..."); + + typedef map > mapNewBlock_t; + static mapNewBlock_t mapNewBlock; + static vector vNewBlock; + static CReserveKey reservekey(pwalletMain); + + if (params.size() == 0) + { + // Update block + static unsigned int nTransactionsUpdatedLast; + static CBlockIndex* pindexPrev; + static int64 nStart; + static CBlock* pblock; + if (pindexPrev != pindexBest || + (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60)) + { + if (pindexPrev != pindexBest) + { + // Deallocate old blocks since they're obsolete now + mapNewBlock.clear(); + BOOST_FOREACH(CBlock* pblock, vNewBlock) + delete pblock; + vNewBlock.clear(); + } + nTransactionsUpdatedLast = nTransactionsUpdated; + pindexPrev = pindexBest; + nStart = GetTime(); + + // Create new block + pblock = CreateNewBlock(pwalletMain); + if (!pblock) + throw JSONRPCError(-7, "Out of memory"); + vNewBlock.push_back(pblock); + } + + // Update nTime + pblock->nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime()); + pblock->nNonce = 0; + + // Update nExtraNonce + static unsigned int nExtraNonce = 0; + IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); + + // Save + mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig); + + // Prebuild hash buffers + char pmidstate[32]; + char pdata[128]; + char phash1[64]; + FormatHashBuffers(pblock, pmidstate, pdata, phash1); + + uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); + + CTransaction coinbaseTx = pblock->vtx[0]; + std::vector merkle = pblock->GetMerkleBranch(0); + + Object result; + result.push_back(Pair("data", HexStr(BEGIN(pdata), END(pdata)))); + result.push_back(Pair("target", HexStr(BEGIN(hashTarget), END(hashTarget)))); + + CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + ssTx << coinbaseTx; + result.push_back(Pair("coinbase", HexStr(ssTx.begin(), ssTx.end()))); + + Array merkle_arr; + + BOOST_FOREACH(uint256 merkleh, merkle) { + merkle_arr.push_back(HexStr(BEGIN(merkleh), END(merkleh))); + } + + result.push_back(Pair("merkle", merkle_arr)); + + + return result; + } + else + { + // Parse parameters + vector vchData = ParseHex(params[0].get_str()); + vector coinbase; + + if(params.size() == 2) + coinbase = ParseHex(params[1].get_str()); + + if (vchData.size() != 128) + throw JSONRPCError(-8, "Invalid parameter"); + + CBlock* pdata = (CBlock*)&vchData[0]; + + // Byte reverse + for (int i = 0; i < 128/4; i++) + ((unsigned int*)pdata)[i] = ByteReverse(((unsigned int*)pdata)[i]); + + // Get saved block + if (!mapNewBlock.count(pdata->hashMerkleRoot)) + return false; + CBlock* pblock = mapNewBlock[pdata->hashMerkleRoot].first; + + pblock->nTime = pdata->nTime; + pblock->nNonce = pdata->nNonce; + + 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! + + pblock->hashMerkleRoot = pblock->BuildMerkleTree(); + + if (!pblock->SignBlock(*pwalletMain)) + throw JSONRPCError(-100, "Unable to sign block, wallet locked?"); + + return CheckWork(pblock, *pwalletMain, reservekey); + } +} + + +Value getwork(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "getwork [data]\n" + "If [data] is not specified, returns formatted hash data to work on:\n" + " \"midstate\" : precomputed hash state after hashing the first half of the data (DEPRECATED)\n" // deprecated + " \"data\" : block data\n" + " \"hash1\" : formatted hash buffer for second hash (DEPRECATED)\n" // deprecated + " \"target\" : little endian hash target\n" + "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, "curecoin is not connected!"); + + if (IsInitialBlockDownload()) + throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "curecoin is downloading blocks..."); + + typedef map > mapNewBlock_t; + static mapNewBlock_t mapNewBlock; // FIXME: thread safety + static vector vNewBlock; + static CReserveKey reservekey(pwalletMain); + + if (params.size() == 0) + { + // Update block + static unsigned int nTransactionsUpdatedLast; + static CBlockIndex* pindexPrev; + static int64 nStart; + static CBlock* pblock; + if (pindexPrev != pindexBest || + (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 60)) + { + if (pindexPrev != pindexBest) + { + // Deallocate old blocks since they're obsolete now + mapNewBlock.clear(); + BOOST_FOREACH(CBlock* pblock, vNewBlock) + delete pblock; + vNewBlock.clear(); + } + + // Clear pindexPrev so future getworks make a new block, despite any failures from here on + pindexPrev = NULL; + + // Store the pindexBest used before CreateNewBlock, to avoid races + nTransactionsUpdatedLast = nTransactionsUpdated; + CBlockIndex* pindexPrevNew = pindexBest; + nStart = GetTime(); + + // Create new block + pblock = CreateNewBlock(pwalletMain); + if (!pblock) + throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory"); + vNewBlock.push_back(pblock); + + // Need to update only after we know CreateNewBlock succeeded + pindexPrev = pindexPrevNew; + } + + // Update nTime + pblock->UpdateTime(pindexPrev); + pblock->nNonce = 0; + + // Update nExtraNonce + static unsigned int nExtraNonce = 0; + IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); + + // Save + mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig); + + // Pre-build hash buffers + char pmidstate[32]; + char pdata[128]; + char phash1[64]; + FormatHashBuffers(pblock, pmidstate, pdata, phash1); + + uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); + + Object result; + result.push_back(Pair("midstate", HexStr(BEGIN(pmidstate), END(pmidstate)))); // deprecated + result.push_back(Pair("data", HexStr(BEGIN(pdata), END(pdata)))); + result.push_back(Pair("hash1", HexStr(BEGIN(phash1), END(phash1)))); // deprecated + result.push_back(Pair("target", HexStr(BEGIN(hashTarget), END(hashTarget)))); + return result; + } + else + { + // Parse parameters + vector vchData = ParseHex(params[0].get_str()); + if (vchData.size() != 128) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter"); + CBlock* pdata = (CBlock*)&vchData[0]; + + // Byte reverse + for (int i = 0; i < 128/4; i++) + ((unsigned int*)pdata)[i] = ByteReverse(((unsigned int*)pdata)[i]); + + // Get saved block + if (!mapNewBlock.count(pdata->hashMerkleRoot)) + return false; + CBlock* pblock = mapNewBlock[pdata->hashMerkleRoot].first; + + pblock->nTime = pdata->nTime; + pblock->nNonce = pdata->nNonce; + 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); + } +} + + +Value getblocktemplate(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "getblocktemplate [params]\n" + "Returns data needed to construct a block to work on:\n" + " \"version\" : block version\n" + " \"previousblockhash\" : hash of current highest block\n" + " \"transactions\" : contents of non-coinbase transactions that should be included in the next block\n" + " \"coinbaseaux\" : data that should be included in coinbase\n" + " \"coinbasevalue\" : maximum allowable input to coinbase transaction, including the generation award and transaction fees\n" + " \"target\" : hash target\n" + " \"mintime\" : minimum timestamp appropriate for next block\n" + " \"curtime\" : current timestamp\n" + " \"mutable\" : list of ways the block template may be changed\n" + " \"noncerange\" : range of valid nonces\n" + " \"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."); + + std::string strMode = "template"; + if (params.size() > 0) + { + const Object& oparam = params[0].get_obj(); + const Value& modeval = find_value(oparam, "mode"); + if (modeval.type() == str_type) + strMode = modeval.get_str(); + else if (modeval.type() == null_type) + { + /* Do nothing */ + } + else + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); + } + + if (strMode != "template") + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); + + if (vNodes.empty()) + throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "curecoin is not connected!"); + + if (IsInitialBlockDownload()) + throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "curecoin is downloading blocks..."); + + static CReserveKey reservekey(pwalletMain); + + // Update block + static unsigned int nTransactionsUpdatedLast; + static CBlockIndex* pindexPrev; + static int64 nStart; + static CBlock* pblock; + if (pindexPrev != pindexBest || + (nTransactionsUpdated != nTransactionsUpdatedLast && GetTime() - nStart > 5)) + { + // Clear pindexPrev so future calls make a new block, despite any failures from here on + pindexPrev = NULL; + + // Store the pindexBest used before CreateNewBlock, to avoid races + nTransactionsUpdatedLast = nTransactionsUpdated; + CBlockIndex* pindexPrevNew = pindexBest; + nStart = GetTime(); + + // Create new block + if(pblock) + { + delete pblock; + pblock = NULL; + } + pblock = CreateNewBlock(pwalletMain); + if (!pblock) + throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory"); + + // Need to update only after we know CreateNewBlock succeeded + pindexPrev = pindexPrevNew; + } + + // Update nTime + pblock->UpdateTime(pindexPrev); + pblock->nNonce = 0; + + Array transactions; + map setTxIndex; + int i = 0; + CTxDB txdb("r"); + BOOST_FOREACH (CTransaction& tx, pblock->vtx) + { + uint256 txHash = tx.GetHash(); + setTxIndex[txHash] = i++; + + if (tx.IsCoinBase() || tx.IsCoinStake()) + continue; + + Object entry; + + CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + ssTx << tx; + entry.push_back(Pair("data", HexStr(ssTx.begin(), ssTx.end()))); + + entry.push_back(Pair("hash", txHash.GetHex())); + + MapPrevTx mapInputs; + map mapUnused; + bool fInvalid = false; + if (tx.FetchInputs(txdb, mapUnused, false, false, mapInputs, fInvalid)) + { + entry.push_back(Pair("fee", (int64_t)(tx.GetValueIn(mapInputs) - tx.GetValueOut()))); + + Array deps; + BOOST_FOREACH (MapPrevTx::value_type& inp, mapInputs) + { + if (setTxIndex.count(inp.first)) + deps.push_back(setTxIndex[inp.first]); + } + entry.push_back(Pair("depends", deps)); + + int64_t nSigOps = tx.GetLegacySigOpCount(); + nSigOps += tx.GetP2SHSigOpCount(mapInputs); + entry.push_back(Pair("sigops", nSigOps)); + } + + transactions.push_back(entry); + } + + Object aux; + aux.push_back(Pair("flags", HexStr(COINBASE_FLAGS.begin(), COINBASE_FLAGS.end()))); + + uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256(); + + static Array aMutable; + if (aMutable.empty()) + { + aMutable.push_back("time"); + aMutable.push_back("transactions"); + aMutable.push_back("prevblock"); + } + + Object result; + result.push_back(Pair("version", pblock->nVersion)); + result.push_back(Pair("previousblockhash", pblock->hashPrevBlock.GetHex())); + result.push_back(Pair("transactions", transactions)); + 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("mutable", aMutable)); + result.push_back(Pair("noncerange", "00000000ffffffff")); + result.push_back(Pair("sigoplimit", (int64_t)MAX_BLOCK_SIGOPS)); + result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SIZE)); + result.push_back(Pair("curtime", (int64_t)pblock->nTime)); + result.push_back(Pair("bits", HexBits(pblock->nBits))); + result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1))); + + return result; +} + +Value submitblock(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 2) + 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."); + + vector blockData(ParseHex(params[0].get_str())); + CDataStream ssBlock(blockData, SER_NETWORK, PROTOCOL_VERSION); + CBlock block; + try { + ssBlock >> block; + } + catch (std::exception &e) { + 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"; + + return Value::null; +} + diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp new file mode 100644 index 0000000..bf216e9 --- /dev/null +++ b/src/rpcnet.cpp @@ -0,0 +1,136 @@ +// Copyright (c) 2003 curecoin Developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "net.h" +#include "curecoinrpc.h" +#include "alert.h" +#include "wallet.h" +#include "db.h" +#include "walletdb.h" + +using namespace json_spirit; +using namespace std; + +Value getconnectioncount(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "getconnectioncount\n" + "Returns the number of connections to other nodes."); + + LOCK(cs_vNodes); + return (int)vNodes.size(); +} + +static void CopyNodeStats(std::vector& vstats) +{ + vstats.clear(); + + LOCK(cs_vNodes); + vstats.reserve(vNodes.size()); + BOOST_FOREACH(CNode* pnode, vNodes) { + CNodeStats stats; + pnode->copyStats(stats); + vstats.push_back(stats); + } +} + +Value getpeerinfo(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "getpeerinfo\n" + "Returns data about each connected network node."); + + vector vstats; + CopyNodeStats(vstats); + + Array ret; + + BOOST_FOREACH(const CNodeStats& stats, vstats) { + Object obj; + + obj.push_back(Pair("addr", stats.addrName)); + obj.push_back(Pair("services", strprintf("%08"PRI64x, 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.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)); + + ret.push_back(obj); + } + + return ret; +} + +extern CCriticalSection cs_mapAlerts; +extern map mapAlerts; + +// ppcoin: send alert. +// There is a known deadlock situation with ThreadMessageHandler +// ThreadMessageHandler: holds cs_vSend and acquiring cs_main in SendMessages() +// ThreadRPCServer: holds cs_main and acquiring cs_vSend in alert.RelayTo()/PushMessage()/BeginMessage() +Value sendalert(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 6) + throw runtime_error( + "sendalert [cancelupto]\n" + " is the alert text message\n" + " is hex string of alert master private key\n" + " is the minimum applicable internal client version\n" + " is the maximum applicable internal client version\n" + " is integer priority number\n" + " is the alert id\n" + "[cancelupto] cancels all alert id's up to this number\n" + "Returns true or false."); + + CAlert alert; + CKey key; + + alert.strStatusBar = params[0].get_str(); + alert.nMinVer = params[2].get_int(); + alert.nMaxVer = params[3].get_int(); + alert.nPriority = params[4].get_int(); + alert.nID = params[5].get_int(); + if (params.size() > 6) + alert.nCancel = params[6].get_int(); + alert.nVersion = PROTOCOL_VERSION; + alert.nRelayUntil = GetAdjustedTime() + 365*24*60*60; + alert.nExpiration = GetAdjustedTime() + 365*24*60*60; + + CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION); + sMsg << (CUnsignedAlert)alert; + alert.vchMsg = vector(sMsg.begin(), sMsg.end()); + + vector vchPrivKey = ParseHex(params[1].get_str()); + key.SetPrivKey(CPrivKey(vchPrivKey.begin(), vchPrivKey.end())); // if key is not correct openssl may crash + if (!key.Sign(Hash(alert.vchMsg.begin(), alert.vchMsg.end()), alert.vchSig)) + throw runtime_error( + "Unable to sign alert, check private key?\n"); + if(!alert.ProcessAlert()) + throw runtime_error( + "Failed to process alert.\n"); + // Relay alert + { + LOCK(cs_vNodes); + BOOST_FOREACH(CNode* pnode, vNodes) + alert.RelayTo(pnode); + } + + Object result; + result.push_back(Pair("strStatusBar", alert.strStatusBar)); + result.push_back(Pair("nVersion", alert.nVersion)); + result.push_back(Pair("nMinVer", alert.nMinVer)); + result.push_back(Pair("nMaxVer", alert.nMaxVer)); + result.push_back(Pair("nPriority", alert.nPriority)); + result.push_back(Pair("nID", alert.nID)); + if (alert.nCancel > 0) + result.push_back(Pair("nCancel", alert.nCancel)); + return result; +} diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp new file mode 100644 index 0000000..be906c3 --- /dev/null +++ b/src/rpcrawtransaction.cpp @@ -0,0 +1,537 @@ +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include + +#include "base58.h" +#include "curecoinrpc.h" +#include "db.h" +#include "init.h" +#include "main.h" +#include "net.h" +#include "wallet.h" + +using namespace std; +using namespace boost; +using namespace boost::assign; +using namespace json_spirit; + +void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out) +{ + txnouttype type; + vector addresses; + int nRequired; + + out.push_back(Pair("asm", scriptPubKey.ToString())); + out.push_back(Pair("hex", HexStr(scriptPubKey.begin(), scriptPubKey.end()))); + + if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired)) + { + out.push_back(Pair("type", GetTxnOutputType(TX_NONSTANDARD))); + return; + } + + out.push_back(Pair("reqSigs", nRequired)); + out.push_back(Pair("type", GetTxnOutputType(type))); + + Array a; + BOOST_FOREACH(const CTxDestination& addr, addresses) + a.push_back(CcurecoinAddress(addr).ToString()); + out.push_back(Pair("addresses", a)); +} + +void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry) +{ + entry.push_back(Pair("txid", tx.GetHash().GetHex())); + entry.push_back(Pair("version", tx.nVersion)); + entry.push_back(Pair("time", (boost::int64_t)tx.nTime)); + entry.push_back(Pair("locktime", (boost::int64_t)tx.nLockTime)); + if (tx.nVersion >= 2) + { + entry.push_back(Pair("tx-comment", tx.strTxComment)); + } + + Array vin; + BOOST_FOREACH(const CTxIn& txin, tx.vin) + { + Object in; + if (tx.IsCoinBase()) + in.push_back(Pair("coinbase", HexStr(txin.scriptSig.begin(), txin.scriptSig.end()))); + else + { + in.push_back(Pair("txid", txin.prevout.hash.GetHex())); + in.push_back(Pair("vout", (boost::int64_t)txin.prevout.n)); + Object o; + o.push_back(Pair("asm", txin.scriptSig.ToString())); + o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end()))); + in.push_back(Pair("scriptSig", o)); + } + in.push_back(Pair("sequence", (boost::int64_t)txin.nSequence)); + vin.push_back(in); + } + entry.push_back(Pair("vin", vin)); + Array vout; + for (unsigned int i = 0; i < tx.vout.size(); i++) + { + const CTxOut& txout = tx.vout[i]; + Object out; + out.push_back(Pair("value", ValueFromAmount(txout.nValue))); + out.push_back(Pair("n", (boost::int64_t)i)); + Object o; + ScriptPubKeyToJSON(txout.scriptPubKey, o); + out.push_back(Pair("scriptPubKey", o)); + vout.push_back(out); + } + entry.push_back(Pair("vout", vout)); + + if (hashBlock != 0) + { + entry.push_back(Pair("blockhash", hashBlock.GetHex())); + map::iterator mi = mapBlockIndex.find(hashBlock); + if (mi != mapBlockIndex.end() && (*mi).second) + { + CBlockIndex* pindex = (*mi).second; + if (pindex->IsInMainChain()) + { + entry.push_back(Pair("confirmations", 1 + nBestHeight - pindex->nHeight)); + entry.push_back(Pair("time", (boost::int64_t)pindex->nTime)); + entry.push_back(Pair("blocktime", (boost::int64_t)pindex->nTime)); + } + else + entry.push_back(Pair("confirmations", 0)); + } + } +} + +Value getrawtransaction(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 2) + throw runtime_error( + "getrawtransaction [verbose=0]\n" + "If verbose=0, returns a string that is\n" + "serialized, hex-encoded data for .\n" + "If verbose is non-zero, returns an Object\n" + "with information about ."); + + uint256 hash; + hash.SetHex(params[0].get_str()); + + bool fVerbose = false; + if (params.size() > 1) + fVerbose = (params[1].get_int() != 0); + + CTransaction tx; + uint256 hashBlock = 0; + if (!GetTransaction(hash, tx, hashBlock)) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction"); + + CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + ssTx << tx; + string strHex = HexStr(ssTx.begin(), ssTx.end()); + + if (!fVerbose) + return strHex; + + Object result; + result.push_back(Pair("hex", strHex)); + TxToJSON(tx, hashBlock, result); + return result; +} + +Value listunspent(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 3) + throw runtime_error( + "listunspent [minconf=1] [maxconf=9999999] [\"address\",...]\n" + "Returns array of unspent transaction outputs\n" + "with between minconf and maxconf (inclusive) confirmations.\n" + "Optionally filtered to only include txouts paid to specified addresses.\n" + "Results are an array of Objects, each of which has:\n" + "{txid, vout, scriptPubKey, amount, confirmations}"); + + RPCTypeCheck(params, list_of(int_type)(int_type)(array_type)); + + int nMinDepth = 1; + if (params.size() > 0) + nMinDepth = params[0].get_int(); + + int nMaxDepth = 9999999; + if (params.size() > 1) + nMaxDepth = params[1].get_int(); + + set setAddress; + if (params.size() > 2) + { + Array inputs = params[2].get_array(); + BOOST_FOREACH(Value& input, inputs) + { + CcurecoinAddress address(input.get_str()); + if (!address.IsValid()) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid curecoin address: ")+input.get_str()); + if (setAddress.count(address)) + throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+input.get_str()); + setAddress.insert(address); + } + } + + Array results; + vector vecOutputs; + pwalletMain->AvailableCoins(vecOutputs, false); + BOOST_FOREACH(const COutput& out, vecOutputs) + { + if (out.nDepth < nMinDepth || out.nDepth > nMaxDepth) + continue; + + if(setAddress.size()) + { + CTxDestination address; + if(!ExtractDestination(out.tx->vout[out.i].scriptPubKey, address)) + continue; + + if (!setAddress.count(address)) + continue; + } + + int64 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)); + entry.push_back(Pair("scriptPubKey", HexStr(pk.begin(), pk.end()))); + entry.push_back(Pair("amount",ValueFromAmount(nValue))); + entry.push_back(Pair("confirmations",out.nDepth)); + results.push_back(entry); + } + + return results; +} + +Value createrawtransaction(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 2) + throw runtime_error( + "createrawtransaction [{\"txid\":txid,\"vout\":n},...] {address:amount,...}\n" + "Create a transaction spending given inputs\n" + "(array of objects containing transaction id and output number),\n" + "sending to given address(es).\n" + "Returns hex-encoded raw transaction.\n" + "Note that the transaction's inputs are not signed, and\n" + "it is not stored in the wallet or transmitted to the network."); + + RPCTypeCheck(params, list_of(array_type)(obj_type)); + + Array inputs = params[0].get_array(); + Object sendTo = params[1].get_obj(); + + CTransaction rawTx; + + BOOST_FOREACH(Value& input, inputs) + { + const Object& o = input.get_obj(); + + const Value& txid_v = find_value(o, "txid"); + if (txid_v.type() != str_type) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, missing txid key"); + string txid = txid_v.get_str(); + if (!IsHex(txid)) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, expected hex txid"); + + const Value& vout_v = find_value(o, "vout"); + if (vout_v.type() != int_type) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, missing vout key"); + int nOutput = vout_v.get_int(); + if (nOutput < 0) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter, vout must be positive"); + + CTxIn in(COutPoint(uint256(txid), nOutput)); + rawTx.vin.push_back(in); + } + + set setAddress; + BOOST_FOREACH(const Pair& s, sendTo) + { + CcurecoinAddress address(s.name_); + if (!address.IsValid()) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid curecoin address: ")+s.name_); + + if (setAddress.count(address)) + throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); + setAddress.insert(address); + + CScript scriptPubKey; + scriptPubKey.SetDestination(address.Get()); + int64 nAmount = AmountFromValue(s.value_); + + CTxOut out(nAmount, scriptPubKey); + rawTx.vout.push_back(out); + } + + CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); + ss << rawTx; + return HexStr(ss.begin(), ss.end()); +} + +Value decoderawtransaction(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "decoderawtransaction \n" + "Return a JSON object representing the serialized, hex-encoded transaction."); + + RPCTypeCheck(params, list_of(str_type)); + + vector txData(ParseHex(params[0].get_str())); + CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION); + CTransaction tx; + try { + ssData >> tx; + } + catch (std::exception &e) { + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); + } + + Object result; + TxToJSON(tx, 0, result); + + return result; +} + +Value signrawtransaction(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 4) + throw runtime_error( + "signrawtransaction [{\"txid\":txid,\"vout\":n,\"scriptPubKey\":hex},...] [,...] [sighashtype=\"ALL\"]\n" + "Sign inputs for raw transaction (serialized, hex-encoded).\n" + "Second optional argument (may be null) is an array of previous transaction outputs that\n" + "this transaction depends on but may not yet be in the blockchain.\n" + "Third optional argument (may be null) is an array of base58-encoded private\n" + "keys that, if given, will be the only keys used to sign the transaction.\n" + "Fourth optional argument is a string that is one of six values; ALL, NONE, SINGLE or\n" + "ALL|ANYONECANPAY, NONE|ANYONECANPAY, SINGLE|ANYONECANPAY.\n" + "Returns json object with keys:\n" + " hex : raw transaction with signature(s) (hex-encoded string)\n" + " complete : 1 if transaction has a complete set of signature (0 if not)" + + HelpRequiringPassphrase()); + + RPCTypeCheck(params, list_of(str_type)(array_type)(array_type)(str_type), true); + + vector txData(ParseHex(params[0].get_str())); + CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION); + vector txVariants; + while (!ssData.empty()) + { + try { + CTransaction tx; + ssData >> tx; + txVariants.push_back(tx); + } + catch (std::exception &e) { + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); + } + } + + if (txVariants.empty()) + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Missing transaction"); + + // mergedTx will end up with all the signatures; it + // starts as a clone of the rawtx: + CTransaction mergedTx(txVariants[0]); + bool fComplete = true; + + // Fetch previous transactions (inputs): + map mapPrevOut; + for (unsigned int i = 0; i < mergedTx.vin.size(); i++) + { + CTransaction tempTx; + MapPrevTx mapPrevTx; + CTxDB txdb("r"); + map unused; + bool fInvalid; + + // FetchInputs aborts on failure, so we go one at a time. + tempTx.vin.push_back(mergedTx.vin[i]); + tempTx.FetchInputs(txdb, unused, false, false, mapPrevTx, fInvalid); + + // Copy results into mapPrevOut: + BOOST_FOREACH(const CTxIn& txin, tempTx.vin) + { + const uint256& prevHash = txin.prevout.hash; + if (mapPrevTx.count(prevHash) && mapPrevTx[prevHash].second.vout.size()>txin.prevout.n) + mapPrevOut[txin.prevout] = mapPrevTx[prevHash].second.vout[txin.prevout.n].scriptPubKey; + } + } + + // Add previous txouts given in the RPC call: + if (params.size() > 1 && params[1].type() != null_type) + { + Array prevTxs = params[1].get_array(); + BOOST_FOREACH(Value& p, prevTxs) + { + if (p.type() != obj_type) + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "expected object with {\"txid'\",\"vout\",\"scriptPubKey\"}"); + + Object prevOut = p.get_obj(); + + RPCTypeCheck(prevOut, map_list_of("txid", str_type)("vout", int_type)("scriptPubKey", str_type)); + + string txidHex = find_value(prevOut, "txid").get_str(); + if (!IsHex(txidHex)) + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "txid must be hexadecimal"); + uint256 txid; + txid.SetHex(txidHex); + + int nOut = find_value(prevOut, "vout").get_int(); + if (nOut < 0) + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "vout must be positive"); + + string pkHex = find_value(prevOut, "scriptPubKey").get_str(); + if (!IsHex(pkHex)) + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "scriptPubKey must be hexadecimal"); + vector pkData(ParseHex(pkHex)); + CScript scriptPubKey(pkData.begin(), pkData.end()); + + COutPoint outpoint(txid, nOut); + if (mapPrevOut.count(outpoint)) + { + // Complain if scriptPubKey doesn't match + if (mapPrevOut[outpoint] != scriptPubKey) + { + string err("Previous output scriptPubKey mismatch:\n"); + err = err + mapPrevOut[outpoint].ToString() + "\nvs:\n"+ + scriptPubKey.ToString(); + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, err); + } + } + else + mapPrevOut[outpoint] = scriptPubKey; + } + } + + bool fGivenKeys = false; + CBasicKeyStore tempKeystore; + if (params.size() > 2 && params[2].type() != null_type) + { + fGivenKeys = true; + Array keys = params[2].get_array(); + BOOST_FOREACH(Value k, keys) + { + CcurecoinSecret vchSecret; + bool fGood = vchSecret.SetString(k.get_str()); + if (!fGood) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY,"Invalid private key"); + CKey key; + bool fCompressed; + CSecret secret = vchSecret.GetSecret(fCompressed); + key.SetSecret(secret, fCompressed); + tempKeystore.AddKey(key); + } + } + else + EnsureWalletIsUnlocked(); + + const CKeyStore& keystore = (fGivenKeys ? tempKeystore : *pwalletMain); + + int nHashType = SIGHASH_ALL; + if (params.size() > 3 && params[3].type() != null_type) + { + static map mapSigHashValues = + boost::assign::map_list_of + (string("ALL"), int(SIGHASH_ALL)) + (string("ALL|ANYONECANPAY"), int(SIGHASH_ALL|SIGHASH_ANYONECANPAY)) + (string("NONE"), int(SIGHASH_NONE)) + (string("NONE|ANYONECANPAY"), int(SIGHASH_NONE|SIGHASH_ANYONECANPAY)) + (string("SINGLE"), int(SIGHASH_SINGLE)) + (string("SINGLE|ANYONECANPAY"), int(SIGHASH_SINGLE|SIGHASH_ANYONECANPAY)) + ; + string strHashType = params[3].get_str(); + if (mapSigHashValues.count(strHashType)) + nHashType = mapSigHashValues[strHashType]; + else + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid sighash param"); + } + + bool fHashSingle = ((nHashType & ~SIGHASH_ANYONECANPAY) == SIGHASH_SINGLE); + + // Sign what we can: + for (unsigned int i = 0; i < mergedTx.vin.size(); i++) + { + CTxIn& txin = mergedTx.vin[i]; + if (mapPrevOut.count(txin.prevout) == 0) + { + fComplete = false; + continue; + } + const CScript& prevPubKey = mapPrevOut[txin.prevout]; + + txin.scriptSig.clear(); + // Only sign SIGHASH_SINGLE if there's a corresponding output: + if (!fHashSingle || (i < mergedTx.vout.size())) + SignSignature(keystore, prevPubKey, mergedTx, i, nHashType); + + // ... and merge in other signatures: + BOOST_FOREACH(const CTransaction& txv, txVariants) + { + txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig); + } + if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, true, 0)) + fComplete = false; + } + + Object result; + CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + ssTx << mergedTx; + result.push_back(Pair("hex", HexStr(ssTx.begin(), ssTx.end()))); + result.push_back(Pair("complete", fComplete)); + + return result; +} + +Value sendrawtransaction(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 1) + throw runtime_error( + "sendrawtransaction \n" + "Submits raw transaction (serialized, hex-encoded) to local node and network."); + + RPCTypeCheck(params, list_of(str_type)); + + // parse hex string from parameter + vector txData(ParseHex(params[0].get_str())); + CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION); + CTransaction tx; + + // deserialize binary data stream + try { + ssData >> tx; + } + catch (std::exception &e) { + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); + } + uint256 hashTx = tx.GetHash(); + + // See if the transaction is already in a block + // or in the memory pool: + CTransaction existingTx; + uint256 hashBlock = 0; + if (GetTransaction(hashTx, existingTx, hashBlock)) + { + if (hashBlock != 0) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("transaction already in block ")+hashBlock.GetHex()); + // Not in block, but already in the memory pool; will drop + // through to re-relay it. + } + else + { + // push to local node + CTxDB txdb("r"); + if (!tx.AcceptToMemoryPool(txdb)) + throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX rejected"); + + SyncWithWallets(tx, NULL, true); + } + RelayMessage(CInv(MSG_TX, hashTx), tx); + + return hashTx.GetHex(); +} diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp new file mode 100644 index 0000000..2effb86 --- /dev/null +++ b/src/rpcwallet.cpp @@ -0,0 +1,1765 @@ +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "wallet.h" +#include "walletdb.h" +#include "curecoinrpc.h" +#include "init.h" +#include "base58.h" + +using namespace json_spirit; +using namespace std; + +int64 nWalletUnlockTime; +static CCriticalSection cs_nWalletUnlockTime; + +extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, json_spirit::Object& entry); + +std::string HelpRequiringPassphrase() +{ + return pwalletMain->IsCrypted() + ? "\nrequires wallet passphrase to be set with walletpassphrase first" + : ""; +} + +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."); +} + +void WalletTxToJSON(const CWalletTx& wtx, Object& entry) +{ + int confirms = wtx.GetDepthInMainChain(); + entry.push_back(Pair("confirmations", confirms)); + if (wtx.IsCoinBase() || wtx.IsCoinStake()) + entry.push_back(Pair("generated", true)); + if (confirms) + { + entry.push_back(Pair("blockhash", wtx.hashBlock.GetHex())); + entry.push_back(Pair("blockindex", wtx.nIndex)); + entry.push_back(Pair("blocktime", (boost::int64_t)(mapBlockIndex[wtx.hashBlock]->nTime))); + } + entry.push_back(Pair("txid", wtx.GetHash().GetHex())); + entry.push_back(Pair("time", (boost::int64_t)wtx.GetTxTime())); + entry.push_back(Pair("timereceived", (boost::int64_t)wtx.nTimeReceived)); + entry.push_back(Pair("tx-comment", wtx.strTxComment)); + BOOST_FOREACH(const PAIRTYPE(string,string)& item, wtx.mapValue) + entry.push_back(Pair(item.first, item.second)); +} + +string AccountFromValue(const Value& value) +{ + string strAccount = value.get_str(); + if (strAccount == "*") + throw JSONRPCError(RPC_WALLET_INVALID_ACCOUNT_NAME, "Invalid account name"); + return strAccount; +} + +Value getinfo(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 0) + throw runtime_error( + "getinfo\n" + "Returns an object containing various state info."); + + proxyType proxy; + GetProxy(NET_IPV4, proxy); + + Object obj; + obj.push_back(Pair("version", FormatFullVersion())); + obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION)); + obj.push_back(Pair("walletversion", pwalletMain->GetVersion())); + obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance()))); + 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("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())); + 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("paytxfee", ValueFromAmount(nTransactionFee))); + if (pwalletMain->IsCrypted()) + obj.push_back(Pair("unlocked_until", (boost::int64_t)nWalletUnlockTime / 1000)); + obj.push_back(Pair("errors", GetWarnings("statusbar"))); + return obj; +} + + +Value getnewpubkey(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "getnewpubkey [account]\n" + "Returns new public key for coinbase generation."); + + // Parse the account first so we don't generate a key if there's an error + string strAccount; + if (params.size() > 0) + strAccount = AccountFromValue(params[0]); + + if (!pwalletMain->IsLocked()) + pwalletMain->TopUpKeyPool(); + + // Generate a new key that is added to wallet + CPubKey newKey; + if (!pwalletMain->GetKeyFromPool(newKey, false)) + throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); + CKeyID keyID = newKey.GetID(); + + pwalletMain->SetAddressBookName(keyID, strAccount); + vector vchPubKey = newKey.Raw(); + + return HexStr(vchPubKey.begin(), vchPubKey.end()); +} + + +Value getnewaddress(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "getnewaddress [account]\n" + "Returns a new curecoin 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]."); + + // Parse the account first so we don't generate a key if there's an error + string strAccount; + if (params.size() > 0) + strAccount = AccountFromValue(params[0]); + + if (!pwalletMain->IsLocked()) + pwalletMain->TopUpKeyPool(); + + // Generate a new key that is added to wallet + CPubKey newKey; + if (!pwalletMain->GetKeyFromPool(newKey, false)) + throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); + CKeyID keyID = newKey.GetID(); + + pwalletMain->SetAddressBookName(keyID, strAccount); + + return CcurecoinAddress(keyID).ToString(); +} + + +CcurecoinAddress GetAccountAddress(string strAccount, bool bForceNew=false) +{ + CWalletDB walletdb(pwalletMain->strWalletFile); + + CAccount account; + walletdb.ReadAccount(strAccount, account); + + bool bKeyUsed = false; + + // Check if the current key has been used + if (account.vchPubKey.IsValid()) + { + CScript scriptPubKey; + scriptPubKey.SetDestination(account.vchPubKey.GetID()); + for (map::iterator it = pwalletMain->mapWallet.begin(); + it != pwalletMain->mapWallet.end() && account.vchPubKey.IsValid(); + ++it) + { + const CWalletTx& wtx = (*it).second; + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + if (txout.scriptPubKey == scriptPubKey) + bKeyUsed = true; + } + } + + // Generate a new key + if (!account.vchPubKey.IsValid() || bForceNew || bKeyUsed) + { + if (!pwalletMain->GetKeyFromPool(account.vchPubKey, false)) + throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first"); + + pwalletMain->SetAddressBookName(account.vchPubKey.GetID(), strAccount); + walletdb.WriteAccount(strAccount, account); + } + + return CcurecoinAddress(account.vchPubKey.GetID()); +} + +Value getaccountaddress(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "getaccountaddress \n" + "Returns the current curecoin 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]); + + Value ret; + + ret = GetAccountAddress(strAccount).ToString(); + + return ret; +} + + + +Value setaccount(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 2) + throw runtime_error( + "setaccount \n" + "Sets the account associated with the given address."); + + CcurecoinAddress address(params[0].get_str()); + if (!address.IsValid()) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid curecoin address"); + + + string strAccount; + if (params.size() > 1) + strAccount = AccountFromValue(params[1]); + + // Detect when changing the account of an address that is the 'unused current key' of another account: + if (pwalletMain->mapAddressBook.count(address.Get())) + { + string strOldAccount = pwalletMain->mapAddressBook[address.Get()]; + if (address == GetAccountAddress(strOldAccount)) + GetAccountAddress(strOldAccount, true); + } + + pwalletMain->SetAddressBookName(address.Get(), strAccount); + + return Value::null; +} + + +Value getaccount(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "getaccount \n" + "Returns the account associated with the given address."); + + CcurecoinAddress address(params[0].get_str()); + if (!address.IsValid()) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid curecoin address"); + + string strAccount; + map::iterator mi = pwalletMain->mapAddressBook.find(address.Get()); + if (mi != pwalletMain->mapAddressBook.end() && !(*mi).second.empty()) + strAccount = (*mi).second; + return strAccount; +} + + +Value getaddressesbyaccount(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "getaddressesbyaccount \n" + "Returns the list of addresses for the given account."); + + string strAccount = AccountFromValue(params[0]); + + // Find all addresses that have the given account + Array ret; + BOOST_FOREACH(const PAIRTYPE(CcurecoinAddress, string)& item, pwalletMain->mapAddressBook) + { + const CcurecoinAddress& address = item.first; + const string& strName = item.second; + if (strName == strAccount) + ret.push_back(address.ToString()); + } + return ret; +} + +Value sendtoaddress(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 2 || params.size() > 4) + throw runtime_error( + "sendtoaddress [comment] [comment-to]\n" + " is a real and is rounded to the nearest 0.000001" + + HelpRequiringPassphrase()); + + CcurecoinAddress address(params[0].get_str()); + if (!address.IsValid()) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid curecoin address"); + + // Amount + int64 nAmount = AmountFromValue(params[1]); + + if (nAmount < MIN_TXOUT_AMOUNT) + throw JSONRPCError(-101, "Send amount too small"); + + // Wallet comments + CWalletTx wtx; + if (params.size() > 2 && params[2].type() != null_type && !params[2].get_str().empty()) + wtx.mapValue["comment"] = params[2].get_str(); + if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty()) + wtx.mapValue["to"] = params[3].get_str(); + + // Transaction comment + std::string txcomment; + if (params.size() > 4 && params[4].type() != null_type && !params[4].get_str().empty()) + { + txcomment = params[4].get_str(); + if (txcomment.length() > MAX_TX_COMMENT_LEN) + txcomment.resize(MAX_TX_COMMENT_LEN); + } + + 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, wtx, false, txcomment); + + if (strError != "") + throw JSONRPCError(RPC_WALLET_ERROR, strError); + + return wtx.GetHash().GetHex(); +} + +Value listaddressgroupings(const Array& params, bool fHelp) +{ + if (fHelp) + throw runtime_error( + "listaddressgroupings\n" + "Lists groups of addresses which have had their common ownership\n" + "made public by common use as inputs or as the resulting change\n" + "in past transactions"); + + Array jsonGroupings; + map balances = pwalletMain->GetAddressBalances(); + BOOST_FOREACH(set grouping, pwalletMain->GetAddressGroupings()) + { + Array jsonGrouping; + BOOST_FOREACH(CTxDestination address, grouping) + { + Array addressInfo; + addressInfo.push_back(CcurecoinAddress(address).ToString()); + addressInfo.push_back(ValueFromAmount(balances[address])); + { + LOCK(pwalletMain->cs_wallet); + if (pwalletMain->mapAddressBook.find(CcurecoinAddress(address).Get()) != pwalletMain->mapAddressBook.end()) + addressInfo.push_back(pwalletMain->mapAddressBook.find(CcurecoinAddress(address).Get())->second); + } + jsonGrouping.push_back(addressInfo); + } + jsonGroupings.push_back(jsonGrouping); + } + return jsonGroupings; +} + +Value signmessage(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 2) + throw runtime_error( + "signmessage \n" + "Sign a message with the private key of an address"); + + EnsureWalletIsUnlocked(); + + string strAddress = params[0].get_str(); + string strMessage = params[1].get_str(); + + CcurecoinAddress addr(strAddress); + if (!addr.IsValid()) + throw JSONRPCError(RPC_TYPE_ERROR, "Invalid address"); + + CKeyID keyID; + if (!addr.GetKeyID(keyID)) + throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to key"); + + CKey key; + if (!pwalletMain->GetKey(keyID, key)) + throw JSONRPCError(RPC_WALLET_ERROR, "Private key not available"); + + CDataStream ss(SER_GETHASH, 0); + ss << strMessageMagic; + ss << strMessage; + + vector vchSig; + if (!key.SignCompact(Hash(ss.begin(), ss.end()), vchSig)) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Sign failed"); + + return EncodeBase64(&vchSig[0], vchSig.size()); +} + +Value verifymessage(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 3) + throw runtime_error( + "verifymessage \n" + "Verify a signed message"); + + string strAddress = params[0].get_str(); + string strSign = params[1].get_str(); + string strMessage = params[2].get_str(); + + CcurecoinAddress addr(strAddress); + if (!addr.IsValid()) + throw JSONRPCError(RPC_TYPE_ERROR, "Invalid address"); + + CKeyID keyID; + if (!addr.GetKeyID(keyID)) + throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to key"); + + bool fInvalid = false; + vector vchSig = DecodeBase64(strSign.c_str(), &fInvalid); + + if (fInvalid) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Malformed base64 encoding"); + + CDataStream ss(SER_GETHASH, 0); + ss << strMessageMagic; + ss << strMessage; + + CKey key; + if (!key.SetCompactSignature(Hash(ss.begin(), ss.end()), vchSig)) + return false; + + return (key.GetPubKey().GetID() == keyID); +} + + +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."); + + // curecoin address + CcurecoinAddress address = CcurecoinAddress(params[0].get_str()); + CScript scriptPubKey; + if (!address.IsValid()) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid curecoin address"); + scriptPubKey.SetDestination(address.Get()); + if (!IsMine(*pwalletMain,scriptPubKey)) + return (double)0.0; + + // Minimum confirmations + int nMinDepth = 1; + if (params.size() > 1) + nMinDepth = params[1].get_int(); + + // Tally + int64 nAmount = 0; + for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) + { + const CWalletTx& wtx = (*it).second; + if (wtx.IsCoinBase() || wtx.IsCoinStake() || !wtx.IsFinal()) + continue; + + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + if (txout.scriptPubKey == scriptPubKey) + if (wtx.GetDepthInMainChain() >= nMinDepth) + nAmount += txout.nValue; + } + + return ValueFromAmount(nAmount); +} + + +void GetAccountAddresses(string strAccount, set& setAddress) +{ + BOOST_FOREACH(const PAIRTYPE(CTxDestination, string)& item, pwalletMain->mapAddressBook) + { + const CTxDestination& address = item.first; + const string& strName = item.second; + if (strName == strAccount) + setAddress.insert(address); + } +} + +Value getreceivedbyaccount(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 1 || params.size() > 2) + throw runtime_error( + "getreceivedbyaccount [minconf=1]\n" + "Returns the total amount received by addresses with in transactions with at least [minconf] confirmations."); + + // Minimum confirmations + int nMinDepth = 1; + if (params.size() > 1) + nMinDepth = params[1].get_int(); + + // Get the set of pub keys assigned to account + string strAccount = AccountFromValue(params[0]); + set setAddress; + GetAccountAddresses(strAccount, setAddress); + + // Tally + int64 nAmount = 0; + for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) + { + const CWalletTx& wtx = (*it).second; + if (wtx.IsCoinBase() || wtx.IsCoinStake() || !wtx.IsFinal()) + continue; + + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + { + CTxDestination address; + if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwalletMain, address) && setAddress.count(address)) + if (wtx.GetDepthInMainChain() >= nMinDepth) + nAmount += txout.nValue; + } + } + + return (double)nAmount / (double)COIN; +} + + +int64 GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth) +{ + int64 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()) + continue; + + int64 nGenerated, nReceived, nSent, nFee; + wtx.GetAccountAmounts(strAccount, nGenerated, nReceived, nSent, nFee); + + if (nReceived != 0 && wtx.GetDepthInMainChain() >= nMinDepth) + nBalance += nReceived; + nBalance += nGenerated - nSent - nFee; + } + + // Tally internal accounting entries + nBalance += walletdb.GetAccountCreditDebit(strAccount); + + return nBalance; +} + +int64 GetAccountBalance(const string& strAccount, int nMinDepth) +{ + CWalletDB walletdb(pwalletMain->strWalletFile); + return GetAccountBalance(walletdb, strAccount, nMinDepth); +} + + +Value getbalance(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 2) + throw runtime_error( + "getbalance [account] [minconf=1]\n" + "If [account] is not specified, returns the server's total available balance.\n" + "If [account] is specified, returns the balance in the account."); + + if (params.size() == 0) + return ValueFromAmount(pwalletMain->GetBalance()); + + int nMinDepth = 1; + if (params.size() > 1) + nMinDepth = params[1].get_int(); + + 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; + for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) + { + const CWalletTx& wtx = (*it).second; + if (!wtx.IsFinal()) + continue; + + int64 allGeneratedImmature, allGeneratedMature, allFee; + allGeneratedImmature = allGeneratedMature = allFee = 0; + + string strSentAccount; + list > listReceived; + list > listSent; + wtx.GetAmounts(allGeneratedImmature, allGeneratedMature, listReceived, listSent, allFee, strSentAccount); + if (wtx.GetDepthInMainChain() >= nMinDepth) + { + BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64)& r, listReceived) + nBalance += r.second; + } + BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64)& r, listSent) + nBalance -= r.second; + nBalance -= allFee; + nBalance += allGeneratedMature; + } + return ValueFromAmount(nBalance); + } + + string strAccount = AccountFromValue(params[0]); + + int64 nBalance = GetAccountBalance(strAccount, nMinDepth); + + return ValueFromAmount(nBalance); +} + + +Value movecmd(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 3 || params.size() > 5) + throw runtime_error( + "move [minconf=1] [comment]\n" + "Move from one account in your wallet to another."); + + 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"); + + if (params.size() > 3) + // unused parameter, used to be nMinDepth, keep type-checking it though + (void)params[3].get_int(); + string strComment; + if (params.size() > 4) + strComment = params[4].get_str(); + + CWalletDB walletdb(pwalletMain->strWalletFile); + if (!walletdb.TxnBegin()) + throw JSONRPCError(RPC_DATABASE_ERROR, "database error"); + + int64 nNow = GetAdjustedTime(); + + // Debit + CAccountingEntry debit; + debit.nOrderPos = pwalletMain->IncOrderPosNext(&walletdb); + debit.strAccount = strFrom; + debit.nCreditDebit = -nAmount; + debit.nTime = nNow; + debit.strOtherAccount = strTo; + debit.strComment = strComment; + walletdb.WriteAccountingEntry(debit); + + // Credit + CAccountingEntry credit; + credit.nOrderPos = pwalletMain->IncOrderPosNext(&walletdb); + credit.strAccount = strTo; + credit.nCreditDebit = nAmount; + credit.nTime = nNow; + credit.strOtherAccount = strFrom; + credit.strComment = strComment; + walletdb.WriteAccountingEntry(credit); + + if (!walletdb.TxnCommit()) + throw JSONRPCError(RPC_DATABASE_ERROR, "database error"); + + return true; +} + + +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" + " is a real and is rounded to the nearest 0.000001" + + HelpRequiringPassphrase()); + + string strAccount = AccountFromValue(params[0]); + CcurecoinAddress address(params[1].get_str()); + if (!address.IsValid()) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid curecoin address"); + int64 nAmount = AmountFromValue(params[2]); + + if (nAmount < MIN_TXOUT_AMOUNT) + throw JSONRPCError(-101, "Send amount too small"); + + int nMinDepth = 1; + if (params.size() > 3) + nMinDepth = params[3].get_int(); + + CWalletTx wtx; + wtx.strFromAccount = strAccount; + if (params.size() > 4 && params[4].type() != null_type && !params[4].get_str().empty()) + wtx.mapValue["comment"] = params[4].get_str(); + if (params.size() > 5 && params[5].type() != null_type && !params[5].get_str().empty()) + wtx.mapValue["to"] = params[5].get_str(); + + std::string txcomment; + if (params.size() > 6 && params[6].type() != null_type && !params[6].get_str().empty()) + { + txcomment = params[6].get_str(); + if (txcomment.length() > MAX_TX_COMMENT_LEN) + txcomment.resize(MAX_TX_COMMENT_LEN); + } + + EnsureWalletIsUnlocked(); + + // Check funds + int64 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, false, txcomment); + if (strError != "") + throw JSONRPCError(RPC_WALLET_ERROR, strError); + + return wtx.GetHash().GetHex(); +} + + +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" + "amounts are double-precision floating point numbers" + + HelpRequiringPassphrase()); + + string strAccount = AccountFromValue(params[0]); + Object sendTo = params[1].get_obj(); + int nMinDepth = 1; + if (params.size() > 2) + nMinDepth = params[2].get_int(); + + CWalletTx wtx; + std::string strTxComment; + + wtx.strFromAccount = strAccount; + if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty()) + wtx.mapValue["comment"] = params[3].get_str(); + if (params.size() > 4 && params[4].type() != null_type && !params[4].get_str().empty()) + strTxComment = params[4].get_str(); + + set setAddress; + vector > vecSend; + + int64 totalAmount = 0; + BOOST_FOREACH(const Pair& s, sendTo) + { + CcurecoinAddress address(s.name_); + if (!address.IsValid()) + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid curecoin address: ")+s.name_); + + if (setAddress.count(address)) + throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_); + setAddress.insert(address); + + CScript scriptPubKey; + scriptPubKey.SetDestination(address.Get()); + int64 nAmount = AmountFromValue(s.value_); + + if (nAmount < MIN_TXOUT_AMOUNT) + throw JSONRPCError(-101, "Send amount too small"); + + totalAmount += nAmount; + + vecSend.push_back(make_pair(scriptPubKey, nAmount)); + } + + EnsureWalletIsUnlocked(); + + // Check funds + int64 nBalance = GetAccountBalance(strAccount, nMinDepth); + if (totalAmount > nBalance) + throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); + + // Send + CReserveKey keyChange(pwalletMain); + int64 nFeeRequired = 0; + bool fCreated = pwalletMain->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, strTxComment); + if (!fCreated) + { + if (totalAmount + nFeeRequired > pwalletMain->GetBalance()) + throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds"); + throw JSONRPCError(RPC_WALLET_ERROR, "Transaction creation failed"); + } + if (!pwalletMain->CommitTransaction(wtx, keyChange)) + throw JSONRPCError(RPC_WALLET_ERROR, "Transaction commit failed"); + + return wtx.GetHash().GetHex(); +} + +Value addmultisigaddress(const Array& params, bool fHelp) +{ + if (fHelp || params.size() < 2 || params.size() > 3) + { + string msg = "addmultisigaddress <'[\"key\",\"key\"]'> [account]\n" + "Add a nrequired-to-sign multisignature address to the wallet\"\n" + "each key is a curecoin address or hex-encoded public key\n" + "If [account] is specified, assign address to [account]."; + throw runtime_error(msg); + } + + int nRequired = params[0].get_int(); + const Array& keys = params[1].get_array(); + string strAccount; + if (params.size() > 2) + strAccount = AccountFromValue(params[2]); + + // Gather public keys + if (nRequired < 1) + throw runtime_error("a multisignature address must require at least one key to redeem"); + if ((int)keys.size() < nRequired) + throw runtime_error( + strprintf("not enough keys supplied " + "(got %"PRIszu" keys, but need at least %d to redeem)", keys.size(), nRequired)); + std::vector pubkeys; + pubkeys.resize(keys.size()); + for (unsigned int i = 0; i < keys.size(); i++) + { + const std::string& ks = keys[i].get_str(); + + // Case 1: curecoin address and we have full public key: + CcurecoinAddress address(ks); + if (address.IsValid()) + { + CKeyID keyID; + if (!address.GetKeyID(keyID)) + throw runtime_error( + strprintf("%s does not refer to a key",ks.c_str())); + CPubKey vchPubKey; + if (!pwalletMain->GetPubKey(keyID, vchPubKey)) + throw runtime_error( + strprintf("no full public key for address %s",ks.c_str())); + if (!vchPubKey.IsValid() || !pubkeys[i].SetPubKey(vchPubKey)) + throw runtime_error(" Invalid public key: "+ks); + } + + // Case 2: hex public key + else if (IsHex(ks)) + { + CPubKey vchPubKey(ParseHex(ks)); + if (!vchPubKey.IsValid() || !pubkeys[i].SetPubKey(vchPubKey)) + throw runtime_error(" Invalid public key: "+ks); + } + else + { + throw runtime_error(" Invalid public key: "+ks); + } + } + + // Construct using pay-to-script-hash: + CScript inner; + inner.SetMultisig(nRequired, pubkeys); + CScriptID innerID = inner.GetID(); + pwalletMain->AddCScript(inner); + + pwalletMain->SetAddressBookName(innerID, strAccount); + return CcurecoinAddress(innerID).ToString(); +} + + +struct tallyitem +{ + int64 nAmount; + int nConf; + tallyitem() + { + nAmount = 0; + nConf = std::numeric_limits::max(); + } +}; + +Value ListReceived(const Array& params, bool fByAccounts) +{ + // Minimum confirmations + int nMinDepth = 1; + if (params.size() > 0) + nMinDepth = params[0].get_int(); + + // Whether to include empty accounts + bool fIncludeEmpty = false; + if (params.size() > 1) + fIncludeEmpty = params[1].get_bool(); + + // Tally + map mapTally; + for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) + { + const CWalletTx& wtx = (*it).second; + + if (wtx.IsCoinBase() || wtx.IsCoinStake() || !wtx.IsFinal()) + continue; + + int nDepth = wtx.GetDepthInMainChain(); + if (nDepth < nMinDepth) + continue; + + BOOST_FOREACH(const CTxOut& txout, wtx.vout) + { + CTxDestination address; + if (!ExtractDestination(txout.scriptPubKey, address) || !IsMine(*pwalletMain, address)) + continue; + + tallyitem& item = mapTally[address]; + item.nAmount += txout.nValue; + item.nConf = min(item.nConf, nDepth); + } + } + + // Reply + Array ret; + map mapAccountTally; + BOOST_FOREACH(const PAIRTYPE(CcurecoinAddress, string)& item, pwalletMain->mapAddressBook) + { + const CcurecoinAddress& address = item.first; + const string& strAccount = item.second; + map::iterator it = mapTally.find(address); + if (it == mapTally.end() && !fIncludeEmpty) + continue; + + int64 nAmount = 0; + int nConf = std::numeric_limits::max(); + if (it != mapTally.end()) + { + nAmount = (*it).second.nAmount; + nConf = (*it).second.nConf; + } + + if (fByAccounts) + { + tallyitem& item = mapAccountTally[strAccount]; + item.nAmount += nAmount; + item.nConf = min(item.nConf, nConf); + } + else + { + Object obj; + obj.push_back(Pair("address", address.ToString())); + obj.push_back(Pair("account", strAccount)); + obj.push_back(Pair("amount", ValueFromAmount(nAmount))); + obj.push_back(Pair("confirmations", (nConf == std::numeric_limits::max() ? 0 : nConf))); + ret.push_back(obj); + } + } + + if (fByAccounts) + { + for (map::iterator it = mapAccountTally.begin(); it != mapAccountTally.end(); ++it) + { + int64 nAmount = (*it).second.nAmount; + int nConf = (*it).second.nConf; + Object obj; + obj.push_back(Pair("account", (*it).first)); + obj.push_back(Pair("amount", ValueFromAmount(nAmount))); + obj.push_back(Pair("confirmations", (nConf == std::numeric_limits::max() ? 0 : nConf))); + ret.push_back(obj); + } + } + + return ret; +} + +Value listreceivedbyaddress(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 2) + throw runtime_error( + "listreceivedbyaddress [minconf=1] [includeempty=false]\n" + "[minconf] is the minimum number of confirmations before payments are included.\n" + "[includeempty] whether to include addresses that haven't received any payments.\n" + "Returns an array of objects containing:\n" + " \"address\" : receiving address\n" + " \"account\" : the account of the receiving address\n" + " \"amount\" : total amount received by the address\n" + " \"confirmations\" : number of confirmations of the most recent transaction included"); + + return ListReceived(params, false); +} + +Value listreceivedbyaccount(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 2) + throw runtime_error( + "listreceivedbyaccount [minconf=1] [includeempty=false]\n" + "[minconf] is the minimum number of confirmations before payments are included.\n" + "[includeempty] whether to include accounts that haven't received any payments.\n" + "Returns an array of objects containing:\n" + " \"account\" : the account of the receiving addresses\n" + " \"amount\" : total amount received by addresses with this account\n" + " \"confirmations\" : number of confirmations of the most recent transaction included"); + + return ListReceived(params, true); +} + +void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDepth, bool fLong, Array& ret) +{ + int64 nGeneratedImmature, nGeneratedMature, nFee; + string strSentAccount; + list > listReceived; + list > listSent; + + wtx.GetAmounts(nGeneratedImmature, nGeneratedMature, 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)) + { + BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64)& s, listSent) + { + Object entry; + entry.push_back(Pair("account", strSentAccount)); + entry.push_back(Pair("address", CcurecoinAddress(s.first).ToString())); + entry.push_back(Pair("category", "send")); + entry.push_back(Pair("amount", ValueFromAmount(-s.second))); + entry.push_back(Pair("fee", ValueFromAmount(-nFee))); + if (fLong) + WalletTxToJSON(wtx, entry); + ret.push_back(entry); + } + } + + // Received + if (listReceived.size() > 0 && wtx.GetDepthInMainChain() >= nMinDepth) + { + BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64)& r, listReceived) + { + string account; + if (pwalletMain->mapAddressBook.count(r.first)) + account = pwalletMain->mapAddressBook[r.first]; + if (fAllAccounts || (account == strAccount)) + { + Object entry; + entry.push_back(Pair("account", account)); + entry.push_back(Pair("address", CcurecoinAddress(r.first).ToString())); + if (wtx.IsCoinBase()) + { + if (wtx.GetDepthInMainChain() < 1) + entry.push_back(Pair("category", "orphan")); + else if (wtx.GetBlocksToMaturity() > 0) + entry.push_back(Pair("category", "immature")); + else + entry.push_back(Pair("category", "generate")); + } + else + entry.push_back(Pair("category", "receive")); + entry.push_back(Pair("amount", ValueFromAmount(r.second))); + if (fLong) + WalletTxToJSON(wtx, entry); + ret.push_back(entry); + } + } + } +} + +void AcentryToJSON(const CAccountingEntry& acentry, const string& strAccount, Array& ret) +{ + bool fAllAccounts = (strAccount == string("*")); + + if (fAllAccounts || acentry.strAccount == strAccount) + { + Object entry; + entry.push_back(Pair("account", acentry.strAccount)); + entry.push_back(Pair("category", "move")); + entry.push_back(Pair("time", (boost::int64_t)acentry.nTime)); + entry.push_back(Pair("amount", ValueFromAmount(acentry.nCreditDebit))); + entry.push_back(Pair("otheraccount", acentry.strOtherAccount)); + entry.push_back(Pair("comment", acentry.strComment)); + ret.push_back(entry); + } +} + +Value listtransactions(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 3) + throw runtime_error( + "listtransactions [account] [count=10] [from=0]\n" + "Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]."); + + string strAccount = "*"; + if (params.size() > 0) + strAccount = params[0].get_str(); + int nCount = 10; + if (params.size() > 1) + nCount = params[1].get_int(); + int nFrom = 0; + if (params.size() > 2) + nFrom = params[2].get_int(); + + if (nCount < 0) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative count"); + if (nFrom < 0) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative from"); + + Array ret; + + std::list acentries; + CWallet::TxItems txOrdered = pwalletMain->OrderedTxItems(acentries, strAccount); + + // iterate backwards until we have nCount items to return: + for (CWallet::TxItems::reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it) + { + CWalletTx *const pwtx = (*it).second.first; + if (pwtx != 0) + ListTransactions(*pwtx, strAccount, 0, true, ret); + CAccountingEntry *const pacentry = (*it).second.second; + if (pacentry != 0) + AcentryToJSON(*pacentry, strAccount, ret); + + if ((int)ret.size() >= (nCount+nFrom)) break; + } + // ret is newest to oldest + + if (nFrom > (int)ret.size()) + nFrom = ret.size(); + if ((nFrom + nCount) > (int)ret.size()) + nCount = ret.size() - nFrom; + Array::iterator first = ret.begin(); + std::advance(first, nFrom); + Array::iterator last = ret.begin(); + std::advance(last, nFrom+nCount); + + if (last != ret.end()) ret.erase(last, ret.end()); + if (first != ret.begin()) ret.erase(ret.begin(), first); + + std::reverse(ret.begin(), ret.end()); // Return oldest to newest + + return ret; +} + +Value listaccounts(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "listaccounts [minconf=1]\n" + "Returns Object that has account names as keys, account balances as values."); + + int nMinDepth = 1; + if (params.size() > 0) + nMinDepth = params[0].get_int(); + + 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; + } + + for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) + { + const CWalletTx& wtx = (*it).second; + int64 nGeneratedImmature, nGeneratedMature, nFee; + string strSentAccount; + list > listReceived; + list > listSent; + wtx.GetAmounts(nGeneratedImmature, nGeneratedMature, listReceived, listSent, nFee, strSentAccount); + mapAccountBalances[strSentAccount] -= nFee; + BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64)& s, listSent) + mapAccountBalances[strSentAccount] -= s.second; + if (wtx.GetDepthInMainChain() >= nMinDepth) + { + mapAccountBalances[""] += nGeneratedMature; + BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64)& r, listReceived) + if (pwalletMain->mapAddressBook.count(r.first)) + mapAccountBalances[pwalletMain->mapAddressBook[r.first]] += r.second; + else + mapAccountBalances[""] += r.second; + } + } + + list acentries; + CWalletDB(pwalletMain->strWalletFile).ListAccountCreditDebit("*", acentries); + BOOST_FOREACH(const CAccountingEntry& entry, acentries) + mapAccountBalances[entry.strAccount] += entry.nCreditDebit; + + Object ret; + BOOST_FOREACH(const PAIRTYPE(string, int64)& accountBalance, mapAccountBalances) { + ret.push_back(Pair(accountBalance.first, ValueFromAmount(accountBalance.second))); + } + return ret; +} + +Value listsinceblock(const Array& params, bool fHelp) +{ + if (fHelp) + throw runtime_error( + "listsinceblock [blockhash] [target-confirmations]\n" + "Get all transactions in blocks since block [blockhash], or all transactions if omitted"); + + CBlockIndex *pindex = NULL; + int target_confirms = 1; + + if (params.size() > 0) + { + uint256 blockId = 0; + + blockId.SetHex(params[0].get_str()); + pindex = CBlockLocator(blockId).GetBlockIndex(); + } + + if (params.size() > 1) + { + target_confirms = params[1].get_int(); + + if (target_confirms < 1) + throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter"); + } + + int depth = pindex ? (1 + nBestHeight - pindex->nHeight) : -1; + + Array transactions; + + for (map::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); it++) + { + CWalletTx tx = (*it).second; + + if (depth == -1 || tx.GetDepthInMainChain() < depth) + ListTransactions(tx, "*", 0, true, transactions); + } + + uint256 lastblock; + + if (target_confirms == 1) + { + lastblock = hashBestChain; + } + else + { + int target_height = pindexBest->nHeight + 1 - target_confirms; + + CBlockIndex *block; + for (block = pindexBest; + block && block->nHeight > target_height; + block = block->pprev) { } + + lastblock = block ? block->GetBlockHash() : 0; + } + + Object ret; + ret.push_back(Pair("transactions", transactions)); + ret.push_back(Pair("lastblock", lastblock.GetHex())); + + return ret; +} + +Value gettransaction(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "gettransaction \n" + "Get detailed information about "); + + uint256 hash; + hash.SetHex(params[0].get_str()); + + Object entry; + + if (pwalletMain->mapWallet.count(hash)) + { + const CWalletTx& wtx = pwalletMain->mapWallet[hash]; + + TxToJSON(wtx, 0, entry); + + int64 nCredit = wtx.GetCredit(); + int64 nDebit = wtx.GetDebit(); + int64 nNet = nCredit - nDebit; + int64 nFee = (wtx.IsFromMe() ? wtx.GetValueOut() - nDebit : 0); + + entry.push_back(Pair("amount", ValueFromAmount(nNet - nFee))); + if (wtx.IsFromMe()) + entry.push_back(Pair("fee", ValueFromAmount(nFee))); + + WalletTxToJSON(wtx, entry); + + Array details; + ListTransactions(pwalletMain->mapWallet[hash], "*", 0, false, details); + entry.push_back(Pair("details", details)); + } + else + { + CTransaction tx; + 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)); + else + { + entry.push_back(Pair("blockhash", hashBlock.GetHex())); + map::iterator mi = mapBlockIndex.find(hashBlock); + if (mi != mapBlockIndex.end() && (*mi).second) + { + 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)); + } + } + } + else + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction"); + } + + return entry; +} + + +Value backupwallet(const Array& params, bool fHelp) +{ + if (fHelp || params.size() != 1) + throw runtime_error( + "backupwallet \n" + "Safely copies wallet.dat to destination, which can be a directory or a path with filename."); + + string strDest = params[0].get_str(); + if (!BackupWallet(*pwalletMain, strDest)) + throw JSONRPCError(RPC_WALLET_ERROR, "Error: Wallet backup failed!"); + + return Value::null; +} + + +Value keypoolrefill(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 0) + throw runtime_error( + "keypoolrefill\n" + "Fills the keypool." + + HelpRequiringPassphrase()); + + EnsureWalletIsUnlocked(); + + pwalletMain->TopUpKeyPool(); + + if (pwalletMain->GetKeyPoolSize() < GetArg("-keypool", 100)) + throw JSONRPCError(RPC_WALLET_ERROR, "Error refreshing keypool."); + + return Value::null; +} + + +void ThreadTopUpKeyPool(void* parg) +{ + // Make this thread recognisable as the key-topping-up thread + RenameThread("curecoin-key-top"); + + pwalletMain->TopUpKeyPool(); +} + +void ThreadCleanWalletPassphrase(void* parg) +{ + // Make this thread recognisable as the wallet relocking thread + RenameThread("curecoin-lock-wa"); + + int64 nMyWakeTime = GetTimeMillis() + *((int64*)parg) * 1000; + + ENTER_CRITICAL_SECTION(cs_nWalletUnlockTime); + + if (nWalletUnlockTime == 0) + { + nWalletUnlockTime = nMyWakeTime; + + do + { + if (nWalletUnlockTime==0) + break; + int64 nToSleep = nWalletUnlockTime - GetTimeMillis(); + if (nToSleep <= 0) + break; + + LEAVE_CRITICAL_SECTION(cs_nWalletUnlockTime); + Sleep(nToSleep); + ENTER_CRITICAL_SECTION(cs_nWalletUnlockTime); + + } while(1); + + if (nWalletUnlockTime) + { + nWalletUnlockTime = 0; + pwalletMain->Lock(); + } + } + else + { + if (nWalletUnlockTime < nMyWakeTime) + nWalletUnlockTime = nMyWakeTime; + } + + LEAVE_CRITICAL_SECTION(cs_nWalletUnlockTime); + + delete (int64*)parg; +} + +Value walletpassphrase(const Array& params, bool fHelp) +{ + if (pwalletMain->IsCrypted() && (fHelp || params.size() < 2 || params.size() > 3)) + throw runtime_error( + "walletpassphrase [mintonly]\n" + "Stores the wallet decryption key in memory for seconds.\n" + "mintonly is optional true/false allowing only block minting."); + if (fHelp) + return true; + if (!pwalletMain->IsCrypted()) + throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrase was called."); + + if (!pwalletMain->IsLocked()) + throw JSONRPCError(RPC_WALLET_ALREADY_UNLOCKED, "Error: Wallet is already unlocked, use walletlock first if need to change unlock settings."); + // Note that the walletpassphrase is stored in params[0] which is not mlock()ed + SecureString strWalletPass; + strWalletPass.reserve(100); + // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) + // Alternately, find a way to make params[0] mlock()'d to begin with. + strWalletPass = params[0].get_str().c_str(); + + if (strWalletPass.length() > 0) + { + if (!pwalletMain->Unlock(strWalletPass)) + throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect."); + } + else + throw runtime_error( + "walletpassphrase \n" + "Stores the wallet decryption key in memory for seconds."); + + NewThread(ThreadTopUpKeyPool, NULL); + int64* pnSleepTime = new int64(params[1].get_int64()); + NewThread(ThreadCleanWalletPassphrase, pnSleepTime); + + // ppcoin: if user OS account compromised prevent trivial sendmoney commands + if (params.size() > 2) + fWalletUnlockMintOnly = params[2].get_bool(); + else + fWalletUnlockMintOnly = false; + + return Value::null; +} + + +Value walletpassphrasechange(const Array& params, bool fHelp) +{ + if (pwalletMain->IsCrypted() && (fHelp || params.size() != 2)) + throw runtime_error( + "walletpassphrasechange \n" + "Changes the wallet passphrase from to ."); + if (fHelp) + return true; + if (!pwalletMain->IsCrypted()) + throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrasechange was called."); + + // TODO: get rid of these .c_str() calls by implementing SecureString::operator=(std::string) + // Alternately, find a way to make params[0] mlock()'d to begin with. + SecureString strOldWalletPass; + strOldWalletPass.reserve(100); + strOldWalletPass = params[0].get_str().c_str(); + + SecureString strNewWalletPass; + strNewWalletPass.reserve(100); + strNewWalletPass = params[1].get_str().c_str(); + + if (strOldWalletPass.length() < 1 || strNewWalletPass.length() < 1) + throw runtime_error( + "walletpassphrasechange \n" + "Changes the wallet passphrase from to ."); + + if (!pwalletMain->ChangeWalletPassphrase(strOldWalletPass, strNewWalletPass)) + throw JSONRPCError(RPC_WALLET_PASSPHRASE_INCORRECT, "Error: The wallet passphrase entered was incorrect."); + + return Value::null; +} + + +Value walletlock(const Array& params, bool fHelp) +{ + if (pwalletMain->IsCrypted() && (fHelp || params.size() != 0)) + throw runtime_error( + "walletlock\n" + "Removes the wallet encryption key from memory, locking the wallet.\n" + "After calling this method, you will need to call walletpassphrase again\n" + "before being able to call any methods which require the wallet to be unlocked."); + if (fHelp) + return true; + if (!pwalletMain->IsCrypted()) + throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletlock was called."); + + { + LOCK(cs_nWalletUnlockTime); + pwalletMain->Lock(); + nWalletUnlockTime = 0; + } + + return Value::null; +} + + +Value encryptwallet(const Array& params, bool fHelp) +{ + if (!pwalletMain->IsCrypted() && (fHelp || params.size() != 1)) + throw runtime_error( + "encryptwallet \n" + "Encrypts the wallet with ."); + if (fHelp) + return true; + if (pwalletMain->IsCrypted()) + throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an encrypted wallet, but encryptwallet was called."); + + // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) + // Alternately, find a way to make params[0] mlock()'d to begin with. + SecureString strWalletPass; + strWalletPass.reserve(100); + strWalletPass = params[0].get_str().c_str(); + + if (strWalletPass.length() < 1) + throw runtime_error( + "encryptwallet \n" + "Encrypts the wallet with ."); + + if (!pwalletMain->EncryptWallet(strWalletPass)) + throw JSONRPCError(RPC_WALLET_ENCRYPTION_FAILED, "Error: Failed to encrypt the wallet."); + + // BDB seems to have a bad habit of writing old data into + // slack space in .dat files; that is bad if the old data is + // unencrypted private keys. So: + StartShutdown(); + return "wallet encrypted; curecoin 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 +{ +public: + Object operator()(const CNoDestination &dest) const { return Object(); } + + Object operator()(const CKeyID &keyID) const { + Object obj; + CPubKey vchPubKey; + pwalletMain->GetPubKey(keyID, vchPubKey); + obj.push_back(Pair("isscript", false)); + obj.push_back(Pair("pubkey", HexStr(vchPubKey.Raw()))); + obj.push_back(Pair("iscompressed", vchPubKey.IsCompressed())); + return obj; + } + + Object operator()(const CScriptID &scriptID) const { + Object obj; + obj.push_back(Pair("isscript", true)); + CScript subscript; + pwalletMain->GetCScript(scriptID, subscript); + std::vector addresses; + txnouttype whichType; + int nRequired; + ExtractDestinations(subscript, whichType, addresses, nRequired); + obj.push_back(Pair("script", GetTxnOutputType(whichType))); + Array a; + BOOST_FOREACH(const CTxDestination& addr, addresses) + a.push_back(CcurecoinAddress(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 ."); + + CcurecoinAddress address(params[0].get_str()); + bool isValid = address.IsValid(); + + Object ret; + ret.push_back(Pair("isvalid", isValid)); + if (isValid) + { + CTxDestination dest = address.Get(); + string currentAddress = address.ToString(); + ret.push_back(Pair("address", currentAddress)); + bool fMine = IsMine(*pwalletMain, dest); + ret.push_back(Pair("ismine", fMine)); + if (fMine) { + Object detail = boost::apply_visitor(DescribeAddressVisitor(), dest); + ret.insert(ret.end(), detail.begin(), detail.end()); + } + if (pwalletMain->mapAddressBook.count(dest)) + ret.push_back(Pair("account", pwalletMain->mapAddressBook[dest])); + } + return ret; +} + +Value validatepubkey(const Array& params, bool fHelp) +{ + if (fHelp || !params.size() || params.size() > 2) + throw runtime_error( + "validatepubkey \n" + "Return information about ."); + + std::vector vchPubKey = ParseHex(params[0].get_str()); + CPubKey pubKey(vchPubKey); + + bool isValid = pubKey.IsValid(); + bool isCompressed = pubKey.IsCompressed(); + CKeyID keyID = pubKey.GetID(); + + CcurecoinAddress address; + address.Set(keyID); + + Object ret; + ret.push_back(Pair("isvalid", isValid)); + if (isValid) + { + CTxDestination dest = address.Get(); + string currentAddress = address.ToString(); + ret.push_back(Pair("address", currentAddress)); + bool fMine = IsMine(*pwalletMain, dest); + ret.push_back(Pair("ismine", fMine)); + ret.push_back(Pair("iscompressed", isCompressed)); + if (fMine) { + Object detail = boost::apply_visitor(DescribeAddressVisitor(), dest); + ret.insert(ret.end(), detail.begin(), detail.end()); + } + if (pwalletMain->mapAddressBook.count(dest)) + ret.push_back(Pair("account", pwalletMain->mapAddressBook[dest])); + } + return ret; +} + +// ppcoin: reserve balance from being staked for network protection +Value reservebalance(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 2) + throw runtime_error( + "reservebalance [ [amount]]\n" + " is true or false to turn balance reserve on or off.\n" + " is a real and rounded to cent.\n" + "Set reserve amount not participating in network protection.\n" + "If no parameters provided current setting is printed.\n"); + + if (params.size() > 0) + { + bool fReserve = params[0].get_bool(); + if (fReserve) + { + if (params.size() == 1) + throw runtime_error("must provide amount to reserve balance.\n"); + int64 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(); + } + else + { + if (params.size() > 1) + throw runtime_error("cannot specify amount to turn off reserve.\n"); + mapArgs["-reservebalance"] = "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; +} + + +// ppcoin: check wallet integrity +Value checkwallet(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 0) + throw runtime_error( + "checkwallet\n" + "Check wallet for integrity.\n"); + + int nMismatchSpent; + int64 nBalanceInQuestion; + pwalletMain->FixSpentCoins(nMismatchSpent, nBalanceInQuestion, true); + Object result; + if (nMismatchSpent == 0) + result.push_back(Pair("wallet check passed", true)); + else + { + result.push_back(Pair("mismatched spent coins", nMismatchSpent)); + result.push_back(Pair("amount in question", ValueFromAmount(nBalanceInQuestion))); + } + return result; +} + + +// ppcoin: repair wallet +Value repairwallet(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 0) + throw runtime_error( + "repairwallet\n" + "Repair wallet if checkwallet reports any problem.\n"); + + int nMismatchSpent; + int64 nBalanceInQuestion; + pwalletMain->FixSpentCoins(nMismatchSpent, nBalanceInQuestion); + Object result; + if (nMismatchSpent == 0) + result.push_back(Pair("wallet check passed", true)); + else + { + result.push_back(Pair("mismatched spent coins", nMismatchSpent)); + result.push_back(Pair("amount affected by repair", ValueFromAmount(nBalanceInQuestion))); + } + return result; +} + +// curecoin: resend unconfirmed wallet transactions +Value resendtx(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "resendtx\n" + "Re-send unconfirmed transactions.\n" + ); + + ResendWalletTransactions(); + + return Value::null; +} + +// ppcoin: make a public-private key pair +Value makekeypair(const Array& params, bool fHelp) +{ + if (fHelp || params.size() > 1) + throw runtime_error( + "makekeypair [prefix]\n" + "Make a public/private key pair.\n" + "[prefix] is optional preferred prefix for the public key.\n"); + + string strPrefix = ""; + if (params.size() > 0) + strPrefix = params[0].get_str(); + + CKey key; + key.MakeNewKey(false); + + CPrivKey vchPrivKey = key.GetPrivKey(); + Object result; + result.push_back(Pair("PrivateKey", HexStr(vchPrivKey.begin(), vchPrivKey.end()))); + result.push_back(Pair("PublicKey", HexStr(key.GetPubKey().Raw()))); + return result; +} diff --git a/src/script.cpp b/src/script.cpp new file mode 100644 index 0000000..69e9aee --- /dev/null +++ b/src/script.cpp @@ -0,0 +1,1885 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include +#include + +using namespace std; +using namespace boost; + +#include "script.h" +#include "keystore.h" +#include "bignum.h" +#include "key.h" +#include "main.h" +#include "sync.h" +#include "util.h" + +bool CheckSig(vector vchSig, vector vchPubKey, CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType); + +static const valtype vchFalse(0); +static const valtype vchZero(0); +static const valtype vchTrue(1, 1); +static const CBigNum bnZero(0); +static const CBigNum bnOne(1); +static const CBigNum bnFalse(0); +static const CBigNum bnTrue(1); +static const size_t nMaxNumSize = 4; + + +CBigNum CastToBigNum(const valtype& vch) +{ + if (vch.size() > nMaxNumSize) + throw runtime_error("CastToBigNum() : overflow"); + // Get rid of extra leading zeros + return CBigNum(CBigNum(vch).getvch()); +} + +bool CastToBool(const valtype& vch) +{ + for (unsigned int i = 0; i < vch.size(); i++) + { + if (vch[i] != 0) + { + // Can be negative zero + if (i == vch.size()-1 && vch[i] == 0x80) + return false; + return true; + } + } + 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 + if (vch1.size() < vch2.size()) + // PATCH: + // +unsigned char msb = vch1[vch1.size()-1]; + // +vch1[vch1.size()-1] &= 0x7f; + // vch1.resize(vch2.size(), 0); + // +vch1[vch1.size()-1] = msb; + vch1.resize(vch2.size(), 0); + if (vch2.size() < vch1.size()) + // PATCH: + // +unsigned char msb = vch2[vch2.size()-1]; + // +vch2[vch2.size()-1] &= 0x7f; + // vch2.resize(vch1.size(), 0); + // +vch2[vch2.size()-1] = msb; + vch2.resize(vch1.size(), 0); +} + + + +// +// Script is a stack machine (like Forth) that evaluates a predicate +// returning a bool indicating valid or not. There are no loops. +// +#define stacktop(i) (stack.at(stack.size()+(i))) +#define altstacktop(i) (altstack.at(altstack.size()+(i))) +static inline void popstack(vector& stack) +{ + if (stack.empty()) + throw runtime_error("popstack() : stack empty"); + stack.pop_back(); +} + + +const char* GetTxnOutputType(txnouttype t) +{ + switch (t) + { + case TX_NONSTANDARD: return "nonstandard"; + case TX_PUBKEY: return "pubkey"; + case TX_PUBKEYHASH: return "pubkeyhash"; + case TX_SCRIPTHASH: return "scripthash"; + case TX_MULTISIG: return "multisig"; + } + return NULL; +} + + +const char* GetOpName(opcodetype opcode) +{ + switch (opcode) + { + // push value + case OP_0 : return "0"; + case OP_PUSHDATA1 : return "OP_PUSHDATA1"; + case OP_PUSHDATA2 : return "OP_PUSHDATA2"; + case OP_PUSHDATA4 : return "OP_PUSHDATA4"; + case OP_1NEGATE : return "-1"; + case OP_RESERVED : return "OP_RESERVED"; + case OP_1 : return "1"; + case OP_2 : return "2"; + case OP_3 : return "3"; + case OP_4 : return "4"; + case OP_5 : return "5"; + case OP_6 : return "6"; + case OP_7 : return "7"; + case OP_8 : return "8"; + case OP_9 : return "9"; + case OP_10 : return "10"; + case OP_11 : return "11"; + case OP_12 : return "12"; + case OP_13 : return "13"; + case OP_14 : return "14"; + case OP_15 : return "15"; + case OP_16 : return "16"; + + // control + case OP_NOP : return "OP_NOP"; + case OP_VER : return "OP_VER"; + case OP_IF : return "OP_IF"; + case OP_NOTIF : return "OP_NOTIF"; + case OP_VERIF : return "OP_VERIF"; + case OP_VERNOTIF : return "OP_VERNOTIF"; + case OP_ELSE : return "OP_ELSE"; + case OP_ENDIF : return "OP_ENDIF"; + case OP_VERIFY : return "OP_VERIFY"; + case OP_RETURN : return "OP_RETURN"; + + // stack ops + case OP_TOALTSTACK : return "OP_TOALTSTACK"; + case OP_FROMALTSTACK : return "OP_FROMALTSTACK"; + case OP_2DROP : return "OP_2DROP"; + case OP_2DUP : return "OP_2DUP"; + case OP_3DUP : return "OP_3DUP"; + case OP_2OVER : return "OP_2OVER"; + case OP_2ROT : return "OP_2ROT"; + case OP_2SWAP : return "OP_2SWAP"; + case OP_IFDUP : return "OP_IFDUP"; + case OP_DEPTH : return "OP_DEPTH"; + case OP_DROP : return "OP_DROP"; + case OP_DUP : return "OP_DUP"; + case OP_NIP : return "OP_NIP"; + case OP_OVER : return "OP_OVER"; + case OP_PICK : return "OP_PICK"; + case OP_ROLL : return "OP_ROLL"; + case OP_ROT : return "OP_ROT"; + case OP_SWAP : return "OP_SWAP"; + case OP_TUCK : return "OP_TUCK"; + + // splice ops + case OP_CAT : return "OP_CAT"; + case OP_SUBSTR : return "OP_SUBSTR"; + case OP_LEFT : return "OP_LEFT"; + case OP_RIGHT : return "OP_RIGHT"; + case OP_SIZE : return "OP_SIZE"; + + // bit logic + case OP_INVERT : return "OP_INVERT"; + case OP_AND : return "OP_AND"; + case OP_OR : return "OP_OR"; + case OP_XOR : return "OP_XOR"; + case OP_EQUAL : return "OP_EQUAL"; + case OP_EQUALVERIFY : return "OP_EQUALVERIFY"; + case OP_RESERVED1 : return "OP_RESERVED1"; + case OP_RESERVED2 : return "OP_RESERVED2"; + + // numeric + case OP_1ADD : return "OP_1ADD"; + case OP_1SUB : return "OP_1SUB"; + case OP_2MUL : return "OP_2MUL"; + case OP_2DIV : return "OP_2DIV"; + case OP_NEGATE : return "OP_NEGATE"; + case OP_ABS : return "OP_ABS"; + case OP_NOT : return "OP_NOT"; + case OP_0NOTEQUAL : return "OP_0NOTEQUAL"; + case OP_ADD : return "OP_ADD"; + case OP_SUB : return "OP_SUB"; + case OP_MUL : return "OP_MUL"; + case OP_DIV : return "OP_DIV"; + case OP_MOD : return "OP_MOD"; + case OP_LSHIFT : return "OP_LSHIFT"; + case OP_RSHIFT : return "OP_RSHIFT"; + case OP_BOOLAND : return "OP_BOOLAND"; + case OP_BOOLOR : return "OP_BOOLOR"; + case OP_NUMEQUAL : return "OP_NUMEQUAL"; + case OP_NUMEQUALVERIFY : return "OP_NUMEQUALVERIFY"; + case OP_NUMNOTEQUAL : return "OP_NUMNOTEQUAL"; + case OP_LESSTHAN : return "OP_LESSTHAN"; + case OP_GREATERTHAN : return "OP_GREATERTHAN"; + case OP_LESSTHANOREQUAL : return "OP_LESSTHANOREQUAL"; + case OP_GREATERTHANOREQUAL : return "OP_GREATERTHANOREQUAL"; + case OP_MIN : return "OP_MIN"; + case OP_MAX : return "OP_MAX"; + case OP_WITHIN : return "OP_WITHIN"; + + // crypto + case OP_RIPEMD160 : return "OP_RIPEMD160"; + case OP_SHA1 : return "OP_SHA1"; + case OP_SHA256 : return "OP_SHA256"; + case OP_HASH160 : return "OP_HASH160"; + case OP_HASH256 : return "OP_HASH256"; + case OP_CODESEPARATOR : return "OP_CODESEPARATOR"; + case OP_CHECKSIG : return "OP_CHECKSIG"; + case OP_CHECKSIGVERIFY : return "OP_CHECKSIGVERIFY"; + case OP_CHECKMULTISIG : return "OP_CHECKMULTISIG"; + case OP_CHECKMULTISIGVERIFY : return "OP_CHECKMULTISIGVERIFY"; + + // expanson + case OP_NOP1 : return "OP_NOP1"; + case OP_NOP2 : return "OP_NOP2"; + case OP_NOP3 : return "OP_NOP3"; + case OP_NOP4 : return "OP_NOP4"; + case OP_NOP5 : return "OP_NOP5"; + case OP_NOP6 : return "OP_NOP6"; + case OP_NOP7 : return "OP_NOP7"; + case OP_NOP8 : return "OP_NOP8"; + case OP_NOP9 : return "OP_NOP9"; + case OP_NOP10 : return "OP_NOP10"; + + + + // template matching params + case OP_PUBKEYHASH : return "OP_PUBKEYHASH"; + case OP_PUBKEY : return "OP_PUBKEY"; + + case OP_INVALIDOPCODE : return "OP_INVALIDOPCODE"; + default: + return "OP_UNKNOWN"; + } +} + +bool EvalScript(vector >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, int nHashType) +{ + CAutoBN_CTX pctx; + CScript::const_iterator pc = script.begin(); + CScript::const_iterator pend = script.end(); + CScript::const_iterator pbegincodehash = script.begin(); + opcodetype opcode; + valtype vchPushValue; + vector vfExec; + vector altstack; + if (script.size() > 10000) + return false; + int nOpCount = 0; + + + try + { + while (pc < pend) + { + bool fExec = !count(vfExec.begin(), vfExec.end(), false); + + // + // Read instruction + // + if (!script.GetOp(pc, opcode, vchPushValue)) + return false; + if (vchPushValue.size() > 520) + return false; + if (opcode > OP_16 && ++nOpCount > 201) + return false; + + if (opcode == OP_CAT || + opcode == OP_SUBSTR || + opcode == OP_LEFT || + opcode == OP_RIGHT || + opcode == OP_INVERT || + opcode == OP_AND || + opcode == OP_OR || + opcode == OP_XOR || + opcode == OP_2MUL || + opcode == OP_2DIV || + opcode == OP_MUL || + opcode == OP_DIV || + opcode == OP_MOD || + opcode == OP_LSHIFT || + opcode == OP_RSHIFT) + return false; + + if (fExec && 0 <= opcode && opcode <= OP_PUSHDATA4) + stack.push_back(vchPushValue); + else if (fExec || (OP_IF <= opcode && opcode <= OP_ENDIF)) + switch (opcode) + { + // + // Push value + // + case OP_1NEGATE: + case OP_1: + case OP_2: + case OP_3: + case OP_4: + case OP_5: + case OP_6: + case OP_7: + case OP_8: + case OP_9: + case OP_10: + case OP_11: + case OP_12: + case OP_13: + case OP_14: + case OP_15: + case OP_16: + { + // ( -- value) + CBigNum bn((int)opcode - (int)(OP_1 - 1)); + stack.push_back(bn.getvch()); + } + break; + + + // + // Control + // + case OP_NOP: + case OP_NOP1: case OP_NOP2: case OP_NOP3: case OP_NOP4: case OP_NOP5: + case OP_NOP6: case OP_NOP7: case OP_NOP8: case OP_NOP9: case OP_NOP10: + break; + + case OP_IF: + case OP_NOTIF: + { + // if [statements] [else [statements]] endif + bool fValue = false; + if (fExec) + { + if (stack.size() < 1) + return false; + valtype& vch = stacktop(-1); + fValue = CastToBool(vch); + if (opcode == OP_NOTIF) + fValue = !fValue; + popstack(stack); + } + vfExec.push_back(fValue); + } + break; + + case OP_ELSE: + { + if (vfExec.empty()) + return false; + vfExec.back() = !vfExec.back(); + } + break; + + case OP_ENDIF: + { + if (vfExec.empty()) + return false; + vfExec.pop_back(); + } + break; + + case OP_VERIFY: + { + // (true -- ) or + // (false -- false) and return + if (stack.size() < 1) + return false; + bool fValue = CastToBool(stacktop(-1)); + if (fValue) + popstack(stack); + else + return false; + } + break; + + case OP_RETURN: + { + return false; + } + break; + + + // + // Stack ops + // + case OP_TOALTSTACK: + { + if (stack.size() < 1) + return false; + altstack.push_back(stacktop(-1)); + popstack(stack); + } + break; + + case OP_FROMALTSTACK: + { + if (altstack.size() < 1) + return false; + stack.push_back(altstacktop(-1)); + popstack(altstack); + } + break; + + case OP_2DROP: + { + // (x1 x2 -- ) + if (stack.size() < 2) + return false; + popstack(stack); + popstack(stack); + } + break; + + case OP_2DUP: + { + // (x1 x2 -- x1 x2 x1 x2) + if (stack.size() < 2) + return false; + valtype vch1 = stacktop(-2); + valtype vch2 = stacktop(-1); + stack.push_back(vch1); + stack.push_back(vch2); + } + break; + + case OP_3DUP: + { + // (x1 x2 x3 -- x1 x2 x3 x1 x2 x3) + if (stack.size() < 3) + return false; + valtype vch1 = stacktop(-3); + valtype vch2 = stacktop(-2); + valtype vch3 = stacktop(-1); + stack.push_back(vch1); + stack.push_back(vch2); + stack.push_back(vch3); + } + break; + + case OP_2OVER: + { + // (x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2) + if (stack.size() < 4) + return false; + valtype vch1 = stacktop(-4); + valtype vch2 = stacktop(-3); + stack.push_back(vch1); + stack.push_back(vch2); + } + break; + + case OP_2ROT: + { + // (x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2) + if (stack.size() < 6) + return false; + valtype vch1 = stacktop(-6); + valtype vch2 = stacktop(-5); + stack.erase(stack.end()-6, stack.end()-4); + stack.push_back(vch1); + stack.push_back(vch2); + } + break; + + case OP_2SWAP: + { + // (x1 x2 x3 x4 -- x3 x4 x1 x2) + if (stack.size() < 4) + return false; + swap(stacktop(-4), stacktop(-2)); + swap(stacktop(-3), stacktop(-1)); + } + break; + + case OP_IFDUP: + { + // (x - 0 | x x) + if (stack.size() < 1) + return false; + valtype vch = stacktop(-1); + if (CastToBool(vch)) + stack.push_back(vch); + } + break; + + case OP_DEPTH: + { + // -- stacksize + CBigNum bn(stack.size()); + stack.push_back(bn.getvch()); + } + break; + + case OP_DROP: + { + // (x -- ) + if (stack.size() < 1) + return false; + popstack(stack); + } + break; + + case OP_DUP: + { + // (x -- x x) + if (stack.size() < 1) + return false; + valtype vch = stacktop(-1); + stack.push_back(vch); + } + break; + + case OP_NIP: + { + // (x1 x2 -- x2) + if (stack.size() < 2) + return false; + stack.erase(stack.end() - 2); + } + break; + + case OP_OVER: + { + // (x1 x2 -- x1 x2 x1) + if (stack.size() < 2) + return false; + valtype vch = stacktop(-2); + stack.push_back(vch); + } + break; + + case OP_PICK: + case OP_ROLL: + { + // (xn ... x2 x1 x0 n - xn ... x2 x1 x0 xn) + // (xn ... x2 x1 x0 n - ... x2 x1 x0 xn) + if (stack.size() < 2) + return false; + int n = CastToBigNum(stacktop(-1)).getint(); + popstack(stack); + if (n < 0 || n >= (int)stack.size()) + return false; + valtype vch = stacktop(-n-1); + if (opcode == OP_ROLL) + stack.erase(stack.end()-n-1); + stack.push_back(vch); + } + break; + + case OP_ROT: + { + // (x1 x2 x3 -- x2 x3 x1) + // x2 x1 x3 after first swap + // x2 x3 x1 after second swap + if (stack.size() < 3) + return false; + swap(stacktop(-3), stacktop(-2)); + swap(stacktop(-2), stacktop(-1)); + } + break; + + case OP_SWAP: + { + // (x1 x2 -- x2 x1) + if (stack.size() < 2) + return false; + swap(stacktop(-2), stacktop(-1)); + } + break; + + case OP_TUCK: + { + // (x1 x2 -- x2 x1 x2) + if (stack.size() < 2) + return false; + valtype vch = stacktop(-1); + stack.insert(stack.end()-2, vch); + } + break; + + + // + // Splice ops + // + case OP_CAT: + { + // (x1 x2 -- out) + if (stack.size() < 2) + return false; + valtype& vch1 = stacktop(-2); + valtype& vch2 = stacktop(-1); + vch1.insert(vch1.end(), vch2.begin(), vch2.end()); + popstack(stack); + if (stacktop(-1).size() > 520) + return false; + } + break; + + case OP_SUBSTR: + { + // (in begin size -- out) + if (stack.size() < 3) + return false; + valtype& vch = stacktop(-3); + int nBegin = CastToBigNum(stacktop(-2)).getint(); + int nEnd = nBegin + CastToBigNum(stacktop(-1)).getint(); + if (nBegin < 0 || nEnd < nBegin) + return false; + if (nBegin > (int)vch.size()) + nBegin = vch.size(); + if (nEnd > (int)vch.size()) + nEnd = vch.size(); + vch.erase(vch.begin() + nEnd, vch.end()); + vch.erase(vch.begin(), vch.begin() + nBegin); + popstack(stack); + popstack(stack); + } + break; + + case OP_LEFT: + case OP_RIGHT: + { + // (in size -- out) + if (stack.size() < 2) + return false; + valtype& vch = stacktop(-2); + int nSize = CastToBigNum(stacktop(-1)).getint(); + if (nSize < 0) + return false; + if (nSize > (int)vch.size()) + nSize = vch.size(); + if (opcode == OP_LEFT) + vch.erase(vch.begin() + nSize, vch.end()); + else + vch.erase(vch.begin(), vch.end() - nSize); + popstack(stack); + } + break; + + case OP_SIZE: + { + // (in -- in size) + if (stack.size() < 1) + return false; + CBigNum bn(stacktop(-1).size()); + stack.push_back(bn.getvch()); + } + break; + + + // + // Bitwise logic + // + case OP_INVERT: + { + // (in - out) + if (stack.size() < 1) + return false; + valtype& vch = stacktop(-1); + for (unsigned int i = 0; i < vch.size(); i++) + vch[i] = ~vch[i]; + } + break; + + // + // WARNING: These disabled opcodes exhibit unexpected behavior + // when used on signed integers due to a bug in MakeSameSize() + // [see definition of MakeSameSize() above]. + // + case OP_AND: + case OP_OR: + case OP_XOR: + { + // (x1 x2 - out) + if (stack.size() < 2) + return false; + valtype& vch1 = stacktop(-2); + valtype& vch2 = stacktop(-1); + MakeSameSize(vch1, vch2); // <-- NOT SAFE FOR SIGNED VALUES + if (opcode == OP_AND) + { + for (unsigned int i = 0; i < vch1.size(); i++) + vch1[i] &= vch2[i]; + } + else if (opcode == OP_OR) + { + for (unsigned int i = 0; i < vch1.size(); i++) + vch1[i] |= vch2[i]; + } + else if (opcode == OP_XOR) + { + for (unsigned int i = 0; i < vch1.size(); i++) + vch1[i] ^= vch2[i]; + } + popstack(stack); + } + break; + + case OP_EQUAL: + case OP_EQUALVERIFY: + //case OP_NOTEQUAL: // use OP_NUMNOTEQUAL + { + // (x1 x2 - bool) + if (stack.size() < 2) + return false; + valtype& vch1 = stacktop(-2); + valtype& vch2 = stacktop(-1); + bool fEqual = (vch1 == vch2); + // OP_NOTEQUAL is disabled because it would be too easy to say + // something like n != 1 and have some wiseguy pass in 1 with extra + // zero bytes after it (numerically, 0x01 == 0x0001 == 0x000001) + //if (opcode == OP_NOTEQUAL) + // fEqual = !fEqual; + popstack(stack); + popstack(stack); + stack.push_back(fEqual ? vchTrue : vchFalse); + if (opcode == OP_EQUALVERIFY) + { + if (fEqual) + popstack(stack); + else + return false; + } + } + break; + + + // + // Numeric + // + case OP_1ADD: + case OP_1SUB: + case OP_2MUL: + case OP_2DIV: + case OP_NEGATE: + case OP_ABS: + case OP_NOT: + case OP_0NOTEQUAL: + { + // (in -- out) + if (stack.size() < 1) + return false; + CBigNum bn = CastToBigNum(stacktop(-1)); + switch (opcode) + { + case OP_1ADD: bn += bnOne; break; + case OP_1SUB: bn -= bnOne; break; + case OP_2MUL: bn <<= 1; break; + case OP_2DIV: bn >>= 1; break; + case OP_NEGATE: bn = -bn; break; + case OP_ABS: if (bn < bnZero) bn = -bn; break; + case OP_NOT: bn = (bn == bnZero); break; + case OP_0NOTEQUAL: bn = (bn != bnZero); break; + default: assert(!"invalid opcode"); break; + } + popstack(stack); + stack.push_back(bn.getvch()); + } + break; + + case OP_ADD: + case OP_SUB: + case OP_MUL: + case OP_DIV: + case OP_MOD: + case OP_LSHIFT: + case OP_RSHIFT: + case OP_BOOLAND: + case OP_BOOLOR: + case OP_NUMEQUAL: + case OP_NUMEQUALVERIFY: + case OP_NUMNOTEQUAL: + case OP_LESSTHAN: + case OP_GREATERTHAN: + case OP_LESSTHANOREQUAL: + case OP_GREATERTHANOREQUAL: + case OP_MIN: + case OP_MAX: + { + // (x1 x2 -- out) + if (stack.size() < 2) + return false; + CBigNum bn1 = CastToBigNum(stacktop(-2)); + CBigNum bn2 = CastToBigNum(stacktop(-1)); + CBigNum bn; + switch (opcode) + { + case OP_ADD: + bn = bn1 + bn2; + break; + + case OP_SUB: + bn = bn1 - bn2; + break; + + case OP_MUL: + if (!BN_mul(&bn, &bn1, &bn2, pctx)) + return false; + break; + + case OP_DIV: + if (!BN_div(&bn, NULL, &bn1, &bn2, pctx)) + return false; + break; + + case OP_MOD: + if (!BN_mod(&bn, &bn1, &bn2, pctx)) + return false; + break; + + case OP_LSHIFT: + if (bn2 < bnZero || bn2 > CBigNum(2048)) + return false; + bn = bn1 << bn2.getulong(); + break; + + case OP_RSHIFT: + if (bn2 < bnZero || bn2 > CBigNum(2048)) + return false; + bn = bn1 >> bn2.getulong(); + break; + + case OP_BOOLAND: bn = (bn1 != bnZero && bn2 != bnZero); break; + case OP_BOOLOR: bn = (bn1 != bnZero || bn2 != bnZero); break; + case OP_NUMEQUAL: bn = (bn1 == bn2); break; + case OP_NUMEQUALVERIFY: bn = (bn1 == bn2); break; + case OP_NUMNOTEQUAL: bn = (bn1 != bn2); break; + case OP_LESSTHAN: bn = (bn1 < bn2); break; + case OP_GREATERTHAN: bn = (bn1 > bn2); break; + case OP_LESSTHANOREQUAL: bn = (bn1 <= bn2); break; + case OP_GREATERTHANOREQUAL: bn = (bn1 >= bn2); break; + case OP_MIN: bn = (bn1 < bn2 ? bn1 : bn2); break; + case OP_MAX: bn = (bn1 > bn2 ? bn1 : bn2); break; + default: assert(!"invalid opcode"); break; + } + popstack(stack); + popstack(stack); + stack.push_back(bn.getvch()); + + if (opcode == OP_NUMEQUALVERIFY) + { + if (CastToBool(stacktop(-1))) + popstack(stack); + else + return false; + } + } + break; + + case OP_WITHIN: + { + // (x min max -- out) + if (stack.size() < 3) + return false; + CBigNum bn1 = CastToBigNum(stacktop(-3)); + CBigNum bn2 = CastToBigNum(stacktop(-2)); + CBigNum bn3 = CastToBigNum(stacktop(-1)); + bool fValue = (bn2 <= bn1 && bn1 < bn3); + popstack(stack); + popstack(stack); + popstack(stack); + stack.push_back(fValue ? vchTrue : vchFalse); + } + break; + + + // + // Crypto + // + case OP_RIPEMD160: + case OP_SHA1: + case OP_SHA256: + case OP_HASH160: + case OP_HASH256: + { + // (in -- hash) + if (stack.size() < 1) + return false; + valtype& vch = stacktop(-1); + valtype vchHash((opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160) ? 20 : 32); + if (opcode == OP_RIPEMD160) + RIPEMD160(&vch[0], vch.size(), &vchHash[0]); + else if (opcode == OP_SHA1) + SHA1(&vch[0], vch.size(), &vchHash[0]); + else if (opcode == OP_SHA256) + SHA256(&vch[0], vch.size(), &vchHash[0]); + else if (opcode == OP_HASH160) + { + uint160 hash160 = Hash160(vch); + memcpy(&vchHash[0], &hash160, sizeof(hash160)); + } + else if (opcode == OP_HASH256) + { + uint256 hash = Hash(vch.begin(), vch.end()); + memcpy(&vchHash[0], &hash, sizeof(hash)); + } + popstack(stack); + stack.push_back(vchHash); + } + break; + + case OP_CODESEPARATOR: + { + // Hash starts after the code separator + pbegincodehash = pc; + } + break; + + case OP_CHECKSIG: + case OP_CHECKSIGVERIFY: + { + // (sig pubkey -- bool) + if (stack.size() < 2) + return false; + + valtype& vchSig = stacktop(-2); + valtype& vchPubKey = stacktop(-1); + + ////// debug print + //PrintHex(vchSig.begin(), vchSig.end(), "sig: %s\n"); + //PrintHex(vchPubKey.begin(), vchPubKey.end(), "pubkey: %s\n"); + + // Subset of script starting at the most recent codeseparator + CScript scriptCode(pbegincodehash, pend); + + // 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); + + popstack(stack); + popstack(stack); + stack.push_back(fSuccess ? vchTrue : vchFalse); + if (opcode == OP_CHECKSIGVERIFY) + { + if (fSuccess) + popstack(stack); + else + return false; + } + } + break; + + case OP_CHECKMULTISIG: + case OP_CHECKMULTISIGVERIFY: + { + // ([sig ...] num_of_signatures [pubkey ...] num_of_pubkeys -- bool) + + int i = 1; + if ((int)stack.size() < i) + return false; + + int nKeysCount = CastToBigNum(stacktop(-i)).getint(); + if (nKeysCount < 0 || nKeysCount > 20) + return false; + nOpCount += nKeysCount; + if (nOpCount > 201) + return false; + int ikey = ++i; + i += nKeysCount; + if ((int)stack.size() < i) + return false; + + int nSigsCount = CastToBigNum(stacktop(-i)).getint(); + if (nSigsCount < 0 || nSigsCount > nKeysCount) + return false; + int isig = ++i; + i += nSigsCount; + if ((int)stack.size() < i) + return false; + + // Subset of script starting at the most recent codeseparator + CScript scriptCode(pbegincodehash, pend); + + // Drop the signatures, since there's no way for a signature to sign itself + for (int k = 0; k < nSigsCount; k++) + { + valtype& vchSig = stacktop(-isig-k); + scriptCode.FindAndDelete(CScript(vchSig)); + } + + bool fSuccess = true; + while (fSuccess && nSigsCount > 0) + { + valtype& vchSig = stacktop(-isig); + valtype& vchPubKey = stacktop(-ikey); + + // Check signature + if (CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType)) + { + isig++; + nSigsCount--; + } + ikey++; + nKeysCount--; + + // If there are more signatures left than keys left, + // then too many signatures have failed + if (nSigsCount > nKeysCount) + fSuccess = false; + } + + while (i-- > 0) + popstack(stack); + stack.push_back(fSuccess ? vchTrue : vchFalse); + + if (opcode == OP_CHECKMULTISIGVERIFY) + { + if (fSuccess) + popstack(stack); + else + return false; + } + } + break; + + default: + return false; + } + + // Size limits + if (stack.size() + altstack.size() > 1000) + return false; + } + } + catch (...) + { + return false; + } + + + if (!vfExec.empty()) + return false; + + return true; +} + + + + + + + + + +uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType) +{ + if (nIn >= txTo.vin.size()) + { + printf("ERROR: SignatureHash() : nIn=%d out of range\n", nIn); + return 1; + } + CTransaction txTmp(txTo); + + // In case concatenating two scripts ends up with two codeseparators, + // or an extra one at the end, this prevents all those possible incompatibilities. + scriptCode.FindAndDelete(CScript(OP_CODESEPARATOR)); + + // Blank out other inputs' signatures + for (unsigned int i = 0; i < txTmp.vin.size(); i++) + txTmp.vin[i].scriptSig = CScript(); + txTmp.vin[nIn].scriptSig = scriptCode; + + // Blank out some of the outputs + if ((nHashType & 0x1f) == SIGHASH_NONE) + { + // Wildcard payee + txTmp.vout.clear(); + + // Let the others update at will + for (unsigned int i = 0; i < txTmp.vin.size(); i++) + if (i != nIn) + txTmp.vin[i].nSequence = 0; + } + else if ((nHashType & 0x1f) == SIGHASH_SINGLE) + { + // Only lock-in the txout payee at same index as txin + unsigned int nOut = nIn; + if (nOut >= txTmp.vout.size()) + { + printf("ERROR: SignatureHash() : nOut=%d out of range\n", nOut); + return 1; + } + txTmp.vout.resize(nOut+1); + for (unsigned int i = 0; i < nOut; i++) + txTmp.vout[i].SetNull(); + + // Let the others update at will + for (unsigned int i = 0; i < txTmp.vin.size(); i++) + if (i != nIn) + txTmp.vin[i].nSequence = 0; + } + + // Blank out other inputs completely, not recommended for open transactions + if (nHashType & SIGHASH_ANYONECANPAY) + { + txTmp.vin[0] = txTmp.vin[nIn]; + txTmp.vin.resize(1); + } + + // Serialize and hash + CDataStream ss(SER_GETHASH, 0); + ss.reserve(10000); + ss << txTmp << nHashType; + return Hash(ss.begin(), ss.end()); +} + + +// Valid signature cache, to avoid doing expensive ECDSA signature checking +// twice for every transaction (once when accepted into memory pool, and +// again when accepted into the block chain) + +class CSignatureCache +{ +private: + // sigdata_type is (signature hash, signature, public key): + typedef boost::tuple, std::vector > sigdata_type; + std::set< sigdata_type> setValid; + CCriticalSection cs_sigcache; + +public: + bool + Get(uint256 hash, const std::vector& vchSig, const std::vector& pubKey) + { + LOCK(cs_sigcache); + + sigdata_type k(hash, vchSig, pubKey); + std::set::iterator mi = setValid.find(k); + if (mi != setValid.end()) + return true; + return false; + } + + void Set(uint256 hash, const std::vector& vchSig, const std::vector& pubKey) + { + // DoS prevention: limit cache size to less than 10MB + // (~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); + if (nMaxCacheSize <= 0) return; + + LOCK(cs_sigcache); + + 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 + // and re-use a set of valid signatures just-slightly-greater + // than our cache size. + uint256 randomHash = GetRandHash(); + std::vector unused; + std::set::iterator it = + setValid.lower_bound(sigdata_type(randomHash, unused, unused)); + if (it == setValid.end()) + it = setValid.begin(); + setValid.erase(*it); + } + + sigdata_type k(hash, vchSig, pubKey); + setValid.insert(k); + } +}; + +bool CheckSig(vector vchSig, vector vchPubKey, CScript scriptCode, + const CTransaction& txTo, unsigned int nIn, int nHashType) +{ + static CSignatureCache signatureCache; + + // Hash type is one byte tacked on to the end of the signature + if (vchSig.empty()) + return false; + if (nHashType == 0) + nHashType = vchSig.back(); + else if (nHashType != vchSig.back()) + return false; + vchSig.pop_back(); + + uint256 sighash = SignatureHash(scriptCode, txTo, nIn, nHashType); + + if (signatureCache.Get(sighash, vchSig, vchPubKey)) + return true; + + CKey key; + if (!key.SetPubKey(vchPubKey)) + return false; + + if (!key.Verify(sighash, vchSig)) + return false; + + signatureCache.Set(sighash, vchSig, vchPubKey); + return true; +} + + + + + + + + + +// +// Return public keys or hashes from scriptPubKey, for 'standard' transaction types. +// +bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector >& vSolutionsRet) +{ + // Templates + static map mTemplates; + if (mTemplates.empty()) + { + // Standard tx, sender provides pubkey, receiver adds signature + mTemplates.insert(make_pair(TX_PUBKEY, CScript() << OP_PUBKEY << OP_CHECKSIG)); + + // curecoin address tx, sender provides hash of pubkey, receiver provides signature and pubkey + mTemplates.insert(make_pair(TX_PUBKEYHASH, CScript() << OP_DUP << OP_HASH160 << OP_PUBKEYHASH << OP_EQUALVERIFY << OP_CHECKSIG)); + + // Sender provides N pubkeys, receivers provides M signatures + mTemplates.insert(make_pair(TX_MULTISIG, CScript() << OP_SMALLINTEGER << OP_PUBKEYS << OP_SMALLINTEGER << OP_CHECKMULTISIG)); + } + + // Shortcut for pay-to-script-hash, which are more constrained than the other types: + // it is always OP_HASH160 20 [20 byte hash] OP_EQUAL + if (scriptPubKey.IsPayToScriptHash()) + { + typeRet = TX_SCRIPTHASH; + vector hashBytes(scriptPubKey.begin()+2, scriptPubKey.begin()+22); + vSolutionsRet.push_back(hashBytes); + return true; + } + + // Scan templates + const CScript& script1 = scriptPubKey; + BOOST_FOREACH(const PAIRTYPE(txnouttype, CScript)& tplate, mTemplates) + { + const CScript& script2 = tplate.second; + vSolutionsRet.clear(); + + opcodetype opcode1, opcode2; + vector vch1, vch2; + + // Compare + CScript::const_iterator pc1 = script1.begin(); + CScript::const_iterator pc2 = script2.begin(); + loop + { + if (pc1 == script1.end() && pc2 == script2.end()) + { + // Found a match + typeRet = tplate.first; + if (typeRet == TX_MULTISIG) + { + // Additional checks for TX_MULTISIG: + unsigned char m = vSolutionsRet.front()[0]; + unsigned char n = vSolutionsRet.back()[0]; + if (m < 1 || n < 1 || m > n || vSolutionsRet.size()-2 != n) + return false; + } + return true; + } + if (!script1.GetOp(pc1, opcode1, vch1)) + break; + if (!script2.GetOp(pc2, opcode2, vch2)) + break; + + // Template matching opcodes: + if (opcode2 == OP_PUBKEYS) + { + while (vch1.size() >= 33 && vch1.size() <= 120) + { + vSolutionsRet.push_back(vch1); + if (!script1.GetOp(pc1, opcode1, vch1)) + break; + } + if (!script2.GetOp(pc2, opcode2, vch2)) + break; + // Normal situation is to fall through + // to other if/else statements + } + + if (opcode2 == OP_PUBKEY) + { + if (vch1.size() < 33 || vch1.size() > 120) + break; + vSolutionsRet.push_back(vch1); + } + else if (opcode2 == OP_PUBKEYHASH) + { + if (vch1.size() != sizeof(uint160)) + break; + vSolutionsRet.push_back(vch1); + } + else if (opcode2 == OP_SMALLINTEGER) + { // Single-byte small integer pushed onto vSolutions + if (opcode1 == OP_0 || + (opcode1 >= OP_1 && opcode1 <= OP_16)) + { + char n = (char)CScript::DecodeOP_N(opcode1); + vSolutionsRet.push_back(valtype(1, n)); + } + else + break; + } + else if (opcode1 != opcode2 || vch1 != vch2) + { + // Others must match exactly + break; + } + } + } + + vSolutionsRet.clear(); + typeRet = TX_NONSTANDARD; + return false; +} + + +bool Sign1(const CKeyID& address, const CKeyStore& keystore, uint256 hash, int nHashType, CScript& scriptSigRet) +{ + CKey key; + if (!keystore.GetKey(address, key)) + return false; + + vector vchSig; + if (!key.Sign(hash, vchSig)) + return false; + vchSig.push_back((unsigned char)nHashType); + scriptSigRet << vchSig; + + return true; +} + +bool SignN(const vector& multisigdata, const CKeyStore& keystore, uint256 hash, int nHashType, CScript& scriptSigRet) +{ + int nSigned = 0; + int nRequired = multisigdata.front()[0]; + for (unsigned int i = 1; i < multisigdata.size()-1 && nSigned < nRequired; i++) + { + const valtype& pubkey = multisigdata[i]; + CKeyID keyID = CPubKey(pubkey).GetID(); + if (Sign1(keyID, keystore, hash, nHashType, scriptSigRet)) + ++nSigned; + } + return nSigned==nRequired; +} + +// +// Sign scriptPubKey with private keys stored in keystore, given transaction hash and hash type. +// Signatures are returned in scriptSigRet (or returns false if scriptPubKey can't be signed), +// unless whichTypeRet is TX_SCRIPTHASH, in which case scriptSigRet is the redemption script. +// Returns false if scriptPubKey could not be completely satisfied. +// +bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash, int nHashType, + CScript& scriptSigRet, txnouttype& whichTypeRet) +{ + scriptSigRet.clear(); + + vector vSolutions; + if (!Solver(scriptPubKey, whichTypeRet, vSolutions)) + return false; + + CKeyID keyID; + switch (whichTypeRet) + { + case TX_NONSTANDARD: + return false; + case TX_PUBKEY: + keyID = CPubKey(vSolutions[0]).GetID(); + return Sign1(keyID, keystore, hash, nHashType, scriptSigRet); + case TX_PUBKEYHASH: + keyID = CKeyID(uint160(vSolutions[0])); + if (!Sign1(keyID, keystore, hash, nHashType, scriptSigRet)) + return false; + else + { + CPubKey vch; + keystore.GetPubKey(keyID, vch); + scriptSigRet << vch; + } + return true; + case TX_SCRIPTHASH: + return keystore.GetCScript(uint160(vSolutions[0]), scriptSigRet); + + case TX_MULTISIG: + scriptSigRet << OP_0; // workaround CHECKMULTISIG bug + return (SignN(vSolutions, keystore, hash, nHashType, scriptSigRet)); + } + return false; +} + +int ScriptSigArgsExpected(txnouttype t, const std::vector >& vSolutions) +{ + switch (t) + { + case TX_NONSTANDARD: + return -1; + case TX_PUBKEY: + return 1; + case TX_PUBKEYHASH: + return 2; + case TX_MULTISIG: + if (vSolutions.size() < 1 || vSolutions[0].size() < 1) + return -1; + return vSolutions[0][0] + 1; + case TX_SCRIPTHASH: + return 1; // doesn't include args needed by the script + } + return -1; +} + +bool IsStandard(const CScript& scriptPubKey) +{ + vector vSolutions; + txnouttype whichType; + if (!Solver(scriptPubKey, whichType, vSolutions)) + return false; + + if (whichType == TX_MULTISIG) + { + unsigned char m = vSolutions.front()[0]; + unsigned char n = vSolutions.back()[0]; + // Support up to x-of-3 multisig txns as standard + if (n < 1 || n > 3) + return false; + if (m < 1 || m > n) + return false; + } + + return whichType != TX_NONSTANDARD; +} + + +unsigned int HaveKeys(const vector& pubkeys, const CKeyStore& keystore) +{ + unsigned int nResult = 0; + BOOST_FOREACH(const valtype& pubkey, pubkeys) + { + CKeyID keyID = CPubKey(pubkey).GetID(); + if (keystore.HaveKey(keyID)) + ++nResult; + } + return nResult; +} + + +class CKeyStoreIsMineVisitor : public boost::static_visitor +{ +private: + const CKeyStore *keystore; +public: + CKeyStoreIsMineVisitor(const CKeyStore *keystoreIn) : keystore(keystoreIn) { } + bool operator()(const CNoDestination &dest) const { return false; } + bool operator()(const CKeyID &keyID) const { return keystore->HaveKey(keyID); } + bool operator()(const CScriptID &scriptID) const { return keystore->HaveCScript(scriptID); } +}; + +bool IsMine(const CKeyStore &keystore, const CTxDestination &dest) +{ + return boost::apply_visitor(CKeyStoreIsMineVisitor(&keystore), dest); +} + +bool IsMine(const CKeyStore &keystore, const CScript& scriptPubKey) +{ + vector vSolutions; + txnouttype whichType; + if (!Solver(scriptPubKey, whichType, vSolutions)) + return false; + + CKeyID keyID; + switch (whichType) + { + case TX_NONSTANDARD: + return false; + case TX_PUBKEY: + keyID = CPubKey(vSolutions[0]).GetID(); + return keystore.HaveKey(keyID); + case TX_PUBKEYHASH: + keyID = CKeyID(uint160(vSolutions[0])); + return keystore.HaveKey(keyID); + case TX_SCRIPTHASH: + { + CScript subscript; + if (!keystore.GetCScript(CScriptID(uint160(vSolutions[0])), subscript)) + return false; + return IsMine(keystore, subscript); + } + case TX_MULTISIG: + { + // Only consider transactions "mine" if we own ALL the + // keys involved. multi-signature transactions that are + // partially owned (somebody else has a key that can spend + // them) enable spend-out-from-under-you attacks, especially + // in shared-wallet situations. + vector keys(vSolutions.begin()+1, vSolutions.begin()+vSolutions.size()-1); + return HaveKeys(keys, keystore) == keys.size(); + } + } + return false; +} + +bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet) +{ + vector vSolutions; + txnouttype whichType; + if (!Solver(scriptPubKey, whichType, vSolutions)) + return false; + + if (whichType == TX_PUBKEY) + { + addressRet = CPubKey(vSolutions[0]).GetID(); + return true; + } + else if (whichType == TX_PUBKEYHASH) + { + addressRet = CKeyID(uint160(vSolutions[0])); + return true; + } + else if (whichType == TX_SCRIPTHASH) + { + addressRet = CScriptID(uint160(vSolutions[0])); + return true; + } + // Multisig txns have more than one address... + return false; +} + +bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vector& addressRet, int& nRequiredRet) +{ + addressRet.clear(); + typeRet = TX_NONSTANDARD; + vector vSolutions; + if (!Solver(scriptPubKey, typeRet, vSolutions)) + return false; + + if (typeRet == TX_MULTISIG) + { + nRequiredRet = vSolutions.front()[0]; + for (unsigned int i = 1; i < vSolutions.size()-1; i++) + { + CTxDestination address = CPubKey(vSolutions[i]).GetID(); + addressRet.push_back(address); + } + } + else + { + nRequiredRet = 1; + CTxDestination address; + if (!ExtractDestination(scriptPubKey, address)) + return false; + addressRet.push_back(address); + } + + return true; +} + +bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, + bool fValidatePayToScriptHash, int nHashType) +{ + vector > stack, stackCopy; + if (!EvalScript(stack, scriptSig, txTo, nIn, nHashType)) + return false; + if (fValidatePayToScriptHash) + stackCopy = stack; + if (!EvalScript(stack, scriptPubKey, txTo, nIn, nHashType)) + return false; + if (stack.empty()) + return false; + + if (CastToBool(stack.back()) == false) + return false; + + // Additional validation for spend-to-script-hash transactions: + if (fValidatePayToScriptHash && scriptPubKey.IsPayToScriptHash()) + { + if (!scriptSig.IsPushOnly()) // scriptSig must be literals-only + return false; // or validation fails + + const valtype& pubKeySerialized = stackCopy.back(); + CScript pubKey2(pubKeySerialized.begin(), pubKeySerialized.end()); + popstack(stackCopy); + + if (!EvalScript(stackCopy, pubKey2, txTo, nIn, nHashType)) + return false; + if (stackCopy.empty()) + return false; + return CastToBool(stackCopy.back()); + } + + return true; +} + + +bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CTransaction& txTo, unsigned int nIn, int nHashType) +{ + assert(nIn < txTo.vin.size()); + CTxIn& txin = txTo.vin[nIn]; + + // Leave out the signature from the hash, since a signature can't sign itself. + // The checksig op will also drop the signatures from its hash. + uint256 hash = SignatureHash(fromPubKey, txTo, nIn, nHashType); + + txnouttype whichType; + if (!Solver(keystore, fromPubKey, hash, nHashType, txin.scriptSig, whichType)) + return false; + + if (whichType == TX_SCRIPTHASH) + { + // Solver returns the subscript that need to be evaluated; + // the final scriptSig is the signatures from that + // and then the serialized subscript: + CScript subscript = txin.scriptSig; + + // Recompute txn hash using subscript in place of scriptPubKey: + uint256 hash2 = SignatureHash(subscript, txTo, nIn, nHashType); + + txnouttype subType; + bool fSolved = + Solver(keystore, subscript, hash2, nHashType, txin.scriptSig, subType) && subType != TX_SCRIPTHASH; + // Append serialized subscript whether or not it is completely signed: + txin.scriptSig << static_cast(subscript); + if (!fSolved) return false; + } + + // Test solution + return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, true, 0); +} + +bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType) +{ + assert(nIn < txTo.vin.size()); + CTxIn& txin = txTo.vin[nIn]; + assert(txin.prevout.n < txFrom.vout.size()); + assert(txin.prevout.hash == txFrom.GetHash()); + const CTxOut& txout = txFrom.vout[txin.prevout.n]; + + return SignSignature(keystore, txout.scriptPubKey, txTo, nIn, nHashType); +} + +bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsigned int nIn, bool fValidatePayToScriptHash, int nHashType) +{ + assert(nIn < txTo.vin.size()); + const CTxIn& txin = txTo.vin[nIn]; + if (txin.prevout.n >= txFrom.vout.size()) + return false; + const CTxOut& txout = txFrom.vout[txin.prevout.n]; + + if (txin.prevout.hash != txFrom.GetHash()) + return false; + + return VerifyScript(txin.scriptSig, txout.scriptPubKey, txTo, nIn, fValidatePayToScriptHash, nHashType); +} + +static CScript PushAll(const vector& values) +{ + CScript result; + BOOST_FOREACH(const valtype& v, values) + result << v; + return result; +} + +static CScript CombineMultisig(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, + const vector& vSolutions, + vector& sigs1, vector& sigs2) +{ + // Combine all the signatures we've got: + set allsigs; + BOOST_FOREACH(const valtype& v, sigs1) + { + if (!v.empty()) + allsigs.insert(v); + } + BOOST_FOREACH(const valtype& v, sigs2) + { + if (!v.empty()) + allsigs.insert(v); + } + + // Build a map of pubkey -> signature by matching sigs to pubkeys: + assert(vSolutions.size() > 1); + unsigned int nSigsRequired = vSolutions.front()[0]; + unsigned int nPubKeys = vSolutions.size()-2; + map sigs; + BOOST_FOREACH(const valtype& sig, allsigs) + { + for (unsigned int i = 0; i < nPubKeys; i++) + { + const valtype& pubkey = vSolutions[i+1]; + if (sigs.count(pubkey)) + continue; // Already got a sig for this pubkey + + if (CheckSig(sig, pubkey, scriptPubKey, txTo, nIn, 0)) + { + sigs[pubkey] = sig; + break; + } + } + } + // Now build a merged CScript: + unsigned int nSigsHave = 0; + CScript result; result << OP_0; // pop-one-too-many workaround + for (unsigned int i = 0; i < nPubKeys && nSigsHave < nSigsRequired; i++) + { + if (sigs.count(vSolutions[i+1])) + { + result << sigs[vSolutions[i+1]]; + ++nSigsHave; + } + } + // Fill any missing with OP_0: + for (unsigned int i = nSigsHave; i < nSigsRequired; i++) + result << OP_0; + + return result; +} + +static CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, + const txnouttype txType, const vector& vSolutions, + vector& sigs1, vector& sigs2) +{ + switch (txType) + { + case TX_NONSTANDARD: + // Don't know anything about this, assume bigger one is correct: + if (sigs1.size() >= sigs2.size()) + return PushAll(sigs1); + return PushAll(sigs2); + case TX_PUBKEY: + case TX_PUBKEYHASH: + // Signatures are bigger than placeholders or empty scripts: + if (sigs1.empty() || sigs1[0].empty()) + return PushAll(sigs2); + return PushAll(sigs1); + case TX_SCRIPTHASH: + if (sigs1.empty() || sigs1.back().empty()) + return PushAll(sigs2); + else if (sigs2.empty() || sigs2.back().empty()) + return PushAll(sigs1); + else + { + // Recur to combine: + valtype spk = sigs1.back(); + CScript pubKey2(spk.begin(), spk.end()); + + txnouttype txType2; + vector > vSolutions2; + Solver(pubKey2, txType2, vSolutions2); + sigs1.pop_back(); + sigs2.pop_back(); + CScript result = CombineSignatures(pubKey2, txTo, nIn, txType2, vSolutions2, sigs1, sigs2); + result << spk; + return result; + } + case TX_MULTISIG: + return CombineMultisig(scriptPubKey, txTo, nIn, vSolutions, sigs1, sigs2); + } + + return CScript(); +} + +CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, + const CScript& scriptSig1, const CScript& scriptSig2) +{ + txnouttype txType; + vector > vSolutions; + Solver(scriptPubKey, txType, vSolutions); + + vector stack1; + EvalScript(stack1, scriptSig1, CTransaction(), 0, 0); + vector stack2; + EvalScript(stack2, scriptSig2, CTransaction(), 0, 0); + + return CombineSignatures(scriptPubKey, txTo, nIn, txType, vSolutions, stack1, stack2); +} + +unsigned int CScript::GetSigOpCount(bool fAccurate) const +{ + unsigned int n = 0; + const_iterator pc = begin(); + opcodetype lastOpcode = OP_INVALIDOPCODE; + while (pc < end()) + { + opcodetype opcode; + if (!GetOp(pc, opcode)) + break; + if (opcode == OP_CHECKSIG || opcode == OP_CHECKSIGVERIFY) + n++; + else if (opcode == OP_CHECKMULTISIG || opcode == OP_CHECKMULTISIGVERIFY) + { + if (fAccurate && lastOpcode >= OP_1 && lastOpcode <= OP_16) + n += DecodeOP_N(lastOpcode); + else + n += 20; + } + lastOpcode = opcode; + } + return n; +} + +unsigned int CScript::GetSigOpCount(const CScript& scriptSig) const +{ + if (!IsPayToScriptHash()) + return GetSigOpCount(true); + + // This is a pay-to-script-hash scriptPubKey; + // get the last item that the scriptSig + // pushes onto the stack: + const_iterator pc = scriptSig.begin(); + vector data; + while (pc < scriptSig.end()) + { + opcodetype opcode; + if (!scriptSig.GetOp(pc, opcode, data)) + return 0; + if (opcode > OP_16) + return 0; + } + + /// ... and return its opcount: + CScript subscript(data.begin(), data.end()); + return subscript.GetSigOpCount(true); +} + +bool CScript::IsPayToScriptHash() const +{ + // Extra-fast test for pay-to-script-hash CScripts: + return (this->size() == 23 && + this->at(0) == OP_HASH160 && + this->at(1) == 0x14 && + this->at(22) == OP_EQUAL); +} + +class CScriptVisitor : public boost::static_visitor +{ +private: + CScript *script; +public: + CScriptVisitor(CScript *scriptin) { script = scriptin; } + + bool operator()(const CNoDestination &dest) const { + script->clear(); + return false; + } + + bool operator()(const CKeyID &keyID) const { + script->clear(); + *script << OP_DUP << OP_HASH160 << keyID << OP_EQUALVERIFY << OP_CHECKSIG; + return true; + } + + bool operator()(const CScriptID &scriptID) const { + script->clear(); + *script << OP_HASH160 << scriptID << OP_EQUAL; + return true; + } +}; + +void CScript::SetDestination(const CTxDestination& dest) +{ + boost::apply_visitor(CScriptVisitor(this), dest); +} + +void CScript::SetMultisig(int nRequired, const std::vector& keys) +{ + this->clear(); + + *this << EncodeOP_N(nRequired); + BOOST_FOREACH(const CKey& key, keys) + *this << key.GetPubKey(); + *this << EncodeOP_N(keys.size()) << OP_CHECKMULTISIG; +} diff --git a/src/script.h b/src/script.h new file mode 100644 index 0000000..fd73a28 --- /dev/null +++ b/src/script.h @@ -0,0 +1,606 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef H_curecoin_SCRIPT +#define H_curecoin_SCRIPT + +#include +#include + +#include +#include + +#include "keystore.h" +#include "bignum.h" + +typedef std::vector valtype; + +class CTransaction; + +/** Signature hash types/flags */ +enum +{ + SIGHASH_ALL = 1, + SIGHASH_NONE = 2, + SIGHASH_SINGLE = 3, + SIGHASH_ANYONECANPAY = 0x80, +}; + + +enum txnouttype +{ + TX_NONSTANDARD, + // 'standard' transaction types: + TX_PUBKEY, + TX_PUBKEYHASH, + TX_SCRIPTHASH, + TX_MULTISIG, +}; + +class CNoDestination { +public: + friend bool operator==(const CNoDestination &a, const CNoDestination &b) { return true; } + friend bool operator<(const CNoDestination &a, const CNoDestination &b) { return true; } +}; + +/** A txout script template with a specific destination. It is either: + * * CNoDestination: no destination set + * * CKeyID: TX_PUBKEYHASH destination + * * CScriptID: TX_SCRIPTHASH destination + * A CTxDestination is the internal data type encoded in a CcurecoinAddress + */ +typedef boost::variant CTxDestination; + +const char* GetTxnOutputType(txnouttype t); + +/** Script opcodes */ +enum opcodetype +{ + // push value + OP_0 = 0x00, + OP_FALSE = OP_0, + OP_PUSHDATA1 = 0x4c, + OP_PUSHDATA2 = 0x4d, + OP_PUSHDATA4 = 0x4e, + OP_1NEGATE = 0x4f, + OP_RESERVED = 0x50, + OP_1 = 0x51, + OP_TRUE=OP_1, + OP_2 = 0x52, + OP_3 = 0x53, + OP_4 = 0x54, + OP_5 = 0x55, + OP_6 = 0x56, + OP_7 = 0x57, + OP_8 = 0x58, + OP_9 = 0x59, + OP_10 = 0x5a, + OP_11 = 0x5b, + OP_12 = 0x5c, + OP_13 = 0x5d, + OP_14 = 0x5e, + OP_15 = 0x5f, + OP_16 = 0x60, + + // control + OP_NOP = 0x61, + OP_VER = 0x62, + OP_IF = 0x63, + OP_NOTIF = 0x64, + OP_VERIF = 0x65, + OP_VERNOTIF = 0x66, + OP_ELSE = 0x67, + OP_ENDIF = 0x68, + OP_VERIFY = 0x69, + OP_RETURN = 0x6a, + + // stack ops + OP_TOALTSTACK = 0x6b, + OP_FROMALTSTACK = 0x6c, + OP_2DROP = 0x6d, + OP_2DUP = 0x6e, + OP_3DUP = 0x6f, + OP_2OVER = 0x70, + OP_2ROT = 0x71, + OP_2SWAP = 0x72, + OP_IFDUP = 0x73, + OP_DEPTH = 0x74, + OP_DROP = 0x75, + OP_DUP = 0x76, + OP_NIP = 0x77, + OP_OVER = 0x78, + OP_PICK = 0x79, + OP_ROLL = 0x7a, + OP_ROT = 0x7b, + OP_SWAP = 0x7c, + OP_TUCK = 0x7d, + + // splice ops + OP_CAT = 0x7e, + OP_SUBSTR = 0x7f, + OP_LEFT = 0x80, + OP_RIGHT = 0x81, + OP_SIZE = 0x82, + + // bit logic + OP_INVERT = 0x83, + OP_AND = 0x84, + OP_OR = 0x85, + OP_XOR = 0x86, + OP_EQUAL = 0x87, + OP_EQUALVERIFY = 0x88, + OP_RESERVED1 = 0x89, + OP_RESERVED2 = 0x8a, + + // numeric + OP_1ADD = 0x8b, + OP_1SUB = 0x8c, + OP_2MUL = 0x8d, + OP_2DIV = 0x8e, + OP_NEGATE = 0x8f, + OP_ABS = 0x90, + OP_NOT = 0x91, + OP_0NOTEQUAL = 0x92, + + OP_ADD = 0x93, + OP_SUB = 0x94, + OP_MUL = 0x95, + OP_DIV = 0x96, + OP_MOD = 0x97, + OP_LSHIFT = 0x98, + OP_RSHIFT = 0x99, + + OP_BOOLAND = 0x9a, + OP_BOOLOR = 0x9b, + OP_NUMEQUAL = 0x9c, + OP_NUMEQUALVERIFY = 0x9d, + OP_NUMNOTEQUAL = 0x9e, + OP_LESSTHAN = 0x9f, + OP_GREATERTHAN = 0xa0, + OP_LESSTHANOREQUAL = 0xa1, + OP_GREATERTHANOREQUAL = 0xa2, + OP_MIN = 0xa3, + OP_MAX = 0xa4, + + OP_WITHIN = 0xa5, + + // crypto + OP_RIPEMD160 = 0xa6, + OP_SHA1 = 0xa7, + OP_SHA256 = 0xa8, + OP_HASH160 = 0xa9, + OP_HASH256 = 0xaa, + OP_CODESEPARATOR = 0xab, + OP_CHECKSIG = 0xac, + OP_CHECKSIGVERIFY = 0xad, + OP_CHECKMULTISIG = 0xae, + OP_CHECKMULTISIGVERIFY = 0xaf, + + // expansion + OP_NOP1 = 0xb0, + OP_NOP2 = 0xb1, + OP_NOP3 = 0xb2, + OP_NOP4 = 0xb3, + OP_NOP5 = 0xb4, + OP_NOP6 = 0xb5, + OP_NOP7 = 0xb6, + OP_NOP8 = 0xb7, + OP_NOP9 = 0xb8, + OP_NOP10 = 0xb9, + + + + // template matching params + OP_SMALLINTEGER = 0xfa, + OP_PUBKEYS = 0xfb, + OP_PUBKEYHASH = 0xfd, + OP_PUBKEY = 0xfe, + + OP_INVALIDOPCODE = 0xff, +}; + +const char* GetOpName(opcodetype opcode); + + + +inline std::string ValueString(const std::vector& vch) +{ + if (vch.size() <= 4) + return strprintf("%d", CBigNum(vch).getint()); + else + return HexStr(vch); +} + +inline std::string StackString(const std::vector >& vStack) +{ + std::string str; + BOOST_FOREACH(const std::vector& vch, vStack) + { + if (!str.empty()) + str += " "; + str += ValueString(vch); + } + return str; +} + + + + + + + + +/** Serialized script, used inside transaction inputs and outputs */ +class CScript : public std::vector +{ +protected: + CScript& push_int64(int64 n) + { + if (n == -1 || (n >= 1 && n <= 16)) + { + push_back(n + (OP_1 - 1)); + } + else + { + CBigNum bn(n); + *this << bn.getvch(); + } + return *this; + } + + CScript& push_uint64(uint64 n) + { + if (n >= 1 && n <= 16) + { + push_back(n + (OP_1 - 1)); + } + else + { + CBigNum bn(n); + *this << bn.getvch(); + } + return *this; + } + +public: + CScript() { } + CScript(const CScript& b) : std::vector(b.begin(), b.end()) { } + CScript(const_iterator pbegin, const_iterator pend) : std::vector(pbegin, pend) { } +#ifndef _MSC_VER + CScript(const unsigned char* pbegin, const unsigned char* pend) : std::vector(pbegin, pend) { } +#endif + + CScript& operator+=(const CScript& b) + { + insert(end(), b.begin(), b.end()); + return *this; + } + + friend CScript operator+(const CScript& a, const CScript& b) + { + CScript ret = a; + ret += b; + return ret; + } + + + //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(opcodetype b) { operator<<(b); } + explicit CScript(const uint256& b) { operator<<(b); } + explicit CScript(const CBigNum& b) { operator<<(b); } + explicit CScript(const std::vector& b) { operator<<(b); } + + + //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<<(opcodetype opcode) + { + if (opcode < 0 || opcode > 0xff) + throw std::runtime_error("CScript::operator<<() : invalid opcode"); + insert(end(), (unsigned char)opcode); + return *this; + } + + CScript& operator<<(const uint160& b) + { + insert(end(), sizeof(b)); + insert(end(), (unsigned char*)&b, (unsigned char*)&b + sizeof(b)); + return *this; + } + + CScript& operator<<(const uint256& b) + { + insert(end(), sizeof(b)); + insert(end(), (unsigned char*)&b, (unsigned char*)&b + sizeof(b)); + return *this; + } + + CScript& operator<<(const CPubKey& key) + { + std::vector vchKey = key.Raw(); + return (*this) << vchKey; + } + + CScript& operator<<(const CBigNum& b) + { + *this << b.getvch(); + return *this; + } + + CScript& operator<<(const std::vector& b) + { + if (b.size() < OP_PUSHDATA1) + { + insert(end(), (unsigned char)b.size()); + } + else if (b.size() <= 0xff) + { + insert(end(), OP_PUSHDATA1); + insert(end(), (unsigned char)b.size()); + } + else if (b.size() <= 0xffff) + { + insert(end(), OP_PUSHDATA2); + unsigned short nSize = b.size(); + insert(end(), (unsigned char*)&nSize, (unsigned char*)&nSize + sizeof(nSize)); + } + else + { + insert(end(), OP_PUSHDATA4); + unsigned int nSize = b.size(); + insert(end(), (unsigned char*)&nSize, (unsigned char*)&nSize + sizeof(nSize)); + } + insert(end(), b.begin(), b.end()); + return *this; + } + + CScript& operator<<(const CScript& b) + { + // I'm not sure if this should push the script or concatenate scripts. + // If there's ever a use for pushing a script onto a script, delete this member fn + assert(!"Warning: Pushing a CScript onto a CScript with << is probably not intended, use + to concatenate!"); + return *this; + } + + + bool GetOp(iterator& pc, opcodetype& opcodeRet, std::vector& vchRet) + { + // Wrapper so it can be called with either iterator or const_iterator + const_iterator pc2 = pc; + bool fRet = GetOp2(pc2, opcodeRet, &vchRet); + pc = begin() + (pc2 - begin()); + return fRet; + } + + bool GetOp(iterator& pc, opcodetype& opcodeRet) + { + const_iterator pc2 = pc; + bool fRet = GetOp2(pc2, opcodeRet, NULL); + pc = begin() + (pc2 - begin()); + return fRet; + } + + bool GetOp(const_iterator& pc, opcodetype& opcodeRet, std::vector& vchRet) const + { + return GetOp2(pc, opcodeRet, &vchRet); + } + + bool GetOp(const_iterator& pc, opcodetype& opcodeRet) const + { + return GetOp2(pc, opcodeRet, NULL); + } + + bool GetOp2(const_iterator& pc, opcodetype& opcodeRet, std::vector* pvchRet) const + { + opcodeRet = OP_INVALIDOPCODE; + if (pvchRet) + pvchRet->clear(); + if (pc >= end()) + return false; + + // Read instruction + if (end() - pc < 1) + return false; + unsigned int opcode = *pc++; + + // Immediate operand + if (opcode <= OP_PUSHDATA4) + { + unsigned int nSize; + if (opcode < OP_PUSHDATA1) + { + nSize = opcode; + } + else if (opcode == OP_PUSHDATA1) + { + if (end() - pc < 1) + return false; + nSize = *pc++; + } + else if (opcode == OP_PUSHDATA2) + { + if (end() - pc < 2) + return false; + nSize = 0; + memcpy(&nSize, &pc[0], 2); + pc += 2; + } + else if (opcode == OP_PUSHDATA4) + { + if (end() - pc < 4) + return false; + memcpy(&nSize, &pc[0], 4); + pc += 4; + } + if (end() - pc < 0 || (unsigned int)(end() - pc) < nSize) + return false; + if (pvchRet) + pvchRet->assign(pc, pc + nSize); + pc += nSize; + } + + opcodeRet = (opcodetype)opcode; + return true; + } + + // Encode/decode small integers: + static int DecodeOP_N(opcodetype opcode) + { + if (opcode == OP_0) + return 0; + assert(opcode >= OP_1 && opcode <= OP_16); + return (int)opcode - (int)(OP_1 - 1); + } + static opcodetype EncodeOP_N(int n) + { + assert(n >= 0 && n <= 16); + if (n == 0) + return OP_0; + return (opcodetype)(OP_1+n-1); + } + + int FindAndDelete(const CScript& b) + { + int nFound = 0; + if (b.empty()) + return nFound; + iterator pc = begin(); + opcodetype opcode; + do + { + while (end() - pc >= (long)b.size() && memcmp(&pc[0], &b[0], b.size()) == 0) + { + erase(pc, pc + b.size()); + ++nFound; + } + } + while (GetOp(pc, opcode)); + return nFound; + } + int Find(opcodetype op) const + { + int nFound = 0; + opcodetype opcode; + for (const_iterator pc = begin(); pc != end() && GetOp(pc, opcode);) + if (opcode == op) + ++nFound; + return nFound; + } + + // Pre-version-0.6, curecoin 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 + // ... OP_N CHECKMULTISIG ... + unsigned int GetSigOpCount(bool fAccurate) const; + + // Accurately count sigOps, including sigOps in + // pay-to-script-hash transactions: + unsigned int GetSigOpCount(const CScript& scriptSig) const; + + bool IsPayToScriptHash() const; + + // Called by CTransaction::IsStandard + bool IsPushOnly() const + { + const_iterator pc = begin(); + while (pc < end()) + { + opcodetype opcode; + if (!GetOp(pc, opcode)) + return false; + if (opcode > OP_16) + return false; + } + return true; + } + + + void SetDestination(const CTxDestination& address); + void SetMultisig(int nRequired, const std::vector& keys); + + + void PrintHex() const + { + printf("CScript(%s)\n", HexStr(begin(), end(), true).c_str()); + } + + std::string ToString(bool fShort=false) const + { + std::string str; + opcodetype opcode; + std::vector vch; + const_iterator pc = begin(); + while (pc < end()) + { + if (!str.empty()) + str += " "; + if (!GetOp(pc, opcode, vch)) + { + str += "[error]"; + return str; + } + if (0 <= opcode && opcode <= OP_PUSHDATA4) + str += fShort? ValueString(vch).substr(0, 10) : ValueString(vch); + else + str += GetOpName(opcode); + } + return str; + } + + void print() const + { + printf("%s\n", ToString().c_str()); + } + + CScriptID GetID() const + { + return CScriptID(Hash160(*this)); + } +}; + + + + + +bool EvalScript(std::vector >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, int nHashType); +bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector >& vSolutionsRet); +int ScriptSigArgsExpected(txnouttype t, const std::vector >& vSolutions); +bool IsStandard(const CScript& scriptPubKey); +bool IsMine(const CKeyStore& keystore, const CScript& scriptPubKey); +bool IsMine(const CKeyStore& keystore, const CTxDestination &dest); +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); + +// 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/serialize.h b/src/serialize.h new file mode 100644 index 0000000..04fa91c --- /dev/null +++ b/src/serialize.h @@ -0,0 +1,1141 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_SERIALIZE_H +#define curecoin_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); + } + + 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); + } + +#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 diff --git a/src/strlcpy.h b/src/strlcpy.h new file mode 100644 index 0000000..891e787 --- /dev/null +++ b/src/strlcpy.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 1998 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef curecoin_STRLCPY_H +#define curecoin_STRLCPY_H + +#include +#include + +/* + * Copy src to string dst of size siz. At most siz-1 characters + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + */ +inline size_t strlcpy(char *dst, const char *src, size_t siz) +{ + char *d = dst; + const char *s = src; + size_t n = siz; + + /* Copy as many bytes as will fit */ + if (n != 0) + { + while (--n != 0) + { + if ((*d++ = *s++) == '\0') + break; + } + } + + /* Not enough room in dst, add NUL and traverse rest of src */ + if (n == 0) + { + if (siz != 0) + *d = '\0'; /* NUL-terminate dst */ + while (*s++) + ; + } + + return(s - src - 1); /* count does not include NUL */ +} + +/* + * Appends src to string dst of size siz (unlike strncat, siz is the + * full size of dst, not space left). At most siz-1 characters + * will be copied. Always NUL terminates (unless siz <= strlen(dst)). + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. + */ +inline size_t strlcat(char *dst, const char *src, size_t siz) +{ + char *d = dst; + const char *s = src; + size_t n = siz; + size_t dlen; + + /* Find the end of dst and adjust bytes left but don't go past end */ + while (n-- != 0 && *d != '\0') + d++; + dlen = d - dst; + n = siz - dlen; + + if (n == 0) + return(dlen + strlen(s)); + while (*s != '\0') + { + if (n != 1) + { + *d++ = *s; + n--; + } + s++; + } + *d = '\0'; + + return(dlen + (s - src)); /* count does not include NUL */ +} +#endif diff --git a/src/sync.cpp b/src/sync.cpp new file mode 100644 index 0000000..e055688 --- /dev/null +++ b/src/sync.cpp @@ -0,0 +1,128 @@ +// Copyright (c) 2011-2012 The curecoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "sync.h" +#include "util.h" + +#include + +#ifdef DEBUG_LOCKCONTENTION +void PrintLockContention(const char* pszName, const char* pszFile, int nLine) +{ + printf("LOCKCONTENTION: %s\n", pszName); + printf("Locker: %s:%d\n", pszFile, nLine); +} +#endif /* DEBUG_LOCKCONTENTION */ + +#ifdef DEBUG_LOCKORDER +// +// Early deadlock detection. +// Problem being solved: +// Thread 1 locks A, then B, then C +// Thread 2 locks D, then C, then A +// --> may result in deadlock between the two threads, depending on when they run. +// Solution implemented here: +// Keep track of pairs of locks: (A before B), (A before C), etc. +// Complain if any thread tries to lock in a different order. +// + +struct CLockLocation +{ + CLockLocation(const char* pszName, const char* pszFile, int nLine) + { + mutexName = pszName; + sourceFile = pszFile; + sourceLine = nLine; + } + + std::string ToString() const + { + return mutexName+" "+sourceFile+":"+itostr(sourceLine); + } + +private: + std::string mutexName; + std::string sourceFile; + int sourceLine; +}; + +typedef std::vector< std::pair > LockStack; + +static boost::mutex dd_mutex; +static std::map, LockStack> lockorders; +static boost::thread_specific_ptr lockstack; + + +static void potential_deadlock_detected(const std::pair& mismatch, const LockStack& s1, const LockStack& s2) +{ + printf("POTENTIAL DEADLOCK DETECTED\n"); + printf("Previous lock order was:\n"); + BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)& i, s2) + { + if (i.first == mismatch.first) printf(" (1)"); + if (i.first == mismatch.second) printf(" (2)"); + printf(" %s\n", i.second.ToString().c_str()); + } + printf("Current lock order is:\n"); + BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)& i, s1) + { + if (i.first == mismatch.first) printf(" (1)"); + if (i.first == mismatch.second) printf(" (2)"); + printf(" %s\n", i.second.ToString().c_str()); + } +} + +static void push_lock(void* c, const CLockLocation& locklocation, bool fTry) +{ + if (lockstack.get() == NULL) + lockstack.reset(new LockStack); + + if (fDebug) printf("Locking: %s\n", locklocation.ToString().c_str()); + dd_mutex.lock(); + + (*lockstack).push_back(std::make_pair(c, locklocation)); + + if (!fTry) { + BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)& i, (*lockstack)) { + if (i.first == c) break; + + std::pair p1 = std::make_pair(i.first, c); + if (lockorders.count(p1)) + continue; + lockorders[p1] = (*lockstack); + + std::pair p2 = std::make_pair(c, i.first); + if (lockorders.count(p2)) + { + potential_deadlock_detected(p1, lockorders[p2], lockorders[p1]); + break; + } + } + } + dd_mutex.unlock(); +} + +static void pop_lock() +{ + if (fDebug) + { + const CLockLocation& locklocation = (*lockstack).rbegin()->second; + printf("Unlocked: %s\n", locklocation.ToString().c_str()); + } + dd_mutex.lock(); + (*lockstack).pop_back(); + dd_mutex.unlock(); +} + +void EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry) +{ + push_lock(cs, CLockLocation(pszName, pszFile, nLine), fTry); +} + +void LeaveCritical() +{ + pop_lock(); +} + +#endif /* DEBUG_LOCKORDER */ diff --git a/src/sync.h b/src/sync.h new file mode 100644 index 0000000..dfe1812 --- /dev/null +++ b/src/sync.h @@ -0,0 +1,212 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_SYNC_H +#define curecoin_SYNC_H + +#include +#include +#include +#include + + + + +/** Wrapped boost mutex: supports recursive locking, but no waiting */ +typedef boost::recursive_mutex CCriticalSection; + +/** Wrapped boost mutex: supports waiting but not recursive locking */ +typedef boost::mutex CWaitableCriticalSection; + +#ifdef DEBUG_LOCKORDER +void EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false); +void LeaveCritical(); +#else +void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) {} +void static inline LeaveCritical() {} +#endif + +#ifdef DEBUG_LOCKCONTENTION +void PrintLockContention(const char* pszName, const char* pszFile, int nLine); +#endif + +/** Wrapper around boost::unique_lock */ +template +class CMutexLock +{ +private: + boost::unique_lock lock; +public: + + void Enter(const char* pszName, const char* pszFile, int nLine) + { + if (!lock.owns_lock()) + { + EnterCritical(pszName, pszFile, nLine, (void*)(lock.mutex())); +#ifdef DEBUG_LOCKCONTENTION + if (!lock.try_lock()) + { + PrintLockContention(pszName, pszFile, nLine); +#endif + lock.lock(); +#ifdef DEBUG_LOCKCONTENTION + } +#endif + } + } + + void Leave() + { + if (lock.owns_lock()) + { + lock.unlock(); + LeaveCritical(); + } + } + + bool TryEnter(const char* pszName, const char* pszFile, int nLine) + { + if (!lock.owns_lock()) + { + EnterCritical(pszName, pszFile, nLine, (void*)(lock.mutex()), true); + lock.try_lock(); + if (!lock.owns_lock()) + LeaveCritical(); + } + return lock.owns_lock(); + } + + CMutexLock(Mutex& mutexIn, const char* pszName, const char* pszFile, int nLine, bool fTry = false) : lock(mutexIn, boost::defer_lock) + { + if (fTry) + TryEnter(pszName, pszFile, nLine); + else + Enter(pszName, pszFile, nLine); + } + + ~CMutexLock() + { + if (lock.owns_lock()) + LeaveCritical(); + } + + operator bool() + { + return lock.owns_lock(); + } + + boost::unique_lock &GetLock() + { + return lock; + } +}; + +typedef CMutexLock CCriticalBlock; + +#define LOCK(cs) CCriticalBlock criticalblock(cs, #cs, __FILE__, __LINE__) +#define LOCK2(cs1,cs2) CCriticalBlock criticalblock1(cs1, #cs1, __FILE__, __LINE__),criticalblock2(cs2, #cs2, __FILE__, __LINE__) +#define TRY_LOCK(cs,name) CCriticalBlock name(cs, #cs, __FILE__, __LINE__, true) + +#define ENTER_CRITICAL_SECTION(cs) \ + { \ + EnterCritical(#cs, __FILE__, __LINE__, (void*)(&cs)); \ + (cs).lock(); \ + } + +#define LEAVE_CRITICAL_SECTION(cs) \ + { \ + (cs).unlock(); \ + LeaveCritical(); \ + } + +class CSemaphore +{ +private: + boost::condition_variable condition; + boost::mutex mutex; + int value; + +public: + CSemaphore(int init) : value(init) {} + + void wait() { + boost::unique_lock lock(mutex); + while (value < 1) { + condition.wait(lock); + } + value--; + } + + bool try_wait() { + boost::unique_lock lock(mutex); + if (value < 1) + return false; + value--; + return true; + } + + void post() { + { + boost::unique_lock lock(mutex); + value++; + } + condition.notify_one(); + } +}; + +/** RAII-style semaphore lock */ +class CSemaphoreGrant +{ +private: + CSemaphore *sem; + bool fHaveGrant; + +public: + void Acquire() { + if (fHaveGrant) + return; + sem->wait(); + fHaveGrant = true; + } + + void Release() { + if (!fHaveGrant) + return; + sem->post(); + fHaveGrant = false; + } + + bool TryAcquire() { + if (!fHaveGrant && sem->try_wait()) + fHaveGrant = true; + return fHaveGrant; + } + + void MoveTo(CSemaphoreGrant &grant) { + grant.Release(); + grant.sem = sem; + grant.fHaveGrant = fHaveGrant; + sem = NULL; + fHaveGrant = false; + } + + CSemaphoreGrant() : sem(NULL), fHaveGrant(false) {} + + CSemaphoreGrant(CSemaphore &sema, bool fTry = false) : sem(&sema), fHaveGrant(false) { + if (fTry) + TryAcquire(); + else + Acquire(); + } + + ~CSemaphoreGrant() { + Release(); + } + + operator bool() { + return fHaveGrant; + } +}; +#endif + diff --git a/src/ui_interface.h b/src/ui_interface.h new file mode 100644 index 0000000..bee2ebb --- /dev/null +++ b/src/ui_interface.h @@ -0,0 +1,105 @@ +// Copyright (c) 2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_UI_INTERFACE_H +#define curecoin_UI_INTERFACE_H + +#include +#include "util.h" // for int64 +#include +#include + +class CBasicKeyStore; +class CWallet; +class uint256; + +/** General change type (added, updated, removed). */ +enum ChangeType +{ + CT_NEW, + CT_UPDATED, + CT_DELETED +}; + +/** Signals for UI communication. */ +class CClientUIInterface +{ +public: + /** Flags for CClientUIInterface::ThreadSafeMessageBox */ + enum MessageBoxFlags + { + YES = 0x00000002, + OK = 0x00000004, + NO = 0x00000008, + YES_NO = (YES|NO), + CANCEL = 0x00000010, + APPLY = 0x00000020, + CLOSE = 0x00000040, + OK_DEFAULT = 0x00000000, + YES_DEFAULT = 0x00000000, + NO_DEFAULT = 0x00000080, + CANCEL_DEFAULT = 0x80000000, + ICON_EXCLAMATION = 0x00000100, + ICON_HAND = 0x00000200, + ICON_WARNING = ICON_EXCLAMATION, + ICON_ERROR = ICON_HAND, + ICON_QUESTION = 0x00000400, + ICON_INFORMATION = 0x00000800, + ICON_STOP = ICON_HAND, + ICON_ASTERISK = ICON_INFORMATION, + ICON_MASK = (0x00000100|0x00000200|0x00000400|0x00000800), + FORWARD = 0x00001000, + BACKWARD = 0x00002000, + RESET = 0x00004000, + HELP = 0x00008000, + MORE = 0x00010000, + SETUP = 0x00020000, + // Force blocking, modal message box dialog (not just OS notification) + MODAL = 0x00040000 + }; + + /** Show message box. */ + boost::signals2::signal ThreadSafeMessageBox; + + /** Ask the user whether they want to pay a fee or not. */ + boost::signals2::signal > ThreadSafeAskFee; + + /** Handle a URL passed at the command line. */ + boost::signals2::signal ThreadSafeHandleURI; + + /** Progress message during initialization. */ + boost::signals2::signal InitMessage; + + /** Initiate client shutdown. */ + boost::signals2::signal QueueShutdown; + + /** Translate a message to the native language of the user. */ + boost::signals2::signal Translate; + + /** Block chain changed. */ + boost::signals2::signal NotifyBlocksChanged; + + /** Number of network connections changed. */ + boost::signals2::signal NotifyNumConnectionsChanged; + + /** + * New, updated or cancelled alert. + * @note called with lock cs_mapAlerts held. + */ + boost::signals2::signal NotifyAlertChanged; +}; + +extern CClientUIInterface uiInterface; + +/** + * Translation function: Call Translate signal on UI interface, which returns a boost::optional result. + * If no translation slot is registered, nothing is returned, and simply return the input. + */ +inline std::string _(const char* psz) +{ + boost::optional rv = uiInterface.Translate(psz); + return rv ? (*rv) : psz; +} + +#endif diff --git a/src/uint256.h b/src/uint256.h new file mode 100644 index 0000000..6b9caba --- /dev/null +++ b/src/uint256.h @@ -0,0 +1,763 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_UINT256_H +#define curecoin_UINT256_H + +#include +#include +#include +#include +#include + +typedef long long int64; +typedef unsigned long long uint64; + + +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. + */ +template +class base_uint +{ +protected: + enum { WIDTH=BITS/32 }; + unsigned int pn[WIDTH]; +public: + + bool operator!() const + { + for (int i = 0; i < WIDTH; i++) + if (pn[i] != 0) + return false; + return true; + } + + const base_uint operator~() const + { + base_uint ret; + for (int i = 0; i < WIDTH; i++) + ret.pn[i] = ~pn[i]; + return ret; + } + + const base_uint operator-() const + { + base_uint ret; + for (int i = 0; i < WIDTH; i++) + ret.pn[i] = ~pn[i]; + ret++; + return ret; + } + + + base_uint& operator=(uint64 b) + { + pn[0] = (unsigned int)b; + pn[1] = (unsigned int)(b >> 32); + for (int i = 2; i < WIDTH; i++) + pn[i] = 0; + return *this; + } + + base_uint& operator^=(const base_uint& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] ^= b.pn[i]; + return *this; + } + + base_uint& operator&=(const base_uint& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] &= b.pn[i]; + return *this; + } + + base_uint& operator|=(const base_uint& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] |= b.pn[i]; + return *this; + } + + base_uint& operator^=(uint64 b) + { + pn[0] ^= (unsigned int)b; + pn[1] ^= (unsigned int)(b >> 32); + return *this; + } + + base_uint& operator|=(uint64 b) + { + pn[0] |= (unsigned int)b; + pn[1] |= (unsigned int)(b >> 32); + return *this; + } + + base_uint& operator<<=(unsigned int shift) + { + base_uint a(*this); + for (int i = 0; i < WIDTH; i++) + pn[i] = 0; + int k = shift / 32; + shift = shift % 32; + for (int i = 0; i < WIDTH; i++) + { + if (i+k+1 < WIDTH && shift != 0) + pn[i+k+1] |= (a.pn[i] >> (32-shift)); + if (i+k < WIDTH) + pn[i+k] |= (a.pn[i] << shift); + } + return *this; + } + + base_uint& operator>>=(unsigned int shift) + { + base_uint a(*this); + for (int i = 0; i < WIDTH; i++) + pn[i] = 0; + int k = shift / 32; + shift = shift % 32; + for (int i = 0; i < WIDTH; i++) + { + if (i-k-1 >= 0 && shift != 0) + pn[i-k-1] |= (a.pn[i] << (32-shift)); + if (i-k >= 0) + pn[i-k] |= (a.pn[i] >> shift); + } + return *this; + } + + base_uint& operator+=(const base_uint& b) + { + uint64 carry = 0; + for (int i = 0; i < WIDTH; i++) + { + uint64 n = carry + pn[i] + b.pn[i]; + pn[i] = n & 0xffffffff; + carry = n >> 32; + } + return *this; + } + + base_uint& operator-=(const base_uint& b) + { + *this += -b; + return *this; + } + + base_uint& operator+=(uint64 b64) + { + base_uint b; + b = b64; + *this += b; + return *this; + } + + base_uint& operator-=(uint64 b64) + { + base_uint b; + b = b64; + *this += -b; + return *this; + } + + + base_uint& operator++() + { + // prefix operator + int i = 0; + while (++pn[i] == 0 && i < WIDTH-1) + i++; + return *this; + } + + const base_uint operator++(int) + { + // postfix operator + const base_uint ret = *this; + ++(*this); + return ret; + } + + base_uint& operator--() + { + // prefix operator + int i = 0; + while (--pn[i] == -1 && i < WIDTH-1) + i++; + return *this; + } + + const base_uint operator--(int) + { + // postfix operator + const base_uint ret = *this; + --(*this); + return ret; + } + + + friend inline bool operator<(const base_uint& a, const base_uint& b) + { + for (int i = base_uint::WIDTH-1; i >= 0; i--) + { + if (a.pn[i] < b.pn[i]) + return true; + else if (a.pn[i] > b.pn[i]) + return false; + } + return false; + } + + friend inline bool operator<=(const base_uint& a, const base_uint& b) + { + for (int i = base_uint::WIDTH-1; i >= 0; i--) + { + if (a.pn[i] < b.pn[i]) + return true; + else if (a.pn[i] > b.pn[i]) + return false; + } + return true; + } + + friend inline bool operator>(const base_uint& a, const base_uint& b) + { + for (int i = base_uint::WIDTH-1; i >= 0; i--) + { + if (a.pn[i] > b.pn[i]) + return true; + else if (a.pn[i] < b.pn[i]) + return false; + } + return false; + } + + friend inline bool operator>=(const base_uint& a, const base_uint& b) + { + for (int i = base_uint::WIDTH-1; i >= 0; i--) + { + if (a.pn[i] > b.pn[i]) + return true; + else if (a.pn[i] < b.pn[i]) + return false; + } + return true; + } + + friend inline bool operator==(const base_uint& a, const base_uint& b) + { + for (int i = 0; i < base_uint::WIDTH; i++) + if (a.pn[i] != b.pn[i]) + return false; + return true; + } + + friend inline bool operator==(const base_uint& a, uint64 b) + { + if (a.pn[0] != (unsigned int)b) + return false; + if (a.pn[1] != (unsigned int)(b >> 32)) + return false; + for (int i = 2; i < base_uint::WIDTH; i++) + if (a.pn[i] != 0) + return false; + return true; + } + + friend inline bool operator!=(const base_uint& a, const base_uint& b) + { + return (!(a == b)); + } + + friend inline bool operator!=(const base_uint& a, uint64 b) + { + return (!(a == b)); + } + + + + std::string GetHex() const + { + char psz[sizeof(pn)*2 + 1]; + for (unsigned int i = 0; i < sizeof(pn); i++) + sprintf(psz + i*2, "%02x", ((unsigned char*)pn)[sizeof(pn) - i - 1]); + return std::string(psz, psz + sizeof(pn)*2); + } + + void SetHex(const char* psz) + { + for (int i = 0; i < WIDTH; i++) + pn[i] = 0; + + // skip leading spaces + while (isspace(*psz)) + psz++; + + // skip 0x + if (psz[0] == '0' && tolower(psz[1]) == 'x') + psz += 2; + + // hex string to uint + static const unsigned char phexdigit[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0 }; + const char* pbegin = psz; + while (phexdigit[(unsigned char)*psz] || *psz == '0') + psz++; + psz--; + unsigned char* p1 = (unsigned char*)pn; + unsigned char* pend = p1 + WIDTH * 4; + while (psz >= pbegin && p1 < pend) + { + *p1 = phexdigit[(unsigned char)*psz--]; + if (psz >= pbegin) + { + *p1 |= (phexdigit[(unsigned char)*psz--] << 4); + p1++; + } + } + } + + void SetHex(const std::string& str) + { + SetHex(str.c_str()); + } + + std::string ToString() const + { + return (GetHex()); + } + + unsigned char* begin() + { + return (unsigned char*)&pn[0]; + } + + unsigned char* end() + { + return (unsigned char*)&pn[WIDTH]; + } + + unsigned int size() + { + return sizeof(pn); + } + + uint64 Get64(int n=0) const + { + return pn[2*n] | (uint64)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 inline int Testuint256AdHoc(std::vector vArg); +}; + +typedef base_uint<160> base_uint160; +typedef base_uint<256> base_uint256; + + + +// +// uint160 and uint256 could be implemented as templates, but to keep +// compile errors and debugging cleaner, they're copy and pasted. +// + + + +////////////////////////////////////////////////////////////////////////////// +// +// uint160 +// + +/** 160-bit unsigned integer */ +class uint160 : public base_uint160 +{ +public: + typedef base_uint160 basetype; + + uint160() + { + for (int i = 0; i < WIDTH; i++) + pn[i] = 0; + } + + uint160(const basetype& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] = b.pn[i]; + } + + uint160& operator=(const basetype& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] = b.pn[i]; + return *this; + } + + uint160(uint64 b) + { + pn[0] = (unsigned int)b; + pn[1] = (unsigned int)(b >> 32); + for (int i = 2; i < WIDTH; i++) + pn[i] = 0; + } + + uint160& operator=(uint64 b) + { + pn[0] = (unsigned int)b; + pn[1] = (unsigned int)(b >> 32); + for (int i = 2; i < WIDTH; i++) + pn[i] = 0; + return *this; + } + + explicit uint160(const std::string& str) + { + SetHex(str); + } + + explicit uint160(const std::vector& vch) + { + if (vch.size() == sizeof(pn)) + memcpy(pn, &vch[0], sizeof(pn)); + else + *this = 0; + } +}; + +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 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; } +inline const uint160 operator>>(const uint160& a, unsigned int shift) { return uint160(a) >>= shift; } + +inline const uint160 operator^(const base_uint160& a, const base_uint160& b) { return uint160(a) ^= b; } +inline const uint160 operator&(const base_uint160& a, const base_uint160& b) { return uint160(a) &= b; } +inline const uint160 operator|(const base_uint160& a, const base_uint160& b) { return uint160(a) |= b; } +inline const uint160 operator+(const base_uint160& a, const base_uint160& b) { return uint160(a) += b; } +inline const uint160 operator-(const base_uint160& a, const base_uint160& b) { return uint160(a) -= b; } + +inline bool operator<(const base_uint160& a, const uint160& b) { return (base_uint160)a < (base_uint160)b; } +inline bool operator<=(const base_uint160& a, const uint160& b) { return (base_uint160)a <= (base_uint160)b; } +inline bool operator>(const base_uint160& a, const uint160& b) { return (base_uint160)a > (base_uint160)b; } +inline bool operator>=(const base_uint160& a, const uint160& b) { return (base_uint160)a >= (base_uint160)b; } +inline bool operator==(const base_uint160& a, const uint160& b) { return (base_uint160)a == (base_uint160)b; } +inline bool operator!=(const base_uint160& a, const uint160& b) { return (base_uint160)a != (base_uint160)b; } +inline const uint160 operator^(const base_uint160& a, const uint160& b) { return (base_uint160)a ^ (base_uint160)b; } +inline const uint160 operator&(const base_uint160& a, const uint160& b) { return (base_uint160)a & (base_uint160)b; } +inline const uint160 operator|(const base_uint160& a, const uint160& b) { return (base_uint160)a | (base_uint160)b; } +inline const uint160 operator+(const base_uint160& a, const uint160& b) { return (base_uint160)a + (base_uint160)b; } +inline const uint160 operator-(const base_uint160& a, const uint160& b) { return (base_uint160)a - (base_uint160)b; } + +inline bool operator<(const uint160& a, const base_uint160& b) { return (base_uint160)a < (base_uint160)b; } +inline bool operator<=(const uint160& a, const base_uint160& b) { return (base_uint160)a <= (base_uint160)b; } +inline bool operator>(const uint160& a, const base_uint160& b) { return (base_uint160)a > (base_uint160)b; } +inline bool operator>=(const uint160& a, const base_uint160& b) { return (base_uint160)a >= (base_uint160)b; } +inline bool operator==(const uint160& a, const base_uint160& b) { return (base_uint160)a == (base_uint160)b; } +inline bool operator!=(const uint160& a, const base_uint160& b) { return (base_uint160)a != (base_uint160)b; } +inline const uint160 operator^(const uint160& a, const base_uint160& b) { return (base_uint160)a ^ (base_uint160)b; } +inline const uint160 operator&(const uint160& a, const base_uint160& b) { return (base_uint160)a & (base_uint160)b; } +inline const uint160 operator|(const uint160& a, const base_uint160& b) { return (base_uint160)a | (base_uint160)b; } +inline const uint160 operator+(const uint160& a, const base_uint160& b) { return (base_uint160)a + (base_uint160)b; } +inline const uint160 operator-(const uint160& a, const base_uint160& b) { return (base_uint160)a - (base_uint160)b; } + +inline bool operator<(const uint160& a, const uint160& b) { return (base_uint160)a < (base_uint160)b; } +inline bool operator<=(const uint160& a, const uint160& b) { return (base_uint160)a <= (base_uint160)b; } +inline bool operator>(const uint160& a, const uint160& b) { return (base_uint160)a > (base_uint160)b; } +inline bool operator>=(const uint160& a, const uint160& b) { return (base_uint160)a >= (base_uint160)b; } +inline bool operator==(const uint160& a, const uint160& b) { return (base_uint160)a == (base_uint160)b; } +inline bool operator!=(const uint160& a, const uint160& b) { return (base_uint160)a != (base_uint160)b; } +inline const uint160 operator^(const uint160& a, const uint160& b) { return (base_uint160)a ^ (base_uint160)b; } +inline const uint160 operator&(const uint160& a, const uint160& b) { return (base_uint160)a & (base_uint160)b; } +inline const uint160 operator|(const uint160& a, const uint160& b) { return (base_uint160)a | (base_uint160)b; } +inline const uint160 operator+(const uint160& a, const uint160& b) { return (base_uint160)a + (base_uint160)b; } +inline const uint160 operator-(const uint160& a, const uint160& b) { return (base_uint160)a - (base_uint160)b; } + + + + + + +////////////////////////////////////////////////////////////////////////////// +// +// uint256 +// + +/** 256-bit unsigned integer */ +class uint256 : public base_uint256 +{ +public: + typedef base_uint256 basetype; + + uint256() + { + for (int i = 0; i < WIDTH; i++) + pn[i] = 0; + } + + uint256(const basetype& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] = b.pn[i]; + } + + uint256& operator=(const basetype& b) + { + for (int i = 0; i < WIDTH; i++) + pn[i] = b.pn[i]; + return *this; + } + + uint256(uint64 b) + { + pn[0] = (unsigned int)b; + pn[1] = (unsigned int)(b >> 32); + for (int i = 2; i < WIDTH; i++) + pn[i] = 0; + } + + uint256& operator=(uint64 b) + { + pn[0] = (unsigned int)b; + pn[1] = (unsigned int)(b >> 32); + for (int i = 2; i < WIDTH; i++) + pn[i] = 0; + return *this; + } + + explicit uint256(const std::string& str) + { + SetHex(str); + } + + explicit uint256(const std::vector& vch) + { + if (vch.size() == sizeof(pn)) + memcpy(pn, &vch[0], sizeof(pn)); + else + *this = 0; + } +}; + +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 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; } +inline const uint256 operator>>(const uint256& a, unsigned int shift) { return uint256(a) >>= shift; } + +inline const uint256 operator^(const base_uint256& a, const base_uint256& b) { return uint256(a) ^= b; } +inline const uint256 operator&(const base_uint256& a, const base_uint256& b) { return uint256(a) &= b; } +inline const uint256 operator|(const base_uint256& a, const base_uint256& b) { return uint256(a) |= b; } +inline const uint256 operator+(const base_uint256& a, const base_uint256& b) { return uint256(a) += b; } +inline const uint256 operator-(const base_uint256& a, const base_uint256& b) { return uint256(a) -= b; } + +inline bool operator<(const base_uint256& a, const uint256& b) { return (base_uint256)a < (base_uint256)b; } +inline bool operator<=(const base_uint256& a, const uint256& b) { return (base_uint256)a <= (base_uint256)b; } +inline bool operator>(const base_uint256& a, const uint256& b) { return (base_uint256)a > (base_uint256)b; } +inline bool operator>=(const base_uint256& a, const uint256& b) { return (base_uint256)a >= (base_uint256)b; } +inline bool operator==(const base_uint256& a, const uint256& b) { return (base_uint256)a == (base_uint256)b; } +inline bool operator!=(const base_uint256& a, const uint256& b) { return (base_uint256)a != (base_uint256)b; } +inline const uint256 operator^(const base_uint256& a, const uint256& b) { return (base_uint256)a ^ (base_uint256)b; } +inline const uint256 operator&(const base_uint256& a, const uint256& b) { return (base_uint256)a & (base_uint256)b; } +inline const uint256 operator|(const base_uint256& a, const uint256& b) { return (base_uint256)a | (base_uint256)b; } +inline const uint256 operator+(const base_uint256& a, const uint256& b) { return (base_uint256)a + (base_uint256)b; } +inline const uint256 operator-(const base_uint256& a, const uint256& b) { return (base_uint256)a - (base_uint256)b; } + +inline bool operator<(const uint256& a, const base_uint256& b) { return (base_uint256)a < (base_uint256)b; } +inline bool operator<=(const uint256& a, const base_uint256& b) { return (base_uint256)a <= (base_uint256)b; } +inline bool operator>(const uint256& a, const base_uint256& b) { return (base_uint256)a > (base_uint256)b; } +inline bool operator>=(const uint256& a, const base_uint256& b) { return (base_uint256)a >= (base_uint256)b; } +inline bool operator==(const uint256& a, const base_uint256& b) { return (base_uint256)a == (base_uint256)b; } +inline bool operator!=(const uint256& a, const base_uint256& b) { return (base_uint256)a != (base_uint256)b; } +inline const uint256 operator^(const uint256& a, const base_uint256& b) { return (base_uint256)a ^ (base_uint256)b; } +inline const uint256 operator&(const uint256& a, const base_uint256& b) { return (base_uint256)a & (base_uint256)b; } +inline const uint256 operator|(const uint256& a, const base_uint256& b) { return (base_uint256)a | (base_uint256)b; } +inline const uint256 operator+(const uint256& a, const base_uint256& b) { return (base_uint256)a + (base_uint256)b; } +inline const uint256 operator-(const uint256& a, const base_uint256& b) { return (base_uint256)a - (base_uint256)b; } + +inline bool operator<(const uint256& a, const uint256& b) { return (base_uint256)a < (base_uint256)b; } +inline bool operator<=(const uint256& a, const uint256& b) { return (base_uint256)a <= (base_uint256)b; } +inline bool operator>(const uint256& a, const uint256& b) { return (base_uint256)a > (base_uint256)b; } +inline bool operator>=(const uint256& a, const uint256& b) { return (base_uint256)a >= (base_uint256)b; } +inline bool operator==(const uint256& a, const uint256& b) { return (base_uint256)a == (base_uint256)b; } +inline bool operator!=(const uint256& a, const uint256& b) { return (base_uint256)a != (base_uint256)b; } +inline const uint256 operator^(const uint256& a, const uint256& b) { return (base_uint256)a ^ (base_uint256)b; } +inline const uint256 operator&(const uint256& a, const uint256& b) { return (base_uint256)a & (base_uint256)b; } +inline const uint256 operator|(const uint256& a, const uint256& b) { return (base_uint256)a | (base_uint256)b; } +inline const uint256 operator+(const uint256& a, const uint256& b) { return (base_uint256)a + (base_uint256)b; } +inline const uint256 operator-(const uint256& a, const uint256& b) { return (base_uint256)a - (base_uint256)b; } + + + + + + + + + + +#ifdef TEST_UINT256 + +inline int Testuint256AdHoc(std::vector vArg) +{ + uint256 g(0); + + + printf("%s\n", g.ToString().c_str()); + g--; printf("g--\n"); + printf("%s\n", g.ToString().c_str()); + g--; printf("g--\n"); + printf("%s\n", g.ToString().c_str()); + g++; printf("g++\n"); + printf("%s\n", g.ToString().c_str()); + g++; printf("g++\n"); + printf("%s\n", g.ToString().c_str()); + g++; printf("g++\n"); + printf("%s\n", g.ToString().c_str()); + g++; printf("g++\n"); + printf("%s\n", g.ToString().c_str()); + + + + uint256 a(7); + printf("a=7\n"); + printf("%s\n", a.ToString().c_str()); + + uint256 b; + printf("b undefined\n"); + printf("%s\n", b.ToString().c_str()); + int c = 3; + + a = c; + a.pn[3] = 15; + printf("%s\n", a.ToString().c_str()); + uint256 k(c); + + a = 5; + a.pn[3] = 15; + printf("%s\n", a.ToString().c_str()); + b = 1; + b <<= 52; + + a |= b; + + a ^= 0x500; + + printf("a %s\n", a.ToString().c_str()); + + a = a | b | (uint256)0x1000; + + + printf("a %s\n", a.ToString().c_str()); + printf("b %s\n", b.ToString().c_str()); + + a = 0xfffffffe; + a.pn[4] = 9; + + printf("%s\n", a.ToString().c_str()); + a++; + printf("%s\n", a.ToString().c_str()); + a++; + printf("%s\n", a.ToString().c_str()); + a++; + printf("%s\n", a.ToString().c_str()); + a++; + printf("%s\n", a.ToString().c_str()); + + a--; + printf("%s\n", a.ToString().c_str()); + a--; + printf("%s\n", a.ToString().c_str()); + a--; + printf("%s\n", a.ToString().c_str()); + uint256 d = a--; + printf("%s\n", d.ToString().c_str()); + printf("%s\n", a.ToString().c_str()); + a--; + printf("%s\n", a.ToString().c_str()); + a--; + printf("%s\n", a.ToString().c_str()); + + d = a; + + printf("%s\n", d.ToString().c_str()); + for (int i = uint256::WIDTH-1; i >= 0; i--) printf("%08x", d.pn[i]); printf("\n"); + + uint256 neg = d; + neg = ~neg; + printf("%s\n", neg.ToString().c_str()); + + + uint256 e = uint256("0xABCDEF123abcdef12345678909832180000011111111"); + printf("\n"); + printf("%s\n", e.ToString().c_str()); + + + printf("\n"); + uint256 x1 = uint256("0xABCDEF123abcdef12345678909832180000011111111"); + uint256 x2; + printf("%s\n", x1.ToString().c_str()); + for (int i = 0; i < 270; i += 4) + { + x2 = x1 << i; + printf("%s\n", x2.ToString().c_str()); + } + + printf("\n"); + printf("%s\n", x1.ToString().c_str()); + for (int i = 0; i < 270; i += 4) + { + x2 = x1; + x2 >>= i; + printf("%s\n", x2.ToString().c_str()); + } + + + for (int i = 0; i < 100; i++) + { + uint256 k = (~uint256(0) >> i); + printf("%s\n", k.ToString().c_str()); + } + + for (int i = 0; i < 100; i++) + { + uint256 k = (~uint256(0) << i); + printf("%s\n", k.ToString().c_str()); + } + + return (0); +} + +#endif + +#endif diff --git a/src/util.cpp b/src/util.cpp new file mode 100644 index 0000000..3e370c5 --- /dev/null +++ b/src/util.cpp @@ -0,0 +1,1349 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// 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 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 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; +} + + +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; + 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 = "curecoin"; +#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\curecoin + // Windows >= Vista: C:\Users\Username\AppData\Roaming\curecoin + // Mac: ~/Library/Application Support/curecoin + // Unix: ~/.curecoin +#ifdef WIN32 + // Windows + return GetSpecialFolderPath(CSIDL_APPDATA) / "curecoin"; +#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 / "curecoin"; +#else + // Unix + return pathRet / ".curecoin"; +#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", "curecoin.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 curecoin.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 curecoin.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", "curecoind.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 curecoin will not work properly."); + strMiscWarning = strMessage; + printf("*** %s\n", strMessage.c_str()); + uiInterface.ThreadSafeMessageBox(strMessage+" ", string("curecoin"), 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; +} diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..f1dcc27 --- /dev/null +++ b/src/util.h @@ -0,0 +1,630 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_UTIL_H +#define curecoin_UTIL_H + +#include "uint256.h" + +#ifndef WIN32 +#include +#include +#include +#else +typedef int pid_t; /* define for Windows compatibility */ +#endif +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "netbase.h" // for AddTimeData + +typedef long long int64; +typedef unsigned long long uint64; + +static const int64 COIN = 1000000; +static const int64 CENT = 10000; + +#define loop for (;;) +#define BEGIN(a) ((char*)&(a)) +#define END(a) ((char*)&((&(a))[1])) +#define UBEGIN(a) ((unsigned char*)&(a)) +#define UEND(a) ((unsigned char*)&((&(a))[1])) +#define ARRAYLEN(array) (sizeof(array)/sizeof((array)[0])) + +#define UVOIDBEGIN(a) ((void*)&(a)) +#define CVOIDBEGIN(a) ((const void*)&(a)) +#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) \ +{ \ + LogStackTrace(); \ + throw (exception); \ +} +void LogStackTrace(); +#endif + + +/* Format characters for (s)size_t and ptrdiff_t */ +#if defined(_MSC_VER) || defined(__MSVCRT__) + /* (s)size_t and ptrdiff_t have the same size specifier in MSVC: + http://msdn.microsoft.com/en-us/library/tcxf1dw6%28v=vs.100%29.aspx + */ + #define PRIszx "Ix" + #define PRIszu "Iu" + #define PRIszd "Id" + #define PRIpdx "Ix" + #define PRIpdu "Iu" + #define PRIpdd "Id" +#else /* C99 standard */ + #define PRIszx "zx" + #define PRIszu "zu" + #define PRIszd "zd" + #define PRIpdx "tx" + #define PRIpdu "tu" + #define PRIpdd "td" +#endif + +// This is needed because the foreach macro can't get over the comma in pair +#define PAIRTYPE(t1, t2) std::pair + +// Align by increasing pointer, must have extra space at end of buffer +template +T* alignup(T* p) +{ + union + { + T* ptr; + size_t n; + } u; + u.ptr = p; + u.n = (u.n + (nBytes-1)) & ~(nBytes-1); + return u.ptr; +} + +#ifdef WIN32 +#define MSG_NOSIGNAL 0 +#define MSG_DONTWAIT 0 + +#ifndef S_IRUSR +#define S_IRUSR 0400 +#define S_IWUSR 0200 +#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 + +/* 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. + */ +#ifdef __GNUC__ +#define ATTR_WARN_PRINTF(X,Y) __attribute__((format(printf,X,Y))) +#else +#define ATTR_WARN_PRINTF(X,Y) +#endif + + + + + + + + +extern std::map mapArgs; +extern std::map > mapMultiArgs; +extern bool fDebug; +extern bool fDebugNet; +extern bool fPrintToConsole; +extern bool fPrintToDebugger; +extern bool fRequestShutdown; +extern bool fShutdown; +extern bool fDaemon; +extern bool fServer; +extern bool fCommandLine; +extern std::string strMiscWarning; +extern bool fTestNet; +extern bool fNoListen; +extern bool fLogTimestamps; +extern bool fReopenDebugLog; + +void RandAddSeed(); +void RandAddSeedPerfmon(); +int ATTR_WARN_PRINTF(1,2) OutputDebugStringF(const char* pszFormat, ...); + +/* + Rationale for the real_strprintf / strprintf construction: + It is not allowed to use va_start with a pass-by-reference argument. + (C++ standard, 18.7, paragraph 3). Use a dummy argument to work around this, and use a + macro to keep similar semantics. +*/ + +/** Overload strprintf for char*, so that GCC format type warnings can be given */ +std::string ATTR_WARN_PRINTF(1,3) real_strprintf(const char *format, int dummy, ...); +/** Overload strprintf for std::string, to be able to use it with _ (translation). + * This will not support GCC format type warnings (-Wformat) so be careful. + */ +std::string real_strprintf(const std::string &format, int dummy, ...); +#define strprintf(format, ...) real_strprintf(format, 0, __VA_ARGS__) +std::string vstrprintf(const char *format, va_list ap); + +bool ATTR_WARN_PRINTF(1,2) error(const char *format, ...); + +/* Redefine printf so that it directs output to debug.log + * + * Do this *after* defining the other printf-like functions, because otherwise the + * __attribute__((format(printf,X,Y))) gets expanded to __attribute__((format(OutputDebugStringF,X,Y))) + * which confuses gcc. + */ +#define printf OutputDebugStringF + +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::vector ParseHex(const char* psz); +std::vector ParseHex(const std::string& str); +bool IsHex(const std::string& str); +std::vector DecodeBase64(const char* p, bool* pfInvalid = NULL); +std::string DecodeBase64(const std::string& str); +std::string EncodeBase64(const unsigned char* pch, size_t len); +std::string EncodeBase64(const std::string& str); +std::vector DecodeBase32(const char* p, bool* pfInvalid = NULL); +std::string DecodeBase32(const std::string& str); +std::string EncodeBase32(const unsigned char* pch, size_t len); +std::string EncodeBase32(const std::string& str); +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(); +void CreatePidFile(const boost::filesystem::path &path, pid_t pid); +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); +uint256 GetRandHash(); +int64 GetTime(); +void SetMockTime(int64 nMockTimeIn); +int64 GetAdjustedTime(); +std::string FormatFullVersion(); +std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector& comments); +void AddTimeData(const CNetAddr& ip, int64 nTime); +void runCommand(std::string strCommand); + + + + + + + + + +inline std::string i64tostr(int64 n) +{ + return strprintf("%"PRI64d, n); +} + +inline std::string itostr(int n) +{ + return strprintf("%d", n); +} + +inline int64 atoi64(const char* psz) +{ +#ifdef _MSC_VER + return _atoi64(psz); +#else + return strtoll(psz, NULL, 10); +#endif +} + +inline int64 atoi64(const std::string& str) +{ +#ifdef _MSC_VER + return _atoi64(str.c_str()); +#else + return strtoll(str.c_str(), NULL, 10); +#endif +} + +inline int atoi(const std::string& str) +{ + return atoi(str.c_str()); +} + +inline int roundint(double d) +{ + return (int)(d > 0 ? d + 0.5 : d - 0.5); +} + +inline int64 roundint64(double d) +{ + return (int64)(d > 0 ? d + 0.5 : d - 0.5); +} + +inline int64 abs64(int64 n) +{ + return (n >= 0 ? n : -n); +} + +template +std::string HexStr(const T itbegin, const T itend, bool fSpaces=false) +{ + std::string rv; + static const char hexmap[16] = { '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; + rv.reserve((itend-itbegin)*3); + for(T it = itbegin; it < itend; ++it) + { + unsigned char val = (unsigned char)(*it); + if(fSpaces && it != itbegin) + rv.push_back(' '); + rv.push_back(hexmap[val>>4]); + rv.push_back(hexmap[val&15]); + } + + return rv; +} + +inline std::string HexStr(const std::vector& vch, bool fSpaces=false) +{ + return HexStr(vch.begin(), vch.end(), fSpaces); +} + +template +void PrintHex(const T pbegin, const T pend, const char* pszFormat="%s", bool fSpaces=true) +{ + printf(pszFormat, HexStr(pbegin, pend, fSpaces).c_str()); +} + +inline void PrintHex(const std::vector& vch, const char* pszFormat="%s", bool fSpaces=true) +{ + printf(pszFormat, HexStr(vch, fSpaces).c_str()); +} + +inline int64 GetPerformanceCounter() +{ + int64 nCounter = 0; +#ifdef WIN32 + QueryPerformanceCounter((LARGE_INTEGER*)&nCounter); +#else + timeval t; + gettimeofday(&t, NULL); + nCounter = (int64) t.tv_sec * 1000000 + t.tv_usec; +#endif + return nCounter; +} + +inline int64 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) +{ + time_t n = nTime; + struct tm* ptmTime = gmtime(&n); + char pszTime[200]; + strftime(pszTime, sizeof(pszTime), pszFormat, ptmTime); + return pszTime; +} + +static const std::string strTimestampFormat = "%Y-%m-%d %H:%M:%S UTC"; +inline std::string DateTimeStrFormat(int64 nTime) +{ + return DateTimeStrFormat(strTimestampFormat.c_str(), nTime); +} + + +template +void skipspaces(T& it) +{ + while (isspace(*it)) + ++it; +} + +inline bool IsSwitchChar(char c) +{ +#ifdef WIN32 + return c == '-' || c == '/'; +#else + return c == '-'; +#endif +} + +/** + * Return string argument or default value + * + * @param strArg Argument to get (e.g. "-foo") + * @param default (e.g. "1") + * @return command-line argument or default value + */ +std::string GetArg(const std::string& strArg, const std::string& strDefault); + +/** + * Return integer argument or default value + * + * @param strArg Argument to get (e.g. "-foo") + * @param default (e.g. 1) + * @return command-line argument (0 if invalid number) or default value + */ +int64 GetArg(const std::string& strArg, int64 nDefault); + +/** + * Return boolean argument or default value + * + * @param strArg Argument to get (e.g. "-foo") + * @param default (true or false) + * @return command-line argument or default value + */ +bool GetBoolArg(const std::string& strArg, bool fDefault=false); + +/** + * Set an argument if it doesn't already have a value + * + * @param strArg Argument to set (e.g. "-foo") + * @param strValue Value (e.g. "1") + * @return true if argument gets set, false if it already had a value + */ +bool SoftSetArg(const std::string& strArg, const std::string& strValue); + +/** + * Set a boolean argument if it doesn't already have a value + * + * @param strArg Argument to set (e.g. "-foo") + * @param fValue Value (e.g. false) + * @return true if argument gets set, false if it already had a value + */ +bool SoftSetBoolArg(const std::string& strArg, bool fValue); + + + + + + + + + +template +inline uint256 Hash(const T1 pbegin, const T1 pend) +{ + static unsigned char pblank[1]; + uint256 hash1; + SHA256((pbegin == pend ? pblank : (unsigned char*)&pbegin[0]), (pend - pbegin) * sizeof(pbegin[0]), (unsigned char*)&hash1); + uint256 hash2; + SHA256((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2); + return hash2; +} + +class CHashWriter +{ +private: + SHA256_CTX ctx; + +public: + int nType; + int nVersion; + + void Init() { + SHA256_Init(&ctx); + } + + CHashWriter(int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn) { + Init(); + } + + CHashWriter& write(const char *pch, size_t size) { + SHA256_Update(&ctx, pch, size); + return (*this); + } + + // invalidates the object + uint256 GetHash() { + uint256 hash1; + SHA256_Final((unsigned char*)&hash1, &ctx); + uint256 hash2; + SHA256((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2); + return hash2; + } + + template + CHashWriter& operator<<(const T& obj) { + // Serialize to this stream + ::Serialize(*this, obj, nType, nVersion); + return (*this); + } +}; + + +template +inline uint256 Hash(const T1 p1begin, const T1 p1end, + const T2 p2begin, const T2 p2end) +{ + static unsigned char pblank[1]; + uint256 hash1; + SHA256_CTX ctx; + SHA256_Init(&ctx); + SHA256_Update(&ctx, (p1begin == p1end ? pblank : (unsigned char*)&p1begin[0]), (p1end - p1begin) * sizeof(p1begin[0])); + SHA256_Update(&ctx, (p2begin == p2end ? pblank : (unsigned char*)&p2begin[0]), (p2end - p2begin) * sizeof(p2begin[0])); + SHA256_Final((unsigned char*)&hash1, &ctx); + uint256 hash2; + SHA256((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2); + return hash2; +} + +template +inline uint256 Hash(const T1 p1begin, const T1 p1end, + const T2 p2begin, const T2 p2end, + const T3 p3begin, const T3 p3end) +{ + static unsigned char pblank[1]; + uint256 hash1; + SHA256_CTX ctx; + SHA256_Init(&ctx); + SHA256_Update(&ctx, (p1begin == p1end ? pblank : (unsigned char*)&p1begin[0]), (p1end - p1begin) * sizeof(p1begin[0])); + SHA256_Update(&ctx, (p2begin == p2end ? pblank : (unsigned char*)&p2begin[0]), (p2end - p2begin) * sizeof(p2begin[0])); + SHA256_Update(&ctx, (p3begin == p3end ? pblank : (unsigned char*)&p3begin[0]), (p3end - p3begin) * sizeof(p3begin[0])); + SHA256_Final((unsigned char*)&hash1, &ctx); + uint256 hash2; + SHA256((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2); + return hash2; +} + +template +uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION) +{ + CHashWriter ss(nType, nVersion); + ss << obj; + return ss.GetHash(); +} + +inline uint160 Hash160(const std::vector& vch) +{ + uint256 hash1; + SHA256(&vch[0], vch.size(), (unsigned char*)&hash1); + uint160 hash2; + RIPEMD160((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2); + return hash2; +} + + +/** Median filter over a stream of values. + * Returns the median of the last N numbers + */ +template class CMedianFilter +{ +private: + std::vector vValues; + std::vector vSorted; + unsigned int nSize; +public: + CMedianFilter(unsigned int size, T initial_value): + nSize(size) + { + vValues.reserve(size); + vValues.push_back(initial_value); + vSorted = vValues; + } + + void input(T value) + { + if(vValues.size() == nSize) + { + vValues.erase(vValues.begin()); + } + vValues.push_back(value); + + 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(); + assert(size>0); + if(size & 1) // Odd number of elements + { + return vSorted[size/2]; + } + else // Even number of elements + { + return (vSorted[size/2-1] + vSorted[size/2]) / 2; + } + } + + int size() const + { + return vValues.size(); + } + + std::vector sorted () const + { + return vSorted; + } +}; + +bool NewThread(void(*pfn)(void*), void* parg); + +#ifdef WIN32 +inline void SetThreadPriority(int nPriority) +{ + SetThreadPriority(GetCurrentThread(), nPriority); +} +#else + +#define THREAD_PRIORITY_LOWEST PRIO_MAX +#define THREAD_PRIORITY_BELOW_NORMAL 2 +#define THREAD_PRIORITY_NORMAL 0 +#define THREAD_PRIORITY_ABOVE_NORMAL 0 + +inline void SetThreadPriority(int nPriority) +{ + // It's unclear if it's even possible to change thread priorities on Linux, + // but we really and truly need it for the generation threads. +#ifdef PRIO_THREAD + setpriority(PRIO_THREAD, 0, nPriority); +#else + setpriority(PRIO_PROCESS, 0, nPriority); +#endif +} + +inline void ExitThread(size_t nExitCode) +{ + pthread_exit((void*)nExitCode); +} +#endif + +void RenameThread(const char* name); + +inline uint32_t ByteReverse(uint32_t value) +{ + value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); + return (value<<16) | (value>>16); +} + +#endif + diff --git a/src/version.cpp b/src/version.cpp new file mode 100644 index 0000000..f94e7ff --- /dev/null +++ b/src/version.cpp @@ -0,0 +1,66 @@ +// Copyright (c) 2012 The curecoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include + +#include "version.h" + +// Name of client reported in the 'version' message. Report the same name +// for both curecoind and curecoin-qt, to make it harder for attackers to +// target servers or GUI users specifically. +const std::string CLIENT_NAME("curecoin"); + +// Client version number +#define CLIENT_VERSION_SUFFIX "-CUR" + + +// The following part of the code determines the CLIENT_BUILD variable. +// Several mechanisms are used for this: +// * first, if HAVE_BUILD_INFO is defined, include build.h, a file that is +// generated by the build environment, possibly containing the output +// of git-describe in a macro called BUILD_DESC +// * secondly, if this is an exported version of the code, GIT_ARCHIVE will +// be defined (automatically using the export-subst git attribute), and +// GIT_COMMIT will contain the commit id. +// * then, three options exist for determining CLIENT_BUILD: +// * if BUILD_DESC is defined, use that literally (output of git-describe) +// * if not, but GIT_COMMIT is defined, use v[maj].[min].[rev].[build]-g[commit] +// * otherwise, use v[maj].[min].[rev].[build]-unk +// finally CLIENT_VERSION_SUFFIX is added + +// First, include build.h if requested +#ifdef HAVE_BUILD_INFO +# include "build.h" +#endif + +// git will put "#define GIT_ARCHIVE 1" on the next line inside archives. +#define GIT_ARCHIVE 1 +#ifdef GIT_ARCHIVE +# define GIT_COMMIT_ID "99999" +# define GIT_COMMIT_DATE "$Format:%cD" +#endif + +#define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \ + "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-g" commit + +#define BUILD_DESC_FROM_UNKNOWN(maj,min,rev,build) \ + "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-unk" + +#ifndef BUILD_DESC +# ifdef GIT_COMMIT_ID +# define BUILD_DESC BUILD_DESC_FROM_COMMIT(DISPLAY_VERSION_MAJOR, DISPLAY_VERSION_MINOR, DISPLAY_VERSION_REVISION, DISPLAY_VERSION_BUILD, GIT_COMMIT_ID) +# else +# define BUILD_DESC BUILD_DESC_FROM_UNKNOWN(DISPLAY_VERSION_MAJOR, DISPLAY_VERSION_MINOR, DISPLAY_VERSION_REVISION, DISPLAY_VERSION_BUILD) +# endif +#endif + +#ifndef BUILD_DATE +# ifdef GIT_COMMIT_DATE +# define BUILD_DATE "July 4, 2013" +# else +# define BUILD_DATE __DATE__ ", " __TIME__ +# endif +#endif + +const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX); +const std::string CLIENT_DATE(BUILD_DATE); diff --git a/src/version.h b/src/version.h new file mode 100644 index 0000000..a655f3c --- /dev/null +++ b/src/version.h @@ -0,0 +1,52 @@ +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_VERSION_H +#define curecoin_VERSION_H + +#include "clientversion.h" +#include + +// +// client versioning +// + +static const int CLIENT_VERSION = + 1000000 * CLIENT_VERSION_MAJOR + + 10000 * CLIENT_VERSION_MINOR + + 100 * CLIENT_VERSION_REVISION + + 1 * CLIENT_VERSION_BUILD; + +extern const std::string CLIENT_NAME; +extern const std::string CLIENT_BUILD; +extern const std::string CLIENT_DATE; + +// +// network protocol versioning +// + +static const int PROTOCOL_VERSION = 60006; + +// earlier versions not supported as of Feb 2012, and are disconnected +static const int MIN_PROTO_VERSION = 209; + +// nTime field added to CAddress, starting with this version; +// if possible, avoid requesting addresses nodes older than this +static const int CADDR_TIME_VERSION = 31402; + +// only request blocks from nodes outside this range of versions +static const int NOBLKS_VERSION_START = 60002; +static const int NOBLKS_VERSION_END = 60004; + +// BIP 0031, pong message, is enabled for all versions AFTER this one +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 0 +#define DISPLAY_VERSION_MINOR 1 +#define DISPLAY_VERSION_REVISION 3 +#define DISPLAY_VERSION_BUILD 0 + +#endif diff --git a/src/wallet.cpp b/src/wallet.cpp new file mode 100644 index 0000000..ec9e262 --- /dev/null +++ b/src/wallet.cpp @@ -0,0 +1,2164 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "wallet.h" +#include "walletdb.h" +#include "crypter.h" +#include "ui_interface.h" +#include "base58.h" +#include "kernel.h" + +using namespace std; +extern int nStakeMaxAge; + + +////////////////////////////////////////////////////////////////////////////// +// +// mapWallet +// + +struct CompareValueOnly +{ + bool operator()(const pair >& t1, + const pair >& t2) const + { + return t1.first < t2.first; + } +}; + +CPubKey CWallet::GenerateNewKey() +{ + bool fCompressed = CanSupportFeature(FEATURE_COMPRPUBKEY); // default to compressed public keys if we want 0.6.0 wallets + + RandAddSeedPerfmon(); + CKey key; + key.MakeNewKey(fCompressed); + + // Compressed public keys were introduced in version 0.6.0 + if (fCompressed) + SetMinVersion(FEATURE_COMPRPUBKEY); + + if (!AddKey(key)) + throw std::runtime_error("CWallet::GenerateNewKey() : AddKey failed"); + return key.GetPubKey(); +} + +bool CWallet::AddKey(const CKey& key) +{ + if (!CCryptoKeyStore::AddKey(key)) + return false; + if (!fFileBacked) + return true; + if (!IsCrypted()) + return CWalletDB(strWalletFile).WriteKey(key.GetPubKey(), key.GetPrivKey()); + return true; +} + +bool CWallet::AddCryptedKey(const CPubKey &vchPubKey, const vector &vchCryptedSecret) +{ + if (!CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret)) + return false; + if (!fFileBacked) + return true; + { + LOCK(cs_wallet); + if (pwalletdbEncryption) + return pwalletdbEncryption->WriteCryptedKey(vchPubKey, vchCryptedSecret); + else + return CWalletDB(strWalletFile).WriteCryptedKey(vchPubKey, vchCryptedSecret); + } + return false; +} + +bool CWallet::AddCScript(const CScript& redeemScript) +{ + if (!CCryptoKeyStore::AddCScript(redeemScript)) + return false; + if (!fFileBacked) + return true; + return CWalletDB(strWalletFile).WriteCScript(Hash160(redeemScript), redeemScript); +} + +// ppcoin: optional setting to unlock wallet for block minting only; +// serves to disable the trivial sendmoney when OS account compromised +bool fWalletUnlockMintOnly = false; + +bool CWallet::Unlock(const SecureString& strWalletPassphrase) +{ + if (!IsLocked()) + return false; + + CCrypter crypter; + CKeyingMaterial vMasterKey; + + { + LOCK(cs_wallet); + BOOST_FOREACH(const MasterKeyMap::value_type& pMasterKey, mapMasterKeys) + { + if(!crypter.SetKeyFromPassphrase(strWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod)) + return false; + if (!crypter.Decrypt(pMasterKey.second.vchCryptedKey, vMasterKey)) + return false; + if (CCryptoKeyStore::Unlock(vMasterKey)) + return true; + } + } + return false; +} + +bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase) +{ + bool fWasLocked = IsLocked(); + + { + LOCK(cs_wallet); + Lock(); + + CCrypter crypter; + CKeyingMaterial vMasterKey; + BOOST_FOREACH(MasterKeyMap::value_type& pMasterKey, mapMasterKeys) + { + if(!crypter.SetKeyFromPassphrase(strOldWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod)) + return false; + if (!crypter.Decrypt(pMasterKey.second.vchCryptedKey, vMasterKey)) + return false; + if (CCryptoKeyStore::Unlock(vMasterKey)) + { + int64 nStartTime = GetTimeMillis(); + crypter.SetKeyFromPassphrase(strNewWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod); + pMasterKey.second.nDeriveIterations = pMasterKey.second.nDeriveIterations * (100 / ((double)(GetTimeMillis() - nStartTime))); + + nStartTime = GetTimeMillis(); + crypter.SetKeyFromPassphrase(strNewWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod); + pMasterKey.second.nDeriveIterations = (pMasterKey.second.nDeriveIterations + pMasterKey.second.nDeriveIterations * 100 / ((double)(GetTimeMillis() - nStartTime))) / 2; + + if (pMasterKey.second.nDeriveIterations < 25000) + pMasterKey.second.nDeriveIterations = 25000; + + printf("Wallet passphrase changed to an nDeriveIterations of %i\n", pMasterKey.second.nDeriveIterations); + + if (!crypter.SetKeyFromPassphrase(strNewWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod)) + return false; + if (!crypter.Encrypt(vMasterKey, pMasterKey.second.vchCryptedKey)) + return false; + CWalletDB(strWalletFile).WriteMasterKey(pMasterKey.first, pMasterKey.second); + if (fWasLocked) + Lock(); + return true; + } + } + } + + return false; +} + +void CWallet::SetBestChain(const CBlockLocator& loc) +{ + CWalletDB walletdb(strWalletFile); + walletdb.WriteBestBlock(loc); +} + +// This class implements an addrIncoming entry that causes pre-0.4 +// clients to crash on startup if reading a private-key-encrypted wallet. +class CCorruptAddress +{ +public: + IMPLEMENT_SERIALIZE + ( + if (nType & SER_DISK) + READWRITE(nVersion); + ) +}; + +bool CWallet::SetMinVersion(enum WalletFeature nVersion, CWalletDB* pwalletdbIn, bool fExplicit) +{ + if (nWalletVersion >= nVersion) + return true; + + // when doing an explicit upgrade, if we pass the max version permitted, upgrade all the way + if (fExplicit && nVersion > nWalletMaxVersion) + nVersion = FEATURE_LATEST; + + nWalletVersion = nVersion; + + if (nVersion > nWalletMaxVersion) + nWalletMaxVersion = nVersion; + + if (fFileBacked) + { + CWalletDB* pwalletdb = pwalletdbIn ? pwalletdbIn : new CWalletDB(strWalletFile); + if (nWalletVersion >= 40000) + { + // Versions prior to 0.4.0 did not support the "minversion" record. + // Use a CCorruptAddress to make them crash instead. + CCorruptAddress corruptAddress; + pwalletdb->WriteSetting("addrIncoming", corruptAddress); + } + if (nWalletVersion > 40000) + pwalletdb->WriteMinVersion(nWalletVersion); + if (!pwalletdbIn) + delete pwalletdb; + } + + return true; +} + +bool CWallet::SetMaxVersion(int nVersion) +{ + // cannot downgrade below current version + if (nWalletVersion > nVersion) + return false; + + nWalletMaxVersion = nVersion; + + return true; +} + +bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) +{ + if (IsCrypted()) + return false; + + CKeyingMaterial vMasterKey; + RandAddSeedPerfmon(); + + vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE); + RAND_bytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE); + + CMasterKey kMasterKey; + + RandAddSeedPerfmon(); + kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE); + RAND_bytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE); + + CCrypter crypter; + int64 nStartTime = GetTimeMillis(); + crypter.SetKeyFromPassphrase(strWalletPassphrase, kMasterKey.vchSalt, 25000, kMasterKey.nDerivationMethod); + kMasterKey.nDeriveIterations = 2500000 / ((double)(GetTimeMillis() - nStartTime)); + + nStartTime = GetTimeMillis(); + crypter.SetKeyFromPassphrase(strWalletPassphrase, kMasterKey.vchSalt, kMasterKey.nDeriveIterations, kMasterKey.nDerivationMethod); + kMasterKey.nDeriveIterations = (kMasterKey.nDeriveIterations + kMasterKey.nDeriveIterations * 100 / ((double)(GetTimeMillis() - nStartTime))) / 2; + + if (kMasterKey.nDeriveIterations < 25000) + kMasterKey.nDeriveIterations = 25000; + + printf("Encrypting Wallet with an nDeriveIterations of %i\n", kMasterKey.nDeriveIterations); + + if (!crypter.SetKeyFromPassphrase(strWalletPassphrase, kMasterKey.vchSalt, kMasterKey.nDeriveIterations, kMasterKey.nDerivationMethod)) + return false; + if (!crypter.Encrypt(vMasterKey, kMasterKey.vchCryptedKey)) + return false; + + { + LOCK(cs_wallet); + mapMasterKeys[++nMasterKeyMaxID] = kMasterKey; + if (fFileBacked) + { + pwalletdbEncryption = new CWalletDB(strWalletFile); + if (!pwalletdbEncryption->TxnBegin()) + return false; + pwalletdbEncryption->WriteMasterKey(nMasterKeyMaxID, kMasterKey); + } + + if (!EncryptKeys(vMasterKey)) + { + if (fFileBacked) + pwalletdbEncryption->TxnAbort(); + exit(1); //We now probably have half of our keys encrypted in memory, and half not...die and let the user reload their unencrypted wallet. + } + + // Encryption was introduced in version 0.4.0 + SetMinVersion(FEATURE_WALLETCRYPT, pwalletdbEncryption, true); + + if (fFileBacked) + { + if (!pwalletdbEncryption->TxnCommit()) + exit(1); //We now have keys encrypted in memory, but no on disk...die to avoid confusion and let the user reload their unencrypted wallet. + + delete pwalletdbEncryption; + pwalletdbEncryption = NULL; + } + + Lock(); + Unlock(strWalletPassphrase); + NewKeyPool(); + Lock(); + + // Need to completely rewrite the wallet file; if we don't, bdb might keep + // bits of the unencrypted private key in slack space in the database file. + CDB::Rewrite(strWalletFile); + + } + NotifyStatusChanged(this); + + return true; +} + +int64 CWallet::IncOrderPosNext(CWalletDB *pwalletdb) +{ + int64 nRet = nOrderPosNext++; + if (pwalletdb) { + pwalletdb->WriteOrderPosNext(nOrderPosNext); + } else { + CWalletDB(strWalletFile).WriteOrderPosNext(nOrderPosNext); + } + return nRet; +} + +CWallet::TxItems CWallet::OrderedTxItems(std::list& acentries, std::string strAccount) +{ + CWalletDB walletdb(strWalletFile); + + // First: get all CWalletTx and CAccountingEntry into a sorted-by-order multimap. + TxItems txOrdered; + + // Note: maintaining indices in the database of (account,time) --> txid and (account, time) --> acentry + // would make this much faster for applications that do this a lot. + for (map::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) + { + CWalletTx* wtx = &((*it).second); + txOrdered.insert(make_pair(wtx->nOrderPos, TxPair(wtx, (CAccountingEntry*)0))); + } + acentries.clear(); + walletdb.ListAccountCreditDebit(strAccount, acentries); + BOOST_FOREACH(CAccountingEntry& entry, acentries) + { + txOrdered.insert(make_pair(entry.nOrderPos, TxPair((CWalletTx*)0, &entry))); + } + + return txOrdered; +} + +void CWallet::WalletUpdateSpent(const CTransaction &tx) +{ + // 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 + // restored from backup or the user making copies of wallet.dat. + { + LOCK(cs_wallet); + BOOST_FOREACH(const CTxIn& txin, tx.vin) + { + map::iterator mi = mapWallet.find(txin.prevout.hash); + if (mi != mapWallet.end()) + { + CWalletTx& wtx = (*mi).second; + if (txin.prevout.n >= wtx.vout.size()) + 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 %snvc %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); + } + } + } + } +} + +void CWallet::MarkDirty() +{ + { + LOCK(cs_wallet); + BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet) + item.second.MarkDirty(); + } +} + +bool CWallet::AddToWallet(const CWalletTx& wtxIn) +{ + uint256 hash = wtxIn.GetHash(); + { + LOCK(cs_wallet); + // Inserts only if not already there, returns tx inserted or tx found + pair::iterator, bool> ret = mapWallet.insert(make_pair(hash, wtxIn)); + CWalletTx& wtx = (*ret.first).second; + wtx.BindWallet(this); + bool fInsertedNew = ret.second; + if (fInsertedNew) + { + wtx.nTimeReceived = GetAdjustedTime(); + wtx.nOrderPos = IncOrderPosNext(); + + wtx.nTimeSmart = wtx.nTimeReceived; + if (wtxIn.hashBlock != 0) + { + if (mapBlockIndex.count(wtxIn.hashBlock)) + { + unsigned int latestNow = wtx.nTimeReceived; + 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; + std::list acentries; + TxItems txOrdered = OrderedTxItems(acentries); + for (TxItems::reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it) + { + CWalletTx *const pwtx = (*it).second.first; + if (pwtx == &wtx) + continue; + CAccountingEntry *const pacentry = (*it).second.second; + int64 nSmartTime; + if (pwtx) + { + nSmartTime = pwtx->nTimeSmart; + if (!nSmartTime) + nSmartTime = pwtx->nTimeReceived; + } + else + nSmartTime = pacentry->nTime; + if (nSmartTime <= latestTolerated) + { + latestEntry = nSmartTime; + if (nSmartTime > latestNow) + latestNow = nSmartTime; + break; + } + } + } + + unsigned int& blocktime = mapBlockIndex[wtxIn.hashBlock]->nTime; + wtx.nTimeSmart = std::max(latestEntry, std::min(blocktime, latestNow)); + } + else + printf("AddToWallet() : found %s in block %s not in index\n", + wtxIn.GetHash().ToString().substr(0,10).c_str(), + wtxIn.hashBlock.ToString().c_str()); + } + } + + bool fUpdated = false; + if (!fInsertedNew) + { + // Merge + if (wtxIn.hashBlock != 0 && wtxIn.hashBlock != wtx.hashBlock) + { + wtx.hashBlock = wtxIn.hashBlock; + fUpdated = true; + } + if (wtxIn.nIndex != -1 && (wtxIn.vMerkleBranch != wtx.vMerkleBranch || wtxIn.nIndex != wtx.nIndex)) + { + wtx.vMerkleBranch = wtxIn.vMerkleBranch; + wtx.nIndex = wtxIn.nIndex; + fUpdated = true; + } + if (wtxIn.fFromMe && wtxIn.fFromMe != wtx.fFromMe) + { + wtx.fFromMe = wtxIn.fFromMe; + fUpdated = true; + } + fUpdated |= wtx.UpdateSpent(wtxIn.vfSpent); + } + + //// debug print + printf("AddToWallet %s %s%s\n", wtxIn.GetHash().ToString().substr(0,10).c_str(), (fInsertedNew ? "new" : ""), (fUpdated ? "update" : "")); + + // Write to disk + if (fInsertedNew || fUpdated) + if (!wtx.WriteToDisk()) + 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) + { + 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); + + // Notify UI of new or updated transaction + NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED); + } + return true; +} + +// Add a transaction to the wallet, or update it. +// pblock is optional, but should be provided if the transaction is known to be in a block. +// If fUpdate is true, existing transactions will be updated. +bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate, bool fFindBlock) +{ + uint256 hash = tx.GetHash(); + { + LOCK(cs_wallet); + bool fExisted = mapWallet.count(hash); + if (fExisted && !fUpdate) return false; + if (fExisted || IsMine(tx) || IsFromMe(tx)) + { + CWalletTx wtx(this,tx); + // Get merkle branch if transaction was found in a block + if (pblock) + wtx.SetMerkleBranch(pblock); + return AddToWallet(wtx); + } + else + WalletUpdateSpent(tx); + } + return false; +} + +bool CWallet::EraseFromWallet(uint256 hash) +{ + if (!fFileBacked) + return false; + { + LOCK(cs_wallet); + if (mapWallet.erase(hash)) + CWalletDB(strWalletFile).EraseTx(hash); + } + return true; +} + + +bool CWallet::IsMine(const CTxIn &txin) const +{ + { + LOCK(cs_wallet); + map::const_iterator mi = mapWallet.find(txin.prevout.hash); + if (mi != mapWallet.end()) + { + const CWalletTx& prev = (*mi).second; + if (txin.prevout.n < prev.vout.size()) + if (IsMine(prev.vout[txin.prevout.n])) + return true; + } + } + return false; +} + +int64 CWallet::GetDebit(const CTxIn &txin) const +{ + { + LOCK(cs_wallet); + map::const_iterator mi = mapWallet.find(txin.prevout.hash); + if (mi != mapWallet.end()) + { + const CWalletTx& prev = (*mi).second; + if (txin.prevout.n < prev.vout.size()) + if (IsMine(prev.vout[txin.prevout.n])) + return prev.vout[txin.prevout.n].nValue; + } + } + return 0; +} + +bool CWallet::IsChange(const CTxOut& txout) const +{ + CTxDestination address; + + // TODO: fix handling of 'change' outputs. The assumption is that any + // payment to a TX_PUBKEYHASH that is mine but isn't in the address book + // is change. That assumption is likely to break when we implement multisignature + // wallets that return change back into a multi-signature-protected address; + // a better way of identifying which outputs are 'the send' and which are + // 'the change' will need to be implemented (maybe extend CWalletTx to remember + // which output, if any, was change). + if (ExtractDestination(txout.scriptPubKey, address) && ::IsMine(*this, address)) + { + LOCK(cs_wallet); + if (!mapAddressBook.count(address)) + return true; + } + return false; +} + +int64 CWalletTx::GetTxTime() const +{ + int64 n = nTimeSmart; + return n ? n : nTimeReceived; +} + +int CWalletTx::GetRequestCount() const +{ + // Returns -1 if it wasn't being tracked + int nRequests = -1; + { + LOCK(pwallet->cs_wallet); + if (IsCoinBase() || IsCoinStake()) + { + // Generated block + if (hashBlock != 0) + { + map::const_iterator mi = pwallet->mapRequestCount.find(hashBlock); + if (mi != pwallet->mapRequestCount.end()) + nRequests = (*mi).second; + } + } + else + { + // Did anyone request this transaction? + map::const_iterator mi = pwallet->mapRequestCount.find(GetHash()); + if (mi != pwallet->mapRequestCount.end()) + { + nRequests = (*mi).second; + + // How about the block it's in? + if (nRequests == 0 && hashBlock != 0) + { + map::const_iterator mi = pwallet->mapRequestCount.find(hashBlock); + if (mi != pwallet->mapRequestCount.end()) + nRequests = (*mi).second; + else + nRequests = 1; // If it's in someone else's block it must have got out + } + } + } + } + return nRequests; +} + +void CWalletTx::GetAmounts(int64& nGeneratedImmature, int64& nGeneratedMature, list >& listReceived, + list >& listSent, int64& nFee, string& strSentAccount) const +{ + nGeneratedImmature = nGeneratedMature = nFee = 0; + listReceived.clear(); + listSent.clear(); + strSentAccount = strFromAccount; + + if (IsCoinBase() || IsCoinStake()) + { + if (GetBlocksToMaturity() > 0) + nGeneratedImmature = pwallet->GetCredit(*this); + else + nGeneratedMature = GetCredit(); + return; + } + + // Compute fee: + int64 nDebit = GetDebit(); + if (nDebit > 0) // debit>0 means we signed/sent this transaction + { + int64 nValueOut = GetValueOut(); + nFee = nDebit - nValueOut; + } + + // Sent/received. + BOOST_FOREACH(const CTxOut& txout, vout) + { + CTxDestination address; + vector vchPubKey; + if (!ExtractDestination(txout.scriptPubKey, address)) + { + printf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n", + this->GetHash().ToString().c_str()); + } + + // Don't report 'change' txouts + if (nDebit > 0 && pwallet->IsChange(txout)) + continue; + + if (nDebit > 0) + listSent.push_back(make_pair(address, txout.nValue)); + + if (pwallet->IsMine(txout)) + listReceived.push_back(make_pair(address, txout.nValue)); + } + +} + +void CWalletTx::GetAccountAmounts(const string& strAccount, int64& nGenerated, int64& nReceived, + int64& nSent, int64& nFee) const +{ + nReceived = nSent = nFee = 0; + + int64 allGeneratedImmature, allGeneratedMature, allFee; + string strSentAccount; + list > listReceived; + list > listSent; + GetAmounts(allGeneratedImmature, allGeneratedMature, listReceived, listSent, allFee, strSentAccount); + + if (strAccount == "") + nGenerated = allGeneratedMature; + if (strAccount == strSentAccount) + { + BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64)& s, listSent) + nSent += s.second; + nFee = allFee; + } + { + LOCK(pwallet->cs_wallet); + BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64)& r, listReceived) + { + if (pwallet->mapAddressBook.count(r.first)) + { + map::const_iterator mi = pwallet->mapAddressBook.find(r.first); + if (mi != pwallet->mapAddressBook.end() && (*mi).second == strAccount) + nReceived += r.second; + } + else if (strAccount.empty()) + { + nReceived += r.second; + } + } + } +} + +void CWalletTx::AddSupportingTransactions(CTxDB& txdb) +{ + vtxPrev.clear(); + + const int COPY_DEPTH = 3; + if (SetMerkleBranch() < COPY_DEPTH) + { + vector vWorkQueue; + BOOST_FOREACH(const CTxIn& txin, vin) + vWorkQueue.push_back(txin.prevout.hash); + + // This critsect is OK because txdb is already open + { + LOCK(pwallet->cs_wallet); + map mapWalletPrev; + set setAlreadyDone; + for (unsigned int i = 0; i < vWorkQueue.size(); i++) + { + uint256 hash = vWorkQueue[i]; + if (setAlreadyDone.count(hash)) + continue; + setAlreadyDone.insert(hash); + + CMerkleTx tx; + map::const_iterator mi = pwallet->mapWallet.find(hash); + if (mi != pwallet->mapWallet.end()) + { + tx = (*mi).second; + BOOST_FOREACH(const CMerkleTx& txWalletPrev, (*mi).second.vtxPrev) + mapWalletPrev[txWalletPrev.GetHash()] = &txWalletPrev; + } + else if (mapWalletPrev.count(hash)) + { + tx = *mapWalletPrev[hash]; + } + else if (!fClient && txdb.ReadDiskTx(hash, tx)) + { + ; + } + else + { + printf("ERROR: AddSupportingTransactions() : unsupported transaction\n"); + continue; + } + + int nDepth = tx.SetMerkleBranch(); + vtxPrev.push_back(tx); + + if (nDepth < COPY_DEPTH) + { + BOOST_FOREACH(const CTxIn& txin, tx.vin) + vWorkQueue.push_back(txin.prevout.hash); + } + } + } + } + + reverse(vtxPrev.begin(), vtxPrev.end()); +} + +bool CWalletTx::WriteToDisk() +{ + return CWalletDB(pwallet->strWalletFile).WriteTx(GetHash(), *this); +} + +// Scan the block chain (starting in pindexStart) for transactions +// from or to us. If fUpdate is true, found transactions that already +// exist in the wallet will be updated. +int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) +{ + int ret = 0; + + CBlockIndex* pindex = pindexStart; + { + LOCK(cs_wallet); + while (pindex) + { + CBlock block; + block.ReadFromDisk(pindex, true); + BOOST_FOREACH(CTransaction& tx, block.vtx) + { + if (AddToWalletIfInvolvingMe(tx, &block, fUpdate)) + ret++; + } + pindex = pindex->pnext; + } + } + return ret; +} + +int CWallet::ScanForWalletTransaction(const uint256& hashTx) +{ + CTransaction tx; + tx.ReadFromDisk(COutPoint(hashTx, 0)); + if (AddToWalletIfInvolvingMe(tx, NULL, true, true)) + return 1; + return 0; +} + +void CWallet::ReacceptWalletTransactions() +{ + CTxDB txdb("r"); + bool fRepeat = true; + while (fRepeat) + { + LOCK(cs_wallet); + fRepeat = false; + vector vMissingTx; + BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet) + { + CWalletTx& wtx = item.second; + if ((wtx.IsCoinBase() && wtx.IsSpent(0)) || (wtx.IsCoinStake() && wtx.IsSpent(1))) + continue; + + CTxIndex txindex; + bool fUpdated = false; + if (txdb.ReadTxIndex(wtx.GetHash(), txindex)) + { + // Update fSpent if a tx got spent somewhere else by a copy of wallet.dat + if (txindex.vSpent.size() != wtx.vout.size()) + { + printf("ERROR: ReacceptWalletTransactions() : txindex.vSpent.size() %"PRIszu" != wtx.vout.size() %"PRIszu"\n", txindex.vSpent.size(), wtx.vout.size()); + continue; + } + for (unsigned int i = 0; i < txindex.vSpent.size(); i++) + { + if (wtx.IsSpent(i)) + continue; + if (!txindex.vSpent[i].IsNull() && IsMine(wtx.vout[i])) + { + wtx.MarkSpent(i); + fUpdated = true; + vMissingTx.push_back(txindex.vSpent[i]); + } + } + if (fUpdated) + { + printf("ReacceptWalletTransactions found spent coin %snvc %s\n", FormatMoney(wtx.GetCredit()).c_str(), wtx.GetHash().ToString().c_str()); + wtx.MarkDirty(); + wtx.WriteToDisk(); + } + } + else + { + // Re-accept any txes of ours that aren't already in a block + if (!(wtx.IsCoinBase() || wtx.IsCoinStake())) + wtx.AcceptWalletTransaction(txdb, false); + } + } + if (!vMissingTx.empty()) + { + // TODO: optimize this to scan just part of the block chain? + if (ScanForWalletTransactions(pindexGenesisBlock)) + fRepeat = true; // Found missing transactions: re-do re-accept. + } + } +} + +void CWalletTx::RelayWalletTransaction(CTxDB& txdb) +{ + BOOST_FOREACH(const CMerkleTx& tx, vtxPrev) + { + if (!(tx.IsCoinBase() || tx.IsCoinStake())) + { + uint256 hash = tx.GetHash(); + if (!txdb.ContainsTx(hash)) + RelayMessage(CInv(MSG_TX, hash), (CTransaction)tx); + } + } + if (!(IsCoinBase() || IsCoinStake())) + { + uint256 hash = GetHash(); + if (!txdb.ContainsTx(hash)) + { + printf("Relaying wtx %s\n", hash.ToString().substr(0,10).c_str()); + RelayMessage(CInv(MSG_TX, hash), (CTransaction)*this); + } + } +} + +void CWalletTx::RelayWalletTransaction() +{ + CTxDB txdb("r"); + RelayWalletTransaction(txdb); +} + +void CWallet::ResendWalletTransactions() +{ + // 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; + + // Only do it if there's been a new block since last time + static int64 nLastTime; + if (nTimeBestReceived < nLastTime) + return; + nLastTime = GetTime(); + + // Rebroadcast any of our txes that aren't in a block yet + printf("ResendWalletTransactions()\n"); + CTxDB txdb("r"); + { + LOCK(cs_wallet); + // Sort them in chronological order + multimap mapSorted; + BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet) + { + 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) + mapSorted.insert(make_pair(wtx.nTimeReceived, &wtx)); + } + BOOST_FOREACH(PAIRTYPE(const unsigned int, CWalletTx*)& item, mapSorted) + { + CWalletTx& wtx = *item.second; + if (wtx.CheckTransaction()) + wtx.RelayWalletTransaction(txdb); + else + printf("ResendWalletTransactions() : CheckTransaction failed for transaction %s\n", wtx.GetHash().ToString().c_str()); + } + } +} + + + + + + +////////////////////////////////////////////////////////////////////////////// +// +// Actions +// + + +int64 CWallet::GetBalance() const +{ + int64 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()) + nTotal += pcoin->GetAvailableCredit(); + } + } + + return nTotal; +} + +int64 CWallet::GetUnconfirmedBalance() const +{ + int64 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()) + nTotal += pcoin->GetAvailableCredit(); + } + } + return nTotal; +} + +int64 CWallet::GetImmatureBalance() const +{ + int64 nTotal = 0; + { + LOCK(cs_wallet); + for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) + { + const CWalletTx& pcoin = (*it).second; + if (pcoin.IsCoinBase() && pcoin.GetBlocksToMaturity() > 0 && pcoin.IsInMainChain()) + nTotal += GetCredit(pcoin); + } + } + return nTotal; +} + +// populate vCoins with vector of spendable COutputs +void CWallet::AvailableCoins(vector& vCoins, bool fOnlyConfirmed) 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 (fOnlyConfirmed && !pcoin->IsConfirmed()) + continue; + + if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0) + continue; + + if(pcoin->IsCoinStake() && pcoin->GetBlocksToMaturity() > 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) + vCoins.push_back(COutput(pcoin, i, pcoin->GetDepthInMainChain())); + } + } +} + +static void ApproximateBestSubset(vector > >vValue, int64 nTotalLower, int64 nTargetValue, + vector& vfBest, int64& nBest, int iterations = 1000) +{ + vector vfIncluded; + + vfBest.assign(vValue.size(), true); + nBest = nTotalLower; + + for (int nRep = 0; nRep < iterations && nBest != nTargetValue; nRep++) + { + vfIncluded.assign(vValue.size(), false); + int64 nTotal = 0; + bool fReachedTarget = false; + for (int nPass = 0; nPass < 2 && !fReachedTarget; nPass++) + { + for (unsigned int i = 0; i < vValue.size(); i++) + { + if (nPass == 0 ? rand() % 2 : !vfIncluded[i]) + { + nTotal += vValue[i].first; + vfIncluded[i] = true; + if (nTotal >= nTargetValue) + { + fReachedTarget = true; + if (nTotal < nBest) + { + nBest = nTotal; + vfBest = vfIncluded; + } + nTotal -= vValue[i].first; + vfIncluded[i] = false; + } + } + } + } + } +} + +// ppcoin: total coins staked (non-spendable until maturity) +int64 CWallet::GetStake() const +{ + int64 nTotal = 0; + LOCK(cs_wallet); + for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) + { + const CWalletTx* pcoin = &(*it).second; + if (pcoin->IsCoinStake() && pcoin->GetBlocksToMaturity() > 0 && pcoin->GetDepthInMainChain() > 0) + nTotal += CWallet::GetCredit(*pcoin); + } + return nTotal; +} + +int64 CWallet::GetNewMint() const +{ + int64 nTotal = 0; + LOCK(cs_wallet); + for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) + { + const CWalletTx* pcoin = &(*it).second; + if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0 && pcoin->GetDepthInMainChain() > 0) + nTotal += CWallet::GetCredit(*pcoin); + } + return nTotal; +} + +bool CWallet::SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, int nConfMine, int nConfTheirs, vector vCoins, set >& setCoinsRet, int64& nValueRet) const +{ + setCoinsRet.clear(); + nValueRet = 0; + + // List of values less than target + pair > coinLowestLarger; + coinLowestLarger.first = std::numeric_limits::max(); + coinLowestLarger.second.first = NULL; + vector > > vValue; + int64 nTotalLower = 0; + + random_shuffle(vCoins.begin(), vCoins.end(), GetRandInt); + + BOOST_FOREACH(COutput output, vCoins) + { + const CWalletTx *pcoin = output.tx; + + if (output.nDepth < (pcoin->IsFromMe() ? nConfMine : nConfTheirs)) + continue; + + int i = output.i; + + if (pcoin->nTime > nSpendTime) + continue; // ppcoin: timestamp must not exceed spend time + + int64 n = pcoin->vout[i].nValue; + + pair > coin = make_pair(n,make_pair(pcoin, i)); + + if (n == nTargetValue) + { + setCoinsRet.insert(coin.second); + nValueRet += coin.first; + return true; + } + else if (n < nTargetValue + CENT) + { + vValue.push_back(coin); + nTotalLower += n; + } + else if (n < coinLowestLarger.first) + { + coinLowestLarger = coin; + } + } + + if (nTotalLower == nTargetValue) + { + for (unsigned int i = 0; i < vValue.size(); ++i) + { + setCoinsRet.insert(vValue[i].second); + nValueRet += vValue[i].first; + } + return true; + } + + if (nTotalLower < nTargetValue) + { + if (coinLowestLarger.second.first == NULL) + return false; + setCoinsRet.insert(coinLowestLarger.second); + nValueRet += coinLowestLarger.first; + return true; + } + + // Solve subset sum by stochastic approximation + sort(vValue.rbegin(), vValue.rend(), CompareValueOnly()); + vector vfBest; + int64 nBest; + + ApproximateBestSubset(vValue, nTotalLower, nTargetValue, vfBest, nBest, 1000); + if (nBest != nTargetValue && nTotalLower >= nTargetValue + CENT) + ApproximateBestSubset(vValue, nTotalLower, nTargetValue + CENT, vfBest, nBest, 1000); + + // If we have a bigger coin and (either the stochastic approximation didn't find a good solution, + // or the next bigger coin is closer), return the bigger coin + if (coinLowestLarger.second.first && + ((nBest != nTargetValue && nBest < nTargetValue + CENT) || coinLowestLarger.first <= nBest)) + { + setCoinsRet.insert(coinLowestLarger.second); + nValueRet += coinLowestLarger.first; + } + else { + for (unsigned int i = 0; i < vValue.size(); i++) + if (vfBest[i]) + { + setCoinsRet.insert(vValue[i].second); + nValueRet += vValue[i].first; + } + + if (fDebug && GetBoolArg("-printpriority")) + { + //// debug print + printf("SelectCoins() best subset: "); + for (unsigned int i = 0; i < vValue.size(); i++) + if (vfBest[i]) + printf("%s ", FormatMoney(vValue[i].first).c_str()); + printf("total %s\n", FormatMoney(nBest).c_str()); + } + } + + return true; +} + +bool CWallet::SelectCoins(int64 nTargetValue, unsigned int nSpendTime, set >& setCoinsRet, int64& nValueRet) const +{ + vector vCoins; + AvailableCoins(vCoins); + + return (SelectCoinsMinConf(nTargetValue, nSpendTime, 1, 6, vCoins, setCoinsRet, nValueRet) || + SelectCoinsMinConf(nTargetValue, nSpendTime, 1, 1, vCoins, setCoinsRet, nValueRet) || + SelectCoinsMinConf(nTargetValue, nSpendTime, 0, 1, vCoins, setCoinsRet, nValueRet)); +} + + + + +bool CWallet::CreateTransaction(const vector >& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet, std::string strTxComment) +{ + int64 nValue = 0; + BOOST_FOREACH (const PAIRTYPE(CScript, int64)& s, vecSend) + { + if (nValue < 0) + return false; + nValue += s.second; + } + if (vecSend.empty() || nValue < 0) + return false; + + wtxNew.BindWallet(this); + + // transaction comment + wtxNew.strTxComment = strTxComment; + if (wtxNew.strTxComment.length() > MAX_TX_COMMENT_LEN) + wtxNew.strTxComment.resize(MAX_TX_COMMENT_LEN); + + + { + LOCK2(cs_main, cs_wallet); + // txdb must be opened before the mapWallet lock + CTxDB txdb("r"); + { + nFeeRet = nTransactionFee; + loop + { + wtxNew.vin.clear(); + wtxNew.vout.clear(); + wtxNew.fFromMe = true; + + int64 nTotalValue = nValue + nFeeRet; + double dPriority = 0; + // vouts to the payees + BOOST_FOREACH (const PAIRTYPE(CScript, int64)& s, vecSend) + wtxNew.vout.push_back(CTxOut(s.second, s.first)); + + // Choose coins to use + set > setCoins; + int64 nValueIn = 0; + if (!SelectCoins(nTotalValue, wtxNew.nTime, setCoins, nValueIn)) + return false; + BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins) + { + int64 nCredit = pcoin.first->vout[pcoin.second].nValue; + dPriority += (double)nCredit * pcoin.first->GetDepthInMainChain(); + } + + int64 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); + nChange -= nMoveToFee; + nFeeRet += nMoveToFee; + } + + // ppcoin: sub-cent change is moved to fee + if (nChange > 0 && nChange < MIN_TXOUT_AMOUNT) + { + nFeeRet += nChange; + nChange = 0; + } + + if (nChange > 0) + { + // 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(); + // assert(mapKeys.count(vchPubKey)); + + // Fill a vout to ourself + // TODO: pass in scriptChange instead of reservekey so + // change transaction isn't always pay-to-curecoin-address + CScript scriptChange; + scriptChange.SetDestination(vchPubKey.GetID()); + + // Insert change txn at random position: + vector::iterator position = wtxNew.vout.begin()+GetRandInt(wtxNew.vout.size()); + wtxNew.vout.insert(position, CTxOut(nChange, scriptChange)); + } + else + reservekey.ReturnKey(); + + // Fill vin + BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins) + wtxNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second)); + + // Sign + int nIn = 0; + BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins) + if (!SignSignature(*this, *coin.first, wtxNew, nIn++)) + return false; + + // Limit size + unsigned int nBytes = ::GetSerializeSize(*(CTransaction*)&wtxNew, SER_NETWORK, PROTOCOL_VERSION); + if (nBytes >= MAX_BLOCK_SIZE_GEN/5) + return false; + dPriority /= nBytes; + + // Check that enough fee is included + int64 nPayFee = nTransactionFee * (1 + (int64)nBytes / 1000); + int64 nMinFee = wtxNew.GetMinFee(1, false, GMF_SEND); + + if (nFeeRet < max(nPayFee, nMinFee)) + { + nFeeRet = max(nPayFee, nMinFee); + continue; + } + + // Fill vtxPrev by copying from previous transactions vtxPrev + wtxNew.AddSupportingTransactions(txdb); + wtxNew.fTimeReceivedIsTxTime = true; + + break; + } + } + } + return true; +} + +bool CWallet::CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet, std::string strTxComment) +{ + vector< pair > vecSend; + vecSend.push_back(make_pair(scriptPubKey, nValue)); + return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, strTxComment); +} + +// ppcoin: create coin stake transaction +bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64 nSearchInterval, CTransaction& txNew) +{ + // 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 * 90); + const CBlockIndex* pIndex0 = GetLastBlockIndex(pindexBest, false); + int64 nCombineThreshold = 0; + if(pIndex0->pprev) + nCombineThreshold = GetProofOfWorkReward(pIndex0->nHeight, MIN_TX_FEE, pIndex0->pprev->GetBlockHash()) / 3; + + CBigNum bnTargetPerCoinDay; + bnTargetPerCoinDay.SetCompact(nBits); + + LOCK2(cs_main, cs_wallet); + 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"); + if (nBalance <= nReserveBalance) + return false; + set > setCoins; + vector vwtxPrev; + int64 nValueIn = 0; + if (!SelectCoins(nBalance - nReserveBalance, txNew.nTime, setCoins, nValueIn)) + return false; + if (setCoins.empty()) + return false; + int64 nCredit = 0; + CScript scriptPubKeyKernel; + BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins) + { + CTxDB txdb("r"); + CTxIndex txindex; + if (!txdb.ReadTxIndex(pcoin.first->GetHash(), txindex)) + continue; + + // Read block header + CBlock block; + if (!block.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos, false)) + continue; + static int nMaxStakeSearchInterval = 60; + if (block.GetBlockTime() + nStakeMinAge > txNew.nTime - nMaxStakeSearchInterval) + continue; // only count coins meeting min age requirement + + bool fKernelFound = false; + for (unsigned int n=0; nGetHash(), pcoin.second); + if (CheckStakeKernelHash(nBits, block, txindex.pos.nTxPos - txindex.pos.nBlockPos, *pcoin.first, prevoutStake, txNew.nTime - n, hashProofOfStake)) + { + // Found a kernel + if (fDebug && GetBoolArg("-printcoinstake")) + printf("CreateCoinStake : kernel found\n"); + vector vSolutions; + txnouttype whichType; + CScript scriptPubKeyOut; + scriptPubKeyKernel = pcoin.first->vout[pcoin.second].scriptPubKey; + if (!Solver(scriptPubKeyKernel, whichType, vSolutions)) + { + if (fDebug && GetBoolArg("-printcoinstake")) + printf("CreateCoinStake : failed to parse kernel\n"); + break; + } + if (fDebug && GetBoolArg("-printcoinstake")) + printf("CreateCoinStake : parsed kernel type=%d\n", whichType); + if (whichType != TX_PUBKEY && whichType != TX_PUBKEYHASH) + { + if (fDebug && GetBoolArg("-printcoinstake")) + printf("CreateCoinStake : no support for kernel type=%d\n", whichType); + break; // only support pay to public key and pay to address + } + 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")) + printf("CreateCoinStake : failed to get key for kernel type=%d\n", whichType); + break; // unable to find corresponding public key + } + scriptPubKeyOut << key.GetPubKey() << OP_CHECKSIG; + } + else + scriptPubKeyOut = scriptPubKeyKernel; + + txNew.nTime -= n; + txNew.vin.push_back(CTxIn(pcoin.first->GetHash(), pcoin.second)); + nCredit += pcoin.first->vout[pcoin.second].nValue; + 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 (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) + return false; + BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins) + { + // Attempt to add more inputs + // Only add coins of the same key/address as kernel + 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) + { + // 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) + 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) + continue; + // Do not add input that is still too young + if (pcoin.first->nTime + nStakeMaxAge > txNew.nTime) + 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; + CTxDB txdb("r"); + if (!txNew.GetCoinAge(txdb, nCoinAge)) + return error("CreateCoinStake : failed to calculate coin age"); + nCredit += GetProofOfStakeReward(nCoinAge, nBits, txNew.nTime); + } + + int64 nMinFee = 0; + loop + { + // Set output amount + if (txNew.vout.size() == 3) + { + if( GetLastBlockIndex(pindexBest, false)->nHeight > 14200 ) // Fix rounded + txNew.vout[1].nValue = ((nCredit - nMinFee) / 2 ); + else + 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; + } + } + + // Successfully generated coinstake + return true; +} + + +// Call after CreateTransaction unless you want to abort +bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey) +{ + { + LOCK2(cs_main, cs_wallet); + printf("CommitTransaction:\n%s", wtxNew.ToString().c_str()); + { + // This is only to keep the database open to defeat the auto-flush for the + // duration of this scope. This is the only place where this optimization + // maybe makes sense; please don't do it anywhere else. + CWalletDB* pwalletdb = fFileBacked ? new CWalletDB(strWalletFile,"r") : NULL; + + // Take key pair from key pool so it won't be used again + reservekey.KeepKey(); + + // Add tx to wallet, because if it has change it's also ours, + // otherwise just for transaction history. + AddToWallet(wtxNew); + + // Mark old coins as spent + set setCoins; + BOOST_FOREACH(const CTxIn& txin, wtxNew.vin) + { + CWalletTx &coin = mapWallet[txin.prevout.hash]; + coin.BindWallet(this); + coin.MarkSpent(txin.prevout.n); + coin.WriteToDisk(); + NotifyTransactionChanged(this, coin.GetHash(), CT_UPDATED); + } + + if (fFileBacked) + delete pwalletdb; + } + + // Track how many getdata requests our transaction gets + mapRequestCount[wtxNew.GetHash()] = 0; + + // Broadcast + if (!wtxNew.AcceptToMemoryPool()) + { + // This must not fail. The transaction has already been signed and recorded. + printf("CommitTransaction() : Error: Transaction not valid"); + return false; + } + wtxNew.RelayWalletTransaction(); + } + return true; +} + + + + +string CWallet::SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee, std::string strTxComment) +{ + CReserveKey reservekey(this); + int64 nFeeRequired; + + if (IsLocked()) + { + string strError = _("Error: Wallet locked, unable to create transaction "); + printf("SendMoney() : %s", strError.c_str()); + return strError; + } + if (fWalletUnlockMintOnly) + { + string strError = _("Error: Wallet unlocked for block minting only, unable to create transaction."); + printf("SendMoney() : %s", strError.c_str()); + return strError; + } + if (!CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired, strTxComment)) + { + string strError; + if (nValue + nFeeRequired > GetBalance()) + strError = strprintf(_("Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds "), FormatMoney(nFeeRequired).c_str()); + else + strError = _("Error: Transaction creation failed "); + printf("SendMoney() : %s", strError.c_str()); + return strError; + } + + if (fAskFee && !uiInterface.ThreadSafeAskFee(nFeeRequired, _("Sending..."))) + return "ABORTED"; + + if (!CommitTransaction(wtxNew, reservekey)) + return _("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."); + + return ""; +} + + + +string CWallet::SendMoneyToDestination(const CTxDestination& address, int64 nValue, CWalletTx& wtxNew, bool fAskFee, std::string strTxComment) +{ + // Check amount + if (nValue <= 0) + return _("Invalid amount"); + if (nValue + nTransactionFee > GetBalance()) + return _("Insufficient funds"); + + // Parse curecoin address + CScript scriptPubKey; + scriptPubKey.SetDestination(address); + + return SendMoney(scriptPubKey, nValue, wtxNew, fAskFee, strTxComment); +} + + + + +DBErrors CWallet::LoadWallet(bool& fFirstRunRet) +{ + if (!fFileBacked) + return DB_LOAD_OK; + fFirstRunRet = false; + DBErrors nLoadWalletRet = CWalletDB(strWalletFile,"cr+").LoadWallet(this); + if (nLoadWalletRet == DB_NEED_REWRITE) + { + if (CDB::Rewrite(strWalletFile, "\x04pool")) + { + setKeyPool.clear(); + // Note: can't top-up keypool here, because wallet is locked. + // User will be prompted to unlock wallet the next operation + // the requires a new key. + } + } + + if (nLoadWalletRet != DB_LOAD_OK) + return nLoadWalletRet; + fFirstRunRet = !vchDefaultKey.IsValid(); + + NewThread(ThreadFlushWalletDB, &strWalletFile); + return DB_LOAD_OK; +} + + +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); + if (!fFileBacked) + return false; + return CWalletDB(strWalletFile).WriteName(CcurecoinAddress(address).ToString(), strName); +} + +bool CWallet::DelAddressBookName(const CTxDestination& address) +{ + mapAddressBook.erase(address); + NotifyAddressBookChanged(this, address, "", ::IsMine(*this, address), CT_DELETED); + if (!fFileBacked) + return false; + return CWalletDB(strWalletFile).EraseName(CcurecoinAddress(address).ToString()); +} + + +void CWallet::PrintWallet(const CBlock& block) +{ + { + LOCK(cs_wallet); + 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()); + } + 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("\n"); +} + +bool CWallet::GetTransaction(const uint256 &hashTx, CWalletTx& wtx) +{ + { + LOCK(cs_wallet); + map::iterator mi = mapWallet.find(hashTx); + if (mi != mapWallet.end()) + { + wtx = (*mi).second; + return true; + } + } + return false; +} + +bool CWallet::SetDefaultKey(const CPubKey &vchPubKey) +{ + if (fFileBacked) + { + if (!CWalletDB(strWalletFile).WriteDefaultKey(vchPubKey)) + return false; + } + vchDefaultKey = vchPubKey; + return true; +} + +bool GetWalletFile(CWallet* pwallet, string &strWalletFileOut) +{ + if (!pwallet->fFileBacked) + return false; + strWalletFileOut = pwallet->strWalletFile; + return true; +} + +// +// Mark old keypool keys as used, +// and generate all new keys +// +bool CWallet::NewKeyPool() +{ + { + LOCK(cs_wallet); + CWalletDB walletdb(strWalletFile); + BOOST_FOREACH(int64 nIndex, setKeyPool) + walletdb.ErasePool(nIndex); + setKeyPool.clear(); + + if (IsLocked()) + return false; + + int64 nKeys = max(GetArg("-keypool", 100), (int64)0); + for (int i = 0; i < nKeys; i++) + { + int64 nIndex = i+1; + walletdb.WritePool(nIndex, CKeyPool(GenerateNewKey())); + setKeyPool.insert(nIndex); + } + printf("CWallet::NewKeyPool wrote %"PRI64d" new keys\n", nKeys); + } + return true; +} + +bool CWallet::TopUpKeyPool() +{ + { + LOCK(cs_wallet); + + if (IsLocked()) + return false; + + CWalletDB walletdb(strWalletFile); + + // Top up key pool + unsigned int nTargetSize = max(GetArg("-keypool", 100), 0LL); + while (setKeyPool.size() < (nTargetSize + 1)) + { + int64 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()); + } + } + return true; +} + +void CWallet::ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool) +{ + nIndex = -1; + keypool.vchPubKey = CPubKey(); + { + LOCK(cs_wallet); + + if (!IsLocked()) + TopUpKeyPool(); + + // Get the oldest key + if(setKeyPool.empty()) + return; + + CWalletDB walletdb(strWalletFile); + + nIndex = *(setKeyPool.begin()); + setKeyPool.erase(setKeyPool.begin()); + if (!walletdb.ReadPool(nIndex, keypool)) + throw runtime_error("ReserveKeyFromKeyPool() : read failed"); + if (!HaveKey(keypool.vchPubKey.GetID())) + throw runtime_error("ReserveKeyFromKeyPool() : unknown key in key pool"); + assert(keypool.vchPubKey.IsValid()); + if (fDebug && GetBoolArg("-printkeypool")) + printf("keypool reserve %"PRI64d"\n", nIndex); + } +} + +int64 CWallet::AddReserveKey(const CKeyPool& keypool) +{ + { + LOCK2(cs_main, cs_wallet); + CWalletDB walletdb(strWalletFile); + + int64 nIndex = 1 + *(--setKeyPool.end()); + if (!walletdb.WritePool(nIndex, keypool)) + throw runtime_error("AddReserveKey() : writing added key failed"); + setKeyPool.insert(nIndex); + return nIndex; + } + return -1; +} + +void CWallet::KeepKey(int64 nIndex) +{ + // Remove from key pool + if (fFileBacked) + { + CWalletDB walletdb(strWalletFile); + walletdb.ErasePool(nIndex); + } + if(fDebug) + printf("keypool keep %"PRI64d"\n", nIndex); +} + +void CWallet::ReturnKey(int64 nIndex) +{ + // Return to key pool + { + LOCK(cs_wallet); + setKeyPool.insert(nIndex); + } + if(fDebug) + printf("keypool return %"PRI64d"\n", nIndex); +} + +bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse) +{ + int64 nIndex = 0; + CKeyPool keypool; + { + LOCK(cs_wallet); + ReserveKeyFromKeyPool(nIndex, keypool); + if (nIndex == -1) + { + if (fAllowReuse && vchDefaultKey.IsValid()) + { + result = vchDefaultKey; + return true; + } + if (IsLocked()) return false; + result = GenerateNewKey(); + return true; + } + KeepKey(nIndex); + result = keypool.vchPubKey; + } + return true; +} + +int64 CWallet::GetOldestKeyPoolTime() +{ + int64 nIndex = 0; + CKeyPool keypool; + ReserveKeyFromKeyPool(nIndex, keypool); + if (nIndex == -1) + return GetTime(); + ReturnKey(nIndex); + return keypool.nTime; +} + +std::map CWallet::GetAddressBalances() +{ + map balances; + + { + LOCK(cs_wallet); + BOOST_FOREACH(PAIRTYPE(uint256, CWalletTx) walletEntry, mapWallet) + { + CWalletTx *pcoin = &walletEntry.second; + + if (!pcoin->IsFinal() || !pcoin->IsConfirmed()) + continue; + + if ((pcoin->IsCoinBase() || pcoin->IsCoinStake()) && pcoin->GetBlocksToMaturity() > 0) + continue; + + int nDepth = pcoin->GetDepthInMainChain(); + if (nDepth < (pcoin->IsFromMe() ? 0 : 1)) + continue; + + for (unsigned int i = 0; i < pcoin->vout.size(); i++) + { + CTxDestination addr; + if (!IsMine(pcoin->vout[i])) + continue; + if(!ExtractDestination(pcoin->vout[i].scriptPubKey, addr)) + continue; + + int64 n = pcoin->IsSpent(i) ? 0 : pcoin->vout[i].nValue; + + if (!balances.count(addr)) + balances[addr] = 0; + balances[addr] += n; + } + } + } + + return balances; +} + +set< set > CWallet::GetAddressGroupings() +{ + set< set > groupings; + set grouping; + + BOOST_FOREACH(PAIRTYPE(uint256, CWalletTx) walletEntry, mapWallet) + { + CWalletTx *pcoin = &walletEntry.second; + + if (pcoin->vin.size() > 0 && IsMine(pcoin->vin[0])) + { + // group all input addresses with each other + BOOST_FOREACH(CTxIn txin, pcoin->vin) + { + CTxDestination address; + if(!ExtractDestination(mapWallet[txin.prevout.hash].vout[txin.prevout.n].scriptPubKey, address)) + continue; + grouping.insert(address); + } + + // group change with input addresses + BOOST_FOREACH(CTxOut txout, pcoin->vout) + if (IsChange(txout)) + { + CWalletTx tx = mapWallet[pcoin->vin[0].prevout.hash]; + CTxDestination txoutAddr; + if(!ExtractDestination(txout.scriptPubKey, txoutAddr)) + continue; + grouping.insert(txoutAddr); + } + groupings.insert(grouping); + grouping.clear(); + } + + // group lone addrs by themselves + for (unsigned int i = 0; i < pcoin->vout.size(); i++) + if (IsMine(pcoin->vout[i])) + { + CTxDestination address; + if(!ExtractDestination(pcoin->vout[i].scriptPubKey, address)) + continue; + grouping.insert(address); + groupings.insert(grouping); + grouping.clear(); + } + } + + set< set* > uniqueGroupings; // a set of pointers to groups of addresses + map< CTxDestination, set* > setmap; // map addresses to the unique group containing it + BOOST_FOREACH(set grouping, groupings) + { + // make a set of all the groups hit by this new group + set< set* > hits; + map< CTxDestination, set* >::iterator it; + BOOST_FOREACH(CTxDestination address, grouping) + if ((it = setmap.find(address)) != setmap.end()) + hits.insert((*it).second); + + // merge all hit groups into a new single group and delete old groups + set* merged = new set(grouping); + BOOST_FOREACH(set* hit, hits) + { + merged->insert(hit->begin(), hit->end()); + uniqueGroupings.erase(hit); + delete hit; + } + uniqueGroupings.insert(merged); + + // update setmap + BOOST_FOREACH(CTxDestination element, *merged) + setmap[element] = merged; + } + + set< set > ret; + BOOST_FOREACH(set* uniqueGrouping, uniqueGroupings) + { + ret.insert(*uniqueGrouping); + delete uniqueGrouping; + } + + return ret; +} + +// ppcoin: check 'spent' consistency between wallet and txindex +// ppcoin: fix wallet spent state according to txindex +void CWallet::FixSpentCoins(int& nMismatchFound, int64& nBalanceInQuestion, bool fCheckOnly) +{ + nMismatchFound = 0; + nBalanceInQuestion = 0; + + LOCK(cs_wallet); + vector vCoins; + vCoins.reserve(mapWallet.size()); + for (map::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) + vCoins.push_back(&(*it).second); + + CTxDB txdb("r"); + BOOST_FOREACH(CWalletTx* pcoin, vCoins) + { + // Find the corresponding transaction index + CTxIndex txindex; + if (!txdb.ReadTxIndex(pcoin->GetHash(), txindex)) + continue; + for (unsigned int n=0; n < pcoin->vout.size(); n++) + { + if (IsMine(pcoin->vout[n]) && pcoin->IsSpent(n) && (txindex.vSpent.size() <= n || txindex.vSpent[n].IsNull())) + { + printf("FixSpentCoins found lost coin %sppc %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; + if (!fCheckOnly) + { + pcoin->MarkUnspent(n); + pcoin->WriteToDisk(); + } + } + else if (IsMine(pcoin->vout[n]) && !pcoin->IsSpent(n) && (txindex.vSpent.size() > n && !txindex.vSpent[n].IsNull())) + { + printf("FixSpentCoins found spent coin %sppc %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; + if (!fCheckOnly) + { + pcoin->MarkSpent(n); + pcoin->WriteToDisk(); + } + } + } + } +} + +// ppcoin: disable transaction (only for coinstake) +void CWallet::DisableTransaction(const CTransaction &tx) +{ + if (!tx.IsCoinStake() || !IsFromMe(tx)) + return; // only disconnecting coinstake requires marking input unspent + + LOCK(cs_wallet); + BOOST_FOREACH(const CTxIn& txin, tx.vin) + { + map::iterator mi = mapWallet.find(txin.prevout.hash); + if (mi != mapWallet.end()) + { + CWalletTx& prev = (*mi).second; + if (txin.prevout.n < prev.vout.size() && IsMine(prev.vout[txin.prevout.n])) + { + prev.MarkUnspent(txin.prevout.n); + prev.WriteToDisk(); + } + } + } +} + +CPubKey CReserveKey::GetReservedKey() +{ + if (nIndex == -1) + { + CKeyPool keypool; + pwallet->ReserveKeyFromKeyPool(nIndex, keypool); + if (nIndex != -1) + vchPubKey = keypool.vchPubKey; + else + { + printf("CReserveKey::GetReservedKey(): Warning: Using default key instead of a new key, top up your keypool!"); + vchPubKey = pwallet->vchDefaultKey; + } + } + assert(vchPubKey.IsValid()); + return vchPubKey; +} + +void CReserveKey::KeepKey() +{ + if (nIndex != -1) + pwallet->KeepKey(nIndex); + nIndex = -1; + vchPubKey = CPubKey(); +} + +void CReserveKey::ReturnKey() +{ + if (nIndex != -1) + pwallet->ReturnKey(nIndex); + nIndex = -1; + vchPubKey = CPubKey(); +} + +void CWallet::GetAllReserveKeys(set& setAddress) +{ + setAddress.clear(); + + CWalletDB walletdb(strWalletFile); + + LOCK2(cs_main, cs_wallet); + BOOST_FOREACH(const int64& id, setKeyPool) + { + CKeyPool keypool; + if (!walletdb.ReadPool(id, keypool)) + throw runtime_error("GetAllReserveKeyHashes() : read failed"); + assert(keypool.vchPubKey.IsValid()); + CKeyID keyID = keypool.vchPubKey.GetID(); + if (!HaveKey(keyID)) + throw runtime_error("GetAllReserveKeyHashes() : unknown key in key pool"); + setAddress.insert(keyID); + } +} + +void CWallet::UpdatedTransaction(const uint256 &hashTx) +{ + { + LOCK(cs_wallet); + // Only notify UI if this transaction is in this wallet + map::const_iterator mi = mapWallet.find(hashTx); + if (mi != mapWallet.end()) + NotifyTransactionChanged(this, hashTx, CT_UPDATED); + } +} diff --git a/src/wallet.h b/src/wallet.h new file mode 100644 index 0000000..78b2b09 --- /dev/null +++ b/src/wallet.h @@ -0,0 +1,860 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_WALLET_H +#define curecoin_WALLET_H + +#include +#include + +#include + +#include "main.h" +#include "key.h" +#include "keystore.h" +#include "script.h" +#include "ui_interface.h" +#include "util.h" +#include "walletdb.h" + +extern bool fWalletUnlockMintOnly; +class CAccountingEntry; +class CWalletTx; +class CReserveKey; +class COutput; + +/** (client) version numbers for particular wallet features */ +enum WalletFeature +{ + FEATURE_BASE = 10500, // the earliest version new wallets supports (only useful for getinfo's clientversion output) + + FEATURE_WALLETCRYPT = 40000, // wallet encryption + FEATURE_COMPRPUBKEY = 60000, // compressed public keys + + FEATURE_LATEST = 60000 +}; + + +/** A key pool entry */ +class CKeyPool +{ +public: + int64 nTime; + CPubKey vchPubKey; + + CKeyPool() + { + nTime = GetTime(); + } + + CKeyPool(const CPubKey& vchPubKeyIn) + { + nTime = GetTime(); + vchPubKey = vchPubKeyIn; + } + + IMPLEMENT_SERIALIZE + ( + if (!(nType & SER_GETHASH)) + READWRITE(nVersion); + READWRITE(nTime); + READWRITE(vchPubKey); + ) +}; + +/** A CWallet is an extension of a keystore, which also maintains a set of transactions and balances, + * and provides the ability to create new transactions. + */ +class CWallet : public CCryptoKeyStore +{ +private: + bool SelectCoins(int64 nTargetValue, unsigned int nSpendTime, std::set >& setCoinsRet, int64& nValueRet) const; + + CWalletDB *pwalletdbEncryption; + + // the current wallet version: clients below this version are not able to load the wallet + int nWalletVersion; + + // the maximum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded + int nWalletMaxVersion; + +public: + mutable CCriticalSection cs_wallet; + + bool fFileBacked; + std::string strWalletFile; + + std::set setKeyPool; + + + typedef std::map MasterKeyMap; + MasterKeyMap mapMasterKeys; + unsigned int nMasterKeyMaxID; + + CWallet() + { + nWalletVersion = FEATURE_BASE; + nWalletMaxVersion = FEATURE_BASE; + fFileBacked = false; + nMasterKeyMaxID = 0; + pwalletdbEncryption = NULL; + nOrderPosNext = 0; + } + CWallet(std::string strWalletFileIn) + { + nWalletVersion = FEATURE_BASE; + nWalletMaxVersion = FEATURE_BASE; + strWalletFile = strWalletFileIn; + fFileBacked = true; + nMasterKeyMaxID = 0; + pwalletdbEncryption = NULL; + nOrderPosNext = 0; + } + + std::map mapWallet; + int64 nOrderPosNext; + std::map mapRequestCount; + + std::map mapAddressBook; + + CPubKey vchDefaultKey; + + // check whether we are allowed to upgrade (or already support) to the named feature + bool CanSupportFeature(enum WalletFeature wf) { return nWalletMaxVersion >= wf; } + + void AvailableCoins(std::vector& vCoins, bool fOnlyConfirmed=true) const; + bool SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, int nConfMine, int nConfTheirs, std::vector vCoins, std::set >& setCoinsRet, int64& nValueRet) const; + // keystore implementation + // Generate a new key + CPubKey GenerateNewKey(); + // Adds a key to the store, and saves it to disk. + 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); } + + 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 AddCScript(const CScript& redeemScript); + bool LoadCScript(const CScript& redeemScript) { return CCryptoKeyStore::AddCScript(redeemScript); } + + bool Unlock(const SecureString& strWalletPassphrase); + bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase); + bool EncryptWallet(const SecureString& strWalletPassphrase); + + /** Increment the next transaction order id + @return next transaction order id + */ + int64 IncOrderPosNext(CWalletDB *pwalletdb = NULL); + + typedef std::pair TxPair; + typedef std::multimap TxItems; + + /** Get the wallet's activity log + @return multimap of ordered transactions and accounting entries + @warning Returned pointers are *only* valid within the scope of passed acentries + */ + TxItems OrderedTxItems(std::list& acentries, std::string strAccount = ""); + + void MarkDirty(); + 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); + 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, std::string strTxComment); + bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet, std::string strTxComment); + bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey); + 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 strTxComment = ""); + std::string SendMoneyToDestination(const CTxDestination &address, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false, std::string strTxComment = ""); + + + bool NewKeyPool(); + bool TopUpKeyPool(); + int64 AddReserveKey(const CKeyPool& keypool); + void ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool); + void KeepKey(int64 nIndex); + void ReturnKey(int64 nIndex); + bool GetKeyFromPool(CPubKey &key, bool fAllowReuse=true); + int64 GetOldestKeyPoolTime(); + void GetAllReserveKeys(std::set& setAddress); + + std::set< std::set > GetAddressGroupings(); + std::map GetAddressBalances(); + + bool IsMine(const CTxIn& txin) const; + int64 GetDebit(const CTxIn& txin) const; + bool IsMine(const CTxOut& txout) const + { + return ::IsMine(*this, txout.scriptPubKey); + } + int64 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 + { + if (!MoneyRange(txout.nValue)) + throw std::runtime_error("CWallet::GetChange() : value out of range"); + return (IsChange(txout) ? txout.nValue : 0); + } + bool IsMine(const CTransaction& tx) const + { + BOOST_FOREACH(const CTxOut& txout, tx.vout) + if (IsMine(txout)) + return true; + return false; + } + bool IsFromMe(const CTransaction& tx) const + { + return (GetDebit(tx) > 0); + } + int64 GetDebit(const CTransaction& tx) const + { + int64 nDebit = 0; + BOOST_FOREACH(const CTxIn& txin, tx.vin) + { + nDebit += GetDebit(txin); + if (!MoneyRange(nDebit)) + throw std::runtime_error("CWallet::GetDebit() : value out of range"); + } + return nDebit; + } + int64 GetCredit(const CTransaction& tx) const + { + int64 nCredit = 0; + BOOST_FOREACH(const CTxOut& txout, tx.vout) + { + nCredit += GetCredit(txout); + if (!MoneyRange(nCredit)) + throw std::runtime_error("CWallet::GetCredit() : value out of range"); + } + return nCredit; + } + int64 GetChange(const CTransaction& tx) const + { + int64 nChange = 0; + BOOST_FOREACH(const CTxOut& txout, tx.vout) + { + nChange += GetChange(txout); + if (!MoneyRange(nChange)) + throw std::runtime_error("CWallet::GetChange() : value out of range"); + } + return nChange; + } + void SetBestChain(const CBlockLocator& loc); + + DBErrors LoadWallet(bool& fFirstRunRet); + + bool SetAddressBookName(const CTxDestination& address, const std::string& strName); + + bool DelAddressBookName(const CTxDestination& address); + + void UpdatedTransaction(const uint256 &hashTx); + + void PrintWallet(const CBlock& block); + + void Inventory(const uint256 &hash) + { + { + LOCK(cs_wallet); + std::map::iterator mi = mapRequestCount.find(hash); + if (mi != mapRequestCount.end()) + (*mi).second++; + } + } + + int GetKeyPoolSize() + { + return setKeyPool.size(); + } + + bool GetTransaction(const uint256 &hashTx, CWalletTx& wtx); + + bool SetDefaultKey(const CPubKey &vchPubKey); + + // signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVersion if those are lower + bool SetMinVersion(enum WalletFeature, CWalletDB* pwalletdbIn = NULL, bool fExplicit = false); + + // change which version we're allowed to upgrade to (note that this does not immediately imply upgrading to that format) + bool SetMaxVersion(int nVersion); + + // 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 DisableTransaction(const CTransaction &tx); + + /** Address book entry changed. + * @note called with lock cs_wallet held. + */ + boost::signals2::signal NotifyAddressBookChanged; + + /** Wallet transaction added, removed or updated. + * @note called with lock cs_wallet held. + */ + boost::signals2::signal NotifyTransactionChanged; +}; + +/** A key allocated from the key pool. */ +class CReserveKey +{ +protected: + CWallet* pwallet; + int64 nIndex; + CPubKey vchPubKey; +public: + CReserveKey(CWallet* pwalletIn) + { + nIndex = -1; + pwallet = pwalletIn; + } + + ~CReserveKey() + { + if (!fShutdown) + ReturnKey(); + } + + void ReturnKey(); + CPubKey GetReservedKey(); + void KeepKey(); +}; + + +typedef std::map mapValue_t; + + +static void ReadOrderPos(int64& nOrderPos, mapValue_t& mapValue) +{ + if (!mapValue.count("n")) + { + nOrderPos = -1; // TODO: calculate elsewhere + return; + } + nOrderPos = atoi64(mapValue["n"].c_str()); +} + + +static void WriteOrderPos(const int64& nOrderPos, mapValue_t& mapValue) +{ + if (nOrderPos == -1) + return; + mapValue["n"] = i64tostr(nOrderPos); +} + + +/** A transaction with a bunch of additional info that only the owner cares about. + * It includes any unrecorded transactions needed to link it back to the block chain. + */ +class CWalletTx : public CMerkleTx +{ +private: + const CWallet* pwallet; + +public: + std::vector vtxPrev; + mapValue_t mapValue; + std::vector > vOrderForm; + unsigned int fTimeReceivedIsTxTime; + unsigned int nTimeReceived; // time received by this node + unsigned int nTimeSmart; + char fFromMe; + std::string strFromAccount; + std::vector vfSpent; // which outputs are already spent + int64 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; + + CWalletTx() + { + Init(NULL); + } + + CWalletTx(const CWallet* pwalletIn) + { + Init(pwalletIn); + } + + CWalletTx(const CWallet* pwalletIn, const CMerkleTx& txIn) : CMerkleTx(txIn) + { + Init(pwalletIn); + } + + CWalletTx(const CWallet* pwalletIn, const CTransaction& txIn) : CMerkleTx(txIn) + { + Init(pwalletIn); + } + + void Init(const CWallet* pwalletIn) + { + pwallet = pwalletIn; + vtxPrev.clear(); + mapValue.clear(); + vOrderForm.clear(); + fTimeReceivedIsTxTime = false; + nTimeReceived = 0; + nTimeSmart = 0; + fFromMe = false; + strFromAccount.clear(); + vfSpent.clear(); + fDebitCached = false; + fCreditCached = false; + fAvailableCreditCached = false; + fChangeCached = false; + nDebitCached = 0; + nCreditCached = 0; + nAvailableCreditCached = 0; + nChangeCached = 0; + nOrderPos = -1; + } + + IMPLEMENT_SERIALIZE + ( + CWalletTx* pthis = const_cast(this); + if (fRead) + pthis->Init(NULL); + char fSpent = false; + + if (!fRead) + { + pthis->mapValue["fromaccount"] = pthis->strFromAccount; + + std::string str; + BOOST_FOREACH(char f, vfSpent) + { + str += (f ? '1' : '0'); + if (f) + fSpent = true; + } + pthis->mapValue["spent"] = str; + + WriteOrderPos(pthis->nOrderPos, pthis->mapValue); + + if (nTimeSmart) + pthis->mapValue["timesmart"] = strprintf("%u", nTimeSmart); + } + + nSerSize += SerReadWrite(s, *(CMerkleTx*)this, nType, nVersion,ser_action); + READWRITE(vtxPrev); + READWRITE(mapValue); + READWRITE(vOrderForm); + READWRITE(fTimeReceivedIsTxTime); + READWRITE(nTimeReceived); + READWRITE(fFromMe); + READWRITE(fSpent); + + if (fRead) + { + pthis->strFromAccount = pthis->mapValue["fromaccount"]; + + if (mapValue.count("spent")) + BOOST_FOREACH(char c, pthis->mapValue["spent"]) + pthis->vfSpent.push_back(c != '0'); + else + pthis->vfSpent.assign(vout.size(), fSpent); + + ReadOrderPos(pthis->nOrderPos, pthis->mapValue); + + pthis->nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(pthis->mapValue["timesmart"]) : 0; + } + + pthis->mapValue.erase("fromaccount"); + pthis->mapValue.erase("version"); + pthis->mapValue.erase("spent"); + pthis->mapValue.erase("n"); + pthis->mapValue.erase("timesmart"); + ) + + // marks certain txout's as spent + // returns true if any update took place + bool UpdateSpent(const std::vector& vfNewSpent) + { + bool fReturn = false; + for (unsigned int i = 0; i < vfNewSpent.size(); i++) + { + if (i == vfSpent.size()) + break; + + if (vfNewSpent[i] && !vfSpent[i]) + { + vfSpent[i] = true; + fReturn = true; + fAvailableCreditCached = false; + } + } + return fReturn; + } + + // make sure balances are recalculated + void MarkDirty() + { + fCreditCached = false; + fAvailableCreditCached = false; + fDebitCached = false; + fChangeCached = false; + } + + void BindWallet(CWallet *pwalletIn) + { + pwallet = pwalletIn; + MarkDirty(); + } + + void MarkSpent(unsigned int nOut) + { + if (nOut >= vout.size()) + throw std::runtime_error("CWalletTx::MarkSpent() : nOut out of range"); + vfSpent.resize(vout.size()); + if (!vfSpent[nOut]) + { + vfSpent[nOut] = true; + fAvailableCreditCached = false; + } + } + + void MarkUnspent(unsigned int nOut) + { + if (nOut >= vout.size()) + throw std::runtime_error("CWalletTx::MarkUnspent() : nOut out of range"); + vfSpent.resize(vout.size()); + if (vfSpent[nOut]) + { + vfSpent[nOut] = false; + fAvailableCreditCached = false; + } + } + + bool IsSpent(unsigned int nOut) const + { + if (nOut >= vout.size()) + throw std::runtime_error("CWalletTx::IsSpent() : nOut out of range"); + if (nOut >= vfSpent.size()) + return false; + return (!!vfSpent[nOut]); + } + + int64 GetDebit() const + { + if (vin.empty()) + return 0; + if (fDebitCached) + return nDebitCached; + nDebitCached = pwallet->GetDebit(*this); + fDebitCached = true; + return nDebitCached; + } + + int64 GetCredit(bool fUseCache=true) const + { + // Must wait until coinbase is safely deep enough in the chain before valuing it + if ((IsCoinBase() || IsCoinStake()) && GetBlocksToMaturity() > 0) + return 0; + + // GetBalance can assume transactions in mapWallet won't change + if (fUseCache && fCreditCached) + return nCreditCached; + nCreditCached = pwallet->GetCredit(*this); + fCreditCached = true; + return nCreditCached; + } + + int64 GetAvailableCredit(bool fUseCache=true) const + { + // Must wait until coinbase is safely deep enough in the chain before valuing it + if ((IsCoinBase() || IsCoinStake()) && GetBlocksToMaturity() > 0) + return 0; + + if (fUseCache && fAvailableCreditCached) + return nAvailableCreditCached; + + int64 nCredit = 0; + for (unsigned int i = 0; i < vout.size(); i++) + { + if (!IsSpent(i)) + { + const CTxOut &txout = vout[i]; + nCredit += pwallet->GetCredit(txout); + if (!MoneyRange(nCredit)) + throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range"); + } + } + + nAvailableCreditCached = nCredit; + fAvailableCreditCached = true; + return nCredit; + } + + + int64 GetChange() const + { + if (fChangeCached) + return nChangeCached; + nChangeCached = pwallet->GetChange(*this); + fChangeCached = true; + return nChangeCached; + } + + void GetAmounts(int64& nGeneratedImmature, int64& nGeneratedMature, std::list >& listReceived, + std::list >& listSent, int64& nFee, std::string& strSentAccount) const; + + void GetAccountAmounts(const std::string& strAccount, int64& nGenerated, int64& nReceived, + int64& nSent, int64& nFee) const; + + bool IsFromMe() const + { + return (GetDebit() > 0); + } + + bool IsConfirmed() const + { + // Quick answer in most cases + if (!IsFinal()) + return false; + if (GetDepthInMainChain() >= 1) + return true; + if (!IsFromMe()) // using wtx's cached debit + return false; + + // If no confirmations but it's from us, we can still + // consider it confirmed if all dependencies are confirmed + std::map mapPrev; + std::vector vWorkQueue; + vWorkQueue.reserve(vtxPrev.size()+1); + vWorkQueue.push_back(this); + for (unsigned int i = 0; i < vWorkQueue.size(); i++) + { + const CMerkleTx* ptx = vWorkQueue[i]; + + if (!ptx->IsFinal()) + return false; + if (ptx->GetDepthInMainChain() >= 1) + continue; + if (!pwallet->IsFromMe(*ptx)) + return false; + + if (mapPrev.empty()) + { + BOOST_FOREACH(const CMerkleTx& tx, vtxPrev) + mapPrev[tx.GetHash()] = &tx; + } + + BOOST_FOREACH(const CTxIn& txin, ptx->vin) + { + if (!mapPrev.count(txin.prevout.hash)) + return false; + vWorkQueue.push_back(mapPrev[txin.prevout.hash]); + } + } + return true; + } + + bool WriteToDisk(); + + int64 GetTxTime() const; + int GetRequestCount() const; + + void AddSupportingTransactions(CTxDB& txdb); + + bool AcceptWalletTransaction(CTxDB& txdb, bool fCheckInputs=true); + bool AcceptWalletTransaction(); + + void RelayWalletTransaction(CTxDB& txdb); + void RelayWalletTransaction(); +}; + + + + +class COutput +{ +public: + const CWalletTx *tx; + int i; + int nDepth; + + COutput(const CWalletTx *txIn, int iIn, int nDepthIn) + { + tx = txIn; i = iIn; nDepth = nDepthIn; + } + + std::string ToString() const + { + return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString().substr(0,10).c_str(), i, nDepth, FormatMoney(tx->vout[i].nValue).c_str()); + } + + void print() const + { + printf("%s\n", ToString().c_str()); + } +}; + + + + +/** Private key that includes an expiration date in case it never gets used. */ +class CWalletKey +{ +public: + CPrivKey vchPrivKey; + int64 nTimeCreated; + int64 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) + { + nTimeCreated = (nExpires ? GetTime() : 0); + nTimeExpires = nExpires; + } + + IMPLEMENT_SERIALIZE + ( + if (!(nType & SER_GETHASH)) + READWRITE(nVersion); + READWRITE(vchPrivKey); + READWRITE(nTimeCreated); + READWRITE(nTimeExpires); + READWRITE(strComment); + ) +}; + + + + + + +/** Account information. + * Stored in wallet with key "acc"+string account name. + */ +class CAccount +{ +public: + CPubKey vchPubKey; + + CAccount() + { + SetNull(); + } + + void SetNull() + { + vchPubKey = CPubKey(); + } + + IMPLEMENT_SERIALIZE + ( + if (!(nType & SER_GETHASH)) + READWRITE(nVersion); + READWRITE(vchPubKey); + ) +}; + + + +/** Internal transfers. + * Database key is acentry. + */ +class CAccountingEntry +{ +public: + std::string strAccount; + int64 nCreditDebit; + int64 nTime; + std::string strOtherAccount; + std::string strComment; + mapValue_t mapValue; + int64 nOrderPos; // position in ordered transaction list + uint64 nEntryNo; + + CAccountingEntry() + { + SetNull(); + } + + void SetNull() + { + nCreditDebit = 0; + nTime = 0; + strAccount.clear(); + strOtherAccount.clear(); + strComment.clear(); + nOrderPos = -1; + } + + IMPLEMENT_SERIALIZE + ( + CAccountingEntry& me = *const_cast(this); + if (!(nType & SER_GETHASH)) + READWRITE(nVersion); + // Note: strAccount is serialized as part of the key, not here. + READWRITE(nCreditDebit); + READWRITE(nTime); + READWRITE(strOtherAccount); + + if (!fRead) + { + WriteOrderPos(nOrderPos, me.mapValue); + + if (!(mapValue.empty() && _ssExtra.empty())) + { + CDataStream ss(nType, nVersion); + ss.insert(ss.begin(), '\0'); + ss << mapValue; + ss.insert(ss.end(), _ssExtra.begin(), _ssExtra.end()); + me.strComment.append(ss.str()); + } + } + + READWRITE(strComment); + + size_t nSepPos = strComment.find("\0", 0, 1); + if (fRead) + { + me.mapValue.clear(); + if (std::string::npos != nSepPos) + { + CDataStream ss(std::vector(strComment.begin() + nSepPos + 1, strComment.end()), nType, nVersion); + ss >> me.mapValue; + me._ssExtra = std::vector(ss.begin(), ss.end()); + } + ReadOrderPos(me.nOrderPos, me.mapValue); + } + if (std::string::npos != nSepPos) + me.strComment.erase(nSepPos); + + me.mapValue.erase("n"); + ) + +private: + std::vector _ssExtra; +}; + +bool GetWalletFile(CWallet* pwallet, std::string &strWalletFileOut); + +#endif diff --git a/src/walletdb.cpp b/src/walletdb.cpp new file mode 100644 index 0000000..ee3a0f0 --- /dev/null +++ b/src/walletdb.cpp @@ -0,0 +1,676 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "walletdb.h" +#include "wallet.h" +#include + +using namespace std; +using namespace boost; + + +static uint64 nAccountingEntryNumber = 0; +extern bool fWalletUnlockMintOnly; + +// +// CWalletDB +// + +bool CWalletDB::WriteName(const string& strAddress, const string& strName) +{ + nWalletDBUpdated++; + return Write(make_pair(string("name"), strAddress), strName); +} + +bool CWalletDB::EraseName(const string& strAddress) +{ + // This should only be used for sending addresses, never for receiving addresses, + // receiving addresses must always have an address book entry if they're not change return. + nWalletDBUpdated++; + return Erase(make_pair(string("name"), strAddress)); +} + +bool CWalletDB::ReadAccount(const string& strAccount, CAccount& account) +{ + account.SetNull(); + return Read(make_pair(string("acc"), strAccount), account); +} + +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) +{ + return Write(boost::make_tuple(string("acentry"), acentry.strAccount, nAccEntryNum), acentry); +} + +bool CWalletDB::WriteAccountingEntry(const CAccountingEntry& acentry) +{ + return WriteAccountingEntry(++nAccountingEntryNumber, acentry); +} + +int64 CWalletDB::GetAccountCreditDebit(const string& strAccount) +{ + list entries; + ListAccountCreditDebit(strAccount, entries); + + int64 nCreditDebit = 0; + BOOST_FOREACH (const CAccountingEntry& entry, entries) + nCreditDebit += entry.nCreditDebit; + + return nCreditDebit; +} + +void CWalletDB::ListAccountCreditDebit(const string& strAccount, list& entries) +{ + bool fAllAccounts = (strAccount == "*"); + + Dbc* pcursor = GetCursor(); + if (!pcursor) + throw runtime_error("CWalletDB::ListAccountCreditDebit() : cannot create DB cursor"); + unsigned int fFlags = DB_SET_RANGE; + loop + { + // Read next record + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + if (fFlags == DB_SET_RANGE) + ssKey << boost::make_tuple(string("acentry"), (fAllAccounts? string("") : strAccount), uint64(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) + { + pcursor->close(); + throw runtime_error("CWalletDB::ListAccountCreditDebit() : error scanning DB"); + } + + // Unserialize + string strType; + ssKey >> strType; + if (strType != "acentry") + break; + CAccountingEntry acentry; + ssKey >> acentry.strAccount; + if (!fAllAccounts && acentry.strAccount != strAccount) + break; + + ssValue >> acentry; + ssKey >> acentry.nEntryNo; + entries.push_back(acentry); + } + + pcursor->close(); +} + + +DBErrors +CWalletDB::ReorderTransactions(CWallet* pwallet) +{ + LOCK(pwallet->cs_wallet); + // Old wallets didn't have any defined order for transactions + // Probably a bad idea to change the output of this + + // First: get all CWalletTx and CAccountingEntry into a sorted-by-time multimap. + typedef pair TxPair; + typedef multimap TxItems; + TxItems txByTime; + + for (map::iterator it = pwallet->mapWallet.begin(); it != pwallet->mapWallet.end(); ++it) + { + CWalletTx* wtx = &((*it).second); + txByTime.insert(make_pair(wtx->nTimeReceived, TxPair(wtx, (CAccountingEntry*)0))); + } + list acentries; + ListAccountCreditDebit("", acentries); + BOOST_FOREACH(CAccountingEntry& entry, acentries) + { + txByTime.insert(make_pair(entry.nTime, TxPair((CWalletTx*)0, &entry))); + } + + int64& nOrderPosNext = pwallet->nOrderPosNext; + nOrderPosNext = 0; + 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; + + if (nOrderPos == -1) + { + nOrderPos = nOrderPosNext++; + nOrderPosOffsets.push_back(nOrderPos); + + if (pacentry) + // Have to write accounting regardless, since we don't keep it in memory + if (!WriteAccountingEntry(pacentry->nEntryNo, *pacentry)) + return DB_LOAD_FAIL; + } + else + { + int64 nOrderPosOff = 0; + BOOST_FOREACH(const int64& nOffsetStart, nOrderPosOffsets) + { + if (nOrderPos >= nOffsetStart) + ++nOrderPosOff; + } + nOrderPos += nOrderPosOff; + nOrderPosNext = std::max(nOrderPosNext, nOrderPos + 1); + + if (!nOrderPosOff) + continue; + + // Since we're changing the order, write it back + if (pwtx) + { + if (!WriteTx(pwtx->GetHash(), *pwtx)) + return DB_LOAD_FAIL; + } + else + if (!WriteAccountingEntry(pacentry->nEntryNo, *pacentry)) + return DB_LOAD_FAIL; + } + } + + return DB_LOAD_OK; +} + + +bool +ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, + int& nFileVersion, vector& vWalletUpgrade, + bool& fIsEncrypted, bool& fAnyUnordered, string& strType, string& strErr) +{ + try { + // Unserialize + // Taking advantage of the fact that pair serialization + // is just the two items serialized one after the other + ssKey >> strType; + if (strType == "name") + { + string strAddress; + ssKey >> strAddress; + ssValue >> pwallet->mapAddressBook[CcurecoinAddress(strAddress).Get()]; + } + else if (strType == "tx") + { + uint256 hash; + ssKey >> hash; + CWalletTx& wtx = pwallet->mapWallet[hash]; + ssValue >> wtx; + if (wtx.CheckTransaction() && (wtx.GetHash() == hash)) + wtx.BindWallet(pwallet); + else + { + pwallet->mapWallet.erase(hash); + return false; + } + + // Undo serialize changes in 31600 + if (31404 <= wtx.fTimeReceivedIsTxTime && wtx.fTimeReceivedIsTxTime <= 31703) + { + if (!ssValue.empty()) + { + char fTmp; + char fUnused; + ssValue >> fTmp >> fUnused >> wtx.strFromAccount; + strErr = strprintf("LoadWallet() upgrading tx ver=%d %d '%s' %s", + wtx.fTimeReceivedIsTxTime, fTmp, wtx.strFromAccount.c_str(), hash.ToString().c_str()); + wtx.fTimeReceivedIsTxTime = fTmp; + } + else + { + strErr = strprintf("LoadWallet() repairing tx ver=%d %s", wtx.fTimeReceivedIsTxTime, hash.ToString().c_str()); + wtx.fTimeReceivedIsTxTime = 0; + } + vWalletUpgrade.push_back(hash); + } + + if (wtx.nOrderPos == -1) + fAnyUnordered = true; + + //// debug print + //printf("LoadWallet %s\n", wtx.GetHash().ToString().c_str()); + //printf(" %12"PRI64d" %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(), + // wtx.mapValue["message"].c_str()); + } + else if (strType == "acentry") + { + string strAccount; + ssKey >> strAccount; + uint64 nNumber; + ssKey >> nNumber; + if (nNumber > nAccountingEntryNumber) + nAccountingEntryNumber = nNumber; + + if (!fAnyUnordered) + { + CAccountingEntry acentry; + ssValue >> acentry; + if (acentry.nOrderPos == -1) + fAnyUnordered = true; + } + } + else if (strType == "key" || strType == "wkey") + { + vector vchPubKey; + ssKey >> vchPubKey; + CKey key; + if (strType == "key") + { + CPrivKey pkey; + ssValue >> pkey; + key.SetPubKey(vchPubKey); + if (!key.SetPrivKey(pkey)) + { + strErr = "Error reading wallet database: CPrivKey corrupt"; + return false; + } + if (key.GetPubKey() != vchPubKey) + { + strErr = "Error reading wallet database: CPrivKey pubkey inconsistency"; + return false; + } + if (!key.IsValid()) + { + strErr = "Error reading wallet database: invalid CPrivKey"; + return false; + } + } + else + { + CWalletKey wkey; + ssValue >> wkey; + key.SetPubKey(vchPubKey); + if (!key.SetPrivKey(wkey.vchPrivKey)) + { + strErr = "Error reading wallet database: CPrivKey corrupt"; + return false; + } + if (key.GetPubKey() != vchPubKey) + { + strErr = "Error reading wallet database: CWalletKey pubkey inconsistency"; + return false; + } + if (!key.IsValid()) + { + strErr = "Error reading wallet database: invalid CWalletKey"; + return false; + } + } + if (!pwallet->LoadKey(key)) + { + strErr = "Error reading wallet database: LoadKey failed"; + return false; + } + } + else if (strType == "mkey") + { + unsigned int nID; + ssKey >> nID; + CMasterKey kMasterKey; + ssValue >> kMasterKey; + if(pwallet->mapMasterKeys.count(nID) != 0) + { + strErr = strprintf("Error reading wallet database: duplicate CMasterKey id %u", nID); + return false; + } + pwallet->mapMasterKeys[nID] = kMasterKey; + if (pwallet->nMasterKeyMaxID < nID) + pwallet->nMasterKeyMaxID = nID; + } + else if (strType == "ckey") + { + vector vchPubKey; + ssKey >> vchPubKey; + vector vchPrivKey; + ssValue >> vchPrivKey; + if (!pwallet->LoadCryptedKey(vchPubKey, vchPrivKey)) + { + strErr = "Error reading wallet database: LoadCryptedKey failed"; + return false; + } + fIsEncrypted = true; + } + else if (strType == "defaultkey") + { + ssValue >> pwallet->vchDefaultKey; + } + else if (strType == "pool") + { + int64 nIndex; + ssKey >> nIndex; + pwallet->setKeyPool.insert(nIndex); + } + else if (strType == "version") + { + ssValue >> nFileVersion; + if (nFileVersion == 10300) + nFileVersion = 300; + } + else if (strType == "cscript") + { + uint160 hash; + ssKey >> hash; + CScript script; + ssValue >> script; + if (!pwallet->LoadCScript(script)) + { + strErr = "Error reading wallet database: LoadCScript failed"; + return false; + } + } + else if (strType == "orderposnext") + { + ssValue >> pwallet->nOrderPosNext; + } + } catch (...) + { + return false; + } + return true; +} + +static bool IsKeyType(string strType) +{ + return (strType== "key" || strType == "wkey" || + strType == "mkey" || strType == "ckey"); +} + +DBErrors CWalletDB::LoadWallet(CWallet* pwallet) +{ + pwallet->vchDefaultKey = CPubKey(); + int nFileVersion = 0; + vector vWalletUpgrade; + bool fIsEncrypted = false; + bool fAnyUnordered = false; + bool fNoncriticalErrors = false; + DBErrors result = DB_LOAD_OK; + + try { + LOCK(pwallet->cs_wallet); + int nMinVersion = 0; + if (Read((string)"minversion", nMinVersion)) + { + if (nMinVersion > CLIENT_VERSION) + return DB_TOO_NEW; + pwallet->LoadMinVersion(nMinVersion); + } + + // Get cursor + Dbc* pcursor = GetCursor(); + if (!pcursor) + { + printf("Error getting wallet database cursor\n"); + return DB_CORRUPT; + } + + loop + { + // Read next record + CDataStream ssKey(SER_DISK, CLIENT_VERSION); + CDataStream ssValue(SER_DISK, CLIENT_VERSION); + int ret = ReadAtCursor(pcursor, ssKey, ssValue); + if (ret == DB_NOTFOUND) + break; + else if (ret != 0) + { + printf("Error reading next record from wallet database\n"); + return DB_CORRUPT; + } + + // Try to be tolerant of single corrupt records: + string strType, strErr; + if (!ReadKeyValue(pwallet, ssKey, ssValue, nFileVersion, + vWalletUpgrade, fIsEncrypted, fAnyUnordered, strType, strErr)) + { + // losing keys is considered a catastrophic error, anything else + // we assume the user can live with: + if (IsKeyType(strType)) + result = DB_CORRUPT; + else + { + // Leave other errors alone, if we try to fix them we might make things worse. + fNoncriticalErrors = true; // ... but do warn the user there is something wrong. + if (strType == "tx") + // Rescan if there is a bad transaction record: + SoftSetBoolArg("-rescan", true); + } + } + if (!strErr.empty()) + printf("%s\n", strErr.c_str()); + } + pcursor->close(); + } + catch (...) + { + result = DB_CORRUPT; + } + + if (fNoncriticalErrors && result == DB_LOAD_OK) + result = DB_NONCRITICAL_ERROR; + + // Any wallet corruption at all: skip any rewriting or + // upgrading, we don't want to make it worse. + if (result != DB_LOAD_OK) + return result; + + printf("nFileVersion = %d\n", nFileVersion); + + BOOST_FOREACH(uint256 hash, vWalletUpgrade) + WriteTx(hash, pwallet->mapWallet[hash]); + + // Rewrite encrypted wallets of versions 0.4.0 and 0.5.0rc: + if (fIsEncrypted && (nFileVersion == 40000 || nFileVersion == 50000)) + return DB_NEED_REWRITE; + + if (nFileVersion < CLIENT_VERSION) // Update + WriteVersion(CLIENT_VERSION); + + if (fAnyUnordered) + result = ReorderTransactions(pwallet); + + return result; +} + +void ThreadFlushWalletDB(void* parg) +{ + // Make this thread recognisable as the wallet flushing thread + RenameThread("curecoin-wallet"); + + const string& strFile = ((const string*)parg)[0]; + static bool fOneThread; + if (fOneThread) + return; + fOneThread = true; + if (!GetBoolArg("-flushwallet", true)) + return; + + unsigned int nLastSeen = nWalletDBUpdated; + unsigned int nLastFlushed = nWalletDBUpdated; + int64 nLastWalletUpdate = GetTime(); + while (!fShutdown) + { + Sleep(500); + + if (nLastSeen != nWalletDBUpdated) + { + nLastSeen = nWalletDBUpdated; + nLastWalletUpdate = GetTime(); + } + + if (nLastFlushed != nWalletDBUpdated && GetTime() - nLastWalletUpdate >= 2) + { + TRY_LOCK(bitdb.cs_db,lockDb); + if (lockDb) + { + // Don't do this if any databases are in use + int nRefCount = 0; + map::iterator mi = bitdb.mapFileUseCount.begin(); + while (mi != bitdb.mapFileUseCount.end()) + { + nRefCount += (*mi).second; + mi++; + } + + if (nRefCount == 0 && !fShutdown) + { + map::iterator mi = bitdb.mapFileUseCount.find(strFile); + if (mi != bitdb.mapFileUseCount.end()) + { + printf("Flushing wallet.dat\n"); + nLastFlushed = nWalletDBUpdated; + int64 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); + } + } + } + } + } +} + +bool BackupWallet(const CWallet& wallet, const string& strDest) +{ + if (!wallet.fFileBacked) + return false; + while (!fShutdown) + { + { + LOCK(bitdb.cs_db); + if (!bitdb.mapFileUseCount.count(wallet.strWalletFile) || bitdb.mapFileUseCount[wallet.strWalletFile] == 0) + { + // Flush log data to the dat file + bitdb.CloseDb(wallet.strWalletFile); + bitdb.CheckpointLSN(wallet.strWalletFile); + bitdb.mapFileUseCount.erase(wallet.strWalletFile); + + // Copy wallet.dat + filesystem::path pathSrc = GetDataDir() / wallet.strWalletFile; + filesystem::path pathDest(strDest); + if (filesystem::is_directory(pathDest)) + pathDest /= wallet.strWalletFile; + + try { +#if BOOST_VERSION >= 104000 + filesystem::copy_file(pathSrc, pathDest, filesystem::copy_option::overwrite_if_exists); +#else + filesystem::copy_file(pathSrc, pathDest); +#endif + printf("copied wallet.dat to %s\n", pathDest.string().c_str()); + return true; + } catch(const filesystem::filesystem_error &e) { + printf("error copying wallet.dat to %s - %s\n", pathDest.string().c_str(), e.what()); + return false; + } + } + } + Sleep(100); + } + return false; +} + +// +// Try to (very carefully!) recover wallet.dat if there is a problem. +// +bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys) +{ + // Recovery procedure: + // move wallet.dat to wallet.timestamp.bak + // Call Salvage with fAggressive=true to + // get as much data as possible. + // 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); + + int result = dbenv.dbenv.dbrename(NULL, filename.c_str(), NULL, + newFilename.c_str(), DB_AUTO_COMMIT); + if (result == 0) + printf("Renamed %s to %s\n", filename.c_str(), newFilename.c_str()); + else + { + printf("Failed to rename %s to %s\n", filename.c_str(), newFilename.c_str()); + return false; + } + + std::vector salvagedData; + bool allOK = dbenv.Salvage(newFilename, true, salvagedData); + if (salvagedData.empty()) + { + printf("Salvage(aggressive) found no records in %s.\n", newFilename.c_str()); + return false; + } + printf("Salvage(aggressive) found %"PRIszu" records\n", salvagedData.size()); + + bool fSuccess = allOK; + Db* pdbCopy = new Db(&dbenv.dbenv, 0); + int ret = pdbCopy->open(NULL, // Txn pointer + filename.c_str(), // Filename + "main", // Logical db name + DB_BTREE, // Database type + DB_CREATE, // Flags + 0); + if (ret > 0) + { + printf("Cannot create database file %s\n", filename.c_str()); + return false; + } + CWallet dummyWallet; + int nFileVersion = 0; + vector vWalletUpgrade; + bool fIsEncrypted = false; + bool fAnyUnordered = false; + + DbTxn* ptxn = dbenv.TxnBegin(); + BOOST_FOREACH(CDBEnv::KeyValPair& row, salvagedData) + { + if (fOnlyKeys) + { + CDataStream ssKey(row.first, SER_DISK, CLIENT_VERSION); + CDataStream ssValue(row.second, SER_DISK, CLIENT_VERSION); + string strType, strErr; + bool fReadOK = ReadKeyValue(&dummyWallet, ssKey, ssValue, + nFileVersion, vWalletUpgrade, + fIsEncrypted, fAnyUnordered, + strType, strErr); + if (!IsKeyType(strType)) + continue; + if (!fReadOK) + { + printf("WARNING: CWalletDB::Recover skipping %s: %s\n", strType.c_str(), strErr.c_str()); + continue; + } + } + Dbt datKey(&row.first[0], row.first.size()); + Dbt datValue(&row.second[0], row.second.size()); + int ret2 = pdbCopy->put(ptxn, &datKey, &datValue, DB_NOOVERWRITE); + if (ret2 > 0) + fSuccess = false; + } + ptxn->commit(0); + pdbCopy->close(0); + delete pdbCopy; + + return fSuccess; +} + +bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename) +{ + return CWalletDB::Recover(dbenv, filename, false); +} diff --git a/src/walletdb.h b/src/walletdb.h new file mode 100644 index 0000000..dc1ae64 --- /dev/null +++ b/src/walletdb.h @@ -0,0 +1,163 @@ +// Copyright (c) 2009-2010 Satoshi Nakamoto +// Copyright (c) 2013 The curecoin developer +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. +#ifndef curecoin_WALLETDB_H +#define curecoin_WALLETDB_H + +#include "db.h" +#include "base58.h" + +class CKeyPool; +class CAccount; +class CAccountingEntry; + +/** Error statuses for the wallet database */ +enum DBErrors +{ + DB_LOAD_OK, + DB_CORRUPT, + DB_NONCRITICAL_ERROR, + DB_TOO_NEW, + DB_LOAD_FAIL, + DB_NEED_REWRITE +}; + +/** Access to the wallet database (wallet.dat) */ +class CWalletDB : public CDB +{ +public: + CWalletDB(std::string strFilename, const char* pszMode="r+") : CDB(strFilename.c_str(), pszMode) + { + } +private: + CWalletDB(const CWalletDB&); + void operator=(const CWalletDB&); +public: + bool WriteName(const std::string& strAddress, const std::string& strName); + + bool EraseName(const std::string& strAddress); + + bool WriteTx(uint256 hash, const CWalletTx& wtx) + { + nWalletDBUpdated++; + return Write(std::make_pair(std::string("tx"), hash), wtx); + } + + bool EraseTx(uint256 hash) + { + nWalletDBUpdated++; + return Erase(std::make_pair(std::string("tx"), hash)); + } + + bool WriteKey(const CPubKey& vchPubKey, const CPrivKey& vchPrivKey) + { + nWalletDBUpdated++; + return Write(std::make_pair(std::string("key"), vchPubKey.Raw()), vchPrivKey, false); + } + + bool WriteCryptedKey(const CPubKey& vchPubKey, const std::vector& vchCryptedSecret, bool fEraseUnencryptedKey = true) + { + nWalletDBUpdated++; + if (!Write(std::make_pair(std::string("ckey"), vchPubKey.Raw()), vchCryptedSecret, false)) + return false; + if (fEraseUnencryptedKey) + { + Erase(std::make_pair(std::string("key"), vchPubKey.Raw())); + Erase(std::make_pair(std::string("wkey"), vchPubKey.Raw())); + } + return true; + } + + bool WriteMasterKey(unsigned int nID, const CMasterKey& kMasterKey) + { + nWalletDBUpdated++; + return Write(std::make_pair(std::string("mkey"), nID), kMasterKey, true); + } + + bool WriteCScript(const uint160& hash, const CScript& redeemScript) + { + nWalletDBUpdated++; + return Write(std::make_pair(std::string("cscript"), hash), redeemScript, false); + } + + bool WriteBestBlock(const CBlockLocator& locator) + { + nWalletDBUpdated++; + return Write(std::string("bestblock"), locator); + } + + bool ReadBestBlock(CBlockLocator& locator) + { + return Read(std::string("bestblock"), locator); + } + + bool WriteOrderPosNext(int64 nOrderPosNext) + { + nWalletDBUpdated++; + return Write(std::string("orderposnext"), nOrderPosNext); + } + + bool WriteDefaultKey(const CPubKey& vchPubKey) + { + nWalletDBUpdated++; + return Write(std::string("defaultkey"), vchPubKey.Raw()); + } + + bool ReadPool(int64 nPool, CKeyPool& keypool) + { + return Read(std::make_pair(std::string("pool"), nPool), keypool); + } + + bool WritePool(int64 nPool, const CKeyPool& keypool) + { + nWalletDBUpdated++; + return Write(std::make_pair(std::string("pool"), nPool), keypool); + } + + bool ErasePool(int64 nPool) + { + nWalletDBUpdated++; + return Erase(std::make_pair(std::string("pool"), nPool)); + } + + // Settings are no longer stored in wallet.dat; these are + // used only for backwards compatibility: + template + bool ReadSetting(const std::string& strKey, T& value) + { + return Read(std::make_pair(std::string("setting"), strKey), value); + } + template + bool WriteSetting(const std::string& strKey, const T& value) + { + nWalletDBUpdated++; + return Write(std::make_pair(std::string("setting"), strKey), value); + } + bool EraseSetting(const std::string& strKey) + { + nWalletDBUpdated++; + return Erase(std::make_pair(std::string("setting"), strKey)); + } + + bool WriteMinVersion(int nVersion) + { + return Write(std::string("minversion"), nVersion); + } + + 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); +public: + bool WriteAccountingEntry(const CAccountingEntry& acentry); + int64 GetAccountCreditDebit(const std::string& strAccount); + void ListAccountCreditDebit(const std::string& strAccount, std::list& acentries); + + DBErrors ReorderTransactions(CWallet*); + DBErrors LoadWallet(CWallet* pwallet); + static bool Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys); + static bool Recover(CDBEnv& dbenv, std::string filename); +}; + +#endif // curecoin_WALLETDB_H